packages feed

ghc 8.4.4 → 8.6.1

raw patch · 358 files changed

+50632/−57644 lines, 358 filesdep +ghc-heapdep ~basedep ~containersdep ~ghc-bootPVP ok

version bump matches the API change (PVP)

Dependencies added: ghc-heap

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

API changes (from Hackage documentation)

- ApiAnnotation: AnnTildehsh :: AnnKeywordId
- BasicTypes: AnyclassStrategy :: DerivStrategy
- BasicTypes: FunPrec :: TyPrec
- BasicTypes: NewtypeStrategy :: DerivStrategy
- BasicTypes: StockStrategy :: DerivStrategy
- BasicTypes: TopPrec :: TyPrec
- BasicTypes: TyConPrec :: TyPrec
- BasicTypes: TyOpPrec :: TyPrec
- BasicTypes: data DerivStrategy
- BasicTypes: data TyPrec
- BasicTypes: instance Data.Data.Data BasicTypes.DerivStrategy
- BasicTypes: instance GHC.Classes.Eq BasicTypes.DerivStrategy
- BasicTypes: instance GHC.Classes.Eq BasicTypes.TyPrec
- BasicTypes: instance GHC.Classes.Ord BasicTypes.TyPrec
- BasicTypes: instance Outputable.Outputable BasicTypes.DerivStrategy
- Binary: instance Binary.Binary a => Binary.Binary (GHC.Base.Maybe a)
- BuildTyCl: mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
- CLabel: mkLargeSRTLabel :: Unique -> CLabel
- CLabel: mkMAP_FROZEN0_infoLabel :: CLabel
- CLabel: mkMAP_FROZEN_infoLabel :: CLabel
- CLabel: mkSMAP_FROZEN0_infoLabel :: CLabel
- CLabel: mkSMAP_FROZEN_infoLabel :: CLabel
- CLabel: mkTopSRTLabel :: Unique -> CLabel
- Cmm: C_SRT :: !CLabel -> !WordOff -> !StgHalfWord -> C_SRT
- Cmm: NoC_SRT :: C_SRT
- Cmm: data C_SRT
- Cmm: instance GHC.Classes.Eq Cmm.C_SRT
- Cmm: needsSRT :: C_SRT -> Bool
- CmmBuildInfoTables: data TopSRT
- CmmBuildInfoTables: instance Outputable.Outputable CmmBuildInfoTables.TopSRT
- CmmBuildInfoTables: isEmptySRT :: TopSRT -> Bool
- CmmBuildInfoTables: srtToData :: TopSRT -> CmmGroup
- CmmUtils: foldGraphBlocks :: (CmmBlock -> a -> a) -> a -> CmmGraph -> a
- CmmUtils: insertBlock :: CmmBlock -> LabelMap CmmBlock -> LabelMap CmmBlock
- CmmUtils: postorderDfs :: CmmGraph -> [CmmBlock]
- CoAxiom: data Branches (br :: BranchFlag)
- Coercion: liftCoSubstVarBndrCallback :: (LiftingContext -> Type -> (Coercion, a)) -> LiftingContext -> TyVar -> (LiftingContext, TyVar, Coercion, a)
- Coercion: mkFunCos :: Role -> [Coercion] -> Coercion -> Coercion
- Coercion: mkHomoPhantomCo :: Type -> Type -> Coercion
- Coercion: mkNthCoRole :: Role -> Int -> Coercion -> Coercion
- Coercion: substForAllCoBndrCallbackLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
- Coercion: toPhantomCo :: Coercion -> Coercion
- CoreFVs: vectsFreeVars :: [CoreVect] -> VarSet
- CoreMonad: CoreDoVectorisation :: CoreToDo
- CoreMonad: type PluginPass = ModGuts -> CoreM ModGuts
- CoreSyn: NoVect :: Id -> CoreVect
- CoreSyn: Vect :: Id -> CoreExpr -> CoreVect
- CoreSyn: VectClass :: TyCon -> CoreVect
- CoreSyn: VectInst :: Id -> CoreVect
- CoreSyn: VectType :: Bool -> TyCon -> (Maybe TyCon) -> CoreVect
- CoreSyn: data CoreVect
- CostCentre: NotCafCC :: IsCafCC
- CostCentre: [cc_is_caf] :: CostCentre -> IsCafCC
- CostCentre: [cc_key] :: CostCentre -> {-# UNPACK #-} !Int
- CostCentre: data IsCafCC
- CostCentre: instance Binary.Binary CostCentre.IsCafCC
- CostCentre: instance Data.Data.Data CostCentre.IsCafCC
- CostCentre: instance GHC.Classes.Eq CostCentre.IsCafCC
- CostCentre: instance GHC.Classes.Ord CostCentre.IsCafCC
- Coverage: instance UniqSupply.MonadUnique Coverage.TM
- DataCon: isLegacyPromotableDataCon :: DataCon -> Bool
- DataCon: isLegacyPromotableTyCon :: TyCon -> Bool
- DebuggerUtils: dataConInfoPtrToName :: Ptr () -> TcM (Either String Name)
- Digraph: componentsG :: Graph node -> [[node]]
- Digraph: dfsTopSortG :: Graph node -> [[node]]
- Digraph: indegreeG :: Graph node -> node -> Maybe Int
- Digraph: outdegreeG :: Graph node -> node -> Maybe Int
- Digraph: vertexGroupsG :: Graph node -> [[node]]
- DsListComp: dsPArrComp :: [ExprStmt GhcTc] -> DsM CoreExpr
- DsMonad: PArrBuiltin :: Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> PArrBuiltin
- DsMonad: [appPVar] :: PArrBuiltin -> Var
- DsMonad: [crossMapPVar] :: PArrBuiltin -> Var
- DsMonad: [emptyPVar] :: PArrBuiltin -> Var
- DsMonad: [enumFromThenToPVar] :: PArrBuiltin -> Var
- DsMonad: [enumFromToPVar] :: PArrBuiltin -> Var
- DsMonad: [filterPVar] :: PArrBuiltin -> Var
- DsMonad: [indexPVar] :: PArrBuiltin -> Var
- DsMonad: [lengthPVar] :: PArrBuiltin -> Var
- DsMonad: [mapPVar] :: PArrBuiltin -> Var
- DsMonad: [replicatePVar] :: PArrBuiltin -> Var
- DsMonad: [singletonPVar] :: PArrBuiltin -> Var
- DsMonad: [zipPVar] :: PArrBuiltin -> Var
- DsMonad: data PArrBuiltin
- DsMonad: dsDPHBuiltin :: (PArrBuiltin -> a) -> DsM a
- DsMonad: dsInitPArrBuiltin :: DsM a -> DsM a
- DsMonad: dsLookupDPHRdrEnv :: OccName -> DsM Name
- DsMonad: dsLookupDPHRdrEnv_maybe :: OccName -> DsM (Maybe Name)
- DynFlags: Opt_D_dump_vect :: DumpFlag
- DynFlags: Opt_VectorisationAvoidance :: GeneralFlag
- DynFlags: Opt_Vectorise :: GeneralFlag
- DynFlags: [initLogAction] :: DynFlags -> IO (Maybe LogOutput)
- DynFlags: [log_finaliser] :: DynFlags -> LogFinaliser
- DynFlags: [maxValidSubstitutions] :: DynFlags -> Maybe Int
- DynFlags: type LogFinaliser = DynFlags -> IO ()
- FastString: type LitString = Ptr Word8
- GHC: AnnTildehsh :: AnnKeywordId
- GHC: Opt_VectorisationAvoidance :: GeneralFlag
- GHC: Opt_Vectorise :: GeneralFlag
- GHC: [initLogAction] :: DynFlags -> IO (Maybe LogOutput)
- GHC: [log_finaliser] :: DynFlags -> LogFinaliser
- GHC: [maxValidSubstitutions] :: DynFlags -> Maybe Int
- GHC: [mi_vect_info] :: ModIface -> !IfaceVectInfo
- GhcPlugins: AnyclassStrategy :: DerivStrategy
- GhcPlugins: FunPrec :: TyPrec
- GhcPlugins: NewtypeStrategy :: DerivStrategy
- GhcPlugins: StockStrategy :: DerivStrategy
- GhcPlugins: TopPrec :: TyPrec
- GhcPlugins: TyConPrec :: TyPrec
- GhcPlugins: TyOpPrec :: TyPrec
- GhcPlugins: data DerivStrategy
- GhcPlugins: data TyPrec
- GhcPlugins: isExitJoinId :: Var -> Bool
- GhcPlugins: liftCoSubstVarBndrCallback :: (LiftingContext -> Type -> (Coercion, a)) -> LiftingContext -> TyVar -> (LiftingContext, TyVar, Coercion, a)
- GhcPlugins: mkFunCos :: Role -> [Coercion] -> Coercion -> Coercion
- GhcPlugins: mkHomoPhantomCo :: Type -> Type -> Coercion
- GhcPlugins: mkLocalisedOccName :: Module -> (Maybe String -> OccName -> OccName) -> Name -> OccName
- GhcPlugins: mkNthCoRole :: Role -> Int -> Coercion -> Coercion
- GhcPlugins: mkPADFunOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkPDataDataConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkPDataTyConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkPDatasDataConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkPDatasTyConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkPReprTyConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkVectDataConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkVectIsoOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkVectOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: mkVectTyConOcc :: Maybe String -> OccName -> OccName
- GhcPlugins: substForAllCoBndrCallbackLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
- GhcPlugins: toPhantomCo :: Coercion -> Coercion
- Hoopl.Collections: mapFold :: IsMap map => (a -> b -> b) -> b -> map a -> b
- Hoopl.Collections: mapFoldWithKey :: IsMap map => (KeyOf map -> a -> b -> b) -> b -> map a -> b
- Hoopl.Collections: setFold :: IsSet set => (ElemOf set -> b -> b) -> b -> set -> b
- Hoopl.Graph: instance Hoopl.Graph.LabelsPtr Hoopl.Label.Label
- Hoopl.Graph: instance Hoopl.Graph.LabelsPtr Hoopl.Label.LabelSet
- Hoopl.Graph: instance Hoopl.Graph.LabelsPtr l => Hoopl.Graph.LabelsPtr [l]
- Hoopl.Graph: instance Hoopl.Graph.NonLocal n => Hoopl.Graph.LabelsPtr (n e Hoopl.Block.C)
- Hoopl.Graph: postorder_dfs_from :: (NonLocal block, LabelsPtr b) => LabelMap (block C C) -> b -> [block C C]
- Hoopl.Label: uniqueToLbl :: Unique -> Label
- Hoopl.Unique: data UniqueMap v
- Hoopl.Unique: data UniqueSet
- Hoopl.Unique: instance Data.Foldable.Foldable Hoopl.Unique.UniqueMap
- Hoopl.Unique: instance Data.Traversable.Traversable Hoopl.Unique.UniqueMap
- Hoopl.Unique: instance GHC.Base.Functor Hoopl.Unique.UniqueMap
- Hoopl.Unique: instance GHC.Classes.Eq Hoopl.Unique.UniqueSet
- Hoopl.Unique: instance GHC.Classes.Eq v => GHC.Classes.Eq (Hoopl.Unique.UniqueMap v)
- Hoopl.Unique: instance GHC.Classes.Ord Hoopl.Unique.UniqueSet
- Hoopl.Unique: instance GHC.Classes.Ord v => GHC.Classes.Ord (Hoopl.Unique.UniqueMap v)
- Hoopl.Unique: instance GHC.Show.Show Hoopl.Unique.UniqueSet
- Hoopl.Unique: instance GHC.Show.Show v => GHC.Show.Show (Hoopl.Unique.UniqueMap v)
- Hoopl.Unique: instance Hoopl.Collections.IsMap Hoopl.Unique.UniqueMap
- Hoopl.Unique: instance Hoopl.Collections.IsSet Hoopl.Unique.UniqueSet
- Hoopl.Unique: intToUnique :: Int -> Unique
- Hoopl.Unique: type Unique = Int
- HsBinds: ValBindsIn :: (LHsBindsLR idL idR) -> [LSig idR] -> HsValBindsLR idL idR
- HsBinds: ValBindsOut :: [(RecFlag, LHsBinds idL)] -> [LSig GhcRn] -> HsValBindsLR idL idR
- HsBinds: [bind_fvs] :: HsBindLR idL idR -> PostRn idL NameSet
- HsBinds: [psb_fvs] :: PatSynBind idL idR -> PostRn idR NameSet
- HsBinds: instance (HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsBinds.HsBindLR idL idR)
- HsBinds: instance (HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsBinds.HsLocalBindsLR idL idR)
- HsBinds: instance (HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsBinds.HsValBindsLR idL idR)
- HsBinds: instance (HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsBinds.PatSynBind idL idR)
- HsBinds: instance (HsExtension.SourceTextX idL, HsExtension.SourceTextX idR, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsBindLR idL idR)
- HsBinds: instance (HsExtension.SourceTextX idL, HsExtension.SourceTextX idR, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsLocalBindsLR idL idR)
- HsBinds: instance (HsExtension.SourceTextX idL, HsExtension.SourceTextX idR, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsValBindsLR idL idR)
- HsBinds: instance (HsExtension.SourceTextX idR, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.PatSynBind idL idR)
- HsBinds: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.HsIPBinds p)
- HsBinds: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.IPBind p)
- HsBinds: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsBinds.Sig pass)
- HsBinds: instance HsExtension.DataId id => Data.Data.Data (HsBinds.HsIPBinds id)
- HsBinds: instance HsExtension.DataId id => Data.Data.Data (HsBinds.HsPatSynDir id)
- HsBinds: instance HsExtension.DataId name => Data.Data.Data (HsBinds.IPBind name)
- HsBinds: instance HsExtension.DataId p => Data.Data.Data (HsBinds.ABExport p)
- HsBinds: instance HsExtension.DataId pass => Data.Data.Data (HsBinds.FixitySig pass)
- HsBinds: instance HsExtension.DataId pass => Data.Data.Data (HsBinds.Sig pass)
- HsBinds: instance HsExtension.OutputableBndrId p => Outputable.Outputable (HsBinds.ABExport p)
- HsBinds: instance HsExtension.OutputableBndrId pass => Outputable.Outputable (HsBinds.FixitySig pass)
- HsBinds: isEmptyIPBinds :: HsIPBinds id -> Bool
- HsBinds: isEmptyLocalBinds :: HsLocalBindsLR a b -> Bool
- HsDecls: HsNoVect :: SourceText -> (Located (IdP pass)) -> VectDecl pass
- HsDecls: HsVect :: SourceText -> (Located (IdP pass)) -> (LHsExpr pass) -> VectDecl pass
- HsDecls: HsVectClassIn :: SourceText -> (Located (IdP pass)) -> VectDecl pass
- HsDecls: HsVectClassOut :: Class -> VectDecl pass
- HsDecls: HsVectInstIn :: (LHsSigType pass) -> VectDecl pass
- HsDecls: HsVectInstOut :: ClsInst -> VectDecl pass
- HsDecls: HsVectTypeIn :: SourceText -> Bool -> (Located (IdP pass)) -> (Maybe (Located (IdP pass))) -> VectDecl pass
- HsDecls: HsVectTypeOut :: Bool -> TyCon -> (Maybe TyCon) -> VectDecl pass
- HsDecls: VectD :: (VectDecl id) -> HsDecl id
- HsDecls: [con_cxt] :: ConDecl pass -> Maybe (LHsContext pass)
- HsDecls: [con_details] :: ConDecl pass -> HsConDeclDetails pass
- HsDecls: [con_type] :: ConDecl pass -> LHsSigType pass
- HsDecls: [fd_co] :: ForeignDecl pass -> PostTc pass Coercion
- HsDecls: [hs_vects] :: HsGroup id -> [LVectDecl id]
- HsDecls: data VectDecl pass
- HsDecls: gadtDeclDetails :: LHsSigType pass -> (HsConDeclDetails pass, LHsType pass, LHsContext pass, [LHsTyVarBndr pass])
- HsDecls: getConDetails :: ConDecl pass -> HsConDeclDetails pass
- HsDecls: instance (HsExtension.DataId pass, Data.Data.Data pats, Data.Data.Data rhs) => Data.Data.Data (HsDecls.FamEqn pass pats rhs)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.AnnDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.ClsInstDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.ConDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.DataFamInstDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.DefaultDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.DerivDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.FamilyDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.ForeignDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.HsDataDefn pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.HsDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.HsDerivingClause pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.HsGroup pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.InstDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.RuleBndr pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.RuleDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.RuleDecls pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.SpliceDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.TyClDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.TyClGroup pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.TyFamInstDecl pass)
- HsDecls: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsDecls.VectDecl pass)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.ClsInstDecl id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.FamilyDecl id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.HsDataDefn id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.HsDecl id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.HsDerivingClause id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.HsGroup id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.InstDecl id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.SpliceDecl id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.TyClDecl id)
- HsDecls: instance HsExtension.DataId id => Data.Data.Data (HsDecls.TyClGroup id)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.AnnDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.ConDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.DataFamInstDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.DefaultDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.DerivDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.FamilyInfo pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.FamilyResultSig pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.ForeignDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.InjectivityAnn pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.RoleAnnotDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.RuleBndr pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.RuleDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.RuleDecls pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.TyFamInstDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.VectDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.WarnDecl pass)
- HsDecls: instance HsExtension.DataId pass => Data.Data.Data (HsDecls.WarnDecls pass)
- HsDecls: instance Outputable.OutputableBndr (HsExtension.IdP pass) => Outputable.Outputable (HsDecls.RoleAnnotDecl pass)
- HsDecls: instance Outputable.OutputableBndr (HsExtension.IdP pass) => Outputable.Outputable (HsDecls.WarnDecl pass)
- HsDecls: instance Outputable.OutputableBndr (HsExtension.IdP pass) => Outputable.Outputable (HsDecls.WarnDecls pass)
- HsDecls: lvectDeclName :: NamedThing (IdP pass) => LVectDecl pass -> Name
- HsDecls: lvectInstDecl :: LVectDecl pass -> Bool
- HsDecls: noForeignExportCoercionYet :: PlaceHolder
- HsDecls: noForeignImportCoercionYet :: PlaceHolder
- HsDecls: type LVectDecl pass = Located (VectDecl pass)
- HsDoc: HsDocString :: FastString -> HsDocString
- HsDoc: newtype HsDocString
- HsExpr: ExplicitPArr :: (PostTc p Type) -> [LHsExpr p] -> HsExpr p
- HsExpr: ExprWithTySigOut :: (LHsExpr p) -> (LHsSigWcType GhcRn) -> HsExpr p
- HsExpr: HsAppTypeOut :: (LHsExpr p) -> (LHsWcType GhcRn) -> HsExpr p
- HsExpr: LHsWcTypeX :: (LHsWcType p) -> LHsWcTypeX
- HsExpr: PArrComp :: HsStmtContext id
- HsExpr: PArrSeq :: PostTcExpr -> (ArithSeqInfo p) -> HsExpr p
- HsExpr: [trS_bind_arg_ty] :: StmtLR idL idR body -> PostTc idR Type
- HsExpr: data LHsWcTypeX
- HsExpr: instance (Data.Data.Data body, HsExtension.DataId id) => Data.Data.Data (HsExpr.GRHS id body)
- HsExpr: instance (Data.Data.Data body, HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsExpr.StmtLR idL idR body)
- HsExpr: instance (Data.Data.Data body, HsExtension.DataId p) => Data.Data.Data (HsExpr.GRHSs p body)
- HsExpr: instance (Data.Data.Data body, HsExtension.DataId p) => Data.Data.Data (HsExpr.Match p body)
- HsExpr: instance (Data.Data.Data body, HsExtension.DataId p) => Data.Data.Data (HsExpr.MatchGroup p body)
- HsExpr: instance (HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsExpr.ApplicativeArg idL idR)
- HsExpr: instance (HsExtension.DataId idL, HsExtension.DataId idR) => Data.Data.Data (HsExpr.ParStmtBlock idL idR)
- HsExpr: instance (HsExtension.SourceTextX idL, HsExtension.OutputableBndrId idL) => Outputable.Outputable (HsExpr.ParStmtBlock idL idR)
- HsExpr: instance (HsExtension.SourceTextX idL, HsExtension.SourceTextX idR, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR, Outputable.Outputable body) => Outputable.Outputable (HsExpr.StmtLR idL idR body)
- HsExpr: instance (HsExtension.SourceTextX idR, HsExtension.OutputableBndrId idR, Outputable.Outputable body) => Outputable.Outputable (HsExpr.Match idR body)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.ArithSeqInfo p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsBracket p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsCmd p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsCmdTop p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsExpr p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsSplice p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsSplicedThing p)
- HsExpr: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.SyntaxExpr p)
- HsExpr: instance Data.Data.Data HsExpr.PendingRnSplice
- HsExpr: instance Data.Data.Data HsExpr.PendingTcSplice
- HsExpr: instance HsExtension.DataId id => Data.Data.Data (HsExpr.ArithSeqInfo id)
- HsExpr: instance HsExtension.DataId id => Data.Data.Data (HsExpr.HsCmd id)
- HsExpr: instance HsExtension.DataId id => Data.Data.Data (HsExpr.HsSplice id)
- HsExpr: instance HsExtension.DataId id => Data.Data.Data (HsExpr.HsSplicedThing id)
- HsExpr: instance HsExtension.DataId id => Data.Data.Data (HsExpr.HsTupArg id)
- HsExpr: instance HsExtension.DataId p => Data.Data.Data (HsExpr.HsBracket p)
- HsExpr: instance HsExtension.DataId p => Data.Data.Data (HsExpr.HsCmdTop p)
- HsExpr: instance HsExtension.DataId p => Data.Data.Data (HsExpr.HsExpr p)
- HsExpr: instance HsExtension.DataId p => Data.Data.Data (HsExpr.SyntaxExpr p)
- HsExpr: isMonadCompExpr :: HsStmtContext id -> Bool
- HsExpr: noPostTcExpr :: PostTcExpr
- HsExpr: noPostTcTable :: PostTcTable
- HsExtension: class HasDefault a
- HsExtension: class HasSourceText a
- HsExtension: def :: HasDefault a => a
- HsExtension: getSourceText :: HasSourceText a => a -> SourceText
- HsExtension: instance HsExtension.HasDefault ()
- HsExtension: instance HsExtension.HasDefault BasicTypes.SourceText
- HsExtension: instance HsExtension.HasSourceText BasicTypes.SourceText
- HsExtension: noSourceText :: HasSourceText a => a
- HsExtension: setSourceText :: HasSourceText a => SourceText -> a
- HsExtension: sourceText :: HasSourceText a => String -> a
- HsExtension: type DataId p = (Data p, ForallX Data p, Data (NameOrRdrName (IdP p)), Data (IdP p), Data (PostRn p (IdP p)), Data (PostRn p (Located Name)), Data (PostRn p Bool), Data (PostRn p Fixity), Data (PostRn p NameSet), Data (PostRn p [Name]), Data (PostTc p (IdP p)), Data (PostTc p Coercion), Data (PostTc p ConLike), Data (PostTc p HsWrapper), Data (PostTc p Type), Data (PostTc p [ConLike]), Data (PostTc p [Type]))
- HsExtension: type ForallX (c :: * -> Constraint) (x :: *) = (c (XHsChar x), c (XHsCharPrim x), c (XHsString x), c (XHsStringPrim x), c (XHsInt x), c (XHsIntPrim x), c (XHsWordPrim x), c (XHsInt64Prim x), c (XHsWord64Prim x), c (XHsInteger x), c (XHsRat x), c (XHsFloatPrim x), c (XHsDoublePrim x))
- HsExtension: type HasDefaultX x = ForallX HasDefault x
- HsExtension: type SourceTextX x = (HasSourceText (XHsChar x), HasSourceText (XHsCharPrim x), HasSourceText (XHsString x), HasSourceText (XHsStringPrim x), HasSourceText (XHsIntPrim x), HasSourceText (XHsWordPrim x), HasSourceText (XHsInt64Prim x), HasSourceText (XHsWord64Prim x), HasSourceText (XHsInteger x))
- HsImpExp: instance (GHC.Classes.Eq name, GHC.Classes.Eq (HsExtension.IdP name)) => GHC.Classes.Eq (HsImpExp.IE name)
- HsImpExp: instance HsExtension.DataId name => Data.Data.Data (HsImpExp.IE name)
- HsImpExp: instance HsExtension.DataId name => Data.Data.Data (HsImpExp.ImportDecl name)
- HsImpExp: instance HsExtension.OutputableBndrId pass => Outputable.Outputable (HsImpExp.IE pass)
- HsImpExp: instance HsExtension.OutputableBndrId pass => Outputable.Outputable (HsImpExp.ImportDecl pass)
- HsLit: instance (HsExtension.SourceTextX p, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsLit.HsOverLit p)
- HsLit: instance GHC.Classes.Eq (HsLit.HsOverLit p)
- HsLit: instance GHC.Classes.Ord (HsLit.HsOverLit p)
- HsLit: instance HsExtension.DataId p => Data.Data.Data (HsLit.HsOverLit p)
- HsLit: instance HsExtension.DataId x => Data.Data.Data (HsLit.HsLit x)
- HsLit: instance HsExtension.SourceTextX x => Outputable.Outputable (HsLit.HsLit x)
- HsLit: isCompoundHsLit :: HsLit x -> Bool
- HsLit: isCompoundHsOverLit :: HsOverLit x -> Bool
- HsPat: PArrPat :: [LPat p] -> (PostTc p Type) -> Pat p
- HsPat: SigPatIn :: (LPat p) -> (LHsSigWcType p) -> Pat p
- HsPat: SigPatOut :: (LPat p) -> Type -> Pat p
- HsPat: hsPatNeedsParens :: Pat a -> Bool
- HsPat: instance (HsExtension.DataId p, Data.Data.Data arg) => Data.Data.Data (HsPat.HsRecFields p arg)
- HsPat: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsPat.Pat pass)
- HsPat: instance HsExtension.DataId p => Data.Data.Data (HsPat.Pat p)
- HsPat: isCompoundPat :: Pat a -> Bool
- HsPat: parenthesizeCompoundPat :: LPat p -> LPat p
- HsSyn: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsSyn.HsModule pass)
- HsSyn: instance HsExtension.DataId name => Data.Data.Data (HsSyn.HsModule name)
- HsTypes: HsAppInfix :: (Located (IdP pass)) -> HsAppType pass
- HsTypes: HsAppPrefix :: (LHsType pass) -> HsAppType pass
- HsTypes: HsAppsTy :: [LHsAppType pass] -> HsType pass
- HsTypes: HsCoreTy :: Type -> HsType pass
- HsTypes: HsEqTy :: (LHsType pass) -> (LHsType pass) -> HsType pass
- HsTypes: HsPArrTy :: (LHsType pass) -> HsType pass
- HsTypes: [hswc_wcs] :: HsWildCardBndrs pass thing -> PostRn pass [Name]
- HsTypes: [selectorFieldOcc] :: FieldOcc pass -> PostRn pass (IdP pass)
- HsTypes: data HsAppType pass
- HsTypes: getAppsTyHead_maybe :: [LHsAppType pass] -> Maybe (LHsType pass, [LHsType pass], LexicalFixity)
- HsTypes: instance (HsExtension.DataId pass, Data.Data.Data thing) => Data.Data.Data (HsTypes.HsImplicitBndrs pass thing)
- HsTypes: instance (HsExtension.DataId pass, Data.Data.Data thing) => Data.Data.Data (HsTypes.HsWildCardBndrs pass thing)
- HsTypes: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsTypes.ConDeclField pass)
- HsTypes: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsTypes.HsAppType pass)
- HsTypes: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsTypes.HsTyVarBndr pass)
- HsTypes: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsTypes.HsType pass)
- HsTypes: instance (HsExtension.SourceTextX pass, HsExtension.OutputableBndrId pass) => Outputable.Outputable (HsTypes.LHsQTyVars pass)
- HsTypes: instance GHC.Classes.Eq (HsExtension.PostRn pass (HsExtension.IdP pass)) => GHC.Classes.Eq (HsTypes.FieldOcc pass)
- HsTypes: instance GHC.Classes.Ord (HsExtension.PostRn pass (HsExtension.IdP pass)) => GHC.Classes.Ord (HsTypes.FieldOcc pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.AmbiguousFieldOcc pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.ConDeclField pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.FieldOcc pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.HsAppType pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.HsTyVarBndr pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.HsType pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.HsWildCardInfo pass)
- HsTypes: instance HsExtension.DataId pass => Data.Data.Data (HsTypes.LHsQTyVars pass)
- HsTypes: instance Outputable.Outputable (HsTypes.AmbiguousFieldOcc pass)
- HsTypes: instance Outputable.Outputable (HsTypes.HsWildCardInfo pass)
- HsTypes: instance Outputable.Outputable thing => Outputable.Outputable (HsTypes.HsImplicitBndrs pass thing)
- HsTypes: instance Outputable.Outputable thing => Outputable.Outputable (HsTypes.HsWildCardBndrs pass thing)
- HsTypes: instance Outputable.OutputableBndr (HsTypes.AmbiguousFieldOcc pass)
- HsTypes: isCompoundHsType :: LHsType pass -> Bool
- HsTypes: parenthesizeCompoundHsType :: LHsType pass -> LHsType pass
- HsTypes: splitHsAppsTy :: [LHsAppType pass] -> ([[LHsType pass]], [Located (IdP pass)])
- HsTypes: type LHsAppType pass = Located (HsAppType pass) 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSimpleQuote'
- HsTypes: updateGadtResult :: (Monad m) => (SDoc -> m ()) -> SDoc -> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn]) -> LHsType GhcRn -> m (HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn]), LHsType GhcRn)
- HsUtils: hsDataDefnBinders :: HsDataDefn pass -> ([Located (IdP pass)], [LFieldOcc pass])
- HsUtils: mkHsAppTypeOut :: LHsExpr GhcTc -> LHsWcType GhcRn -> LHsExpr GhcTc
- HsUtils: nlWildPatId :: LPat GhcTc
- HsUtils: noRebindableInfo :: PlaceHolder
- HscTypes: IfaceVectInfo :: [Name] -> [Name] -> [Name] -> [Name] -> [Name] -> IfaceVectInfo
- HscTypes: VectInfo :: DVarEnv (Var, Var) -> NameEnv (TyCon, TyCon) -> NameEnv (DataCon, DataCon) -> DVarSet -> NameSet -> VectInfo
- HscTypes: [eps_vect_info] :: ExternalPackageState -> !PackageVectInfo
- HscTypes: [ifaceVectInfoParallelTyCons] :: IfaceVectInfo -> [Name]
- HscTypes: [ifaceVectInfoParallelVars] :: IfaceVectInfo -> [Name]
- HscTypes: [ifaceVectInfoTyConReuse] :: IfaceVectInfo -> [Name]
- HscTypes: [ifaceVectInfoTyCon] :: IfaceVectInfo -> [Name]
- HscTypes: [ifaceVectInfoVar] :: IfaceVectInfo -> [Name]
- HscTypes: [md_vect_info] :: ModDetails -> !VectInfo
- HscTypes: [mg_vect_decls] :: ModGuts -> ![CoreVect]
- HscTypes: [mg_vect_info] :: ModGuts -> !VectInfo
- HscTypes: [mi_vect_info] :: ModIface -> !IfaceVectInfo
- HscTypes: [vectInfoDataCon] :: VectInfo -> NameEnv (DataCon, DataCon)
- HscTypes: [vectInfoParallelTyCons] :: VectInfo -> NameSet
- HscTypes: [vectInfoParallelVars] :: VectInfo -> DVarSet
- HscTypes: [vectInfoTyCon] :: VectInfo -> NameEnv (TyCon, TyCon)
- HscTypes: [vectInfoVar] :: VectInfo -> DVarEnv (Var, Var)
- HscTypes: data IfaceVectInfo
- HscTypes: data VectInfo
- HscTypes: hptVectInfo :: HscEnv -> VectInfo
- HscTypes: instance Binary.Binary HscTypes.IfaceVectInfo
- HscTypes: instance GHC.Exception.Exception HscTypes.GhcApiError
- HscTypes: instance GHC.Exception.Exception HscTypes.SourceError
- HscTypes: instance Outputable.Outputable HscTypes.IfaceVectInfo
- HscTypes: instance Outputable.Outputable HscTypes.VectInfo
- HscTypes: isNoIfaceVectInfo :: IfaceVectInfo -> Bool
- HscTypes: noIfaceVectInfo :: IfaceVectInfo
- HscTypes: noVectInfo :: VectInfo
- HscTypes: plusVectInfo :: VectInfo -> VectInfo -> VectInfo
- HscTypes: updNameCacheIO :: HscEnv -> (NameCache -> (NameCache, c)) -> IO c
- IOEnv: instance GHC.Exception.Exception IOEnv.IOEnvFailure
- Id: isExitJoinId :: Var -> Bool
- IfaceEnv: updNameCache :: (NameCache -> (NameCache, c)) -> TcRnIf a b c
- Inst: tcInstBinder :: Maybe (VarEnv Kind) -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)
- Inst: tcInstBinders :: TCvSubst -> Maybe (VarEnv Kind) -> [TyBinder] -> TcM (TCvSubst, [TcType])
- InteractiveEval: [value] :: Term -> [Word]
- Kind: isConstraintKind :: Kind -> Bool
- Kind: isStarKind :: Kind -> Bool
- Kind: isStarKindSynonymTyCon :: TyCon -> Bool
- Kind: returnsConstraintKind :: Kind -> Bool
- Kind: returnsTyCon :: Unique -> Type -> Bool
- Kind: tcIsStarKind :: Kind -> Bool
- Lexer: ITnovect_prag :: SourceText -> Token
- Lexer: ITtildehsh :: Token
- Lexer: ITvect_prag :: SourceText -> Token
- Lexer: ITvect_scalar_prag :: SourceText -> Token
- Literal: LitInteger :: Integer -> Type -> Literal
- Literal: MachInt :: Integer -> Literal
- Literal: MachInt64 :: Integer -> Literal
- Literal: MachWord :: Integer -> Literal
- Literal: MachWord64 :: Integer -> Literal
- LlvmCodeGen.Base: isSSE :: GlobalReg -> Bool
- LlvmCodeGen.Base: padLiveArgs :: LiveGlobalRegs -> [(Bool, GlobalReg)]
- MkCore: iRREFUT_PAT_ERROR_ID :: Id
- MkId: runRWId :: Id
- MkId: unwrapFamInstScrut :: TyCon -> [Type] -> CoreExpr -> CoreExpr
- MkId: unwrapTypeUnbranchedFamInstScrut :: CoAxiom Unbranched -> [Type] -> [Coercion] -> CoreExpr -> CoreExpr
- MkId: wrapNewTypeBody :: TyCon -> [Type] -> CoreExpr -> CoreExpr
- MkId: wrapTypeUnbranchedFamInstBody :: CoAxiom Unbranched -> [Type] -> [Coercion] -> CoreExpr -> CoreExpr
- Module: dphParUnitId :: UnitId
- Module: dphSeqUnitId :: UnitId
- Name: mkLocalisedOccName :: Module -> (Maybe String -> OccName -> OccName) -> Name -> OccName
- OccName: mkPADFunOcc :: Maybe String -> OccName -> OccName
- OccName: mkPDataDataConOcc :: Maybe String -> OccName -> OccName
- OccName: mkPDataTyConOcc :: Maybe String -> OccName -> OccName
- OccName: mkPDatasDataConOcc :: Maybe String -> OccName -> OccName
- OccName: mkPDatasTyConOcc :: Maybe String -> OccName -> OccName
- OccName: mkPReprTyConOcc :: Maybe String -> OccName -> OccName
- OccName: mkVectDataConOcc :: Maybe String -> OccName -> OccName
- OccName: mkVectIsoOcc :: Maybe String -> OccName -> OccName
- OccName: mkVectOcc :: Maybe String -> OccName -> OccName
- OccName: mkVectTyConOcc :: Maybe String -> OccName -> OccName
- Outputable: instance Outputable.Outputable a => Outputable.Outputable (GHC.Base.Maybe a)
- Outputable: kindStar :: SDoc
- Outputable: paBrackets :: SDoc -> SDoc
- Panic: instance GHC.Exception.Exception Panic.GhcException
- PlaceHolder: PlaceHolder :: PlaceHolder
- PlaceHolder: data PlaceHolder
- PlaceHolder: instance Data.Data.Data PlaceHolder.PlaceHolder
- PlaceHolder: placeHolderFixity :: PlaceHolder
- PlaceHolder: placeHolderHsWrapper :: PlaceHolder
- PlaceHolder: placeHolderKind :: PlaceHolder
- PlaceHolder: placeHolderNames :: PlaceHolder
- PlaceHolder: placeHolderType :: PlaceHolder
- PlaceHolder: placeHolderTypeTc :: Type
- PprCmmDecl: instance Outputable.Outputable Cmm.C_SRT
- PprCore: instance Outputable.Outputable CoreSyn.CoreVect
- PrelNames: gHC_PARR' :: Module
- PrelNames: irrefutPatErrorIdKey :: Unique
- PrelNames: parrDataConKey :: Unique
- PrelNames: parrTyConKey :: Unique
- PrelNames: starKindTyConKey :: Unique
- PrelNames: unicodeStarKindTyConKey :: Unique
- PrimOp: Check :: PrimOp
- RdrHsSyn: splitTildeApps :: [LHsAppType GhcPs] -> P [LHsAppType GhcPs]
- RdrName: isStar :: RdrName -> Bool
- RdrName: isUniStar :: RdrName -> Bool
- RnEnv: lookupKindOccRn :: RdrName -> RnM Name
- RnUtils: VectDeclCtx :: (Located RdrName) -> HsDocContext
- RtClosureInspect: AP :: ClosureType
- RtClosureInspect: Blackhole :: ClosureType
- RtClosureInspect: Closure :: ClosureType -> Ptr () -> StgInfoTable -> Array Int HValue -> ClosureNonPtrs -> Closure
- RtClosureInspect: Constr :: ClosureType
- RtClosureInspect: Fun :: ClosureType
- RtClosureInspect: Indirection :: Int -> ClosureType
- RtClosureInspect: MVar :: Int -> ClosureType
- RtClosureInspect: MutVar :: Int -> ClosureType
- RtClosureInspect: Other :: Int -> ClosureType
- RtClosureInspect: PAP :: ClosureType
- RtClosureInspect: Thunk :: Int -> ClosureType
- RtClosureInspect: ThunkSelector :: ClosureType
- RtClosureInspect: [infoPtr] :: Closure -> Ptr ()
- RtClosureInspect: [infoTable] :: Closure -> StgInfoTable
- RtClosureInspect: [nonPtrs] :: Closure -> ClosureNonPtrs
- RtClosureInspect: [ptrs] :: Closure -> Array Int HValue
- RtClosureInspect: [tipe] :: Closure -> ClosureType
- RtClosureInspect: [value] :: Term -> [Word]
- RtClosureInspect: data Closure
- RtClosureInspect: data ClosureType
- RtClosureInspect: getClosureData :: DynFlags -> a -> IO Closure
- RtClosureInspect: instance GHC.Classes.Eq RtClosureInspect.ClosureType
- RtClosureInspect: instance GHC.Show.Show RtClosureInspect.ClosureType
- RtClosureInspect: instance Outputable.Outputable RtClosureInspect.ClosureType
- StgCmmClosure: maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon
- StgCmmProf: curCCS :: CmmExpr
- SysTools: initLlvmTargets :: Maybe String -> IO LlvmTargets
- THNames: anyclassDataConKey :: Unique
- THNames: anyclassStrategyDataConName :: Name
- THNames: derivStrategyTyConKey :: Unique
- THNames: derivStrategyTyConName :: Name
- THNames: newtypeDataConKey :: Unique
- THNames: newtypeStrategyDataConName :: Name
- THNames: stockDataConKey :: Unique
- THNames: stockStrategyDataConName :: Name
- TcBinds: tcRecSelBinds :: HsValBinds GhcRn -> TcM TcGblEnv
- TcBinds: tcVectDecls :: [LVectDecl GhcRn] -> TcM ([LVectDecl GhcTcId])
- TcDerivUtils: CanDerive :: DerivStatus
- TcDerivUtils: DerivableClassError :: SDoc -> DerivStatus
- TcDerivUtils: DerivableViaInstance :: DerivStatus
- TcDerivUtils: [denv_mtheta] :: DerivEnv -> DerivContext
- TcDerivUtils: checkSideConditions :: DynFlags -> DerivContext -> Class -> [TcType] -> TyCon -> DerivStatus
- TcDerivUtils: data DerivStatus
- TcDerivUtils: type DerivContext = Maybe ThetaType
- TcEnv: instance (HsExtension.SourceTextX a, HsExtension.OutputableBndrId a) => Outputable.Outputable (TcEnv.InstInfo a)
- TcEnv: tcExtendTyVarEnv2 :: [(Name, TcTyVar)] -> TcM r -> TcM r
- TcEvidence: EvCallStack :: EvCallStack -> EvTerm
- TcEvidence: EvCast :: EvTerm -> TcCoercionR -> EvTerm
- TcEvidence: EvCoercion :: TcCoercion -> EvTerm
- TcEvidence: EvDFunApp :: DFunId -> [Type] -> [EvTerm] -> EvTerm
- TcEvidence: EvDelayedError :: Type -> FastString -> EvTerm
- TcEvidence: EvId :: EvId -> EvTerm
- TcEvidence: EvLit :: EvLit -> EvTerm
- TcEvidence: EvNum :: Integer -> EvLit
- TcEvidence: EvSelector :: Id -> [Type] -> [EvTerm] -> EvTerm
- TcEvidence: EvStr :: FastString -> EvLit
- TcEvidence: EvSuperClass :: EvTerm -> Int -> EvTerm
- TcEvidence: data EvLit
- TcEvidence: instance Data.Data.Data TcEvidence.EvLit
- TcEvidence: instance Outputable.Outputable TcEvidence.EvLit
- TcEvidence: sccEvBinds :: Bag EvBind -> [SCC EvBind]
- TcFlatten: flattenManyNom :: CtEvidence -> [TcType] -> TcS ([Xi], [TcCoercion])
- TcHsSyn: zonkSigType :: TcType -> TcM Type
- TcHsType: kcLHsTyVarBndrs :: Bool -> [LHsTyVarBndr GhcRn] -> TcM r -> TcM ([TyVar], r)
- TcHsType: tcHsVectInst :: LHsSigType GhcRn -> TcM (Class, [Type])
- TcHsType: tcImplicitTKBndrsType :: [Name] -> TcM Type -> TcM ([TcTyVar], Type)
- TcIface: tcIfaceVectInfo :: Module -> TypeEnv -> IfaceVectInfo -> IfL VectInfo
- TcMType: instSkolTyCoVars :: TcTyCoVarMaker gbl lcl -> [TyVar] -> TcRnIf gbl lcl (TCvSubst, [TyCoVar])
- TcPatSyn: tcCheckPatSynDecl :: PatSynBind GhcRn GhcRn -> TcPatSynInfo -> TcM (LHsBinds GhcTc, TcGblEnv)
- TcPatSyn: tcInferPatSynDecl :: PatSynBind GhcRn GhcRn -> TcM (LHsBinds GhcTc, TcGblEnv)
- TcRnMonad: initTcForLookup :: HscEnv -> TcM a -> IO a
- TcRnTypes: ClsSkol :: Class -> SkolemInfo
- TcRnTypes: DataSkol :: SkolemInfo
- TcRnTypes: DerivOrigin :: CtOrigin
- TcRnTypes: NoTypeInTypeDC :: PromotionErr
- TcRnTypes: NoTypeInTypeTC :: PromotionErr
- TcRnTypes: PArrBuiltin :: Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> Var -> PArrBuiltin
- TcRnTypes: PArrSeqOrigin :: (ArithSeqInfo GhcRn) -> CtOrigin
- TcRnTypes: [appPVar] :: PArrBuiltin -> Var
- TcRnTypes: [crossMapPVar] :: PArrBuiltin -> Var
- TcRnTypes: [ds_dph_env] :: DsGblEnv -> GlobalRdrEnv
- TcRnTypes: [ds_parr_bi] :: DsGblEnv -> PArrBuiltin
- TcRnTypes: [emptyPVar] :: PArrBuiltin -> Var
- TcRnTypes: [enumFromThenToPVar] :: PArrBuiltin -> Var
- TcRnTypes: [enumFromToPVar] :: PArrBuiltin -> Var
- TcRnTypes: [filterPVar] :: PArrBuiltin -> Var
- TcRnTypes: [indexPVar] :: PArrBuiltin -> Var
- TcRnTypes: [lengthPVar] :: PArrBuiltin -> Var
- TcRnTypes: [mapPVar] :: PArrBuiltin -> Var
- TcRnTypes: [replicatePVar] :: PArrBuiltin -> Var
- TcRnTypes: [singletonPVar] :: PArrBuiltin -> Var
- TcRnTypes: [tcg_vects] :: TcGblEnv -> [LVectDecl GhcTc]
- TcRnTypes: [zipPVar] :: PArrBuiltin -> Var
- TcRnTypes: data PArrBuiltin
- TcRnTypes: termEvidenceAllowed :: SkolemInfo -> Bool
- TcSMonad: addInertEq :: Ct -> TcS ()
- TcSMonad: buildImplication :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcS result -> TcS (Bag Implication, TcEvBinds, result)
- TcSMonad: getEvTerm :: MaybeNew -> EvTerm
- TcSMonad: getPendingScDicts :: TcS [Ct]
- TcSMonad: isTouchableMetaTyVarTcS :: TcTyVar -> TcS Bool
- TcSMonad: setEqIfWanted :: CtEvidence -> Coercion -> TcS ()
- TcSMonad: setWantedEvBind :: EvVar -> EvTerm -> TcS ()
- TcSimplify: tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool
- TcSimplify: tcSubsumes :: TcSigmaType -> TcSigmaType -> TcM Bool
- TcTyClsDecls: tcAddImplicits :: [TyCon] -> TcM TcGblEnv
- TcTyDecls: tcAddImplicits :: [TyCon] -> TcM TcGblEnv
- TcType: allBoundVariables :: Type -> TyVarSet
- TcType: allBoundVariabless :: [Type] -> TyVarSet
- TcType: fmvTcLevel :: TcLevel
- TcType: isTouchableOrFmv :: TcLevel -> TcTyVar -> Bool
- TcType: mkNakedTyConApp :: TyCon -> [Type] -> Type
- TcType: toTcType :: Type -> TcType
- TcType: toTcTypeBag :: Bag EvVar -> Bag EvVar
- TcUnify: matchExpectedPArrTy :: TcRhoType -> TcM (TcCoercionN, TcRhoType)
- TcUnify: occCheckExpand :: TcTyVar -> TcType -> Maybe TcType
- TcValidity: checkInstTermination :: [TcType] -> ThetaType -> TcM ()
- TcValidity: checkValidInferredKinds :: [TyVar] -> TyVarSet -> SDoc -> TcM ()
- TcValidity: checkZonkValidTelescope :: SDoc -> [TyVar] -> SDoc -> TcM [TyVar]
- TrieMap: data CmEnv
- TrieMap: data CoreMap a
- TrieMap: data LooseTypeMap a
- TrieMap: data TypeMap a
- TrieMap: emptyCoreMap :: CoreMap a
- TrieMap: emptyTypeMap :: TypeMap a
- TrieMap: extendCoreMap :: CoreMap a -> CoreExpr -> a -> CoreMap a
- TrieMap: extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a
- TrieMap: extendTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> a -> TypeMap a
- TrieMap: foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b
- TrieMap: foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b
- TrieMap: instance GHC.Classes.Eq (TrieMap.DeBruijn CoreSyn.CoreAlt)
- TrieMap: instance GHC.Classes.Eq (TrieMap.DeBruijn CoreSyn.CoreExpr)
- TrieMap: instance GHC.Classes.Eq (TrieMap.DeBruijn TyCoRep.Coercion)
- TrieMap: instance GHC.Classes.Eq (TrieMap.DeBruijn TyCoRep.Type)
- TrieMap: instance GHC.Classes.Eq (TrieMap.DeBruijn a) => GHC.Classes.Eq (TrieMap.DeBruijn [a])
- TrieMap: instance Outputable.Outputable a => Outputable.Outputable (TrieMap.CoreMap a)
- TrieMap: instance Outputable.Outputable a => Outputable.Outputable (TrieMap.TypeMapG a)
- TrieMap: instance TrieMap.TrieMap TrieMap.AltMap
- TrieMap: instance TrieMap.TrieMap TrieMap.CoercionMap
- TrieMap: instance TrieMap.TrieMap TrieMap.CoercionMapX
- TrieMap: instance TrieMap.TrieMap TrieMap.CoreMap
- TrieMap: instance TrieMap.TrieMap TrieMap.CoreMapX
- TrieMap: instance TrieMap.TrieMap TrieMap.LooseTypeMap
- TrieMap: instance TrieMap.TrieMap TrieMap.TyLitMap
- TrieMap: instance TrieMap.TrieMap TrieMap.TypeMap
- TrieMap: instance TrieMap.TrieMap TrieMap.TypeMapX
- TrieMap: instance TrieMap.TrieMap TrieMap.VarMap
- TrieMap: lkDFreeVar :: Var -> DVarEnv a -> Maybe a
- TrieMap: lkDNamed :: NamedThing n => n -> DNameEnv a -> Maybe a
- TrieMap: lookupCME :: CmEnv -> Var -> Maybe BoundVar
- TrieMap: lookupCoreMap :: CoreMap a -> CoreExpr -> Maybe a
- TrieMap: lookupTypeMap :: TypeMap a -> Type -> Maybe a
- TrieMap: lookupTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> Maybe a
- TrieMap: mkDeBruijnContext :: [Var] -> CmEnv
- TrieMap: xtDFreeVar :: Var -> XT a -> DVarEnv a -> DVarEnv a
- TrieMap: xtDNamed :: NamedThing n => n -> XT a -> DNameEnv a -> DNameEnv a
- TyCon: tyConFamilySizeAtMost :: TyCon -> Int -> Bool
- Type: FunPrec :: TyPrec
- Type: TopPrec :: TyPrec
- Type: TyConPrec :: TyPrec
- Type: TyOpPrec :: TyPrec
- Type: data TyPrec
- TysWiredIn: isPArrFakeCon :: DataCon -> Bool
- TysWiredIn: isPArrTyCon :: TyCon -> Bool
- TysWiredIn: mkPArrTy :: Type -> Type
- TysWiredIn: parrFakeCon :: Arity -> DataCon
- TysWiredIn: parrTyCon :: TyCon
- TysWiredIn: parrTyConName :: Name
- TysWiredIn: parrTyCon_RDR :: RdrName
- TysWiredIn: starKindTyCon :: TyCon
- TysWiredIn: starKindTyConName :: Name
- TysWiredIn: unicodeStarKindTyCon :: TyCon
- TysWiredIn: unicodeStarKindTyConName :: Name
- Unique: dataConRepNameUnique :: Unique -> Unique
- Unique: mkPArrDataConUnique :: Int -> Unique
- Util: hSetTranslit :: Handle -> IO ()
- Util: splitEithers :: [Either a b] -> ([a], [b])
- Vectorise: vectorise :: ModGuts -> CoreM ModGuts
- Vectorise.Builtins: Builtins :: TyCon -> TyCon -> TyCon -> Class -> TyCon -> TyCon -> Class -> TyCon -> DataCon -> Var -> Var -> NameEnv Var -> Var -> NameEnv Var -> Var -> NameEnv Var -> Array Int Var -> Array Int (NameEnv Var) -> Class -> Array Int Var -> TyCon -> Var -> Var -> Array Int TyCon -> TyCon -> Var -> Var -> TyCon -> Var -> Var -> Var -> Var -> Array Int Var -> Array Int Type -> Array Int Type -> Array Int CoreExpr -> Array Int CoreExpr -> Array Int CoreExpr -> Array (Int, Int) CoreExpr -> Var -> Builtins
- Vectorise.Builtins: [applyVar] :: Builtins -> Var
- Vectorise.Builtins: [closureCtrFuns] :: Builtins -> Array Int Var
- Vectorise.Builtins: [closureTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [closureVar] :: Builtins -> Var
- Vectorise.Builtins: [combinePDVars] :: Builtins -> Array Int Var
- Vectorise.Builtins: [combinePD_PrimVarss] :: Builtins -> Array Int (NameEnv Var)
- Vectorise.Builtins: [emptyPDVar] :: Builtins -> Var
- Vectorise.Builtins: [emptyPD_PrimVars] :: Builtins -> NameEnv Var
- Vectorise.Builtins: [fromVoidVar] :: Builtins -> Var
- Vectorise.Builtins: [liftedApplyVar] :: Builtins -> Var
- Vectorise.Builtins: [liftedClosureVar] :: Builtins -> Var
- Vectorise.Builtins: [liftingContext] :: Builtins -> Var
- Vectorise.Builtins: [paClass] :: Builtins -> Class
- Vectorise.Builtins: [paDataCon] :: Builtins -> DataCon
- Vectorise.Builtins: [paPRSel] :: Builtins -> Var
- Vectorise.Builtins: [paTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [packByTagPDVar] :: Builtins -> Var
- Vectorise.Builtins: [packByTagPD_PrimVars] :: Builtins -> NameEnv Var
- Vectorise.Builtins: [parrayTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [pdataTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [pdatasTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [prClass] :: Builtins -> Class
- Vectorise.Builtins: [prTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [preprTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [pvoidVar] :: Builtins -> Var
- Vectorise.Builtins: [pvoidsVar] :: Builtins -> Var
- Vectorise.Builtins: [replicatePDVar] :: Builtins -> Var
- Vectorise.Builtins: [replicatePD_PrimVars] :: Builtins -> NameEnv Var
- Vectorise.Builtins: [scalarClass] :: Builtins -> Class
- Vectorise.Builtins: [scalarZips] :: Builtins -> Array Int Var
- Vectorise.Builtins: [selElementss] :: Builtins -> Array (Int, Int) CoreExpr
- Vectorise.Builtins: [selReplicates] :: Builtins -> Array Int CoreExpr
- Vectorise.Builtins: [selTagss] :: Builtins -> Array Int CoreExpr
- Vectorise.Builtins: [selTys] :: Builtins -> Array Int Type
- Vectorise.Builtins: [selsLengths] :: Builtins -> Array Int CoreExpr
- Vectorise.Builtins: [selsTys] :: Builtins -> Array Int Type
- Vectorise.Builtins: [sumTyCons] :: Builtins -> Array Int TyCon
- Vectorise.Builtins: [voidTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: [voidVar] :: Builtins -> Var
- Vectorise.Builtins: [wrapTyCon] :: Builtins -> TyCon
- Vectorise.Builtins: closureCtrFun :: Int -> Builtins -> Var
- Vectorise.Builtins: combinePDVar :: Int -> Builtins -> Var
- Vectorise.Builtins: combinePD_PrimVar :: Int -> TyCon -> Builtins -> Var
- Vectorise.Builtins: data Builtins
- Vectorise.Builtins: emptyPD_PrimVar :: TyCon -> Builtins -> Var
- Vectorise.Builtins: initBuiltinVars :: Builtins -> DsM [(Var, Var)]
- Vectorise.Builtins: initBuiltins :: DsM Builtins
- Vectorise.Builtins: mAX_DPH_SCALAR_ARGS :: Int
- Vectorise.Builtins: packByTagPD_PrimVar :: TyCon -> Builtins -> Var
- Vectorise.Builtins: prodDataCon :: Int -> Builtins -> DataCon
- Vectorise.Builtins: prodTyCon :: Int -> Builtins -> TyCon
- Vectorise.Builtins: replicatePD_PrimVar :: TyCon -> Builtins -> Var
- Vectorise.Builtins: scalarZip :: Int -> Builtins -> Var
- Vectorise.Builtins: selElements :: Int -> Int -> Builtins -> CoreExpr
- Vectorise.Builtins: selReplicate :: Int -> Builtins -> CoreExpr
- Vectorise.Builtins: selTags :: Int -> Builtins -> CoreExpr
- Vectorise.Builtins: selTy :: Int -> Builtins -> Type
- Vectorise.Builtins: selsLength :: Int -> Builtins -> CoreExpr
- Vectorise.Builtins: selsTy :: Int -> Builtins -> Type
- Vectorise.Builtins: sumTyCon :: Int -> Builtins -> TyCon
- Vectorise.Builtins.Base: Builtins :: TyCon -> TyCon -> TyCon -> Class -> TyCon -> TyCon -> Class -> TyCon -> DataCon -> Var -> Var -> NameEnv Var -> Var -> NameEnv Var -> Var -> NameEnv Var -> Array Int Var -> Array Int (NameEnv Var) -> Class -> Array Int Var -> TyCon -> Var -> Var -> Array Int TyCon -> TyCon -> Var -> Var -> TyCon -> Var -> Var -> Var -> Var -> Array Int Var -> Array Int Type -> Array Int Type -> Array Int CoreExpr -> Array Int CoreExpr -> Array Int CoreExpr -> Array (Int, Int) CoreExpr -> Var -> Builtins
- Vectorise.Builtins.Base: [applyVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [closureCtrFuns] :: Builtins -> Array Int Var
- Vectorise.Builtins.Base: [closureTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [closureVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [combinePDVars] :: Builtins -> Array Int Var
- Vectorise.Builtins.Base: [combinePD_PrimVarss] :: Builtins -> Array Int (NameEnv Var)
- Vectorise.Builtins.Base: [emptyPDVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [emptyPD_PrimVars] :: Builtins -> NameEnv Var
- Vectorise.Builtins.Base: [fromVoidVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [liftedApplyVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [liftedClosureVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [liftingContext] :: Builtins -> Var
- Vectorise.Builtins.Base: [paClass] :: Builtins -> Class
- Vectorise.Builtins.Base: [paDataCon] :: Builtins -> DataCon
- Vectorise.Builtins.Base: [paPRSel] :: Builtins -> Var
- Vectorise.Builtins.Base: [paTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [packByTagPDVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [packByTagPD_PrimVars] :: Builtins -> NameEnv Var
- Vectorise.Builtins.Base: [parrayTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [pdataTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [pdatasTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [prClass] :: Builtins -> Class
- Vectorise.Builtins.Base: [prTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [preprTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [pvoidVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [pvoidsVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [replicatePDVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [replicatePD_PrimVars] :: Builtins -> NameEnv Var
- Vectorise.Builtins.Base: [scalarClass] :: Builtins -> Class
- Vectorise.Builtins.Base: [scalarZips] :: Builtins -> Array Int Var
- Vectorise.Builtins.Base: [selElementss] :: Builtins -> Array (Int, Int) CoreExpr
- Vectorise.Builtins.Base: [selReplicates] :: Builtins -> Array Int CoreExpr
- Vectorise.Builtins.Base: [selTagss] :: Builtins -> Array Int CoreExpr
- Vectorise.Builtins.Base: [selTys] :: Builtins -> Array Int Type
- Vectorise.Builtins.Base: [selsLengths] :: Builtins -> Array Int CoreExpr
- Vectorise.Builtins.Base: [selsTys] :: Builtins -> Array Int Type
- Vectorise.Builtins.Base: [sumTyCons] :: Builtins -> Array Int TyCon
- Vectorise.Builtins.Base: [voidTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: [voidVar] :: Builtins -> Var
- Vectorise.Builtins.Base: [wrapTyCon] :: Builtins -> TyCon
- Vectorise.Builtins.Base: aLL_DPH_PRIM_TYCONS :: [Name]
- Vectorise.Builtins.Base: closureCtrFun :: Int -> Builtins -> Var
- Vectorise.Builtins.Base: combinePDVar :: Int -> Builtins -> Var
- Vectorise.Builtins.Base: combinePD_PrimVar :: Int -> TyCon -> Builtins -> Var
- Vectorise.Builtins.Base: data Builtins
- Vectorise.Builtins.Base: emptyPD_PrimVar :: TyCon -> Builtins -> Var
- Vectorise.Builtins.Base: mAX_DPH_COMBINE :: Int
- Vectorise.Builtins.Base: mAX_DPH_PROD :: Int
- Vectorise.Builtins.Base: mAX_DPH_SCALAR_ARGS :: Int
- Vectorise.Builtins.Base: mAX_DPH_SUM :: Int
- Vectorise.Builtins.Base: packByTagPD_PrimVar :: TyCon -> Builtins -> Var
- Vectorise.Builtins.Base: prodDataCon :: Int -> Builtins -> DataCon
- Vectorise.Builtins.Base: prodTyCon :: Int -> Builtins -> TyCon
- Vectorise.Builtins.Base: replicatePD_PrimVar :: TyCon -> Builtins -> Var
- Vectorise.Builtins.Base: scalarZip :: Int -> Builtins -> Var
- Vectorise.Builtins.Base: selElements :: Int -> Int -> Builtins -> CoreExpr
- Vectorise.Builtins.Base: selReplicate :: Int -> Builtins -> CoreExpr
- Vectorise.Builtins.Base: selTags :: Int -> Builtins -> CoreExpr
- Vectorise.Builtins.Base: selTy :: Int -> Builtins -> Type
- Vectorise.Builtins.Base: selsLength :: Int -> Builtins -> CoreExpr
- Vectorise.Builtins.Base: selsTy :: Int -> Builtins -> Type
- Vectorise.Builtins.Base: sumTyCon :: Int -> Builtins -> TyCon
- Vectorise.Builtins.Initialise: initBuiltinVars :: Builtins -> DsM [(Var, Var)]
- Vectorise.Builtins.Initialise: initBuiltins :: DsM Builtins
- Vectorise.Convert: fromVect :: Type -> CoreExpr -> VM CoreExpr
- Vectorise.Env: Global :: a -> Scope a b
- Vectorise.Env: GlobalEnv :: Bool -> VarEnv Var -> DVarSet -> VarEnv (Maybe (Type, CoreExpr)) -> NameEnv TyCon -> NameSet -> NameEnv DataCon -> NameEnv Var -> NameEnv Var -> InstEnvs -> FamInstEnvs -> [(Var, CoreExpr)] -> GlobalEnv
- Vectorise.Env: Local :: b -> Scope a b
- Vectorise.Env: LocalEnv :: VarEnv (Var, Var) -> [TyVar] -> VarEnv CoreExpr -> FastString -> LocalEnv
- Vectorise.Env: [global_bindings] :: GlobalEnv -> [(Var, CoreExpr)]
- Vectorise.Env: [global_datacons] :: GlobalEnv -> NameEnv DataCon
- Vectorise.Env: [global_fam_inst_env] :: GlobalEnv -> FamInstEnvs
- Vectorise.Env: [global_inst_env] :: GlobalEnv -> InstEnvs
- Vectorise.Env: [global_pa_funs] :: GlobalEnv -> NameEnv Var
- Vectorise.Env: [global_parallel_tycons] :: GlobalEnv -> NameSet
- Vectorise.Env: [global_parallel_vars] :: GlobalEnv -> DVarSet
- Vectorise.Env: [global_pr_funs] :: GlobalEnv -> NameEnv Var
- Vectorise.Env: [global_tycons] :: GlobalEnv -> NameEnv TyCon
- Vectorise.Env: [global_vars] :: GlobalEnv -> VarEnv Var
- Vectorise.Env: [global_vect_avoid] :: GlobalEnv -> Bool
- Vectorise.Env: [global_vect_decls] :: GlobalEnv -> VarEnv (Maybe (Type, CoreExpr))
- Vectorise.Env: [local_bind_name] :: LocalEnv -> FastString
- Vectorise.Env: [local_tyvar_pa] :: LocalEnv -> VarEnv CoreExpr
- Vectorise.Env: [local_tyvars] :: LocalEnv -> [TyVar]
- Vectorise.Env: [local_vars] :: LocalEnv -> VarEnv (Var, Var)
- Vectorise.Env: data GlobalEnv
- Vectorise.Env: data LocalEnv
- Vectorise.Env: data Scope a b
- Vectorise.Env: emptyLocalEnv :: LocalEnv
- Vectorise.Env: extendFamEnv :: [FamInst] -> GlobalEnv -> GlobalEnv
- Vectorise.Env: extendImportedVarsEnv :: [(Var, Var)] -> GlobalEnv -> GlobalEnv
- Vectorise.Env: initGlobalEnv :: Bool -> VectInfo -> [CoreVect] -> InstEnvs -> FamInstEnvs -> GlobalEnv
- Vectorise.Env: modVectInfo :: GlobalEnv -> [Id] -> [TyCon] -> [CoreVect] -> VectInfo -> VectInfo
- Vectorise.Env: setPAFunsEnv :: [(Name, Var)] -> GlobalEnv -> GlobalEnv
- Vectorise.Env: setPRFunsEnv :: [(Name, Var)] -> GlobalEnv -> GlobalEnv
- Vectorise.Exp: instance GHC.Classes.Eq Vectorise.Exp.VectAvoidInfo
- Vectorise.Exp: instance GHC.Show.Show Vectorise.Exp.VectAvoidInfo
- Vectorise.Exp: vectScalarDFun :: Var -> VM CoreExpr
- Vectorise.Exp: vectScalarFun :: CoreExpr -> VM VExpr
- Vectorise.Exp: vectTopExpr :: Var -> CoreExpr -> VM (Maybe (Bool, Inline, CoreExpr))
- Vectorise.Exp: vectTopExprs :: [(Var, CoreExpr)] -> VM (Maybe (Bool, [(Inline, CoreExpr)]))
- Vectorise.Generic.Description: ConRepr :: DataCon -> ProdRepr -> ConRepr
- Vectorise.Generic.Description: EmptyProd :: ProdRepr
- Vectorise.Generic.Description: EmptySum :: SumRepr
- Vectorise.Generic.Description: Keep :: Type -> CoreExpr -> CompRepr
- Vectorise.Generic.Description: Prod :: TyCon -> TyCon -> TyCon -> [Type] -> [CompRepr] -> ProdRepr
- Vectorise.Generic.Description: Sum :: TyCon -> TyCon -> TyCon -> Type -> Type -> CoreExpr -> [Type] -> [ConRepr] -> SumRepr
- Vectorise.Generic.Description: UnaryProd :: CompRepr -> ProdRepr
- Vectorise.Generic.Description: UnarySum :: ConRepr -> SumRepr
- Vectorise.Generic.Description: Wrap :: Type -> CompRepr
- Vectorise.Generic.Description: [repr_comp_tys] :: ProdRepr -> [Type]
- Vectorise.Generic.Description: [repr_comps] :: ProdRepr -> [CompRepr]
- Vectorise.Generic.Description: [repr_con_tys] :: SumRepr -> [Type]
- Vectorise.Generic.Description: [repr_cons] :: SumRepr -> [ConRepr]
- Vectorise.Generic.Description: [repr_dc] :: ConRepr -> DataCon
- Vectorise.Generic.Description: [repr_prod] :: ConRepr -> ProdRepr
- Vectorise.Generic.Description: [repr_psum_tc] :: SumRepr -> TyCon
- Vectorise.Generic.Description: [repr_psums_tc] :: SumRepr -> TyCon
- Vectorise.Generic.Description: [repr_ptup_tc] :: ProdRepr -> TyCon
- Vectorise.Generic.Description: [repr_ptups_tc] :: ProdRepr -> TyCon
- Vectorise.Generic.Description: [repr_sel_ty] :: SumRepr -> Type
- Vectorise.Generic.Description: [repr_selsLength_v] :: SumRepr -> CoreExpr
- Vectorise.Generic.Description: [repr_sels_ty] :: SumRepr -> Type
- Vectorise.Generic.Description: [repr_sum_tc] :: SumRepr -> TyCon
- Vectorise.Generic.Description: [repr_tup_tc] :: ProdRepr -> TyCon
- Vectorise.Generic.Description: compOrigType :: CompRepr -> Type
- Vectorise.Generic.Description: data CompRepr
- Vectorise.Generic.Description: data ConRepr
- Vectorise.Generic.Description: data ProdRepr
- Vectorise.Generic.Description: data SumRepr
- Vectorise.Generic.Description: instance Outputable.Outputable Vectorise.Generic.Description.CompRepr
- Vectorise.Generic.Description: instance Outputable.Outputable Vectorise.Generic.Description.ConRepr
- Vectorise.Generic.Description: instance Outputable.Outputable Vectorise.Generic.Description.ProdRepr
- Vectorise.Generic.Description: instance Outputable.Outputable Vectorise.Generic.Description.SumRepr
- Vectorise.Generic.Description: sumReprType :: SumRepr -> VM Type
- Vectorise.Generic.Description: tyConRepr :: TyCon -> VM SumRepr
- Vectorise.Generic.PADict: buildPADict :: TyCon -> CoAxiom Unbranched -> TyCon -> TyCon -> SumRepr -> VM Var
- Vectorise.Generic.PAMethods: buildPAScAndMethods :: VM [(String, PAInstanceBuilder)]
- Vectorise.Generic.PAMethods: buildPReprTyCon :: TyCon -> TyCon -> SumRepr -> VM FamInst
- Vectorise.Generic.PData: buildPDataTyCon :: TyCon -> TyCon -> SumRepr -> VM FamInst
- Vectorise.Generic.PData: buildPDatasTyCon :: TyCon -> TyCon -> SumRepr -> VM FamInst
- Vectorise.Monad: addGlobalParallelTyCon :: TyCon -> VM ()
- Vectorise.Monad: addGlobalParallelVar :: Var -> VM ()
- Vectorise.Monad: builtin :: (Builtins -> a) -> VM a
- Vectorise.Monad: builtins :: (a -> Builtins -> b) -> VM (a -> b)
- Vectorise.Monad: initV :: HscEnv -> ModGuts -> VectInfo -> VM a -> IO (Maybe (VectInfo, a))
- Vectorise.Monad: liftBuiltinDs :: (Builtins -> DsM a) -> VM a
- Vectorise.Monad: lookupVar :: Var -> VM (Scope Var (Var, Var))
- Vectorise.Monad: lookupVar_maybe :: Var -> VM (Maybe (Scope Var (Var, Var)))
- Vectorise.Monad.Base: No :: SDoc -> VResult a
- Vectorise.Monad.Base: VM :: Builtins -> GlobalEnv -> LocalEnv -> DsM (VResult a) -> VM a
- Vectorise.Monad.Base: Yes :: GlobalEnv -> LocalEnv -> a -> VResult a
- Vectorise.Monad.Base: [runVM] :: VM a -> Builtins -> GlobalEnv -> LocalEnv -> DsM (VResult a)
- Vectorise.Monad.Base: cantVectorise :: DynFlags -> String -> SDoc -> a
- Vectorise.Monad.Base: data VResult a
- Vectorise.Monad.Base: dumpOptVt :: DumpFlag -> String -> SDoc -> VM ()
- Vectorise.Monad.Base: dumpVt :: String -> SDoc -> VM ()
- Vectorise.Monad.Base: emitVt :: String -> SDoc -> VM ()
- Vectorise.Monad.Base: ensureV :: SDoc -> Bool -> VM ()
- Vectorise.Monad.Base: fixV :: (a -> VM a) -> VM a
- Vectorise.Monad.Base: instance Control.Monad.IO.Class.MonadIO Vectorise.Monad.Base.VM
- Vectorise.Monad.Base: instance DynFlags.HasDynFlags Vectorise.Monad.Base.VM
- Vectorise.Monad.Base: instance GHC.Base.Applicative Vectorise.Monad.Base.VM
- Vectorise.Monad.Base: instance GHC.Base.Functor Vectorise.Monad.Base.VM
- Vectorise.Monad.Base: instance GHC.Base.Monad Vectorise.Monad.Base.VM
- Vectorise.Monad.Base: liftDs :: DsM a -> VM a
- Vectorise.Monad.Base: maybeCantVectorise :: DynFlags -> String -> SDoc -> Maybe a -> a
- Vectorise.Monad.Base: maybeCantVectoriseM :: (Monad m, HasDynFlags m) => String -> SDoc -> m (Maybe a) -> m a
- Vectorise.Monad.Base: maybeV :: SDoc -> VM (Maybe a) -> VM a
- Vectorise.Monad.Base: newtype VM a
- Vectorise.Monad.Base: noV :: SDoc -> VM a
- Vectorise.Monad.Base: onlyIfV :: SDoc -> Bool -> VM a -> VM a
- Vectorise.Monad.Base: orElseErrV :: VM a -> VM a -> VM a
- Vectorise.Monad.Base: orElseV :: VM a -> VM a -> VM a
- Vectorise.Monad.Base: traceEnsureV :: String -> SDoc -> Bool -> VM ()
- Vectorise.Monad.Base: traceMaybeV :: String -> SDoc -> VM (Maybe a) -> VM a
- Vectorise.Monad.Base: traceNoV :: String -> SDoc -> VM a
- Vectorise.Monad.Base: traceVt :: String -> SDoc -> VM ()
- Vectorise.Monad.Base: tryErrV :: VM a -> VM (Maybe a)
- Vectorise.Monad.Base: tryV :: VM a -> VM (Maybe a)
- Vectorise.Monad.Global: defDataCon :: DataCon -> DataCon -> VM ()
- Vectorise.Monad.Global: defGlobalVar :: Var -> Var -> VM ()
- Vectorise.Monad.Global: defTyCon :: TyCon -> TyCon -> VM ()
- Vectorise.Monad.Global: defTyConName :: TyCon -> Name -> TyCon -> VM ()
- Vectorise.Monad.Global: defTyConPAs :: [(TyCon, Var)] -> VM ()
- Vectorise.Monad.Global: globalParallelTyCons :: VM NameSet
- Vectorise.Monad.Global: globalParallelVars :: VM DVarSet
- Vectorise.Monad.Global: globalVectTyCons :: VM (NameEnv TyCon)
- Vectorise.Monad.Global: isVectAvoidanceAggressive :: VM Bool
- Vectorise.Monad.Global: lookupDataCon :: DataCon -> VM (Maybe DataCon)
- Vectorise.Monad.Global: lookupTyCon :: TyCon -> VM (Maybe TyCon)
- Vectorise.Monad.Global: lookupTyConPA :: TyCon -> VM (Maybe Var)
- Vectorise.Monad.Global: lookupTyConPR :: TyCon -> VM (Maybe Var)
- Vectorise.Monad.Global: lookupVectDecl :: Var -> VM (Bool, Maybe (Type, CoreExpr))
- Vectorise.Monad.Global: readGEnv :: (GlobalEnv -> a) -> VM a
- Vectorise.Monad.Global: setGEnv :: GlobalEnv -> VM ()
- Vectorise.Monad.Global: undefGlobalVar :: Var -> VM ()
- Vectorise.Monad.Global: updGEnv :: (GlobalEnv -> GlobalEnv) -> VM ()
- Vectorise.Monad.InstEnv: existsInst :: Class -> [Type] -> VM Bool
- Vectorise.Monad.InstEnv: lookupFamInst :: TyCon -> [Type] -> VM FamInstMatch
- Vectorise.Monad.InstEnv: lookupInst :: Class -> [Type] -> VM (DFunId, [Type])
- Vectorise.Monad.Local: closedV :: VM a -> VM a
- Vectorise.Monad.Local: defLocalTyVar :: TyVar -> VM ()
- Vectorise.Monad.Local: defLocalTyVarWithPA :: TyVar -> CoreExpr -> VM ()
- Vectorise.Monad.Local: getBindName :: VM FastString
- Vectorise.Monad.Local: inBind :: Id -> VM a -> VM a
- Vectorise.Monad.Local: localTyVars :: VM [TyVar]
- Vectorise.Monad.Local: localV :: VM a -> VM a
- Vectorise.Monad.Local: lookupTyVarPA :: Var -> VM (Maybe CoreExpr)
- Vectorise.Monad.Local: readLEnv :: (LocalEnv -> a) -> VM a
- Vectorise.Monad.Local: setLEnv :: LocalEnv -> VM ()
- Vectorise.Monad.Local: updLEnv :: (LocalEnv -> LocalEnv) -> VM ()
- Vectorise.Monad.Naming: cloneVar :: Var -> VM Var
- Vectorise.Monad.Naming: mkDerivedName :: (OccName -> OccName) -> Name -> VM Name
- Vectorise.Monad.Naming: mkLocalisedName :: (Maybe String -> OccName -> OccName) -> Name -> VM Name
- Vectorise.Monad.Naming: mkVectId :: Id -> Type -> VM Id
- Vectorise.Monad.Naming: newCoVar :: FastString -> Kind -> VM Var
- Vectorise.Monad.Naming: newDummyVar :: Type -> VM Var
- Vectorise.Monad.Naming: newExportedVar :: OccName -> Type -> VM Var
- Vectorise.Monad.Naming: newLocalVar :: FastString -> Type -> VM Var
- Vectorise.Monad.Naming: newLocalVars :: FastString -> [Type] -> VM [Var]
- Vectorise.Monad.Naming: newTyVar :: FastString -> Kind -> VM Var
- Vectorise.Type.Classify: classifyTyCons :: UniqFM Bool -> NameSet -> [TyCon] -> ([TyCon], [TyCon], [TyCon], [TyCon])
- Vectorise.Type.Env: vectTypeEnv :: [TyCon] -> [CoreVect] -> [CoreVect] -> VM ([TyCon], [FamInst], [(Var, CoreExpr)])
- Vectorise.Type.TyConDecl: vectTyConDecls :: [TyCon] -> VM [TyCon]
- Vectorise.Type.Type: vectAndLiftType :: Type -> VM (Type, Type)
- Vectorise.Type.Type: vectTyCon :: TyCon -> VM TyCon
- Vectorise.Type.Type: vectType :: Type -> VM Type
- Vectorise.Utils: collectAnnDictArgs :: AnnExpr Var ann -> (AnnExpr Var ann, [AnnExpr Var ann])
- Vectorise.Utils: collectAnnTypeArgs :: AnnExpr b ann -> (AnnExpr b ann, [Type])
- Vectorise.Utils: collectAnnTypeBinders :: AnnExpr Var ann -> ([Var], AnnExpr Var ann)
- Vectorise.Utils: collectAnnValBinders :: AnnExpr Var ann -> ([Var], AnnExpr Var ann)
- Vectorise.Utils: combinePD :: Type -> CoreExpr -> CoreExpr -> [CoreExpr] -> VM CoreExpr
- Vectorise.Utils: emptyPD :: Type -> VM CoreExpr
- Vectorise.Utils: isAnnTypeArg :: AnnExpr b ann -> Bool
- Vectorise.Utils: isScalar :: Type -> VM Bool
- Vectorise.Utils: liftPD :: CoreExpr -> VM CoreExpr
- Vectorise.Utils: newLocalVar :: FastString -> Type -> VM Var
- Vectorise.Utils: packByTagPD :: Type -> CoreExpr -> CoreExpr -> CoreExpr -> CoreExpr -> VM CoreExpr
- Vectorise.Utils: replicatePD :: CoreExpr -> CoreExpr -> VM CoreExpr
- Vectorise.Utils: scalarClosure :: [Type] -> Type -> CoreExpr -> CoreExpr -> VM CoreExpr
- Vectorise.Utils: zipScalars :: [Type] -> Type -> VM CoreExpr
- Vectorise.Utils.Base: mkBuiltinCo :: (Builtins -> TyCon) -> VM Coercion
- Vectorise.Utils.Base: mkClosureTypes :: [Type] -> Type -> VM Type
- Vectorise.Utils.Base: mkDataConTag :: DynFlags -> DataCon -> CoreExpr
- Vectorise.Utils.Base: mkPDataType :: Type -> VM Type
- Vectorise.Utils.Base: mkPDatasType :: Type -> VM Type
- Vectorise.Utils.Base: mkPReprType :: Type -> VM Type
- Vectorise.Utils.Base: mkWrapType :: Type -> VM Type
- Vectorise.Utils.Base: newLocalVVar :: FastString -> Type -> VM VVar
- Vectorise.Utils.Base: pdataReprTyCon :: Type -> VM (TyCon, [Type])
- Vectorise.Utils.Base: pdataReprTyConExact :: TyCon -> VM TyCon
- Vectorise.Utils.Base: pdataUnwrapScrut :: VExpr -> VM (CoreExpr, CoreExpr, DataCon)
- Vectorise.Utils.Base: pdatasReprTyConExact :: TyCon -> VM TyCon
- Vectorise.Utils.Base: preprFamInst :: Type -> VM FamInstMatch
- Vectorise.Utils.Base: splitPrimTyCon :: Type -> Maybe TyCon
- Vectorise.Utils.Base: unwrapNewTypeBodyOfPDataWrap :: CoreExpr -> Type -> VM CoreExpr
- Vectorise.Utils.Base: unwrapNewTypeBodyOfPDatasWrap :: CoreExpr -> Type -> VM CoreExpr
- Vectorise.Utils.Base: unwrapNewTypeBodyOfWrap :: CoreExpr -> Type -> VM CoreExpr
- Vectorise.Utils.Base: voidType :: VM Type
- Vectorise.Utils.Base: wrapNewTypeBodyOfPDataWrap :: CoreExpr -> Type -> VM CoreExpr
- Vectorise.Utils.Base: wrapNewTypeBodyOfPDatasWrap :: CoreExpr -> Type -> VM CoreExpr
- Vectorise.Utils.Base: wrapNewTypeBodyOfWrap :: CoreExpr -> Type -> VM CoreExpr
- Vectorise.Utils.Closure: buildClosures :: [TyVar] -> [Var] -> [VVar] -> [Type] -> Type -> VM VExpr -> VM VExpr
- Vectorise.Utils.Closure: mkClosure :: Type -> Type -> Type -> VExpr -> VExpr -> VM VExpr
- Vectorise.Utils.Closure: mkClosureApp :: Type -> Type -> VExpr -> VExpr -> VM VExpr
- Vectorise.Utils.Hoisting: DontInline :: Inline
- Vectorise.Utils.Hoisting: Inline :: Arity -> Inline
- Vectorise.Utils.Hoisting: addInlineArity :: Inline -> Int -> Inline
- Vectorise.Utils.Hoisting: data Inline
- Vectorise.Utils.Hoisting: hoistBinding :: Var -> CoreExpr -> VM ()
- Vectorise.Utils.Hoisting: hoistExpr :: FastString -> CoreExpr -> Inline -> VM Var
- Vectorise.Utils.Hoisting: hoistPolyVExpr :: [TyVar] -> [Var] -> Inline -> VM VExpr -> VM VExpr
- Vectorise.Utils.Hoisting: hoistVExpr :: VExpr -> Inline -> VM VVar
- Vectorise.Utils.Hoisting: inlineMe :: Inline
- Vectorise.Utils.Hoisting: takeHoisted :: VM [(Var, CoreExpr)]
- Vectorise.Utils.PADict: paDictArgType :: TyVar -> VM (Maybe Type)
- Vectorise.Utils.PADict: paDictOfType :: Type -> VM CoreExpr
- Vectorise.Utils.PADict: paMethod :: (Builtins -> Var) -> (TyCon -> Builtins -> Var) -> Type -> VM CoreExpr
- Vectorise.Utils.PADict: prDictOfPReprInstTyCon :: Type -> CoAxiom Unbranched -> [Type] -> VM CoreExpr
- Vectorise.Utils.PADict: prDictOfReprType :: Type -> VM CoreExpr
- Vectorise.Utils.Poly: polyAbstract :: [TyVar] -> ([Var] -> VM a) -> VM a
- Vectorise.Utils.Poly: polyApply :: CoreExpr -> [Type] -> VM CoreExpr
- Vectorise.Utils.Poly: polyArity :: [TyVar] -> VM Int
- Vectorise.Utils.Poly: polyVApply :: VExpr -> [Type] -> VM VExpr
- Vectorise.Var: vectBndr :: Var -> VM VVar
- Vectorise.Var: vectBndrIn :: Var -> VM a -> VM (VVar, a)
- Vectorise.Var: vectBndrNew :: Var -> FastString -> VM VVar
- Vectorise.Var: vectBndrNewIn :: Var -> FastString -> VM a -> VM (VVar, a)
- Vectorise.Var: vectBndrsIn :: [Var] -> VM a -> VM ([VVar], a)
- Vectorise.Var: vectConst :: CoreExpr -> VM VExpr
- Vectorise.Var: vectVar :: Var -> VM VExpr
- Vectorise.Vect: lifted :: Vect a -> a
- Vectorise.Vect: mapVect :: (a -> b) -> Vect a -> Vect b
- Vectorise.Vect: type VBind = Vect CoreBind
- Vectorise.Vect: type VExpr = Vect CoreExpr
- Vectorise.Vect: type VVar = Vect Var
- Vectorise.Vect: type Vect a = (a, a)
- Vectorise.Vect: vCaseDEFAULT :: VExpr -> VVar -> Type -> Type -> VExpr -> VExpr
- Vectorise.Vect: vLams :: Var -> [VVar] -> VExpr -> VExpr
- Vectorise.Vect: vLet :: VBind -> VExpr -> VExpr
- Vectorise.Vect: vNonRec :: VVar -> VExpr -> VBind
- Vectorise.Vect: vRec :: [VVar] -> [VExpr] -> VBind
- Vectorise.Vect: vTick :: Tickish Id -> VExpr -> VExpr
- Vectorise.Vect: vType :: Type -> VExpr
- Vectorise.Vect: vVar :: VVar -> VExpr
- Vectorise.Vect: vVarApps :: Var -> VExpr -> [VVar] -> VExpr
- Vectorise.Vect: vVarType :: VVar -> Type
- Vectorise.Vect: vectorised :: Vect a -> a
+ ApiAnnotation: AnnVia :: AnnKeywordId
+ Avail: availNamesWithOccs :: AvailInfo -> [(Name, OccName)]
+ Avail: availsNamesWithOccs :: [AvailInfo] -> [(Name, OccName)]
+ Bag: concatMapBagPair :: (a -> (Bag b, Bag c)) -> Bag a -> (Bag b, Bag c)
+ BasicTypes: PprPrec :: Int -> PprPrec
+ BasicTypes: appPrec :: PprPrec
+ BasicTypes: funPrec :: PprPrec
+ BasicTypes: instance GHC.Classes.Eq BasicTypes.PprPrec
+ BasicTypes: instance GHC.Classes.Ord BasicTypes.PprPrec
+ BasicTypes: instance GHC.Show.Show BasicTypes.PprPrec
+ BasicTypes: newtype PprPrec
+ BasicTypes: opPrec :: PprPrec
+ BasicTypes: sigPrec :: PprPrec
+ BasicTypes: topPrec :: PprPrec
+ BinIface: getWithUserData :: Binary a => NameCacheUpdater -> BinHandle -> IO a
+ BinIface: putWithUserData :: Binary a => (SDoc -> IO ()) -> BinHandle -> a -> IO ()
+ Binary: instance Binary.Binary a => Binary.Binary (GHC.Maybe.Maybe a)
+ BufWrite: bPutReplicate :: BufHandle -> Int -> Char -> IO ()
+ BuildTyCl: type MethInfo = (Name, Type, Maybe (DefMethSpec (SrcSpan, Type)))
+ CLabel: isLocalCLabel :: Module -> CLabel -> Bool
+ CLabel: mkMAP_FROZEN_CLEAN_infoLabel :: CLabel
+ CLabel: mkMAP_FROZEN_DIRTY_infoLabel :: CLabel
+ CLabel: mkSMAP_FROZEN_CLEAN_infoLabel :: CLabel
+ CLabel: mkSMAP_FROZEN_DIRTY_infoLabel :: CLabel
+ CLabel: mkSRTInfoLabel :: Int -> CLabel
+ CLabel: mkSRTLabel :: Unique -> CLabel
+ Check: checkGuardMatches :: HsMatchContext Name -> GRHSs GhcTc (LHsExpr GhcTc) -> DsM ()
+ Class: classSCSelIds :: Class -> [Id]
+ Cmm: [cit_clo] :: CmmInfoTable -> Maybe (Id, CostCentreStack)
+ CmmBuildInfoTables: data ModuleSRTInfo
+ CmmBuildInfoTables: instance GHC.Classes.Eq CmmBuildInfoTables.CAFLabel
+ CmmBuildInfoTables: instance GHC.Classes.Eq CmmBuildInfoTables.SRTEntry
+ CmmBuildInfoTables: instance GHC.Classes.Ord CmmBuildInfoTables.CAFLabel
+ CmmBuildInfoTables: instance GHC.Classes.Ord CmmBuildInfoTables.SRTEntry
+ CmmBuildInfoTables: instance Outputable.Outputable CmmBuildInfoTables.CAFLabel
+ CmmBuildInfoTables: instance Outputable.Outputable CmmBuildInfoTables.ModuleSRTInfo
+ CmmBuildInfoTables: instance Outputable.Outputable CmmBuildInfoTables.SRTEntry
+ CmmExpr: cccsReg :: CmmReg
+ CmmExpr: currentNurseryReg :: CmmReg
+ CmmExpr: currentTSOReg :: CmmReg
+ CmmExpr: hpAllocReg :: CmmReg
+ CmmExpr: hpLimReg :: CmmReg
+ CmmLex: CmmT_False :: CmmToken
+ CmmLex: CmmT_True :: CmmToken
+ CmmLex: CmmT_likely :: CmmToken
+ CmmMachOp: MO_AddWordC :: Width -> CallishMachOp
+ CmmUtils: baseExpr :: CmmExpr
+ CmmUtils: cccsExpr :: CmmExpr
+ CmmUtils: currentNurseryExpr :: CmmExpr
+ CmmUtils: currentTSOExpr :: CmmExpr
+ CmmUtils: foldlGraphBlocks :: (a -> CmmBlock -> a) -> a -> CmmGraph -> a
+ CmmUtils: hpExpr :: CmmExpr
+ CmmUtils: hpLimExpr :: CmmExpr
+ CmmUtils: isComparisonExpr :: CmmExpr -> Bool
+ CmmUtils: isLit :: CmmExpr -> Bool
+ CmmUtils: revPostorder :: CmmGraph -> [CmmBlock]
+ CmmUtils: spExpr :: CmmExpr
+ CmmUtils: spLimExpr :: CmmExpr
+ CoAxiom: MkBranches :: Array BranchIndex CoAxBranch -> Branches
+ CoAxiom: [unMkBranches] :: Branches -> Array BranchIndex CoAxBranch
+ CoAxiom: newtype Branches (br :: BranchFlag)
+ Coercion: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> CoercionHole
+ Coercion: MCo :: Coercion -> MCoercion
+ Coercion: MRefl :: MCoercion
+ Coercion: [ch_co_var] :: CoercionHole -> CoVar
+ Coercion: [ch_ref] :: CoercionHole -> IORef (Maybe Coercion)
+ Coercion: buildCoercion :: Type -> Type -> CoercionN
+ Coercion: coHoleCoVar :: CoercionHole -> CoVar
+ Coercion: data MCoercion
+ Coercion: decomposePiCos :: HasDebugCallStack => CoercionN -> Pair Type -> [Type] -> ([CoercionN], CoercionN)
+ Coercion: extendLiftingContextAndInScope :: LiftingContext -> TyVar -> Coercion -> LiftingContext
+ Coercion: liftCoSubstVarBndrUsing :: (LiftingContext -> Type -> (Coercion, a)) -> LiftingContext -> TyVar -> (LiftingContext, TyVar, Coercion, a)
+ Coercion: nthCoRole :: Int -> Coercion -> Role
+ Coercion: setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole
+ Coercion: substForAllCoBndrUsingLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
+ Coercion: type MCoercionR = MCoercion
+ CoreLint: lintTypes :: DynFlags -> [TyCoVar] -> [Type] -> Maybe MsgDoc
+ CoreMap: (>.>) :: (a -> b) -> (b -> c) -> a -> c
+ CoreMap: (|>) :: a -> (a -> b) -> b
+ CoreMap: (|>>) :: TrieMap m2 => (XT (m2 a) -> m1 (m2 a) -> m1 (m2 a)) -> (m2 a -> m2 a) -> m1 (m2 a) -> m1 (m2 a)
+ CoreMap: alterTM :: forall b. TrieMap m => Key m -> XT b -> m b -> m b
+ CoreMap: class TrieMap m where {
+ CoreMap: data CmEnv
+ CoreMap: data CoreMap a
+ CoreMap: data GenMap m a
+ CoreMap: data ListMap m a
+ CoreMap: data LooseTypeMap a
+ CoreMap: data MaybeMap m a
+ CoreMap: data TypeMap a
+ CoreMap: deleteTM :: TrieMap m => Key m -> m a -> m a
+ CoreMap: emptyCoreMap :: CoreMap a
+ CoreMap: emptyTM :: TrieMap m => m a
+ CoreMap: emptyTypeMap :: TypeMap a
+ CoreMap: extendCoreMap :: CoreMap a -> CoreExpr -> a -> CoreMap a
+ CoreMap: extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a
+ CoreMap: extendTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> a -> TypeMap a
+ CoreMap: foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b
+ CoreMap: foldTM :: TrieMap m => (a -> b -> b) -> m a -> b -> b
+ CoreMap: foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b
+ CoreMap: infixr 1 |>>
+ CoreMap: insertTM :: TrieMap m => Key m -> a -> m a -> m a
+ CoreMap: instance GHC.Classes.Eq (CoreMap.DeBruijn CoreSyn.CoreAlt)
+ CoreMap: instance GHC.Classes.Eq (CoreMap.DeBruijn CoreSyn.CoreExpr)
+ CoreMap: instance GHC.Classes.Eq (CoreMap.DeBruijn TyCoRep.Coercion)
+ CoreMap: instance GHC.Classes.Eq (CoreMap.DeBruijn TyCoRep.Type)
+ CoreMap: instance GHC.Classes.Eq (CoreMap.DeBruijn a) => GHC.Classes.Eq (CoreMap.DeBruijn [a])
+ CoreMap: instance Outputable.Outputable a => Outputable.Outputable (CoreMap.CoreMap a)
+ CoreMap: instance Outputable.Outputable a => Outputable.Outputable (CoreMap.TypeMapG a)
+ CoreMap: instance TrieMap.TrieMap CoreMap.AltMap
+ CoreMap: instance TrieMap.TrieMap CoreMap.CoercionMap
+ CoreMap: instance TrieMap.TrieMap CoreMap.CoercionMapX
+ CoreMap: instance TrieMap.TrieMap CoreMap.CoreMap
+ CoreMap: instance TrieMap.TrieMap CoreMap.CoreMapX
+ CoreMap: instance TrieMap.TrieMap CoreMap.LooseTypeMap
+ CoreMap: instance TrieMap.TrieMap CoreMap.TyLitMap
+ CoreMap: instance TrieMap.TrieMap CoreMap.TypeMap
+ CoreMap: instance TrieMap.TrieMap CoreMap.TypeMapX
+ CoreMap: instance TrieMap.TrieMap CoreMap.VarMap
+ CoreMap: lkDFreeVar :: Var -> DVarEnv a -> Maybe a
+ CoreMap: lkDNamed :: NamedThing n => n -> DNameEnv a -> Maybe a
+ CoreMap: lookupCME :: CmEnv -> Var -> Maybe BoundVar
+ CoreMap: lookupCoreMap :: CoreMap a -> CoreExpr -> Maybe a
+ CoreMap: lookupTM :: forall b. TrieMap m => Key m -> m b -> Maybe b
+ CoreMap: lookupTypeMap :: TypeMap a -> Type -> Maybe a
+ CoreMap: lookupTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> Maybe a
+ CoreMap: mapTM :: TrieMap m => (a -> b) -> m a -> m b
+ CoreMap: mkDeBruijnContext :: [Var] -> CmEnv
+ CoreMap: type LiteralMap a = Map Literal a
+ CoreMap: type family Key m :: *;
+ CoreMap: xtDFreeVar :: Var -> XT a -> DVarEnv a -> DVarEnv a
+ CoreMap: xtDNamed :: NamedThing n => n -> XT a -> DNameEnv a -> DNameEnv a
+ CoreMap: }
+ CoreMonad: type CorePluginPass = ModGuts -> CoreM ModGuts
+ CorePrep: cvtLitNatural :: DynFlags -> Id -> Maybe DataCon -> Integer -> CoreExpr
+ CorePrep: lookupMkNaturalName :: DynFlags -> HscEnv -> IO Id
+ CorePrep: lookupNaturalSDataConName :: DynFlags -> HscEnv -> IO (Maybe DataCon)
+ CoreSyn: stripNArgs :: Word -> Expr a -> Maybe (Expr a)
+ CoreSyn: type MOutCoercion = MCoercion
+ CostCentre: DeclCC :: !CostCentreIndex -> CCFlavour
+ CostCentre: ExprCC :: !CostCentreIndex -> CCFlavour
+ CostCentre: HpcCC :: !CostCentreIndex -> CCFlavour
+ CostCentre: [cc_flavour] :: CostCentre -> CCFlavour
+ CostCentre: data CCFlavour
+ CostCentre: instance Binary.Binary CostCentre.CCFlavour
+ CostCentre: instance Data.Data.Data CostCentre.CCFlavour
+ CostCentre: instance GHC.Classes.Eq CostCentre.CCFlavour
+ CostCentre: instance GHC.Classes.Ord CostCentre.CCFlavour
+ CostCentreState: data CostCentreIndex
+ CostCentreState: data CostCentreState
+ CostCentreState: getCCIndex :: FastString -> CostCentreState -> (CostCentreIndex, CostCentreState)
+ CostCentreState: instance Binary.Binary CostCentreState.CostCentreIndex
+ CostCentreState: instance Data.Data.Data CostCentreState.CostCentreIndex
+ CostCentreState: instance GHC.Classes.Eq CostCentreState.CostCentreIndex
+ CostCentreState: instance GHC.Classes.Ord CostCentreState.CostCentreIndex
+ CostCentreState: newCostCentreState :: CostCentreState
+ CostCentreState: unCostCentreIndex :: CostCentreIndex -> Int
+ Demand: etaExpandStrictSig :: Arity -> StrictSig -> StrictSig
+ DsUtils: isTrueLHsExpr :: LHsExpr GhcTc -> Maybe (CoreExpr -> DsM CoreExpr)
+ DynFlags: IncludeSpecs :: [String] -> [String] -> IncludeSpecs
+ DynFlags: Opt_AbstractRefHoleFits :: GeneralFlag
+ DynFlags: Opt_AsmShortcutting :: GeneralFlag
+ DynFlags: Opt_D_dump_ds_preopt :: DumpFlag
+ DynFlags: Opt_ExternalDynamicRefs :: GeneralFlag
+ DynFlags: Opt_GhciLeakCheck :: GeneralFlag
+ DynFlags: Opt_HexWordLiterals :: GeneralFlag
+ DynFlags: Opt_LateSpecialise :: GeneralFlag
+ DynFlags: Opt_NoIt :: GeneralFlag
+ DynFlags: Opt_NumConstantFolding :: GeneralFlag
+ DynFlags: Opt_ShowMatchesOfHoleFits :: GeneralFlag
+ DynFlags: Opt_ShowProvOfHoleFits :: GeneralFlag
+ DynFlags: Opt_ShowTypeAppOfHoleFits :: GeneralFlag
+ DynFlags: Opt_ShowTypeAppVarsOfHoleFits :: GeneralFlag
+ DynFlags: Opt_ShowTypeOfHoleFits :: GeneralFlag
+ DynFlags: Opt_ShowValidHoleFits :: GeneralFlag
+ DynFlags: Opt_SingleLibFolder :: GeneralFlag
+ DynFlags: Opt_SortBySizeHoleFits :: GeneralFlag
+ DynFlags: Opt_SortBySubsumHoleFits :: GeneralFlag
+ DynFlags: Opt_SortValidHoleFits :: GeneralFlag
+ DynFlags: Opt_SuppressTimestamps :: GeneralFlag
+ DynFlags: Opt_UnclutterValidHoleFits :: GeneralFlag
+ DynFlags: Opt_WarnImplicitKindVars :: WarningFlag
+ DynFlags: Opt_WarnInaccessibleCode :: WarningFlag
+ DynFlags: Opt_WarnStarBinder :: WarningFlag
+ DynFlags: Opt_WarnStarIsType :: WarningFlag
+ DynFlags: [cmmProcAlignment] :: DynFlags -> Maybe Int
+ DynFlags: [includePathsGlobal] :: IncludeSpecs -> [String]
+ DynFlags: [includePathsQuote] :: IncludeSpecs -> [String]
+ DynFlags: [inlineCheck] :: DynFlags -> Maybe String
+ DynFlags: [llvmPasses] :: DynFlags -> LlvmPasses
+ DynFlags: [maxRefHoleFits] :: DynFlags -> Maybe Int
+ DynFlags: [maxValidHoleFits] :: DynFlags -> Maybe Int
+ DynFlags: [plugins] :: DynFlags -> [LoadedPlugin]
+ DynFlags: [refLevelHoleFits] :: DynFlags -> Maybe Int
+ DynFlags: [sOpt_P_fingerprint] :: Settings -> Fingerprint
+ DynFlags: [sToolDir] :: Settings -> Maybe FilePath
+ DynFlags: addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
+ DynFlags: addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
+ DynFlags: canonicalizeModuleIfHome :: DynFlags -> Module -> Module
+ DynFlags: data IncludeSpecs
+ DynFlags: flattenIncludes :: IncludeSpecs -> [String]
+ DynFlags: instance GHC.Show.Show DynFlags.IncludeSpecs
+ DynFlags: opt_P_signature :: DynFlags -> ([String], Fingerprint)
+ DynFlags: shouldUseHexWordLiterals :: DynFlags -> Bool
+ DynFlags: type LlvmConfig = (LlvmTargets, LlvmPasses)
+ DynFlags: type LlvmPasses = [(Int, String)]
+ DynFlags: useStarIsType :: DynFlags -> Bool
+ DynamicLoading: initializePlugins :: HscEnv -> DynFlags -> IO DynFlags
+ ExtractDocs: extractDocs :: TcGblEnv -> (Maybe HsDocString, DeclDocMap, ArgDocMap)
+ FastString: LitString :: !Ptr Word8 -> !Int -> LitString
+ FastString: data LitString
+ FileCleanup: newTempDir :: DynFlags -> IO FilePath
+ Finder: [fr_unusables] :: FindResult -> [(UnitId, UnusablePackageReason)]
+ GHC: AnnVia :: AnnKeywordId
+ GHC: InteractiveName :: GetDocsFailure
+ GHC: NameHasNoModule :: Name -> GetDocsFailure
+ GHC: NoDocsInIface :: Module -> Bool -> GetDocsFailure
+ GHC: Opt_AbstractRefHoleFits :: GeneralFlag
+ GHC: Opt_AsmShortcutting :: GeneralFlag
+ GHC: Opt_ExternalDynamicRefs :: GeneralFlag
+ GHC: Opt_GhciLeakCheck :: GeneralFlag
+ GHC: Opt_HexWordLiterals :: GeneralFlag
+ GHC: Opt_LateSpecialise :: GeneralFlag
+ GHC: Opt_NoIt :: GeneralFlag
+ GHC: Opt_NumConstantFolding :: GeneralFlag
+ GHC: Opt_ShowMatchesOfHoleFits :: GeneralFlag
+ GHC: Opt_ShowProvOfHoleFits :: GeneralFlag
+ GHC: Opt_ShowTypeAppOfHoleFits :: GeneralFlag
+ GHC: Opt_ShowTypeAppVarsOfHoleFits :: GeneralFlag
+ GHC: Opt_ShowTypeOfHoleFits :: GeneralFlag
+ GHC: Opt_ShowValidHoleFits :: GeneralFlag
+ GHC: Opt_SingleLibFolder :: GeneralFlag
+ GHC: Opt_SortBySizeHoleFits :: GeneralFlag
+ GHC: Opt_SortBySubsumHoleFits :: GeneralFlag
+ GHC: Opt_SortValidHoleFits :: GeneralFlag
+ GHC: Opt_SuppressTimestamps :: GeneralFlag
+ GHC: Opt_UnclutterValidHoleFits :: GeneralFlag
+ GHC: [cmmProcAlignment] :: DynFlags -> Maybe Int
+ GHC: [inlineCheck] :: DynFlags -> Maybe String
+ GHC: [llvmPasses] :: DynFlags -> LlvmPasses
+ GHC: [maxRefHoleFits] :: DynFlags -> Maybe Int
+ GHC: [maxValidHoleFits] :: DynFlags -> Maybe Int
+ GHC: [mi_arg_docs] :: ModIface -> ArgDocMap
+ GHC: [mi_decl_docs] :: ModIface -> DeclDocMap
+ GHC: [mi_doc_hdr] :: ModIface -> Maybe HsDocString
+ GHC: [mi_plugin_hash] :: ModIface -> !Fingerprint
+ GHC: [plugins] :: DynFlags -> [LoadedPlugin]
+ GHC: [refLevelHoleFits] :: DynFlags -> Maybe Int
+ GHC: data GetDocsFailure
+ GHC: getDocs :: GhcMonad m => Name -> m (Either GetDocsFailure (Maybe HsDocString, Map Int HsDocString))
+ GhcPlugins: CoercionHole :: CoVar -> IORef (Maybe Coercion) -> CoercionHole
+ GhcPlugins: ForAllPred :: [TyVarBinder] -> [PredType] -> PredType -> PredTree
+ GhcPlugins: MCo :: Coercion -> MCoercion
+ GhcPlugins: MRefl :: MCoercion
+ GhcPlugins: PprPrec :: Int -> PprPrec
+ GhcPlugins: [ch_co_var] :: CoercionHole -> CoVar
+ GhcPlugins: [ch_ref] :: CoercionHole -> IORef (Maybe Coercion)
+ GhcPlugins: [tcm_tycon] :: TyCoMapper env m -> TyCon -> m TyCon
+ GhcPlugins: appPrec :: PprPrec
+ GhcPlugins: buildCoercion :: Type -> Type -> CoercionN
+ GhcPlugins: coHoleCoVar :: CoercionHole -> CoVar
+ GhcPlugins: data MCoercion
+ GhcPlugins: decomposePiCos :: HasDebugCallStack => CoercionN -> Pair Type -> [Type] -> ([CoercionN], CoercionN)
+ GhcPlugins: extendLiftingContextAndInScope :: LiftingContext -> TyVar -> Coercion -> LiftingContext
+ GhcPlugins: funPrec :: PprPrec
+ GhcPlugins: liftCoSubstVarBndrUsing :: (LiftingContext -> Type -> (Coercion, a)) -> LiftingContext -> TyVar -> (LiftingContext, TyVar, Coercion, a)
+ GhcPlugins: newtype PprPrec
+ GhcPlugins: nthCoRole :: Int -> Coercion -> Role
+ GhcPlugins: occCheckExpand :: [Var] -> Type -> Maybe Type
+ GhcPlugins: opPrec :: PprPrec
+ GhcPlugins: pprNameUnqualified :: Name -> SDoc
+ GhcPlugins: pprWithTYPE :: Type -> SDoc
+ GhcPlugins: setCoHoleCoVar :: CoercionHole -> CoVar -> CoercionHole
+ GhcPlugins: sigPrec :: PprPrec
+ GhcPlugins: substForAllCoBndrUsingLC :: Bool -> (Coercion -> Coercion) -> LiftingContext -> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion)
+ GhcPlugins: substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
+ GhcPlugins: tcIsConstraintKind :: Kind -> Bool
+ GhcPlugins: tcIsLiftedTypeKind :: Kind -> Bool
+ GhcPlugins: tcReturnsConstraintKind :: Kind -> Bool
+ GhcPlugins: topPrec :: PprPrec
+ GhcPlugins: tyBinderVar_maybe :: TyBinder -> Maybe TyVar
+ GhcPlugins: type KnotTied ty = ty
+ GhcPlugins: type MCoercionR = MCoercion
+ Hoopl.Block: type family IndexedCO ex a b :: *
+ Hoopl.Collections: data UniqueMap v
+ Hoopl.Collections: data UniqueSet
+ Hoopl.Collections: instance Data.Foldable.Foldable Hoopl.Collections.UniqueMap
+ Hoopl.Collections: instance Data.Traversable.Traversable Hoopl.Collections.UniqueMap
+ Hoopl.Collections: instance GHC.Base.Functor Hoopl.Collections.UniqueMap
+ Hoopl.Collections: instance GHC.Classes.Eq Hoopl.Collections.UniqueSet
+ Hoopl.Collections: instance GHC.Classes.Eq v => GHC.Classes.Eq (Hoopl.Collections.UniqueMap v)
+ Hoopl.Collections: instance GHC.Classes.Ord Hoopl.Collections.UniqueSet
+ Hoopl.Collections: instance GHC.Classes.Ord v => GHC.Classes.Ord (Hoopl.Collections.UniqueMap v)
+ Hoopl.Collections: instance GHC.Show.Show Hoopl.Collections.UniqueSet
+ Hoopl.Collections: instance GHC.Show.Show v => GHC.Show.Show (Hoopl.Collections.UniqueMap v)
+ Hoopl.Collections: instance Hoopl.Collections.IsMap Hoopl.Collections.UniqueMap
+ Hoopl.Collections: instance Hoopl.Collections.IsSet Hoopl.Collections.UniqueSet
+ Hoopl.Collections: mapAlter :: IsMap map => (Maybe a -> Maybe a) -> KeyOf map -> map a -> map a
+ Hoopl.Collections: mapFoldl :: IsMap map => (b -> a -> b) -> b -> map a -> b
+ Hoopl.Collections: mapFoldlWithKey :: IsMap map => (b -> KeyOf map -> a -> b) -> b -> map a -> b
+ Hoopl.Collections: mapFoldr :: IsMap map => (a -> b -> b) -> b -> map a -> b
+ Hoopl.Collections: setFoldl :: IsSet set => (b -> ElemOf set -> b) -> b -> set -> b
+ Hoopl.Collections: setFoldr :: IsSet set => (ElemOf set -> b -> b) -> b -> set -> b
+ Hoopl.Dataflow: joinFacts :: DataflowLattice f -> [f] -> f
+ Hoopl.Dataflow: type family Fact x f :: *
+ Hoopl.Graph: revPostorderFrom :: forall block. NonLocal block => LabelMap (block C C) -> Label -> [block C C]
+ Hoopl.Label: instance TrieMap.TrieMap Hoopl.Label.LabelMap
+ Hoopl.Label: mkHooplLabel :: Int -> Label
+ HsBinds: NPatBindTc :: NameSet -> Type -> NPatBindTc
+ HsBinds: NValBinds :: [(RecFlag, LHsBinds idL)] -> [LSig GhcRn] -> NHsValBindsLR idL
+ HsBinds: ValBinds :: XValBinds idL idR -> LHsBindsLR idL idR -> [LSig idR] -> HsValBindsLR 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: [abs_ext] :: HsBindLR idL idR -> XAbsBinds idL idR
+ HsBinds: [fun_ext] :: HsBindLR idL idR -> XFunBind idL idR
+ HsBinds: [pat_ext] :: HsBindLR idL idR -> XPatBind idL idR
+ HsBinds: [pat_fvs] :: NPatBindTc -> NameSet
+ HsBinds: [psb_ext] :: PatSynBind idL idR -> XPSB idL idR
+ HsBinds: [var_ext] :: HsBindLR idL idR -> XVarBind idL idR
+ HsBinds: data NHsValBindsLR idL
+ HsBinds: data NPatBindTc
+ HsBinds: instance (idL Data.Type.Equality.~ HsExtension.GhcPass pl, idR Data.Type.Equality.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsBindLR idL idR)
+ HsBinds: instance (idL Data.Type.Equality.~ HsExtension.GhcPass pl, idR Data.Type.Equality.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsLocalBindsLR idL idR)
+ HsBinds: instance (idL Data.Type.Equality.~ HsExtension.GhcPass pl, idR Data.Type.Equality.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR) => Outputable.Outputable (HsBinds.HsValBindsLR idL idR)
+ HsBinds: instance (idR Data.Type.Equality.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR, Outputable.Outputable (HsExtension.XXPatSynBind idL idR)) => Outputable.Outputable (HsBinds.PatSynBind idL idR)
+ HsBinds: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.ABExport p)
+ HsBinds: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.FixitySig p)
+ HsBinds: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.HsIPBinds p)
+ HsBinds: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.IPBind p)
+ HsBinds: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsBinds.Sig p)
+ HsBinds: instance Data.Data.Data HsBinds.NPatBindTc
+ HsBinds: isEmptyIPBindsPR :: HsIPBinds (GhcPass p) -> Bool
+ HsBinds: isEmptyIPBindsTc :: HsIPBinds GhcTc -> Bool
+ HsBinds: isEmptyLocalBindsPR :: HsLocalBindsLR (GhcPass a) (GhcPass b) -> Bool
+ HsBinds: isEmptyLocalBindsTc :: HsLocalBindsLR (GhcPass a) GhcTc -> Bool
+ HsDecls: AnyclassStrategy :: DerivStrategy pass
+ HsDecls: DataDeclRn :: Bool -> NameSet -> DataDeclRn
+ HsDecls: HsRuleRn :: NameSet -> NameSet -> HsRuleRn
+ HsDecls: NewtypeStrategy :: DerivStrategy pass
+ HsDecls: StockStrategy :: DerivStrategy pass
+ HsDecls: ViaStrategy :: XViaStrategy pass -> DerivStrategy 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_d_ext] :: InstDecl pass -> XClsInstD pass
+ HsDecls: [cid_ext] :: ClsInstDecl pass -> XCClsInstDecl pass
+ HsDecls: [con_args] :: ConDecl pass -> HsConDeclDetails pass
+ 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_res_ty] :: ConDecl pass -> LHsType pass
+ HsDecls: [dd_ext] :: HsDataDefn pass -> XCHsDataDefn pass
+ HsDecls: [deriv_clause_ext] :: HsDerivingClause pass -> XCHsDerivingClause pass
+ HsDecls: [deriv_ext] :: DerivDecl pass -> XCDerivDecl pass
+ HsDecls: [dfid_ext] :: InstDecl pass -> XDataFamInstD pass
+ HsDecls: [fdExt] :: FamilyDecl pass -> XCFamilyDecl pass
+ HsDecls: [fd_e_ext] :: ForeignDecl pass -> XForeignExport pass
+ HsDecls: [fd_i_ext] :: ForeignDecl pass -> XForeignImport pass
+ HsDecls: [feqn_ext] :: FamEqn pass pats rhs -> XCFamEqn pass pats rhs
+ HsDecls: [group_ext] :: TyClGroup pass -> XCTyClGroup pass
+ HsDecls: [hs_ext] :: HsGroup p -> XCHsGroup p
+ HsDecls: [rds_ext] :: RuleDecls pass -> XCRuleDecls pass
+ HsDecls: [tcdCExt] :: TyClDecl pass -> XClassDecl pass
+ HsDecls: [tcdDExt] :: TyClDecl pass -> XDataDecl pass
+ HsDecls: [tcdFExt] :: TyClDecl pass -> XFamDecl pass
+ HsDecls: [tcdSExt] :: TyClDecl pass -> XSynDecl pass
+ HsDecls: [tfid_ext] :: InstDecl pass -> XTyFamInstD pass
+ HsDecls: [wd_ext] :: WarnDecls pass -> XWarnings pass
+ HsDecls: data DataDeclRn
+ HsDecls: data DerivStrategy pass
+ HsDecls: data HsRuleRn
+ HsDecls: derivStrategyName :: DerivStrategy a -> SDoc
+ HsDecls: getConArgs :: ConDecl pass -> HsConDeclDetails pass
+ HsDecls: hsConDeclTheta :: Maybe (LHsContext pass) -> [LHsType pass]
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.AnnDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.ClsInstDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.ConDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DataFamInstDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DefaultDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DerivDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.DerivStrategy p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.FamilyDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.ForeignDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsDataDefn p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsDerivingClause p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.HsGroup p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.InstDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.RuleBndr p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.RuleDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.RuleDecls p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.SpliceDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.TyClDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.TyClGroup p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsDecls.TyFamInstDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, Outputable.OutputableBndr (HsExtension.IdP p)) => Outputable.Outputable (HsDecls.RoleAnnotDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, Outputable.OutputableBndr (HsExtension.IdP p)) => Outputable.Outputable (HsDecls.WarnDecl p)
+ HsDecls: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, Outputable.OutputableBndr (HsExtension.IdP p)) => Outputable.Outputable (HsDecls.WarnDecls p)
+ HsDecls: instance Data.Data.Data HsDecls.DataDeclRn
+ HsDecls: instance Data.Data.Data HsDecls.HsRuleRn
+ HsDecls: newOrDataToFlavour :: NewOrData -> TyConFlavour
+ HsDecls: type LDerivStrategy pass = Located (DerivStrategy 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 Outputable.Outputable HsDoc.ArgDocMap
+ HsDoc: instance Outputable.Outputable HsDoc.DeclDocMap
+ HsDoc: mkHsDocString :: String -> HsDocString
+ HsDoc: mkHsDocStringUtf8ByteString :: ByteString -> HsDocString
+ HsDoc: newtype ArgDocMap
+ HsDoc: newtype DeclDocMap
+ HsDoc: unpackHDS :: HsDocString -> String
+ HsExpr: CmdTopTc :: Type -> Type -> CmdSyntaxTable GhcTc -> CmdTopTc
+ HsExpr: MatchGroupTc :: [Type] -> Type -> MatchGroupTc
+ HsExpr: PatBindGuards :: HsMatchContext id
+ HsExpr: RecStmtTc :: Type -> [PostTcExpr] -> [PostTcExpr] -> Type -> RecStmtTc
+ HsExpr: RecordConTc :: ConLike -> PostTcExpr -> RecordConTc
+ HsExpr: RecordUpdTc :: [ConLike] -> [Type] -> [Type] -> HsWrapper -> RecordUpdTc
+ 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: [m_ext] :: Match p body -> XCMatch p body
+ HsExpr: [mg_ext] :: MatchGroup p body -> XMG p body
+ HsExpr: [rcon_ext] :: HsExpr p -> XRecordCon p
+ HsExpr: [recS_ext] :: StmtLR idL idR body -> XRecStmt idL idR body
+ HsExpr: [rupd_ext] :: HsExpr p -> XRecordUpd p
+ HsExpr: [trS_ext] :: StmtLR idL idR body -> XTransStmt idL idR body
+ HsExpr: data CmdTopTc
+ HsExpr: data MatchGroupTc
+ HsExpr: data RecStmtTc
+ HsExpr: data RecordConTc
+ HsExpr: data RecordUpdTc
+ 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 (idL Data.Type.Equality.~ HsExtension.GhcPass pl, idR Data.Type.Equality.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idL, HsExtension.OutputableBndrId idR, Outputable.Outputable body) => Outputable.Outputable (HsExpr.StmtLR idL idR body)
+ HsExpr: instance (idR Data.Type.Equality.~ HsExtension.GhcPass pr, HsExtension.OutputableBndrId idR, Outputable.Outputable body) => Outputable.Outputable (HsExpr.Match idR body)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.ArithSeqInfo p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsBracket p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsCmd p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsCmdTop p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsExpr p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsSplice p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.HsSplicedThing p)
+ HsExpr: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsExpr.SyntaxExpr p)
+ HsExpr: instance Data.Data.Data HsExpr.MatchGroupTc
+ HsExpr: instance Data.Data.Data HsExpr.RecordUpdTc
+ HsExpr: parenthesizeHsExpr :: PprPrec -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p)
+ HsExtension: NoExt :: NoExt
+ HsExtension: data NoExt
+ HsExtension: instance Data.Data.Data HsExtension.NoExt
+ HsExtension: instance GHC.Classes.Eq HsExtension.NoExt
+ HsExtension: instance GHC.Classes.Ord HsExtension.NoExt
+ HsExtension: instance Outputable.Outputable HsExtension.NoExt
+ HsExtension: noExt :: NoExt
+ 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 (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 LIdP p = Located (IdP p)
+ HsExtension: type OutputableX p = (Outputable (XSigPat p), Outputable (XSigPat GhcRn), Outputable (XIPBinds p), Outputable (XExprWithTySig p), Outputable (XExprWithTySig GhcRn), Outputable (XAppTypeE p), Outputable (XAppTypeE GhcRn), Outputable (XViaStrategy p), Outputable (XViaStrategy GhcRn))
+ HsExtension: type family XXIE x
+ HsImpExp: XIE :: XXIE pass -> IE pass
+ HsImpExp: XImportDecl :: XXImportDecl pass -> ImportDecl pass
+ HsImpExp: [ideclExt] :: ImportDecl pass -> XCImportDecl pass
+ HsImpExp: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsImpExp.IE p)
+ HsImpExp: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsImpExp.ImportDecl p)
+ 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.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: OverLitTc :: Bool -> Type -> OverLitTc
+ HsLit: XLit :: XXLit x -> HsLit x
+ HsLit: XOverLit :: XXOverLit p -> HsOverLit p
+ HsLit: [ol_ext] :: HsOverLit p -> XOverLit p
+ HsLit: data OverLitTc
+ HsLit: hsLitNeedsParens :: PprPrec -> HsLit x -> Bool
+ HsLit: hsOverLitNeedsParens :: PprPrec -> HsOverLit x -> Bool
+ HsLit: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass) => Outputable.Outputable (HsLit.HsLit p)
+ HsLit: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsLit.HsOverLit p)
+ HsLit: instance Data.Data.Data HsLit.OverLitTc
+ HsLit: instance GHC.Classes.Eq (HsExtension.XXOverLit p) => GHC.Classes.Eq (HsLit.HsOverLit p)
+ HsLit: instance GHC.Classes.Ord (HsExtension.XXOverLit p) => GHC.Classes.Ord (HsLit.HsOverLit p)
+ HsPat: ListPatTc :: Type -> Maybe (Type, SyntaxExpr GhcTc) -> ListPatTc
+ HsPat: SigPat :: XSigPat p -> LPat p -> Pat p
+ HsPat: XPat :: XXPat p -> Pat p
+ HsPat: collectEvVarsPat :: Pat GhcTc -> Bag EvVar
+ HsPat: data ListPatTc
+ HsPat: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsPat.Pat p)
+ HsPat: parenthesizePat :: PprPrec -> LPat (GhcPass p) -> LPat (GhcPass p)
+ HsPat: patNeedsParens :: PprPrec -> Pat p -> Bool
+ HsSyn: instance (p Data.Type.Equality.~ 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: HsIBRn :: [Name] -> Bool -> HsIBRn
+ HsTypes: HsQTvsRn :: [Name] -> NameSet -> HsQTvsRn
+ HsTypes: HsStarTy :: XStarTy pass -> Bool -> HsType pass
+ HsTypes: NHsCoreTy :: Type -> NewHsTypeX
+ 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_ext] :: ConDeclField pass -> XConDeclField pass
+ HsTypes: [extFieldOcc] :: FieldOcc pass -> XCFieldOcc pass
+ HsTypes: [hsib_ext] :: HsImplicitBndrs pass thing -> XHsIB pass thing
+ HsTypes: [hsq_ext] :: LHsQTyVars pass -> XHsQTvs pass
+ HsTypes: [hst_xforall] :: HsType pass -> XForAllTy pass
+ HsTypes: [hst_xqual] :: HsType pass -> XQualTy pass
+ HsTypes: [hswc_ext] :: HsWildCardBndrs pass thing -> XHsWC pass thing
+ HsTypes: data HsIBRn
+ HsTypes: data HsQTvsRn
+ HsTypes: data NewHsTypeX
+ HsTypes: hsTypeNeedsParens :: PprPrec -> HsType pass -> Bool
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass) => Outputable.Outputable (HsTypes.AmbiguousFieldOcc p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass) => Outputable.OutputableBndr (HsTypes.AmbiguousFieldOcc p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, GHC.Classes.Eq (HsExtension.XCFieldOcc p)) => GHC.Classes.Eq (HsTypes.FieldOcc p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, GHC.Classes.Ord (HsExtension.XCFieldOcc p)) => GHC.Classes.Ord (HsTypes.FieldOcc p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.ConDeclField p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.HsTyVarBndr p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.HsType p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, HsExtension.OutputableBndrId p) => Outputable.Outputable (HsTypes.LHsQTyVars p)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, Outputable.Outputable thing) => Outputable.Outputable (HsTypes.HsImplicitBndrs p thing)
+ HsTypes: instance (p Data.Type.Equality.~ HsExtension.GhcPass pass, Outputable.Outputable thing) => Outputable.Outputable (HsTypes.HsWildCardBndrs p thing)
+ HsTypes: instance Data.Data.Data HsTypes.HsIBRn
+ HsTypes: instance Data.Data.Data HsTypes.HsQTvsRn
+ HsTypes: instance Data.Data.Data HsTypes.HsWildCardInfo
+ HsTypes: instance Data.Data.Data HsTypes.NewHsTypeX
+ HsTypes: instance Outputable.Outputable HsTypes.HsWildCardInfo
+ HsTypes: instance Outputable.Outputable HsTypes.NewHsTypeX
+ HsTypes: isLHsForAllTy :: LHsType p -> Bool
+ HsTypes: parenthesizeHsType :: PprPrec -> LHsType (GhcPass p) -> LHsType (GhcPass p)
+ HsTypes: pprAnonWildCard :: SDoc
+ HsUtils: unitRecStmtTc :: RecStmtTc
+ HscTypes: RawObject :: ForeignSrcLang
+ HscTypes: [dep_plgins] :: Dependencies -> [ModuleName]
+ HscTypes: [fr_unusables] :: FindResult -> [(UnitId, UnusablePackageReason)]
+ HscTypes: [mg_arg_docs] :: ModGuts -> !ArgDocMap
+ HscTypes: [mg_decl_docs] :: ModGuts -> !DeclDocMap
+ HscTypes: [mg_doc_hdr] :: ModGuts -> !Maybe HsDocString
+ HscTypes: [mi_arg_docs] :: ModIface -> ArgDocMap
+ HscTypes: [mi_decl_docs] :: ModIface -> DeclDocMap
+ HscTypes: [mi_doc_hdr] :: ModIface -> Maybe HsDocString
+ HscTypes: [mi_plugin_hash] :: ModIface -> !Fingerprint
+ HscTypes: instance GHC.Exception.Type.Exception HscTypes.GhcApiError
+ HscTypes: instance GHC.Exception.Type.Exception HscTypes.SourceError
+ HscTypes: updNameCache :: HscEnv -> (NameCache -> (NameCache, c)) -> IO c
+ IOEnv: instance GHC.Exception.Type.Exception IOEnv.IOEnvFailure
+ IdInfo: zapUnfolding :: Unfolding -> Unfolding
+ IfaceEnv: lookupOrigIO :: HscEnv -> Module -> OccName -> IO Name
+ IfaceEnv: updNameCacheTc :: Module -> OccName -> (NameCache -> (NameCache, c)) -> TcRnIf a b c
+ Inst: tcInstTyBinder :: Maybe (VarEnv Kind) -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)
+ Inst: tcInstTyBinders :: TCvSubst -> Maybe (VarEnv Kind) -> [TyBinder] -> TcM (TCvSubst, [TcType])
+ InstEnv: deleteDFunFromInstEnv :: InstEnv -> DFunId -> InstEnv
+ InteractiveEval: InteractiveName :: GetDocsFailure
+ InteractiveEval: NameHasNoModule :: Name -> GetDocsFailure
+ InteractiveEval: NoDocsInIface :: Module -> Bool -> GetDocsFailure
+ InteractiveEval: [valRaw] :: Term -> [Word]
+ InteractiveEval: data GetDocsFailure
+ InteractiveEval: getDocs :: GhcMonad m => Name -> m (Either GetDocsFailure (Maybe HsDocString, Map Int HsDocString))
+ InteractiveEval: instance Outputable.Outputable InteractiveEval.GetDocsFailure
+ Lexer: ITstar :: IsUnicodeSyntax -> Token
+ Lexer: ITvia :: Token
+ Lexer: starIsTypeEnabled :: ExtsBitmap -> Bool
+ ListSetOps: deleteBys :: (a -> a -> Bool) -> [a] -> [a] -> [a]
+ Literal: LitNumInt :: LitNumType
+ Literal: LitNumInt64 :: LitNumType
+ Literal: LitNumInteger :: LitNumType
+ Literal: LitNumNatural :: LitNumType
+ Literal: LitNumWord :: LitNumType
+ Literal: LitNumWord64 :: LitNumType
+ Literal: LitNumber :: !LitNumType -> !Integer -> Type -> Literal
+ Literal: data LitNumType
+ Literal: instance Binary.Binary Literal.LitNumType
+ Literal: instance Data.Data.Data Literal.LitNumType
+ Literal: instance GHC.Classes.Eq Literal.LitNumType
+ Literal: instance GHC.Classes.Ord Literal.LitNumType
+ Literal: instance GHC.Enum.Enum Literal.LitNumType
+ Literal: litNumCheckRange :: DynFlags -> LitNumType -> Integer -> Bool
+ Literal: litNumIsSigned :: LitNumType -> Bool
+ Literal: mkLitNatural :: Integer -> Type -> Literal
+ Literal: mkLitNumber :: DynFlags -> LitNumType -> Integer -> Type -> Literal
+ Literal: mkLitNumberWrap :: DynFlags -> LitNumType -> Integer -> Type -> Literal
+ Literal: mkMachIntWrapC :: DynFlags -> Integer -> (Literal, Bool)
+ Literal: mkMachWordWrapC :: DynFlags -> Integer -> (Literal, Bool)
+ Literal: narrowLit :: forall a. Integral a => Proxy a -> Literal -> Literal
+ Llvm: LMTrunc :: LlvmStatic -> LlvmType -> LlvmStatic
+ Llvm.Types: LMTrunc :: LlvmStatic -> LlvmType -> LlvmStatic
+ LoadIface: loadWiredInHomeIface :: Name -> IfM lcl ()
+ LoadIface: needWiredInHomeIface :: TyThing -> Bool
+ Match: matchSinglePatVar :: Id -> HsMatchContext Name -> LPat GhcTc -> Type -> MatchResult -> DsM MatchResult
+ MkIface: instance GHC.Base.Monoid MkIface.RecompileRequired
+ MkIface: instance GHC.Base.Semigroup MkIface.RecompileRequired
+ Name: pprNameUnqualified :: Name -> SDoc
+ Outputable: instance Outputable.Outputable a => Outputable.Outputable (GHC.Maybe.Maybe a)
+ Outputable: kindType :: SDoc
+ Outputable: pprTraceM :: Applicative f => String -> SDoc -> f ()
+ Outputable: updSDocDynFlags :: (DynFlags -> DynFlags) -> SDoc -> SDoc
+ Outputable: word :: Integer -> SDoc
+ Packages: BrokenDependencies :: [InstalledUnitId] -> UnusablePackageReason
+ Packages: CyclicDependencies :: [InstalledUnitId] -> UnusablePackageReason
+ Packages: IgnoredDependencies :: [InstalledUnitId] -> UnusablePackageReason
+ Packages: IgnoredWithFlag :: UnusablePackageReason
+ Packages: LookupUnusable :: [(Module, ModuleOrigin)] -> LookupResult
+ Packages: ModUnusable :: UnusablePackageReason -> ModuleOrigin
+ Packages: ShadowedDependencies :: [InstalledUnitId] -> UnusablePackageReason
+ Packages: data UnusablePackageReason
+ Packages: getLibs :: DynFlags -> [PreloadUnitId] -> IO [(String, String)]
+ Packages: pprReason :: SDoc -> UnusablePackageReason -> SDoc
+ Panic: instance GHC.Exception.Type.Exception Panic.GhcException
+ PlaceHolder: type family NameOrRdrName id
+ Platform: OSHurd :: OS
+ Plugins: ForceRecompile :: PluginRecompile
+ Plugins: LoadedPlugin :: Plugin -> ModIface -> [CommandLineOption] -> LoadedPlugin
+ Plugins: MaybeRecompile :: Fingerprint -> PluginRecompile
+ Plugins: NoForceRecompile :: PluginRecompile
+ Plugins: [interfaceLoadAction] :: Plugin -> forall lcl. [CommandLineOption] -> ModIface -> IfM lcl ModIface
+ Plugins: [lpArguments] :: LoadedPlugin -> [CommandLineOption]
+ Plugins: [lpModule] :: LoadedPlugin -> ModIface
+ Plugins: [lpPlugin] :: LoadedPlugin -> Plugin
+ Plugins: [parsedResultAction] :: Plugin -> [CommandLineOption] -> ModSummary -> HsParsedModule -> Hsc HsParsedModule
+ Plugins: [pluginRecompile] :: Plugin -> [CommandLineOption] -> IO PluginRecompile
+ Plugins: [renamedResultAction] :: Plugin -> [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
+ Plugins: [spliceRunAction] :: Plugin -> [CommandLineOption] -> LHsExpr GhcTc -> TcM (LHsExpr GhcTc)
+ Plugins: [typeCheckResultAction] :: Plugin -> [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv
+ Plugins: data LoadedPlugin
+ Plugins: data PluginRecompile
+ Plugins: flagRecompile :: [CommandLineOption] -> IO PluginRecompile
+ Plugins: impurePlugin :: [CommandLineOption] -> IO PluginRecompile
+ Plugins: instance GHC.Base.Monoid Plugins.PluginRecompile
+ Plugins: instance GHC.Base.Semigroup Plugins.PluginRecompile
+ Plugins: instance Outputable.Outputable Plugins.PluginRecompile
+ Plugins: keepRenamedSource :: [CommandLineOption] -> TcGblEnv -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)
+ Plugins: lpModuleName :: LoadedPlugin -> ModuleName
+ Plugins: purePlugin :: [CommandLineOption] -> IO PluginRecompile
+ Plugins: withPlugins :: Monad m => DynFlags -> PluginOperation m a -> a -> m a
+ Plugins: withPlugins_ :: Monad m => DynFlags -> ConstPluginOperation m a -> a -> m ()
+ PrelNames: dollarName :: Name
+ PrelNames: gHC_MAYBE :: Module
+ PrelNames: minusNaturalIdKey :: Unique
+ PrelNames: minusNaturalName :: Name
+ PrelNames: mkNaturalIdKey :: Unique
+ PrelNames: mkNaturalName :: Name
+ PrelNames: naturalSDataConKey :: Unique
+ PrelNames: naturalSDataConName :: Name
+ PrelNames: naturalToIntegerIdKey :: Unique
+ PrelNames: naturalToIntegerName :: Name
+ PrelNames: plusNaturalIdKey :: Unique
+ PrelNames: plusNaturalName :: Name
+ PrelNames: runRWName :: Name
+ PrelNames: timesNaturalIdKey :: Unique
+ PrelNames: timesNaturalName :: Name
+ PrelNames: unliftedRepDataConKeys :: [Unique]
+ PrelNames: unliftedSimpleRepDataConKeys :: [Unique]
+ PrelNames: wordToNaturalIdKey :: Unique
+ PrelNames: wordToNaturalName :: Name
+ Pretty: RStr :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Char -> TextDetails
+ Pretty: hex :: Integer -> Doc
+ Pretty: txtPrinter :: TextDetails -> String -> String
+ PrimOp: GetThreadAllocationCounter :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsAddr :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsChar :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsDouble :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsFloat :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsInt :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsInt16 :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsInt32 :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsInt64 :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsStablePtr :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsWideChar :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsWord :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsWord16 :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsWord32 :: PrimOp
+ PrimOp: IndexByteArrayOp_Word8AsWord64 :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsAddr :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsChar :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsDouble :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsFloat :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsInt :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsInt16 :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsInt32 :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsInt64 :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsStablePtr :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsWideChar :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsWord :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsWord16 :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsWord32 :: PrimOp
+ PrimOp: ReadByteArrayOp_Word8AsWord64 :: PrimOp
+ PrimOp: SetThreadAllocationCounter :: PrimOp
+ PrimOp: WordAddCOp :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsAddr :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsChar :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsDouble :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsFloat :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsInt :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsInt16 :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsInt32 :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsInt64 :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsStablePtr :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsWideChar :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsWord :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsWord16 :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsWord32 :: PrimOp
+ PrimOp: WriteByteArrayOp_Word8AsWord64 :: PrimOp
+ RdrHsSyn: TyElOpd :: HsType GhcPs -> TyEl
+ RdrHsSyn: TyElOpr :: RdrName -> TyEl
+ RdrHsSyn: checkBlockArguments :: LHsExpr GhcPs -> P ()
+ RdrHsSyn: checkEmptyGADTs :: Located ([AddAnn], [LConDecl GhcPs]) -> P (Located ([AddAnn], [LConDecl GhcPs]))
+ RdrHsSyn: checkInfixConstr :: LHsType GhcPs -> P (LHsType GhcPs, Maybe LHsDocString)
+ RdrHsSyn: data TyEl
+ RdrHsSyn: failOpFewArgs :: Located RdrName -> P a
+ RdrHsSyn: hintBangPat :: SrcSpan -> HsExpr GhcPs -> P ()
+ RdrHsSyn: mergeOps :: [Located TyEl] -> P (LHsType GhcPs)
+ RdrHsSyn: warnStarIsType :: SrcSpan -> P ()
+ RdrName: lookupGRE_Name_OccName :: GlobalRdrEnv -> Name -> OccName -> Maybe GlobalRdrElt
+ RdrName: starInfo :: Bool -> RdrName -> SDoc
+ RnNames: findImportUsage :: [LImportDecl GhcRn] -> [GlobalRdrElt] -> [ImportDeclUsage]
+ RnNames: getMinimalImports :: [ImportDeclUsage] -> RnM [LImportDecl GhcRn]
+ RnNames: printMinimalImports :: [ImportDeclUsage] -> RnM ()
+ RnNames: type ImportDeclUsage = (LImportDecl GhcRn, [AvailInfo], [Name])
+ RnTypes: bindLHsTyVarBndrs :: HsDocContext -> Maybe SDoc -> Maybe a -> [LHsTyVarBndr GhcPs] -> ([LHsTyVarBndr GhcRn] -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
+ RnTypes: extractHsTvBndrs :: [LHsTyVarBndr GhcPs] -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups
+ RnTypes: rnImplicitBndrs :: Bool -> FreeKiTyVarsWithDups -> ([Name] -> RnM (a, FreeVars)) -> RnM (a, FreeVars)
+ RtClosureInspect: [valRaw] :: Term -> [Word]
+ RtClosureInspect: constrClosToName :: HscEnv -> Closure -> IO (Either String Name)
+ SimplUtils: isExitJoinId :: Var -> Bool
+ StgCmmMonad: forkAltPair :: FCode a -> FCode a -> FCode (a, a)
+ StgSyn: stgCaseBndrInScope :: AltType -> Bool -> Bool
+ SysTools: initLlvmConfig :: Maybe String -> IO LlvmConfig
+ SysTools.BaseDir: expandToolDir :: Maybe FilePath -> String -> String
+ SysTools.BaseDir: findToolDir :: FilePath -> IO (Maybe FilePath)
+ THNames: anyclassStrategyIdKey :: Unique
+ THNames: anyclassStrategyName :: Name
+ THNames: derivStrategyQTyConKey :: Unique
+ THNames: derivStrategyQTyConName :: Name
+ THNames: newtypeStrategyIdKey :: Unique
+ THNames: newtypeStrategyName :: Name
+ THNames: stockStrategyIdKey :: Unique
+ THNames: stockStrategyName :: Name
+ THNames: viaStrategyIdKey :: Unique
+ THNames: viaStrategyName :: Name
+ TcBinds: tcValBinds :: TopLevelFlag -> [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM thing -> TcM ([(RecFlag, LHsBinds GhcTcId)], thing)
+ TcDerivUtils: CanDeriveAnyClass :: OriginativeDerivStatus
+ TcDerivUtils: CanDeriveStock :: (SrcSpan -> TyCon -> [Type] -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name])) -> OriginativeDerivStatus
+ TcDerivUtils: DerivSpecVia :: Type -> DerivSpecMechanism
+ TcDerivUtils: InferContext :: Maybe SrcSpan -> DerivContext
+ TcDerivUtils: StockClassError :: SDoc -> OriginativeDerivStatus
+ TcDerivUtils: SupplyContext :: ThetaType -> DerivContext
+ TcDerivUtils: [denv_ctxt] :: DerivEnv -> DerivContext
+ TcDerivUtils: [ds_standalone_wildcard] :: DerivSpec theta -> Maybe SrcSpan
+ TcDerivUtils: checkOriginativeSideConditions :: DynFlags -> DerivContext -> Class -> [TcType] -> TyCon -> TyCon -> OriginativeDerivStatus
+ TcDerivUtils: data DerivContext
+ TcDerivUtils: data OriginativeDerivStatus
+ TcDerivUtils: derivSpecMechanismToStrategy :: DerivSpecMechanism -> DerivStrategy GhcTc
+ TcDerivUtils: instance Outputable.Outputable TcDerivUtils.DerivContext
+ TcDerivUtils: isDerivSpecVia :: DerivSpecMechanism -> Bool
+ TcDerivUtils: isStandaloneDeriv :: DerivM Bool
+ TcDerivUtils: isStandaloneWildcardDeriv :: DerivM Bool
+ TcDerivUtils: mkDerivOrigin :: Bool -> CtOrigin
+ TcEnv: instance HsExtension.OutputableBndrId (HsExtension.GhcPass a) => Outputable.Outputable (TcEnv.InstInfo (HsExtension.GhcPass a))
+ TcEnv: ioLookupDataCon :: HscEnv -> Name -> IO DataCon
+ TcEnv: tcExtendNameTyVarEnv :: [(Name, TcTyVar)] -> TcM r -> TcM r
+ TcEnv: tcLookupGlobalOnly :: Name -> TcM TyThing
+ TcEvTerm: evCallStack :: (MonadThings m, HasModule m, HasDynFlags m) => EvCallStack -> m EvExpr
+ TcEvTerm: evDelayedError :: Type -> FastString -> EvTerm
+ TcEvidence: EvExpr :: EvExpr -> EvTerm
+ TcEvidence: EvFun :: [TyVar] -> [EvVar] -> TcEvBinds -> EvVar -> EvTerm
+ TcEvidence: NoEvBindsVar :: Unique -> IORef CoVarSet -> EvBindsVar
+ TcEvidence: [et_binds] :: EvTerm -> TcEvBinds
+ TcEvidence: [et_body] :: EvTerm -> EvVar
+ TcEvidence: [et_given] :: EvTerm -> [EvVar]
+ TcEvidence: [et_tvs] :: EvTerm -> [TyVar]
+ TcEvidence: evCast :: EvExpr -> TcCoercion -> EvTerm
+ TcEvidence: evCoercion :: TcCoercion -> EvTerm
+ TcEvidence: evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvTerm
+ TcEvidence: evId :: EvId -> EvExpr
+ TcEvidence: evSelector :: Id -> [Type] -> [EvExpr] -> EvExpr
+ TcEvidence: evTermCoercion_maybe :: EvTerm -> Maybe TcCoercion
+ TcEvidence: evTypeable :: Type -> EvTypeable -> EvTerm
+ TcEvidence: findNeededEvVars :: EvBindMap -> VarSet -> VarSet
+ TcEvidence: isNoEvBindsVar :: EvBindsVar -> Bool
+ TcEvidence: type EvExpr = CoreExpr
+ TcExpr: infixr 0 `SynFun`
+ TcExpr: instance (Outputable.Outputable tm, Outputable.Outputable ty) => Outputable.Outputable (TcExpr.HsArg tm ty)
+ TcFlatten: flattenArgsNom :: CtEvidence -> TyCon -> [TcType] -> TcS ([Xi], [TcCoercion], TcCoercionN)
+ TcFlatten: flattenKind :: CtLoc -> CtFlavour -> TcType -> TcS (Xi, TcCoercionN)
+ TcHoleErrors: findValidHoleFits :: TidyEnv -> [Implication] -> [Ct] -> Ct -> TcM (TidyEnv, SDoc)
+ TcHoleErrors: instance (OccName.HasOccName a, OccName.HasOccName b) => OccName.HasOccName (Data.Either.Either a b)
+ TcHoleErrors: instance GHC.Classes.Eq TcHoleErrors.HoleFit
+ TcHoleErrors: instance GHC.Classes.Eq TcHoleErrors.SortingAlg
+ TcHoleErrors: instance GHC.Classes.Ord TcHoleErrors.HoleFit
+ TcHoleErrors: instance GHC.Classes.Ord TcHoleErrors.SortingAlg
+ TcHoleErrors: instance OccName.HasOccName RdrName.GlobalRdrElt
+ TcHoleErrors: instance Outputable.Outputable TcHoleErrors.HoleFit
+ TcHsSyn: zonkTcMethInfoToMethInfo :: TcMethInfo -> TcM MethInfo
+ TcHsType: DataKindCtxt :: Name -> UserTypeCtxt
+ TcHsType: KindSigCtxt :: UserTypeCtxt
+ TcHsType: TyFamResKindCtxt :: Name -> UserTypeCtxt
+ TcHsType: TySynKindCtxt :: Name -> UserTypeCtxt
+ TcHsType: TyVarBndrKindCtxt :: Name -> UserTypeCtxt
+ TcHsType: kcExplicitTKBndrs :: [LHsTyVarBndr GhcRn] -> TcM a -> TcM a
+ TcHsType: kcImplicitTKBndrs :: [Name] -> TcM a -> TcM ([TcTyVar], a)
+ TcHsType: scopeTyVars :: SkolemInfo -> [TcTyVar] -> TcM a -> TcM a
+ TcHsType: scopeTyVars2 :: SkolemInfo -> [(Name, TcTyVar)] -> TcM a -> TcM a
+ TcHsType: tcDerivStrategy :: forall a. UserTypeCtxt -> Maybe (DerivStrategy GhcRn) -> TcM ([TyVar], a) -> TcM (Maybe (DerivStrategy GhcTc), [TyVar], a)
+ TcHsType: tcHsMbContext :: Maybe (LHsContext GhcRn) -> TcM [PredType]
+ TcHsType: tcImplicitQTKBndrs :: SkolemInfo -> [Name] -> TcM a -> TcM ([TcTyVar], a)
+ TcHsType: zonkPromoteType :: TcType -> TcM TcType
+ TcMType: cloneSimple :: Ct -> TcM Ct
+ TcMType: instSkolTyCoVarsX :: TcTyCoVarMaker gbl lcl -> TCvSubst -> [TyCoVar] -> TcRnIf gbl lcl (TCvSubst, [TyCoVar])
+ TcMType: newNoTcEvBinds :: TcM EvBindsVar
+ TcMType: newSkolemTyVar :: Name -> Kind -> TcM TcTyVar
+ TcMType: zonkTidyTcTypes :: TidyEnv -> [TcType] -> TcM (TidyEnv, [TcType])
+ TcPatSyn: tcPatSynDecl :: PatSynBind GhcRn GhcRn -> Maybe TcSigInfo -> TcM (LHsBinds GhcTc, TcGblEnv)
+ TcRnDriver: getRenamedStuff :: TcGblEnv -> RenamedStuff
+ TcRnDriver: type RenamedStuff = (Maybe (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)], Maybe LHsDocString))
+ TcRnMonad: class ContainsCostCentreState e
+ TcRnMonad: extractCostCentreState :: ContainsCostCentreState e => e -> TcRef CostCentreState
+ TcRnMonad: getCCIndexM :: ContainsCostCentreState gbl => FastString -> TcRnIf gbl lcl CostCentreIndex
+ TcRnMonad: instance TcRnMonad.ContainsCostCentreState TcRnTypes.DsGblEnv
+ TcRnMonad: instance TcRnMonad.ContainsCostCentreState TcRnTypes.TcGblEnv
+ TcRnMonad: newNoTcEvBinds :: TcM EvBindsVar
+ TcRnMonad: pushTcLevelsM :: Int -> TcM a -> TcM (a, TcLevel)
+ TcRnTypes: CQuantCan :: QCInst -> Ct
+ TcRnTypes: ConstrainedDataConPE :: PredType -> PromotionErr
+ TcRnTypes: DataConSkol :: Name -> SkolemInfo
+ TcRnTypes: DerivClauseOrigin :: CtOrigin
+ TcRnTypes: ForAllSkol :: SDoc -> SkolemInfo
+ TcRnTypes: IC_BadTelescope :: ImplicStatus
+ TcRnTypes: PatSynExPE :: PromotionErr
+ TcRnTypes: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
+ TcRnTypes: QuantCtxtSkol :: SkolemInfo
+ TcRnTypes: RawObject :: ForeignSrcLang
+ TcRnTypes: ReifySkol :: SkolemInfo
+ TcRnTypes: SigTypeSkol :: UserTypeCtxt -> SkolemInfo
+ TcRnTypes: TyConSkol :: TyConFlavour -> Name -> SkolemInfo
+ TcRnTypes: [ds_cc_st] :: DsGblEnv -> IORef CostCentreState
+ TcRnTypes: [ic_telescope] :: Implication -> Maybe SDoc
+ TcRnTypes: [qci_ev] :: QCInst -> CtEvidence
+ TcRnTypes: [qci_pend_sc] :: QCInst -> Bool
+ TcRnTypes: [qci_pred] :: QCInst -> TcPredType
+ TcRnTypes: [qci_tvs] :: QCInst -> [TcTyVar]
+ TcRnTypes: [tcg_cc_st] :: TcGblEnv -> TcRef CostCentreState
+ TcRnTypes: ctEvExpr :: CtEvidence -> EvExpr
+ TcRnTypes: data QCInst
+ TcRnTypes: getPendingWantedScs :: Cts -> ([Ct], Cts)
+ TcRnTypes: implicDynFlags :: Implication -> DynFlags
+ TcRnTypes: implicLclEnv :: Implication -> TcLclEnv
+ TcRnTypes: instance Outputable.Outputable TcRnTypes.QCInst
+ TcRnTypes: isGivenLoc :: CtLoc -> Bool
+ TcRnTypes: isPendingScInst :: QCInst -> Maybe QCInst
+ TcRnTypes: isSolvedWC :: WantedConstraints -> Bool
+ TcRnTypes: removeBindingShadowing :: HasOccName a => [a] -> [a]
+ TcSMonad: QCI :: CtEvidence -> [TcTyVar] -> TcPredType -> Bool -> QCInst
+ TcSMonad: [inert_insts] :: InertCans -> [QCInst]
+ TcSMonad: [qci_ev] :: QCInst -> CtEvidence
+ TcSMonad: [qci_pend_sc] :: QCInst -> Bool
+ TcSMonad: [qci_pred] :: QCInst -> TcPredType
+ TcSMonad: [qci_tvs] :: QCInst -> [TcTyVar]
+ TcSMonad: addInertForAll :: QCInst -> TcS ()
+ TcSMonad: checkConstraintsTcS :: SkolemInfo -> [TcTyVar] -> [EvVar] -> TcS (result, Cts) -> TcS (result, TcEvBinds)
+ TcSMonad: checkTvConstraintsTcS :: SkolemInfo -> [TcTyVar] -> TcS (result, Cts) -> TcS result
+ TcSMonad: data QCInst
+ TcSMonad: dischargeFunEq :: CtEvidence -> TcTyVar -> TcCoercion -> TcType -> TcS ()
+ TcSMonad: getEvExpr :: MaybeNew -> EvExpr
+ TcSMonad: getPendingGivenScs :: TcS [Ct]
+ TcSMonad: getSolvedDicts :: TcS (DictMap CtEvidence)
+ TcSMonad: instance HscTypes.MonadThings TcSMonad.TcS
+ TcSMonad: instance Module.HasModule TcSMonad.TcS
+ TcSMonad: mightMatchLater :: TcPredType -> CtLoc -> TcPredType -> CtLoc -> Bool
+ TcSMonad: newNoTcEvBinds :: TcS EvBindsVar
+ TcSMonad: pprKicked :: Int -> SDoc
+ TcSMonad: setSolvedDicts :: DictMap CtEvidence -> TcS ()
+ TcSMonad: zonkTcTyCoVarBndr :: TcTyCoVar -> TcS TcTyCoVar
+ TcSimplify: promoteTyVar :: TcTyVar -> TcM Bool
+ TcSimplify: promoteTyVarSet :: TcTyVarSet -> TcM Bool
+ TcSimplify: simpl_top :: WantedConstraints -> TcS WantedConstraints
+ TcSimplify: solveLocalEqualities :: TcM a -> TcM a
+ TcTyDecls: addTyConsToGblEnv :: [TyCon] -> TcM TcGblEnv
+ TcTyDecls: tcRecSelBinds :: [(Id, LHsBind GhcRn)] -> TcM TcGblEnv
+ TcType: DataKindCtxt :: Name -> UserTypeCtxt
+ TcType: KindSigCtxt :: UserTypeCtxt
+ TcType: TyFamResKindCtxt :: Name -> UserTypeCtxt
+ TcType: TySynKindCtxt :: Name -> UserTypeCtxt
+ TcType: TyVarBndrKindCtxt :: Name -> UserTypeCtxt
+ TcType: infixr 0 `SynFun`
+ TcType: mkEmptyTCvSubst :: InScopeSet -> TCvSubst
+ TcType: nakedSubstTy :: HasCallStack => TCvSubst -> TcType -> TcType
+ TcType: promoteSkolem :: TcLevel -> TcTyVar -> TcTyVar
+ TcType: promoteSkolemX :: TcLevel -> TCvSubst -> TcTyVar -> (TCvSubst, TcTyVar)
+ TcType: promoteSkolemsX :: TcLevel -> TCvSubst -> [TcTyVar] -> (TCvSubst, [TcTyVar])
+ TcType: type KnotTied ty = ty
+ TcUnify: checkTvConstraints :: SkolemInfo -> Maybe SDoc -> TcM ([TcTyVar], result) -> TcM ([TcTyVar], result)
+ TcValidity: DataKindCtxt :: Name -> UserTypeCtxt
+ TcValidity: KindSigCtxt :: UserTypeCtxt
+ TcValidity: TyFamResKindCtxt :: Name -> UserTypeCtxt
+ TcValidity: TySynKindCtxt :: Name -> UserTypeCtxt
+ TcValidity: TyVarBndrKindCtxt :: Name -> UserTypeCtxt
+ TrieMap: data GenMap m a
+ TrieMap: fdG :: TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b
+ TrieMap: foldMaybe :: (a -> b -> b) -> Maybe a -> b -> b
+ TrieMap: lkG :: (Eq (Key m), TrieMap m) => Key m -> GenMap m a -> Maybe a
+ TrieMap: lkList :: TrieMap m => (forall b. k -> m b -> Maybe b) -> [k] -> ListMap m a -> Maybe a
+ TrieMap: mapG :: TrieMap m => (a -> b) -> GenMap m a -> GenMap m b
+ TrieMap: type XT a = Maybe a -> Maybe a
+ TrieMap: xtG :: (Eq (Key m), TrieMap m) => Key m -> XT a -> GenMap m a -> GenMap m a
+ TrieMap: xtList :: TrieMap m => (forall b. k -> XT b -> m b -> m b) -> [k] -> XT a -> ListMap m a -> ListMap m a
+ TyCon: [data_cons_size] :: AlgTyConRhs -> Int
+ TyCon: instance Outputable.Outputable TyCon.TyConBndrVis
+ TyCon: mkDataTyConRhs :: [DataCon] -> AlgTyConRhs
+ TyCon: mkTyConTagMap :: TyCon -> NameEnv ConTag
+ TyCon: tcTyConUserTyVars :: TyCon -> SDoc
+ TyCon: tyConBndrVisArgFlag :: TyConBndrVis -> ArgFlag
+ Type: ForAllPred :: [TyVarBinder] -> [PredType] -> PredType -> PredTree
+ Type: PprPrec :: Int -> PprPrec
+ Type: [tcm_tycon] :: TyCoMapper env m -> TyCon -> m TyCon
+ Type: appPrec :: PprPrec
+ Type: funPrec :: PprPrec
+ Type: newtype PprPrec
+ Type: occCheckExpand :: [Var] -> Type -> Maybe Type
+ Type: opPrec :: PprPrec
+ Type: pprWithTYPE :: Type -> SDoc
+ Type: sigPrec :: PprPrec
+ Type: substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])
+ Type: tcIsConstraintKind :: Kind -> Bool
+ Type: tcIsLiftedTypeKind :: Kind -> Bool
+ Type: tcReturnsConstraintKind :: Kind -> Bool
+ Type: topPrec :: PprPrec
+ Type: tyBinderVar_maybe :: TyBinder -> Maybe TyVar
+ Type: type KnotTied ty = ty
+ TysPrim: exposedPrimTyCons :: [TyCon]
+ TysPrim: unexposedPrimTyCons :: [TyCon]
+ TysWiredIn: liftedTypeKindTyConName :: Name
+ UnVarGraph: hasLoopAt :: UnVarGraph -> Var -> Bool
+ UniqSupply: instance Control.Monad.Fail.MonadFail UniqSupply.UniqSM
+ Unique: dataConTyRepNameUnique :: Unique -> Unique
+ Unique: eqUnique :: Unique -> Unique -> Bool
+ Unique: ltUnique :: Unique -> Unique -> Bool
+ Var: instance GHC.Classes.Ord Var.ArgFlag
+ Var: type TcTyVar = Var
+ X86.Instr: DestBlockId :: BlockId -> JumpDest
+ X86.Instr: DestImm :: Imm -> JumpDest
- Annotations: type AnnPayload = Serialized The "payload" of an annotation allows recovery of its value at a given type, and can be persisted to an interface file
+ Annotations: type AnnPayload = Serialized " The "payload" of an annotation allows recovery of its value at a given type, and can be persisted to an interface file"
- 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) -> LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr] -> [instr] -> [UnwindPoint] -> 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]) -> ([NatCmmDecl statics instr] -> [NatCmmDecl statics instr]) -> (Int -> NatCmmDecl statics instr -> UniqSM (NatCmmDecl statics instr)) -> (LabelMap CmmStatics -> [NatBasicBlock instr] -> [NatBasicBlock instr]) -> ([instr] -> [UnwindPoint]) -> NcgImpl statics instr jumpDest
- Bag: foldlBagM :: (Monad m) => (b -> a -> m b) -> b -> Bag a -> m b
+ Bag: foldlBagM :: Monad m => (b -> a -> m b) -> b -> Bag a -> m b
- Bag: foldrBagM :: (Monad m) => (a -> b -> m b) -> b -> Bag a -> m b
+ Bag: foldrBagM :: Monad m => (a -> b -> m b) -> b -> Bag a -> m b
- BasicTypes: DeprecatedTxt :: (Located SourceText) -> [Located StringLiteral] -> WarningTxt
+ BasicTypes: DeprecatedTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt
- BasicTypes: WarningTxt :: (Located SourceText) -> [Located StringLiteral] -> WarningTxt
+ BasicTypes: WarningTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt
- BasicTypes: maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc
+ BasicTypes: maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- BinFingerprint: computeFingerprint :: (Binary a) => (BinHandle -> Name -> IO ()) -> a -> IO Fingerprint
+ BinFingerprint: computeFingerprint :: Binary a => (BinHandle -> Name -> IO ()) -> a -> IO Fingerprint
- Binary: UserData :: BinHandle -> IO Name -> BinHandle -> IO FastString -> BinHandle -> Name -> IO () -> BinHandle -> Name -> IO () -> BinHandle -> FastString -> IO () -> UserData
+ Binary: UserData :: (BinHandle -> IO Name) -> (BinHandle -> IO FastString) -> (BinHandle -> Name -> IO ()) -> (BinHandle -> Name -> IO ()) -> (BinHandle -> FastString -> IO ()) -> UserData
- BkpSyn: DeclD :: HsDeclType -> (Located ModuleName) -> (Maybe (Located (HsModule GhcPs))) -> HsUnitDecl n
+ BkpSyn: DeclD :: HsDeclType -> Located ModuleName -> Maybe (Located (HsModule GhcPs)) -> HsUnitDecl n
- BkpSyn: HsModuleId :: (LHsUnitId n) -> (Located ModuleName) -> HsModuleId n
+ BkpSyn: HsModuleId :: LHsUnitId n -> Located ModuleName -> HsModuleId n
- BkpSyn: HsModuleVar :: (Located ModuleName) -> HsModuleId n
+ BkpSyn: HsModuleVar :: Located ModuleName -> HsModuleId n
- BkpSyn: HsUnitId :: (Located n) -> [LHsModuleSubst n] -> HsUnitId n
+ BkpSyn: HsUnitId :: Located n -> [LHsModuleSubst n] -> HsUnitId n
- BkpSyn: IncludeD :: (IncludeDecl n) -> HsUnitDecl n
+ BkpSyn: IncludeD :: IncludeDecl n -> HsUnitDecl n
- BooleanFormula: Parens :: (LBooleanFormula a) -> BooleanFormula a
+ BooleanFormula: Parens :: LBooleanFormula a -> BooleanFormula a
- BufWrite: BufHandle :: {-# UNPACK #-} !(Ptr Word8) -> {-# UNPACK #-} !FastMutInt -> Handle -> BufHandle
+ BufWrite: BufHandle :: {-# UNPACK #-} !Ptr Word8 -> {-# UNPACK #-} !FastMutInt -> Handle -> BufHandle
- BufWrite: bPutLitString :: BufHandle -> LitString -> Int -> IO ()
+ BufWrite: bPutLitString :: BufHandle -> LitString -> IO ()
- BuildTyCl: buildClass :: Name -> [TyConBinder] -> [Role] -> [FunDep TyVar] -> Maybe (ThetaType, [ClassATItem], [TcMethInfo], ClassMinimalDef) -> TcRnIf m n Class
+ BuildTyCl: buildClass :: Name -> [TyConBinder] -> [Role] -> [FunDep TyVar] -> Maybe (KnotTied ThetaType, [ClassATItem], [KnotTied MethInfo], ClassMinimalDef) -> TcRnIf m n Class
- BuildTyCl: buildDataCon :: FamInstEnvs -> Name -> Bool -> TyConRepName -> [HsSrcBang] -> Maybe [HsImplBang] -> [FieldLabel] -> [TyVar] -> [TyVar] -> [TyVarBinder] -> [EqSpec] -> ThetaType -> [Type] -> Type -> TyCon -> TcRnIf m n DataCon
+ BuildTyCl: buildDataCon :: FamInstEnvs -> Name -> Bool -> TyConRepName -> [HsSrcBang] -> Maybe [HsImplBang] -> [FieldLabel] -> [TyVar] -> [TyVar] -> [TyVarBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied Type] -> KnotTied Type -> KnotTied TyCon -> NameEnv ConTag -> TcRnIf m n DataCon
- BuildTyCl: type TcMethInfo = (Name, Type, Maybe (DefMethSpec (SrcSpan, Type)))
+ BuildTyCl: type TcMethInfo = MethInfo
- ByteCodeInstr: BRK_FUN :: Word16 -> Unique -> (RemotePtr CostCentre) -> BCInstr
+ ByteCodeInstr: BRK_FUN :: Word16 -> Unique -> RemotePtr CostCentre -> BCInstr
- ByteCodeInstr: CCALL :: Word16 -> (RemotePtr C_ffi_cif) -> Word16 -> BCInstr
+ ByteCodeInstr: CCALL :: Word16 -> RemotePtr C_ffi_cif -> Word16 -> BCInstr
- ByteCodeInstr: PUSH_ALTS :: (ProtoBCO Name) -> BCInstr
+ ByteCodeInstr: PUSH_ALTS :: ProtoBCO Name -> BCInstr
- ByteCodeInstr: PUSH_ALTS_UNLIFTED :: (ProtoBCO Name) -> ArgRep -> BCInstr
+ ByteCodeInstr: PUSH_ALTS_UNLIFTED :: ProtoBCO Name -> ArgRep -> BCInstr
- ByteCodeInstr: PUSH_BCO :: (ProtoBCO Name) -> BCInstr
+ ByteCodeInstr: PUSH_BCO :: ProtoBCO Name -> BCInstr
- ByteCodeTypes: FFIInfo :: (RemotePtr C_ffi_cif) -> FFIInfo
+ ByteCodeTypes: FFIInfo :: RemotePtr C_ffi_cif -> FFIInfo
- ByteCodeTypes: ItblPtr :: (RemotePtr StgInfoTable) -> ItblPtr
+ ByteCodeTypes: ItblPtr :: RemotePtr StgInfoTable -> ItblPtr
- ByteCodeTypes: ModBreaks :: ForeignRef BreakArray -> !(Array BreakIndex SrcSpan) -> !(Array BreakIndex [OccName]) -> !(Array BreakIndex [String]) -> !(Array BreakIndex (RemotePtr CostCentre)) -> IntMap CgBreakInfo -> ModBreaks
+ ByteCodeTypes: ModBreaks :: ForeignRef BreakArray -> !Array BreakIndex SrcSpan -> !Array BreakIndex [OccName] -> !Array BreakIndex [String] -> !Array BreakIndex (RemotePtr CostCentre) -> IntMap CgBreakInfo -> ModBreaks
- ByteCodeTypes: UnlinkedBCO :: !Name -> {-# UNPACK #-} !Int -> !(UArray Int Word16) -> !(UArray Int Word64) -> !(SizedSeq BCONPtr) -> !(SizedSeq BCOPtr) -> UnlinkedBCO
+ ByteCodeTypes: UnlinkedBCO :: !Name -> {-# UNPACK #-} !Int -> !UArray Int Word16 -> !UArray Int Word64 -> !SizedSeq BCONPtr -> !SizedSeq BCOPtr -> UnlinkedBCO
- ByteCodeTypes: [modBreaks_ccs] :: ModBreaks -> !(Array BreakIndex (RemotePtr CostCentre))
+ ByteCodeTypes: [modBreaks_ccs] :: ModBreaks -> !Array BreakIndex (RemotePtr CostCentre)
- ByteCodeTypes: [modBreaks_decls] :: ModBreaks -> !(Array BreakIndex [String])
+ ByteCodeTypes: [modBreaks_decls] :: ModBreaks -> !Array BreakIndex [String]
- ByteCodeTypes: [modBreaks_locs] :: ModBreaks -> !(Array BreakIndex SrcSpan)
+ ByteCodeTypes: [modBreaks_locs] :: ModBreaks -> !Array BreakIndex SrcSpan
- ByteCodeTypes: [modBreaks_vars] :: ModBreaks -> !(Array BreakIndex [OccName])
+ ByteCodeTypes: [modBreaks_vars] :: ModBreaks -> !Array BreakIndex [OccName]
- ByteCodeTypes: [unlinkedBCOBitmap] :: UnlinkedBCO -> !(UArray Int Word64)
+ ByteCodeTypes: [unlinkedBCOBitmap] :: UnlinkedBCO -> !UArray Int Word64
- ByteCodeTypes: [unlinkedBCOInstrs] :: UnlinkedBCO -> !(UArray Int Word16)
+ ByteCodeTypes: [unlinkedBCOInstrs] :: UnlinkedBCO -> !UArray Int Word16
- ByteCodeTypes: [unlinkedBCOLits] :: UnlinkedBCO -> !(SizedSeq BCONPtr)
+ ByteCodeTypes: [unlinkedBCOLits] :: UnlinkedBCO -> !SizedSeq BCONPtr
- ByteCodeTypes: [unlinkedBCOPtrs] :: UnlinkedBCO -> !(SizedSeq BCOPtr)
+ ByteCodeTypes: [unlinkedBCOPtrs] :: UnlinkedBCO -> !SizedSeq BCOPtr
- Class: ATI :: TyCon -> (Maybe (Type, SrcSpan)) -> ClassATItem
+ Class: ATI :: TyCon -> Maybe (Type, SrcSpan) -> ClassATItem
- CmdLineParser: CmdLineP :: s -> (a, s) -> CmdLineP s a
+ CmdLineParser: CmdLineP :: (s -> (a, s)) -> CmdLineP s a
- CmdLineParser: NoArg :: (EwM m ()) -> OptKind m
+ CmdLineParser: NoArg :: EwM m () -> OptKind m
- Cmm: CmmInfoTable :: CLabel -> SMRep -> ProfilingInfo -> C_SRT -> CmmInfoTable
+ Cmm: CmmInfoTable :: CLabel -> SMRep -> ProfilingInfo -> Maybe CLabel -> Maybe (Id, CostCentreStack) -> CmmInfoTable
- Cmm: [cit_srt] :: CmmInfoTable -> C_SRT
+ Cmm: [cit_srt] :: CmmInfoTable -> Maybe CLabel
- CmmBuildInfoTables: cafAnal :: CmmGraph -> CAFEnv
+ CmmBuildInfoTables: cafAnal :: LabelSet -> CLabel -> CmmGraph -> CAFEnv
- CmmBuildInfoTables: doSRTs :: DynFlags -> TopSRT -> [(CAFEnv, [CmmDecl])] -> IO (TopSRT, [CmmDecl])
+ CmmBuildInfoTables: doSRTs :: DynFlags -> ModuleSRTInfo -> [(CAFEnv, [CmmDecl])] -> IO (ModuleSRTInfo, [CmmDecl])
- CmmBuildInfoTables: emptySRT :: MonadUnique m => m TopSRT
+ CmmBuildInfoTables: emptySRT :: Module -> ModuleSRTInfo
- CmmBuildInfoTables: type CAFSet = Set CLabel
+ CmmBuildInfoTables: type CAFSet = Set CAFLabel
- CmmExpr: CmmLabelDiffOff :: CLabel -> CLabel -> Int -> CmmLit
+ CmmExpr: CmmLabelDiffOff :: CLabel -> CLabel -> Int -> Width -> CmmLit
- CmmMonad: PD :: DynFlags -> PState -> ParseResult a -> PD a
+ CmmMonad: PD :: (DynFlags -> PState -> ParseResult a) -> PD a
- CmmNode: wrapRecExpM :: (CmmExpr -> Maybe CmmExpr) -> (CmmExpr -> Maybe CmmExpr)
+ CmmNode: wrapRecExpM :: (CmmExpr -> Maybe CmmExpr) -> CmmExpr -> Maybe CmmExpr
- CmmPipeline: cmmPipeline :: HscEnv -> TopSRT -> CmmGroup -> IO (TopSRT, CmmGroup)
+ CmmPipeline: cmmPipeline :: HscEnv -> ModuleSRTInfo -> CmmGroup -> IO (ModuleSRTInfo, CmmGroup)
- CoAxiom: BuiltInSynFamily :: [Type] -> Maybe (CoAxiomRule, [Type], Type) -> [Type] -> Type -> [TypeEqn] -> [Type] -> Type -> [Type] -> Type -> [TypeEqn] -> BuiltInSynFamily
+ CoAxiom: BuiltInSynFamily :: ([Type] -> Maybe (CoAxiomRule, [Type], Type)) -> ([Type] -> Type -> [TypeEqn]) -> ([Type] -> Type -> [Type] -> Type -> [TypeEqn]) -> BuiltInSynFamily
- CoAxiom: CoAxiomRule :: FastString -> [Role] -> Role -> [TypeEqn] -> Maybe TypeEqn -> CoAxiomRule
+ CoAxiom: CoAxiomRule :: FastString -> [Role] -> Role -> ([TypeEqn] -> Maybe TypeEqn) -> CoAxiomRule
- CodeOutput: codeOutput :: DynFlags -> Module -> FilePath -> ModLocation -> ForeignStubs -> [(ForeignSrcLang, String)] -> [InstalledUnitId] -> Stream IO RawCmmGroup () -> IO (FilePath, (Bool, Maybe FilePath), [(ForeignSrcLang, FilePath)])
+ CodeOutput: codeOutput :: DynFlags -> Module -> FilePath -> ModLocation -> ForeignStubs -> [(ForeignSrcLang, FilePath)] -> [InstalledUnitId] -> Stream IO RawCmmGroup () -> IO (FilePath, (Bool, Maybe FilePath), [(ForeignSrcLang, FilePath)])
- Coercion: coVarKindsTypesRole :: CoVar -> (Kind, Kind, Type, Type, Role)
+ Coercion: coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role)
- Coercion: coVarTypes :: CoVar -> Pair Type
+ Coercion: coVarTypes :: HasDebugCallStack => CoVar -> Pair Type
- Coercion: decomposeCo :: Arity -> Coercion -> [Coercion]
+ Coercion: decomposeCo :: Arity -> Coercion -> [Role] -> [Coercion]
- Coercion: decomposeFunCo :: Coercion -> (Coercion, Coercion)
+ Coercion: decomposeFunCo :: HasDebugCallStack => Role -> Coercion -> (Coercion, Coercion)
- Coercion: isReflCoVar_maybe :: CoVar -> Maybe Coercion
+ Coercion: isReflCoVar_maybe :: Var -> Maybe Coercion
- Coercion: mkCoCast :: Coercion -> Coercion -> Coercion
+ Coercion: mkCoCast :: Coercion -> CoercionR -> Coercion
- Coercion: mkNthCo :: Int -> Coercion -> Coercion
+ Coercion: mkNthCo :: HasDebugCallStack => Role -> Int -> Coercion -> Coercion
- Coercion: promoteCoercion :: Coercion -> Coercion
+ Coercion: promoteCoercion :: Coercion -> CoercionN
- Coercion: setNominalRole_maybe :: Coercion -> Maybe Coercion
+ Coercion: setNominalRole_maybe :: Role -> Coercion -> Maybe Coercion
- CoreMonad: CoreDoPluginPass :: String -> PluginPass -> CoreToDo
+ CoreMonad: CoreDoPluginPass :: String -> CorePluginPass -> CoreToDo
- CoreOpt: pushCoArg :: Coercion -> CoreArg -> Maybe (CoreArg, Coercion)
+ CoreOpt: pushCoArg :: CoercionR -> CoreArg -> Maybe (CoreArg, MCoercion)
- CoreOpt: pushCoTyArg :: Coercion -> Type -> Maybe (Type, Coercion)
+ CoreOpt: pushCoTyArg :: CoercionR -> Type -> Maybe (Type, MCoercionR)
- CoreOpt: pushCoValArg :: Coercion -> Maybe (Coercion, Coercion)
+ CoreOpt: pushCoValArg :: CoercionR -> Maybe (Coercion, MCoercion)
- CoreOpt: simpleOptExpr :: CoreExpr -> CoreExpr
+ CoreOpt: simpleOptExpr :: DynFlags -> CoreExpr -> CoreExpr
- CoreOpt: simpleOptExprWith :: Subst -> InExpr -> OutExpr
+ CoreOpt: simpleOptExprWith :: DynFlags -> Subst -> InExpr -> OutExpr
- CoreOpt: simpleOptPgm :: DynFlags -> Module -> CoreProgram -> [CoreRule] -> [CoreVect] -> IO (CoreProgram, [CoreRule], [CoreVect])
+ CoreOpt: simpleOptPgm :: DynFlags -> Module -> CoreProgram -> [CoreRule] -> IO (CoreProgram, [CoreRule])
- CoreSyn: AnnApp :: (AnnExpr bndr annot) -> (AnnExpr bndr annot) -> AnnExpr' bndr annot
+ CoreSyn: AnnApp :: AnnExpr bndr annot -> AnnExpr bndr annot -> AnnExpr' bndr annot
- CoreSyn: AnnCase :: (AnnExpr bndr annot) -> bndr -> Type -> [AnnAlt bndr annot] -> AnnExpr' bndr annot
+ CoreSyn: AnnCase :: AnnExpr bndr annot -> bndr -> Type -> [AnnAlt bndr annot] -> AnnExpr' bndr annot
- CoreSyn: AnnCast :: (AnnExpr bndr annot) -> (annot, Coercion) -> AnnExpr' bndr annot
+ CoreSyn: AnnCast :: AnnExpr bndr annot -> (annot, Coercion) -> AnnExpr' bndr annot
- CoreSyn: AnnLam :: bndr -> (AnnExpr bndr annot) -> AnnExpr' bndr annot
+ CoreSyn: AnnLam :: bndr -> AnnExpr bndr annot -> AnnExpr' bndr annot
- CoreSyn: AnnLet :: (AnnBind bndr annot) -> (AnnExpr bndr annot) -> AnnExpr' bndr annot
+ CoreSyn: AnnLet :: AnnBind bndr annot -> AnnExpr bndr annot -> AnnExpr' bndr annot
- CoreSyn: AnnNonRec :: bndr -> (AnnExpr bndr annot) -> AnnBind bndr annot
+ CoreSyn: AnnNonRec :: bndr -> AnnExpr bndr annot -> AnnBind bndr annot
- CoreSyn: AnnTick :: (Tickish Id) -> (AnnExpr bndr annot) -> AnnExpr' bndr annot
+ CoreSyn: AnnTick :: Tickish Id -> AnnExpr bndr annot -> AnnExpr' bndr annot
- CoreSyn: App :: (Expr b) -> (Arg b) -> Expr b
+ CoreSyn: App :: Expr b -> Arg b -> Expr b
- CoreSyn: Case :: (Expr b) -> b -> Type -> [Alt b] -> Expr b
+ CoreSyn: Case :: Expr b -> b -> Type -> [Alt b] -> Expr b
- CoreSyn: Cast :: (Expr b) -> Coercion -> Expr b
+ CoreSyn: Cast :: Expr b -> Coercion -> Expr b
- CoreSyn: Lam :: b -> (Expr b) -> Expr b
+ CoreSyn: Lam :: b -> Expr b -> Expr b
- CoreSyn: Let :: (Bind b) -> (Expr b) -> Expr b
+ CoreSyn: Let :: Bind b -> Expr b -> Expr b
- CoreSyn: NonRec :: b -> (Expr b) -> Bind b
+ CoreSyn: NonRec :: b -> Expr b -> Bind b
- CoreSyn: Rec :: [(b, (Expr b))] -> Bind b
+ CoreSyn: Rec :: [(b, Expr b)] -> Bind b
- CoreSyn: Tick :: (Tickish Id) -> (Expr b) -> Expr b
+ CoreSyn: Tick :: Tickish Id -> Expr b -> Expr b
- CoreUnfold: mkWwInlineRule :: CoreExpr -> Arity -> Unfolding
+ CoreUnfold: mkWwInlineRule :: DynFlags -> CoreExpr -> Arity -> Unfolding
- CoreUnfold: specUnfolding :: [Var] -> (CoreExpr -> CoreExpr) -> Arity -> Unfolding -> Unfolding
+ CoreUnfold: specUnfolding :: DynFlags -> [Var] -> (CoreExpr -> CoreExpr) -> Arity -> Unfolding -> Unfolding
- CoreUtils: mkCast :: CoreExpr -> Coercion -> CoreExpr
+ CoreUtils: mkCast :: CoreExpr -> CoercionR -> CoreExpr
- CoreUtils: rhsIsStatic :: Platform -> (Name -> Bool) -> (Integer -> CoreExpr) -> CoreExpr -> Bool
+ CoreUtils: rhsIsStatic :: Platform -> (Name -> Bool) -> (LitNumType -> Integer -> Maybe CoreExpr) -> CoreExpr -> Bool
- CostCentre: CafCC :: IsCafCC
+ CostCentre: CafCC :: CCFlavour
- CostCentre: NormalCC :: {-# UNPACK #-} !Int -> CcName -> Module -> SrcSpan -> IsCafCC -> CostCentre
+ CostCentre: NormalCC :: CCFlavour -> CcName -> Module -> SrcSpan -> CostCentre
- CostCentre: mkAutoCC :: Id -> Module -> IsCafCC -> CostCentre
+ CostCentre: mkAutoCC :: Id -> Module -> CostCentre
- CostCentre: mkUserCC :: FastString -> Module -> SrcSpan -> Unique -> CostCentre
+ CostCentre: mkUserCC :: FastString -> Module -> SrcSpan -> CCFlavour -> CostCentre
- DataCon: HsUnpack :: (Maybe Coercion) -> HsImplBang
+ DataCon: HsUnpack :: Maybe Coercion -> HsImplBang
- DataCon: buildSynTyCon :: Name -> [TyConBinder] -> Kind -> [Role] -> Type -> TyCon
+ DataCon: buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind -> [Role] -> KnotTied Type -> TyCon
- DataCon: mkDataCon :: Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyVar] -> [TyVarBinder] -> [EqSpec] -> ThetaType -> [Type] -> Type -> RuntimeRepInfo -> TyCon -> ThetaType -> Id -> DataConRep -> DataCon
+ DataCon: mkDataCon :: Name -> Bool -> TyConRepName -> [HsSrcBang] -> [FieldLabel] -> [TyVar] -> [TyVar] -> [TyVarBinder] -> [EqSpec] -> KnotTied ThetaType -> [KnotTied Type] -> KnotTied Type -> RuntimeRepInfo -> KnotTied TyCon -> ConTag -> ThetaType -> Id -> DataConRep -> DataCon
- Debug: DebugBlock :: !Label -> !Label -> !CLabel -> !Bool -> !(Maybe DebugBlock) -> ![CmmTickish] -> !(Maybe CmmTickish) -> !(Maybe Int) -> [UnwindPoint] -> ![DebugBlock] -> DebugBlock
+ Debug: DebugBlock :: !Label -> !Label -> !CLabel -> !Bool -> !Maybe DebugBlock -> ![CmmTickish] -> !Maybe CmmTickish -> !Maybe Int -> [UnwindPoint] -> ![DebugBlock] -> DebugBlock
- Debug: [dblParent] :: DebugBlock -> !(Maybe DebugBlock)
+ Debug: [dblParent] :: DebugBlock -> !Maybe DebugBlock
- Debug: [dblPosition] :: DebugBlock -> !(Maybe Int)
+ Debug: [dblPosition] :: DebugBlock -> !Maybe Int
- Debug: [dblSourceTick] :: DebugBlock -> !(Maybe CmmTickish)
+ Debug: [dblSourceTick] :: DebugBlock -> !Maybe CmmTickish
- DriverPipeline: P :: PipeEnv -> PipeState -> IO (PipeState, a) -> CompPipeline a
+ DriverPipeline: P :: (PipeEnv -> PipeState -> IO (PipeState, a)) -> CompPipeline a
- DsBinds: decomposeRuleLhs :: [Var] -> CoreExpr -> Either SDoc ([Var], Id, [CoreExpr])
+ DsBinds: decomposeRuleLhs :: DynFlags -> [Var] -> CoreExpr -> Either SDoc ([Var], Id, [CoreExpr])
- DsMonad: (<$>) :: Functor f => a -> b -> f a -> f b
+ DsMonad: (<$>) :: Functor f => (a -> b) -> f a -> f b
- DsMonad: (<*>) :: Applicative f => f a -> b -> f a -> f b
+ DsMonad: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- DsMonad: DsMatchContext :: (HsMatchContext Name) -> SrcSpan -> DsMatchContext
+ DsMonad: DsMatchContext :: HsMatchContext Name -> SrcSpan -> DsMatchContext
- DsMonad: DsSplice :: (HsExpr GhcTc) -> DsMetaVal
+ DsMonad: DsSplice :: HsExpr GhcTc -> DsMetaVal
- DsMonad: class Functor f => Applicative (f :: * -> *)
+ DsMonad: class Functor f => Applicative (f :: Type -> Type)
- DsMonad: foldlM :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m a
+ DsMonad: foldlM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a
- DsMonad: foldrM :: (Monad m) => (b -> a -> m a) -> a -> [b] -> m a
+ DsMonad: foldrM :: Monad m => (b -> a -> m a) -> a -> [b] -> m a
- DsMonad: mapAndUnzipM :: Applicative m => a -> m (b, c) -> [a] -> m ([b], [c])
+ DsMonad: mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- DsMonad: mapM :: (Traversable t, Monad m) => a -> m b -> t a -> m t b
+ DsMonad: mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)
- DsUsage: mkDependencies :: TcGblEnv -> IO Dependencies
+ DsUsage: mkDependencies :: InstalledUnitId -> [Module] -> TcGblEnv -> IO Dependencies
- DsUsage: mkUsageInfo :: HscEnv -> Module -> ImportedMods -> NameSet -> [FilePath] -> [(Module, Fingerprint)] -> IO [Usage]
+ DsUsage: mkUsageInfo :: HscEnv -> Module -> ImportedMods -> NameSet -> [FilePath] -> [(Module, Fingerprint)] -> [ModIface] -> IO [Usage]
- DsUtils: addBang :: LPat id -> LPat id
+ DsUtils: addBang :: LPat GhcTc -> LPat GhcTc
- DsUtils: decideBangHood :: DynFlags -> LPat id -> LPat id
+ DsUtils: decideBangHood :: DynFlags -> LPat GhcTc -> LPat GhcTc
- DsUtils: mkCoAlgCaseMatchResult :: DynFlags -> Id -> Type -> [CaseAlt DataCon] -> MatchResult
+ DsUtils: mkCoAlgCaseMatchResult :: Id -> Type -> [CaseAlt DataCon] -> MatchResult
- DynFlags: DynFlags :: GhcMode -> GhcLink -> HscTarget -> Settings -> LlvmTargets -> Int -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Maybe Int -> 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 -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> [String] -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> 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 -> IO (Maybe LogOutput) -> LogAction -> LogFinaliser -> 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 -> DynFlags
+ DynFlags: DynFlags :: GhcMode -> GhcLink -> HscTarget -> Settings -> 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 -> 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 -> 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] -> 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 -> DynFlags
- DynFlags: ErrReason :: !(Maybe WarningFlag) -> WarnReason
+ DynFlags: ErrReason :: !Maybe WarningFlag -> WarnReason
- DynFlags: FilesToClean :: !(Set FilePath) -> !(Set FilePath) -> FilesToClean
+ DynFlags: FilesToClean :: !Set FilePath -> !Set FilePath -> FilesToClean
- DynFlags: FlushErr :: (IO ()) -> FlushErr
+ DynFlags: FlushErr :: IO () -> FlushErr
- DynFlags: FlushOut :: (IO ()) -> FlushOut
+ DynFlags: FlushOut :: IO () -> FlushOut
- DynFlags: Settings :: Platform -> FilePath -> 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] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> PlatformConstants -> Settings
+ 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: [flagSpecAction] :: FlagSpec flag -> (TurnOnFlag -> DynP ())
+ DynFlags: [flagSpecAction] :: FlagSpec flag -> TurnOnFlag -> DynP ()
- DynFlags: [ftcCurrentModule] :: FilesToClean -> !(Set FilePath)
+ DynFlags: [ftcCurrentModule] :: FilesToClean -> !Set FilePath
- DynFlags: [ftcGhcSession] :: FilesToClean -> !(Set FilePath)
+ DynFlags: [ftcGhcSession] :: FilesToClean -> !Set FilePath
- DynFlags: [includePaths] :: DynFlags -> [String]
+ DynFlags: [includePaths] :: DynFlags -> IncludeSpecs
- DynFlags: defaultDynFlags :: Settings -> LlvmTargets -> DynFlags
+ DynFlags: defaultDynFlags :: Settings -> LlvmConfig -> DynFlags
- Exception: gonException :: (ExceptionMonad m) => m a -> m b -> m a
+ Exception: gonException :: ExceptionMonad m => m a -> m b -> m a
- FastString: FastString :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !ByteString -> {-# UNPACK #-} !(IORef (Maybe FastZString)) -> FastString
+ FastString: FastString :: {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !ByteString -> {-# UNPACK #-} !IORef (Maybe FastZString) -> FastString
- FastString: [fs_ref] :: FastString -> {-# UNPACK #-} !(IORef (Maybe FastZString))
+ FastString: [fs_ref] :: FastString -> {-# UNPACK #-} !IORef (Maybe FastZString)
- Finder: NotFound :: [FilePath] -> Maybe UnitId -> [UnitId] -> [UnitId] -> [ModuleSuggestion] -> FindResult
+ Finder: NotFound :: [FilePath] -> Maybe UnitId -> [UnitId] -> [UnitId] -> [(UnitId, UnusablePackageReason)] -> [ModuleSuggestion] -> FindResult
- ForeignCall: CType :: SourceText -> (Maybe Header) -> (SourceText, FastString) -> CType
+ ForeignCall: CType :: SourceText -> Maybe Header -> (SourceText, FastString) -> CType
- ForeignCall: StaticTarget :: SourceText -> CLabelString -> (Maybe UnitId) -> Bool -> CCallTarget
+ ForeignCall: StaticTarget :: SourceText -> CLabelString -> Maybe UnitId -> Bool -> CCallTarget
- GHC: ACoAxiom :: (CoAxiom Branched) -> TyThing
+ GHC: ACoAxiom :: CoAxiom Branched -> TyThing
- GHC: DynFlags :: GhcMode -> GhcLink -> HscTarget -> Settings -> LlvmTargets -> Int -> Int -> Int -> Int -> Int -> Int -> Maybe String -> [Int] -> Maybe Int -> Bool -> Maybe Int -> Maybe Int -> Maybe Int -> Int -> Int -> Maybe Int -> Maybe Int -> Int -> Maybe Int -> 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 -> String -> String -> String -> IORef Bool -> String -> String -> Maybe String -> Maybe String -> Maybe String -> DynLibLoader -> Maybe FilePath -> Maybe FilePath -> [Option] -> [String] -> [String] -> [String] -> [String] -> Maybe String -> RtsOptsEnabled -> Bool -> String -> [ModuleName] -> [(ModuleName, String)] -> [String] -> 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 -> IO (Maybe LogOutput) -> LogAction -> LogFinaliser -> 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 -> DynFlags
+ GHC: DynFlags :: GhcMode -> GhcLink -> HscTarget -> Settings -> 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 -> 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 -> 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] -> 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 -> DynFlags
- GHC: ExecOptions :: SingleStep -> String -> Int -> ForeignHValue -> EvalExpr ForeignHValue -> ExecOptions
+ GHC: ExecOptions :: SingleStep -> String -> Int -> (ForeignHValue -> EvalExpr ForeignHValue) -> ExecOptions
- GHC: IIDecl :: (ImportDecl GhcPs) -> InteractiveImport
+ GHC: IIDecl :: ImportDecl GhcPs -> InteractiveImport
- GHC: ModBreaks :: ForeignRef BreakArray -> !(Array BreakIndex SrcSpan) -> !(Array BreakIndex [OccName]) -> !(Array BreakIndex [String]) -> !(Array BreakIndex (RemotePtr CostCentre)) -> IntMap CgBreakInfo -> ModBreaks
+ GHC: ModBreaks :: ForeignRef BreakArray -> !Array BreakIndex SrcSpan -> !Array BreakIndex [OccName] -> !Array BreakIndex [String] -> !Array BreakIndex (RemotePtr CostCentre) -> IntMap CgBreakInfo -> ModBreaks
- GHC: ModIface :: !Module -> !(Maybe Module) -> !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 -> !IfaceVectInfo -> OccName -> Maybe WarningTxt -> OccName -> Maybe Fixity -> OccName -> Maybe (OccName, Fingerprint) -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> [IfaceCompleteMatch] -> ModIface
+ 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: TargetFile :: FilePath -> (Maybe Phase) -> TargetId
+ GHC: TargetFile :: FilePath -> Maybe Phase -> TargetId
- GHC: [includePaths] :: DynFlags -> [String]
+ GHC: [includePaths] :: DynFlags -> IncludeSpecs
- GHC: [mi_globals] :: ModIface -> !(Maybe GlobalRdrEnv)
+ GHC: [mi_globals] :: ModIface -> !Maybe GlobalRdrEnv
- GHC: [mi_sig_of] :: ModIface -> !(Maybe Module)
+ GHC: [mi_sig_of] :: ModIface -> !Maybe Module
- GHC: [modBreaks_ccs] :: ModBreaks -> !(Array BreakIndex (RemotePtr CostCentre))
+ GHC: [modBreaks_ccs] :: ModBreaks -> !Array BreakIndex (RemotePtr CostCentre)
- GHC: [modBreaks_decls] :: ModBreaks -> !(Array BreakIndex [String])
+ GHC: [modBreaks_decls] :: ModBreaks -> !Array BreakIndex [String]
- GHC: [modBreaks_locs] :: ModBreaks -> !(Array BreakIndex SrcSpan)
+ GHC: [modBreaks_locs] :: ModBreaks -> !Array BreakIndex SrcSpan
- GHC: [modBreaks_vars] :: ModBreaks -> !(Array BreakIndex [OccName])
+ GHC: [modBreaks_vars] :: ModBreaks -> !Array BreakIndex [OccName]
- GHC: defaultCleanupHandler :: (ExceptionMonad m) => DynFlags -> m a -> m a
+ GHC: defaultCleanupHandler :: ExceptionMonad m => DynFlags -> m a -> m a
- GHC: defaultErrorHandler :: (ExceptionMonad m) => FatalMessager -> FlushOut -> m a -> m a
+ GHC: defaultErrorHandler :: ExceptionMonad m => FatalMessager -> FlushOut -> m a -> m a
- GHC: getNameToInstancesIndex :: GhcMonad m => [Module] -> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst])))
+ GHC: getNameToInstancesIndex :: GhcMonad m => [Module] -> Maybe [Module] -> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst])))
- GHC: handleSourceError :: (ExceptionMonad m) => (SourceError -> m a) -> m a -> m a
+ GHC: handleSourceError :: ExceptionMonad m => (SourceError -> m a) -> m a -> m a
- GHC: nameModule :: Name -> Module
+ GHC: nameModule :: HasDebugCallStack => Name -> Module
- GHC: setLogAction :: GhcMonad m => LogAction -> LogFinaliser -> m ()
+ GHC: setLogAction :: GhcMonad m => LogAction -> m ()
- GHC: type Located e = GenLocated SrcSpan e
+ GHC: type Located = GenLocated SrcSpan
- GHCi: EvalBreak :: Bool -> HValueRef -> Int -> Int -> RemoteRef ResumeContext b -> RemotePtr CostCentreStack -> EvalStatus_ a b
+ GHCi: EvalBreak :: Bool -> HValueRef -> Int -> Int -> RemoteRef (ResumeContext b) -> RemotePtr CostCentreStack -> EvalStatus_ a b
- GHCi: [AbandonStmt] :: Message ()
+ GHCi: [AbandonStmt] :: forall a. () => RemoteRef (ResumeContext [HValueRef]) -> Message ()
- GHCi: [AddLibrarySearchPath] :: Message RemotePtr ()
+ GHCi: [AddLibrarySearchPath] :: forall a. () => String -> Message (RemotePtr ())
- GHCi: [AddSptEntry] :: Message ()
+ GHCi: [AddSptEntry] :: forall a. () => Fingerprint -> HValueRef -> Message ()
- GHCi: [BreakpointStatus] :: Message Bool
+ GHCi: [BreakpointStatus] :: forall a. () => RemoteRef BreakArray -> Int -> Message Bool
- GHCi: [CostCentreStackInfo] :: Message [String]
+ GHCi: [CostCentreStackInfo] :: forall a. () => RemotePtr CostCentreStack -> Message [String]
- GHCi: [CreateBCOs] :: Message [HValueRef]
+ GHCi: [CreateBCOs] :: forall a. () => [ByteString] -> Message [HValueRef]
- GHCi: [EnableBreakpoint] :: Message ()
+ GHCi: [EnableBreakpoint] :: forall a. () => RemoteRef BreakArray -> Int -> Bool -> Message ()
- GHCi: [EvalIO] :: Message EvalResult ()
+ GHCi: [EvalIO] :: forall a. () => HValueRef -> Message (EvalResult ())
- GHCi: [EvalStmt] :: Message EvalStatus_ [HValueRef] [HValueRef]
+ GHCi: [EvalStmt] :: forall a. () => EvalOpts -> EvalExpr HValueRef -> Message (EvalStatus_ [HValueRef] [HValueRef])
- GHCi: [EvalStringToString] :: Message EvalResult String
+ GHCi: [EvalStringToString] :: forall a. () => HValueRef -> String -> Message (EvalResult String)
- GHCi: [EvalString] :: Message EvalResult String
+ GHCi: [EvalString] :: forall a. () => HValueRef -> Message (EvalResult String)
- GHCi: [FindSystemLibrary] :: Message Maybe String
+ GHCi: [FindSystemLibrary] :: forall a. () => String -> Message (Maybe String)
- GHCi: [FreeFFI] :: Message ()
+ GHCi: [FreeFFI] :: forall a. () => RemotePtr C_ffi_cif -> Message ()
- GHCi: [FreeHValueRefs] :: Message ()
+ GHCi: [FreeHValueRefs] :: forall a. () => [HValueRef] -> Message ()
- GHCi: [GetBreakpointVar] :: Message Maybe HValueRef
+ GHCi: [GetBreakpointVar] :: forall a. () => HValueRef -> Int -> Message (Maybe HValueRef)
- GHCi: [InitLinker] :: Message ()
+ GHCi: [InitLinker] :: forall a. () => Message ()
- GHCi: [LoadArchive] :: Message ()
+ GHCi: [LoadArchive] :: forall a. () => String -> Message ()
- GHCi: [LoadDLL] :: Message Maybe String
+ GHCi: [LoadDLL] :: forall a. () => String -> Message (Maybe String)
- GHCi: [LoadObj] :: Message ()
+ GHCi: [LoadObj] :: forall a. () => String -> Message ()
- GHCi: [LookupClosure] :: Message Maybe HValueRef
+ GHCi: [LookupClosure] :: forall a. () => String -> Message (Maybe HValueRef)
- GHCi: [LookupSymbol] :: Message Maybe RemotePtr ()
+ GHCi: [LookupSymbol] :: forall a. () => String -> Message (Maybe (RemotePtr ()))
- GHCi: [MallocData] :: Message RemotePtr ()
+ GHCi: [MallocData] :: forall a. () => ByteString -> Message (RemotePtr ())
- GHCi: [MallocStrings] :: Message [RemotePtr ()]
+ GHCi: [MallocStrings] :: forall a. () => [ByteString] -> Message [RemotePtr ()]
- GHCi: [MkConInfoTable] :: Message RemotePtr StgInfoTable
+ GHCi: [MkConInfoTable] :: forall a. () => Int -> Int -> Int -> Int -> [Word8] -> Message (RemotePtr StgInfoTable)
- GHCi: [MkCostCentres] :: Message [RemotePtr CostCentre]
+ GHCi: [MkCostCentres] :: forall a. () => String -> [(String, String)] -> Message [RemotePtr CostCentre]
- GHCi: [NewBreakArray] :: Message RemoteRef BreakArray
+ GHCi: [NewBreakArray] :: forall a. () => Int -> Message (RemoteRef BreakArray)
- GHCi: [PrepFFI] :: Message RemotePtr C_ffi_cif
+ GHCi: [PrepFFI] :: forall a. () => FFIConv -> [FFIType] -> FFIType -> Message (RemotePtr C_ffi_cif)
- GHCi: [RemoveLibrarySearchPath] :: Message Bool
+ GHCi: [RemoveLibrarySearchPath] :: forall a. () => RemotePtr () -> Message Bool
- GHCi: [ResolveObjs] :: Message Bool
+ GHCi: [ResolveObjs] :: forall a. () => Message Bool
- GHCi: [ResumeStmt] :: Message EvalStatus_ [HValueRef] [HValueRef]
+ GHCi: [ResumeStmt] :: forall a. () => EvalOpts -> RemoteRef (ResumeContext [HValueRef]) -> Message (EvalStatus_ [HValueRef] [HValueRef])
- GHCi: [RunModFinalizers] :: Message QResult ()
+ GHCi: [RunModFinalizers] :: forall a. () => RemoteRef (IORef QState) -> [RemoteRef (Q ())] -> Message (QResult ())
- GHCi: [RunTH] :: Message QResult ByteString
+ GHCi: [RunTH] :: forall a. () => RemoteRef (IORef QState) -> HValueRef -> THResultType -> Maybe Loc -> Message (QResult ByteString)
- GHCi: [Shutdown] :: Message ()
+ GHCi: [Shutdown] :: forall a. () => Message ()
- GHCi: [StartTH] :: Message RemoteRef IORef QState
+ GHCi: [StartTH] :: forall a. () => Message (RemoteRef (IORef QState))
- GHCi: [UnloadObj] :: Message ()
+ GHCi: [UnloadObj] :: forall a. () => String -> Message ()
- GhcMonad: Ghc :: Session -> IO a -> Ghc a
+ GhcMonad: Ghc :: (Session -> IO a) -> Ghc a
- GhcMonad: GhcT :: Session -> m a -> GhcT m a
+ GhcMonad: GhcT :: (Session -> m a) -> GhcT m a
- GhcMonad: Session :: !(IORef HscEnv) -> Session
+ GhcMonad: Session :: !IORef HscEnv -> Session
- GhcPlugins: ACoAxiom :: (CoAxiom Branched) -> TyThing
+ GhcPlugins: ACoAxiom :: CoAxiom Branched -> TyThing
- GhcPlugins: DeprecatedTxt :: (Located SourceText) -> [Located StringLiteral] -> WarningTxt
+ GhcPlugins: DeprecatedTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt
- GhcPlugins: TyCoMapper :: Bool -> env -> TyVar -> m Type -> env -> CoVar -> m Coercion -> env -> CoercionHole -> m Coercion -> env -> TyVar -> ArgFlag -> m (env, TyVar) -> TyCoMapper env m
+ GhcPlugins: TyCoMapper :: Bool -> (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyVar -> ArgFlag -> m (env, TyVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
- GhcPlugins: WarningTxt :: (Located SourceText) -> [Located StringLiteral] -> WarningTxt
+ GhcPlugins: WarningTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt
- GhcPlugins: coVarKindsTypesRole :: CoVar -> (Kind, Kind, Type, Type, Role)
+ GhcPlugins: coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role)
- GhcPlugins: coVarTypes :: CoVar -> Pair Type
+ GhcPlugins: coVarTypes :: HasDebugCallStack => CoVar -> Pair Type
- GhcPlugins: decomposeCo :: Arity -> Coercion -> [Coercion]
+ GhcPlugins: decomposeCo :: Arity -> Coercion -> [Role] -> [Coercion]
- GhcPlugins: decomposeFunCo :: Coercion -> (Coercion, Coercion)
+ GhcPlugins: decomposeFunCo :: HasDebugCallStack => Role -> Coercion -> (Coercion, Coercion)
- GhcPlugins: getClassPredTys :: PredType -> (Class, [Type])
+ GhcPlugins: getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- GhcPlugins: isReflCoVar_maybe :: CoVar -> Maybe Coercion
+ GhcPlugins: isReflCoVar_maybe :: Var -> Maybe Coercion
- GhcPlugins: maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc
+ GhcPlugins: maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- GhcPlugins: mkCoCast :: Coercion -> Coercion -> Coercion
+ GhcPlugins: mkCoCast :: Coercion -> CoercionR -> Coercion
- GhcPlugins: mkNthCo :: Int -> Coercion -> Coercion
+ GhcPlugins: mkNthCo :: HasDebugCallStack => Role -> Int -> Coercion -> Coercion
- GhcPlugins: modifyIdInfo :: (IdInfo -> IdInfo) -> Id -> Id
+ GhcPlugins: modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- GhcPlugins: nameModule :: Name -> Module
+ GhcPlugins: nameModule :: HasDebugCallStack => Name -> Module
- GhcPlugins: pprPrecType :: TyPrec -> Type -> SDoc
+ GhcPlugins: pprPrecType :: PprPrec -> Type -> SDoc
- GhcPlugins: promoteCoercion :: Coercion -> Coercion
+ GhcPlugins: promoteCoercion :: Coercion -> CoercionN
- GhcPlugins: setNominalRole_maybe :: Coercion -> Maybe Coercion
+ GhcPlugins: setNominalRole_maybe :: Role -> Coercion -> Maybe Coercion
- GraphOps: delNode :: (Uniquable k) => k -> Graph k cls color -> Maybe (Graph k cls color)
+ GraphOps: delNode :: Uniquable k => k -> Graph k cls color -> Maybe (Graph k cls color)
- GraphOps: freezeAllInGraph :: (Uniquable k) => Graph k cls color -> Graph k cls color
+ GraphOps: freezeAllInGraph :: Uniquable k => Graph k cls color -> Graph k cls color
- GraphOps: freezeOneInGraph :: (Uniquable k) => Graph k cls color -> (Graph k cls color, Bool)
+ GraphOps: freezeOneInGraph :: Uniquable k => Graph k cls color -> (Graph k cls color, Bool)
- Hoopl.Block: foldBlockNodesB :: forall n a. (forall e x. n e x -> a -> a) -> (forall e x. Block n e x -> IndexedCO x a a -> IndexedCO e a a)
+ Hoopl.Block: foldBlockNodesB :: forall n a. (forall e x. n e x -> a -> a) -> forall e x. Block n e x -> IndexedCO x a a -> IndexedCO e a a
- Hoopl.Block: foldBlockNodesB3 :: forall n a b c. (n C O -> b -> c, n O O -> b -> b, n O C -> a -> b) -> (forall e x. Block n e x -> IndexedCO x a b -> IndexedCO e c b)
+ Hoopl.Block: foldBlockNodesB3 :: forall n a b c. (n C O -> b -> c, n O O -> b -> b, n O C -> a -> b) -> forall e x. Block n e x -> IndexedCO x a b -> IndexedCO e c b
- Hoopl.Block: foldBlockNodesF :: forall n a. (forall e x. n e x -> a -> a) -> (forall e x. Block n e x -> IndexedCO e a a -> IndexedCO x a a)
+ Hoopl.Block: foldBlockNodesF :: forall n a. (forall e x. n e x -> a -> a) -> forall e x. Block n e x -> IndexedCO e a a -> IndexedCO x a a
- Hoopl.Block: mapBlock' :: (forall e x. n e x -> n' e x) -> (Block n e x -> Block n' e x)
+ Hoopl.Block: mapBlock' :: (forall e x. n e x -> n' e x) -> Block n e x -> Block n' e x
- Hoopl.Dataflow: joinOutFacts :: (NonLocal n) => DataflowLattice f -> n e C -> FactBase f -> f
+ Hoopl.Dataflow: joinOutFacts :: NonLocal n => DataflowLattice f -> n e C -> FactBase f -> f
- Hoopl.Graph: addBlock :: NonLocal thing => thing C C -> LabelMap (thing C C) -> LabelMap (thing C C)
+ Hoopl.Graph: addBlock :: (NonLocal block, HasDebugCallStack) => block C C -> LabelMap (block C C) -> LabelMap (block C C)
- Hoopl.Graph: mapGraphBlocks :: forall block n block' n' e x. (forall e x. block n e x -> block' n' e x) -> (Graph' block n e x -> Graph' block' n' e x)
+ Hoopl.Graph: mapGraphBlocks :: forall block n block' n' e x. (forall e x. block n e x -> block' n' e x) -> Graph' block n e x -> Graph' block' n' e x
- HsBinds: ABE :: IdP p -> IdP p -> HsWrapper -> TcSpecPrags -> ABExport p
+ HsBinds: ABE :: XABE p -> IdP p -> IdP p -> HsWrapper -> TcSpecPrags -> ABExport p
- HsBinds: AbsBinds :: [TyVar] -> [EvVar] -> [ABExport idL] -> [TcEvBinds] -> LHsBinds idL -> Bool -> HsBindLR idL idR
+ HsBinds: AbsBinds :: XAbsBinds idL idR -> [TyVar] -> [EvVar] -> [ABExport idL] -> [TcEvBinds] -> LHsBinds idL -> Bool -> HsBindLR idL idR
- HsBinds: ClassOpSig :: Bool -> [Located (IdP pass)] -> (LHsSigType pass) -> Sig pass
+ HsBinds: ClassOpSig :: XClassOpSig pass -> Bool -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
- HsBinds: CompleteMatchSig :: SourceText -> (Located [Located (IdP pass)]) -> (Maybe (Located (IdP pass))) -> Sig pass
+ HsBinds: CompleteMatchSig :: XCompleteMatchSig pass -> SourceText -> Located [Located (IdP pass)] -> Maybe (Located (IdP pass)) -> Sig pass
- HsBinds: EmptyLocalBinds :: HsLocalBindsLR idL idR
+ HsBinds: EmptyLocalBinds :: XEmptyLocalBinds idL idR -> HsLocalBindsLR idL idR
- HsBinds: ExplicitBidirectional :: (MatchGroup id (LHsExpr id)) -> HsPatSynDir id
+ HsBinds: ExplicitBidirectional :: MatchGroup id (LHsExpr id) -> HsPatSynDir id
- HsBinds: FixSig :: (FixitySig pass) -> Sig pass
+ HsBinds: FixSig :: XFixSig pass -> FixitySig pass -> Sig pass
- HsBinds: FixitySig :: [Located (IdP pass)] -> Fixity -> FixitySig pass
+ HsBinds: FixitySig :: XFixitySig pass -> [Located (IdP pass)] -> Fixity -> FixitySig pass
- HsBinds: FunBind :: Located (IdP idL) -> MatchGroup idR (LHsExpr idR) -> HsWrapper -> PostRn idL NameSet -> [Tickish Id] -> HsBindLR idL idR
+ HsBinds: FunBind :: XFunBind idL idR -> Located (IdP idL) -> MatchGroup idR (LHsExpr idR) -> HsWrapper -> [Tickish Id] -> HsBindLR idL idR
- HsBinds: HsIPBinds :: (HsIPBinds idR) -> HsLocalBindsLR idL idR
+ HsBinds: HsIPBinds :: XHsIPBinds idL idR -> HsIPBinds idR -> HsLocalBindsLR idL idR
- HsBinds: HsValBinds :: (HsValBindsLR idL idR) -> HsLocalBindsLR idL idR
+ HsBinds: HsValBinds :: XHsValBinds idL idR -> HsValBindsLR idL idR -> HsLocalBindsLR idL idR
- HsBinds: IPBind :: (Either (Located HsIPName) (IdP id)) -> (LHsExpr id) -> IPBind id
+ HsBinds: IPBind :: XCIPBind id -> Either (Located HsIPName) (IdP id) -> LHsExpr id -> IPBind id
- HsBinds: IPBinds :: [LIPBind id] -> TcEvBinds -> HsIPBinds id
+ HsBinds: IPBinds :: XIPBinds id -> [LIPBind id] -> HsIPBinds id
- HsBinds: IdSig :: Id -> Sig pass
+ HsBinds: IdSig :: XIdSig pass -> Id -> Sig pass
- HsBinds: InlineSig :: (Located (IdP pass)) -> InlinePragma -> Sig pass
+ HsBinds: InlineSig :: XInlineSig pass -> Located (IdP pass) -> InlinePragma -> Sig pass
- HsBinds: MinimalSig :: SourceText -> (LBooleanFormula (Located (IdP pass))) -> Sig pass
+ HsBinds: MinimalSig :: XMinimalSig pass -> SourceText -> LBooleanFormula (Located (IdP pass)) -> Sig pass
- HsBinds: PSB :: Located (IdP idL) -> PostRn idR NameSet -> HsPatSynDetails (Located (IdP idR)) -> LPat idR -> HsPatSynDir idR -> PatSynBind idL idR
+ HsBinds: PSB :: XPSB idL idR -> Located (IdP idL) -> HsPatSynDetails (Located (IdP idR)) -> LPat idR -> HsPatSynDir idR -> PatSynBind idL idR
- HsBinds: PatBind :: LPat idL -> GRHSs idR (LHsExpr idR) -> PostTc idR Type -> PostRn idL NameSet -> ([Tickish Id], [[Tickish Id]]) -> HsBindLR idL idR
+ HsBinds: PatBind :: XPatBind idL idR -> LPat idL -> GRHSs idR (LHsExpr idR) -> ([Tickish Id], [[Tickish Id]]) -> HsBindLR idL idR
- HsBinds: PatSynBind :: (PatSynBind idL idR) -> HsBindLR idL idR
+ HsBinds: PatSynBind :: XPatSynBind idL idR -> PatSynBind idL idR -> HsBindLR idL idR
- HsBinds: PatSynSig :: [Located (IdP pass)] -> (LHsSigType pass) -> Sig pass
+ HsBinds: PatSynSig :: XPatSynSig pass -> [Located (IdP pass)] -> LHsSigType pass -> Sig pass
- HsBinds: SCCFunSig :: SourceText -> (Located (IdP pass)) -> (Maybe (Located StringLiteral)) -> Sig pass
+ HsBinds: SCCFunSig :: XSCCFunSig pass -> SourceText -> Located (IdP pass) -> Maybe (Located StringLiteral) -> Sig pass
- HsBinds: SpecInstSig :: SourceText -> (LHsSigType pass) -> Sig pass
+ HsBinds: SpecInstSig :: XSpecInstSig pass -> SourceText -> LHsSigType pass -> Sig pass
- HsBinds: SpecSig :: (Located (IdP pass)) -> [LHsSigType pass] -> InlinePragma -> Sig pass
+ HsBinds: SpecSig :: XSpecSig pass -> Located (IdP pass) -> [LHsSigType pass] -> InlinePragma -> Sig pass
- HsBinds: TypeSig :: [Located (IdP pass)] -> (LHsSigWcType pass) -> Sig pass
+ HsBinds: TypeSig :: XTypeSig pass -> [Located (IdP pass)] -> LHsSigWcType pass -> Sig pass
- HsBinds: VarBind :: IdP idL -> LHsExpr idR -> Bool -> HsBindLR idL idR
+ HsBinds: VarBind :: XVarBind idL idR -> IdP idL -> LHsExpr idR -> Bool -> HsBindLR idL idR
- HsBinds: [pat_rhs_ty] :: HsBindLR idL idR -> PostTc idR Type
+ HsBinds: [pat_rhs_ty] :: NPatBindTc -> Type
- HsBinds: emptyLocalBinds :: HsLocalBindsLR a b
+ HsBinds: emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)
- HsBinds: emptyValBindsIn :: HsValBindsLR a b
+ HsBinds: emptyValBindsIn :: HsValBindsLR (GhcPass a) (GhcPass b)
- HsBinds: emptyValBindsOut :: HsValBindsLR a b
+ HsBinds: emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)
- HsBinds: isEmptyValBinds :: HsValBindsLR a b -> Bool
+ HsBinds: isEmptyValBinds :: HsValBindsLR (GhcPass a) (GhcPass b) -> Bool
- HsBinds: plusHsValBinds :: HsValBinds a -> HsValBinds a -> HsValBinds a
+ HsBinds: plusHsValBinds :: HsValBinds (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)
- HsBinds: pprLHsBinds :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => LHsBindsLR idL idR -> SDoc
+ HsBinds: pprLHsBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => LHsBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- HsBinds: pprLHsBindsForUser :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, SourceTextX id2, OutputableBndrId id2) => LHsBindsLR idL idR -> [LSig id2] -> [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: pprMinimalSig :: OutputableBndr name => LBooleanFormula (Located name) -> SDoc
- HsBinds: pprSpec :: (OutputableBndr id) => id -> SDoc -> InlinePragma -> SDoc
+ HsBinds: pprSpec :: OutputableBndr id => id -> SDoc -> InlinePragma -> SDoc
- HsBinds: pprVarSig :: (OutputableBndr id) => [id] -> SDoc -> SDoc
+ HsBinds: pprVarSig :: OutputableBndr id => [id] -> SDoc -> SDoc
- HsBinds: ppr_monobind :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => HsBindLR idL idR -> SDoc
+ HsBinds: ppr_monobind :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsBindLR (GhcPass idL) (GhcPass idR) -> SDoc
- HsBinds: ppr_sig :: (SourceTextX pass, OutputableBndrId pass) => Sig pass -> SDoc
+ HsBinds: ppr_sig :: OutputableBndrId (GhcPass p) => Sig (GhcPass p) -> SDoc
- HsDecls: AnnD :: (AnnDecl id) -> HsDecl id
+ HsDecls: AnnD :: XAnnD p -> AnnDecl p -> HsDecl p
- HsDecls: CExport :: (Located CExportSpec) -> (Located SourceText) -> ForeignExport
+ HsDecls: CExport :: Located CExportSpec -> Located SourceText -> ForeignExport
- HsDecls: CImport :: (Located CCallConv) -> (Located Safety) -> (Maybe Header) -> CImportSpec -> (Located SourceText) -> ForeignImport
+ HsDecls: CImport :: Located CCallConv -> Located Safety -> Maybe Header -> CImportSpec -> Located SourceText -> ForeignImport
- HsDecls: ClassDecl :: LHsContext pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> [Located (FunDep (Located (IdP pass)))] -> [LSig pass] -> LHsBinds pass -> [LFamilyDecl pass] -> [LTyFamDefltEqn pass] -> [LDocDecl] -> PostRn pass NameSet -> TyClDecl pass
+ HsDecls: ClassDecl :: XClassDecl pass -> LHsContext pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> [Located (FunDep (Located (IdP pass)))] -> [LSig pass] -> LHsBinds pass -> [LFamilyDecl pass] -> [LTyFamDefltEqn pass] -> [LDocDecl] -> TyClDecl pass
- HsDecls: ClosedTypeFamily :: (Maybe [LTyFamInstEqn pass]) -> FamilyInfo pass
+ HsDecls: ClosedTypeFamily :: Maybe [LTyFamInstEqn pass] -> FamilyInfo pass
- HsDecls: ClsInstD :: ClsInstDecl pass -> InstDecl pass
+ HsDecls: ClsInstD :: XClsInstD pass -> ClsInstDecl pass -> InstDecl pass
- HsDecls: ClsInstDecl :: LHsSigType pass -> LHsBinds pass -> [LSig pass] -> [LTyFamInstDecl pass] -> [LDataFamInstDecl pass] -> Maybe (Located OverlapMode) -> ClsInstDecl pass
+ HsDecls: ClsInstDecl :: XCClsInstDecl pass -> LHsSigType pass -> LHsBinds pass -> [LSig pass] -> [LTyFamInstDecl pass] -> [LDataFamInstDecl pass] -> Maybe (Located OverlapMode) -> ClsInstDecl pass
- HsDecls: ConDeclGADT :: [Located (IdP pass)] -> LHsSigType pass -> Maybe LHsDocString -> ConDecl 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 :: Located (IdP pass) -> Maybe (LHsQTyVars pass) -> Maybe (LHsContext pass) -> HsConDeclDetails 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 :: Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> HsDataDefn pass -> PostRn pass Bool -> PostRn pass NameSet -> TyClDecl pass
+ HsDecls: DataDecl :: XDataDecl pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> HsDataDefn pass -> TyClDecl pass
- HsDecls: DataFamInstD :: DataFamInstDecl pass -> InstDecl pass
+ HsDecls: DataFamInstD :: XDataFamInstD pass -> DataFamInstDecl pass -> InstDecl pass
- HsDecls: DefD :: (DefaultDecl id) -> HsDecl id
+ HsDecls: DefD :: XDefD p -> DefaultDecl p -> HsDecl p
- HsDecls: DefaultDecl :: [LHsType pass] -> DefaultDecl pass
+ HsDecls: DefaultDecl :: XCDefaultDecl pass -> [LHsType pass] -> DefaultDecl pass
- HsDecls: DerivD :: (DerivDecl id) -> HsDecl id
+ HsDecls: DerivD :: XDerivD p -> DerivDecl p -> HsDecl p
- HsDecls: DerivDecl :: LHsSigType pass -> Maybe (Located DerivStrategy) -> Maybe (Located OverlapMode) -> DerivDecl pass
+ HsDecls: DerivDecl :: XCDerivDecl pass -> LHsSigWcType pass -> Maybe (LDerivStrategy pass) -> Maybe (Located OverlapMode) -> DerivDecl pass
- HsDecls: DocD :: (DocDecl) -> HsDecl id
+ HsDecls: DocD :: XDocD p -> DocDecl -> HsDecl p
- HsDecls: FamDecl :: FamilyDecl pass -> TyClDecl pass
+ HsDecls: FamDecl :: XFamDecl pass -> FamilyDecl pass -> TyClDecl pass
- HsDecls: FamEqn :: Located (IdP pass) -> pats -> LexicalFixity -> rhs -> FamEqn pass pats rhs
+ HsDecls: FamEqn :: XCFamEqn pass pats rhs -> Located (IdP pass) -> pats -> LexicalFixity -> rhs -> FamEqn pass pats rhs
- HsDecls: FamilyDecl :: FamilyInfo pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LFamilyResultSig pass -> Maybe (LInjectivityAnn pass) -> FamilyDecl pass
+ HsDecls: FamilyDecl :: XCFamilyDecl pass -> FamilyInfo pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LFamilyResultSig pass -> Maybe (LInjectivityAnn pass) -> FamilyDecl pass
- HsDecls: ForD :: (ForeignDecl id) -> HsDecl id
+ HsDecls: ForD :: XForD p -> ForeignDecl p -> HsDecl p
- HsDecls: ForeignExport :: Located (IdP pass) -> LHsSigType pass -> PostTc pass Coercion -> ForeignExport -> ForeignDecl pass
+ HsDecls: ForeignExport :: XForeignExport pass -> Located (IdP pass) -> LHsSigType pass -> ForeignExport -> ForeignDecl pass
- HsDecls: ForeignImport :: Located (IdP pass) -> LHsSigType pass -> PostTc pass Coercion -> ForeignImport -> ForeignDecl pass
+ HsDecls: ForeignImport :: XForeignImport pass -> Located (IdP pass) -> LHsSigType pass -> ForeignImport -> ForeignDecl pass
- HsDecls: HsAnnotation :: SourceText -> (AnnProvenance (IdP pass)) -> (Located (HsExpr pass)) -> AnnDecl pass
+ HsDecls: HsAnnotation :: XHsAnnotation pass -> SourceText -> AnnProvenance (IdP pass) -> Located (HsExpr pass) -> AnnDecl pass
- HsDecls: HsDataDefn :: NewOrData -> LHsContext pass -> Maybe (Located CType) -> Maybe (LHsKind pass) -> [LConDecl pass] -> HsDeriving pass -> HsDataDefn pass
+ HsDecls: HsDataDefn :: XCHsDataDefn pass -> NewOrData -> LHsContext pass -> Maybe (Located CType) -> Maybe (LHsKind pass) -> [LConDecl pass] -> HsDeriving pass -> HsDataDefn pass
- HsDecls: HsDerivingClause :: Maybe (Located DerivStrategy) -> Located [LHsSigType pass] -> HsDerivingClause pass
+ HsDecls: HsDerivingClause :: XCHsDerivingClause pass -> Maybe (LDerivStrategy pass) -> Located [LHsSigType pass] -> HsDerivingClause pass
- HsDecls: HsGroup :: HsValBinds id -> [LSpliceDecl id] -> [TyClGroup id] -> [LDerivDecl id] -> [LFixitySig id] -> [LDefaultDecl id] -> [LForeignDecl id] -> [LWarnDecls id] -> [LAnnDecl id] -> [LRuleDecls id] -> [LVectDecl id] -> [LDocDecl] -> HsGroup id
+ 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 :: (Located (SourceText, RuleName)) -> Activation -> [LRuleBndr pass] -> (Located (HsExpr pass)) -> (PostRn pass NameSet) -> (Located (HsExpr pass)) -> (PostRn pass NameSet) -> RuleDecl pass
+ HsDecls: HsRule :: XHsRule pass -> Located (SourceText, RuleName) -> Activation -> [LRuleBndr pass] -> Located (HsExpr pass) -> Located (HsExpr pass) -> RuleDecl pass
- HsDecls: HsRules :: SourceText -> [LRuleDecl pass] -> RuleDecls pass
+ HsDecls: HsRules :: XCRuleDecls pass -> SourceText -> [LRuleDecl pass] -> RuleDecls pass
- HsDecls: InjectivityAnn :: (Located (IdP pass)) -> [Located (IdP pass)] -> InjectivityAnn pass
+ HsDecls: InjectivityAnn :: Located (IdP pass) -> [Located (IdP pass)] -> InjectivityAnn pass
- HsDecls: InstD :: (InstDecl id) -> HsDecl id
+ HsDecls: InstD :: XInstD p -> InstDecl p -> HsDecl p
- HsDecls: KindSig :: (LHsKind pass) -> FamilyResultSig pass
+ HsDecls: KindSig :: XCKindSig pass -> LHsKind pass -> FamilyResultSig pass
- HsDecls: NoSig :: FamilyResultSig pass
+ HsDecls: NoSig :: XNoSig pass -> FamilyResultSig pass
- HsDecls: RoleAnnotD :: (RoleAnnotDecl id) -> HsDecl id
+ HsDecls: RoleAnnotD :: XRoleAnnotD p -> RoleAnnotDecl p -> HsDecl p
- HsDecls: RoleAnnotDecl :: (Located (IdP pass)) -> [Located (Maybe Role)] -> RoleAnnotDecl pass
+ HsDecls: RoleAnnotDecl :: XCRoleAnnotDecl pass -> Located (IdP pass) -> [Located (Maybe Role)] -> RoleAnnotDecl pass
- HsDecls: RuleBndr :: (Located (IdP pass)) -> RuleBndr pass
+ HsDecls: RuleBndr :: XCRuleBndr pass -> Located (IdP pass) -> RuleBndr pass
- HsDecls: RuleBndrSig :: (Located (IdP pass)) -> (LHsSigWcType pass) -> RuleBndr pass
+ HsDecls: RuleBndrSig :: XRuleBndrSig pass -> Located (IdP pass) -> LHsSigWcType pass -> RuleBndr pass
- HsDecls: RuleD :: (RuleDecls id) -> HsDecl id
+ HsDecls: RuleD :: XRuleD p -> RuleDecls p -> HsDecl p
- HsDecls: SigD :: (Sig id) -> HsDecl id
+ HsDecls: SigD :: XSigD p -> Sig p -> HsDecl p
- HsDecls: SpliceD :: (SpliceDecl id) -> HsDecl id
+ HsDecls: SpliceD :: XSpliceD p -> SpliceDecl p -> HsDecl p
- HsDecls: SpliceDecl :: (Located (HsSplice id)) -> SpliceExplicitFlag -> SpliceDecl id
+ HsDecls: SpliceDecl :: XSpliceDecl p -> Located (HsSplice p) -> SpliceExplicitFlag -> SpliceDecl p
- HsDecls: SynDecl :: Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LHsType pass -> PostRn pass NameSet -> TyClDecl pass
+ HsDecls: SynDecl :: XSynDecl pass -> Located (IdP pass) -> LHsQTyVars pass -> LexicalFixity -> LHsType pass -> TyClDecl pass
- HsDecls: TyClD :: (TyClDecl id) -> HsDecl id
+ HsDecls: TyClD :: XTyClD p -> TyClDecl p -> HsDecl p
- HsDecls: TyClGroup :: [LTyClDecl pass] -> [LRoleAnnotDecl pass] -> [LInstDecl pass] -> TyClGroup pass
+ HsDecls: TyClGroup :: XCTyClGroup pass -> [LTyClDecl pass] -> [LRoleAnnotDecl pass] -> [LInstDecl pass] -> TyClGroup pass
- HsDecls: TyFamInstD :: TyFamInstDecl pass -> InstDecl pass
+ HsDecls: TyFamInstD :: XTyFamInstD pass -> TyFamInstDecl pass -> InstDecl pass
- HsDecls: TyVarSig :: (LHsTyVarBndr pass) -> FamilyResultSig pass
+ HsDecls: TyVarSig :: XTyVarSig pass -> LHsTyVarBndr pass -> FamilyResultSig pass
- HsDecls: TypeAnnProvenance :: (Located name) -> AnnProvenance name
+ HsDecls: TypeAnnProvenance :: Located name -> AnnProvenance name
- HsDecls: ValD :: (HsBind id) -> HsDecl id
+ HsDecls: ValD :: XValD p -> HsBind p -> HsDecl p
- HsDecls: ValueAnnProvenance :: (Located name) -> AnnProvenance name
+ HsDecls: ValueAnnProvenance :: Located name -> AnnProvenance name
- HsDecls: Warning :: [Located (IdP pass)] -> WarningTxt -> WarnDecl pass
+ HsDecls: Warning :: XWarning pass -> [Located (IdP pass)] -> WarningTxt -> WarnDecl pass
- HsDecls: WarningD :: (WarnDecls id) -> HsDecl id
+ HsDecls: WarningD :: XWarningD p -> WarnDecls p -> HsDecl p
- HsDecls: Warnings :: SourceText -> [LWarnDecl pass] -> WarnDecls pass
+ HsDecls: Warnings :: XWarnings pass -> SourceText -> [LWarnDecl pass] -> WarnDecls pass
- HsDecls: [con_qvars] :: ConDecl pass -> Maybe (LHsQTyVars pass)
+ HsDecls: [con_qvars] :: ConDecl pass -> LHsQTyVars pass
- HsDecls: [deriv_clause_strategy] :: HsDerivingClause pass -> Maybe (Located DerivStrategy)
+ HsDecls: [deriv_clause_strategy] :: HsDerivingClause pass -> Maybe (LDerivStrategy pass)
- HsDecls: [deriv_strategy] :: DerivDecl pass -> Maybe (Located DerivStrategy)
+ HsDecls: [deriv_strategy] :: DerivDecl pass -> Maybe (LDerivStrategy pass)
- HsDecls: [deriv_type] :: DerivDecl pass -> LHsSigType pass
+ HsDecls: [deriv_type] :: DerivDecl pass -> LHsSigWcType pass
- HsDecls: [hs_annds] :: HsGroup id -> [LAnnDecl id]
+ HsDecls: [hs_annds] :: HsGroup p -> [LAnnDecl p]
- HsDecls: [hs_defds] :: HsGroup id -> [LDefaultDecl id]
+ HsDecls: [hs_defds] :: HsGroup p -> [LDefaultDecl p]
- HsDecls: [hs_derivds] :: HsGroup id -> [LDerivDecl id]
+ HsDecls: [hs_derivds] :: HsGroup p -> [LDerivDecl p]
- HsDecls: [hs_docs] :: HsGroup id -> [LDocDecl]
+ HsDecls: [hs_docs] :: HsGroup p -> [LDocDecl]
- HsDecls: [hs_fixds] :: HsGroup id -> [LFixitySig id]
+ HsDecls: [hs_fixds] :: HsGroup p -> [LFixitySig p]
- HsDecls: [hs_fords] :: HsGroup id -> [LForeignDecl id]
+ HsDecls: [hs_fords] :: HsGroup p -> [LForeignDecl p]
- HsDecls: [hs_ruleds] :: HsGroup id -> [LRuleDecls id]
+ HsDecls: [hs_ruleds] :: HsGroup p -> [LRuleDecls p]
- HsDecls: [hs_splcds] :: HsGroup id -> [LSpliceDecl id]
+ HsDecls: [hs_splcds] :: HsGroup p -> [LSpliceDecl p]
- HsDecls: [hs_tyclds] :: HsGroup id -> [TyClGroup id]
+ HsDecls: [hs_tyclds] :: HsGroup p -> [TyClGroup p]
- HsDecls: [hs_valds] :: HsGroup id -> HsValBinds id
+ HsDecls: [hs_valds] :: HsGroup p -> HsValBinds p
- HsDecls: [hs_warnds] :: HsGroup id -> [LWarnDecls id]
+ HsDecls: [hs_warnds] :: HsGroup p -> [LWarnDecls p]
- HsDecls: [tcdDataCusk] :: TyClDecl pass -> PostRn pass Bool
+ HsDecls: [tcdDataCusk] :: DataDeclRn -> Bool
- HsDecls: [tcdFVs] :: TyClDecl pass -> PostRn pass NameSet
+ HsDecls: [tcdFVs] :: DataDeclRn -> NameSet
- HsDecls: appendGroups :: HsGroup a -> HsGroup a -> HsGroup a
+ HsDecls: appendGroups :: HsGroup (GhcPass p) -> HsGroup (GhcPass p) -> HsGroup (GhcPass p)
- HsDecls: data HsDecl id
+ HsDecls: data HsDecl p
- HsDecls: data HsGroup id
+ HsDecls: data HsGroup p
- HsDecls: data SpliceDecl id
+ HsDecls: data SpliceDecl p
- HsDecls: emptyRdrGroup :: HsGroup a
+ HsDecls: emptyRdrGroup :: HsGroup (GhcPass p)
- HsDecls: emptyRnGroup :: HsGroup a
+ HsDecls: emptyRnGroup :: HsGroup (GhcPass p)
- HsDecls: emptyTyClGroup :: TyClGroup pass
+ HsDecls: emptyTyClGroup :: TyClGroup (GhcPass p)
- HsDecls: mkTyClGroup :: [LTyClDecl pass] -> [LInstDecl pass] -> TyClGroup pass
+ HsDecls: mkTyClGroup :: [LTyClDecl (GhcPass p)] -> [LInstDecl (GhcPass p)] -> TyClGroup (GhcPass p)
- HsDecls: pprDataFamInstFlavour :: DataFamInstDecl pass -> SDoc
+ HsDecls: pprDataFamInstFlavour :: DataFamInstDecl (GhcPass p) -> SDoc
- HsDecls: pprFamInstLHS :: (SourceTextX pass, OutputableBndrId pass) => Located (IdP pass) -> HsTyPats pass -> LexicalFixity -> HsContext pass -> Maybe (LHsKind pass) -> SDoc
+ HsDecls: pprFamInstLHS :: OutputableBndrId (GhcPass p) => Located (IdP (GhcPass p)) -> HsTyPats (GhcPass p) -> LexicalFixity -> HsContext (GhcPass p) -> Maybe (LHsKind (GhcPass p)) -> SDoc
- HsDecls: pprTyClDeclFlavour :: TyClDecl a -> SDoc
+ HsDecls: pprTyClDeclFlavour :: TyClDecl (GhcPass p) -> SDoc
- HsDecls: roleAnnotDeclName :: RoleAnnotDecl pass -> (IdP pass)
+ HsDecls: roleAnnotDeclName :: RoleAnnotDecl pass -> IdP pass
- HsDecls: tcdName :: TyClDecl pass -> (IdP pass)
+ HsDecls: tcdName :: TyClDecl pass -> IdP pass
- HsDecls: tyFamInstDeclName :: TyFamInstDecl pass -> (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 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 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 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 LConDecl pass = Located (ConDecl pass) May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a GADT constructor list
+ HsDecls: type LConDecl pass = Located (ConDecl pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a GADT constructor list"
- HsDecls: type LHsDecl id = Located (HsDecl id) When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'
+ HsDecls: type LHsDecl p = Located (HsDecl p) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' "
- HsDecls: type LTyFamInstEqn pass = Located (TyFamInstEqn pass) May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a list
+ HsDecls: type LTyFamInstEqn pass = Located (TyFamInstEqn pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi' when in a list"
- HsExpr: ApplicativeArgMany :: [ExprLStmt idL] -> (HsExpr idL) -> (LPat idL) -> ApplicativeArg idL idR
+ HsExpr: ApplicativeArgMany :: XApplicativeArgMany idL -> [ExprLStmt idL] -> HsExpr idL -> LPat idL -> ApplicativeArg idL
- HsExpr: ApplicativeArgOne :: (LPat idL) -> (LHsExpr idL) -> Bool -> ApplicativeArg idL idR
+ HsExpr: ApplicativeArgOne :: XApplicativeArgOne idL -> LPat idL -> LHsExpr idL -> Bool -> ApplicativeArg idL
- HsExpr: ApplicativeStmt :: [(SyntaxExpr idR, ApplicativeArg idL idR)] -> (Maybe (SyntaxExpr idR)) -> (PostTc idR Type) -> StmtLR idL idR body
+ HsExpr: ApplicativeStmt :: XApplicativeStmt idL idR body -> [(SyntaxExpr idR, ApplicativeArg idL)] -> Maybe (SyntaxExpr idR) -> StmtLR idL idR body
- HsExpr: ArithSeq :: PostTcExpr -> (Maybe (SyntaxExpr p)) -> (ArithSeqInfo p) -> HsExpr p
+ HsExpr: ArithSeq :: XArithSeq p -> Maybe (SyntaxExpr p) -> ArithSeqInfo p -> HsExpr p
- HsExpr: BindStmt :: (LPat idL) -> body -> (SyntaxExpr idR) -> (SyntaxExpr idR) -> (PostTc idR Type) -> StmtLR idL idR body
+ HsExpr: BindStmt :: XBindStmt idL idR body -> LPat idL -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: BodyStmt :: body -> (SyntaxExpr idR) -> (SyntaxExpr idR) -> (PostTc idR Type) -> StmtLR idL idR body
+ HsExpr: BodyStmt :: XBodyStmt idL idR body -> body -> SyntaxExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: DecBrG :: (HsGroup p) -> HsBracket p
+ HsExpr: DecBrG :: XDecBrG p -> HsGroup p -> HsBracket p
- HsExpr: DecBrL :: [LHsDecl p] -> HsBracket p
+ HsExpr: DecBrL :: XDecBrL p -> [LHsDecl p] -> HsBracket p
- HsExpr: EAsPat :: (Located (IdP p)) -> (LHsExpr p) -> HsExpr p
+ HsExpr: EAsPat :: XEAsPat p -> Located (IdP p) -> LHsExpr p -> HsExpr p
- HsExpr: ELazyPat :: (LHsExpr p) -> HsExpr p
+ HsExpr: ELazyPat :: XELazyPat p -> LHsExpr p -> HsExpr p
- HsExpr: EViewPat :: (LHsExpr p) -> (LHsExpr p) -> HsExpr p
+ HsExpr: EViewPat :: XEViewPat p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: EWildPat :: HsExpr p
+ HsExpr: EWildPat :: XEWildPat p -> HsExpr p
- HsExpr: ExpBr :: (LHsExpr p) -> HsBracket p
+ HsExpr: ExpBr :: XExpBr p -> LHsExpr p -> HsBracket p
- HsExpr: ExplicitList :: (PostTc p Type) -> (Maybe (SyntaxExpr p)) -> [LHsExpr p] -> HsExpr p
+ HsExpr: ExplicitList :: XExplicitList p -> Maybe (SyntaxExpr p) -> [LHsExpr p] -> HsExpr p
- HsExpr: ExplicitSum :: ConTag -> Arity -> (LHsExpr p) -> (PostTc p [Type]) -> HsExpr p
+ HsExpr: ExplicitSum :: XExplicitSum p -> ConTag -> Arity -> LHsExpr p -> HsExpr p
- HsExpr: ExplicitTuple :: [LHsTupArg p] -> Boxity -> HsExpr p
+ HsExpr: ExplicitTuple :: XExplicitTuple p -> [LHsTupArg p] -> Boxity -> HsExpr p
- HsExpr: ExprWithTySig :: (LHsExpr p) -> (LHsSigWcType p) -> HsExpr p
+ HsExpr: ExprWithTySig :: XExprWithTySig p -> LHsExpr p -> HsExpr p
- HsExpr: From :: (LHsExpr id) -> ArithSeqInfo id
+ HsExpr: From :: LHsExpr id -> ArithSeqInfo id
- HsExpr: FromThen :: (LHsExpr id) -> (LHsExpr id) -> ArithSeqInfo id
+ HsExpr: FromThen :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
- HsExpr: FromThenTo :: (LHsExpr id) -> (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: FromTo :: LHsExpr id -> LHsExpr id -> ArithSeqInfo id
- HsExpr: GRHS :: [GuardLStmt id] -> body -> GRHS id body
+ HsExpr: GRHS :: XCGRHS p body -> [GuardLStmt p] -> body -> GRHS p body
- HsExpr: GRHSs :: [LGRHS p body] -> LHsLocalBinds p -> GRHSs p body
+ HsExpr: GRHSs :: XCGRHSs p body -> [LGRHS p body] -> LHsLocalBinds p -> GRHSs p body
- HsExpr: HsApp :: (LHsExpr p) -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsApp :: XApp p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: HsAppType :: (LHsExpr p) -> (LHsWcType p) -> HsExpr p
+ HsExpr: HsAppType :: XAppTypeE p -> LHsExpr p -> HsExpr p
- HsExpr: HsArrApp :: (LHsExpr p) -> (LHsExpr p) -> (PostTc p Type) -> HsArrAppType -> Bool -> HsExpr p
+ HsExpr: HsArrApp :: XArrApp p -> LHsExpr p -> LHsExpr p -> HsArrAppType -> Bool -> HsExpr p
- HsExpr: HsArrForm :: (LHsExpr p) -> (Maybe Fixity) -> [LHsCmdTop p] -> HsExpr p
+ HsExpr: HsArrForm :: XArrForm p -> LHsExpr p -> Maybe Fixity -> [LHsCmdTop p] -> HsExpr p
- HsExpr: HsBinTick :: Int -> Int -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsBinTick :: XBinTick p -> Int -> Int -> LHsExpr p -> HsExpr p
- HsExpr: HsBracket :: (HsBracket p) -> HsExpr p
+ HsExpr: HsBracket :: XBracket p -> HsBracket p -> HsExpr p
- HsExpr: HsCase :: (LHsExpr p) -> (MatchGroup p (LHsExpr p)) -> HsExpr p
+ HsExpr: HsCase :: XCase p -> LHsExpr p -> MatchGroup p (LHsExpr p) -> HsExpr p
- HsExpr: HsCmdApp :: (LHsCmd id) -> (LHsExpr id) -> HsCmd id
+ HsExpr: HsCmdApp :: XCmdApp id -> LHsCmd id -> LHsExpr id -> HsCmd id
- HsExpr: HsCmdArrApp :: (LHsExpr id) -> (LHsExpr id) -> (PostTc id Type) -> HsArrAppType -> Bool -> HsCmd id
+ HsExpr: HsCmdArrApp :: XCmdArrApp id -> LHsExpr id -> LHsExpr id -> HsArrAppType -> Bool -> HsCmd id
- HsExpr: HsCmdArrForm :: (LHsExpr id) -> LexicalFixity -> (Maybe Fixity) -> [LHsCmdTop id] -> HsCmd id
+ HsExpr: HsCmdArrForm :: XCmdArrForm id -> LHsExpr id -> LexicalFixity -> Maybe Fixity -> [LHsCmdTop id] -> HsCmd id
- HsExpr: HsCmdCase :: (LHsExpr id) -> (MatchGroup id (LHsCmd id)) -> HsCmd id
+ HsExpr: HsCmdCase :: XCmdCase id -> LHsExpr id -> MatchGroup id (LHsCmd id) -> HsCmd id
- HsExpr: HsCmdDo :: (Located [CmdLStmt id]) -> (PostTc id Type) -> HsCmd id
+ HsExpr: HsCmdDo :: XCmdDo id -> Located [CmdLStmt id] -> HsCmd id
- HsExpr: HsCmdIf :: (Maybe (SyntaxExpr id)) -> (LHsExpr id) -> (LHsCmd id) -> (LHsCmd id) -> HsCmd id
+ HsExpr: HsCmdIf :: XCmdIf id -> Maybe (SyntaxExpr id) -> LHsExpr id -> LHsCmd id -> LHsCmd id -> HsCmd id
- HsExpr: HsCmdLam :: (MatchGroup id (LHsCmd id)) -> HsCmd id
+ HsExpr: HsCmdLam :: XCmdLam id -> MatchGroup id (LHsCmd id) -> HsCmd id
- HsExpr: HsCmdLet :: (LHsLocalBinds id) -> (LHsCmd id) -> HsCmd id
+ HsExpr: HsCmdLet :: XCmdLet id -> LHsLocalBinds id -> LHsCmd id -> HsCmd id
- HsExpr: HsCmdPar :: (LHsCmd id) -> HsCmd id
+ HsExpr: HsCmdPar :: XCmdPar id -> LHsCmd id -> HsCmd id
- HsExpr: HsCmdTop :: (LHsCmd p) -> (PostTc p Type) -> (PostTc p Type) -> (CmdSyntaxTable p) -> HsCmdTop p
+ HsExpr: HsCmdTop :: XCmdTop p -> LHsCmd p -> HsCmdTop p
- HsExpr: HsCmdWrap :: HsWrapper -> (HsCmd id) -> HsCmd id
+ HsExpr: HsCmdWrap :: XCmdWrap id -> HsWrapper -> HsCmd id -> HsCmd id
- HsExpr: HsConLikeOut :: ConLike -> HsExpr p
+ HsExpr: HsConLikeOut :: XConLikeOut p -> ConLike -> HsExpr p
- HsExpr: HsCoreAnn :: SourceText -> StringLiteral -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsCoreAnn :: XCoreAnn p -> SourceText -> StringLiteral -> LHsExpr p -> HsExpr p
- HsExpr: HsDo :: (HsStmtContext Name) -> (Located [ExprLStmt p]) -> (PostTc p Type) -> HsExpr p
+ HsExpr: HsDo :: XDo p -> HsStmtContext Name -> Located [ExprLStmt p] -> HsExpr p
- HsExpr: HsIPVar :: HsIPName -> HsExpr p
+ HsExpr: HsIPVar :: XIPVar p -> HsIPName -> HsExpr p
- HsExpr: HsIf :: (Maybe (SyntaxExpr p)) -> (LHsExpr p) -> (LHsExpr p) -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsIf :: XIf p -> Maybe (SyntaxExpr p) -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: HsLam :: (MatchGroup p (LHsExpr p)) -> HsExpr p
+ HsExpr: HsLam :: XLam p -> MatchGroup p (LHsExpr p) -> HsExpr p
- HsExpr: HsLamCase :: (MatchGroup p (LHsExpr p)) -> HsExpr p
+ HsExpr: HsLamCase :: XLamCase p -> MatchGroup p (LHsExpr p) -> HsExpr p
- HsExpr: HsLet :: (LHsLocalBinds p) -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsLet :: XLet p -> LHsLocalBinds p -> LHsExpr p -> HsExpr p
- HsExpr: HsLit :: (HsLit p) -> HsExpr p
+ HsExpr: HsLit :: XLitE p -> HsLit p -> HsExpr p
- HsExpr: HsMultiIf :: (PostTc p Type) -> [LGRHS p (LHsExpr p)] -> HsExpr p
+ HsExpr: HsMultiIf :: XMultiIf p -> [LGRHS p (LHsExpr p)] -> HsExpr p
- HsExpr: HsOverLabel :: (Maybe (IdP p)) -> FastString -> HsExpr p
+ HsExpr: HsOverLabel :: XOverLabel p -> Maybe (IdP p) -> FastString -> HsExpr p
- HsExpr: HsOverLit :: (HsOverLit p) -> HsExpr p
+ HsExpr: HsOverLit :: XOverLitE p -> HsOverLit p -> HsExpr p
- HsExpr: HsPar :: (LHsExpr p) -> HsExpr p
+ HsExpr: HsPar :: XPar p -> LHsExpr p -> HsExpr p
- HsExpr: HsProc :: (LPat p) -> (LHsCmdTop p) -> HsExpr p
+ HsExpr: HsProc :: XProc p -> LPat p -> LHsCmdTop p -> HsExpr p
- HsExpr: HsQuasiQuote :: (IdP id) -> (IdP id) -> SrcSpan -> FastString -> HsSplice id
+ HsExpr: HsQuasiQuote :: XQuasiQuote id -> IdP id -> IdP id -> SrcSpan -> FastString -> HsSplice id
- HsExpr: HsRecFld :: (AmbiguousFieldOcc p) -> HsExpr p
+ HsExpr: HsRecFld :: XRecFld p -> AmbiguousFieldOcc p -> HsExpr p
- HsExpr: HsRnBracketOut :: (HsBracket GhcRn) -> [PendingRnSplice] -> HsExpr p
+ HsExpr: HsRnBracketOut :: XRnBracketOut p -> HsBracket GhcRn -> [PendingRnSplice] -> HsExpr p
- HsExpr: HsSCC :: SourceText -> StringLiteral -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsSCC :: XSCC p -> SourceText -> StringLiteral -> LHsExpr p -> HsExpr p
- HsExpr: HsSpliceE :: (HsSplice p) -> HsExpr p
+ HsExpr: HsSpliceE :: XSpliceE p -> HsSplice p -> HsExpr p
- HsExpr: HsSpliced :: ThModFinalizers -> (HsSplicedThing id) -> HsSplice id
+ HsExpr: HsSpliced :: XSpliced id -> ThModFinalizers -> HsSplicedThing id -> HsSplice id
- HsExpr: HsSplicedExpr :: (HsExpr id) -> HsSplicedThing id
+ HsExpr: HsSplicedExpr :: HsExpr id -> HsSplicedThing id
- HsExpr: HsSplicedPat :: (Pat id) -> HsSplicedThing id
+ HsExpr: HsSplicedPat :: Pat id -> HsSplicedThing id
- HsExpr: HsSplicedTy :: (HsType id) -> HsSplicedThing id
+ HsExpr: HsSplicedTy :: HsType id -> HsSplicedThing id
- HsExpr: HsStatic :: (PostRn p NameSet) -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsStatic :: XStatic p -> LHsExpr p -> HsExpr p
- HsExpr: HsTcBracketOut :: (HsBracket GhcRn) -> [PendingTcSplice] -> HsExpr p
+ HsExpr: HsTcBracketOut :: XTcBracketOut p -> HsBracket GhcRn -> [PendingTcSplice] -> HsExpr p
- HsExpr: HsTick :: (Tickish (IdP p)) -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsTick :: XTick p -> Tickish (IdP p) -> LHsExpr p -> HsExpr p
- HsExpr: HsTickPragma :: SourceText -> (StringLiteral, (Int, Int), (Int, Int)) -> ((SourceText, SourceText), (SourceText, SourceText)) -> (LHsExpr p) -> HsExpr p
+ HsExpr: HsTickPragma :: XTickPragma p -> SourceText -> (StringLiteral, (Int, Int), (Int, Int)) -> ((SourceText, SourceText), (SourceText, SourceText)) -> LHsExpr p -> HsExpr p
- HsExpr: HsTypedSplice :: SpliceDecoration -> (IdP id) -> (LHsExpr id) -> HsSplice id
+ HsExpr: HsTypedSplice :: XTypedSplice id -> SpliceDecoration -> IdP id -> LHsExpr id -> HsSplice id
- HsExpr: HsUnboundVar :: UnboundVar -> HsExpr p
+ HsExpr: HsUnboundVar :: XUnboundVar p -> UnboundVar -> HsExpr p
- HsExpr: HsUntypedSplice :: SpliceDecoration -> (IdP id) -> (LHsExpr id) -> HsSplice id
+ HsExpr: HsUntypedSplice :: XUntypedSplice id -> SpliceDecoration -> IdP id -> LHsExpr id -> HsSplice id
- HsExpr: HsVar :: (Located (IdP p)) -> HsExpr p
+ HsExpr: HsVar :: XVar p -> Located (IdP p) -> HsExpr p
- HsExpr: HsWrap :: HsWrapper -> (HsExpr p) -> HsExpr p
+ HsExpr: HsWrap :: XWrap p -> HsWrapper -> HsExpr p -> HsExpr p
- HsExpr: LastStmt :: body -> Bool -> (SyntaxExpr idR) -> StmtLR idL idR body
+ HsExpr: LastStmt :: XLastStmt idL idR body -> body -> Bool -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: LetStmt :: (LHsLocalBindsLR idL idR) -> StmtLR idL idR body
+ HsExpr: LetStmt :: XLetStmt idL idR body -> LHsLocalBindsLR idL idR -> StmtLR idL idR body
- HsExpr: MG :: Located [LMatch p body] -> [PostTc p Type] -> PostTc p Type -> Origin -> MatchGroup p body
+ HsExpr: MG :: XMG p body -> Located [LMatch p body] -> Origin -> MatchGroup p body
- HsExpr: Match :: HsMatchContext (NameOrRdrName (IdP p)) -> [LPat p] -> (GRHSs p body) -> Match p body
+ HsExpr: Match :: XCMatch p body -> HsMatchContext (NameOrRdrName (IdP p)) -> [LPat p] -> GRHSs p body -> Match p body
- HsExpr: Missing :: (PostTc id Type) -> HsTupArg id
+ HsExpr: Missing :: XMissing id -> HsTupArg id
- HsExpr: NegApp :: (LHsExpr p) -> (SyntaxExpr p) -> HsExpr p
+ HsExpr: NegApp :: XNegApp p -> LHsExpr p -> SyntaxExpr p -> HsExpr p
- HsExpr: OpApp :: (LHsExpr p) -> (LHsExpr p) -> (PostRn p Fixity) -> (LHsExpr p) -> HsExpr p
+ HsExpr: OpApp :: XOpApp p -> LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: ParStmt :: [ParStmtBlock idL idR] -> (HsExpr idR) -> (SyntaxExpr idR) -> (PostTc idR Type) -> StmtLR idL idR body
+ HsExpr: ParStmt :: XParStmt idL idR body -> [ParStmtBlock idL idR] -> HsExpr idR -> SyntaxExpr idR -> StmtLR idL idR body
- HsExpr: ParStmtBlock :: [ExprLStmt idL] -> [IdP idR] -> (SyntaxExpr idR) -> ParStmtBlock idL idR
+ HsExpr: ParStmtBlock :: XParStmtBlock idL idR -> [ExprLStmt idL] -> [IdP idR] -> SyntaxExpr idR -> ParStmtBlock idL idR
- HsExpr: ParStmtCtxt :: (HsStmtContext id) -> HsStmtContext id
+ HsExpr: ParStmtCtxt :: HsStmtContext id -> HsStmtContext id
- HsExpr: PatBr :: (LPat p) -> HsBracket p
+ HsExpr: PatBr :: XPatBr p -> LPat p -> HsBracket p
- HsExpr: PatGuard :: (HsMatchContext id) -> HsStmtContext id
+ HsExpr: PatGuard :: HsMatchContext id -> HsStmtContext id
- HsExpr: PendingRnSplice :: UntypedSpliceFlavour -> SplicePointName -> (LHsExpr GhcRn) -> PendingRnSplice
+ HsExpr: PendingRnSplice :: UntypedSpliceFlavour -> SplicePointName -> LHsExpr GhcRn -> PendingRnSplice
- HsExpr: PendingTcSplice :: SplicePointName -> (LHsExpr GhcTc) -> PendingTcSplice
+ HsExpr: PendingTcSplice :: SplicePointName -> LHsExpr GhcTc -> PendingTcSplice
- HsExpr: Present :: (LHsExpr id) -> HsTupArg id
+ HsExpr: Present :: XPresent id -> LHsExpr id -> HsTupArg id
- HsExpr: RecStmt :: [LStmtLR idL idR body] -> [IdP idR] -> [IdP idR] -> SyntaxExpr idR -> SyntaxExpr idR -> SyntaxExpr idR -> PostTc idR Type -> [PostTcExpr] -> [PostTcExpr] -> PostTc idR Type -> StmtLR idL idR body
+ 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: RecordCon :: Located (IdP p) -> PostTc p ConLike -> PostTcExpr -> HsRecordBinds p -> HsExpr p
+ HsExpr: RecordCon :: XRecordCon p -> Located (IdP p) -> HsRecordBinds p -> HsExpr p
- HsExpr: RecordUpd :: LHsExpr p -> [LHsRecUpdField p] -> PostTc p [ConLike] -> PostTc p [Type] -> PostTc p [Type] -> PostTc p HsWrapper -> HsExpr p
+ HsExpr: RecordUpd :: XRecordUpd p -> LHsExpr p -> [LHsRecUpdField p] -> HsExpr p
- HsExpr: SectionL :: (LHsExpr p) -> (LHsExpr p) -> HsExpr p
+ HsExpr: SectionL :: XSectionL p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: SectionR :: (LHsExpr p) -> (LHsExpr p) -> HsExpr p
+ HsExpr: SectionR :: XSectionR p -> LHsExpr p -> LHsExpr p -> HsExpr p
- HsExpr: StmtCtxt :: (HsStmtContext id) -> HsMatchContext id
+ HsExpr: StmtCtxt :: HsStmtContext id -> HsMatchContext id
- HsExpr: TExpBr :: (LHsExpr p) -> HsBracket p
+ HsExpr: TExpBr :: XTExpBr p -> LHsExpr p -> HsBracket p
- HsExpr: TransStmt :: TransForm -> [ExprLStmt idL] -> [(IdP idR, IdP idR)] -> LHsExpr idR -> Maybe (LHsExpr idR) -> SyntaxExpr idR -> SyntaxExpr idR -> PostTc idR Type -> HsExpr idR -> StmtLR idL idR body
+ 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: TransStmtCtxt :: HsStmtContext id -> HsStmtContext id
- HsExpr: TypBr :: (LHsType p) -> HsBracket p
+ HsExpr: TypBr :: XTypBr p -> LHsType p -> HsBracket p
- HsExpr: VarBr :: Bool -> (IdP p) -> HsBracket p
+ HsExpr: VarBr :: XVarBr p -> Bool -> IdP p -> HsBracket p
- HsExpr: [m_grhss] :: Match p body -> (GRHSs p body)
+ HsExpr: [m_grhss] :: Match p body -> GRHSs p body
- HsExpr: [mg_arg_tys] :: MatchGroup p body -> [PostTc p Type]
+ HsExpr: [mg_arg_tys] :: MatchGroupTc -> [Type]
- HsExpr: [mg_res_ty] :: MatchGroup p body -> PostTc p Type
+ HsExpr: [mg_res_ty] :: MatchGroupTc -> Type
- HsExpr: [rcon_con_expr] :: HsExpr p -> PostTcExpr
+ HsExpr: [rcon_con_expr] :: RecordConTc -> PostTcExpr
- HsExpr: [rcon_con_like] :: HsExpr p -> PostTc p ConLike
+ HsExpr: [rcon_con_like] :: RecordConTc -> ConLike
- HsExpr: [recS_bind_ty] :: StmtLR idL idR body -> PostTc idR Type
+ HsExpr: [recS_bind_ty] :: RecStmtTc -> Type
- HsExpr: [recS_later_rets] :: StmtLR idL idR body -> [PostTcExpr]
+ HsExpr: [recS_later_rets] :: RecStmtTc -> [PostTcExpr]
- HsExpr: [recS_rec_rets] :: StmtLR idL idR body -> [PostTcExpr]
+ HsExpr: [recS_rec_rets] :: RecStmtTc -> [PostTcExpr]
- HsExpr: [recS_ret_ty] :: StmtLR idL idR body -> PostTc idR Type
+ HsExpr: [recS_ret_ty] :: RecStmtTc -> Type
- HsExpr: [rupd_cons] :: HsExpr p -> PostTc p [ConLike]
+ HsExpr: [rupd_cons] :: RecordUpdTc -> [ConLike]
- HsExpr: [rupd_in_tys] :: HsExpr p -> PostTc p [Type]
+ HsExpr: [rupd_in_tys] :: RecordUpdTc -> [Type]
- HsExpr: [rupd_out_tys] :: HsExpr p -> PostTc p [Type]
+ HsExpr: [rupd_out_tys] :: RecordUpdTc -> [Type]
- HsExpr: [rupd_wrap] :: HsExpr p -> PostTc p HsWrapper
+ HsExpr: [rupd_wrap] :: RecordUpdTc -> HsWrapper
- HsExpr: data ApplicativeArg idL idR
+ HsExpr: data ApplicativeArg idL
- HsExpr: data GRHS id body
+ HsExpr: data GRHS p body
- HsExpr: hsExprNeedsParens :: HsExpr id -> Bool
+ HsExpr: hsExprNeedsParens :: PprPrec -> HsExpr p -> Bool
- HsExpr: noExpr :: SourceTextX p => HsExpr p
+ HsExpr: noExpr :: HsExpr (GhcPass p)
- HsExpr: noSyntaxExpr :: SourceTextX p => SyntaxExpr p
+ HsExpr: noSyntaxExpr :: SyntaxExpr (GhcPass p)
- HsExpr: pprBinds :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR) => HsLocalBindsLR idL idR -> SDoc
+ HsExpr: pprBinds :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR)) => HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> SDoc
- HsExpr: pprCmd :: (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc
+ HsExpr: pprCmd :: OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- HsExpr: pprCmdArg :: (SourceTextX p, OutputableBndrId p) => HsCmdTop p -> SDoc
+ HsExpr: pprCmdArg :: OutputableBndrId (GhcPass p) => HsCmdTop (GhcPass p) -> SDoc
- HsExpr: pprComp :: (SourceTextX p, OutputableBndrId p, Outputable body) => [LStmt p body] -> SDoc
+ HsExpr: pprComp :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- HsExpr: pprDebugParendExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
+ HsExpr: pprDebugParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprDo :: (SourceTextX p, OutputableBndrId p, Outputable body) => HsStmtContext any -> [LStmt p body] -> SDoc
+ HsExpr: pprDo :: (OutputableBndrId (GhcPass p), Outputable body) => HsStmtContext any -> [LStmt (GhcPass p) body] -> SDoc
- HsExpr: pprExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc
+ HsExpr: pprExpr :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- HsExpr: pprFunBind :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => MatchGroup idR body -> SDoc
+ HsExpr: pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- HsExpr: pprGRHS :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHS idR body -> SDoc
+ HsExpr: pprGRHS :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHS (GhcPass idR) body -> SDoc
- HsExpr: pprGRHSs :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => HsMatchContext idL -> GRHSs idR body -> SDoc
+ HsExpr: pprGRHSs :: (OutputableBndrId (GhcPass idR), Outputable body) => HsMatchContext idL -> GRHSs (GhcPass idR) body -> SDoc
- HsExpr: pprHsBracket :: (SourceTextX p, OutputableBndrId p) => HsBracket p -> SDoc
+ HsExpr: pprHsBracket :: OutputableBndrId (GhcPass p) => HsBracket (GhcPass p) -> SDoc
- HsExpr: pprLCmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc
+ HsExpr: pprLCmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- HsExpr: pprLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
+ HsExpr: pprLExpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprMatch :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => Match idR body -> SDoc
+ HsExpr: pprMatch :: (OutputableBndrId (GhcPass idR), Outputable body) => Match (GhcPass idR) body -> SDoc
- HsExpr: pprMatchInCtxt :: (SourceTextX idR, OutputableBndrId idR, Outputable (NameOrRdrName (NameOrRdrName (IdP idR))), Outputable body) => Match idR body -> SDoc
+ HsExpr: pprMatchInCtxt :: (OutputableBndrId (GhcPass idR), Outputable (NameOrRdrName (NameOrRdrName (IdP (GhcPass idR)))), Outputable body) => Match (GhcPass idR) body -> SDoc
- HsExpr: pprMatches :: (SourceTextX idR, OutputableBndrId idR, Outputable body) => MatchGroup idR body -> SDoc
+ HsExpr: pprMatches :: (OutputableBndrId (GhcPass idR), Outputable body) => MatchGroup (GhcPass idR) body -> SDoc
- HsExpr: pprParendExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc
+ HsExpr: pprParendExpr :: OutputableBndrId (GhcPass p) => PprPrec -> HsExpr (GhcPass p) -> SDoc
- HsExpr: pprParendLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
+ HsExpr: pprParendLExpr :: OutputableBndrId (GhcPass p) => PprPrec -> LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprPatBind :: forall bndr p body. (SourceTextX p, SourceTextX bndr, OutputableBndrId bndr, OutputableBndrId p, Outputable body) => LPat bndr -> GRHSs p body -> 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 :: (SourceTextX p, OutputableBndrId p) => SplicePointName -> LHsExpr p -> SDoc
+ HsExpr: pprPendingSplice :: OutputableBndrId (GhcPass p) => SplicePointName -> LHsExpr (GhcPass p) -> SDoc
- HsExpr: pprQuals :: (SourceTextX p, OutputableBndrId p, Outputable body) => [LStmt p body] -> SDoc
+ HsExpr: pprQuals :: (OutputableBndrId (GhcPass p), Outputable body) => [LStmt (GhcPass p) body] -> SDoc
- HsExpr: pprSplice :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc
+ HsExpr: pprSplice :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- HsExpr: pprSpliceDecl :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SpliceExplicitFlag -> SDoc
+ HsExpr: pprSpliceDecl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc
- HsExpr: pprStmt :: forall idL idR body. (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => (StmtLR idL idR body) -> SDoc
+ HsExpr: pprStmt :: forall idL idR body. (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- HsExpr: pprStmtInCtxt :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => HsStmtContext (IdP idL) -> StmtLR idL idR body -> SDoc
+ HsExpr: pprStmtInCtxt :: (OutputableBndrId (GhcPass idL), OutputableBndrId (GhcPass idR), Outputable body) => HsStmtContext (IdP (GhcPass idL)) -> StmtLR (GhcPass idL) (GhcPass idR) body -> SDoc
- HsExpr: pprTransformStmt :: (SourceTextX p, OutputableBndrId p) => [IdP p] -> LHsExpr p -> Maybe (LHsExpr p) -> SDoc
+ HsExpr: pprTransformStmt :: OutputableBndrId (GhcPass p) => [IdP (GhcPass p)] -> LHsExpr (GhcPass p) -> Maybe (LHsExpr (GhcPass p)) -> SDoc
- HsExpr: ppr_apps :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> [Either (LHsExpr p) LHsWcTypeX] -> SDoc
+ HsExpr: ppr_apps :: OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> [Either (LHsExpr (GhcPass p)) (XAppTypeE (GhcPass p))] -> SDoc
- HsExpr: ppr_cmd :: forall p. (SourceTextX p, OutputableBndrId p) => HsCmd p -> SDoc
+ HsExpr: ppr_cmd :: forall p. OutputableBndrId (GhcPass p) => HsCmd (GhcPass p) -> SDoc
- HsExpr: ppr_do_stmts :: (SourceTextX idL, SourceTextX idR, OutputableBndrId idL, OutputableBndrId idR, Outputable body) => [LStmtLR idL idR body] -> 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. (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc
+ HsExpr: ppr_expr :: forall p. OutputableBndrId (GhcPass p) => HsExpr (GhcPass p) -> SDoc
- HsExpr: ppr_lcmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc
+ HsExpr: ppr_lcmd :: OutputableBndrId (GhcPass p) => LHsCmd (GhcPass p) -> SDoc
- HsExpr: ppr_lexpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc
+ HsExpr: ppr_lexpr :: OutputableBndrId (GhcPass p) => LHsExpr (GhcPass p) -> SDoc
- HsExpr: ppr_splice :: (SourceTextX p, OutputableBndrId p) => SDoc -> (IdP p) -> LHsExpr p -> SDoc -> SDoc
+ HsExpr: ppr_splice :: OutputableBndrId (GhcPass p) => SDoc -> IdP (GhcPass p) -> LHsExpr (GhcPass p) -> SDoc -> SDoc
- HsExpr: ppr_splice_decl :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc
+ HsExpr: ppr_splice_decl :: OutputableBndrId (GhcPass p) => HsSplice (GhcPass p) -> SDoc
- HsExpr: type LHsExpr p = Located (HsExpr p) May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list
+ HsExpr: type LHsExpr p = Located (HsExpr p) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
- 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)
+ 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 OutputableBndrId id = (OutputableBndr (NameOrRdrName (IdP id)), OutputableBndr (IdP id))
+ HsExtension: type OutputableBndrId id = (OutputableBndr (NameOrRdrName (IdP id)), OutputableBndr (IdP id), OutputableX id)
- HsImpExp: IEDoc :: HsDocString -> IE name
+ HsImpExp: IEDoc :: XIEDoc pass -> HsDocString -> IE pass
- HsImpExp: IEDocNamed :: String -> IE name
+ HsImpExp: IEDocNamed :: XIEDocNamed pass -> String -> IE pass
- HsImpExp: IEGroup :: Int -> HsDocString -> IE name
+ HsImpExp: IEGroup :: XIEGroup pass -> Int -> HsDocString -> IE pass
- HsImpExp: IEModuleContents :: (Located ModuleName) -> IE name
+ HsImpExp: IEModuleContents :: XIEModuleContents pass -> Located ModuleName -> IE pass
- HsImpExp: IEName :: (Located name) -> IEWrappedName name
+ HsImpExp: IEName :: Located name -> IEWrappedName name
- HsImpExp: IEPattern :: (Located name) -> IEWrappedName name
+ HsImpExp: IEPattern :: Located name -> IEWrappedName name
- HsImpExp: IEThingAbs :: (LIEWrappedName (IdP name)) -> IE name
+ HsImpExp: IEThingAbs :: XIEThingAbs pass -> LIEWrappedName (IdP pass) -> IE pass
- HsImpExp: IEThingAll :: (LIEWrappedName (IdP name)) -> IE name
+ HsImpExp: IEThingAll :: XIEThingAll pass -> LIEWrappedName (IdP pass) -> IE pass
- HsImpExp: IEThingWith :: (LIEWrappedName (IdP name)) -> IEWildcard -> [LIEWrappedName (IdP name)] -> [Located (FieldLbl (IdP name))] -> IE name
+ HsImpExp: IEThingWith :: XIEThingWith pass -> LIEWrappedName (IdP pass) -> IEWildcard -> [LIEWrappedName (IdP pass)] -> [Located (FieldLbl (IdP pass))] -> IE pass
- HsImpExp: IEType :: (Located name) -> IEWrappedName name
+ HsImpExp: IEType :: Located name -> IEWrappedName name
- HsImpExp: IEVar :: (LIEWrappedName (IdP name)) -> IE name
+ HsImpExp: IEVar :: XIEVar pass -> LIEWrappedName (IdP pass) -> IE pass
- HsImpExp: ImportDecl :: SourceText -> Located ModuleName -> Maybe StringLiteral -> Bool -> Bool -> Bool -> Bool -> Maybe (Located ModuleName) -> Maybe (Bool, Located [LIE name]) -> ImportDecl name
+ HsImpExp: ImportDecl :: XCImportDecl pass -> SourceText -> Located ModuleName -> Maybe StringLiteral -> Bool -> Bool -> Bool -> Bool -> Maybe (Located ModuleName) -> Maybe (Bool, Located [LIE pass]) -> ImportDecl pass
- HsImpExp: [ideclAs] :: ImportDecl name -> Maybe (Located ModuleName)
+ HsImpExp: [ideclAs] :: ImportDecl pass -> Maybe (Located ModuleName)
- HsImpExp: [ideclHiding] :: ImportDecl name -> Maybe (Bool, Located [LIE name])
+ HsImpExp: [ideclHiding] :: ImportDecl pass -> Maybe (Bool, Located [LIE pass])
- HsImpExp: [ideclImplicit] :: ImportDecl name -> Bool
+ HsImpExp: [ideclImplicit] :: ImportDecl pass -> Bool
- HsImpExp: [ideclName] :: ImportDecl name -> Located ModuleName
+ HsImpExp: [ideclName] :: ImportDecl pass -> Located ModuleName
- HsImpExp: [ideclPkgQual] :: ImportDecl name -> Maybe StringLiteral
+ HsImpExp: [ideclPkgQual] :: ImportDecl pass -> Maybe StringLiteral
- HsImpExp: [ideclQualified] :: ImportDecl name -> Bool
+ HsImpExp: [ideclQualified] :: ImportDecl pass -> Bool
- HsImpExp: [ideclSafe] :: ImportDecl name -> Bool
+ HsImpExp: [ideclSafe] :: ImportDecl pass -> Bool
- HsImpExp: [ideclSourceSrc] :: ImportDecl name -> SourceText
+ HsImpExp: [ideclSourceSrc] :: ImportDecl pass -> SourceText
- HsImpExp: [ideclSource] :: ImportDecl name -> Bool
+ HsImpExp: [ideclSource] :: ImportDecl pass -> Bool
- HsImpExp: data IE name
+ HsImpExp: data IE pass
- HsImpExp: data ImportDecl name
+ HsImpExp: data ImportDecl pass
- HsImpExp: simpleImportDecl :: ModuleName -> ImportDecl name
+ HsImpExp: simpleImportDecl :: ModuleName -> ImportDecl (GhcPass p)
- HsImpExp: type LIE name = Located (IE name) When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'
+ HsImpExp: type LIE pass = Located (IE pass) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'"
- HsImpExp: type LImportDecl name = Located (ImportDecl name) When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'
+ HsImpExp: type LImportDecl pass = Located (ImportDecl pass) " When in a list this may have - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'"
- HsLit: HsChar :: (XHsChar x) -> Char -> HsLit x
+ HsLit: HsChar :: XHsChar x -> Char -> HsLit x
- HsLit: HsCharPrim :: (XHsCharPrim x) -> Char -> HsLit x
+ HsLit: HsCharPrim :: XHsCharPrim x -> Char -> HsLit x
- HsLit: HsDoublePrim :: (XHsDoublePrim x) -> FractionalLit -> HsLit x
+ HsLit: HsDoublePrim :: XHsDoublePrim x -> FractionalLit -> HsLit x
- HsLit: HsFloatPrim :: (XHsFloatPrim x) -> FractionalLit -> HsLit x
+ HsLit: HsFloatPrim :: XHsFloatPrim x -> FractionalLit -> HsLit x
- HsLit: HsInt :: (XHsInt x) -> IntegralLit -> HsLit x
+ HsLit: HsInt :: XHsInt x -> IntegralLit -> HsLit x
- HsLit: HsInt64Prim :: (XHsInt64Prim x) -> Integer -> HsLit x
+ HsLit: HsInt64Prim :: XHsInt64Prim x -> Integer -> HsLit x
- HsLit: HsIntPrim :: (XHsIntPrim x) -> Integer -> HsLit x
+ HsLit: HsIntPrim :: XHsIntPrim x -> Integer -> HsLit x
- HsLit: HsInteger :: (XHsInteger x) -> Integer -> Type -> HsLit x
+ HsLit: HsInteger :: XHsInteger x -> Integer -> Type -> HsLit x
- HsLit: HsRat :: (XHsRat x) -> FractionalLit -> Type -> HsLit x
+ HsLit: HsRat :: XHsRat x -> FractionalLit -> Type -> HsLit x
- HsLit: HsString :: (XHsString x) -> FastString -> HsLit x
+ HsLit: HsString :: XHsString x -> FastString -> HsLit x
- HsLit: HsStringPrim :: (XHsStringPrim x) -> ByteString -> HsLit x
+ HsLit: HsStringPrim :: XHsStringPrim x -> ByteString -> HsLit x
- HsLit: HsWord64Prim :: (XHsWord64Prim x) -> Integer -> HsLit x
+ HsLit: HsWord64Prim :: XHsWord64Prim x -> Integer -> HsLit x
- HsLit: HsWordPrim :: (XHsWordPrim x) -> Integer -> HsLit x
+ HsLit: HsWordPrim :: XHsWordPrim x -> Integer -> HsLit x
- HsLit: OverLit :: OverLitVal -> PostRn p Bool -> HsExpr p -> PostTc p Type -> HsOverLit p
+ HsLit: OverLit :: XOverLit p -> OverLitVal -> HsExpr p -> HsOverLit p
- HsLit: [ol_rebindable] :: HsOverLit p -> PostRn p Bool
+ HsLit: [ol_rebindable] :: OverLitTc -> Bool
- HsLit: [ol_type] :: HsOverLit p -> PostTc p Type
+ HsLit: [ol_type] :: OverLitTc -> Type
- HsLit: convertLit :: (ConvertIdX a b) => HsLit a -> HsLit b
+ HsLit: convertLit :: ConvertIdX a b => HsLit a -> HsLit b
- HsLit: overLitType :: HsOverLit p -> PostTc p Type
+ HsLit: overLitType :: HsOverLit GhcTc -> Type
- HsLit: pmPprHsLit :: (SourceTextX x) => HsLit x -> SDoc
+ HsLit: pmPprHsLit :: HsLit (GhcPass x) -> SDoc
- HsPat: AsPat :: (Located (IdP p)) -> (LPat p) -> Pat p
+ HsPat: AsPat :: XAsPat p -> Located (IdP p) -> LPat p -> Pat p
- HsPat: BangPat :: (LPat p) -> Pat p
+ HsPat: BangPat :: XBangPat p -> LPat p -> Pat p
- HsPat: CoPat :: HsWrapper -> (Pat p) -> Type -> Pat p
+ HsPat: CoPat :: XCoPat p -> HsWrapper -> Pat p -> Type -> Pat p
- HsPat: ConPatIn :: (Located (IdP p)) -> (HsConPatDetails p) -> Pat p
+ HsPat: ConPatIn :: Located (IdP p) -> HsConPatDetails p -> Pat p
- HsPat: LazyPat :: (LPat p) -> Pat p
+ HsPat: LazyPat :: XLazyPat p -> LPat p -> Pat p
- HsPat: ListPat :: [LPat p] -> (PostTc p Type) -> (Maybe (PostTc p Type, SyntaxExpr p)) -> Pat p
+ HsPat: ListPat :: XListPat p -> [LPat p] -> Pat p
- HsPat: LitPat :: (HsLit p) -> Pat p
+ HsPat: LitPat :: XLitPat p -> HsLit p -> Pat p
- HsPat: NPat :: (Located (HsOverLit p)) -> (Maybe (SyntaxExpr p)) -> (SyntaxExpr p) -> (PostTc p Type) -> Pat p
+ HsPat: NPat :: XNPat p -> Located (HsOverLit p) -> Maybe (SyntaxExpr p) -> SyntaxExpr p -> Pat p
- HsPat: NPlusKPat :: (Located (IdP p)) -> (Located (HsOverLit p)) -> (HsOverLit p) -> (SyntaxExpr p) -> (SyntaxExpr p) -> (PostTc p Type) -> Pat p
+ HsPat: NPlusKPat :: XNPlusKPat p -> Located (IdP p) -> Located (HsOverLit p) -> HsOverLit p -> SyntaxExpr p -> SyntaxExpr p -> Pat p
- HsPat: ParPat :: (LPat p) -> Pat p
+ HsPat: ParPat :: XParPat p -> LPat p -> Pat p
- HsPat: SplicePat :: (HsSplice p) -> Pat p
+ HsPat: SplicePat :: XSplicePat p -> HsSplice p -> Pat p
- HsPat: SumPat :: (LPat p) -> ConTag -> Arity -> (PostTc p [Type]) -> Pat p
+ HsPat: SumPat :: XSumPat p -> LPat p -> ConTag -> Arity -> Pat p
- HsPat: TuplePat :: [LPat p] -> Boxity -> [PostTc p Type] -> Pat p
+ HsPat: TuplePat :: XTuplePat p -> [LPat p] -> Boxity -> Pat p
- HsPat: VarPat :: (Located (IdP p)) -> Pat p
+ HsPat: VarPat :: XVarPat p -> Located (IdP p) -> Pat p
- HsPat: ViewPat :: (LHsExpr p) -> (LPat p) -> (PostTc p Type) -> Pat p
+ HsPat: ViewPat :: XViewPat p -> LHsExpr p -> LPat p -> Pat p
- HsPat: WildPat :: (PostTc p Type) -> Pat p
+ HsPat: WildPat :: XWildPat p -> Pat p
- HsPat: collectEvVarsPats :: [Pat p] -> Bag EvVar
+ HsPat: collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar
- HsPat: hsRecFieldSel :: HsRecField pass arg -> Located (PostRn pass (IdP pass))
+ HsPat: hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)
- HsPat: hsRecFields :: HsRecFields p arg -> [PostRn p (IdP p)]
+ HsPat: hsRecFields :: HsRecFields p arg -> [XCFieldOcc p]
- HsPat: hsRecUpdFieldRdr :: HsRecUpdField p -> Located RdrName
+ HsPat: hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName
- HsPat: isIrrefutableHsPat :: (SourceTextX p, OutputableBndrId p) => LPat p -> Bool
+ HsPat: isIrrefutableHsPat :: OutputableBndrId p => LPat p -> Bool
- HsPat: mkCharLitPat :: (SourceTextX p) => SourceText -> Char -> OutPat p
+ HsPat: mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p)
- HsPat: pprConArgs :: (SourceTextX p, OutputableBndrId p) => HsConPatDetails p -> SDoc
+ HsPat: pprConArgs :: OutputableBndrId (GhcPass p) => HsConPatDetails (GhcPass p) -> SDoc
- HsPat: pprParendLPat :: (SourceTextX pass, OutputableBndrId pass) => LPat pass -> SDoc
+ HsPat: pprParendLPat :: OutputableBndrId (GhcPass p) => PprPrec -> LPat (GhcPass p) -> SDoc
- HsSyn: HsModule :: Maybe (Located ModuleName) -> Maybe (Located [LIE name]) -> [LImportDecl name] -> [LHsDecl name] -> Maybe (Located WarningTxt) -> Maybe LHsDocString -> HsModule name
+ HsSyn: HsModule :: Maybe (Located ModuleName) -> Maybe (Located [LIE pass]) -> [LImportDecl pass] -> [LHsDecl pass] -> Maybe (Located WarningTxt) -> Maybe LHsDocString -> HsModule pass
- HsSyn: [hsmodDecls] :: HsModule name -> [LHsDecl name]
+ HsSyn: [hsmodDecls] :: HsModule pass -> [LHsDecl pass]
- HsSyn: [hsmodDeprecMessage] :: HsModule name -> Maybe (Located WarningTxt)
+ HsSyn: [hsmodDeprecMessage] :: HsModule pass -> Maybe (Located WarningTxt)
- HsSyn: [hsmodExports] :: HsModule name -> Maybe (Located [LIE name])
+ HsSyn: [hsmodExports] :: HsModule pass -> Maybe (Located [LIE pass])
- HsSyn: [hsmodHaddockModHeader] :: HsModule name -> Maybe LHsDocString
+ HsSyn: [hsmodHaddockModHeader] :: HsModule pass -> Maybe LHsDocString
- HsSyn: [hsmodImports] :: HsModule name -> [LImportDecl name]
+ HsSyn: [hsmodImports] :: HsModule pass -> [LImportDecl pass]
- HsSyn: [hsmodName] :: HsModule name -> Maybe (Located ModuleName)
+ HsSyn: [hsmodName] :: HsModule pass -> Maybe (Located ModuleName)
- HsSyn: data HsModule name
+ HsSyn: data HsModule pass
- HsTypes: Ambiguous :: (Located RdrName) -> (PostTc pass (IdP pass)) -> AmbiguousFieldOcc pass
+ HsTypes: Ambiguous :: XAmbiguous pass -> Located RdrName -> AmbiguousFieldOcc pass
- HsTypes: AnonWildCard :: (PostRn pass (Located Name)) -> HsWildCardInfo pass
+ HsTypes: AnonWildCard :: Located Name -> HsWildCardInfo
- HsTypes: ConDeclField :: [LFieldOcc pass] -> LBangType pass -> Maybe LHsDocString -> ConDeclField pass
+ HsTypes: ConDeclField :: XConDeclField pass -> [LFieldOcc pass] -> LBangType pass -> Maybe LHsDocString -> ConDeclField pass
- HsTypes: FieldOcc :: Located RdrName -> PostRn pass (IdP pass) -> FieldOcc pass
+ HsTypes: FieldOcc :: XCFieldOcc pass -> Located RdrName -> FieldOcc pass
- HsTypes: HsAppTy :: (LHsType pass) -> (LHsType pass) -> HsType pass
+ HsTypes: HsAppTy :: XAppTy pass -> LHsType pass -> LHsType pass -> HsType pass
- HsTypes: HsBangTy :: HsSrcBang -> (LHsType pass) -> HsType pass
+ HsTypes: HsBangTy :: XBangTy pass -> HsSrcBang -> LHsType pass -> HsType pass
- HsTypes: HsDocTy :: (LHsType pass) -> LHsDocString -> HsType pass
+ HsTypes: HsDocTy :: XDocTy pass -> LHsType pass -> LHsDocString -> HsType pass
- HsTypes: HsExplicitListTy :: Promoted -> (PostTc pass Kind) -> [LHsType pass] -> HsType pass
+ HsTypes: HsExplicitListTy :: XExplicitListTy pass -> Promoted -> [LHsType pass] -> HsType pass
- HsTypes: HsExplicitTupleTy :: [PostTc pass Kind] -> [LHsType pass] -> HsType pass
+ HsTypes: HsExplicitTupleTy :: XExplicitTupleTy pass -> [LHsType pass] -> HsType pass
- HsTypes: HsForAllTy :: [LHsTyVarBndr pass] -> LHsType pass -> HsType pass
+ HsTypes: HsForAllTy :: XForAllTy pass -> [LHsTyVarBndr pass] -> LHsType pass -> HsType pass
- HsTypes: HsFunTy :: (LHsType pass) -> (LHsType pass) -> HsType pass
+ HsTypes: HsFunTy :: XFunTy pass -> LHsType pass -> LHsType pass -> HsType pass
- HsTypes: HsIB :: PostRn pass [Name] -> thing -> PostRn pass Bool -> HsImplicitBndrs pass thing
+ HsTypes: HsIB :: XHsIB pass thing -> thing -> HsImplicitBndrs pass thing
- HsTypes: HsIParamTy :: (Located HsIPName) -> (LHsType pass) -> HsType pass
+ HsTypes: HsIParamTy :: XIParamTy pass -> Located HsIPName -> LHsType pass -> HsType pass
- HsTypes: HsKindSig :: (LHsType pass) -> (LHsKind pass) -> HsType pass
+ HsTypes: HsKindSig :: XKindSig pass -> LHsType pass -> LHsKind pass -> HsType pass
- HsTypes: HsListTy :: (LHsType pass) -> HsType pass
+ HsTypes: HsListTy :: XListTy pass -> LHsType pass -> HsType pass
- HsTypes: HsOpTy :: (LHsType pass) -> (Located (IdP pass)) -> (LHsType pass) -> HsType pass
+ HsTypes: HsOpTy :: XOpTy pass -> LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass
- HsTypes: HsParTy :: (LHsType pass) -> HsType pass
+ HsTypes: HsParTy :: XParTy pass -> LHsType pass -> HsType pass
- HsTypes: HsQTvs :: PostRn pass [Name] -> [LHsTyVarBndr pass] -> PostRn pass NameSet -> LHsQTyVars pass
+ HsTypes: HsQTvs :: XHsQTvs pass -> [LHsTyVarBndr pass] -> LHsQTyVars pass
- HsTypes: HsQualTy :: LHsContext pass -> LHsType pass -> HsType pass
+ HsTypes: HsQualTy :: XQualTy pass -> LHsContext pass -> LHsType pass -> HsType pass
- HsTypes: HsRecTy :: [LConDeclField pass] -> HsType pass
+ HsTypes: HsRecTy :: XRecTy pass -> [LConDeclField pass] -> HsType pass
- HsTypes: HsSpliceTy :: (HsSplice pass) -> (PostTc pass Kind) -> HsType pass
+ HsTypes: HsSpliceTy :: XSpliceTy pass -> HsSplice pass -> HsType pass
- HsTypes: HsSumTy :: [LHsType pass] -> HsType pass
+ HsTypes: HsSumTy :: XSumTy pass -> [LHsType pass] -> HsType pass
- HsTypes: HsTupleTy :: HsTupleSort -> [LHsType pass] -> HsType pass
+ HsTypes: HsTupleTy :: XTupleTy pass -> HsTupleSort -> [LHsType pass] -> HsType pass
- HsTypes: HsTyLit :: HsTyLit -> HsType pass
+ HsTypes: HsTyLit :: XTyLit pass -> HsTyLit -> HsType pass
- HsTypes: HsTyVar :: Promoted -> (Located (IdP pass)) -> HsType pass
+ HsTypes: HsTyVar :: XTyVar pass -> Promoted -> Located (IdP pass) -> HsType pass
- HsTypes: HsUnpack :: (Maybe Coercion) -> HsImplBang
+ HsTypes: HsUnpack :: Maybe Coercion -> HsImplBang
- HsTypes: HsWC :: PostRn pass [Name] -> thing -> HsWildCardBndrs pass thing
+ HsTypes: HsWC :: XHsWC pass thing -> thing -> HsWildCardBndrs pass thing
- HsTypes: HsWildCardTy :: (HsWildCardInfo pass) -> HsType pass
+ HsTypes: HsWildCardTy :: XWildCardTy pass -> HsType pass
- HsTypes: KindedTyVar :: (Located (IdP pass)) -> (LHsKind pass) -> HsTyVarBndr pass
+ HsTypes: KindedTyVar :: XKindedTyVar pass -> Located (IdP pass) -> LHsKind pass -> HsTyVarBndr pass
- HsTypes: Unambiguous :: (Located RdrName) -> (PostRn pass (IdP pass)) -> AmbiguousFieldOcc pass
+ HsTypes: Unambiguous :: XUnambiguous pass -> Located RdrName -> AmbiguousFieldOcc pass
- HsTypes: UserTyVar :: (Located (IdP pass)) -> HsTyVarBndr pass
+ HsTypes: UserTyVar :: XUserTyVar pass -> Located (IdP pass) -> HsTyVarBndr pass
- HsTypes: [hsib_closed] :: HsImplicitBndrs pass thing -> PostRn pass Bool
+ HsTypes: [hsib_closed] :: HsIBRn -> Bool
- HsTypes: [hsib_vars] :: HsImplicitBndrs pass thing -> PostRn pass [Name]
+ HsTypes: [hsib_vars] :: HsIBRn -> [Name]
- HsTypes: [hsq_dependent] :: LHsQTyVars pass -> PostRn pass NameSet
+ HsTypes: [hsq_dependent] :: HsQTvsRn -> NameSet
- HsTypes: [hsq_implicit] :: LHsQTyVars pass -> PostRn pass [Name]
+ HsTypes: [hsq_implicit] :: HsQTvsRn -> [Name]
- HsTypes: ambiguousFieldOcc :: FieldOcc pass -> AmbiguousFieldOcc pass
+ HsTypes: ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc
- HsTypes: getLHsInstDeclClass_maybe :: LHsSigType pass -> Maybe (Located (IdP pass))
+ HsTypes: getLHsInstDeclClass_maybe :: LHsSigType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)))
- HsTypes: hsLTyVarBndrToType :: LHsTyVarBndr pass -> LHsType pass
+ HsTypes: hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p)
- HsTypes: hsLTyVarBndrsToTypes :: LHsQTyVars pass -> [LHsType pass]
+ HsTypes: hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)]
- HsTypes: hsTyGetAppHead_maybe :: LHsType pass -> Maybe (Located (IdP pass), [LHsType pass])
+ HsTypes: hsTyGetAppHead_maybe :: LHsType (GhcPass p) -> Maybe (Located (IdP (GhcPass p)), [LHsType (GhcPass p)])
- HsTypes: mkHsAppTy :: LHsType pass -> LHsType pass -> LHsType pass
+ HsTypes: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsTypes: mkHsAppTys :: LHsType pass -> [LHsType pass] -> LHsType pass
+ HsTypes: mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- HsTypes: mkHsOpTy :: LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass
+ HsTypes: mkHsOpTy :: LHsType (GhcPass p) -> Located (IdP (GhcPass p)) -> LHsType (GhcPass p) -> HsType (GhcPass p)
- HsTypes: newtype HsWildCardInfo pass
+ HsTypes: newtype HsWildCardInfo
- HsTypes: pprConDeclFields :: (SourceTextX pass, OutputableBndrId pass) => [LConDeclField pass] -> SDoc
+ HsTypes: pprConDeclFields :: OutputableBndrId (GhcPass p) => [LConDeclField (GhcPass p)] -> SDoc
- HsTypes: pprHsContext :: (SourceTextX pass, OutputableBndrId pass) => HsContext pass -> SDoc
+ HsTypes: pprHsContext :: OutputableBndrId (GhcPass p) => HsContext (GhcPass p) -> SDoc
- HsTypes: pprHsContextMaybe :: (SourceTextX pass, OutputableBndrId pass) => HsContext pass -> Maybe SDoc
+ HsTypes: pprHsContextMaybe :: OutputableBndrId (GhcPass p) => HsContext (GhcPass p) -> Maybe SDoc
- HsTypes: pprHsContextNoArrow :: (SourceTextX pass, OutputableBndrId pass) => HsContext pass -> SDoc
+ HsTypes: pprHsContextNoArrow :: OutputableBndrId (GhcPass p) => HsContext (GhcPass p) -> SDoc
- HsTypes: pprHsForAll :: (SourceTextX pass, OutputableBndrId pass) => [LHsTyVarBndr pass] -> LHsContext pass -> SDoc
+ HsTypes: pprHsForAll :: OutputableBndrId (GhcPass p) => [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
- HsTypes: pprHsForAllExtra :: (SourceTextX pass, OutputableBndrId pass) => Maybe SrcSpan -> [LHsTyVarBndr pass] -> LHsContext pass -> SDoc
+ HsTypes: pprHsForAllExtra :: OutputableBndrId (GhcPass p) => Maybe SrcSpan -> [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc
- HsTypes: pprHsForAllTvs :: (SourceTextX pass, OutputableBndrId pass) => [LHsTyVarBndr pass] -> SDoc
+ HsTypes: pprHsForAllTvs :: OutputableBndrId (GhcPass p) => [LHsTyVarBndr (GhcPass p)] -> SDoc
- HsTypes: pprHsType :: (SourceTextX pass, OutputableBndrId pass) => HsType pass -> SDoc
+ HsTypes: pprHsType :: OutputableBndrId (GhcPass p) => HsType (GhcPass p) -> SDoc
- HsTypes: rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc pass -> RdrName
+ HsTypes: rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc (GhcPass p) -> RdrName
- HsTypes: sameWildCard :: Located (HsWildCardInfo pass) -> Located (HsWildCardInfo pass) -> Bool
+ HsTypes: sameWildCard :: Located HsWildCardInfo -> Located HsWildCardInfo -> Bool
- HsTypes: type LConDeclField pass = Located (ConDeclField pass) May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list
+ HsTypes: type LConDeclField pass = Located (ConDeclField pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
- HsTypes: type LHsContext pass = Located (HsContext pass) 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnUnit'
+ HsTypes: type LHsContext pass = Located (HsContext pass) " 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnUnit'"
- HsTypes: type LHsKind pass = Located (HsKind pass) 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'
+ HsTypes: type LHsKind pass = Located (HsKind pass) " 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'"
- HsTypes: type LHsType pass = Located (HsType pass) May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list
+ HsTypes: type LHsType pass = Located (HsType pass) " May have 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma' when in a list"
- HsTypes: wildCardName :: HsWildCardInfo GhcRn -> Name
+ HsTypes: wildCardName :: HsWildCardInfo -> Name
- HsUtils: collectHsIdBinders :: HsValBindsLR idL idR -> [IdP idL]
+ HsUtils: collectHsIdBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- HsUtils: collectHsValBinders :: HsValBindsLR idL idR -> [IdP idL]
+ HsUtils: collectHsValBinders :: HsValBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- HsUtils: collectLStmtBinders :: LStmtLR idL idR body -> [IdP idL]
+ HsUtils: collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- HsUtils: collectLStmtsBinders :: [LStmtLR idL idR body] -> [IdP idL]
+ HsUtils: collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- HsUtils: collectLocalBinders :: HsLocalBindsLR idL idR -> [IdP idL]
+ HsUtils: collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR) -> [IdP (GhcPass idL)]
- HsUtils: collectMethodBinders :: LHsBindsLR GhcPs idR -> [Located RdrName]
+ HsUtils: collectMethodBinders :: LHsBindsLR idL idR -> [Located (IdP idL)]
- HsUtils: collectStmtBinders :: StmtLR idL idR body -> [IdP idL]
+ HsUtils: collectStmtBinders :: StmtLR (GhcPass idL) (GhcPass idR) body -> [IdP (GhcPass idL)]
- HsUtils: collectStmtsBinders :: [StmtLR idL idR body] -> [IdP idL]
+ HsUtils: collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body] -> [IdP (GhcPass idL)]
- HsUtils: emptyRecStmt :: StmtLR idL GhcPs bodyR
+ HsUtils: emptyRecStmt :: StmtLR (GhcPass idL) GhcPs bodyR
- HsUtils: emptyTransStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder) => StmtLR idL idR (LHsExpr idR)
+ HsUtils: emptyTransStmt :: StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: hsPatSynSelectors :: HsValBinds p -> [IdP p]
+ HsUtils: hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)]
- HsUtils: hsValBindsImplicits :: HsValBindsLR GhcRn idR -> NameSet
+ HsUtils: hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> NameSet
- HsUtils: lStmtsImplicits :: [LStmtLR GhcRn idR (Located (body idR))] -> NameSet
+ HsUtils: lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))] -> NameSet
- HsUtils: mkBigLHsPatTup :: [LPat id] -> LPat id
+ HsUtils: mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn
- HsUtils: mkBigLHsTup :: [LHsExpr id] -> LHsExpr id
+ HsUtils: mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: mkBigLHsVarPatTup :: [IdP id] -> LPat id
+ HsUtils: mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn
- HsUtils: mkBigLHsVarTup :: [IdP id] -> LHsExpr id
+ HsUtils: mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: mkBindStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder) => LPat idL -> Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))
+ 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 idL GhcPs (Located (bodyR GhcPs))
+ HsUtils: mkBodyStmt :: Located (bodyR GhcPs) -> StmtLR (GhcPass idL) GhcPs (Located (bodyR GhcPs))
- HsUtils: mkGroupByUsingStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder) => [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
+ HsUtils: mkGroupByUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkGroupUsingStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder) => [ExprLStmt idL] -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
+ HsUtils: mkGroupUsingStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr name
+ HsUtils: mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkHsAppTy :: LHsType pass -> LHsType pass -> LHsType pass
+ HsUtils: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: mkHsAppType :: LHsExpr name -> LHsWcType name -> LHsExpr name
+ HsUtils: mkHsAppType :: XAppTypeE (GhcPass id) ~ LHsWcType GhcRn => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)
- HsUtils: mkHsAppTypes :: LHsExpr name -> [LHsWcType name] -> LHsExpr name
+ HsUtils: mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn
- HsUtils: mkHsAppTys :: LHsType pass -> [LHsType pass] -> LHsType pass
+ HsUtils: mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- HsUtils: mkHsCaseAlt :: LPat id -> (Located (body id)) -> LMatch id (Located (body id))
+ HsUtils: mkHsCaseAlt :: LPat (GhcPass p) -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- HsUtils: mkHsCmdWrap :: HsWrapper -> HsCmd id -> HsCmd id
+ HsUtils: mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p)
- HsUtils: mkHsFractional :: FractionalLit -> PostTc GhcPs Type -> HsOverLit GhcPs
+ HsUtils: mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- HsUtils: mkHsIf :: SourceTextX p => LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p
+ HsUtils: mkHsIf :: LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> LHsExpr (GhcPass p) -> HsExpr (GhcPass p)
- HsUtils: mkHsIntegral :: IntegralLit -> PostTc GhcPs Type -> HsOverLit GhcPs
+ HsUtils: mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- HsUtils: mkHsIsString :: SourceText -> FastString -> PostTc GhcPs Type -> HsOverLit GhcPs
+ HsUtils: mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- HsUtils: mkHsOpApp :: LHsExpr id -> IdP id -> LHsExpr id -> HsExpr id
+ HsUtils: mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- HsUtils: mkHsPar :: LHsExpr id -> LHsExpr id
+ HsUtils: mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkHsString :: SourceTextX p => String -> HsLit p
+ HsUtils: mkHsString :: String -> HsLit (GhcPass p)
- HsUtils: mkHsStringPrimLit :: SourceTextX p => FastString -> HsLit p
+ HsUtils: mkHsStringPrimLit :: FastString -> HsLit (GhcPass p)
- HsUtils: mkHsWrap :: HsWrapper -> HsExpr id -> HsExpr id
+ HsUtils: mkHsWrap :: HsWrapper -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- HsUtils: mkHsWrapCo :: TcCoercionN -> HsExpr id -> HsExpr id
+ HsUtils: mkHsWrapCo :: TcCoercionN -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- HsUtils: mkHsWrapCoR :: TcCoercionR -> HsExpr id -> HsExpr id
+ HsUtils: mkHsWrapCoR :: TcCoercionR -> HsExpr (GhcPass id) -> HsExpr (GhcPass id)
- HsUtils: mkHsWrapPat :: HsWrapper -> Pat id -> Type -> Pat id
+ HsUtils: mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
- HsUtils: mkHsWrapPatCo :: TcCoercionN -> Pat id -> Type -> Pat id
+ HsUtils: mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id)
- HsUtils: mkLHsCmdWrap :: HsWrapper -> LHsCmd id -> LHsCmd id
+ HsUtils: mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p)
- HsUtils: mkLHsPar :: LHsExpr name -> LHsExpr name
+ HsUtils: mkLHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkLHsTupleExpr :: [LHsExpr a] -> LHsExpr a
+ HsUtils: mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a)
- HsUtils: mkLHsVarTuple :: [IdP a] -> LHsExpr a
+ HsUtils: mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a)
- HsUtils: mkLHsWrap :: HsWrapper -> LHsExpr id -> LHsExpr id
+ HsUtils: mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkLHsWrapCo :: TcCoercionN -> LHsExpr id -> LHsExpr id
+ HsUtils: mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: mkLastStmt :: SourceTextX idR => Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))
+ HsUtils: mkLastStmt :: Located (bodyR (GhcPass idR)) -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR)))
- HsUtils: mkMatch :: HsMatchContext (NameOrRdrName (IdP p)) -> [LPat p] -> LHsExpr p -> Located (HsLocalBinds p) -> LMatch p (LHsExpr p)
+ 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 :: (PostTc name Type ~ PlaceHolder) => Origin -> [LMatch name (Located (body name))] -> MatchGroup name (Located (body name))
+ HsUtils: mkMatchGroup :: XMG name (Located (body name)) ~ NoExt => Origin -> [LMatch name (Located (body name))] -> MatchGroup name (Located (body name))
- HsUtils: mkParPat :: LPat name -> LPat name
+ HsUtils: mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
- HsUtils: mkRecStmt :: [LStmtLR idL GhcPs bodyR] -> StmtLR idL GhcPs bodyR
+ HsUtils: mkRecStmt :: [LStmtLR (GhcPass idL) GhcPs bodyR] -> StmtLR (GhcPass idL) GhcPs bodyR
- HsUtils: mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP id)) -> [LPat id] -> Located (body id) -> LMatch id (Located (body id))
+ HsUtils: mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p))) -> [LPat (GhcPass p)] -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- HsUtils: mkTransformByStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder) => [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
+ HsUtils: mkTransformByStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkTransformStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder) => [ExprLStmt idL] -> LHsExpr idR -> StmtLR idL idR (LHsExpr idL)
+ HsUtils: mkTransformStmt :: [ExprLStmt GhcPs] -> LHsExpr GhcPs -> StmtLR GhcPs GhcPs (LHsExpr GhcPs)
- HsUtils: mkVarBind :: IdP p -> LHsExpr p -> LHsBind p
+ HsUtils: mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p)
- HsUtils: nlHsApp :: LHsExpr id -> LHsExpr id -> LHsExpr id
+ HsUtils: nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsAppTy :: LHsType name -> LHsType name -> LHsType name
+ HsUtils: nlHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsApps :: IdP id -> [LHsExpr id] -> LHsExpr id
+ HsUtils: nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlHsFunTy :: LHsType name -> LHsType name -> LHsType name
+ HsUtils: nlHsFunTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsIf :: LHsExpr id -> LHsExpr id -> LHsExpr id -> LHsExpr id
+ HsUtils: nlHsIf :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsIntLit :: HasDefaultX p => Integer -> LHsExpr p
+ HsUtils: nlHsIntLit :: Integer -> LHsExpr (GhcPass p)
- HsUtils: nlHsLit :: HsLit p -> LHsExpr p
+ HsUtils: nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)
- HsUtils: nlHsOpApp :: LHsExpr id -> IdP id -> LHsExpr id -> LHsExpr id
+ HsUtils: nlHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> LHsExpr GhcPs
- HsUtils: nlHsPar :: LHsExpr id -> LHsExpr id
+ HsUtils: nlHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsParTy :: LHsType name -> LHsType name
+ HsUtils: nlHsParTy :: LHsType (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsSyntaxApps :: SyntaxExpr id -> [LHsExpr id] -> LHsExpr id
+ HsUtils: nlHsSyntaxApps :: SyntaxExpr (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlHsTyApp :: IdP name -> [Type] -> LHsExpr name
+ HsUtils: nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)
- HsUtils: nlHsTyApps :: IdP name -> [Type] -> [LHsExpr name] -> LHsExpr name
+ HsUtils: nlHsTyApps :: IdP (GhcPass id) -> [Type] -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlHsTyConApp :: IdP name -> [LHsType name] -> LHsType name
+ HsUtils: nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p)
- HsUtils: nlHsTyVar :: IdP name -> LHsType name
+ HsUtils: nlHsTyVar :: IdP (GhcPass p) -> LHsType (GhcPass p)
- HsUtils: nlHsVar :: IdP id -> LHsExpr id
+ HsUtils: nlHsVar :: IdP (GhcPass id) -> LHsExpr (GhcPass id)
- HsUtils: nlHsVarApps :: IdP id -> [IdP id] -> LHsExpr id
+ HsUtils: nlHsVarApps :: IdP (GhcPass id) -> [IdP (GhcPass id)] -> LHsExpr (GhcPass id)
- HsUtils: nlInfixConPat :: IdP id -> LPat id -> LPat id -> LPat id
+ HsUtils: nlInfixConPat :: RdrName -> LPat GhcPs -> LPat GhcPs -> LPat GhcPs
- HsUtils: nlLitPat :: HsLit p -> LPat p
+ HsUtils: nlLitPat :: HsLit GhcPs -> LPat GhcPs
- HsUtils: nlParPat :: LPat name -> LPat name
+ HsUtils: nlParPat :: LPat (GhcPass name) -> LPat (GhcPass name)
- HsUtils: nlTuplePat :: [LPat id] -> Boxity -> LPat id
+ HsUtils: nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs
- HsUtils: nlVarPat :: IdP id -> LPat id
+ HsUtils: nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)
- HsUtils: unguardedGRHSs :: Located (body id) -> GRHSs id (Located (body id))
+ HsUtils: unguardedGRHSs :: Located (body (GhcPass p)) -> GRHSs (GhcPass p) (Located (body (GhcPass p)))
- HsUtils: unguardedRHS :: SrcSpan -> Located (body id) -> [LGRHS id (Located (body id))]
+ HsUtils: unguardedRHS :: SrcSpan -> Located (body (GhcPass p)) -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]
- HsUtils: userHsLTyVarBndrs :: SrcSpan -> [Located (IdP name)] -> [LHsTyVarBndr name]
+ HsUtils: userHsLTyVarBndrs :: SrcSpan -> [Located (IdP (GhcPass p))] -> [LHsTyVarBndr (GhcPass p)]
- HsUtils: userHsTyVarBndrs :: SrcSpan -> [IdP name] -> [LHsTyVarBndr name]
+ HsUtils: userHsTyVarBndrs :: SrcSpan -> [IdP (GhcPass p)] -> [LHsTyVarBndr (GhcPass p)]
- HscTypes: ACoAxiom :: (CoAxiom Branched) -> TyThing
+ HscTypes: ACoAxiom :: CoAxiom Branched -> TyThing
- HscTypes: CgGuts :: !Module -> [TyCon] -> CoreProgram -> !ForeignStubs -> ![(ForeignSrcLang, String)] -> ![InstalledUnitId] -> !HpcInfo -> !(Maybe ModBreaks) -> [SptEntry] -> CgGuts
+ HscTypes: CgGuts :: !Module -> [TyCon] -> CoreProgram -> !ForeignStubs -> ![(ForeignSrcLang, FilePath)] -> ![InstalledUnitId] -> !HpcInfo -> !Maybe ModBreaks -> [SptEntry] -> CgGuts
- HscTypes: DeprecatedTxt :: (Located SourceText) -> [Located StringLiteral] -> WarningTxt
+ HscTypes: DeprecatedTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt
- HscTypes: Deps :: [(ModuleName, IsBootInterface)] -> [(InstalledUnitId, Bool)] -> [Module] -> [Module] -> Dependencies
+ HscTypes: Deps :: [(ModuleName, IsBootInterface)] -> [(InstalledUnitId, Bool)] -> [Module] -> [Module] -> [ModuleName] -> Dependencies
- HscTypes: EPS :: !(ModuleNameEnv (ModuleName, IsBootInterface)) -> !PackageIfaceTable -> InstalledModuleEnv (UniqDSet ModuleName) -> !PackageTypeEnv -> !PackageInstEnv -> !PackageFamInstEnv -> !PackageRuleBase -> !PackageVectInfo -> !PackageAnnEnv -> !PackageCompleteMatchMap -> !(ModuleEnv FamInstEnv) -> !EpsStats -> ExternalPackageState
+ HscTypes: EPS :: !ModuleNameEnv (ModuleName, IsBootInterface) -> !PackageIfaceTable -> InstalledModuleEnv (UniqDSet ModuleName) -> !PackageTypeEnv -> !PackageInstEnv -> !PackageFamInstEnv -> !PackageRuleBase -> !PackageAnnEnv -> !PackageCompleteMatchMap -> !ModuleEnv FamInstEnv -> !EpsStats -> ExternalPackageState
- HscTypes: HomeModInfo :: !ModIface -> !ModDetails -> !(Maybe Linkable) -> HomeModInfo
+ HscTypes: HomeModInfo :: !ModIface -> !ModDetails -> !Maybe Linkable -> HomeModInfo
- 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) -> HscEnv
- HscTypes: IIDecl :: (ImportDecl GhcPs) -> InteractiveImport
+ HscTypes: IIDecl :: ImportDecl GhcPs -> InteractiveImport
- HscTypes: ImportedModsVal :: ModuleName -> SrcSpan -> IsSafeImport -> Bool -> GlobalRdrEnv -> Bool -> ImportedModsVal
+ HscTypes: ImportedModsVal :: ModuleName -> SrcSpan -> IsSafeImport -> Bool -> !GlobalRdrEnv -> Bool -> ImportedModsVal
- HscTypes: InstalledNotFound :: [FilePath] -> (Maybe InstalledUnitId) -> InstalledFindResult
+ HscTypes: InstalledNotFound :: [FilePath] -> Maybe InstalledUnitId -> InstalledFindResult
- HscTypes: ModBreaks :: ForeignRef BreakArray -> !(Array BreakIndex SrcSpan) -> !(Array BreakIndex [OccName]) -> !(Array BreakIndex [String]) -> !(Array BreakIndex (RemotePtr CostCentre)) -> IntMap CgBreakInfo -> ModBreaks
+ HscTypes: ModBreaks :: ForeignRef BreakArray -> !Array BreakIndex SrcSpan -> !Array BreakIndex [OccName] -> !Array BreakIndex [String] -> !Array BreakIndex (RemotePtr CostCentre) -> IntMap CgBreakInfo -> ModBreaks
- HscTypes: ModDetails :: [AvailInfo] -> !TypeEnv -> ![ClsInst] -> ![FamInst] -> ![CoreRule] -> ![Annotation] -> !VectInfo -> [CompleteMatch] -> ModDetails
+ HscTypes: ModDetails :: [AvailInfo] -> !TypeEnv -> ![ClsInst] -> ![FamInst] -> ![CoreRule] -> ![Annotation] -> [CompleteMatch] -> ModDetails
- HscTypes: ModGuts :: !Module -> HscSource -> SrcSpan -> ![AvailInfo] -> !Dependencies -> ![Usage] -> !Bool -> !GlobalRdrEnv -> !FixityEnv -> ![TyCon] -> ![ClsInst] -> ![FamInst] -> ![PatSyn] -> ![CoreRule] -> !CoreProgram -> !ForeignStubs -> ![(ForeignSrcLang, String)] -> !Warnings -> [Annotation] -> [CompleteMatch] -> !HpcInfo -> !(Maybe ModBreaks) -> ![CoreVect] -> !VectInfo -> InstEnv -> FamInstEnv -> SafeHaskellMode -> Bool -> ModGuts
+ HscTypes: ModGuts :: !Module -> HscSource -> SrcSpan -> ![AvailInfo] -> !Dependencies -> ![Usage] -> !Bool -> !GlobalRdrEnv -> !FixityEnv -> ![TyCon] -> ![ClsInst] -> ![FamInst] -> ![PatSyn] -> ![CoreRule] -> !CoreProgram -> !ForeignStubs -> ![(ForeignSrcLang, FilePath)] -> !Warnings -> [Annotation] -> [CompleteMatch] -> !HpcInfo -> !Maybe ModBreaks -> InstEnv -> FamInstEnv -> SafeHaskellMode -> Bool -> !Maybe HsDocString -> !DeclDocMap -> !ArgDocMap -> ModGuts
- HscTypes: ModIface :: !Module -> !(Maybe Module) -> !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 -> !IfaceVectInfo -> OccName -> Maybe WarningTxt -> OccName -> Maybe Fixity -> OccName -> Maybe (OccName, Fingerprint) -> !AnyHpcUsage -> !IfaceTrustInfo -> !Bool -> [IfaceCompleteMatch] -> ModIface
+ 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: NotFound :: [FilePath] -> Maybe UnitId -> [UnitId] -> [UnitId] -> [ModuleSuggestion] -> FindResult
+ HscTypes: NotFound :: [FilePath] -> Maybe UnitId -> [UnitId] -> [UnitId] -> [(UnitId, UnusablePackageReason)] -> [ModuleSuggestion] -> FindResult
- HscTypes: TargetFile :: FilePath -> (Maybe Phase) -> TargetId
+ HscTypes: TargetFile :: FilePath -> Maybe Phase -> TargetId
- HscTypes: WarningTxt :: (Located SourceText) -> [Located StringLiteral] -> WarningTxt
+ HscTypes: WarningTxt :: Located SourceText -> [Located StringLiteral] -> WarningTxt
- HscTypes: [cg_foreign_files] :: CgGuts -> ![(ForeignSrcLang, String)]
+ HscTypes: [cg_foreign_files] :: CgGuts -> ![(ForeignSrcLang, FilePath)]
- HscTypes: [cg_modBreaks] :: CgGuts -> !(Maybe ModBreaks)
+ HscTypes: [cg_modBreaks] :: CgGuts -> !Maybe ModBreaks
- HscTypes: [eps_is_boot] :: ExternalPackageState -> !(ModuleNameEnv (ModuleName, IsBootInterface))
+ HscTypes: [eps_is_boot] :: ExternalPackageState -> !ModuleNameEnv (ModuleName, IsBootInterface)
- HscTypes: [eps_mod_fam_inst_env] :: ExternalPackageState -> !(ModuleEnv FamInstEnv)
+ HscTypes: [eps_mod_fam_inst_env] :: ExternalPackageState -> !ModuleEnv FamInstEnv
- HscTypes: [hm_linkable] :: HomeModInfo -> !(Maybe Linkable)
+ HscTypes: [hm_linkable] :: HomeModInfo -> !Maybe Linkable
- HscTypes: [hsc_EPS] :: HscEnv -> {-# UNPACK #-} !(IORef ExternalPackageState)
+ HscTypes: [hsc_EPS] :: HscEnv -> {-# UNPACK #-} !IORef ExternalPackageState
- HscTypes: [hsc_FC] :: HscEnv -> {-# UNPACK #-} !(IORef FinderCache)
+ HscTypes: [hsc_FC] :: HscEnv -> {-# UNPACK #-} !IORef FinderCache
- HscTypes: [hsc_NC] :: HscEnv -> {-# UNPACK #-} !(IORef NameCache)
+ HscTypes: [hsc_NC] :: HscEnv -> {-# UNPACK #-} !IORef NameCache
- HscTypes: [imv_all_exports] :: ImportedModsVal -> GlobalRdrEnv
+ HscTypes: [imv_all_exports] :: ImportedModsVal -> !GlobalRdrEnv
- HscTypes: [mg_foreign_files] :: ModGuts -> ![(ForeignSrcLang, String)]
+ HscTypes: [mg_foreign_files] :: ModGuts -> ![(ForeignSrcLang, FilePath)]
- HscTypes: [mg_modBreaks] :: ModGuts -> !(Maybe ModBreaks)
+ HscTypes: [mg_modBreaks] :: ModGuts -> !Maybe ModBreaks
- HscTypes: [mi_globals] :: ModIface -> !(Maybe GlobalRdrEnv)
+ HscTypes: [mi_globals] :: ModIface -> !Maybe GlobalRdrEnv
- HscTypes: [mi_sig_of] :: ModIface -> !(Maybe Module)
+ HscTypes: [mi_sig_of] :: ModIface -> !Maybe Module
- HscTypes: [modBreaks_ccs] :: ModBreaks -> !(Array BreakIndex (RemotePtr CostCentre))
+ HscTypes: [modBreaks_ccs] :: ModBreaks -> !Array BreakIndex (RemotePtr CostCentre)
- HscTypes: [modBreaks_decls] :: ModBreaks -> !(Array BreakIndex [String])
+ HscTypes: [modBreaks_decls] :: ModBreaks -> !Array BreakIndex [String]
- HscTypes: [modBreaks_locs] :: ModBreaks -> !(Array BreakIndex SrcSpan)
+ HscTypes: [modBreaks_locs] :: ModBreaks -> !Array BreakIndex SrcSpan
- HscTypes: [modBreaks_vars] :: ModBreaks -> !(Array BreakIndex [OccName])
+ HscTypes: [modBreaks_vars] :: ModBreaks -> !Array BreakIndex [OccName]
- HscTypes: handleSourceError :: (ExceptionMonad m) => (SourceError -> m a) -> m a -> m a
+ HscTypes: handleSourceError :: ExceptionMonad m => (SourceError -> m a) -> m a -> m a
- HscTypes: mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> (OccName -> Maybe (OccName, Fingerprint))
+ HscTypes: mkIfaceHashCache :: [(Fingerprint, IfaceDecl)] -> OccName -> Maybe (OccName, Fingerprint)
- Id: modifyIdInfo :: (IdInfo -> IdInfo) -> Id -> Id
+ Id: modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id
- IfaceEnv: NCU :: forall c. (NameCache -> (NameCache, c)) -> IO c -> NameCacheUpdater
+ IfaceEnv: NCU :: (forall c. (NameCache -> (NameCache, c)) -> IO c) -> NameCacheUpdater
- IfaceSyn: AltPpr :: (Maybe (OccName -> SDoc)) -> AltPpr
+ IfaceSyn: AltPpr :: Maybe (OccName -> SDoc) -> AltPpr
- IfaceSyn: IfRecSelId :: (Either IfaceTyCon IfaceDecl) -> Bool -> IfaceIdDetails
+ IfaceSyn: IfRecSelId :: Either IfaceTyCon IfaceDecl -> Bool -> IfaceIdDetails
- IfaceSyn: IfaceAT :: IfaceDecl -> (Maybe IfaceType) -> IfaceAT
+ IfaceSyn: IfaceAT :: IfaceDecl -> Maybe IfaceType -> IfaceAT
- IfaceSyn: IfaceClassOp :: IfaceTopBndr -> IfaceType -> (Maybe (DefMethSpec IfaceType)) -> IfaceClassOp
+ IfaceSyn: IfaceClassOp :: IfaceTopBndr -> IfaceType -> Maybe (DefMethSpec IfaceType) -> IfaceClassOp
- IfaceSyn: IfaceClosedSynFamilyTyCon :: (Maybe (IfExtName, [IfaceAxBranch])) -> IfaceFamTyConFlav
+ IfaceSyn: IfaceClosedSynFamilyTyCon :: Maybe (IfExtName, [IfaceAxBranch]) -> IfaceFamTyConFlav
- IfaceType: pprIfaceCoTcApp :: TyPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc
+ IfaceType: pprIfaceCoTcApp :: PprPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc
- IfaceType: pprIfaceContext :: TyPrec -> [IfacePredType] -> SDoc
+ IfaceType: pprIfaceContext :: PprPrec -> [IfacePredType] -> SDoc
- IfaceType: pprIfacePrefixApp :: TyPrec -> SDoc -> [SDoc] -> SDoc
+ IfaceType: pprIfacePrefixApp :: PprPrec -> SDoc -> [SDoc] -> SDoc
- IfaceType: pprIfaceTypeApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
+ IfaceType: pprIfaceTypeApp :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- IfaceType: pprPrecIfaceType :: TyPrec -> IfaceType -> SDoc
+ IfaceType: pprPrecIfaceType :: PprPrec -> IfaceType -> SDoc
- IfaceType: pprTyTcApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
+ IfaceType: pprTyTcApp :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc
- Inst: mkOverLit :: (HasDefaultX p, SourceTextX p) => OverLitVal -> TcM (HsLit p)
+ Inst: mkOverLit :: OverLitVal -> TcM (HsLit GhcTc)
- Instruction: mkStackAllocInstr :: Instruction instr => Platform -> Int -> instr
+ Instruction: mkStackAllocInstr :: Instruction instr => Platform -> Int -> [instr]
- Instruction: mkStackDeallocInstr :: Instruction instr => Platform -> Int -> instr
+ Instruction: mkStackDeallocInstr :: Instruction instr => Platform -> Int -> [instr]
- InteractiveEval: ExecOptions :: SingleStep -> String -> Int -> ForeignHValue -> EvalExpr ForeignHValue -> ExecOptions
+ InteractiveEval: ExecOptions :: SingleStep -> String -> Int -> (ForeignHValue -> EvalExpr ForeignHValue) -> ExecOptions
- InteractiveEvalTypes: ExecOptions :: SingleStep -> String -> Int -> ForeignHValue -> EvalExpr ForeignHValue -> ExecOptions
+ InteractiveEvalTypes: ExecOptions :: SingleStep -> String -> Int -> (ForeignHValue -> EvalExpr ForeignHValue) -> ExecOptions
- Lexer: P :: PState -> ParseResult a -> P a
+ Lexer: P :: (PState -> ParseResult a) -> P a
- Lexer: PState :: StringBuffer -> ParserFlags -> DynFlags -> Messages -> Maybe RealSrcSpan -> !Int -> Maybe Token -> RealSrcSpan -> !Int -> RealSrcLoc -> [LayoutContext] -> [Int] -> [FastString] -> [RealLocated Token] -> Maybe (RealLocated Token) -> RealSrcSpan -> [ALRContext] -> Maybe ALRLayout -> Bool -> Bool -> [(ApiAnnKey, [SrcSpan])] -> [Located AnnotationComment] -> [(SrcSpan, [Located AnnotationComment])] -> PState
+ Lexer: PState :: StringBuffer -> ParserFlags -> (DynFlags -> Messages) -> Maybe RealSrcSpan -> !Int -> Maybe Token -> RealSrcSpan -> !Int -> RealSrcLoc -> [LayoutContext] -> [Int] -> [FastString] -> [RealLocated Token] -> Maybe (RealLocated Token) -> RealSrcSpan -> [ALRContext] -> Maybe ALRLayout -> Bool -> Bool -> [(ApiAnnKey, [SrcSpan])] -> [Located AnnotationComment] -> [(SrcSpan, [Located AnnotationComment])] -> PState
- Linker: withExtendedLinkEnv :: (ExceptionMonad m) => [(Name, ForeignHValue)] -> m a -> m a
+ Linker: withExtendedLinkEnv :: ExceptionMonad m => [(Name, ForeignHValue)] -> m a -> m a
- ListSetOps: assoc :: (Eq a) => String -> Assoc a b -> a -> b
+ ListSetOps: assoc :: Eq a => String -> Assoc a b -> a -> b
- ListSetOps: assocDefault :: (Eq a) => b -> Assoc a b -> a -> b
+ ListSetOps: assocDefault :: Eq a => b -> Assoc a b -> a -> b
- ListSetOps: assocMaybe :: (Eq a) => Assoc a b -> a -> Maybe b
+ ListSetOps: assocMaybe :: Eq a => Assoc a b -> a -> Maybe b
- ListSetOps: hasNoDups :: (Eq a) => [a] -> Bool
+ ListSetOps: hasNoDups :: Eq a => [a] -> Bool
- ListT: ListT :: forall r. (a -> m r -> m r) -> m r -> m r -> ListT m a
+ ListT: ListT :: (forall r. (a -> m r -> m r) -> m r -> m r) -> ListT m a
- Literal: MachLabel :: FastString -> (Maybe Int) -> FunctionOrData -> Literal
+ Literal: MachLabel :: FastString -> Maybe Int -> FunctionOrData -> Literal
- Literal: mkMachInt64Wrap :: Integer -> Literal
+ Literal: mkMachInt64Wrap :: DynFlags -> Integer -> Literal
- Literal: mkMachWord64Wrap :: Integer -> Literal
+ Literal: mkMachWord64Wrap :: DynFlags -> Integer -> Literal
- Llvm: Return :: (Maybe LlvmVar) -> LlvmStatement
+ Llvm: Return :: Maybe LlvmVar -> LlvmStatement
- Llvm.AbsSyn: Return :: (Maybe LlvmVar) -> LlvmStatement
+ Llvm.AbsSyn: Return :: Maybe LlvmVar -> LlvmStatement
- Llvm.Types: ppCommaJoin :: (Outputable a) => [a] -> SDoc
+ Llvm.Types: ppCommaJoin :: Outputable a => [a] -> SDoc
- Llvm.Types: ppSpaceJoin :: (Outputable a) => [a] -> SDoc
+ Llvm.Types: ppSpaceJoin :: Outputable a => [a] -> SDoc
- MatchLit: tidyNPat :: (HsLit GhcTc -> Pat GhcTc) -> HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> SyntaxExpr GhcTc -> Type -> Pat GhcTc
+ MatchLit: tidyNPat :: HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> SyntaxExpr GhcTc -> Type -> Pat GhcTc
- Maybes: MaybeT :: m Maybe a -> MaybeT a
+ Maybes: MaybeT :: m (Maybe a) -> MaybeT a
- Maybes: [runMaybeT] :: MaybeT a -> m Maybe a
+ Maybes: [runMaybeT] :: MaybeT a -> m (Maybe a)
- Maybes: newtype MaybeT (m :: * -> *) a
+ Maybes: newtype MaybeT (m :: Type -> Type) a
- MkCore: mkBuildExpr :: (MonadThings m, MonadUnique m) => Type -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -> m CoreExpr
+ MkCore: mkBuildExpr :: (MonadFail m, MonadThings m, MonadUnique m) => Type -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -> m CoreExpr
- MkGraph: CgLast :: (CmmNode O C) -> CgStmt
+ MkGraph: CgLast :: CmmNode O C -> CgStmt
- MkGraph: CgStmt :: (CmmNode O O) -> CgStmt
+ MkGraph: CgStmt :: CmmNode O O -> CgStmt
- MonadUtils: (<$>) :: Functor f => a -> b -> f a -> f b
+ MonadUtils: (<$>) :: Functor f => (a -> b) -> f a -> f b
- MonadUtils: (<*>) :: Applicative f => f a -> b -> f a -> f b
+ MonadUtils: (<*>) :: Applicative f => f (a -> b) -> f a -> f b
- MonadUtils: class Functor f => Applicative (f :: * -> *)
+ MonadUtils: class Functor f => Applicative (f :: Type -> Type)
- MonadUtils: class Monad m => MonadFix (m :: * -> *)
+ MonadUtils: class Monad m => MonadFix (m :: Type -> Type)
- MonadUtils: class Monad m => MonadIO (m :: * -> *)
+ MonadUtils: class Monad m => MonadIO (m :: Type -> Type)
- MonadUtils: fmapMaybeM :: (Monad m) => (a -> m b) -> Maybe a -> m (Maybe b)
+ MonadUtils: fmapMaybeM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
- MonadUtils: foldlM :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m a
+ MonadUtils: foldlM :: Monad m => (a -> b -> m a) -> a -> [b] -> m a
- MonadUtils: foldlM_ :: (Monad m) => (a -> b -> m a) -> a -> [b] -> m ()
+ MonadUtils: foldlM_ :: Monad m => (a -> b -> m a) -> a -> [b] -> m ()
- MonadUtils: foldrM :: (Monad m) => (b -> a -> m a) -> a -> [b] -> m a
+ MonadUtils: foldrM :: Monad m => (b -> a -> m a) -> a -> [b] -> m a
- MonadUtils: mapAndUnzipM :: Applicative m => a -> m (b, c) -> [a] -> m ([b], [c])
+ MonadUtils: mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c])
- MonadUtils: mapMaybeM :: (Monad m) => (a -> m (Maybe b)) -> [a] -> m [b]
+ MonadUtils: mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]
- MonadUtils: maybeMapM :: Monad m => (a -> m b) -> (Maybe a -> m (Maybe b))
+ MonadUtils: maybeMapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b)
- MonadUtils: mfix :: MonadFix m => a -> m a -> m a
+ MonadUtils: mfix :: MonadFix m => (a -> m a) -> m a
- NCGMonad: NatM_State :: UniqSupply -> Int -> [(CLabel)] -> Maybe Reg -> DynFlags -> Module -> ModLocation -> DwarfFiles -> LabelMap DebugBlock -> NatM_State
+ NCGMonad: NatM_State :: UniqSupply -> Int -> [CLabel] -> Maybe Reg -> DynFlags -> Module -> ModLocation -> DwarfFiles -> LabelMap DebugBlock -> NatM_State
- NCGMonad: [natm_imports] :: NatM_State -> [(CLabel)]
+ NCGMonad: [natm_imports] :: NatM_State -> [CLabel]
- Name: nameModule :: Name -> Module
+ Name: nameModule :: HasDebugCallStack => Name -> Module
- OccurAnal: occurAnalysePgm :: Module -> (Activation -> Bool) -> [CoreRule] -> [CoreVect] -> VarSet -> CoreProgram -> CoreProgram
+ OccurAnal: occurAnalysePgm :: Module -> (Id -> Bool) -> (Activation -> Bool) -> [CoreRule] -> CoreProgram -> CoreProgram
- OptCoercion: optCoercion :: TCvSubst -> Coercion -> NormalCo
+ OptCoercion: optCoercion :: DynFlags -> TCvSubst -> Coercion -> NormalCo
- PPC.Instr: BCC :: Cond -> BlockId -> (Maybe Bool) -> Instr
+ PPC.Instr: BCC :: Cond -> BlockId -> Maybe Bool -> Instr
- PPC.Instr: BCCFAR :: Cond -> BlockId -> (Maybe Bool) -> Instr
+ PPC.Instr: BCCFAR :: Cond -> BlockId -> Maybe Bool -> Instr
- PPC.Instr: BCTR :: [Maybe BlockId] -> (Maybe CLabel) -> Instr
+ PPC.Instr: BCTR :: [Maybe BlockId] -> Maybe CLabel -> Instr
- Panic: try :: Exception e => IO a -> IO Either e a
+ Panic: try :: Exception e => IO a -> IO (Either e a)
- Parser: parseDeclaration :: P LHsDecl GhcPs
+ Parser: parseDeclaration :: P (LHsDecl GhcPs)
- Parser: parseExpression :: P LHsExpr GhcPs
+ Parser: parseExpression :: P (LHsExpr GhcPs)
- Parser: parseHeader :: P Located HsModule GhcPs
+ Parser: parseHeader :: P (Located (HsModule GhcPs))
- Parser: parseIdentifier :: P Located RdrName
+ Parser: parseIdentifier :: P (Located RdrName)
- Parser: parseImport :: P LImportDecl GhcPs
+ Parser: parseImport :: P (LImportDecl GhcPs)
- Parser: parseModule :: P Located HsModule GhcPs
+ Parser: parseModule :: P (Located (HsModule GhcPs))
- Parser: parsePattern :: P LPat GhcPs
+ Parser: parsePattern :: P (LPat GhcPs)
- Parser: parseSignature :: P Located HsModule GhcPs
+ Parser: parseSignature :: P (Located (HsModule GhcPs))
- Parser: parseStatement :: P LStmt GhcPs LHsExpr GhcPs
+ Parser: parseStatement :: P (LStmt GhcPs (LHsExpr GhcPs))
- Parser: parseStmt :: P Maybe LStmt GhcPs LHsExpr GhcPs
+ Parser: parseStmt :: P (Maybe (LStmt GhcPs (LHsExpr GhcPs)))
- Parser: parseType :: P LHsType GhcPs
+ Parser: parseType :: P (LHsType GhcPs)
- Parser: parseTypeSignature :: P LHsDecl GhcPs
+ Parser: parseTypeSignature :: P (LHsDecl GhcPs)
- PipelineMonad: P :: PipeEnv -> PipeState -> IO (PipeState, a) -> CompPipeline a
+ PipelineMonad: P :: (PipeEnv -> PipeState -> IO (PipeState, a)) -> CompPipeline a
- Plugins: Plugin :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo] -> [CommandLineOption] -> Maybe TcPlugin -> Plugin
+ 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: [installCoreToDos] :: Plugin -> [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]
+ Plugins: [installCoreToDos] :: Plugin -> CorePlugin
- Plugins: [tcPlugin] :: Plugin -> [CommandLineOption] -> Maybe TcPlugin
+ Plugins: [tcPlugin] :: Plugin -> TcPlugin
- PmExpr: PmExprOther :: (HsExpr GhcTc) -> PmExpr
+ PmExpr: PmExprOther :: HsExpr GhcTc -> PmExpr
- PmExpr: PmOLit :: Bool -> (HsOverLit GhcTc) -> PmLit
+ PmExpr: PmOLit :: Bool -> HsOverLit GhcTc -> PmLit
- PmExpr: PmSLit :: (HsLit GhcTc) -> PmLit
+ PmExpr: PmSLit :: HsLit GhcTc -> PmLit
- Pretty: LStr :: {-# UNPACK #-} !LitString -> {-# UNPACK #-} !Int -> TextDetails
+ Pretty: LStr :: {-# UNPACK #-} !LitString -> TextDetails
- RdrHsSyn: ImpExpQcName :: (Located RdrName) -> ImpExpQcSpec
+ RdrHsSyn: ImpExpQcName :: Located RdrName -> ImpExpQcSpec
- RdrHsSyn: ImpExpQcType :: (Located RdrName) -> ImpExpQcSpec
+ RdrHsSyn: ImpExpQcType :: Located RdrName -> ImpExpQcSpec
- RdrHsSyn: Sum :: ConTag -> Arity -> (LHsExpr GhcPs) -> SumOrTuple
+ RdrHsSyn: Sum :: ConTag -> Arity -> LHsExpr GhcPs -> SumOrTuple
- RdrHsSyn: mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr GhcPs] -> LHsContext GhcPs -> HsConDeclDetails GhcPs -> ConDecl GhcPs
+ RdrHsSyn: mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr GhcPs] -> Maybe (LHsContext GhcPs) -> HsConDeclDetails GhcPs -> ConDecl GhcPs
- RdrHsSyn: mkGadtDecl :: [Located RdrName] -> LHsSigType GhcPs -> ConDecl GhcPs
+ RdrHsSyn: mkGadtDecl :: [Located RdrName] -> LHsType GhcPs -> (ConDecl GhcPs, [AddAnn])
- RdrHsSyn: mkHsFractional :: FractionalLit -> PostTc GhcPs Type -> HsOverLit GhcPs
+ RdrHsSyn: mkHsFractional :: FractionalLit -> HsOverLit GhcPs
- RdrHsSyn: mkHsIntegral :: IntegralLit -> PostTc GhcPs Type -> HsOverLit GhcPs
+ RdrHsSyn: mkHsIntegral :: IntegralLit -> HsOverLit GhcPs
- RdrHsSyn: mkHsIsString :: SourceText -> FastString -> PostTc GhcPs Type -> HsOverLit GhcPs
+ RdrHsSyn: mkHsIsString :: SourceText -> FastString -> HsOverLit GhcPs
- RdrHsSyn: mkHsOpApp :: LHsExpr id -> IdP id -> LHsExpr id -> HsExpr id
+ RdrHsSyn: mkHsOpApp :: LHsExpr GhcPs -> IdP GhcPs -> LHsExpr GhcPs -> HsExpr GhcPs
- RdrHsSyn: mkInstD :: LInstDecl n -> LHsDecl n
+ RdrHsSyn: mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)
- RdrHsSyn: mkTyClD :: LTyClDecl n -> LHsDecl n
+ RdrHsSyn: mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)
- RdrHsSyn: splitCon :: LHsType GhcPs -> P (Located RdrName, HsConDeclDetails GhcPs)
+ RdrHsSyn: splitCon :: [LHsType GhcPs] -> P (Located RdrName, HsConDeclDetails GhcPs, Maybe LHsDocString)
- RdrHsSyn: splitTilde :: LHsType GhcPs -> P (LHsType GhcPs)
+ RdrHsSyn: splitTilde :: [LHsType GhcPs] -> P (LHsType GhcPs)
- Reg: liftPatchFnToRegReg :: (VirtualReg -> RealReg) -> (Reg -> Reg)
+ Reg: liftPatchFnToRegReg :: (VirtualReg -> RealReg) -> Reg -> Reg
- RegAlloc.Liveness: LiveInfo :: (LabelMap CmmStatics) -> [BlockId] -> (Maybe (BlockMap RegSet)) -> (BlockMap IntSet) -> LiveInfo
+ RegAlloc.Liveness: LiveInfo :: LabelMap CmmStatics -> [BlockId] -> Maybe (BlockMap RegSet) -> BlockMap IntSet -> LiveInfo
- RegAlloc.Liveness: LiveInstr :: (InstrSR instr) -> (Maybe Liveness) -> LiveInstr instr
+ RegAlloc.Liveness: LiveInstr :: InstrSR instr -> Maybe Liveness -> LiveInstr instr
- RegAlloc.Liveness: mapGenBlockTop :: (GenBasicBlock i -> GenBasicBlock i) -> (GenCmmDecl d h (ListGraph i) -> GenCmmDecl d h (ListGraph i))
+ RegAlloc.Liveness: mapGenBlockTop :: (GenBasicBlock i -> GenBasicBlock i) -> GenCmmDecl d h (ListGraph i) -> GenCmmDecl d h (ListGraph i)
- RegAlloc.Liveness: mapGenBlockTopM :: Monad m => (GenBasicBlock i -> m (GenBasicBlock i)) -> (GenCmmDecl d h (ListGraph i) -> m (GenCmmDecl d h (ListGraph i)))
+ RegAlloc.Liveness: mapGenBlockTopM :: Monad m => (GenBasicBlock i -> m (GenBasicBlock i)) -> GenCmmDecl d h (ListGraph i) -> m (GenCmmDecl d h (ListGraph i))
- RnEnv: lookupRecFieldOcc :: Maybe Name -> SDoc -> RdrName -> RnM Name
+ RnEnv: lookupRecFieldOcc :: Maybe Name -> RdrName -> RnM Name
- RnNames: dodgyMsgInsert :: forall p. IdP p -> IE p
+ RnNames: dodgyMsgInsert :: forall p. IdP (GhcPass p) -> IE (GhcPass p)
- RnSplice: rnSpliceType :: HsSplice GhcPs -> PostTc GhcRn Kind -> RnM (HsType GhcRn, FreeVars)
+ RnSplice: rnSpliceType :: HsSplice GhcPs -> RnM (HsType GhcRn, FreeVars)
- RnTypes: bindHsQTyVars :: forall a b. HsDocContext -> Maybe SDoc -> Maybe a -> [Located RdrName] -> (LHsQTyVars GhcPs) -> (LHsQTyVars GhcRn -> Bool -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
+ RnTypes: bindHsQTyVars :: forall a b. HsDocContext -> Maybe SDoc -> Maybe a -> [Located RdrName] -> LHsQTyVars GhcPs -> (LHsQTyVars GhcRn -> Bool -> RnM (b, FreeVars)) -> RnM (b, FreeVars)
- RnTypes: mkNegAppRn :: LHsExpr id -> SyntaxExpr id -> RnM (HsExpr id)
+ RnTypes: mkNegAppRn :: LHsExpr (GhcPass id) -> SyntaxExpr (GhcPass id) -> RnM (HsExpr (GhcPass id))
- RnUtils: ClassDeclCtx :: (Located RdrName) -> HsDocContext
+ RnUtils: ClassDeclCtx :: Located RdrName -> HsDocContext
- RnUtils: FamPatCtx :: (Located RdrName) -> HsDocContext
+ RnUtils: FamPatCtx :: Located RdrName -> HsDocContext
- RnUtils: ForeignDeclCtx :: (Located RdrName) -> HsDocContext
+ RnUtils: ForeignDeclCtx :: Located RdrName -> HsDocContext
- RnUtils: SpliceTypeCtx :: (LHsType GhcPs) -> HsDocContext
+ RnUtils: SpliceTypeCtx :: LHsType GhcPs -> HsDocContext
- RnUtils: TyDataCtx :: (Located RdrName) -> HsDocContext
+ RnUtils: TyDataCtx :: Located RdrName -> HsDocContext
- RnUtils: TyFamilyCtx :: (Located RdrName) -> HsDocContext
+ RnUtils: TyFamilyCtx :: Located RdrName -> HsDocContext
- RnUtils: TySynCtx :: (Located RdrName) -> HsDocContext
+ RnUtils: TySynCtx :: Located RdrName -> HsDocContext
- RtClosureInspect: TermFold :: TermProcessor a a -> RttiType -> [Word] -> a -> ClosureType -> RttiType -> HValue -> Maybe Name -> a -> RttiType -> Either String DataCon -> a -> a -> RttiType -> a -> a -> TermFold a
+ RtClosureInspect: TermFold :: TermProcessor a a -> (RttiType -> [Word] -> a) -> (ClosureType -> RttiType -> HValue -> Maybe Name -> a) -> (RttiType -> Either String DataCon -> a -> a) -> (RttiType -> a -> a) -> TermFold a
- RtClosureInspect: TermFoldM :: TermProcessor a (m a) -> RttiType -> [Word] -> m a -> ClosureType -> RttiType -> HValue -> Maybe Name -> m a -> RttiType -> Either String DataCon -> a -> m a -> RttiType -> a -> m a -> TermFoldM m a
+ RtClosureInspect: TermFoldM :: TermProcessor a (m a) -> (RttiType -> [Word] -> m a) -> (ClosureType -> RttiType -> HValue -> Maybe Name -> m a) -> (RttiType -> Either String DataCon -> a -> m a) -> (RttiType -> a -> m a) -> TermFoldM m a
- RtClosureInspect: isConstr :: ClosureType -> Bool
+ RtClosureInspect: isConstr :: GenClosure a -> Bool
- RtClosureInspect: isFullyEvaluated :: DynFlags -> a -> IO Bool
+ RtClosureInspect: isFullyEvaluated :: a -> IO Bool
- RtClosureInspect: isIndirection :: ClosureType -> Bool
+ RtClosureInspect: isIndirection :: GenClosure a -> Bool
- Rules: ruleCheckProgram :: CompilerPhase -> String -> RuleEnv -> CoreProgram -> SDoc
+ Rules: ruleCheckProgram :: CompilerPhase -> String -> (Id -> [CoreRule]) -> CoreProgram -> SDoc
- SPARC.Base: largeOffsetError :: (Show a) => a -> b
+ SPARC.Base: largeOffsetError :: Show a => a -> b
- SPARC.Instr: CALL :: (Either Imm Reg) -> Int -> Bool -> Instr
+ SPARC.Instr: CALL :: Either Imm Reg -> Int -> Bool -> Instr
- SimplEnv: DoneEx :: OutExpr -> (Maybe JoinArity) -> SimplSR
+ SimplEnv: DoneEx :: OutExpr -> Maybe JoinArity -> SimplSR
- SimplUtils: TickIt :: (Tickish Id) -> SimplCont -> SimplCont
+ SimplUtils: TickIt :: Tickish Id -> SimplCont -> SimplCont
- SimplUtils: activeRule :: SimplEnv -> Activation -> Bool
+ SimplUtils: activeRule :: SimplMode -> Activation -> Bool
- SimplUtils: activeUnfolding :: SimplEnv -> Id -> Bool
+ SimplUtils: activeUnfolding :: SimplMode -> Id -> Bool
- SimplUtils: mkArgInfo :: Id -> [CoreRule] -> Int -> SimplCont -> ArgInfo
+ SimplUtils: mkArgInfo :: SimplEnv -> Id -> [CoreRule] -> Int -> SimplCont -> ArgInfo
- SimplUtils: preInlineUnconditionally :: SimplEnv -> TopLevelFlag -> InId -> InExpr -> Bool
+ SimplUtils: preInlineUnconditionally :: SimplEnv -> TopLevelFlag -> InId -> InExpr -> StaticEnv -> Maybe SimplEnv
- Simplify: simplRules :: SimplEnv -> Maybe Name -> [CoreRule] -> SimplM [CoreRule]
+ Simplify: simplRules :: SimplEnv -> Maybe OutId -> [CoreRule] -> MaybeJoinCont -> SimplM [CoreRule]
- Specialise: specUnfolding :: [Var] -> (CoreExpr -> CoreExpr) -> Arity -> Unfolding -> Unfolding
+ Specialise: specUnfolding :: DynFlags -> [Var] -> (CoreExpr -> CoreExpr) -> Arity -> Unfolding -> Unfolding
- SrcLoc: type Located e = GenLocated SrcSpan e
+ SrcLoc: type Located = GenLocated SrcSpan
- SrcLoc: type RealLocated e = GenLocated RealSrcSpan e
+ SrcLoc: type RealLocated = GenLocated RealSrcSpan
- State: State :: s -> (# a, s #) -> State s a
+ State: State :: (s -> (# a, s #)) -> State s a
- StgCmmClosure: mkCmmInfo :: ClosureInfo -> CmmInfoTable
+ StgCmmClosure: mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable
- StgCmmLayout: FieldOff :: (NonVoid a) -> ByteOff -> FieldOffOrPadding a
+ StgCmmLayout: FieldOff :: NonVoid a -> ByteOff -> FieldOffOrPadding a
- StgLint: lintStgTopBindings :: Bool -> String -> [StgTopBinding] -> [StgTopBinding]
+ StgLint: lintStgTopBindings :: DynFlags -> Bool -> String -> [StgTopBinding] -> IO ()
- StgSyn: StgCase :: (GenStgExpr bndr occ) -> bndr -> AltType -> [GenStgAlt bndr occ] -> GenStgExpr bndr occ
+ StgSyn: StgCase :: GenStgExpr bndr occ -> bndr -> AltType -> [GenStgAlt bndr occ] -> GenStgExpr bndr occ
- StgSyn: StgLam :: [bndr] -> StgExpr -> GenStgExpr bndr occ
+ StgSyn: StgLam :: NonEmpty bndr -> StgExpr -> GenStgExpr bndr occ
- StgSyn: StgLet :: (GenStgBinding bndr occ) -> (GenStgExpr bndr occ) -> GenStgExpr bndr occ
+ StgSyn: StgLet :: GenStgBinding bndr occ -> GenStgExpr bndr occ -> GenStgExpr bndr occ
- StgSyn: StgLetNoEscape :: (GenStgBinding bndr occ) -> (GenStgExpr bndr occ) -> GenStgExpr bndr occ
+ StgSyn: StgLetNoEscape :: GenStgBinding bndr occ -> GenStgExpr bndr occ -> GenStgExpr bndr occ
- StgSyn: StgNonRec :: bndr -> (GenStgRhs bndr occ) -> GenStgBinding bndr occ
+ StgSyn: StgNonRec :: bndr -> GenStgRhs bndr occ -> GenStgBinding bndr occ
- StgSyn: StgRhsClosure :: CostCentreStack -> StgBinderInfo -> [occ] -> !UpdateFlag -> [bndr] -> (GenStgExpr bndr occ) -> GenStgRhs bndr occ
+ StgSyn: StgRhsClosure :: CostCentreStack -> StgBinderInfo -> [occ] -> !UpdateFlag -> [bndr] -> GenStgExpr bndr occ -> GenStgRhs bndr occ
- StgSyn: StgTick :: (Tickish bndr) -> (GenStgExpr bndr occ) -> GenStgExpr bndr occ
+ StgSyn: StgTick :: Tickish bndr -> GenStgExpr bndr occ -> GenStgExpr bndr occ
- StgSyn: StgTopLifted :: (GenStgBinding bndr occ) -> GenStgTopBinding bndr occ
+ StgSyn: StgTopLifted :: GenStgBinding bndr occ -> GenStgTopBinding bndr occ
- StringBuffer: StringBuffer :: {-# UNPACK #-} !(ForeignPtr Word8) -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> StringBuffer
+ StringBuffer: StringBuffer :: {-# UNPACK #-} !ForeignPtr Word8 -> {-# UNPACK #-} !Int -> {-# UNPACK #-} !Int -> StringBuffer
- StringBuffer: [buf] :: StringBuffer -> {-# UNPACK #-} !(ForeignPtr Word8)
+ StringBuffer: [buf] :: StringBuffer -> {-# UNPACK #-} !ForeignPtr Word8
- TcAnnotations: annCtxt :: (SourceTextX p, OutputableBndrId p) => AnnDecl p -> SDoc
+ TcAnnotations: annCtxt :: OutputableBndrId (GhcPass p) => AnnDecl (GhcPass p) -> SDoc
- TcDerivUtils: DS :: SrcSpan -> Name -> [TyVar] -> theta -> Class -> [Type] -> TyCon -> Maybe OverlapMode -> DerivSpecMechanism -> DerivSpec theta
+ TcDerivUtils: DS :: SrcSpan -> Name -> [TyVar] -> theta -> Class -> [Type] -> TyCon -> Maybe OverlapMode -> Maybe SrcSpan -> DerivSpecMechanism -> DerivSpec theta
- TcDerivUtils: DerivEnv :: Maybe OverlapMode -> [TyVar] -> Class -> [Type] -> TyCon -> [Type] -> TyCon -> [Type] -> DerivContext -> Maybe DerivStrategy -> DerivEnv
+ TcDerivUtils: DerivEnv :: Maybe OverlapMode -> [TyVar] -> Class -> [Type] -> TyCon -> [Type] -> TyCon -> [Type] -> DerivContext -> Maybe (DerivStrategy GhcTc) -> DerivEnv
- TcDerivUtils: NonDerivableClass :: SDoc -> DerivStatus
+ TcDerivUtils: NonDerivableClass :: SDoc -> OriginativeDerivStatus
- TcDerivUtils: [denv_strat] :: DerivEnv -> Maybe DerivStrategy
+ TcDerivUtils: [denv_strat] :: DerivEnv -> Maybe (DerivStrategy GhcTc)
- TcEnv: ACoAxiom :: (CoAxiom Branched) -> TyThing
+ TcEnv: ACoAxiom :: CoAxiom Branched -> TyThing
- TcEnv: pprInstInfoDetails :: (SourceTextX a, OutputableBndrId a) => InstInfo a -> SDoc
+ TcEnv: pprInstInfoDetails :: OutputableBndrId (GhcPass a) => InstInfo (GhcPass a) -> SDoc
- TcEvidence: EvBinds :: (Bag EvBind) -> TcEvBinds
+ TcEvidence: EvBinds :: Bag EvBind -> TcEvBinds
- TcEvidence: EvCsPushCall :: Name -> RealSrcSpan -> EvTerm -> EvCallStack
+ TcEvidence: EvCsPushCall :: Name -> RealSrcSpan -> EvExpr -> EvCallStack
- TcEvidence: mkEvCast :: EvTerm -> TcCoercion -> EvTerm
+ TcEvidence: mkEvCast :: EvExpr -> TcCoercion -> EvTerm
- TcEvidence: mkEvScSelectors :: EvTerm -> Class -> [TcType] -> [(TcPredType, EvTerm)]
+ TcEvidence: mkEvScSelectors :: Class -> [TcType] -> [(TcPredType, EvExpr)]
- TcEvidence: mkTcNthCo :: Int -> TcCoercion -> TcCoercion
+ TcEvidence: mkTcNthCo :: Role -> Int -> TcCoercion -> TcCoercion
- TcGenFunctor: FT :: a -> a -> a -> a -> a -> a -> TyCon -> [a] -> a -> Type -> a -> a -> a -> TcTyVar -> a -> a -> FFoldType a
+ TcGenFunctor: FT :: a -> a -> a -> (a -> a -> a) -> (TyCon -> [a] -> a) -> (Type -> a -> a) -> a -> (TcTyVar -> a -> a) -> FFoldType a
- TcHsSyn: hsLitType :: HsLit p -> TcType
+ TcHsSyn: hsLitType :: HsLit (GhcPass p) -> TcType
- TcHsSyn: mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr name
+ TcHsSyn: mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)
- TcHsSyn: mkHsAppTy :: LHsType pass -> LHsType pass -> LHsType pass
+ TcHsSyn: mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)
- TcHsSyn: mkHsCaseAlt :: LPat id -> (Located (body id)) -> LMatch id (Located (body id))
+ TcHsSyn: mkHsCaseAlt :: LPat (GhcPass p) -> Located (body (GhcPass p)) -> LMatch (GhcPass p) (Located (body (GhcPass p)))
- TcHsSyn: zonkTopDecls :: Bag EvBind -> LHsBinds GhcTcId -> [LRuleDecl GhcTcId] -> [LVectDecl GhcTcId] -> [LTcSpecPrag] -> [LForeignDecl GhcTcId] -> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc, [LForeignDecl GhcTc], [LTcSpecPrag], [LRuleDecl GhcTc], [LVectDecl GhcTc])
+ TcHsSyn: zonkTopDecls :: Bag EvBind -> LHsBinds GhcTcId -> [LRuleDecl GhcTcId] -> [LTcSpecPrag] -> [LForeignDecl GhcTcId] -> TcM (TypeEnv, Bag EvBind, LHsBinds GhcTc, [LForeignDecl GhcTc], [LTcSpecPrag], [LRuleDecl GhcTc])
- TcHsType: instantiateTyUntilN :: Maybe (VarEnv Kind) -> Int -> TcType -> TcKind -> TcM (TcType, [TcType], TcKind)
+ TcHsType: instantiateTyUntilN :: Maybe (VarEnv Kind) -> Int -> TcKind -> TcM ([TcType], TcKind)
- TcHsType: kcHsSigType :: [Located Name] -> LHsSigType GhcRn -> TcM ()
+ TcHsType: kcHsSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM ()
- TcHsType: kcLHsQTyVars :: Name -> TyConFlavour -> Bool -> Bool -> LHsQTyVars GhcRn -> TcM (Kind, r) -> TcM (TcTyCon, r)
+ TcHsType: kcLHsQTyVars :: Name -> TyConFlavour -> Bool -> LHsQTyVars GhcRn -> TcM Kind -> TcM TcTyCon
- TcHsType: tcClassSigType :: [Located Name] -> LHsSigType GhcRn -> TcM Type
+ TcHsType: tcClassSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM Type
- TcHsType: tcExplicitTKBndrs :: [LHsTyVarBndr GhcRn] -> ([TyVar] -> TcM (a, TyVarSet)) -> TcM (a, TyVarSet)
+ TcHsType: tcExplicitTKBndrs :: SkolemInfo -> [LHsTyVarBndr GhcRn] -> TcM a -> TcM ([TcTyVar], a)
- 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 TcTyVar, [TcTyVar], TcThetaType, TcType)
+ TcHsType: tcHsPartialSigType :: UserTypeCtxt -> LHsSigWcType GhcRn -> TcM ([(Name, TcTyVar)], Maybe TcType, [Name], [TcTyVar], TcThetaType, TcType)
- TcHsType: tcImplicitTKBndrs :: [Name] -> TcM (a, TyVarSet) -> TcM ([TcTyVar], a)
+ TcHsType: tcImplicitTKBndrs :: SkolemInfo -> [Name] -> TcM a -> TcM ([TcTyVar], a)
- TcHsType: tcLHsKindSig :: LHsKind GhcRn -> TcM Kind
+ TcHsType: tcLHsKindSig :: UserTypeCtxt -> LHsKind GhcRn -> TcM Kind
- TcMType: type TcTyVar = TyVar
+ TcMType: type TcTyVar = Var
- TcMType: zonkTcTyVarToTyVar :: TcTyVar -> TcM TcTyVar
+ TcMType: zonkTcTyVarToTyVar :: HasDebugCallStack => TcTyVar -> TcM TcTyVar
- TcMatches: MC :: HsMatchContext Name -> Located (body GhcRn) -> ExpRhoType -> TcM (Located (body GhcTcId)) -> TcMatchCtxt body
+ TcMatches: MC :: HsMatchContext Name -> (Located (body GhcRn) -> ExpRhoType -> TcM (Located (body GhcTcId))) -> TcMatchCtxt body
- TcMatches: tcMatchesCase :: (Outputable (body GhcRn)) => TcMatchCtxt body -> TcSigmaType -> MatchGroup GhcRn (Located (body GhcRn)) -> ExpRhoType -> TcM (MatchGroup GhcTcId (Located (body GhcTcId)))
+ TcMatches: tcMatchesCase :: Outputable (body GhcRn) => TcMatchCtxt body -> TcSigmaType -> MatchGroup GhcRn (Located (body GhcRn)) -> ExpRhoType -> TcM (MatchGroup GhcTcId (Located (body GhcTcId)))
- TcMatches: tcStmts :: (Outputable (body GhcRn)) => HsStmtContext Name -> TcStmtChecker body rho_type -> [LStmt GhcRn (Located (body GhcRn))] -> rho_type -> TcM [LStmt GhcTcId (Located (body GhcTcId))]
+ TcMatches: tcStmts :: Outputable (body GhcRn) => HsStmtContext Name -> TcStmtChecker body rho_type -> [LStmt GhcRn (Located (body GhcRn))] -> rho_type -> TcM [LStmt GhcTcId (Located (body GhcTcId))]
- TcMatches: tcStmtsAndThen :: (Outputable (body GhcRn)) => HsStmtContext Name -> TcStmtChecker body rho_type -> [LStmt GhcRn (Located (body GhcRn))] -> rho_type -> (rho_type -> TcM thing) -> TcM ([LStmt GhcTcId (Located (body GhcTcId))], thing)
+ TcMatches: tcStmtsAndThen :: Outputable (body GhcRn) => HsStmtContext Name -> TcStmtChecker body rho_type -> [LStmt GhcRn (Located (body GhcRn))] -> rho_type -> (rho_type -> TcM thing) -> TcM ([LStmt GhcTcId (Located (body GhcTcId))], thing)
- TcRnDriver: tcRnModule :: HscEnv -> HscSource -> Bool -> HsParsedModule -> IO (Messages, Maybe TcGblEnv)
+ TcRnDriver: tcRnModule :: HscEnv -> ModSummary -> Bool -> HsParsedModule -> IO (Messages, Maybe TcGblEnv)
- TcRnDriver: tcRnModuleTcRnM :: HscEnv -> HscSource -> HsParsedModule -> (Module, SrcSpan) -> TcRn TcGblEnv
+ TcRnDriver: tcRnModuleTcRnM :: HscEnv -> ModSummary -> HsParsedModule -> (Module, SrcSpan) -> TcRn TcGblEnv
- TcRnTypes: ArithSeqOrigin :: (ArithSeqInfo GhcRn) -> CtOrigin
+ TcRnTypes: ArithSeqOrigin :: ArithSeqInfo GhcRn -> CtOrigin
- TcRnTypes: ArrowCtxt :: LocalRdrEnv -> (TcRef WantedConstraints) -> ArrowCtxt
+ TcRnTypes: ArrowCtxt :: LocalRdrEnv -> TcRef WantedConstraints -> ArrowCtxt
- TcRnTypes: DerivOriginCoerce :: Id -> Type -> Type -> CtOrigin
+ TcRnTypes: DerivOriginCoerce :: Id -> Type -> Type -> Bool -> CtOrigin
- TcRnTypes: DerivOriginDC :: DataCon -> Int -> CtOrigin
+ TcRnTypes: DerivOriginDC :: DataCon -> Int -> Bool -> CtOrigin
- TcRnTypes: DoPatOrigin :: (LPat GhcRn) -> CtOrigin
+ TcRnTypes: DoPatOrigin :: LPat GhcRn -> CtOrigin
- TcRnTypes: DsGblEnv :: Module -> FamInstEnv -> PrintUnqualified -> IORef Messages -> (IfGblEnv, IfLclEnv) -> GlobalRdrEnv -> PArrBuiltin -> CompleteMatchMap -> DsGblEnv
+ TcRnTypes: DsGblEnv :: Module -> FamInstEnv -> PrintUnqualified -> IORef Messages -> (IfGblEnv, IfLclEnv) -> CompleteMatchMap -> IORef CostCentreState -> DsGblEnv
- TcRnTypes: DsSplice :: (HsExpr GhcTc) -> DsMetaVal
+ TcRnTypes: DsSplice :: HsExpr GhcTc -> DsMetaVal
- TcRnTypes: Env :: HscEnv -> {-# UNPACK #-} !(IORef UniqSupply) -> gbl -> lcl -> Env gbl lcl
+ TcRnTypes: Env :: !HscEnv -> {-# UNPACK #-} !IORef UniqSupply -> gbl -> lcl -> Env gbl lcl
- TcRnTypes: FailablePattern :: (LPat GhcTcId) -> CtOrigin
+ TcRnTypes: FailablePattern :: LPat GhcTcId -> CtOrigin
- TcRnTypes: Implic :: TcLevel -> [TcTyVar] -> SkolemInfo -> [EvVar] -> Bool -> TcLclEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
+ TcRnTypes: Implic :: TcLevel -> [TcTyVar] -> SkolemInfo -> Maybe SDoc -> [EvVar] -> Bool -> Env TcGblEnv TcLclEnv -> WantedConstraints -> EvBindsVar -> VarSet -> VarSet -> ImplicStatus -> Implication
- TcRnTypes: IsGroupClosed :: (NameEnv RhsNames) -> ClosedTypeId -> IsGroupClosed
+ TcRnTypes: IsGroupClosed :: NameEnv RhsNames -> ClosedTypeId -> IsGroupClosed
- TcRnTypes: KindEqOrigin :: TcType -> (Maybe TcType) -> CtOrigin -> (Maybe TypeOrKind) -> CtOrigin
+ TcRnTypes: KindEqOrigin :: TcType -> Maybe TcType -> CtOrigin -> Maybe TypeOrKind -> CtOrigin
- TcRnTypes: LiteralOrigin :: (HsOverLit GhcRn) -> CtOrigin
+ TcRnTypes: LiteralOrigin :: HsOverLit GhcRn -> CtOrigin
- TcRnTypes: MCompPatOrigin :: (LPat GhcRn) -> CtOrigin
+ TcRnTypes: MCompPatOrigin :: LPat GhcRn -> CtOrigin
- TcRnTypes: PatSkol :: ConLike -> (HsMatchContext Name) -> SkolemInfo
+ TcRnTypes: PatSkol :: ConLike -> HsMatchContext Name -> SkolemInfo
- TcRnTypes: ProvCtxtOrigin :: (PatSynBind GhcRn GhcRn) -> CtOrigin
+ TcRnTypes: ProvCtxtOrigin :: PatSynBind GhcRn GhcRn -> CtOrigin
- TcRnTypes: RnPendingUntyped :: (TcRef [PendingRnSplice]) -> PendingStuff
+ TcRnTypes: RnPendingUntyped :: TcRef [PendingRnSplice] -> PendingStuff
- TcRnTypes: RunSplice :: (TcRef [ForeignRef (Q ())]) -> ThStage
+ TcRnTypes: RunSplice :: TcRef [ForeignRef (Q ())] -> ThStage
- TcRnTypes: TISI :: TcIdSigInfo -> [(Name, TcTyVar)] -> TcThetaType -> TcSigmaType -> [(Name, TcTyVar)] -> Maybe TcTyVar -> TcIdSigInst
+ TcRnTypes: TISI :: TcIdSigInfo -> [(Name, TcTyVar)] -> TcThetaType -> TcSigmaType -> [(Name, TcTyVar)] -> Maybe TcType -> TcIdSigInst
- 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, String)] -> TcRef NameSet -> TcRef [TcM ()] -> 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] -> [LVectDecl GhcTc] -> [PatSyn] -> Maybe LHsDocString -> AnyHpcUsage -> SelfBootInfo -> Maybe Name -> TcRef (Bool, WarningMessages) -> [TcPluginSolver] -> RealSrcSpan -> TcRef WantedConstraints -> [CompleteMatch] -> 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 [TcM ()] -> 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: TcPending :: (TcRef [PendingTcSplice]) -> (TcRef WantedConstraints) -> PendingStuff
+ TcRnTypes: TcPending :: TcRef [PendingTcSplice] -> TcRef WantedConstraints -> PendingStuff
- TcRnTypes: TcPlugin :: TcPluginM s -> s -> TcPluginSolver -> s -> TcPluginM () -> TcPlugin
+ TcRnTypes: TcPlugin :: TcPluginM s -> (s -> TcPluginSolver) -> (s -> TcPluginM ()) -> TcPlugin
- TcRnTypes: [env_top] :: Env gbl lcl -> HscEnv
+ TcRnTypes: [env_top] :: Env gbl lcl -> !HscEnv
- TcRnTypes: [env_us] :: Env gbl lcl -> {-# UNPACK #-} !(IORef UniqSupply)
+ TcRnTypes: [env_us] :: Env gbl lcl -> {-# UNPACK #-} !IORef UniqSupply
- TcRnTypes: [ic_env] :: Implication -> TcLclEnv
+ TcRnTypes: [ic_env] :: Implication -> Env TcGblEnv TcLclEnv
- TcRnTypes: [sig_inst_wcx] :: TcIdSigInst -> Maybe TcTyVar
+ TcRnTypes: [sig_inst_wcx] :: TcIdSigInst -> Maybe TcType
- TcRnTypes: [tcg_fam_inst_env] :: TcGblEnv -> FamInstEnv
+ TcRnTypes: [tcg_fam_inst_env] :: TcGblEnv -> !FamInstEnv
- TcRnTypes: [tcg_hpc] :: TcGblEnv -> AnyHpcUsage
+ TcRnTypes: [tcg_hpc] :: TcGblEnv -> !AnyHpcUsage
- TcRnTypes: [tcg_inst_env] :: TcGblEnv -> InstEnv
+ TcRnTypes: [tcg_inst_env] :: TcGblEnv -> !InstEnv
- TcRnTypes: [tcg_th_foreign_files] :: TcGblEnv -> TcRef [(ForeignSrcLang, String)]
+ TcRnTypes: [tcg_th_foreign_files] :: TcGblEnv -> TcRef [(ForeignSrcLang, FilePath)]
- TcRnTypes: newImplication :: Implication
+ TcRnTypes: newImplication :: TcM Implication
- TcRnTypes: superClassesMightHelp :: Ct -> Bool
+ TcRnTypes: superClassesMightHelp :: WantedConstraints -> Bool
- TcSMonad: Cached :: EvTerm -> MaybeNew
+ TcSMonad: Cached :: EvExpr -> MaybeNew
- TcSMonad: IC :: InertEqs -> FunEqMap Ct -> DictMap Ct -> DictMap Ct -> Cts -> Int -> InertCans
+ TcSMonad: IC :: InertEqs -> FunEqMap Ct -> DictMap Ct -> [QCInst] -> DictMap Ct -> Cts -> Int -> InertCans
- TcTyClsDecls: tcConDecls :: TyCon -> ([TyConBinder], Type) -> [LConDecl GhcRn] -> TcM [DataCon]
+ TcTyClsDecls: tcConDecls :: KnotTied TyCon -> ([KnotTied TyConBinder], KnotTied Type) -> [LConDecl GhcRn] -> TcM [DataCon]
- TcTyClsDecls: tcFamTyPats :: TcTyCon -> Maybe ClsInstInfo -> [Name] -> HsTyPats GhcRn -> (TcKind -> TcM ([TcType], TcKind)) -> ([TcTyVar] -> [TcType] -> TcKind -> TcM a) -> TcM a
+ TcTyClsDecls: tcFamTyPats :: TyCon -> Maybe ClsInstInfo -> [Name] -> HsTyPats GhcRn -> (TcKind -> TcM ([TcType], TcKind)) -> ([TcTyVar] -> [TcType] -> TcKind -> TcM a) -> TcM a
- TcTyClsDecls: tcTyFamInstEqn :: TcTyCon -> Maybe ClsInstInfo -> LTyFamInstEqn GhcRn -> TcM CoAxBranch
+ TcTyClsDecls: tcTyFamInstEqn :: TcTyCon -> Maybe ClsInstInfo -> LTyFamInstEqn GhcRn -> TcM (KnotTied CoAxBranch)
- TcTyDecls: mkOneRecordSelector :: [ConLike] -> RecSelParent -> FieldLabel -> (LSig GhcRn, (RecFlag, LHsBinds GhcRn))
+ TcTyDecls: mkOneRecordSelector :: [ConLike] -> RecSelParent -> FieldLabel -> (Id, LHsBind GhcRn)
- TcTyDecls: mkRecSelBinds :: [TyCon] -> HsValBinds GhcRn
+ TcTyDecls: mkRecSelBinds :: [TyCon] -> [(Id, LHsBind GhcRn)]
- TcType: tcEqKind :: TcKind -> TcKind -> Bool
+ TcType: tcEqKind :: HasDebugCallStack => TcKind -> TcKind -> Bool
- TcType: tcEqType :: TcType -> TcType -> Bool
+ TcType: tcEqType :: HasDebugCallStack => TcType -> TcType -> Bool
- TcType: type TcTyVar = TyVar
+ TcType: type TcTyVar = Var
- TcTypeNats: BuiltInSynFamily :: [Type] -> Maybe (CoAxiomRule, [Type], Type) -> [Type] -> Type -> [TypeEqn] -> [Type] -> Type -> [Type] -> Type -> [TypeEqn] -> BuiltInSynFamily
+ TcTypeNats: BuiltInSynFamily :: ([Type] -> Maybe (CoAxiomRule, [Type], Type)) -> ([Type] -> Type -> [TypeEqn]) -> ([Type] -> Type -> [Type] -> Type -> [TypeEqn]) -> BuiltInSynFamily
- TcValidity: checkValidTelescope :: SDoc -> [TyVar] -> SDoc -> TcM ()
+ TcValidity: checkValidTelescope :: [TyConBinder] -> SDoc -> SDoc -> TcM ()
- TmOracle: PmExprOther :: (HsExpr GhcTc) -> PmExpr
+ TmOracle: PmExprOther :: HsExpr GhcTc -> PmExpr
- TmOracle: PmOLit :: Bool -> (HsOverLit GhcTc) -> PmLit
+ TmOracle: PmOLit :: Bool -> HsOverLit GhcTc -> PmLit
- TmOracle: PmSLit :: (HsLit GhcTc) -> PmLit
+ TmOracle: PmSLit :: HsLit GhcTc -> PmLit
- TyCon: ClosedSynFamilyTyCon :: (Maybe (CoAxiom Branched)) -> FamTyConFlav
+ TyCon: ClosedSynFamilyTyCon :: Maybe (CoAxiom Branched) -> FamTyConFlav
- TyCon: DataFamInstTyCon :: (CoAxiom Unbranched) -> TyCon -> [Type] -> AlgTyConFlav
+ TyCon: DataFamInstTyCon :: CoAxiom Unbranched -> TyCon -> [Type] -> AlgTyConFlav
- TyCon: DataFamilyFlavour :: TyConFlavour
+ TyCon: DataFamilyFlavour :: Bool -> TyConFlavour
- TyCon: DataTyCon :: [DataCon] -> Bool -> AlgTyConRhs
+ TyCon: DataTyCon :: [DataCon] -> Int -> Bool -> AlgTyConRhs
- TyCon: OpenTypeFamilyFlavour :: TyConFlavour
+ TyCon: OpenTypeFamilyFlavour :: Bool -> TyConFlavour
- TyCon: SumTyCon :: [DataCon] -> AlgTyConRhs
+ TyCon: SumTyCon :: [DataCon] -> Int -> AlgTyConRhs
- TyCon: UnboxedAlgTyCon :: (Maybe TyConRepName) -> AlgTyConFlav
+ TyCon: UnboxedAlgTyCon :: Maybe TyConRepName -> AlgTyConFlav
- TyCon: mkTcTyCon :: Name -> [TyConBinder] -> Kind -> [(Name, TyVar)] -> TyConFlavour -> TyCon
+ TyCon: mkTcTyCon :: Name -> SDoc -> [TyConBinder] -> Kind -> [(Name, TcTyVar)] -> TyConFlavour -> TyCon
- Type: ACoAxiom :: (CoAxiom Branched) -> TyThing
+ Type: ACoAxiom :: CoAxiom Branched -> TyThing
- Type: TyCoMapper :: Bool -> env -> TyVar -> m Type -> env -> CoVar -> m Coercion -> env -> CoercionHole -> m Coercion -> env -> TyVar -> ArgFlag -> m (env, TyVar) -> TyCoMapper env m
+ Type: TyCoMapper :: Bool -> (env -> TyVar -> m Type) -> (env -> CoVar -> m Coercion) -> (env -> CoercionHole -> m Coercion) -> (env -> TyVar -> ArgFlag -> m (env, TyVar)) -> (TyCon -> m TyCon) -> TyCoMapper env m
- Type: getClassPredTys :: PredType -> (Class, [Type])
+ Type: getClassPredTys :: HasDebugCallStack => PredType -> (Class, [Type])
- Type: maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc
+ Type: maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc
- Type: pprPrecType :: TyPrec -> Type -> SDoc
+ Type: pprPrecType :: PprPrec -> Type -> SDoc
- Util: foldl1' :: () => a -> a -> a -> [a] -> a
+ Util: foldl1' :: () => (a -> a -> a) -> [a] -> a
- Util: nTimes :: Int -> (a -> a) -> (a -> a)
+ Util: nTimes :: Int -> (a -> a) -> a -> a
- Util: sortWith :: Ord b => a -> b -> [a] -> [a]
+ Util: sortWith :: Ord b => (a -> b) -> [a] -> [a]
- Var: updateTyVarKindM :: (Monad m) => (Kind -> m Kind) -> TyVar -> m TyVar
+ Var: updateTyVarKindM :: Monad m => (Kind -> m Kind) -> TyVar -> m TyVar
- WwLib: mkWWstr :: DynFlags -> FamInstEnvs -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
+ WwLib: mkWWstr :: DynFlags -> FamInstEnvs -> Bool -> [Var] -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)
- WwLib: mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Maybe JoinArity -> Type -> [Demand] -> DmdResult -> UniqSM (Maybe WwResult)
+ WwLib: mkWwBodies :: DynFlags -> FamInstEnvs -> VarSet -> Id -> [Demand] -> DmdResult -> UniqSM (Maybe WwResult)
- X86.Instr: CALL :: (Either Imm Reg) -> [Reg] -> Instr
+ X86.Instr: CALL :: Either Imm Reg -> [Reg] -> Instr
- X86.Instr: JMP_TBL :: Operand -> [Maybe BlockId] -> Section -> CLabel -> Instr
+ X86.Instr: JMP_TBL :: Operand -> [Maybe JumpDest] -> Section -> CLabel -> Instr

Files

autogen/Config.hs view
@@ -19,19 +19,19 @@ cProjectName          :: String cProjectName          = "The Glorious Glasgow Haskell Compilation System" cProjectGitCommitId   :: String-cProjectGitCommitId   = "3bed09b2efd3df678c5d0752d2cdfba20d7c4863"+cProjectGitCommitId   = "0d2cdec78471728a0f2c487581d36acda68bb941" cProjectVersion       :: String-cProjectVersion       = "8.4.4"+cProjectVersion       = "8.6.1" cProjectVersionInt    :: String-cProjectVersionInt    = "804"+cProjectVersionInt    = "806" cProjectPatchLevel    :: String-cProjectPatchLevel    = "4"+cProjectPatchLevel    = "1" cProjectPatchLevel1   :: String-cProjectPatchLevel1   = "4"+cProjectPatchLevel1   = "1" cProjectPatchLevel2   :: String cProjectPatchLevel2   = "" cBooterVersion        :: String-cBooterVersion        = "8.4.4"+cBooterVersion        = "8.4.3" cStage                :: String cStage                = show (STAGE :: Int) cIntegerLibrary       :: String
autogen/primop-can-fail.hs-incl view
@@ -47,6 +47,20 @@ primOpCanFail IndexByteArrayOp_Word16 = True primOpCanFail IndexByteArrayOp_Word32 = True primOpCanFail IndexByteArrayOp_Word64 = True+primOpCanFail IndexByteArrayOp_Word8AsChar = True+primOpCanFail IndexByteArrayOp_Word8AsWideChar = True+primOpCanFail IndexByteArrayOp_Word8AsAddr = True+primOpCanFail IndexByteArrayOp_Word8AsFloat = True+primOpCanFail IndexByteArrayOp_Word8AsDouble = True+primOpCanFail IndexByteArrayOp_Word8AsStablePtr = True+primOpCanFail IndexByteArrayOp_Word8AsInt16 = True+primOpCanFail IndexByteArrayOp_Word8AsInt32 = True+primOpCanFail IndexByteArrayOp_Word8AsInt64 = True+primOpCanFail IndexByteArrayOp_Word8AsInt = True+primOpCanFail IndexByteArrayOp_Word8AsWord16 = True+primOpCanFail IndexByteArrayOp_Word8AsWord32 = True+primOpCanFail IndexByteArrayOp_Word8AsWord64 = True+primOpCanFail IndexByteArrayOp_Word8AsWord = True primOpCanFail ReadByteArrayOp_Char = True primOpCanFail ReadByteArrayOp_WideChar = True primOpCanFail ReadByteArrayOp_Int = True@@ -63,6 +77,20 @@ primOpCanFail ReadByteArrayOp_Word16 = True primOpCanFail ReadByteArrayOp_Word32 = True primOpCanFail ReadByteArrayOp_Word64 = True+primOpCanFail ReadByteArrayOp_Word8AsChar = True+primOpCanFail ReadByteArrayOp_Word8AsWideChar = True+primOpCanFail ReadByteArrayOp_Word8AsAddr = True+primOpCanFail ReadByteArrayOp_Word8AsFloat = True+primOpCanFail ReadByteArrayOp_Word8AsDouble = True+primOpCanFail ReadByteArrayOp_Word8AsStablePtr = True+primOpCanFail ReadByteArrayOp_Word8AsInt16 = True+primOpCanFail ReadByteArrayOp_Word8AsInt32 = True+primOpCanFail ReadByteArrayOp_Word8AsInt64 = True+primOpCanFail ReadByteArrayOp_Word8AsInt = True+primOpCanFail ReadByteArrayOp_Word8AsWord16 = True+primOpCanFail ReadByteArrayOp_Word8AsWord32 = True+primOpCanFail ReadByteArrayOp_Word8AsWord64 = True+primOpCanFail ReadByteArrayOp_Word8AsWord = True primOpCanFail WriteByteArrayOp_Char = True primOpCanFail WriteByteArrayOp_WideChar = True primOpCanFail WriteByteArrayOp_Int = True@@ -79,6 +107,20 @@ primOpCanFail WriteByteArrayOp_Word16 = True primOpCanFail WriteByteArrayOp_Word32 = True primOpCanFail WriteByteArrayOp_Word64 = True+primOpCanFail WriteByteArrayOp_Word8AsChar = True+primOpCanFail WriteByteArrayOp_Word8AsWideChar = True+primOpCanFail WriteByteArrayOp_Word8AsAddr = True+primOpCanFail WriteByteArrayOp_Word8AsFloat = True+primOpCanFail WriteByteArrayOp_Word8AsDouble = True+primOpCanFail WriteByteArrayOp_Word8AsStablePtr = True+primOpCanFail WriteByteArrayOp_Word8AsInt16 = True+primOpCanFail WriteByteArrayOp_Word8AsInt32 = True+primOpCanFail WriteByteArrayOp_Word8AsInt64 = True+primOpCanFail WriteByteArrayOp_Word8AsInt = True+primOpCanFail WriteByteArrayOp_Word8AsWord16 = True+primOpCanFail WriteByteArrayOp_Word8AsWord32 = True+primOpCanFail WriteByteArrayOp_Word8AsWord64 = True+primOpCanFail WriteByteArrayOp_Word8AsWord = True primOpCanFail CompareByteArraysOp = True primOpCanFail CopyByteArrayOp = True primOpCanFail CopyMutableByteArrayOp = True
autogen/primop-code-size.hs-incl view
@@ -3,6 +3,9 @@ primOpCodeSize IntSubCOp = 2 primOpCodeSize ChrOp = 0 primOpCodeSize Int2WordOp = 0+primOpCodeSize WordAddCOp = 2+primOpCodeSize WordSubCOp = 2+primOpCodeSize WordAdd2Op = 2 primOpCodeSize Word2IntOp = 0 primOpCodeSize DoubleExpOp =  primOpCodeSizeForeignCall  primOpCodeSize DoubleLogOp =  primOpCodeSizeForeignCall 
autogen/primop-commutable.hs-incl view
@@ -6,9 +6,11 @@ commutableOp AndIOp = True commutableOp OrIOp = True commutableOp XorIOp = True+commutableOp IntAddCOp = True commutableOp IntEqOp = True commutableOp IntNeOp = True commutableOp WordAddOp = True+commutableOp WordAddCOp = True commutableOp WordAdd2Op = True commutableOp WordMulOp = True commutableOp WordMul2Op = True
autogen/primop-data-decl.hs-incl view
@@ -36,6 +36,7 @@    | ISraOp    | ISrlOp    | WordAddOp+   | WordAddCOp    | WordSubCOp    | WordAdd2Op    | WordSubOp@@ -211,6 +212,20 @@    | IndexByteArrayOp_Word16    | IndexByteArrayOp_Word32    | IndexByteArrayOp_Word64+   | IndexByteArrayOp_Word8AsChar+   | IndexByteArrayOp_Word8AsWideChar+   | IndexByteArrayOp_Word8AsAddr+   | IndexByteArrayOp_Word8AsFloat+   | IndexByteArrayOp_Word8AsDouble+   | IndexByteArrayOp_Word8AsStablePtr+   | IndexByteArrayOp_Word8AsInt16+   | IndexByteArrayOp_Word8AsInt32+   | IndexByteArrayOp_Word8AsInt64+   | IndexByteArrayOp_Word8AsInt+   | IndexByteArrayOp_Word8AsWord16+   | IndexByteArrayOp_Word8AsWord32+   | IndexByteArrayOp_Word8AsWord64+   | IndexByteArrayOp_Word8AsWord    | ReadByteArrayOp_Char    | ReadByteArrayOp_WideChar    | ReadByteArrayOp_Int@@ -227,6 +242,20 @@    | ReadByteArrayOp_Word16    | ReadByteArrayOp_Word32    | ReadByteArrayOp_Word64+   | ReadByteArrayOp_Word8AsChar+   | ReadByteArrayOp_Word8AsWideChar+   | ReadByteArrayOp_Word8AsAddr+   | ReadByteArrayOp_Word8AsFloat+   | ReadByteArrayOp_Word8AsDouble+   | ReadByteArrayOp_Word8AsStablePtr+   | ReadByteArrayOp_Word8AsInt16+   | ReadByteArrayOp_Word8AsInt32+   | ReadByteArrayOp_Word8AsInt64+   | ReadByteArrayOp_Word8AsInt+   | ReadByteArrayOp_Word8AsWord16+   | ReadByteArrayOp_Word8AsWord32+   | ReadByteArrayOp_Word8AsWord64+   | ReadByteArrayOp_Word8AsWord    | WriteByteArrayOp_Char    | WriteByteArrayOp_WideChar    | WriteByteArrayOp_Int@@ -243,6 +272,20 @@    | WriteByteArrayOp_Word16    | WriteByteArrayOp_Word32    | WriteByteArrayOp_Word64+   | WriteByteArrayOp_Word8AsChar+   | WriteByteArrayOp_Word8AsWideChar+   | WriteByteArrayOp_Word8AsAddr+   | WriteByteArrayOp_Word8AsFloat+   | WriteByteArrayOp_Word8AsDouble+   | WriteByteArrayOp_Word8AsStablePtr+   | WriteByteArrayOp_Word8AsInt16+   | WriteByteArrayOp_Word8AsInt32+   | WriteByteArrayOp_Word8AsInt64+   | WriteByteArrayOp_Word8AsInt+   | WriteByteArrayOp_Word8AsWord16+   | WriteByteArrayOp_Word8AsWord32+   | WriteByteArrayOp_Word8AsWord64+   | WriteByteArrayOp_Word8AsWord    | CompareByteArraysOp    | CopyByteArrayOp    | CopyMutableByteArrayOp@@ -352,7 +395,6 @@    | RetryOp    | CatchRetryOp    | CatchSTMOp-   | Check    | NewTVarOp    | ReadTVarOp    | ReadTVarIOOp@@ -421,6 +463,8 @@    | ClearCCSOp    | TraceEventOp    | TraceMarkerOp+   | GetThreadAllocationCounter+   | SetThreadAllocationCounter    | VecBroadcastOp PrimOpVecCat Length Width    | VecPackOp PrimOpVecCat Length Width    | VecUnpackOp PrimOpVecCat Length Width
autogen/primop-has-side-effects.hs-incl view
@@ -44,6 +44,20 @@ primOpHasSideEffects ReadByteArrayOp_Word16 = True primOpHasSideEffects ReadByteArrayOp_Word32 = True primOpHasSideEffects ReadByteArrayOp_Word64 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsChar = True+primOpHasSideEffects ReadByteArrayOp_Word8AsWideChar = True+primOpHasSideEffects ReadByteArrayOp_Word8AsAddr = True+primOpHasSideEffects ReadByteArrayOp_Word8AsFloat = True+primOpHasSideEffects ReadByteArrayOp_Word8AsDouble = True+primOpHasSideEffects ReadByteArrayOp_Word8AsStablePtr = True+primOpHasSideEffects ReadByteArrayOp_Word8AsInt16 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsInt32 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsInt64 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsInt = True+primOpHasSideEffects ReadByteArrayOp_Word8AsWord16 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsWord32 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsWord64 = True+primOpHasSideEffects ReadByteArrayOp_Word8AsWord = True primOpHasSideEffects WriteByteArrayOp_Char = True primOpHasSideEffects WriteByteArrayOp_WideChar = True primOpHasSideEffects WriteByteArrayOp_Int = True@@ -60,6 +74,20 @@ primOpHasSideEffects WriteByteArrayOp_Word16 = True primOpHasSideEffects WriteByteArrayOp_Word32 = True primOpHasSideEffects WriteByteArrayOp_Word64 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsChar = True+primOpHasSideEffects WriteByteArrayOp_Word8AsWideChar = True+primOpHasSideEffects WriteByteArrayOp_Word8AsAddr = True+primOpHasSideEffects WriteByteArrayOp_Word8AsFloat = True+primOpHasSideEffects WriteByteArrayOp_Word8AsDouble = True+primOpHasSideEffects WriteByteArrayOp_Word8AsStablePtr = True+primOpHasSideEffects WriteByteArrayOp_Word8AsInt16 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsInt32 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsInt64 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsInt = True+primOpHasSideEffects WriteByteArrayOp_Word8AsWord16 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsWord32 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsWord64 = True+primOpHasSideEffects WriteByteArrayOp_Word8AsWord = True primOpHasSideEffects CopyByteArrayOp = True primOpHasSideEffects CopyMutableByteArrayOp = True primOpHasSideEffects CopyByteArrayToAddrOp = True@@ -135,7 +163,6 @@ primOpHasSideEffects RetryOp = True primOpHasSideEffects CatchRetryOp = True primOpHasSideEffects CatchSTMOp = True-primOpHasSideEffects Check = True primOpHasSideEffects NewTVarOp = True primOpHasSideEffects ReadTVarOp = True primOpHasSideEffects ReadTVarIOOp = True@@ -184,6 +211,8 @@ primOpHasSideEffects NewBCOOp = True primOpHasSideEffects TraceEventOp = True primOpHasSideEffects TraceMarkerOp = True+primOpHasSideEffects GetThreadAllocationCounter = True+primOpHasSideEffects SetThreadAllocationCounter = True primOpHasSideEffects (VecReadByteArrayOp _ _ _) = True primOpHasSideEffects (VecWriteByteArrayOp _ _ _) = True primOpHasSideEffects (VecReadOffAddrOp _ _ _) = True
autogen/primop-list.hs-incl view
@@ -35,6 +35,7 @@    , ISraOp    , ISrlOp    , WordAddOp+   , WordAddCOp    , WordSubCOp    , WordAdd2Op    , WordSubOp@@ -210,6 +211,20 @@    , IndexByteArrayOp_Word16    , IndexByteArrayOp_Word32    , IndexByteArrayOp_Word64+   , IndexByteArrayOp_Word8AsChar+   , IndexByteArrayOp_Word8AsWideChar+   , IndexByteArrayOp_Word8AsAddr+   , IndexByteArrayOp_Word8AsFloat+   , IndexByteArrayOp_Word8AsDouble+   , IndexByteArrayOp_Word8AsStablePtr+   , IndexByteArrayOp_Word8AsInt16+   , IndexByteArrayOp_Word8AsInt32+   , IndexByteArrayOp_Word8AsInt64+   , IndexByteArrayOp_Word8AsInt+   , IndexByteArrayOp_Word8AsWord16+   , IndexByteArrayOp_Word8AsWord32+   , IndexByteArrayOp_Word8AsWord64+   , IndexByteArrayOp_Word8AsWord    , ReadByteArrayOp_Char    , ReadByteArrayOp_WideChar    , ReadByteArrayOp_Int@@ -226,6 +241,20 @@    , ReadByteArrayOp_Word16    , ReadByteArrayOp_Word32    , ReadByteArrayOp_Word64+   , ReadByteArrayOp_Word8AsChar+   , ReadByteArrayOp_Word8AsWideChar+   , ReadByteArrayOp_Word8AsAddr+   , ReadByteArrayOp_Word8AsFloat+   , ReadByteArrayOp_Word8AsDouble+   , ReadByteArrayOp_Word8AsStablePtr+   , ReadByteArrayOp_Word8AsInt16+   , ReadByteArrayOp_Word8AsInt32+   , ReadByteArrayOp_Word8AsInt64+   , ReadByteArrayOp_Word8AsInt+   , ReadByteArrayOp_Word8AsWord16+   , ReadByteArrayOp_Word8AsWord32+   , ReadByteArrayOp_Word8AsWord64+   , ReadByteArrayOp_Word8AsWord    , WriteByteArrayOp_Char    , WriteByteArrayOp_WideChar    , WriteByteArrayOp_Int@@ -242,6 +271,20 @@    , WriteByteArrayOp_Word16    , WriteByteArrayOp_Word32    , WriteByteArrayOp_Word64+   , WriteByteArrayOp_Word8AsChar+   , WriteByteArrayOp_Word8AsWideChar+   , WriteByteArrayOp_Word8AsAddr+   , WriteByteArrayOp_Word8AsFloat+   , WriteByteArrayOp_Word8AsDouble+   , WriteByteArrayOp_Word8AsStablePtr+   , WriteByteArrayOp_Word8AsInt16+   , WriteByteArrayOp_Word8AsInt32+   , WriteByteArrayOp_Word8AsInt64+   , WriteByteArrayOp_Word8AsInt+   , WriteByteArrayOp_Word8AsWord16+   , WriteByteArrayOp_Word8AsWord32+   , WriteByteArrayOp_Word8AsWord64+   , WriteByteArrayOp_Word8AsWord    , CompareByteArraysOp    , CopyByteArrayOp    , CopyMutableByteArrayOp@@ -351,7 +394,6 @@    , RetryOp    , CatchRetryOp    , CatchSTMOp-   , Check    , NewTVarOp    , ReadTVarOp    , ReadTVarIOOp@@ -420,6 +462,8 @@    , ClearCCSOp    , TraceEventOp    , TraceMarkerOp+   , GetThreadAllocationCounter+   , SetThreadAllocationCounter    , (VecBroadcastOp IntVec 16 W8)    , (VecBroadcastOp IntVec 8 W16)    , (VecBroadcastOp IntVec 4 W32)
autogen/primop-out-of-line.hs-incl view
@@ -43,7 +43,6 @@ primOpOutOfLine RetryOp = True primOpOutOfLine CatchRetryOp = True primOpOutOfLine CatchSTMOp = True-primOpOutOfLine Check = True primOpOutOfLine NewTVarOp = True primOpOutOfLine ReadTVarOp = True primOpOutOfLine ReadTVarIOOp = True@@ -63,7 +62,6 @@ primOpOutOfLine ForkOnOp = True primOpOutOfLine KillThreadOp = True primOpOutOfLine YieldOp = True-primOpOutOfLine MyThreadIdOp = True primOpOutOfLine LabelThreadOp = True primOpOutOfLine IsCurrentThreadBoundOp = True primOpOutOfLine NoDuplicateOp = True@@ -96,4 +94,6 @@ primOpOutOfLine ClearCCSOp = True primOpOutOfLine TraceEventOp = True primOpOutOfLine TraceMarkerOp = True+primOpOutOfLine GetThreadAllocationCounter = True+primOpOutOfLine SetThreadAllocationCounter = True primOpOutOfLine _ = False
autogen/primop-primop-info.hs-incl view
@@ -35,6 +35,7 @@ primOpInfo ISraOp = mkGenPrimOp (fsLit "uncheckedIShiftRA#")  [] [intPrimTy, intPrimTy] (intPrimTy) primOpInfo ISrlOp = mkGenPrimOp (fsLit "uncheckedIShiftRL#")  [] [intPrimTy, intPrimTy] (intPrimTy) primOpInfo WordAddOp = mkDyadic (fsLit "plusWord#") wordPrimTy+primOpInfo WordAddCOp = mkGenPrimOp (fsLit "addWordC#")  [] [wordPrimTy, wordPrimTy] ((mkTupleTy Unboxed [wordPrimTy, intPrimTy])) primOpInfo WordSubCOp = mkGenPrimOp (fsLit "subWordC#")  [] [wordPrimTy, wordPrimTy] ((mkTupleTy Unboxed [wordPrimTy, intPrimTy])) primOpInfo WordAdd2Op = mkGenPrimOp (fsLit "plusWord2#")  [] [wordPrimTy, wordPrimTy] ((mkTupleTy Unboxed [wordPrimTy, wordPrimTy])) primOpInfo WordSubOp = mkDyadic (fsLit "minusWord#") wordPrimTy@@ -210,6 +211,20 @@ primOpInfo IndexByteArrayOp_Word16 = mkGenPrimOp (fsLit "indexWord16Array#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy) primOpInfo IndexByteArrayOp_Word32 = mkGenPrimOp (fsLit "indexWord32Array#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy) primOpInfo IndexByteArrayOp_Word64 = mkGenPrimOp (fsLit "indexWord64Array#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)+primOpInfo IndexByteArrayOp_Word8AsChar = mkGenPrimOp (fsLit "indexWord8ArrayAsChar#")  [] [byteArrayPrimTy, intPrimTy] (charPrimTy)+primOpInfo IndexByteArrayOp_Word8AsWideChar = mkGenPrimOp (fsLit "indexWord8ArrayAsWideChar#")  [] [byteArrayPrimTy, intPrimTy] (charPrimTy)+primOpInfo IndexByteArrayOp_Word8AsAddr = mkGenPrimOp (fsLit "indexWord8ArrayAsAddr#")  [] [byteArrayPrimTy, intPrimTy] (addrPrimTy)+primOpInfo IndexByteArrayOp_Word8AsFloat = mkGenPrimOp (fsLit "indexWord8ArrayAsFloat#")  [] [byteArrayPrimTy, intPrimTy] (floatPrimTy)+primOpInfo IndexByteArrayOp_Word8AsDouble = mkGenPrimOp (fsLit "indexWord8ArrayAsDouble#")  [] [byteArrayPrimTy, intPrimTy] (doublePrimTy)+primOpInfo IndexByteArrayOp_Word8AsStablePtr = mkGenPrimOp (fsLit "indexWord8ArrayAsStablePtr#")  [alphaTyVar] [byteArrayPrimTy, intPrimTy] (mkStablePtrPrimTy alphaTy)+primOpInfo IndexByteArrayOp_Word8AsInt16 = mkGenPrimOp (fsLit "indexWord8ArrayAsInt16#")  [] [byteArrayPrimTy, intPrimTy] (intPrimTy)+primOpInfo IndexByteArrayOp_Word8AsInt32 = mkGenPrimOp (fsLit "indexWord8ArrayAsInt32#")  [] [byteArrayPrimTy, intPrimTy] (intPrimTy)+primOpInfo IndexByteArrayOp_Word8AsInt64 = mkGenPrimOp (fsLit "indexWord8ArrayAsInt64#")  [] [byteArrayPrimTy, intPrimTy] (intPrimTy)+primOpInfo IndexByteArrayOp_Word8AsInt = mkGenPrimOp (fsLit "indexWord8ArrayAsInt#")  [] [byteArrayPrimTy, intPrimTy] (intPrimTy)+primOpInfo IndexByteArrayOp_Word8AsWord16 = mkGenPrimOp (fsLit "indexWord8ArrayAsWord16#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)+primOpInfo IndexByteArrayOp_Word8AsWord32 = mkGenPrimOp (fsLit "indexWord8ArrayAsWord32#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)+primOpInfo IndexByteArrayOp_Word8AsWord64 = mkGenPrimOp (fsLit "indexWord8ArrayAsWord64#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy)+primOpInfo IndexByteArrayOp_Word8AsWord = mkGenPrimOp (fsLit "indexWord8ArrayAsWord#")  [] [byteArrayPrimTy, intPrimTy] (wordPrimTy) primOpInfo ReadByteArrayOp_Char = mkGenPrimOp (fsLit "readCharArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, charPrimTy])) primOpInfo ReadByteArrayOp_WideChar = mkGenPrimOp (fsLit "readWideCharArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, charPrimTy])) primOpInfo ReadByteArrayOp_Int = mkGenPrimOp (fsLit "readIntArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy]))@@ -226,6 +241,20 @@ primOpInfo ReadByteArrayOp_Word16 = mkGenPrimOp (fsLit "readWord16Array#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy])) primOpInfo ReadByteArrayOp_Word32 = mkGenPrimOp (fsLit "readWord32Array#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy])) primOpInfo ReadByteArrayOp_Word64 = mkGenPrimOp (fsLit "readWord64Array#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsChar = mkGenPrimOp (fsLit "readWord8ArrayAsChar#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, charPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsWideChar = mkGenPrimOp (fsLit "readWord8ArrayAsWideChar#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, charPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsAddr = mkGenPrimOp (fsLit "readWord8ArrayAsAddr#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, addrPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsFloat = mkGenPrimOp (fsLit "readWord8ArrayAsFloat#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, floatPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsDouble = mkGenPrimOp (fsLit "readWord8ArrayAsDouble#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, doublePrimTy]))+primOpInfo ReadByteArrayOp_Word8AsStablePtr = mkGenPrimOp (fsLit "readWord8ArrayAsStablePtr#")  [deltaTyVar, alphaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, mkStablePtrPrimTy alphaTy]))+primOpInfo ReadByteArrayOp_Word8AsInt16 = mkGenPrimOp (fsLit "readWord8ArrayAsInt16#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsInt32 = mkGenPrimOp (fsLit "readWord8ArrayAsInt32#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsInt64 = mkGenPrimOp (fsLit "readWord8ArrayAsInt64#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsInt = mkGenPrimOp (fsLit "readWord8ArrayAsInt#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, intPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsWord16 = mkGenPrimOp (fsLit "readWord8ArrayAsWord16#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsWord32 = mkGenPrimOp (fsLit "readWord8ArrayAsWord32#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsWord64 = mkGenPrimOp (fsLit "readWord8ArrayAsWord64#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy]))+primOpInfo ReadByteArrayOp_Word8AsWord = mkGenPrimOp (fsLit "readWord8ArrayAsWord#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStatePrimTy deltaTy] ((mkTupleTy Unboxed [mkStatePrimTy deltaTy, wordPrimTy])) primOpInfo WriteByteArrayOp_Char = mkGenPrimOp (fsLit "writeCharArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, charPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo WriteByteArrayOp_WideChar = mkGenPrimOp (fsLit "writeWideCharArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, charPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo WriteByteArrayOp_Int = mkGenPrimOp (fsLit "writeIntArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)@@ -242,6 +271,20 @@ primOpInfo WriteByteArrayOp_Word16 = mkGenPrimOp (fsLit "writeWord16Array#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo WriteByteArrayOp_Word32 = mkGenPrimOp (fsLit "writeWord32Array#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo WriteByteArrayOp_Word64 = mkGenPrimOp (fsLit "writeWord64Array#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsChar = mkGenPrimOp (fsLit "writeWord8ArrayAsChar#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, charPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsWideChar = mkGenPrimOp (fsLit "writeWord8ArrayAsWideChar#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, charPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsAddr = mkGenPrimOp (fsLit "writeWord8ArrayAsAddr#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, addrPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsFloat = mkGenPrimOp (fsLit "writeWord8ArrayAsFloat#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, floatPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsDouble = mkGenPrimOp (fsLit "writeWord8ArrayAsDouble#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, doublePrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsStablePtr = mkGenPrimOp (fsLit "writeWord8ArrayAsStablePtr#")  [deltaTyVar, alphaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkStablePtrPrimTy alphaTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsInt16 = mkGenPrimOp (fsLit "writeWord8ArrayAsInt16#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsInt32 = mkGenPrimOp (fsLit "writeWord8ArrayAsInt32#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsInt64 = mkGenPrimOp (fsLit "writeWord8ArrayAsInt64#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsInt = mkGenPrimOp (fsLit "writeWord8ArrayAsInt#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsWord16 = mkGenPrimOp (fsLit "writeWord8ArrayAsWord16#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsWord32 = mkGenPrimOp (fsLit "writeWord8ArrayAsWord32#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsWord64 = mkGenPrimOp (fsLit "writeWord8ArrayAsWord64#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)+primOpInfo WriteByteArrayOp_Word8AsWord = mkGenPrimOp (fsLit "writeWord8ArrayAsWord#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, wordPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo CompareByteArraysOp = mkGenPrimOp (fsLit "compareByteArrays#")  [] [byteArrayPrimTy, intPrimTy, byteArrayPrimTy, intPrimTy, intPrimTy] (intPrimTy) primOpInfo CopyByteArrayOp = mkGenPrimOp (fsLit "copyByteArray#")  [deltaTyVar] [byteArrayPrimTy, intPrimTy, mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy) primOpInfo CopyMutableByteArrayOp = mkGenPrimOp (fsLit "copyMutableByteArray#")  [deltaTyVar] [mkMutableByteArrayPrimTy deltaTy, intPrimTy, mkMutableByteArrayPrimTy deltaTy, intPrimTy, intPrimTy, mkStatePrimTy deltaTy] (mkStatePrimTy deltaTy)@@ -351,7 +394,6 @@ 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 Check = mkGenPrimOp (fsLit "check#")  [alphaTyVar] [(mkFunTy (mkStatePrimTy realWorldTy) ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, alphaTy]))), mkStatePrimTy realWorldTy] (mkStatePrimTy realWorldTy) 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]))@@ -413,13 +455,15 @@ primOpInfo AnyToAddrOp = mkGenPrimOp (fsLit "anyToAddr#")  [alphaTyVar] [alphaTy, mkStatePrimTy realWorldTy] ((mkTupleTy Unboxed [mkStatePrimTy realWorldTy, addrPrimTy])) 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, mkArrayPrimTy betaTy, byteArrayPrimTy]))+primOpInfo UnpackClosureOp = mkGenPrimOp (fsLit "unpackClosure#")  [alphaTyVar, betaTyVar] [alphaTy] ((mkTupleTy Unboxed [addrPrimTy, byteArrayPrimTy, mkArrayPrimTy betaTy])) 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 TraceEventOp = mkGenPrimOp (fsLit "traceEvent#")  [deltaTyVar] [addrPrimTy, 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) primOpInfo (VecBroadcastOp IntVec 4 W32) = mkGenPrimOp (fsLit "broadcastInt32X4#")  [] [intPrimTy] (int32X4PrimTy)
autogen/primop-strictness.hs-incl view
@@ -8,7 +8,7 @@ primOpStrictness UnmaskAsyncExceptionsOp =  \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes  primOpStrictness AtomicallyOp =  \ _arity -> mkClosedStrictSig [strictApply1Dmd,topDmd] topRes  primOpStrictness RetryOp =  \ _arity -> mkClosedStrictSig [topDmd] exnRes -primOpStrictness CatchRetryOp =  \ _arity -> mkClosedStrictSig [ catchArgDmd+primOpStrictness CatchRetryOp =  \ _arity -> mkClosedStrictSig [ lazyApply1Dmd                                                  , lazyApply1Dmd                                                  , topDmd ] topRes  primOpStrictness CatchSTMOp =  \ _arity -> mkClosedStrictSig [ lazyApply1Dmd
autogen/primop-tag.hs-incl view
@@ -1,1083 +1,1127 @@ maxPrimOpTag :: Int-maxPrimOpTag = 1080-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 WordAddOp = 37-primOpTag WordSubCOp = 38-primOpTag WordAdd2Op = 39-primOpTag WordSubOp = 40-primOpTag WordMulOp = 41-primOpTag WordMul2Op = 42-primOpTag WordQuotOp = 43-primOpTag WordRemOp = 44-primOpTag WordQuotRemOp = 45-primOpTag WordQuotRem2Op = 46-primOpTag AndOp = 47-primOpTag OrOp = 48-primOpTag XorOp = 49-primOpTag NotOp = 50-primOpTag SllOp = 51-primOpTag SrlOp = 52-primOpTag Word2IntOp = 53-primOpTag WordGtOp = 54-primOpTag WordGeOp = 55-primOpTag WordEqOp = 56-primOpTag WordNeOp = 57-primOpTag WordLtOp = 58-primOpTag WordLeOp = 59-primOpTag PopCnt8Op = 60-primOpTag PopCnt16Op = 61-primOpTag PopCnt32Op = 62-primOpTag PopCnt64Op = 63-primOpTag PopCntOp = 64-primOpTag Pdep8Op = 65-primOpTag Pdep16Op = 66-primOpTag Pdep32Op = 67-primOpTag Pdep64Op = 68-primOpTag PdepOp = 69-primOpTag Pext8Op = 70-primOpTag Pext16Op = 71-primOpTag Pext32Op = 72-primOpTag Pext64Op = 73-primOpTag PextOp = 74-primOpTag Clz8Op = 75-primOpTag Clz16Op = 76-primOpTag Clz32Op = 77-primOpTag Clz64Op = 78-primOpTag ClzOp = 79-primOpTag Ctz8Op = 80-primOpTag Ctz16Op = 81-primOpTag Ctz32Op = 82-primOpTag Ctz64Op = 83-primOpTag CtzOp = 84-primOpTag BSwap16Op = 85-primOpTag BSwap32Op = 86-primOpTag BSwap64Op = 87-primOpTag BSwapOp = 88-primOpTag Narrow8IntOp = 89-primOpTag Narrow16IntOp = 90-primOpTag Narrow32IntOp = 91-primOpTag Narrow8WordOp = 92-primOpTag Narrow16WordOp = 93-primOpTag Narrow32WordOp = 94-primOpTag DoubleGtOp = 95-primOpTag DoubleGeOp = 96-primOpTag DoubleEqOp = 97-primOpTag DoubleNeOp = 98-primOpTag DoubleLtOp = 99-primOpTag DoubleLeOp = 100-primOpTag DoubleAddOp = 101-primOpTag DoubleSubOp = 102-primOpTag DoubleMulOp = 103-primOpTag DoubleDivOp = 104-primOpTag DoubleNegOp = 105-primOpTag DoubleFabsOp = 106-primOpTag Double2IntOp = 107-primOpTag Double2FloatOp = 108-primOpTag DoubleExpOp = 109-primOpTag DoubleLogOp = 110-primOpTag DoubleSqrtOp = 111-primOpTag DoubleSinOp = 112-primOpTag DoubleCosOp = 113-primOpTag DoubleTanOp = 114-primOpTag DoubleAsinOp = 115-primOpTag DoubleAcosOp = 116-primOpTag DoubleAtanOp = 117-primOpTag DoubleSinhOp = 118-primOpTag DoubleCoshOp = 119-primOpTag DoubleTanhOp = 120-primOpTag DoublePowerOp = 121-primOpTag DoubleDecode_2IntOp = 122-primOpTag DoubleDecode_Int64Op = 123-primOpTag FloatGtOp = 124-primOpTag FloatGeOp = 125-primOpTag FloatEqOp = 126-primOpTag FloatNeOp = 127-primOpTag FloatLtOp = 128-primOpTag FloatLeOp = 129-primOpTag FloatAddOp = 130-primOpTag FloatSubOp = 131-primOpTag FloatMulOp = 132-primOpTag FloatDivOp = 133-primOpTag FloatNegOp = 134-primOpTag FloatFabsOp = 135-primOpTag Float2IntOp = 136-primOpTag FloatExpOp = 137-primOpTag FloatLogOp = 138-primOpTag FloatSqrtOp = 139-primOpTag FloatSinOp = 140-primOpTag FloatCosOp = 141-primOpTag FloatTanOp = 142-primOpTag FloatAsinOp = 143-primOpTag FloatAcosOp = 144-primOpTag FloatAtanOp = 145-primOpTag FloatSinhOp = 146-primOpTag FloatCoshOp = 147-primOpTag FloatTanhOp = 148-primOpTag FloatPowerOp = 149-primOpTag Float2DoubleOp = 150-primOpTag FloatDecode_IntOp = 151-primOpTag NewArrayOp = 152-primOpTag SameMutableArrayOp = 153-primOpTag ReadArrayOp = 154-primOpTag WriteArrayOp = 155-primOpTag SizeofArrayOp = 156-primOpTag SizeofMutableArrayOp = 157-primOpTag IndexArrayOp = 158-primOpTag UnsafeFreezeArrayOp = 159-primOpTag UnsafeThawArrayOp = 160-primOpTag CopyArrayOp = 161-primOpTag CopyMutableArrayOp = 162-primOpTag CloneArrayOp = 163-primOpTag CloneMutableArrayOp = 164-primOpTag FreezeArrayOp = 165-primOpTag ThawArrayOp = 166-primOpTag CasArrayOp = 167-primOpTag NewSmallArrayOp = 168-primOpTag SameSmallMutableArrayOp = 169-primOpTag ReadSmallArrayOp = 170-primOpTag WriteSmallArrayOp = 171-primOpTag SizeofSmallArrayOp = 172-primOpTag SizeofSmallMutableArrayOp = 173-primOpTag IndexSmallArrayOp = 174-primOpTag UnsafeFreezeSmallArrayOp = 175-primOpTag UnsafeThawSmallArrayOp = 176-primOpTag CopySmallArrayOp = 177-primOpTag CopySmallMutableArrayOp = 178-primOpTag CloneSmallArrayOp = 179-primOpTag CloneSmallMutableArrayOp = 180-primOpTag FreezeSmallArrayOp = 181-primOpTag ThawSmallArrayOp = 182-primOpTag CasSmallArrayOp = 183-primOpTag NewByteArrayOp_Char = 184-primOpTag NewPinnedByteArrayOp_Char = 185-primOpTag NewAlignedPinnedByteArrayOp_Char = 186-primOpTag MutableByteArrayIsPinnedOp = 187-primOpTag ByteArrayIsPinnedOp = 188-primOpTag ByteArrayContents_Char = 189-primOpTag SameMutableByteArrayOp = 190-primOpTag ShrinkMutableByteArrayOp_Char = 191-primOpTag ResizeMutableByteArrayOp_Char = 192-primOpTag UnsafeFreezeByteArrayOp = 193-primOpTag SizeofByteArrayOp = 194-primOpTag SizeofMutableByteArrayOp = 195-primOpTag GetSizeofMutableByteArrayOp = 196-primOpTag IndexByteArrayOp_Char = 197-primOpTag IndexByteArrayOp_WideChar = 198-primOpTag IndexByteArrayOp_Int = 199-primOpTag IndexByteArrayOp_Word = 200-primOpTag IndexByteArrayOp_Addr = 201-primOpTag IndexByteArrayOp_Float = 202-primOpTag IndexByteArrayOp_Double = 203-primOpTag IndexByteArrayOp_StablePtr = 204-primOpTag IndexByteArrayOp_Int8 = 205-primOpTag IndexByteArrayOp_Int16 = 206-primOpTag IndexByteArrayOp_Int32 = 207-primOpTag IndexByteArrayOp_Int64 = 208-primOpTag IndexByteArrayOp_Word8 = 209-primOpTag IndexByteArrayOp_Word16 = 210-primOpTag IndexByteArrayOp_Word32 = 211-primOpTag IndexByteArrayOp_Word64 = 212-primOpTag ReadByteArrayOp_Char = 213-primOpTag ReadByteArrayOp_WideChar = 214-primOpTag ReadByteArrayOp_Int = 215-primOpTag ReadByteArrayOp_Word = 216-primOpTag ReadByteArrayOp_Addr = 217-primOpTag ReadByteArrayOp_Float = 218-primOpTag ReadByteArrayOp_Double = 219-primOpTag ReadByteArrayOp_StablePtr = 220-primOpTag ReadByteArrayOp_Int8 = 221-primOpTag ReadByteArrayOp_Int16 = 222-primOpTag ReadByteArrayOp_Int32 = 223-primOpTag ReadByteArrayOp_Int64 = 224-primOpTag ReadByteArrayOp_Word8 = 225-primOpTag ReadByteArrayOp_Word16 = 226-primOpTag ReadByteArrayOp_Word32 = 227-primOpTag ReadByteArrayOp_Word64 = 228-primOpTag WriteByteArrayOp_Char = 229-primOpTag WriteByteArrayOp_WideChar = 230-primOpTag WriteByteArrayOp_Int = 231-primOpTag WriteByteArrayOp_Word = 232-primOpTag WriteByteArrayOp_Addr = 233-primOpTag WriteByteArrayOp_Float = 234-primOpTag WriteByteArrayOp_Double = 235-primOpTag WriteByteArrayOp_StablePtr = 236-primOpTag WriteByteArrayOp_Int8 = 237-primOpTag WriteByteArrayOp_Int16 = 238-primOpTag WriteByteArrayOp_Int32 = 239-primOpTag WriteByteArrayOp_Int64 = 240-primOpTag WriteByteArrayOp_Word8 = 241-primOpTag WriteByteArrayOp_Word16 = 242-primOpTag WriteByteArrayOp_Word32 = 243-primOpTag WriteByteArrayOp_Word64 = 244-primOpTag CompareByteArraysOp = 245-primOpTag CopyByteArrayOp = 246-primOpTag CopyMutableByteArrayOp = 247-primOpTag CopyByteArrayToAddrOp = 248-primOpTag CopyMutableByteArrayToAddrOp = 249-primOpTag CopyAddrToByteArrayOp = 250-primOpTag SetByteArrayOp = 251-primOpTag AtomicReadByteArrayOp_Int = 252-primOpTag AtomicWriteByteArrayOp_Int = 253-primOpTag CasByteArrayOp_Int = 254-primOpTag FetchAddByteArrayOp_Int = 255-primOpTag FetchSubByteArrayOp_Int = 256-primOpTag FetchAndByteArrayOp_Int = 257-primOpTag FetchNandByteArrayOp_Int = 258-primOpTag FetchOrByteArrayOp_Int = 259-primOpTag FetchXorByteArrayOp_Int = 260-primOpTag NewArrayArrayOp = 261-primOpTag SameMutableArrayArrayOp = 262-primOpTag UnsafeFreezeArrayArrayOp = 263-primOpTag SizeofArrayArrayOp = 264-primOpTag SizeofMutableArrayArrayOp = 265-primOpTag IndexArrayArrayOp_ByteArray = 266-primOpTag IndexArrayArrayOp_ArrayArray = 267-primOpTag ReadArrayArrayOp_ByteArray = 268-primOpTag ReadArrayArrayOp_MutableByteArray = 269-primOpTag ReadArrayArrayOp_ArrayArray = 270-primOpTag ReadArrayArrayOp_MutableArrayArray = 271-primOpTag WriteArrayArrayOp_ByteArray = 272-primOpTag WriteArrayArrayOp_MutableByteArray = 273-primOpTag WriteArrayArrayOp_ArrayArray = 274-primOpTag WriteArrayArrayOp_MutableArrayArray = 275-primOpTag CopyArrayArrayOp = 276-primOpTag CopyMutableArrayArrayOp = 277-primOpTag AddrAddOp = 278-primOpTag AddrSubOp = 279-primOpTag AddrRemOp = 280-primOpTag Addr2IntOp = 281-primOpTag Int2AddrOp = 282-primOpTag AddrGtOp = 283-primOpTag AddrGeOp = 284-primOpTag AddrEqOp = 285-primOpTag AddrNeOp = 286-primOpTag AddrLtOp = 287-primOpTag AddrLeOp = 288-primOpTag IndexOffAddrOp_Char = 289-primOpTag IndexOffAddrOp_WideChar = 290-primOpTag IndexOffAddrOp_Int = 291-primOpTag IndexOffAddrOp_Word = 292-primOpTag IndexOffAddrOp_Addr = 293-primOpTag IndexOffAddrOp_Float = 294-primOpTag IndexOffAddrOp_Double = 295-primOpTag IndexOffAddrOp_StablePtr = 296-primOpTag IndexOffAddrOp_Int8 = 297-primOpTag IndexOffAddrOp_Int16 = 298-primOpTag IndexOffAddrOp_Int32 = 299-primOpTag IndexOffAddrOp_Int64 = 300-primOpTag IndexOffAddrOp_Word8 = 301-primOpTag IndexOffAddrOp_Word16 = 302-primOpTag IndexOffAddrOp_Word32 = 303-primOpTag IndexOffAddrOp_Word64 = 304-primOpTag ReadOffAddrOp_Char = 305-primOpTag ReadOffAddrOp_WideChar = 306-primOpTag ReadOffAddrOp_Int = 307-primOpTag ReadOffAddrOp_Word = 308-primOpTag ReadOffAddrOp_Addr = 309-primOpTag ReadOffAddrOp_Float = 310-primOpTag ReadOffAddrOp_Double = 311-primOpTag ReadOffAddrOp_StablePtr = 312-primOpTag ReadOffAddrOp_Int8 = 313-primOpTag ReadOffAddrOp_Int16 = 314-primOpTag ReadOffAddrOp_Int32 = 315-primOpTag ReadOffAddrOp_Int64 = 316-primOpTag ReadOffAddrOp_Word8 = 317-primOpTag ReadOffAddrOp_Word16 = 318-primOpTag ReadOffAddrOp_Word32 = 319-primOpTag ReadOffAddrOp_Word64 = 320-primOpTag WriteOffAddrOp_Char = 321-primOpTag WriteOffAddrOp_WideChar = 322-primOpTag WriteOffAddrOp_Int = 323-primOpTag WriteOffAddrOp_Word = 324-primOpTag WriteOffAddrOp_Addr = 325-primOpTag WriteOffAddrOp_Float = 326-primOpTag WriteOffAddrOp_Double = 327-primOpTag WriteOffAddrOp_StablePtr = 328-primOpTag WriteOffAddrOp_Int8 = 329-primOpTag WriteOffAddrOp_Int16 = 330-primOpTag WriteOffAddrOp_Int32 = 331-primOpTag WriteOffAddrOp_Int64 = 332-primOpTag WriteOffAddrOp_Word8 = 333-primOpTag WriteOffAddrOp_Word16 = 334-primOpTag WriteOffAddrOp_Word32 = 335-primOpTag WriteOffAddrOp_Word64 = 336-primOpTag NewMutVarOp = 337-primOpTag ReadMutVarOp = 338-primOpTag WriteMutVarOp = 339-primOpTag SameMutVarOp = 340-primOpTag AtomicModifyMutVarOp = 341-primOpTag CasMutVarOp = 342-primOpTag CatchOp = 343-primOpTag RaiseOp = 344-primOpTag RaiseIOOp = 345-primOpTag MaskAsyncExceptionsOp = 346-primOpTag MaskUninterruptibleOp = 347-primOpTag UnmaskAsyncExceptionsOp = 348-primOpTag MaskStatus = 349-primOpTag AtomicallyOp = 350-primOpTag RetryOp = 351-primOpTag CatchRetryOp = 352-primOpTag CatchSTMOp = 353-primOpTag Check = 354-primOpTag NewTVarOp = 355-primOpTag ReadTVarOp = 356-primOpTag ReadTVarIOOp = 357-primOpTag WriteTVarOp = 358-primOpTag SameTVarOp = 359-primOpTag NewMVarOp = 360-primOpTag TakeMVarOp = 361-primOpTag TryTakeMVarOp = 362-primOpTag PutMVarOp = 363-primOpTag TryPutMVarOp = 364-primOpTag ReadMVarOp = 365-primOpTag TryReadMVarOp = 366-primOpTag SameMVarOp = 367-primOpTag IsEmptyMVarOp = 368-primOpTag DelayOp = 369-primOpTag WaitReadOp = 370-primOpTag WaitWriteOp = 371-primOpTag ForkOp = 372-primOpTag ForkOnOp = 373-primOpTag KillThreadOp = 374-primOpTag YieldOp = 375-primOpTag MyThreadIdOp = 376-primOpTag LabelThreadOp = 377-primOpTag IsCurrentThreadBoundOp = 378-primOpTag NoDuplicateOp = 379-primOpTag ThreadStatusOp = 380-primOpTag MkWeakOp = 381-primOpTag MkWeakNoFinalizerOp = 382-primOpTag AddCFinalizerToWeakOp = 383-primOpTag DeRefWeakOp = 384-primOpTag FinalizeWeakOp = 385-primOpTag TouchOp = 386-primOpTag MakeStablePtrOp = 387-primOpTag DeRefStablePtrOp = 388-primOpTag EqStablePtrOp = 389-primOpTag MakeStableNameOp = 390-primOpTag EqStableNameOp = 391-primOpTag StableNameToIntOp = 392-primOpTag CompactNewOp = 393-primOpTag CompactResizeOp = 394-primOpTag CompactContainsOp = 395-primOpTag CompactContainsAnyOp = 396-primOpTag CompactGetFirstBlockOp = 397-primOpTag CompactGetNextBlockOp = 398-primOpTag CompactAllocateBlockOp = 399-primOpTag CompactFixupPointersOp = 400-primOpTag CompactAdd = 401-primOpTag CompactAddWithSharing = 402-primOpTag CompactSize = 403-primOpTag ReallyUnsafePtrEqualityOp = 404-primOpTag ParOp = 405-primOpTag SparkOp = 406-primOpTag SeqOp = 407-primOpTag GetSparkOp = 408-primOpTag NumSparks = 409-primOpTag DataToTagOp = 410-primOpTag TagToEnumOp = 411-primOpTag AddrToAnyOp = 412-primOpTag AnyToAddrOp = 413-primOpTag MkApUpd0_Op = 414-primOpTag NewBCOOp = 415-primOpTag UnpackClosureOp = 416-primOpTag GetApStackValOp = 417-primOpTag GetCCSOfOp = 418-primOpTag GetCurrentCCSOp = 419-primOpTag ClearCCSOp = 420-primOpTag TraceEventOp = 421-primOpTag TraceMarkerOp = 422-primOpTag (VecBroadcastOp IntVec 16 W8) = 423-primOpTag (VecBroadcastOp IntVec 8 W16) = 424-primOpTag (VecBroadcastOp IntVec 4 W32) = 425-primOpTag (VecBroadcastOp IntVec 2 W64) = 426-primOpTag (VecBroadcastOp IntVec 32 W8) = 427-primOpTag (VecBroadcastOp IntVec 16 W16) = 428-primOpTag (VecBroadcastOp IntVec 8 W32) = 429-primOpTag (VecBroadcastOp IntVec 4 W64) = 430-primOpTag (VecBroadcastOp IntVec 64 W8) = 431-primOpTag (VecBroadcastOp IntVec 32 W16) = 432-primOpTag (VecBroadcastOp IntVec 16 W32) = 433-primOpTag (VecBroadcastOp IntVec 8 W64) = 434-primOpTag (VecBroadcastOp WordVec 16 W8) = 435-primOpTag (VecBroadcastOp WordVec 8 W16) = 436-primOpTag (VecBroadcastOp WordVec 4 W32) = 437-primOpTag (VecBroadcastOp WordVec 2 W64) = 438-primOpTag (VecBroadcastOp WordVec 32 W8) = 439-primOpTag (VecBroadcastOp WordVec 16 W16) = 440-primOpTag (VecBroadcastOp WordVec 8 W32) = 441-primOpTag (VecBroadcastOp WordVec 4 W64) = 442-primOpTag (VecBroadcastOp WordVec 64 W8) = 443-primOpTag (VecBroadcastOp WordVec 32 W16) = 444-primOpTag (VecBroadcastOp WordVec 16 W32) = 445-primOpTag (VecBroadcastOp WordVec 8 W64) = 446-primOpTag (VecBroadcastOp FloatVec 4 W32) = 447-primOpTag (VecBroadcastOp FloatVec 2 W64) = 448-primOpTag (VecBroadcastOp FloatVec 8 W32) = 449-primOpTag (VecBroadcastOp FloatVec 4 W64) = 450-primOpTag (VecBroadcastOp FloatVec 16 W32) = 451-primOpTag (VecBroadcastOp FloatVec 8 W64) = 452-primOpTag (VecPackOp IntVec 16 W8) = 453-primOpTag (VecPackOp IntVec 8 W16) = 454-primOpTag (VecPackOp IntVec 4 W32) = 455-primOpTag (VecPackOp IntVec 2 W64) = 456-primOpTag (VecPackOp IntVec 32 W8) = 457-primOpTag (VecPackOp IntVec 16 W16) = 458-primOpTag (VecPackOp IntVec 8 W32) = 459-primOpTag (VecPackOp IntVec 4 W64) = 460-primOpTag (VecPackOp IntVec 64 W8) = 461-primOpTag (VecPackOp IntVec 32 W16) = 462-primOpTag (VecPackOp IntVec 16 W32) = 463-primOpTag (VecPackOp IntVec 8 W64) = 464-primOpTag (VecPackOp WordVec 16 W8) = 465-primOpTag (VecPackOp WordVec 8 W16) = 466-primOpTag (VecPackOp WordVec 4 W32) = 467-primOpTag (VecPackOp WordVec 2 W64) = 468-primOpTag (VecPackOp WordVec 32 W8) = 469-primOpTag (VecPackOp WordVec 16 W16) = 470-primOpTag (VecPackOp WordVec 8 W32) = 471-primOpTag (VecPackOp WordVec 4 W64) = 472-primOpTag (VecPackOp WordVec 64 W8) = 473-primOpTag (VecPackOp WordVec 32 W16) = 474-primOpTag (VecPackOp WordVec 16 W32) = 475-primOpTag (VecPackOp WordVec 8 W64) = 476-primOpTag (VecPackOp FloatVec 4 W32) = 477-primOpTag (VecPackOp FloatVec 2 W64) = 478-primOpTag (VecPackOp FloatVec 8 W32) = 479-primOpTag (VecPackOp FloatVec 4 W64) = 480-primOpTag (VecPackOp FloatVec 16 W32) = 481-primOpTag (VecPackOp FloatVec 8 W64) = 482-primOpTag (VecUnpackOp IntVec 16 W8) = 483-primOpTag (VecUnpackOp IntVec 8 W16) = 484-primOpTag (VecUnpackOp IntVec 4 W32) = 485-primOpTag (VecUnpackOp IntVec 2 W64) = 486-primOpTag (VecUnpackOp IntVec 32 W8) = 487-primOpTag (VecUnpackOp IntVec 16 W16) = 488-primOpTag (VecUnpackOp IntVec 8 W32) = 489-primOpTag (VecUnpackOp IntVec 4 W64) = 490-primOpTag (VecUnpackOp IntVec 64 W8) = 491-primOpTag (VecUnpackOp IntVec 32 W16) = 492-primOpTag (VecUnpackOp IntVec 16 W32) = 493-primOpTag (VecUnpackOp IntVec 8 W64) = 494-primOpTag (VecUnpackOp WordVec 16 W8) = 495-primOpTag (VecUnpackOp WordVec 8 W16) = 496-primOpTag (VecUnpackOp WordVec 4 W32) = 497-primOpTag (VecUnpackOp WordVec 2 W64) = 498-primOpTag (VecUnpackOp WordVec 32 W8) = 499-primOpTag (VecUnpackOp WordVec 16 W16) = 500-primOpTag (VecUnpackOp WordVec 8 W32) = 501-primOpTag (VecUnpackOp WordVec 4 W64) = 502-primOpTag (VecUnpackOp WordVec 64 W8) = 503-primOpTag (VecUnpackOp WordVec 32 W16) = 504-primOpTag (VecUnpackOp WordVec 16 W32) = 505-primOpTag (VecUnpackOp WordVec 8 W64) = 506-primOpTag (VecUnpackOp FloatVec 4 W32) = 507-primOpTag (VecUnpackOp FloatVec 2 W64) = 508-primOpTag (VecUnpackOp FloatVec 8 W32) = 509-primOpTag (VecUnpackOp FloatVec 4 W64) = 510-primOpTag (VecUnpackOp FloatVec 16 W32) = 511-primOpTag (VecUnpackOp FloatVec 8 W64) = 512-primOpTag (VecInsertOp IntVec 16 W8) = 513-primOpTag (VecInsertOp IntVec 8 W16) = 514-primOpTag (VecInsertOp IntVec 4 W32) = 515-primOpTag (VecInsertOp IntVec 2 W64) = 516-primOpTag (VecInsertOp IntVec 32 W8) = 517-primOpTag (VecInsertOp IntVec 16 W16) = 518-primOpTag (VecInsertOp IntVec 8 W32) = 519-primOpTag (VecInsertOp IntVec 4 W64) = 520-primOpTag (VecInsertOp IntVec 64 W8) = 521-primOpTag (VecInsertOp IntVec 32 W16) = 522-primOpTag (VecInsertOp IntVec 16 W32) = 523-primOpTag (VecInsertOp IntVec 8 W64) = 524-primOpTag (VecInsertOp WordVec 16 W8) = 525-primOpTag (VecInsertOp WordVec 8 W16) = 526-primOpTag (VecInsertOp WordVec 4 W32) = 527-primOpTag (VecInsertOp WordVec 2 W64) = 528-primOpTag (VecInsertOp WordVec 32 W8) = 529-primOpTag (VecInsertOp WordVec 16 W16) = 530-primOpTag (VecInsertOp WordVec 8 W32) = 531-primOpTag (VecInsertOp WordVec 4 W64) = 532-primOpTag (VecInsertOp WordVec 64 W8) = 533-primOpTag (VecInsertOp WordVec 32 W16) = 534-primOpTag (VecInsertOp WordVec 16 W32) = 535-primOpTag (VecInsertOp WordVec 8 W64) = 536-primOpTag (VecInsertOp FloatVec 4 W32) = 537-primOpTag (VecInsertOp FloatVec 2 W64) = 538-primOpTag (VecInsertOp FloatVec 8 W32) = 539-primOpTag (VecInsertOp FloatVec 4 W64) = 540-primOpTag (VecInsertOp FloatVec 16 W32) = 541-primOpTag (VecInsertOp FloatVec 8 W64) = 542-primOpTag (VecAddOp IntVec 16 W8) = 543-primOpTag (VecAddOp IntVec 8 W16) = 544-primOpTag (VecAddOp IntVec 4 W32) = 545-primOpTag (VecAddOp IntVec 2 W64) = 546-primOpTag (VecAddOp IntVec 32 W8) = 547-primOpTag (VecAddOp IntVec 16 W16) = 548-primOpTag (VecAddOp IntVec 8 W32) = 549-primOpTag (VecAddOp IntVec 4 W64) = 550-primOpTag (VecAddOp IntVec 64 W8) = 551-primOpTag (VecAddOp IntVec 32 W16) = 552-primOpTag (VecAddOp IntVec 16 W32) = 553-primOpTag (VecAddOp IntVec 8 W64) = 554-primOpTag (VecAddOp WordVec 16 W8) = 555-primOpTag (VecAddOp WordVec 8 W16) = 556-primOpTag (VecAddOp WordVec 4 W32) = 557-primOpTag (VecAddOp WordVec 2 W64) = 558-primOpTag (VecAddOp WordVec 32 W8) = 559-primOpTag (VecAddOp WordVec 16 W16) = 560-primOpTag (VecAddOp WordVec 8 W32) = 561-primOpTag (VecAddOp WordVec 4 W64) = 562-primOpTag (VecAddOp WordVec 64 W8) = 563-primOpTag (VecAddOp WordVec 32 W16) = 564-primOpTag (VecAddOp WordVec 16 W32) = 565-primOpTag (VecAddOp WordVec 8 W64) = 566-primOpTag (VecAddOp FloatVec 4 W32) = 567-primOpTag (VecAddOp FloatVec 2 W64) = 568-primOpTag (VecAddOp FloatVec 8 W32) = 569-primOpTag (VecAddOp FloatVec 4 W64) = 570-primOpTag (VecAddOp FloatVec 16 W32) = 571-primOpTag (VecAddOp FloatVec 8 W64) = 572-primOpTag (VecSubOp IntVec 16 W8) = 573-primOpTag (VecSubOp IntVec 8 W16) = 574-primOpTag (VecSubOp IntVec 4 W32) = 575-primOpTag (VecSubOp IntVec 2 W64) = 576-primOpTag (VecSubOp IntVec 32 W8) = 577-primOpTag (VecSubOp IntVec 16 W16) = 578-primOpTag (VecSubOp IntVec 8 W32) = 579-primOpTag (VecSubOp IntVec 4 W64) = 580-primOpTag (VecSubOp IntVec 64 W8) = 581-primOpTag (VecSubOp IntVec 32 W16) = 582-primOpTag (VecSubOp IntVec 16 W32) = 583-primOpTag (VecSubOp IntVec 8 W64) = 584-primOpTag (VecSubOp WordVec 16 W8) = 585-primOpTag (VecSubOp WordVec 8 W16) = 586-primOpTag (VecSubOp WordVec 4 W32) = 587-primOpTag (VecSubOp WordVec 2 W64) = 588-primOpTag (VecSubOp WordVec 32 W8) = 589-primOpTag (VecSubOp WordVec 16 W16) = 590-primOpTag (VecSubOp WordVec 8 W32) = 591-primOpTag (VecSubOp WordVec 4 W64) = 592-primOpTag (VecSubOp WordVec 64 W8) = 593-primOpTag (VecSubOp WordVec 32 W16) = 594-primOpTag (VecSubOp WordVec 16 W32) = 595-primOpTag (VecSubOp WordVec 8 W64) = 596-primOpTag (VecSubOp FloatVec 4 W32) = 597-primOpTag (VecSubOp FloatVec 2 W64) = 598-primOpTag (VecSubOp FloatVec 8 W32) = 599-primOpTag (VecSubOp FloatVec 4 W64) = 600-primOpTag (VecSubOp FloatVec 16 W32) = 601-primOpTag (VecSubOp FloatVec 8 W64) = 602-primOpTag (VecMulOp IntVec 16 W8) = 603-primOpTag (VecMulOp IntVec 8 W16) = 604-primOpTag (VecMulOp IntVec 4 W32) = 605-primOpTag (VecMulOp IntVec 2 W64) = 606-primOpTag (VecMulOp IntVec 32 W8) = 607-primOpTag (VecMulOp IntVec 16 W16) = 608-primOpTag (VecMulOp IntVec 8 W32) = 609-primOpTag (VecMulOp IntVec 4 W64) = 610-primOpTag (VecMulOp IntVec 64 W8) = 611-primOpTag (VecMulOp IntVec 32 W16) = 612-primOpTag (VecMulOp IntVec 16 W32) = 613-primOpTag (VecMulOp IntVec 8 W64) = 614-primOpTag (VecMulOp WordVec 16 W8) = 615-primOpTag (VecMulOp WordVec 8 W16) = 616-primOpTag (VecMulOp WordVec 4 W32) = 617-primOpTag (VecMulOp WordVec 2 W64) = 618-primOpTag (VecMulOp WordVec 32 W8) = 619-primOpTag (VecMulOp WordVec 16 W16) = 620-primOpTag (VecMulOp WordVec 8 W32) = 621-primOpTag (VecMulOp WordVec 4 W64) = 622-primOpTag (VecMulOp WordVec 64 W8) = 623-primOpTag (VecMulOp WordVec 32 W16) = 624-primOpTag (VecMulOp WordVec 16 W32) = 625-primOpTag (VecMulOp WordVec 8 W64) = 626-primOpTag (VecMulOp FloatVec 4 W32) = 627-primOpTag (VecMulOp FloatVec 2 W64) = 628-primOpTag (VecMulOp FloatVec 8 W32) = 629-primOpTag (VecMulOp FloatVec 4 W64) = 630-primOpTag (VecMulOp FloatVec 16 W32) = 631-primOpTag (VecMulOp FloatVec 8 W64) = 632-primOpTag (VecDivOp FloatVec 4 W32) = 633-primOpTag (VecDivOp FloatVec 2 W64) = 634-primOpTag (VecDivOp FloatVec 8 W32) = 635-primOpTag (VecDivOp FloatVec 4 W64) = 636-primOpTag (VecDivOp FloatVec 16 W32) = 637-primOpTag (VecDivOp FloatVec 8 W64) = 638-primOpTag (VecQuotOp IntVec 16 W8) = 639-primOpTag (VecQuotOp IntVec 8 W16) = 640-primOpTag (VecQuotOp IntVec 4 W32) = 641-primOpTag (VecQuotOp IntVec 2 W64) = 642-primOpTag (VecQuotOp IntVec 32 W8) = 643-primOpTag (VecQuotOp IntVec 16 W16) = 644-primOpTag (VecQuotOp IntVec 8 W32) = 645-primOpTag (VecQuotOp IntVec 4 W64) = 646-primOpTag (VecQuotOp IntVec 64 W8) = 647-primOpTag (VecQuotOp IntVec 32 W16) = 648-primOpTag (VecQuotOp IntVec 16 W32) = 649-primOpTag (VecQuotOp IntVec 8 W64) = 650-primOpTag (VecQuotOp WordVec 16 W8) = 651-primOpTag (VecQuotOp WordVec 8 W16) = 652-primOpTag (VecQuotOp WordVec 4 W32) = 653-primOpTag (VecQuotOp WordVec 2 W64) = 654-primOpTag (VecQuotOp WordVec 32 W8) = 655-primOpTag (VecQuotOp WordVec 16 W16) = 656-primOpTag (VecQuotOp WordVec 8 W32) = 657-primOpTag (VecQuotOp WordVec 4 W64) = 658-primOpTag (VecQuotOp WordVec 64 W8) = 659-primOpTag (VecQuotOp WordVec 32 W16) = 660-primOpTag (VecQuotOp WordVec 16 W32) = 661-primOpTag (VecQuotOp WordVec 8 W64) = 662-primOpTag (VecRemOp IntVec 16 W8) = 663-primOpTag (VecRemOp IntVec 8 W16) = 664-primOpTag (VecRemOp IntVec 4 W32) = 665-primOpTag (VecRemOp IntVec 2 W64) = 666-primOpTag (VecRemOp IntVec 32 W8) = 667-primOpTag (VecRemOp IntVec 16 W16) = 668-primOpTag (VecRemOp IntVec 8 W32) = 669-primOpTag (VecRemOp IntVec 4 W64) = 670-primOpTag (VecRemOp IntVec 64 W8) = 671-primOpTag (VecRemOp IntVec 32 W16) = 672-primOpTag (VecRemOp IntVec 16 W32) = 673-primOpTag (VecRemOp IntVec 8 W64) = 674-primOpTag (VecRemOp WordVec 16 W8) = 675-primOpTag (VecRemOp WordVec 8 W16) = 676-primOpTag (VecRemOp WordVec 4 W32) = 677-primOpTag (VecRemOp WordVec 2 W64) = 678-primOpTag (VecRemOp WordVec 32 W8) = 679-primOpTag (VecRemOp WordVec 16 W16) = 680-primOpTag (VecRemOp WordVec 8 W32) = 681-primOpTag (VecRemOp WordVec 4 W64) = 682-primOpTag (VecRemOp WordVec 64 W8) = 683-primOpTag (VecRemOp WordVec 32 W16) = 684-primOpTag (VecRemOp WordVec 16 W32) = 685-primOpTag (VecRemOp WordVec 8 W64) = 686-primOpTag (VecNegOp IntVec 16 W8) = 687-primOpTag (VecNegOp IntVec 8 W16) = 688-primOpTag (VecNegOp IntVec 4 W32) = 689-primOpTag (VecNegOp IntVec 2 W64) = 690-primOpTag (VecNegOp IntVec 32 W8) = 691-primOpTag (VecNegOp IntVec 16 W16) = 692-primOpTag (VecNegOp IntVec 8 W32) = 693-primOpTag (VecNegOp IntVec 4 W64) = 694-primOpTag (VecNegOp IntVec 64 W8) = 695-primOpTag (VecNegOp IntVec 32 W16) = 696-primOpTag (VecNegOp IntVec 16 W32) = 697-primOpTag (VecNegOp IntVec 8 W64) = 698-primOpTag (VecNegOp FloatVec 4 W32) = 699-primOpTag (VecNegOp FloatVec 2 W64) = 700-primOpTag (VecNegOp FloatVec 8 W32) = 701-primOpTag (VecNegOp FloatVec 4 W64) = 702-primOpTag (VecNegOp FloatVec 16 W32) = 703-primOpTag (VecNegOp FloatVec 8 W64) = 704-primOpTag (VecIndexByteArrayOp IntVec 16 W8) = 705-primOpTag (VecIndexByteArrayOp IntVec 8 W16) = 706-primOpTag (VecIndexByteArrayOp IntVec 4 W32) = 707-primOpTag (VecIndexByteArrayOp IntVec 2 W64) = 708-primOpTag (VecIndexByteArrayOp IntVec 32 W8) = 709-primOpTag (VecIndexByteArrayOp IntVec 16 W16) = 710-primOpTag (VecIndexByteArrayOp IntVec 8 W32) = 711-primOpTag (VecIndexByteArrayOp IntVec 4 W64) = 712-primOpTag (VecIndexByteArrayOp IntVec 64 W8) = 713-primOpTag (VecIndexByteArrayOp IntVec 32 W16) = 714-primOpTag (VecIndexByteArrayOp IntVec 16 W32) = 715-primOpTag (VecIndexByteArrayOp IntVec 8 W64) = 716-primOpTag (VecIndexByteArrayOp WordVec 16 W8) = 717-primOpTag (VecIndexByteArrayOp WordVec 8 W16) = 718-primOpTag (VecIndexByteArrayOp WordVec 4 W32) = 719-primOpTag (VecIndexByteArrayOp WordVec 2 W64) = 720-primOpTag (VecIndexByteArrayOp WordVec 32 W8) = 721-primOpTag (VecIndexByteArrayOp WordVec 16 W16) = 722-primOpTag (VecIndexByteArrayOp WordVec 8 W32) = 723-primOpTag (VecIndexByteArrayOp WordVec 4 W64) = 724-primOpTag (VecIndexByteArrayOp WordVec 64 W8) = 725-primOpTag (VecIndexByteArrayOp WordVec 32 W16) = 726-primOpTag (VecIndexByteArrayOp WordVec 16 W32) = 727-primOpTag (VecIndexByteArrayOp WordVec 8 W64) = 728-primOpTag (VecIndexByteArrayOp FloatVec 4 W32) = 729-primOpTag (VecIndexByteArrayOp FloatVec 2 W64) = 730-primOpTag (VecIndexByteArrayOp FloatVec 8 W32) = 731-primOpTag (VecIndexByteArrayOp FloatVec 4 W64) = 732-primOpTag (VecIndexByteArrayOp FloatVec 16 W32) = 733-primOpTag (VecIndexByteArrayOp FloatVec 8 W64) = 734-primOpTag (VecReadByteArrayOp IntVec 16 W8) = 735-primOpTag (VecReadByteArrayOp IntVec 8 W16) = 736-primOpTag (VecReadByteArrayOp IntVec 4 W32) = 737-primOpTag (VecReadByteArrayOp IntVec 2 W64) = 738-primOpTag (VecReadByteArrayOp IntVec 32 W8) = 739-primOpTag (VecReadByteArrayOp IntVec 16 W16) = 740-primOpTag (VecReadByteArrayOp IntVec 8 W32) = 741-primOpTag (VecReadByteArrayOp IntVec 4 W64) = 742-primOpTag (VecReadByteArrayOp IntVec 64 W8) = 743-primOpTag (VecReadByteArrayOp IntVec 32 W16) = 744-primOpTag (VecReadByteArrayOp IntVec 16 W32) = 745-primOpTag (VecReadByteArrayOp IntVec 8 W64) = 746-primOpTag (VecReadByteArrayOp WordVec 16 W8) = 747-primOpTag (VecReadByteArrayOp WordVec 8 W16) = 748-primOpTag (VecReadByteArrayOp WordVec 4 W32) = 749-primOpTag (VecReadByteArrayOp WordVec 2 W64) = 750-primOpTag (VecReadByteArrayOp WordVec 32 W8) = 751-primOpTag (VecReadByteArrayOp WordVec 16 W16) = 752-primOpTag (VecReadByteArrayOp WordVec 8 W32) = 753-primOpTag (VecReadByteArrayOp WordVec 4 W64) = 754-primOpTag (VecReadByteArrayOp WordVec 64 W8) = 755-primOpTag (VecReadByteArrayOp WordVec 32 W16) = 756-primOpTag (VecReadByteArrayOp WordVec 16 W32) = 757-primOpTag (VecReadByteArrayOp WordVec 8 W64) = 758-primOpTag (VecReadByteArrayOp FloatVec 4 W32) = 759-primOpTag (VecReadByteArrayOp FloatVec 2 W64) = 760-primOpTag (VecReadByteArrayOp FloatVec 8 W32) = 761-primOpTag (VecReadByteArrayOp FloatVec 4 W64) = 762-primOpTag (VecReadByteArrayOp FloatVec 16 W32) = 763-primOpTag (VecReadByteArrayOp FloatVec 8 W64) = 764-primOpTag (VecWriteByteArrayOp IntVec 16 W8) = 765-primOpTag (VecWriteByteArrayOp IntVec 8 W16) = 766-primOpTag (VecWriteByteArrayOp IntVec 4 W32) = 767-primOpTag (VecWriteByteArrayOp IntVec 2 W64) = 768-primOpTag (VecWriteByteArrayOp IntVec 32 W8) = 769-primOpTag (VecWriteByteArrayOp IntVec 16 W16) = 770-primOpTag (VecWriteByteArrayOp IntVec 8 W32) = 771-primOpTag (VecWriteByteArrayOp IntVec 4 W64) = 772-primOpTag (VecWriteByteArrayOp IntVec 64 W8) = 773-primOpTag (VecWriteByteArrayOp IntVec 32 W16) = 774-primOpTag (VecWriteByteArrayOp IntVec 16 W32) = 775-primOpTag (VecWriteByteArrayOp IntVec 8 W64) = 776-primOpTag (VecWriteByteArrayOp WordVec 16 W8) = 777-primOpTag (VecWriteByteArrayOp WordVec 8 W16) = 778-primOpTag (VecWriteByteArrayOp WordVec 4 W32) = 779-primOpTag (VecWriteByteArrayOp WordVec 2 W64) = 780-primOpTag (VecWriteByteArrayOp WordVec 32 W8) = 781-primOpTag (VecWriteByteArrayOp WordVec 16 W16) = 782-primOpTag (VecWriteByteArrayOp WordVec 8 W32) = 783-primOpTag (VecWriteByteArrayOp WordVec 4 W64) = 784-primOpTag (VecWriteByteArrayOp WordVec 64 W8) = 785-primOpTag (VecWriteByteArrayOp WordVec 32 W16) = 786-primOpTag (VecWriteByteArrayOp WordVec 16 W32) = 787-primOpTag (VecWriteByteArrayOp WordVec 8 W64) = 788-primOpTag (VecWriteByteArrayOp FloatVec 4 W32) = 789-primOpTag (VecWriteByteArrayOp FloatVec 2 W64) = 790-primOpTag (VecWriteByteArrayOp FloatVec 8 W32) = 791-primOpTag (VecWriteByteArrayOp FloatVec 4 W64) = 792-primOpTag (VecWriteByteArrayOp FloatVec 16 W32) = 793-primOpTag (VecWriteByteArrayOp FloatVec 8 W64) = 794-primOpTag (VecIndexOffAddrOp IntVec 16 W8) = 795-primOpTag (VecIndexOffAddrOp IntVec 8 W16) = 796-primOpTag (VecIndexOffAddrOp IntVec 4 W32) = 797-primOpTag (VecIndexOffAddrOp IntVec 2 W64) = 798-primOpTag (VecIndexOffAddrOp IntVec 32 W8) = 799-primOpTag (VecIndexOffAddrOp IntVec 16 W16) = 800-primOpTag (VecIndexOffAddrOp IntVec 8 W32) = 801-primOpTag (VecIndexOffAddrOp IntVec 4 W64) = 802-primOpTag (VecIndexOffAddrOp IntVec 64 W8) = 803-primOpTag (VecIndexOffAddrOp IntVec 32 W16) = 804-primOpTag (VecIndexOffAddrOp IntVec 16 W32) = 805-primOpTag (VecIndexOffAddrOp IntVec 8 W64) = 806-primOpTag (VecIndexOffAddrOp WordVec 16 W8) = 807-primOpTag (VecIndexOffAddrOp WordVec 8 W16) = 808-primOpTag (VecIndexOffAddrOp WordVec 4 W32) = 809-primOpTag (VecIndexOffAddrOp WordVec 2 W64) = 810-primOpTag (VecIndexOffAddrOp WordVec 32 W8) = 811-primOpTag (VecIndexOffAddrOp WordVec 16 W16) = 812-primOpTag (VecIndexOffAddrOp WordVec 8 W32) = 813-primOpTag (VecIndexOffAddrOp WordVec 4 W64) = 814-primOpTag (VecIndexOffAddrOp WordVec 64 W8) = 815-primOpTag (VecIndexOffAddrOp WordVec 32 W16) = 816-primOpTag (VecIndexOffAddrOp WordVec 16 W32) = 817-primOpTag (VecIndexOffAddrOp WordVec 8 W64) = 818-primOpTag (VecIndexOffAddrOp FloatVec 4 W32) = 819-primOpTag (VecIndexOffAddrOp FloatVec 2 W64) = 820-primOpTag (VecIndexOffAddrOp FloatVec 8 W32) = 821-primOpTag (VecIndexOffAddrOp FloatVec 4 W64) = 822-primOpTag (VecIndexOffAddrOp FloatVec 16 W32) = 823-primOpTag (VecIndexOffAddrOp FloatVec 8 W64) = 824-primOpTag (VecReadOffAddrOp IntVec 16 W8) = 825-primOpTag (VecReadOffAddrOp IntVec 8 W16) = 826-primOpTag (VecReadOffAddrOp IntVec 4 W32) = 827-primOpTag (VecReadOffAddrOp IntVec 2 W64) = 828-primOpTag (VecReadOffAddrOp IntVec 32 W8) = 829-primOpTag (VecReadOffAddrOp IntVec 16 W16) = 830-primOpTag (VecReadOffAddrOp IntVec 8 W32) = 831-primOpTag (VecReadOffAddrOp IntVec 4 W64) = 832-primOpTag (VecReadOffAddrOp IntVec 64 W8) = 833-primOpTag (VecReadOffAddrOp IntVec 32 W16) = 834-primOpTag (VecReadOffAddrOp IntVec 16 W32) = 835-primOpTag (VecReadOffAddrOp IntVec 8 W64) = 836-primOpTag (VecReadOffAddrOp WordVec 16 W8) = 837-primOpTag (VecReadOffAddrOp WordVec 8 W16) = 838-primOpTag (VecReadOffAddrOp WordVec 4 W32) = 839-primOpTag (VecReadOffAddrOp WordVec 2 W64) = 840-primOpTag (VecReadOffAddrOp WordVec 32 W8) = 841-primOpTag (VecReadOffAddrOp WordVec 16 W16) = 842-primOpTag (VecReadOffAddrOp WordVec 8 W32) = 843-primOpTag (VecReadOffAddrOp WordVec 4 W64) = 844-primOpTag (VecReadOffAddrOp WordVec 64 W8) = 845-primOpTag (VecReadOffAddrOp WordVec 32 W16) = 846-primOpTag (VecReadOffAddrOp WordVec 16 W32) = 847-primOpTag (VecReadOffAddrOp WordVec 8 W64) = 848-primOpTag (VecReadOffAddrOp FloatVec 4 W32) = 849-primOpTag (VecReadOffAddrOp FloatVec 2 W64) = 850-primOpTag (VecReadOffAddrOp FloatVec 8 W32) = 851-primOpTag (VecReadOffAddrOp FloatVec 4 W64) = 852-primOpTag (VecReadOffAddrOp FloatVec 16 W32) = 853-primOpTag (VecReadOffAddrOp FloatVec 8 W64) = 854-primOpTag (VecWriteOffAddrOp IntVec 16 W8) = 855-primOpTag (VecWriteOffAddrOp IntVec 8 W16) = 856-primOpTag (VecWriteOffAddrOp IntVec 4 W32) = 857-primOpTag (VecWriteOffAddrOp IntVec 2 W64) = 858-primOpTag (VecWriteOffAddrOp IntVec 32 W8) = 859-primOpTag (VecWriteOffAddrOp IntVec 16 W16) = 860-primOpTag (VecWriteOffAddrOp IntVec 8 W32) = 861-primOpTag (VecWriteOffAddrOp IntVec 4 W64) = 862-primOpTag (VecWriteOffAddrOp IntVec 64 W8) = 863-primOpTag (VecWriteOffAddrOp IntVec 32 W16) = 864-primOpTag (VecWriteOffAddrOp IntVec 16 W32) = 865-primOpTag (VecWriteOffAddrOp IntVec 8 W64) = 866-primOpTag (VecWriteOffAddrOp WordVec 16 W8) = 867-primOpTag (VecWriteOffAddrOp WordVec 8 W16) = 868-primOpTag (VecWriteOffAddrOp WordVec 4 W32) = 869-primOpTag (VecWriteOffAddrOp WordVec 2 W64) = 870-primOpTag (VecWriteOffAddrOp WordVec 32 W8) = 871-primOpTag (VecWriteOffAddrOp WordVec 16 W16) = 872-primOpTag (VecWriteOffAddrOp WordVec 8 W32) = 873-primOpTag (VecWriteOffAddrOp WordVec 4 W64) = 874-primOpTag (VecWriteOffAddrOp WordVec 64 W8) = 875-primOpTag (VecWriteOffAddrOp WordVec 32 W16) = 876-primOpTag (VecWriteOffAddrOp WordVec 16 W32) = 877-primOpTag (VecWriteOffAddrOp WordVec 8 W64) = 878-primOpTag (VecWriteOffAddrOp FloatVec 4 W32) = 879-primOpTag (VecWriteOffAddrOp FloatVec 2 W64) = 880-primOpTag (VecWriteOffAddrOp FloatVec 8 W32) = 881-primOpTag (VecWriteOffAddrOp FloatVec 4 W64) = 882-primOpTag (VecWriteOffAddrOp FloatVec 16 W32) = 883-primOpTag (VecWriteOffAddrOp FloatVec 8 W64) = 884-primOpTag (VecIndexScalarByteArrayOp IntVec 16 W8) = 885-primOpTag (VecIndexScalarByteArrayOp IntVec 8 W16) = 886-primOpTag (VecIndexScalarByteArrayOp IntVec 4 W32) = 887-primOpTag (VecIndexScalarByteArrayOp IntVec 2 W64) = 888-primOpTag (VecIndexScalarByteArrayOp IntVec 32 W8) = 889-primOpTag (VecIndexScalarByteArrayOp IntVec 16 W16) = 890-primOpTag (VecIndexScalarByteArrayOp IntVec 8 W32) = 891-primOpTag (VecIndexScalarByteArrayOp IntVec 4 W64) = 892-primOpTag (VecIndexScalarByteArrayOp IntVec 64 W8) = 893-primOpTag (VecIndexScalarByteArrayOp IntVec 32 W16) = 894-primOpTag (VecIndexScalarByteArrayOp IntVec 16 W32) = 895-primOpTag (VecIndexScalarByteArrayOp IntVec 8 W64) = 896-primOpTag (VecIndexScalarByteArrayOp WordVec 16 W8) = 897-primOpTag (VecIndexScalarByteArrayOp WordVec 8 W16) = 898-primOpTag (VecIndexScalarByteArrayOp WordVec 4 W32) = 899-primOpTag (VecIndexScalarByteArrayOp WordVec 2 W64) = 900-primOpTag (VecIndexScalarByteArrayOp WordVec 32 W8) = 901-primOpTag (VecIndexScalarByteArrayOp WordVec 16 W16) = 902-primOpTag (VecIndexScalarByteArrayOp WordVec 8 W32) = 903-primOpTag (VecIndexScalarByteArrayOp WordVec 4 W64) = 904-primOpTag (VecIndexScalarByteArrayOp WordVec 64 W8) = 905-primOpTag (VecIndexScalarByteArrayOp WordVec 32 W16) = 906-primOpTag (VecIndexScalarByteArrayOp WordVec 16 W32) = 907-primOpTag (VecIndexScalarByteArrayOp WordVec 8 W64) = 908-primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W32) = 909-primOpTag (VecIndexScalarByteArrayOp FloatVec 2 W64) = 910-primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W32) = 911-primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W64) = 912-primOpTag (VecIndexScalarByteArrayOp FloatVec 16 W32) = 913-primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W64) = 914-primOpTag (VecReadScalarByteArrayOp IntVec 16 W8) = 915-primOpTag (VecReadScalarByteArrayOp IntVec 8 W16) = 916-primOpTag (VecReadScalarByteArrayOp IntVec 4 W32) = 917-primOpTag (VecReadScalarByteArrayOp IntVec 2 W64) = 918-primOpTag (VecReadScalarByteArrayOp IntVec 32 W8) = 919-primOpTag (VecReadScalarByteArrayOp IntVec 16 W16) = 920-primOpTag (VecReadScalarByteArrayOp IntVec 8 W32) = 921-primOpTag (VecReadScalarByteArrayOp IntVec 4 W64) = 922-primOpTag (VecReadScalarByteArrayOp IntVec 64 W8) = 923-primOpTag (VecReadScalarByteArrayOp IntVec 32 W16) = 924-primOpTag (VecReadScalarByteArrayOp IntVec 16 W32) = 925-primOpTag (VecReadScalarByteArrayOp IntVec 8 W64) = 926-primOpTag (VecReadScalarByteArrayOp WordVec 16 W8) = 927-primOpTag (VecReadScalarByteArrayOp WordVec 8 W16) = 928-primOpTag (VecReadScalarByteArrayOp WordVec 4 W32) = 929-primOpTag (VecReadScalarByteArrayOp WordVec 2 W64) = 930-primOpTag (VecReadScalarByteArrayOp WordVec 32 W8) = 931-primOpTag (VecReadScalarByteArrayOp WordVec 16 W16) = 932-primOpTag (VecReadScalarByteArrayOp WordVec 8 W32) = 933-primOpTag (VecReadScalarByteArrayOp WordVec 4 W64) = 934-primOpTag (VecReadScalarByteArrayOp WordVec 64 W8) = 935-primOpTag (VecReadScalarByteArrayOp WordVec 32 W16) = 936-primOpTag (VecReadScalarByteArrayOp WordVec 16 W32) = 937-primOpTag (VecReadScalarByteArrayOp WordVec 8 W64) = 938-primOpTag (VecReadScalarByteArrayOp FloatVec 4 W32) = 939-primOpTag (VecReadScalarByteArrayOp FloatVec 2 W64) = 940-primOpTag (VecReadScalarByteArrayOp FloatVec 8 W32) = 941-primOpTag (VecReadScalarByteArrayOp FloatVec 4 W64) = 942-primOpTag (VecReadScalarByteArrayOp FloatVec 16 W32) = 943-primOpTag (VecReadScalarByteArrayOp FloatVec 8 W64) = 944-primOpTag (VecWriteScalarByteArrayOp IntVec 16 W8) = 945-primOpTag (VecWriteScalarByteArrayOp IntVec 8 W16) = 946-primOpTag (VecWriteScalarByteArrayOp IntVec 4 W32) = 947-primOpTag (VecWriteScalarByteArrayOp IntVec 2 W64) = 948-primOpTag (VecWriteScalarByteArrayOp IntVec 32 W8) = 949-primOpTag (VecWriteScalarByteArrayOp IntVec 16 W16) = 950-primOpTag (VecWriteScalarByteArrayOp IntVec 8 W32) = 951-primOpTag (VecWriteScalarByteArrayOp IntVec 4 W64) = 952-primOpTag (VecWriteScalarByteArrayOp IntVec 64 W8) = 953-primOpTag (VecWriteScalarByteArrayOp IntVec 32 W16) = 954-primOpTag (VecWriteScalarByteArrayOp IntVec 16 W32) = 955-primOpTag (VecWriteScalarByteArrayOp IntVec 8 W64) = 956-primOpTag (VecWriteScalarByteArrayOp WordVec 16 W8) = 957-primOpTag (VecWriteScalarByteArrayOp WordVec 8 W16) = 958-primOpTag (VecWriteScalarByteArrayOp WordVec 4 W32) = 959-primOpTag (VecWriteScalarByteArrayOp WordVec 2 W64) = 960-primOpTag (VecWriteScalarByteArrayOp WordVec 32 W8) = 961-primOpTag (VecWriteScalarByteArrayOp WordVec 16 W16) = 962-primOpTag (VecWriteScalarByteArrayOp WordVec 8 W32) = 963-primOpTag (VecWriteScalarByteArrayOp WordVec 4 W64) = 964-primOpTag (VecWriteScalarByteArrayOp WordVec 64 W8) = 965-primOpTag (VecWriteScalarByteArrayOp WordVec 32 W16) = 966-primOpTag (VecWriteScalarByteArrayOp WordVec 16 W32) = 967-primOpTag (VecWriteScalarByteArrayOp WordVec 8 W64) = 968-primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W32) = 969-primOpTag (VecWriteScalarByteArrayOp FloatVec 2 W64) = 970-primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W32) = 971-primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W64) = 972-primOpTag (VecWriteScalarByteArrayOp FloatVec 16 W32) = 973-primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W64) = 974-primOpTag (VecIndexScalarOffAddrOp IntVec 16 W8) = 975-primOpTag (VecIndexScalarOffAddrOp IntVec 8 W16) = 976-primOpTag (VecIndexScalarOffAddrOp IntVec 4 W32) = 977-primOpTag (VecIndexScalarOffAddrOp IntVec 2 W64) = 978-primOpTag (VecIndexScalarOffAddrOp IntVec 32 W8) = 979-primOpTag (VecIndexScalarOffAddrOp IntVec 16 W16) = 980-primOpTag (VecIndexScalarOffAddrOp IntVec 8 W32) = 981-primOpTag (VecIndexScalarOffAddrOp IntVec 4 W64) = 982-primOpTag (VecIndexScalarOffAddrOp IntVec 64 W8) = 983-primOpTag (VecIndexScalarOffAddrOp IntVec 32 W16) = 984-primOpTag (VecIndexScalarOffAddrOp IntVec 16 W32) = 985-primOpTag (VecIndexScalarOffAddrOp IntVec 8 W64) = 986-primOpTag (VecIndexScalarOffAddrOp WordVec 16 W8) = 987-primOpTag (VecIndexScalarOffAddrOp WordVec 8 W16) = 988-primOpTag (VecIndexScalarOffAddrOp WordVec 4 W32) = 989-primOpTag (VecIndexScalarOffAddrOp WordVec 2 W64) = 990-primOpTag (VecIndexScalarOffAddrOp WordVec 32 W8) = 991-primOpTag (VecIndexScalarOffAddrOp WordVec 16 W16) = 992-primOpTag (VecIndexScalarOffAddrOp WordVec 8 W32) = 993-primOpTag (VecIndexScalarOffAddrOp WordVec 4 W64) = 994-primOpTag (VecIndexScalarOffAddrOp WordVec 64 W8) = 995-primOpTag (VecIndexScalarOffAddrOp WordVec 32 W16) = 996-primOpTag (VecIndexScalarOffAddrOp WordVec 16 W32) = 997-primOpTag (VecIndexScalarOffAddrOp WordVec 8 W64) = 998-primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W32) = 999-primOpTag (VecIndexScalarOffAddrOp FloatVec 2 W64) = 1000-primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W32) = 1001-primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W64) = 1002-primOpTag (VecIndexScalarOffAddrOp FloatVec 16 W32) = 1003-primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W64) = 1004-primOpTag (VecReadScalarOffAddrOp IntVec 16 W8) = 1005-primOpTag (VecReadScalarOffAddrOp IntVec 8 W16) = 1006-primOpTag (VecReadScalarOffAddrOp IntVec 4 W32) = 1007-primOpTag (VecReadScalarOffAddrOp IntVec 2 W64) = 1008-primOpTag (VecReadScalarOffAddrOp IntVec 32 W8) = 1009-primOpTag (VecReadScalarOffAddrOp IntVec 16 W16) = 1010-primOpTag (VecReadScalarOffAddrOp IntVec 8 W32) = 1011-primOpTag (VecReadScalarOffAddrOp IntVec 4 W64) = 1012-primOpTag (VecReadScalarOffAddrOp IntVec 64 W8) = 1013-primOpTag (VecReadScalarOffAddrOp IntVec 32 W16) = 1014-primOpTag (VecReadScalarOffAddrOp IntVec 16 W32) = 1015-primOpTag (VecReadScalarOffAddrOp IntVec 8 W64) = 1016-primOpTag (VecReadScalarOffAddrOp WordVec 16 W8) = 1017-primOpTag (VecReadScalarOffAddrOp WordVec 8 W16) = 1018-primOpTag (VecReadScalarOffAddrOp WordVec 4 W32) = 1019-primOpTag (VecReadScalarOffAddrOp WordVec 2 W64) = 1020-primOpTag (VecReadScalarOffAddrOp WordVec 32 W8) = 1021-primOpTag (VecReadScalarOffAddrOp WordVec 16 W16) = 1022-primOpTag (VecReadScalarOffAddrOp WordVec 8 W32) = 1023-primOpTag (VecReadScalarOffAddrOp WordVec 4 W64) = 1024-primOpTag (VecReadScalarOffAddrOp WordVec 64 W8) = 1025-primOpTag (VecReadScalarOffAddrOp WordVec 32 W16) = 1026-primOpTag (VecReadScalarOffAddrOp WordVec 16 W32) = 1027-primOpTag (VecReadScalarOffAddrOp WordVec 8 W64) = 1028-primOpTag (VecReadScalarOffAddrOp FloatVec 4 W32) = 1029-primOpTag (VecReadScalarOffAddrOp FloatVec 2 W64) = 1030-primOpTag (VecReadScalarOffAddrOp FloatVec 8 W32) = 1031-primOpTag (VecReadScalarOffAddrOp FloatVec 4 W64) = 1032-primOpTag (VecReadScalarOffAddrOp FloatVec 16 W32) = 1033-primOpTag (VecReadScalarOffAddrOp FloatVec 8 W64) = 1034-primOpTag (VecWriteScalarOffAddrOp IntVec 16 W8) = 1035-primOpTag (VecWriteScalarOffAddrOp IntVec 8 W16) = 1036-primOpTag (VecWriteScalarOffAddrOp IntVec 4 W32) = 1037-primOpTag (VecWriteScalarOffAddrOp IntVec 2 W64) = 1038-primOpTag (VecWriteScalarOffAddrOp IntVec 32 W8) = 1039-primOpTag (VecWriteScalarOffAddrOp IntVec 16 W16) = 1040-primOpTag (VecWriteScalarOffAddrOp IntVec 8 W32) = 1041-primOpTag (VecWriteScalarOffAddrOp IntVec 4 W64) = 1042-primOpTag (VecWriteScalarOffAddrOp IntVec 64 W8) = 1043-primOpTag (VecWriteScalarOffAddrOp IntVec 32 W16) = 1044-primOpTag (VecWriteScalarOffAddrOp IntVec 16 W32) = 1045-primOpTag (VecWriteScalarOffAddrOp IntVec 8 W64) = 1046-primOpTag (VecWriteScalarOffAddrOp WordVec 16 W8) = 1047-primOpTag (VecWriteScalarOffAddrOp WordVec 8 W16) = 1048-primOpTag (VecWriteScalarOffAddrOp WordVec 4 W32) = 1049-primOpTag (VecWriteScalarOffAddrOp WordVec 2 W64) = 1050-primOpTag (VecWriteScalarOffAddrOp WordVec 32 W8) = 1051-primOpTag (VecWriteScalarOffAddrOp WordVec 16 W16) = 1052-primOpTag (VecWriteScalarOffAddrOp WordVec 8 W32) = 1053-primOpTag (VecWriteScalarOffAddrOp WordVec 4 W64) = 1054-primOpTag (VecWriteScalarOffAddrOp WordVec 64 W8) = 1055-primOpTag (VecWriteScalarOffAddrOp WordVec 32 W16) = 1056-primOpTag (VecWriteScalarOffAddrOp WordVec 16 W32) = 1057-primOpTag (VecWriteScalarOffAddrOp WordVec 8 W64) = 1058-primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W32) = 1059-primOpTag (VecWriteScalarOffAddrOp FloatVec 2 W64) = 1060-primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W32) = 1061-primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W64) = 1062-primOpTag (VecWriteScalarOffAddrOp FloatVec 16 W32) = 1063-primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W64) = 1064-primOpTag PrefetchByteArrayOp3 = 1065-primOpTag PrefetchMutableByteArrayOp3 = 1066-primOpTag PrefetchAddrOp3 = 1067-primOpTag PrefetchValueOp3 = 1068-primOpTag PrefetchByteArrayOp2 = 1069-primOpTag PrefetchMutableByteArrayOp2 = 1070-primOpTag PrefetchAddrOp2 = 1071-primOpTag PrefetchValueOp2 = 1072-primOpTag PrefetchByteArrayOp1 = 1073-primOpTag PrefetchMutableByteArrayOp1 = 1074-primOpTag PrefetchAddrOp1 = 1075-primOpTag PrefetchValueOp1 = 1076-primOpTag PrefetchByteArrayOp0 = 1077-primOpTag PrefetchMutableByteArrayOp0 = 1078-primOpTag PrefetchAddrOp0 = 1079-primOpTag PrefetchValueOp0 = 1080+maxPrimOpTag = 1124+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 WordAddOp = 37+primOpTag WordAddCOp = 38+primOpTag WordSubCOp = 39+primOpTag WordAdd2Op = 40+primOpTag WordSubOp = 41+primOpTag WordMulOp = 42+primOpTag WordMul2Op = 43+primOpTag WordQuotOp = 44+primOpTag WordRemOp = 45+primOpTag WordQuotRemOp = 46+primOpTag WordQuotRem2Op = 47+primOpTag AndOp = 48+primOpTag OrOp = 49+primOpTag XorOp = 50+primOpTag NotOp = 51+primOpTag SllOp = 52+primOpTag SrlOp = 53+primOpTag Word2IntOp = 54+primOpTag WordGtOp = 55+primOpTag WordGeOp = 56+primOpTag WordEqOp = 57+primOpTag WordNeOp = 58+primOpTag WordLtOp = 59+primOpTag WordLeOp = 60+primOpTag PopCnt8Op = 61+primOpTag PopCnt16Op = 62+primOpTag PopCnt32Op = 63+primOpTag PopCnt64Op = 64+primOpTag PopCntOp = 65+primOpTag Pdep8Op = 66+primOpTag Pdep16Op = 67+primOpTag Pdep32Op = 68+primOpTag Pdep64Op = 69+primOpTag PdepOp = 70+primOpTag Pext8Op = 71+primOpTag Pext16Op = 72+primOpTag Pext32Op = 73+primOpTag Pext64Op = 74+primOpTag PextOp = 75+primOpTag Clz8Op = 76+primOpTag Clz16Op = 77+primOpTag Clz32Op = 78+primOpTag Clz64Op = 79+primOpTag ClzOp = 80+primOpTag Ctz8Op = 81+primOpTag Ctz16Op = 82+primOpTag Ctz32Op = 83+primOpTag Ctz64Op = 84+primOpTag CtzOp = 85+primOpTag BSwap16Op = 86+primOpTag BSwap32Op = 87+primOpTag BSwap64Op = 88+primOpTag BSwapOp = 89+primOpTag Narrow8IntOp = 90+primOpTag Narrow16IntOp = 91+primOpTag Narrow32IntOp = 92+primOpTag Narrow8WordOp = 93+primOpTag Narrow16WordOp = 94+primOpTag Narrow32WordOp = 95+primOpTag DoubleGtOp = 96+primOpTag DoubleGeOp = 97+primOpTag DoubleEqOp = 98+primOpTag DoubleNeOp = 99+primOpTag DoubleLtOp = 100+primOpTag DoubleLeOp = 101+primOpTag DoubleAddOp = 102+primOpTag DoubleSubOp = 103+primOpTag DoubleMulOp = 104+primOpTag DoubleDivOp = 105+primOpTag DoubleNegOp = 106+primOpTag DoubleFabsOp = 107+primOpTag Double2IntOp = 108+primOpTag Double2FloatOp = 109+primOpTag DoubleExpOp = 110+primOpTag DoubleLogOp = 111+primOpTag DoubleSqrtOp = 112+primOpTag DoubleSinOp = 113+primOpTag DoubleCosOp = 114+primOpTag DoubleTanOp = 115+primOpTag DoubleAsinOp = 116+primOpTag DoubleAcosOp = 117+primOpTag DoubleAtanOp = 118+primOpTag DoubleSinhOp = 119+primOpTag DoubleCoshOp = 120+primOpTag DoubleTanhOp = 121+primOpTag DoublePowerOp = 122+primOpTag DoubleDecode_2IntOp = 123+primOpTag DoubleDecode_Int64Op = 124+primOpTag FloatGtOp = 125+primOpTag FloatGeOp = 126+primOpTag FloatEqOp = 127+primOpTag FloatNeOp = 128+primOpTag FloatLtOp = 129+primOpTag FloatLeOp = 130+primOpTag FloatAddOp = 131+primOpTag FloatSubOp = 132+primOpTag FloatMulOp = 133+primOpTag FloatDivOp = 134+primOpTag FloatNegOp = 135+primOpTag FloatFabsOp = 136+primOpTag Float2IntOp = 137+primOpTag FloatExpOp = 138+primOpTag FloatLogOp = 139+primOpTag FloatSqrtOp = 140+primOpTag FloatSinOp = 141+primOpTag FloatCosOp = 142+primOpTag FloatTanOp = 143+primOpTag FloatAsinOp = 144+primOpTag FloatAcosOp = 145+primOpTag FloatAtanOp = 146+primOpTag FloatSinhOp = 147+primOpTag FloatCoshOp = 148+primOpTag FloatTanhOp = 149+primOpTag FloatPowerOp = 150+primOpTag Float2DoubleOp = 151+primOpTag FloatDecode_IntOp = 152+primOpTag NewArrayOp = 153+primOpTag SameMutableArrayOp = 154+primOpTag ReadArrayOp = 155+primOpTag WriteArrayOp = 156+primOpTag SizeofArrayOp = 157+primOpTag SizeofMutableArrayOp = 158+primOpTag IndexArrayOp = 159+primOpTag UnsafeFreezeArrayOp = 160+primOpTag UnsafeThawArrayOp = 161+primOpTag CopyArrayOp = 162+primOpTag CopyMutableArrayOp = 163+primOpTag CloneArrayOp = 164+primOpTag CloneMutableArrayOp = 165+primOpTag FreezeArrayOp = 166+primOpTag ThawArrayOp = 167+primOpTag CasArrayOp = 168+primOpTag NewSmallArrayOp = 169+primOpTag SameSmallMutableArrayOp = 170+primOpTag ReadSmallArrayOp = 171+primOpTag WriteSmallArrayOp = 172+primOpTag SizeofSmallArrayOp = 173+primOpTag SizeofSmallMutableArrayOp = 174+primOpTag IndexSmallArrayOp = 175+primOpTag UnsafeFreezeSmallArrayOp = 176+primOpTag UnsafeThawSmallArrayOp = 177+primOpTag CopySmallArrayOp = 178+primOpTag CopySmallMutableArrayOp = 179+primOpTag CloneSmallArrayOp = 180+primOpTag CloneSmallMutableArrayOp = 181+primOpTag FreezeSmallArrayOp = 182+primOpTag ThawSmallArrayOp = 183+primOpTag CasSmallArrayOp = 184+primOpTag NewByteArrayOp_Char = 185+primOpTag NewPinnedByteArrayOp_Char = 186+primOpTag NewAlignedPinnedByteArrayOp_Char = 187+primOpTag MutableByteArrayIsPinnedOp = 188+primOpTag ByteArrayIsPinnedOp = 189+primOpTag ByteArrayContents_Char = 190+primOpTag SameMutableByteArrayOp = 191+primOpTag ShrinkMutableByteArrayOp_Char = 192+primOpTag ResizeMutableByteArrayOp_Char = 193+primOpTag UnsafeFreezeByteArrayOp = 194+primOpTag SizeofByteArrayOp = 195+primOpTag SizeofMutableByteArrayOp = 196+primOpTag GetSizeofMutableByteArrayOp = 197+primOpTag IndexByteArrayOp_Char = 198+primOpTag IndexByteArrayOp_WideChar = 199+primOpTag IndexByteArrayOp_Int = 200+primOpTag IndexByteArrayOp_Word = 201+primOpTag IndexByteArrayOp_Addr = 202+primOpTag IndexByteArrayOp_Float = 203+primOpTag IndexByteArrayOp_Double = 204+primOpTag IndexByteArrayOp_StablePtr = 205+primOpTag IndexByteArrayOp_Int8 = 206+primOpTag IndexByteArrayOp_Int16 = 207+primOpTag IndexByteArrayOp_Int32 = 208+primOpTag IndexByteArrayOp_Int64 = 209+primOpTag IndexByteArrayOp_Word8 = 210+primOpTag IndexByteArrayOp_Word16 = 211+primOpTag IndexByteArrayOp_Word32 = 212+primOpTag IndexByteArrayOp_Word64 = 213+primOpTag IndexByteArrayOp_Word8AsChar = 214+primOpTag IndexByteArrayOp_Word8AsWideChar = 215+primOpTag IndexByteArrayOp_Word8AsAddr = 216+primOpTag IndexByteArrayOp_Word8AsFloat = 217+primOpTag IndexByteArrayOp_Word8AsDouble = 218+primOpTag IndexByteArrayOp_Word8AsStablePtr = 219+primOpTag IndexByteArrayOp_Word8AsInt16 = 220+primOpTag IndexByteArrayOp_Word8AsInt32 = 221+primOpTag IndexByteArrayOp_Word8AsInt64 = 222+primOpTag IndexByteArrayOp_Word8AsInt = 223+primOpTag IndexByteArrayOp_Word8AsWord16 = 224+primOpTag IndexByteArrayOp_Word8AsWord32 = 225+primOpTag IndexByteArrayOp_Word8AsWord64 = 226+primOpTag IndexByteArrayOp_Word8AsWord = 227+primOpTag ReadByteArrayOp_Char = 228+primOpTag ReadByteArrayOp_WideChar = 229+primOpTag ReadByteArrayOp_Int = 230+primOpTag ReadByteArrayOp_Word = 231+primOpTag ReadByteArrayOp_Addr = 232+primOpTag ReadByteArrayOp_Float = 233+primOpTag ReadByteArrayOp_Double = 234+primOpTag ReadByteArrayOp_StablePtr = 235+primOpTag ReadByteArrayOp_Int8 = 236+primOpTag ReadByteArrayOp_Int16 = 237+primOpTag ReadByteArrayOp_Int32 = 238+primOpTag ReadByteArrayOp_Int64 = 239+primOpTag ReadByteArrayOp_Word8 = 240+primOpTag ReadByteArrayOp_Word16 = 241+primOpTag ReadByteArrayOp_Word32 = 242+primOpTag ReadByteArrayOp_Word64 = 243+primOpTag ReadByteArrayOp_Word8AsChar = 244+primOpTag ReadByteArrayOp_Word8AsWideChar = 245+primOpTag ReadByteArrayOp_Word8AsAddr = 246+primOpTag ReadByteArrayOp_Word8AsFloat = 247+primOpTag ReadByteArrayOp_Word8AsDouble = 248+primOpTag ReadByteArrayOp_Word8AsStablePtr = 249+primOpTag ReadByteArrayOp_Word8AsInt16 = 250+primOpTag ReadByteArrayOp_Word8AsInt32 = 251+primOpTag ReadByteArrayOp_Word8AsInt64 = 252+primOpTag ReadByteArrayOp_Word8AsInt = 253+primOpTag ReadByteArrayOp_Word8AsWord16 = 254+primOpTag ReadByteArrayOp_Word8AsWord32 = 255+primOpTag ReadByteArrayOp_Word8AsWord64 = 256+primOpTag ReadByteArrayOp_Word8AsWord = 257+primOpTag WriteByteArrayOp_Char = 258+primOpTag WriteByteArrayOp_WideChar = 259+primOpTag WriteByteArrayOp_Int = 260+primOpTag WriteByteArrayOp_Word = 261+primOpTag WriteByteArrayOp_Addr = 262+primOpTag WriteByteArrayOp_Float = 263+primOpTag WriteByteArrayOp_Double = 264+primOpTag WriteByteArrayOp_StablePtr = 265+primOpTag WriteByteArrayOp_Int8 = 266+primOpTag WriteByteArrayOp_Int16 = 267+primOpTag WriteByteArrayOp_Int32 = 268+primOpTag WriteByteArrayOp_Int64 = 269+primOpTag WriteByteArrayOp_Word8 = 270+primOpTag WriteByteArrayOp_Word16 = 271+primOpTag WriteByteArrayOp_Word32 = 272+primOpTag WriteByteArrayOp_Word64 = 273+primOpTag WriteByteArrayOp_Word8AsChar = 274+primOpTag WriteByteArrayOp_Word8AsWideChar = 275+primOpTag WriteByteArrayOp_Word8AsAddr = 276+primOpTag WriteByteArrayOp_Word8AsFloat = 277+primOpTag WriteByteArrayOp_Word8AsDouble = 278+primOpTag WriteByteArrayOp_Word8AsStablePtr = 279+primOpTag WriteByteArrayOp_Word8AsInt16 = 280+primOpTag WriteByteArrayOp_Word8AsInt32 = 281+primOpTag WriteByteArrayOp_Word8AsInt64 = 282+primOpTag WriteByteArrayOp_Word8AsInt = 283+primOpTag WriteByteArrayOp_Word8AsWord16 = 284+primOpTag WriteByteArrayOp_Word8AsWord32 = 285+primOpTag WriteByteArrayOp_Word8AsWord64 = 286+primOpTag WriteByteArrayOp_Word8AsWord = 287+primOpTag CompareByteArraysOp = 288+primOpTag CopyByteArrayOp = 289+primOpTag CopyMutableByteArrayOp = 290+primOpTag CopyByteArrayToAddrOp = 291+primOpTag CopyMutableByteArrayToAddrOp = 292+primOpTag CopyAddrToByteArrayOp = 293+primOpTag SetByteArrayOp = 294+primOpTag AtomicReadByteArrayOp_Int = 295+primOpTag AtomicWriteByteArrayOp_Int = 296+primOpTag CasByteArrayOp_Int = 297+primOpTag FetchAddByteArrayOp_Int = 298+primOpTag FetchSubByteArrayOp_Int = 299+primOpTag FetchAndByteArrayOp_Int = 300+primOpTag FetchNandByteArrayOp_Int = 301+primOpTag FetchOrByteArrayOp_Int = 302+primOpTag FetchXorByteArrayOp_Int = 303+primOpTag NewArrayArrayOp = 304+primOpTag SameMutableArrayArrayOp = 305+primOpTag UnsafeFreezeArrayArrayOp = 306+primOpTag SizeofArrayArrayOp = 307+primOpTag SizeofMutableArrayArrayOp = 308+primOpTag IndexArrayArrayOp_ByteArray = 309+primOpTag IndexArrayArrayOp_ArrayArray = 310+primOpTag ReadArrayArrayOp_ByteArray = 311+primOpTag ReadArrayArrayOp_MutableByteArray = 312+primOpTag ReadArrayArrayOp_ArrayArray = 313+primOpTag ReadArrayArrayOp_MutableArrayArray = 314+primOpTag WriteArrayArrayOp_ByteArray = 315+primOpTag WriteArrayArrayOp_MutableByteArray = 316+primOpTag WriteArrayArrayOp_ArrayArray = 317+primOpTag WriteArrayArrayOp_MutableArrayArray = 318+primOpTag CopyArrayArrayOp = 319+primOpTag CopyMutableArrayArrayOp = 320+primOpTag AddrAddOp = 321+primOpTag AddrSubOp = 322+primOpTag AddrRemOp = 323+primOpTag Addr2IntOp = 324+primOpTag Int2AddrOp = 325+primOpTag AddrGtOp = 326+primOpTag AddrGeOp = 327+primOpTag AddrEqOp = 328+primOpTag AddrNeOp = 329+primOpTag AddrLtOp = 330+primOpTag AddrLeOp = 331+primOpTag IndexOffAddrOp_Char = 332+primOpTag IndexOffAddrOp_WideChar = 333+primOpTag IndexOffAddrOp_Int = 334+primOpTag IndexOffAddrOp_Word = 335+primOpTag IndexOffAddrOp_Addr = 336+primOpTag IndexOffAddrOp_Float = 337+primOpTag IndexOffAddrOp_Double = 338+primOpTag IndexOffAddrOp_StablePtr = 339+primOpTag IndexOffAddrOp_Int8 = 340+primOpTag IndexOffAddrOp_Int16 = 341+primOpTag IndexOffAddrOp_Int32 = 342+primOpTag IndexOffAddrOp_Int64 = 343+primOpTag IndexOffAddrOp_Word8 = 344+primOpTag IndexOffAddrOp_Word16 = 345+primOpTag IndexOffAddrOp_Word32 = 346+primOpTag IndexOffAddrOp_Word64 = 347+primOpTag ReadOffAddrOp_Char = 348+primOpTag ReadOffAddrOp_WideChar = 349+primOpTag ReadOffAddrOp_Int = 350+primOpTag ReadOffAddrOp_Word = 351+primOpTag ReadOffAddrOp_Addr = 352+primOpTag ReadOffAddrOp_Float = 353+primOpTag ReadOffAddrOp_Double = 354+primOpTag ReadOffAddrOp_StablePtr = 355+primOpTag ReadOffAddrOp_Int8 = 356+primOpTag ReadOffAddrOp_Int16 = 357+primOpTag ReadOffAddrOp_Int32 = 358+primOpTag ReadOffAddrOp_Int64 = 359+primOpTag ReadOffAddrOp_Word8 = 360+primOpTag ReadOffAddrOp_Word16 = 361+primOpTag ReadOffAddrOp_Word32 = 362+primOpTag ReadOffAddrOp_Word64 = 363+primOpTag WriteOffAddrOp_Char = 364+primOpTag WriteOffAddrOp_WideChar = 365+primOpTag WriteOffAddrOp_Int = 366+primOpTag WriteOffAddrOp_Word = 367+primOpTag WriteOffAddrOp_Addr = 368+primOpTag WriteOffAddrOp_Float = 369+primOpTag WriteOffAddrOp_Double = 370+primOpTag WriteOffAddrOp_StablePtr = 371+primOpTag WriteOffAddrOp_Int8 = 372+primOpTag WriteOffAddrOp_Int16 = 373+primOpTag WriteOffAddrOp_Int32 = 374+primOpTag WriteOffAddrOp_Int64 = 375+primOpTag WriteOffAddrOp_Word8 = 376+primOpTag WriteOffAddrOp_Word16 = 377+primOpTag WriteOffAddrOp_Word32 = 378+primOpTag WriteOffAddrOp_Word64 = 379+primOpTag NewMutVarOp = 380+primOpTag ReadMutVarOp = 381+primOpTag WriteMutVarOp = 382+primOpTag SameMutVarOp = 383+primOpTag AtomicModifyMutVarOp = 384+primOpTag CasMutVarOp = 385+primOpTag CatchOp = 386+primOpTag RaiseOp = 387+primOpTag RaiseIOOp = 388+primOpTag MaskAsyncExceptionsOp = 389+primOpTag MaskUninterruptibleOp = 390+primOpTag UnmaskAsyncExceptionsOp = 391+primOpTag MaskStatus = 392+primOpTag AtomicallyOp = 393+primOpTag RetryOp = 394+primOpTag CatchRetryOp = 395+primOpTag CatchSTMOp = 396+primOpTag NewTVarOp = 397+primOpTag ReadTVarOp = 398+primOpTag ReadTVarIOOp = 399+primOpTag WriteTVarOp = 400+primOpTag SameTVarOp = 401+primOpTag NewMVarOp = 402+primOpTag TakeMVarOp = 403+primOpTag TryTakeMVarOp = 404+primOpTag PutMVarOp = 405+primOpTag TryPutMVarOp = 406+primOpTag ReadMVarOp = 407+primOpTag TryReadMVarOp = 408+primOpTag SameMVarOp = 409+primOpTag IsEmptyMVarOp = 410+primOpTag DelayOp = 411+primOpTag WaitReadOp = 412+primOpTag WaitWriteOp = 413+primOpTag ForkOp = 414+primOpTag ForkOnOp = 415+primOpTag KillThreadOp = 416+primOpTag YieldOp = 417+primOpTag MyThreadIdOp = 418+primOpTag LabelThreadOp = 419+primOpTag IsCurrentThreadBoundOp = 420+primOpTag NoDuplicateOp = 421+primOpTag ThreadStatusOp = 422+primOpTag MkWeakOp = 423+primOpTag MkWeakNoFinalizerOp = 424+primOpTag AddCFinalizerToWeakOp = 425+primOpTag DeRefWeakOp = 426+primOpTag FinalizeWeakOp = 427+primOpTag TouchOp = 428+primOpTag MakeStablePtrOp = 429+primOpTag DeRefStablePtrOp = 430+primOpTag EqStablePtrOp = 431+primOpTag MakeStableNameOp = 432+primOpTag EqStableNameOp = 433+primOpTag StableNameToIntOp = 434+primOpTag CompactNewOp = 435+primOpTag CompactResizeOp = 436+primOpTag CompactContainsOp = 437+primOpTag CompactContainsAnyOp = 438+primOpTag CompactGetFirstBlockOp = 439+primOpTag CompactGetNextBlockOp = 440+primOpTag CompactAllocateBlockOp = 441+primOpTag CompactFixupPointersOp = 442+primOpTag CompactAdd = 443+primOpTag CompactAddWithSharing = 444+primOpTag CompactSize = 445+primOpTag ReallyUnsafePtrEqualityOp = 446+primOpTag ParOp = 447+primOpTag SparkOp = 448+primOpTag SeqOp = 449+primOpTag GetSparkOp = 450+primOpTag NumSparks = 451+primOpTag DataToTagOp = 452+primOpTag TagToEnumOp = 453+primOpTag AddrToAnyOp = 454+primOpTag AnyToAddrOp = 455+primOpTag MkApUpd0_Op = 456+primOpTag NewBCOOp = 457+primOpTag UnpackClosureOp = 458+primOpTag GetApStackValOp = 459+primOpTag GetCCSOfOp = 460+primOpTag GetCurrentCCSOp = 461+primOpTag ClearCCSOp = 462+primOpTag TraceEventOp = 463+primOpTag TraceMarkerOp = 464+primOpTag GetThreadAllocationCounter = 465+primOpTag SetThreadAllocationCounter = 466+primOpTag (VecBroadcastOp IntVec 16 W8) = 467+primOpTag (VecBroadcastOp IntVec 8 W16) = 468+primOpTag (VecBroadcastOp IntVec 4 W32) = 469+primOpTag (VecBroadcastOp IntVec 2 W64) = 470+primOpTag (VecBroadcastOp IntVec 32 W8) = 471+primOpTag (VecBroadcastOp IntVec 16 W16) = 472+primOpTag (VecBroadcastOp IntVec 8 W32) = 473+primOpTag (VecBroadcastOp IntVec 4 W64) = 474+primOpTag (VecBroadcastOp IntVec 64 W8) = 475+primOpTag (VecBroadcastOp IntVec 32 W16) = 476+primOpTag (VecBroadcastOp IntVec 16 W32) = 477+primOpTag (VecBroadcastOp IntVec 8 W64) = 478+primOpTag (VecBroadcastOp WordVec 16 W8) = 479+primOpTag (VecBroadcastOp WordVec 8 W16) = 480+primOpTag (VecBroadcastOp WordVec 4 W32) = 481+primOpTag (VecBroadcastOp WordVec 2 W64) = 482+primOpTag (VecBroadcastOp WordVec 32 W8) = 483+primOpTag (VecBroadcastOp WordVec 16 W16) = 484+primOpTag (VecBroadcastOp WordVec 8 W32) = 485+primOpTag (VecBroadcastOp WordVec 4 W64) = 486+primOpTag (VecBroadcastOp WordVec 64 W8) = 487+primOpTag (VecBroadcastOp WordVec 32 W16) = 488+primOpTag (VecBroadcastOp WordVec 16 W32) = 489+primOpTag (VecBroadcastOp WordVec 8 W64) = 490+primOpTag (VecBroadcastOp FloatVec 4 W32) = 491+primOpTag (VecBroadcastOp FloatVec 2 W64) = 492+primOpTag (VecBroadcastOp FloatVec 8 W32) = 493+primOpTag (VecBroadcastOp FloatVec 4 W64) = 494+primOpTag (VecBroadcastOp FloatVec 16 W32) = 495+primOpTag (VecBroadcastOp FloatVec 8 W64) = 496+primOpTag (VecPackOp IntVec 16 W8) = 497+primOpTag (VecPackOp IntVec 8 W16) = 498+primOpTag (VecPackOp IntVec 4 W32) = 499+primOpTag (VecPackOp IntVec 2 W64) = 500+primOpTag (VecPackOp IntVec 32 W8) = 501+primOpTag (VecPackOp IntVec 16 W16) = 502+primOpTag (VecPackOp IntVec 8 W32) = 503+primOpTag (VecPackOp IntVec 4 W64) = 504+primOpTag (VecPackOp IntVec 64 W8) = 505+primOpTag (VecPackOp IntVec 32 W16) = 506+primOpTag (VecPackOp IntVec 16 W32) = 507+primOpTag (VecPackOp IntVec 8 W64) = 508+primOpTag (VecPackOp WordVec 16 W8) = 509+primOpTag (VecPackOp WordVec 8 W16) = 510+primOpTag (VecPackOp WordVec 4 W32) = 511+primOpTag (VecPackOp WordVec 2 W64) = 512+primOpTag (VecPackOp WordVec 32 W8) = 513+primOpTag (VecPackOp WordVec 16 W16) = 514+primOpTag (VecPackOp WordVec 8 W32) = 515+primOpTag (VecPackOp WordVec 4 W64) = 516+primOpTag (VecPackOp WordVec 64 W8) = 517+primOpTag (VecPackOp WordVec 32 W16) = 518+primOpTag (VecPackOp WordVec 16 W32) = 519+primOpTag (VecPackOp WordVec 8 W64) = 520+primOpTag (VecPackOp FloatVec 4 W32) = 521+primOpTag (VecPackOp FloatVec 2 W64) = 522+primOpTag (VecPackOp FloatVec 8 W32) = 523+primOpTag (VecPackOp FloatVec 4 W64) = 524+primOpTag (VecPackOp FloatVec 16 W32) = 525+primOpTag (VecPackOp FloatVec 8 W64) = 526+primOpTag (VecUnpackOp IntVec 16 W8) = 527+primOpTag (VecUnpackOp IntVec 8 W16) = 528+primOpTag (VecUnpackOp IntVec 4 W32) = 529+primOpTag (VecUnpackOp IntVec 2 W64) = 530+primOpTag (VecUnpackOp IntVec 32 W8) = 531+primOpTag (VecUnpackOp IntVec 16 W16) = 532+primOpTag (VecUnpackOp IntVec 8 W32) = 533+primOpTag (VecUnpackOp IntVec 4 W64) = 534+primOpTag (VecUnpackOp IntVec 64 W8) = 535+primOpTag (VecUnpackOp IntVec 32 W16) = 536+primOpTag (VecUnpackOp IntVec 16 W32) = 537+primOpTag (VecUnpackOp IntVec 8 W64) = 538+primOpTag (VecUnpackOp WordVec 16 W8) = 539+primOpTag (VecUnpackOp WordVec 8 W16) = 540+primOpTag (VecUnpackOp WordVec 4 W32) = 541+primOpTag (VecUnpackOp WordVec 2 W64) = 542+primOpTag (VecUnpackOp WordVec 32 W8) = 543+primOpTag (VecUnpackOp WordVec 16 W16) = 544+primOpTag (VecUnpackOp WordVec 8 W32) = 545+primOpTag (VecUnpackOp WordVec 4 W64) = 546+primOpTag (VecUnpackOp WordVec 64 W8) = 547+primOpTag (VecUnpackOp WordVec 32 W16) = 548+primOpTag (VecUnpackOp WordVec 16 W32) = 549+primOpTag (VecUnpackOp WordVec 8 W64) = 550+primOpTag (VecUnpackOp FloatVec 4 W32) = 551+primOpTag (VecUnpackOp FloatVec 2 W64) = 552+primOpTag (VecUnpackOp FloatVec 8 W32) = 553+primOpTag (VecUnpackOp FloatVec 4 W64) = 554+primOpTag (VecUnpackOp FloatVec 16 W32) = 555+primOpTag (VecUnpackOp FloatVec 8 W64) = 556+primOpTag (VecInsertOp IntVec 16 W8) = 557+primOpTag (VecInsertOp IntVec 8 W16) = 558+primOpTag (VecInsertOp IntVec 4 W32) = 559+primOpTag (VecInsertOp IntVec 2 W64) = 560+primOpTag (VecInsertOp IntVec 32 W8) = 561+primOpTag (VecInsertOp IntVec 16 W16) = 562+primOpTag (VecInsertOp IntVec 8 W32) = 563+primOpTag (VecInsertOp IntVec 4 W64) = 564+primOpTag (VecInsertOp IntVec 64 W8) = 565+primOpTag (VecInsertOp IntVec 32 W16) = 566+primOpTag (VecInsertOp IntVec 16 W32) = 567+primOpTag (VecInsertOp IntVec 8 W64) = 568+primOpTag (VecInsertOp WordVec 16 W8) = 569+primOpTag (VecInsertOp WordVec 8 W16) = 570+primOpTag (VecInsertOp WordVec 4 W32) = 571+primOpTag (VecInsertOp WordVec 2 W64) = 572+primOpTag (VecInsertOp WordVec 32 W8) = 573+primOpTag (VecInsertOp WordVec 16 W16) = 574+primOpTag (VecInsertOp WordVec 8 W32) = 575+primOpTag (VecInsertOp WordVec 4 W64) = 576+primOpTag (VecInsertOp WordVec 64 W8) = 577+primOpTag (VecInsertOp WordVec 32 W16) = 578+primOpTag (VecInsertOp WordVec 16 W32) = 579+primOpTag (VecInsertOp WordVec 8 W64) = 580+primOpTag (VecInsertOp FloatVec 4 W32) = 581+primOpTag (VecInsertOp FloatVec 2 W64) = 582+primOpTag (VecInsertOp FloatVec 8 W32) = 583+primOpTag (VecInsertOp FloatVec 4 W64) = 584+primOpTag (VecInsertOp FloatVec 16 W32) = 585+primOpTag (VecInsertOp FloatVec 8 W64) = 586+primOpTag (VecAddOp IntVec 16 W8) = 587+primOpTag (VecAddOp IntVec 8 W16) = 588+primOpTag (VecAddOp IntVec 4 W32) = 589+primOpTag (VecAddOp IntVec 2 W64) = 590+primOpTag (VecAddOp IntVec 32 W8) = 591+primOpTag (VecAddOp IntVec 16 W16) = 592+primOpTag (VecAddOp IntVec 8 W32) = 593+primOpTag (VecAddOp IntVec 4 W64) = 594+primOpTag (VecAddOp IntVec 64 W8) = 595+primOpTag (VecAddOp IntVec 32 W16) = 596+primOpTag (VecAddOp IntVec 16 W32) = 597+primOpTag (VecAddOp IntVec 8 W64) = 598+primOpTag (VecAddOp WordVec 16 W8) = 599+primOpTag (VecAddOp WordVec 8 W16) = 600+primOpTag (VecAddOp WordVec 4 W32) = 601+primOpTag (VecAddOp WordVec 2 W64) = 602+primOpTag (VecAddOp WordVec 32 W8) = 603+primOpTag (VecAddOp WordVec 16 W16) = 604+primOpTag (VecAddOp WordVec 8 W32) = 605+primOpTag (VecAddOp WordVec 4 W64) = 606+primOpTag (VecAddOp WordVec 64 W8) = 607+primOpTag (VecAddOp WordVec 32 W16) = 608+primOpTag (VecAddOp WordVec 16 W32) = 609+primOpTag (VecAddOp WordVec 8 W64) = 610+primOpTag (VecAddOp FloatVec 4 W32) = 611+primOpTag (VecAddOp FloatVec 2 W64) = 612+primOpTag (VecAddOp FloatVec 8 W32) = 613+primOpTag (VecAddOp FloatVec 4 W64) = 614+primOpTag (VecAddOp FloatVec 16 W32) = 615+primOpTag (VecAddOp FloatVec 8 W64) = 616+primOpTag (VecSubOp IntVec 16 W8) = 617+primOpTag (VecSubOp IntVec 8 W16) = 618+primOpTag (VecSubOp IntVec 4 W32) = 619+primOpTag (VecSubOp IntVec 2 W64) = 620+primOpTag (VecSubOp IntVec 32 W8) = 621+primOpTag (VecSubOp IntVec 16 W16) = 622+primOpTag (VecSubOp IntVec 8 W32) = 623+primOpTag (VecSubOp IntVec 4 W64) = 624+primOpTag (VecSubOp IntVec 64 W8) = 625+primOpTag (VecSubOp IntVec 32 W16) = 626+primOpTag (VecSubOp IntVec 16 W32) = 627+primOpTag (VecSubOp IntVec 8 W64) = 628+primOpTag (VecSubOp WordVec 16 W8) = 629+primOpTag (VecSubOp WordVec 8 W16) = 630+primOpTag (VecSubOp WordVec 4 W32) = 631+primOpTag (VecSubOp WordVec 2 W64) = 632+primOpTag (VecSubOp WordVec 32 W8) = 633+primOpTag (VecSubOp WordVec 16 W16) = 634+primOpTag (VecSubOp WordVec 8 W32) = 635+primOpTag (VecSubOp WordVec 4 W64) = 636+primOpTag (VecSubOp WordVec 64 W8) = 637+primOpTag (VecSubOp WordVec 32 W16) = 638+primOpTag (VecSubOp WordVec 16 W32) = 639+primOpTag (VecSubOp WordVec 8 W64) = 640+primOpTag (VecSubOp FloatVec 4 W32) = 641+primOpTag (VecSubOp FloatVec 2 W64) = 642+primOpTag (VecSubOp FloatVec 8 W32) = 643+primOpTag (VecSubOp FloatVec 4 W64) = 644+primOpTag (VecSubOp FloatVec 16 W32) = 645+primOpTag (VecSubOp FloatVec 8 W64) = 646+primOpTag (VecMulOp IntVec 16 W8) = 647+primOpTag (VecMulOp IntVec 8 W16) = 648+primOpTag (VecMulOp IntVec 4 W32) = 649+primOpTag (VecMulOp IntVec 2 W64) = 650+primOpTag (VecMulOp IntVec 32 W8) = 651+primOpTag (VecMulOp IntVec 16 W16) = 652+primOpTag (VecMulOp IntVec 8 W32) = 653+primOpTag (VecMulOp IntVec 4 W64) = 654+primOpTag (VecMulOp IntVec 64 W8) = 655+primOpTag (VecMulOp IntVec 32 W16) = 656+primOpTag (VecMulOp IntVec 16 W32) = 657+primOpTag (VecMulOp IntVec 8 W64) = 658+primOpTag (VecMulOp WordVec 16 W8) = 659+primOpTag (VecMulOp WordVec 8 W16) = 660+primOpTag (VecMulOp WordVec 4 W32) = 661+primOpTag (VecMulOp WordVec 2 W64) = 662+primOpTag (VecMulOp WordVec 32 W8) = 663+primOpTag (VecMulOp WordVec 16 W16) = 664+primOpTag (VecMulOp WordVec 8 W32) = 665+primOpTag (VecMulOp WordVec 4 W64) = 666+primOpTag (VecMulOp WordVec 64 W8) = 667+primOpTag (VecMulOp WordVec 32 W16) = 668+primOpTag (VecMulOp WordVec 16 W32) = 669+primOpTag (VecMulOp WordVec 8 W64) = 670+primOpTag (VecMulOp FloatVec 4 W32) = 671+primOpTag (VecMulOp FloatVec 2 W64) = 672+primOpTag (VecMulOp FloatVec 8 W32) = 673+primOpTag (VecMulOp FloatVec 4 W64) = 674+primOpTag (VecMulOp FloatVec 16 W32) = 675+primOpTag (VecMulOp FloatVec 8 W64) = 676+primOpTag (VecDivOp FloatVec 4 W32) = 677+primOpTag (VecDivOp FloatVec 2 W64) = 678+primOpTag (VecDivOp FloatVec 8 W32) = 679+primOpTag (VecDivOp FloatVec 4 W64) = 680+primOpTag (VecDivOp FloatVec 16 W32) = 681+primOpTag (VecDivOp FloatVec 8 W64) = 682+primOpTag (VecQuotOp IntVec 16 W8) = 683+primOpTag (VecQuotOp IntVec 8 W16) = 684+primOpTag (VecQuotOp IntVec 4 W32) = 685+primOpTag (VecQuotOp IntVec 2 W64) = 686+primOpTag (VecQuotOp IntVec 32 W8) = 687+primOpTag (VecQuotOp IntVec 16 W16) = 688+primOpTag (VecQuotOp IntVec 8 W32) = 689+primOpTag (VecQuotOp IntVec 4 W64) = 690+primOpTag (VecQuotOp IntVec 64 W8) = 691+primOpTag (VecQuotOp IntVec 32 W16) = 692+primOpTag (VecQuotOp IntVec 16 W32) = 693+primOpTag (VecQuotOp IntVec 8 W64) = 694+primOpTag (VecQuotOp WordVec 16 W8) = 695+primOpTag (VecQuotOp WordVec 8 W16) = 696+primOpTag (VecQuotOp WordVec 4 W32) = 697+primOpTag (VecQuotOp WordVec 2 W64) = 698+primOpTag (VecQuotOp WordVec 32 W8) = 699+primOpTag (VecQuotOp WordVec 16 W16) = 700+primOpTag (VecQuotOp WordVec 8 W32) = 701+primOpTag (VecQuotOp WordVec 4 W64) = 702+primOpTag (VecQuotOp WordVec 64 W8) = 703+primOpTag (VecQuotOp WordVec 32 W16) = 704+primOpTag (VecQuotOp WordVec 16 W32) = 705+primOpTag (VecQuotOp WordVec 8 W64) = 706+primOpTag (VecRemOp IntVec 16 W8) = 707+primOpTag (VecRemOp IntVec 8 W16) = 708+primOpTag (VecRemOp IntVec 4 W32) = 709+primOpTag (VecRemOp IntVec 2 W64) = 710+primOpTag (VecRemOp IntVec 32 W8) = 711+primOpTag (VecRemOp IntVec 16 W16) = 712+primOpTag (VecRemOp IntVec 8 W32) = 713+primOpTag (VecRemOp IntVec 4 W64) = 714+primOpTag (VecRemOp IntVec 64 W8) = 715+primOpTag (VecRemOp IntVec 32 W16) = 716+primOpTag (VecRemOp IntVec 16 W32) = 717+primOpTag (VecRemOp IntVec 8 W64) = 718+primOpTag (VecRemOp WordVec 16 W8) = 719+primOpTag (VecRemOp WordVec 8 W16) = 720+primOpTag (VecRemOp WordVec 4 W32) = 721+primOpTag (VecRemOp WordVec 2 W64) = 722+primOpTag (VecRemOp WordVec 32 W8) = 723+primOpTag (VecRemOp WordVec 16 W16) = 724+primOpTag (VecRemOp WordVec 8 W32) = 725+primOpTag (VecRemOp WordVec 4 W64) = 726+primOpTag (VecRemOp WordVec 64 W8) = 727+primOpTag (VecRemOp WordVec 32 W16) = 728+primOpTag (VecRemOp WordVec 16 W32) = 729+primOpTag (VecRemOp WordVec 8 W64) = 730+primOpTag (VecNegOp IntVec 16 W8) = 731+primOpTag (VecNegOp IntVec 8 W16) = 732+primOpTag (VecNegOp IntVec 4 W32) = 733+primOpTag (VecNegOp IntVec 2 W64) = 734+primOpTag (VecNegOp IntVec 32 W8) = 735+primOpTag (VecNegOp IntVec 16 W16) = 736+primOpTag (VecNegOp IntVec 8 W32) = 737+primOpTag (VecNegOp IntVec 4 W64) = 738+primOpTag (VecNegOp IntVec 64 W8) = 739+primOpTag (VecNegOp IntVec 32 W16) = 740+primOpTag (VecNegOp IntVec 16 W32) = 741+primOpTag (VecNegOp IntVec 8 W64) = 742+primOpTag (VecNegOp FloatVec 4 W32) = 743+primOpTag (VecNegOp FloatVec 2 W64) = 744+primOpTag (VecNegOp FloatVec 8 W32) = 745+primOpTag (VecNegOp FloatVec 4 W64) = 746+primOpTag (VecNegOp FloatVec 16 W32) = 747+primOpTag (VecNegOp FloatVec 8 W64) = 748+primOpTag (VecIndexByteArrayOp IntVec 16 W8) = 749+primOpTag (VecIndexByteArrayOp IntVec 8 W16) = 750+primOpTag (VecIndexByteArrayOp IntVec 4 W32) = 751+primOpTag (VecIndexByteArrayOp IntVec 2 W64) = 752+primOpTag (VecIndexByteArrayOp IntVec 32 W8) = 753+primOpTag (VecIndexByteArrayOp IntVec 16 W16) = 754+primOpTag (VecIndexByteArrayOp IntVec 8 W32) = 755+primOpTag (VecIndexByteArrayOp IntVec 4 W64) = 756+primOpTag (VecIndexByteArrayOp IntVec 64 W8) = 757+primOpTag (VecIndexByteArrayOp IntVec 32 W16) = 758+primOpTag (VecIndexByteArrayOp IntVec 16 W32) = 759+primOpTag (VecIndexByteArrayOp IntVec 8 W64) = 760+primOpTag (VecIndexByteArrayOp WordVec 16 W8) = 761+primOpTag (VecIndexByteArrayOp WordVec 8 W16) = 762+primOpTag (VecIndexByteArrayOp WordVec 4 W32) = 763+primOpTag (VecIndexByteArrayOp WordVec 2 W64) = 764+primOpTag (VecIndexByteArrayOp WordVec 32 W8) = 765+primOpTag (VecIndexByteArrayOp WordVec 16 W16) = 766+primOpTag (VecIndexByteArrayOp WordVec 8 W32) = 767+primOpTag (VecIndexByteArrayOp WordVec 4 W64) = 768+primOpTag (VecIndexByteArrayOp WordVec 64 W8) = 769+primOpTag (VecIndexByteArrayOp WordVec 32 W16) = 770+primOpTag (VecIndexByteArrayOp WordVec 16 W32) = 771+primOpTag (VecIndexByteArrayOp WordVec 8 W64) = 772+primOpTag (VecIndexByteArrayOp FloatVec 4 W32) = 773+primOpTag (VecIndexByteArrayOp FloatVec 2 W64) = 774+primOpTag (VecIndexByteArrayOp FloatVec 8 W32) = 775+primOpTag (VecIndexByteArrayOp FloatVec 4 W64) = 776+primOpTag (VecIndexByteArrayOp FloatVec 16 W32) = 777+primOpTag (VecIndexByteArrayOp FloatVec 8 W64) = 778+primOpTag (VecReadByteArrayOp IntVec 16 W8) = 779+primOpTag (VecReadByteArrayOp IntVec 8 W16) = 780+primOpTag (VecReadByteArrayOp IntVec 4 W32) = 781+primOpTag (VecReadByteArrayOp IntVec 2 W64) = 782+primOpTag (VecReadByteArrayOp IntVec 32 W8) = 783+primOpTag (VecReadByteArrayOp IntVec 16 W16) = 784+primOpTag (VecReadByteArrayOp IntVec 8 W32) = 785+primOpTag (VecReadByteArrayOp IntVec 4 W64) = 786+primOpTag (VecReadByteArrayOp IntVec 64 W8) = 787+primOpTag (VecReadByteArrayOp IntVec 32 W16) = 788+primOpTag (VecReadByteArrayOp IntVec 16 W32) = 789+primOpTag (VecReadByteArrayOp IntVec 8 W64) = 790+primOpTag (VecReadByteArrayOp WordVec 16 W8) = 791+primOpTag (VecReadByteArrayOp WordVec 8 W16) = 792+primOpTag (VecReadByteArrayOp WordVec 4 W32) = 793+primOpTag (VecReadByteArrayOp WordVec 2 W64) = 794+primOpTag (VecReadByteArrayOp WordVec 32 W8) = 795+primOpTag (VecReadByteArrayOp WordVec 16 W16) = 796+primOpTag (VecReadByteArrayOp WordVec 8 W32) = 797+primOpTag (VecReadByteArrayOp WordVec 4 W64) = 798+primOpTag (VecReadByteArrayOp WordVec 64 W8) = 799+primOpTag (VecReadByteArrayOp WordVec 32 W16) = 800+primOpTag (VecReadByteArrayOp WordVec 16 W32) = 801+primOpTag (VecReadByteArrayOp WordVec 8 W64) = 802+primOpTag (VecReadByteArrayOp FloatVec 4 W32) = 803+primOpTag (VecReadByteArrayOp FloatVec 2 W64) = 804+primOpTag (VecReadByteArrayOp FloatVec 8 W32) = 805+primOpTag (VecReadByteArrayOp FloatVec 4 W64) = 806+primOpTag (VecReadByteArrayOp FloatVec 16 W32) = 807+primOpTag (VecReadByteArrayOp FloatVec 8 W64) = 808+primOpTag (VecWriteByteArrayOp IntVec 16 W8) = 809+primOpTag (VecWriteByteArrayOp IntVec 8 W16) = 810+primOpTag (VecWriteByteArrayOp IntVec 4 W32) = 811+primOpTag (VecWriteByteArrayOp IntVec 2 W64) = 812+primOpTag (VecWriteByteArrayOp IntVec 32 W8) = 813+primOpTag (VecWriteByteArrayOp IntVec 16 W16) = 814+primOpTag (VecWriteByteArrayOp IntVec 8 W32) = 815+primOpTag (VecWriteByteArrayOp IntVec 4 W64) = 816+primOpTag (VecWriteByteArrayOp IntVec 64 W8) = 817+primOpTag (VecWriteByteArrayOp IntVec 32 W16) = 818+primOpTag (VecWriteByteArrayOp IntVec 16 W32) = 819+primOpTag (VecWriteByteArrayOp IntVec 8 W64) = 820+primOpTag (VecWriteByteArrayOp WordVec 16 W8) = 821+primOpTag (VecWriteByteArrayOp WordVec 8 W16) = 822+primOpTag (VecWriteByteArrayOp WordVec 4 W32) = 823+primOpTag (VecWriteByteArrayOp WordVec 2 W64) = 824+primOpTag (VecWriteByteArrayOp WordVec 32 W8) = 825+primOpTag (VecWriteByteArrayOp WordVec 16 W16) = 826+primOpTag (VecWriteByteArrayOp WordVec 8 W32) = 827+primOpTag (VecWriteByteArrayOp WordVec 4 W64) = 828+primOpTag (VecWriteByteArrayOp WordVec 64 W8) = 829+primOpTag (VecWriteByteArrayOp WordVec 32 W16) = 830+primOpTag (VecWriteByteArrayOp WordVec 16 W32) = 831+primOpTag (VecWriteByteArrayOp WordVec 8 W64) = 832+primOpTag (VecWriteByteArrayOp FloatVec 4 W32) = 833+primOpTag (VecWriteByteArrayOp FloatVec 2 W64) = 834+primOpTag (VecWriteByteArrayOp FloatVec 8 W32) = 835+primOpTag (VecWriteByteArrayOp FloatVec 4 W64) = 836+primOpTag (VecWriteByteArrayOp FloatVec 16 W32) = 837+primOpTag (VecWriteByteArrayOp FloatVec 8 W64) = 838+primOpTag (VecIndexOffAddrOp IntVec 16 W8) = 839+primOpTag (VecIndexOffAddrOp IntVec 8 W16) = 840+primOpTag (VecIndexOffAddrOp IntVec 4 W32) = 841+primOpTag (VecIndexOffAddrOp IntVec 2 W64) = 842+primOpTag (VecIndexOffAddrOp IntVec 32 W8) = 843+primOpTag (VecIndexOffAddrOp IntVec 16 W16) = 844+primOpTag (VecIndexOffAddrOp IntVec 8 W32) = 845+primOpTag (VecIndexOffAddrOp IntVec 4 W64) = 846+primOpTag (VecIndexOffAddrOp IntVec 64 W8) = 847+primOpTag (VecIndexOffAddrOp IntVec 32 W16) = 848+primOpTag (VecIndexOffAddrOp IntVec 16 W32) = 849+primOpTag (VecIndexOffAddrOp IntVec 8 W64) = 850+primOpTag (VecIndexOffAddrOp WordVec 16 W8) = 851+primOpTag (VecIndexOffAddrOp WordVec 8 W16) = 852+primOpTag (VecIndexOffAddrOp WordVec 4 W32) = 853+primOpTag (VecIndexOffAddrOp WordVec 2 W64) = 854+primOpTag (VecIndexOffAddrOp WordVec 32 W8) = 855+primOpTag (VecIndexOffAddrOp WordVec 16 W16) = 856+primOpTag (VecIndexOffAddrOp WordVec 8 W32) = 857+primOpTag (VecIndexOffAddrOp WordVec 4 W64) = 858+primOpTag (VecIndexOffAddrOp WordVec 64 W8) = 859+primOpTag (VecIndexOffAddrOp WordVec 32 W16) = 860+primOpTag (VecIndexOffAddrOp WordVec 16 W32) = 861+primOpTag (VecIndexOffAddrOp WordVec 8 W64) = 862+primOpTag (VecIndexOffAddrOp FloatVec 4 W32) = 863+primOpTag (VecIndexOffAddrOp FloatVec 2 W64) = 864+primOpTag (VecIndexOffAddrOp FloatVec 8 W32) = 865+primOpTag (VecIndexOffAddrOp FloatVec 4 W64) = 866+primOpTag (VecIndexOffAddrOp FloatVec 16 W32) = 867+primOpTag (VecIndexOffAddrOp FloatVec 8 W64) = 868+primOpTag (VecReadOffAddrOp IntVec 16 W8) = 869+primOpTag (VecReadOffAddrOp IntVec 8 W16) = 870+primOpTag (VecReadOffAddrOp IntVec 4 W32) = 871+primOpTag (VecReadOffAddrOp IntVec 2 W64) = 872+primOpTag (VecReadOffAddrOp IntVec 32 W8) = 873+primOpTag (VecReadOffAddrOp IntVec 16 W16) = 874+primOpTag (VecReadOffAddrOp IntVec 8 W32) = 875+primOpTag (VecReadOffAddrOp IntVec 4 W64) = 876+primOpTag (VecReadOffAddrOp IntVec 64 W8) = 877+primOpTag (VecReadOffAddrOp IntVec 32 W16) = 878+primOpTag (VecReadOffAddrOp IntVec 16 W32) = 879+primOpTag (VecReadOffAddrOp IntVec 8 W64) = 880+primOpTag (VecReadOffAddrOp WordVec 16 W8) = 881+primOpTag (VecReadOffAddrOp WordVec 8 W16) = 882+primOpTag (VecReadOffAddrOp WordVec 4 W32) = 883+primOpTag (VecReadOffAddrOp WordVec 2 W64) = 884+primOpTag (VecReadOffAddrOp WordVec 32 W8) = 885+primOpTag (VecReadOffAddrOp WordVec 16 W16) = 886+primOpTag (VecReadOffAddrOp WordVec 8 W32) = 887+primOpTag (VecReadOffAddrOp WordVec 4 W64) = 888+primOpTag (VecReadOffAddrOp WordVec 64 W8) = 889+primOpTag (VecReadOffAddrOp WordVec 32 W16) = 890+primOpTag (VecReadOffAddrOp WordVec 16 W32) = 891+primOpTag (VecReadOffAddrOp WordVec 8 W64) = 892+primOpTag (VecReadOffAddrOp FloatVec 4 W32) = 893+primOpTag (VecReadOffAddrOp FloatVec 2 W64) = 894+primOpTag (VecReadOffAddrOp FloatVec 8 W32) = 895+primOpTag (VecReadOffAddrOp FloatVec 4 W64) = 896+primOpTag (VecReadOffAddrOp FloatVec 16 W32) = 897+primOpTag (VecReadOffAddrOp FloatVec 8 W64) = 898+primOpTag (VecWriteOffAddrOp IntVec 16 W8) = 899+primOpTag (VecWriteOffAddrOp IntVec 8 W16) = 900+primOpTag (VecWriteOffAddrOp IntVec 4 W32) = 901+primOpTag (VecWriteOffAddrOp IntVec 2 W64) = 902+primOpTag (VecWriteOffAddrOp IntVec 32 W8) = 903+primOpTag (VecWriteOffAddrOp IntVec 16 W16) = 904+primOpTag (VecWriteOffAddrOp IntVec 8 W32) = 905+primOpTag (VecWriteOffAddrOp IntVec 4 W64) = 906+primOpTag (VecWriteOffAddrOp IntVec 64 W8) = 907+primOpTag (VecWriteOffAddrOp IntVec 32 W16) = 908+primOpTag (VecWriteOffAddrOp IntVec 16 W32) = 909+primOpTag (VecWriteOffAddrOp IntVec 8 W64) = 910+primOpTag (VecWriteOffAddrOp WordVec 16 W8) = 911+primOpTag (VecWriteOffAddrOp WordVec 8 W16) = 912+primOpTag (VecWriteOffAddrOp WordVec 4 W32) = 913+primOpTag (VecWriteOffAddrOp WordVec 2 W64) = 914+primOpTag (VecWriteOffAddrOp WordVec 32 W8) = 915+primOpTag (VecWriteOffAddrOp WordVec 16 W16) = 916+primOpTag (VecWriteOffAddrOp WordVec 8 W32) = 917+primOpTag (VecWriteOffAddrOp WordVec 4 W64) = 918+primOpTag (VecWriteOffAddrOp WordVec 64 W8) = 919+primOpTag (VecWriteOffAddrOp WordVec 32 W16) = 920+primOpTag (VecWriteOffAddrOp WordVec 16 W32) = 921+primOpTag (VecWriteOffAddrOp WordVec 8 W64) = 922+primOpTag (VecWriteOffAddrOp FloatVec 4 W32) = 923+primOpTag (VecWriteOffAddrOp FloatVec 2 W64) = 924+primOpTag (VecWriteOffAddrOp FloatVec 8 W32) = 925+primOpTag (VecWriteOffAddrOp FloatVec 4 W64) = 926+primOpTag (VecWriteOffAddrOp FloatVec 16 W32) = 927+primOpTag (VecWriteOffAddrOp FloatVec 8 W64) = 928+primOpTag (VecIndexScalarByteArrayOp IntVec 16 W8) = 929+primOpTag (VecIndexScalarByteArrayOp IntVec 8 W16) = 930+primOpTag (VecIndexScalarByteArrayOp IntVec 4 W32) = 931+primOpTag (VecIndexScalarByteArrayOp IntVec 2 W64) = 932+primOpTag (VecIndexScalarByteArrayOp IntVec 32 W8) = 933+primOpTag (VecIndexScalarByteArrayOp IntVec 16 W16) = 934+primOpTag (VecIndexScalarByteArrayOp IntVec 8 W32) = 935+primOpTag (VecIndexScalarByteArrayOp IntVec 4 W64) = 936+primOpTag (VecIndexScalarByteArrayOp IntVec 64 W8) = 937+primOpTag (VecIndexScalarByteArrayOp IntVec 32 W16) = 938+primOpTag (VecIndexScalarByteArrayOp IntVec 16 W32) = 939+primOpTag (VecIndexScalarByteArrayOp IntVec 8 W64) = 940+primOpTag (VecIndexScalarByteArrayOp WordVec 16 W8) = 941+primOpTag (VecIndexScalarByteArrayOp WordVec 8 W16) = 942+primOpTag (VecIndexScalarByteArrayOp WordVec 4 W32) = 943+primOpTag (VecIndexScalarByteArrayOp WordVec 2 W64) = 944+primOpTag (VecIndexScalarByteArrayOp WordVec 32 W8) = 945+primOpTag (VecIndexScalarByteArrayOp WordVec 16 W16) = 946+primOpTag (VecIndexScalarByteArrayOp WordVec 8 W32) = 947+primOpTag (VecIndexScalarByteArrayOp WordVec 4 W64) = 948+primOpTag (VecIndexScalarByteArrayOp WordVec 64 W8) = 949+primOpTag (VecIndexScalarByteArrayOp WordVec 32 W16) = 950+primOpTag (VecIndexScalarByteArrayOp WordVec 16 W32) = 951+primOpTag (VecIndexScalarByteArrayOp WordVec 8 W64) = 952+primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W32) = 953+primOpTag (VecIndexScalarByteArrayOp FloatVec 2 W64) = 954+primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W32) = 955+primOpTag (VecIndexScalarByteArrayOp FloatVec 4 W64) = 956+primOpTag (VecIndexScalarByteArrayOp FloatVec 16 W32) = 957+primOpTag (VecIndexScalarByteArrayOp FloatVec 8 W64) = 958+primOpTag (VecReadScalarByteArrayOp IntVec 16 W8) = 959+primOpTag (VecReadScalarByteArrayOp IntVec 8 W16) = 960+primOpTag (VecReadScalarByteArrayOp IntVec 4 W32) = 961+primOpTag (VecReadScalarByteArrayOp IntVec 2 W64) = 962+primOpTag (VecReadScalarByteArrayOp IntVec 32 W8) = 963+primOpTag (VecReadScalarByteArrayOp IntVec 16 W16) = 964+primOpTag (VecReadScalarByteArrayOp IntVec 8 W32) = 965+primOpTag (VecReadScalarByteArrayOp IntVec 4 W64) = 966+primOpTag (VecReadScalarByteArrayOp IntVec 64 W8) = 967+primOpTag (VecReadScalarByteArrayOp IntVec 32 W16) = 968+primOpTag (VecReadScalarByteArrayOp IntVec 16 W32) = 969+primOpTag (VecReadScalarByteArrayOp IntVec 8 W64) = 970+primOpTag (VecReadScalarByteArrayOp WordVec 16 W8) = 971+primOpTag (VecReadScalarByteArrayOp WordVec 8 W16) = 972+primOpTag (VecReadScalarByteArrayOp WordVec 4 W32) = 973+primOpTag (VecReadScalarByteArrayOp WordVec 2 W64) = 974+primOpTag (VecReadScalarByteArrayOp WordVec 32 W8) = 975+primOpTag (VecReadScalarByteArrayOp WordVec 16 W16) = 976+primOpTag (VecReadScalarByteArrayOp WordVec 8 W32) = 977+primOpTag (VecReadScalarByteArrayOp WordVec 4 W64) = 978+primOpTag (VecReadScalarByteArrayOp WordVec 64 W8) = 979+primOpTag (VecReadScalarByteArrayOp WordVec 32 W16) = 980+primOpTag (VecReadScalarByteArrayOp WordVec 16 W32) = 981+primOpTag (VecReadScalarByteArrayOp WordVec 8 W64) = 982+primOpTag (VecReadScalarByteArrayOp FloatVec 4 W32) = 983+primOpTag (VecReadScalarByteArrayOp FloatVec 2 W64) = 984+primOpTag (VecReadScalarByteArrayOp FloatVec 8 W32) = 985+primOpTag (VecReadScalarByteArrayOp FloatVec 4 W64) = 986+primOpTag (VecReadScalarByteArrayOp FloatVec 16 W32) = 987+primOpTag (VecReadScalarByteArrayOp FloatVec 8 W64) = 988+primOpTag (VecWriteScalarByteArrayOp IntVec 16 W8) = 989+primOpTag (VecWriteScalarByteArrayOp IntVec 8 W16) = 990+primOpTag (VecWriteScalarByteArrayOp IntVec 4 W32) = 991+primOpTag (VecWriteScalarByteArrayOp IntVec 2 W64) = 992+primOpTag (VecWriteScalarByteArrayOp IntVec 32 W8) = 993+primOpTag (VecWriteScalarByteArrayOp IntVec 16 W16) = 994+primOpTag (VecWriteScalarByteArrayOp IntVec 8 W32) = 995+primOpTag (VecWriteScalarByteArrayOp IntVec 4 W64) = 996+primOpTag (VecWriteScalarByteArrayOp IntVec 64 W8) = 997+primOpTag (VecWriteScalarByteArrayOp IntVec 32 W16) = 998+primOpTag (VecWriteScalarByteArrayOp IntVec 16 W32) = 999+primOpTag (VecWriteScalarByteArrayOp IntVec 8 W64) = 1000+primOpTag (VecWriteScalarByteArrayOp WordVec 16 W8) = 1001+primOpTag (VecWriteScalarByteArrayOp WordVec 8 W16) = 1002+primOpTag (VecWriteScalarByteArrayOp WordVec 4 W32) = 1003+primOpTag (VecWriteScalarByteArrayOp WordVec 2 W64) = 1004+primOpTag (VecWriteScalarByteArrayOp WordVec 32 W8) = 1005+primOpTag (VecWriteScalarByteArrayOp WordVec 16 W16) = 1006+primOpTag (VecWriteScalarByteArrayOp WordVec 8 W32) = 1007+primOpTag (VecWriteScalarByteArrayOp WordVec 4 W64) = 1008+primOpTag (VecWriteScalarByteArrayOp WordVec 64 W8) = 1009+primOpTag (VecWriteScalarByteArrayOp WordVec 32 W16) = 1010+primOpTag (VecWriteScalarByteArrayOp WordVec 16 W32) = 1011+primOpTag (VecWriteScalarByteArrayOp WordVec 8 W64) = 1012+primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W32) = 1013+primOpTag (VecWriteScalarByteArrayOp FloatVec 2 W64) = 1014+primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W32) = 1015+primOpTag (VecWriteScalarByteArrayOp FloatVec 4 W64) = 1016+primOpTag (VecWriteScalarByteArrayOp FloatVec 16 W32) = 1017+primOpTag (VecWriteScalarByteArrayOp FloatVec 8 W64) = 1018+primOpTag (VecIndexScalarOffAddrOp IntVec 16 W8) = 1019+primOpTag (VecIndexScalarOffAddrOp IntVec 8 W16) = 1020+primOpTag (VecIndexScalarOffAddrOp IntVec 4 W32) = 1021+primOpTag (VecIndexScalarOffAddrOp IntVec 2 W64) = 1022+primOpTag (VecIndexScalarOffAddrOp IntVec 32 W8) = 1023+primOpTag (VecIndexScalarOffAddrOp IntVec 16 W16) = 1024+primOpTag (VecIndexScalarOffAddrOp IntVec 8 W32) = 1025+primOpTag (VecIndexScalarOffAddrOp IntVec 4 W64) = 1026+primOpTag (VecIndexScalarOffAddrOp IntVec 64 W8) = 1027+primOpTag (VecIndexScalarOffAddrOp IntVec 32 W16) = 1028+primOpTag (VecIndexScalarOffAddrOp IntVec 16 W32) = 1029+primOpTag (VecIndexScalarOffAddrOp IntVec 8 W64) = 1030+primOpTag (VecIndexScalarOffAddrOp WordVec 16 W8) = 1031+primOpTag (VecIndexScalarOffAddrOp WordVec 8 W16) = 1032+primOpTag (VecIndexScalarOffAddrOp WordVec 4 W32) = 1033+primOpTag (VecIndexScalarOffAddrOp WordVec 2 W64) = 1034+primOpTag (VecIndexScalarOffAddrOp WordVec 32 W8) = 1035+primOpTag (VecIndexScalarOffAddrOp WordVec 16 W16) = 1036+primOpTag (VecIndexScalarOffAddrOp WordVec 8 W32) = 1037+primOpTag (VecIndexScalarOffAddrOp WordVec 4 W64) = 1038+primOpTag (VecIndexScalarOffAddrOp WordVec 64 W8) = 1039+primOpTag (VecIndexScalarOffAddrOp WordVec 32 W16) = 1040+primOpTag (VecIndexScalarOffAddrOp WordVec 16 W32) = 1041+primOpTag (VecIndexScalarOffAddrOp WordVec 8 W64) = 1042+primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W32) = 1043+primOpTag (VecIndexScalarOffAddrOp FloatVec 2 W64) = 1044+primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W32) = 1045+primOpTag (VecIndexScalarOffAddrOp FloatVec 4 W64) = 1046+primOpTag (VecIndexScalarOffAddrOp FloatVec 16 W32) = 1047+primOpTag (VecIndexScalarOffAddrOp FloatVec 8 W64) = 1048+primOpTag (VecReadScalarOffAddrOp IntVec 16 W8) = 1049+primOpTag (VecReadScalarOffAddrOp IntVec 8 W16) = 1050+primOpTag (VecReadScalarOffAddrOp IntVec 4 W32) = 1051+primOpTag (VecReadScalarOffAddrOp IntVec 2 W64) = 1052+primOpTag (VecReadScalarOffAddrOp IntVec 32 W8) = 1053+primOpTag (VecReadScalarOffAddrOp IntVec 16 W16) = 1054+primOpTag (VecReadScalarOffAddrOp IntVec 8 W32) = 1055+primOpTag (VecReadScalarOffAddrOp IntVec 4 W64) = 1056+primOpTag (VecReadScalarOffAddrOp IntVec 64 W8) = 1057+primOpTag (VecReadScalarOffAddrOp IntVec 32 W16) = 1058+primOpTag (VecReadScalarOffAddrOp IntVec 16 W32) = 1059+primOpTag (VecReadScalarOffAddrOp IntVec 8 W64) = 1060+primOpTag (VecReadScalarOffAddrOp WordVec 16 W8) = 1061+primOpTag (VecReadScalarOffAddrOp WordVec 8 W16) = 1062+primOpTag (VecReadScalarOffAddrOp WordVec 4 W32) = 1063+primOpTag (VecReadScalarOffAddrOp WordVec 2 W64) = 1064+primOpTag (VecReadScalarOffAddrOp WordVec 32 W8) = 1065+primOpTag (VecReadScalarOffAddrOp WordVec 16 W16) = 1066+primOpTag (VecReadScalarOffAddrOp WordVec 8 W32) = 1067+primOpTag (VecReadScalarOffAddrOp WordVec 4 W64) = 1068+primOpTag (VecReadScalarOffAddrOp WordVec 64 W8) = 1069+primOpTag (VecReadScalarOffAddrOp WordVec 32 W16) = 1070+primOpTag (VecReadScalarOffAddrOp WordVec 16 W32) = 1071+primOpTag (VecReadScalarOffAddrOp WordVec 8 W64) = 1072+primOpTag (VecReadScalarOffAddrOp FloatVec 4 W32) = 1073+primOpTag (VecReadScalarOffAddrOp FloatVec 2 W64) = 1074+primOpTag (VecReadScalarOffAddrOp FloatVec 8 W32) = 1075+primOpTag (VecReadScalarOffAddrOp FloatVec 4 W64) = 1076+primOpTag (VecReadScalarOffAddrOp FloatVec 16 W32) = 1077+primOpTag (VecReadScalarOffAddrOp FloatVec 8 W64) = 1078+primOpTag (VecWriteScalarOffAddrOp IntVec 16 W8) = 1079+primOpTag (VecWriteScalarOffAddrOp IntVec 8 W16) = 1080+primOpTag (VecWriteScalarOffAddrOp IntVec 4 W32) = 1081+primOpTag (VecWriteScalarOffAddrOp IntVec 2 W64) = 1082+primOpTag (VecWriteScalarOffAddrOp IntVec 32 W8) = 1083+primOpTag (VecWriteScalarOffAddrOp IntVec 16 W16) = 1084+primOpTag (VecWriteScalarOffAddrOp IntVec 8 W32) = 1085+primOpTag (VecWriteScalarOffAddrOp IntVec 4 W64) = 1086+primOpTag (VecWriteScalarOffAddrOp IntVec 64 W8) = 1087+primOpTag (VecWriteScalarOffAddrOp IntVec 32 W16) = 1088+primOpTag (VecWriteScalarOffAddrOp IntVec 16 W32) = 1089+primOpTag (VecWriteScalarOffAddrOp IntVec 8 W64) = 1090+primOpTag (VecWriteScalarOffAddrOp WordVec 16 W8) = 1091+primOpTag (VecWriteScalarOffAddrOp WordVec 8 W16) = 1092+primOpTag (VecWriteScalarOffAddrOp WordVec 4 W32) = 1093+primOpTag (VecWriteScalarOffAddrOp WordVec 2 W64) = 1094+primOpTag (VecWriteScalarOffAddrOp WordVec 32 W8) = 1095+primOpTag (VecWriteScalarOffAddrOp WordVec 16 W16) = 1096+primOpTag (VecWriteScalarOffAddrOp WordVec 8 W32) = 1097+primOpTag (VecWriteScalarOffAddrOp WordVec 4 W64) = 1098+primOpTag (VecWriteScalarOffAddrOp WordVec 64 W8) = 1099+primOpTag (VecWriteScalarOffAddrOp WordVec 32 W16) = 1100+primOpTag (VecWriteScalarOffAddrOp WordVec 16 W32) = 1101+primOpTag (VecWriteScalarOffAddrOp WordVec 8 W64) = 1102+primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W32) = 1103+primOpTag (VecWriteScalarOffAddrOp FloatVec 2 W64) = 1104+primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W32) = 1105+primOpTag (VecWriteScalarOffAddrOp FloatVec 4 W64) = 1106+primOpTag (VecWriteScalarOffAddrOp FloatVec 16 W32) = 1107+primOpTag (VecWriteScalarOffAddrOp FloatVec 8 W64) = 1108+primOpTag PrefetchByteArrayOp3 = 1109+primOpTag PrefetchMutableByteArrayOp3 = 1110+primOpTag PrefetchAddrOp3 = 1111+primOpTag PrefetchValueOp3 = 1112+primOpTag PrefetchByteArrayOp2 = 1113+primOpTag PrefetchMutableByteArrayOp2 = 1114+primOpTag PrefetchAddrOp2 = 1115+primOpTag PrefetchValueOp2 = 1116+primOpTag PrefetchByteArrayOp1 = 1117+primOpTag PrefetchMutableByteArrayOp1 = 1118+primOpTag PrefetchAddrOp1 = 1119+primOpTag PrefetchValueOp1 = 1120+primOpTag PrefetchByteArrayOp0 = 1121+primOpTag PrefetchMutableByteArrayOp0 = 1122+primOpTag PrefetchAddrOp0 = 1123+primOpTag PrefetchValueOp0 = 1124
backpack/RnModIface.hs view
@@ -108,7 +108,6 @@         deps <- rnDependencies (mi_deps iface)         -- TODO:         -- mi_rules-        -- mi_vect_info (LOW PRIORITY)         return iface { mi_module = mod                      , mi_sig_of = sig_of                      , mi_insts = insts@@ -619,7 +618,7 @@  rnIfaceBndr :: Rename IfaceBndr rnIfaceBndr (IfaceIdBndr (fs, ty)) = IfaceIdBndr <$> ((,) fs <$> rnIfaceType ty)-rnIfaceBndr (IfaceTvBndr tv_bndr) = IfaceIdBndr <$> rnIfaceTvBndr tv_bndr+rnIfaceBndr (IfaceTvBndr tv_bndr) = IfaceTvBndr <$> rnIfaceTvBndr tv_bndr  rnIfaceTvBndr :: Rename IfaceTvBndr rnIfaceTvBndr (fs, kind) = (,) fs <$> rnIfaceType kind
basicTypes/Avail.hs view
@@ -16,6 +16,8 @@     availName, availNames, availNonFldNames,     availNamesWithSelectors,     availFlds,+    availsNamesWithOccs,+    availNamesWithOccs,     stableAvailCmp,     plusAvail,     trimAvail,@@ -80,7 +82,7 @@  gives rise to the AvailInfo -  AvailTC T [T, MkT] [FieldLabel "foo" False foo],+  AvailTC T [T, MkT] [FieldLabel "foo" False foo]  whereas if -XDuplicateRecordFields is enabled it gives @@ -98,8 +100,9 @@  gives rise to -  AvailTC F [F, MkFInt, MkFBool]-    [FieldLabel "foo" True $sel:foo:MkFInt, FieldLabel "foo" True $sel:foo:MkFBool].+  AvailTC F [ F, MkFInt, MkFBool ]+            [ FieldLabel "foo" True $sel:foo:MkFInt+            , FieldLabel "foo" True $sel:foo:MkFBool ]  Moreover, note that the flIsOverloaded flag need not be the same for all the elements of the list.  In the example above, this occurs if@@ -107,8 +110,9 @@ `-XDuplicateRecordFields` enabled and one with it disabled.  Thus it is possible to have -  AvailTC F [F, MkFInt, MkFBool]-    [FieldLabel "foo" True $sel:foo:MkFInt, FieldLabel "foo" False foo].+  AvailTC F [ F, MkFInt, MkFBool ]+            [ FieldLabel "foo" True $sel:foo:MkFInt+            , FieldLabel "foo" False foo ]  If the two data instances are defined in different modules, both without `-XDuplicateRecordFields`, it will be impossible to export@@ -173,6 +177,22 @@ availFlds (AvailTC _ _ fs) = fs availFlds _                = [] +availsNamesWithOccs :: [AvailInfo] -> [(Name, OccName)]+availsNamesWithOccs = concatMap availNamesWithOccs++-- | 'Name's made available by the availability information, paired with+-- the 'OccName' used to refer to each one.+--+-- When @DuplicateRecordFields@ is in use, the 'Name' may be the+-- mangled name of a record selector (e.g. @$sel:foo:MkT@) while the+-- 'OccName' will be the label of the field (e.g. @foo@).+--+-- See Note [Representing fields in AvailInfo].+availNamesWithOccs :: AvailInfo -> [(Name, OccName)]+availNamesWithOccs (Avail n) = [(n, nameOccName n)]+availNamesWithOccs (AvailTC _ ns fs)+  = [ (n, nameOccName n) | n <- ns ] +++    [ (flSelector fl, mkVarOccFS (flLabel fl)) | fl <- fs ]  -- ----------------------------------------------------------------------------- -- Utility
basicTypes/BasicTypes.hs view
@@ -45,14 +45,12 @@          TopLevelFlag(..), isTopLevel, isNotTopLevel, -        DerivStrategy(..),-         OverlapFlag(..), OverlapMode(..), setOverlapModeMaybe,         hasOverlappingFlag, hasOverlappableFlag, hasIncoherentFlag,          Boxity(..), isBoxed, -        TyPrec(..), maybeParen,+        PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,          TupleSort(..), tupleSortBoxity, boxityTupleSort,         tupleParens,@@ -442,7 +440,7 @@ -- |Captures the fixity of declarations as they are parsed. This is not -- necessarily the same as the fixity declaration, as the normal fixity may be -- overridden using parens or backticks.-data LexicalFixity = Prefix | Infix deriving (Typeable,Data,Eq)+data LexicalFixity = Prefix | Infix deriving (Data,Eq)  instance Outputable LexicalFixity where   ppr Prefix = text "Prefix"@@ -545,31 +543,6 @@ {- ************************************************************************ *                                                                      *-                Deriving strategies-*                                                                      *-************************************************************************--}---- | Which technique the user explicitly requested when deriving an instance.-data DerivStrategy-  -- 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@-  deriving (Eq, Data)--instance Outputable DerivStrategy where-    ppr StockStrategy    = text "stock"-    ppr AnyclassStrategy = text "anyclass"-    ppr NewtypeStrategy  = text "newtype"--{--************************************************************************-*                                                                      *                 Instance overlap flag *                                                                      * ************************************************************************@@ -692,40 +665,25 @@ {- ************************************************************************ *                                                                      *-                Type precedence+                Precedence *                                                                      * ************************************************************************ -} -data TyPrec   -- See Note [Precedence in types] in TyCoRep.hs-  = TopPrec         -- No parens-  | FunPrec         -- Function args; no parens for tycon apps-  | TyOpPrec        -- Infix operator-  | TyConPrec       -- Tycon args; no parens for atomic--instance Eq TyPrec where-  (==) a b = case compare a b of-               EQ -> True-               _  -> False--instance Ord TyPrec where-  compare TopPrec TopPrec  = EQ-  compare TopPrec _        = LT--  compare FunPrec TopPrec   = GT-  compare FunPrec FunPrec   = EQ-  compare FunPrec TyOpPrec  = EQ   -- See Note [Type operator precedence]-  compare FunPrec TyConPrec = LT--  compare TyOpPrec TopPrec   = GT-  compare TyOpPrec FunPrec   = EQ  -- See Note [Type operator precedence]-  compare TyOpPrec TyOpPrec  = EQ-  compare TyOpPrec TyConPrec = LT+-- | A general-purpose pretty-printing precedence type.+newtype PprPrec = PprPrec Int deriving (Eq, Ord, Show)+-- See Note [Precedence in types] -  compare TyConPrec TyConPrec = EQ-  compare TyConPrec _         = GT+topPrec, sigPrec, funPrec, opPrec, appPrec :: PprPrec+topPrec = PprPrec 0 -- No parens+sigPrec = PprPrec 1 -- Explicit type signatures+funPrec = PprPrec 2 -- Function args; no parens for constructor apps+                    -- See [Type operator precedence] for why both+                    -- funPrec and opPrec exist.+opPrec  = PprPrec 2 -- Infix operator+appPrec = PprPrec 3 -- Constructor args; no parens for atomic -maybeParen :: TyPrec -> TyPrec -> SDoc -> SDoc+maybeParen :: PprPrec -> PprPrec -> SDoc -> SDoc maybeParen ctxt_prec inner_prec pretty   | ctxt_prec < inner_prec = pretty   | otherwise              = parens pretty@@ -733,12 +691,12 @@ {- Note [Precedence in types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Many pretty-printing functions have type-    ppr_ty :: TyPrec -> Type -> SDoc+    ppr_ty :: PprPrec -> Type -> SDoc -The TyPrec gives the binding strength of the context.  For example, in+The PprPrec gives the binding strength of the context.  For example, in    T ty1 ty2 we will pretty-print 'ty1' and 'ty2' with the call-  (ppr_ty TyConPrec ty)+  (ppr_ty appPrec ty) to indicate that the context is that of an argument of a TyConApp.  We use this consistently for Type and HsType.@@ -751,16 +709,16 @@    TyConPrec         Type constructor application    TyOpPrec/FunPrec  Operator application and function arrow -We have FunPrec and TyOpPrec to represent the precedence of function+We have funPrec and opPrec to represent the precedence of function arrow and type operators respectively, but currently we implement-FunPred == TyOpPrec, so that we don't distinguish the two. Reason:+funPrec == opPrec, so that we don't distinguish the two. Reason: it's hard to parse a type like     a ~ b => c * d -> e - f -By treating TyOpPrec = FunPrec we end up with more parens+By treating opPrec = funPrec we end up with more parens     (a ~ b) => (c * d) -> (e - f) -But the two are different constructors of TyPrec so we could make+But the two are different constructors of PprPrec so we could make (->) bind more or less tightly if we wanted. -} @@ -1220,10 +1178,10 @@  -- | Inline Specification data InlineSpec   -- What the user's INLINE pragma looked like-  = Inline-  | Inlinable-  | NoInline-  | NoUserInline -- Used when the pragma did not come from the user,+  = Inline       -- User wrote INLINE+  | Inlinable    -- User wrote INLINABLE+  | NoInline     -- User wrote NOINLINE+  | NoUserInline -- User did not write any of INLINE/INLINABLE/NOINLINE                  -- e.g. in `defaultInlinePragma` or when created by CSE   deriving( Eq, Data, Show )         -- Show needed for Lexer.x@@ -1395,7 +1353,9 @@ pprInlineDebug :: InlinePragma -> SDoc pprInlineDebug = pprInline' False -pprInline' :: Bool -> InlinePragma -> SDoc+pprInline' :: Bool           -- True <=> do not display the inl_inline field+           -> InlinePragma+           -> SDoc pprInline' emptyInline (InlinePragma { inl_inline = inline, inl_act = activation                                     , inl_rule = info, inl_sat = mb_arity })     = pp_inl inline <> pp_act inline activation <+> pp_sat <+> pp_info@@ -1476,9 +1436,12 @@   deriving (Data, Show)  mkIntegralLit :: Integral a => a -> IntegralLit-mkIntegralLit i = IL { il_text = SourceText (show (fromIntegral i :: Int))+mkIntegralLit i = IL { il_text = SourceText (show i_integer)                      , il_neg = i < 0-                     , il_value = toInteger i }+                     , il_value = i_integer }+  where+    i_integer :: Integer+    i_integer = toInteger i  negateIntegralLit :: IntegralLit -> IntegralLit negateIntegralLit (IL text neg value)@@ -1503,6 +1466,13 @@  mkFractionalLit :: Real a => a -> FractionalLit mkFractionalLit r = FL { fl_text = SourceText (show (realToFrac r::Double))+                           -- Converting to a Double here may technically lose+                           -- precision (see #15502). We could alternatively+                           -- convert to a Rational for the most accuracy, but+                           -- it would cause Floats and Doubles to be displayed+                           -- strangely, so we opt not to do this. (In contrast+                           -- to mkIntegralLit, where we always convert to an+                           -- Integer for the highest accuracy.)                        , fl_neg = r < 0                        , fl_value = toRational r } 
basicTypes/DataCon.hs view
@@ -53,7 +53,7 @@         isVanillaDataCon, classDataCon, dataConCannotMatch,         dataConUserTyVarsArePermuted,         isBanged, isMarkedStrict, eqHsBang, isSrcStrict, isSrcUnpacked,-        specialPromotedDc, isLegacyPromotableDataCon, isLegacyPromotableTyCon,+        specialPromotedDc,          -- ** Promotion related functions         promoteDataCon@@ -75,7 +75,6 @@ import PrelNames import Var import Outputable-import ListSetOps import Util import BasicTypes import FastString@@ -87,7 +86,7 @@ import qualified Data.Data as Data import Data.Char import Data.Word-import Data.List( mapAccumL, find )+import Data.List( find ) import qualified Data.Set as Set  {-@@ -846,26 +845,27 @@  -- | Build a new data constructor mkDataCon :: Name-          -> Bool           -- ^ Is the constructor declared infix?-          -> TyConRepName   -- ^  TyConRepName for the promoted TyCon-          -> [HsSrcBang]    -- ^ Strictness/unpack annotations, from user-          -> [FieldLabel]   -- ^ Field labels for the constructor,-                            -- if it is a record, otherwise empty-          -> [TyVar]        -- ^ Universals.-          -> [TyVar]        -- ^ Existentials.-          -> [TyVarBinder]  -- ^ User-written 'TyVarBinder's.-                            --   These must be Inferred/Specified.-                            --   See @Note [TyVarBinders in DataCons]@-          -> [EqSpec]       -- ^ GADT equalities-          -> ThetaType      -- ^ Theta-type occuring before the arguments proper-          -> [Type]         -- ^ Original argument types-          -> Type           -- ^ Original result type-          -> RuntimeRepInfo -- ^ See comments on 'TyCon.RuntimeRepInfo'-          -> TyCon          -- ^ Representation type constructor-          -> ThetaType      -- ^ The "stupid theta", context of the data-                            -- declaration e.g. @data Eq a => T a ...@-          -> Id             -- ^ Worker Id-          -> DataConRep     -- ^ Representation+          -> Bool               -- ^ Is the constructor declared infix?+          -> TyConRepName       -- ^  TyConRepName for the promoted TyCon+          -> [HsSrcBang]        -- ^ Strictness/unpack annotations, from user+          -> [FieldLabel]       -- ^ Field labels for the constructor,+                                -- if it is a record, otherwise empty+          -> [TyVar]            -- ^ Universals.+          -> [TyVar]            -- ^ Existentials.+          -> [TyVarBinder]      -- ^ User-written 'TyVarBinder's.+                                --   These must be Inferred/Specified.+                                --   See @Note [TyVarBinders in DataCons]@+          -> [EqSpec]           -- ^ GADT equalities+          -> KnotTied ThetaType -- ^ Theta-type occuring before the arguments proper+          -> [KnotTied Type]    -- ^ Original argument types+          -> KnotTied Type      -- ^ Original result type+          -> RuntimeRepInfo     -- ^ See comments on 'TyCon.RuntimeRepInfo'+          -> KnotTied TyCon     -- ^ Representation type constructor+          -> ConTag             -- ^ Constructor tag+          -> ThetaType          -- ^ The "stupid theta", context of the data+                                -- declaration e.g. @data Eq a => T a ...@+          -> Id                 -- ^ Worker Id+          -> DataConRep         -- ^ Representation           -> DataCon   -- Can get the tag from the TyCon @@ -874,7 +874,7 @@           fields           univ_tvs ex_tvs user_tvbs           eq_spec theta-          orig_arg_tys orig_res_ty rep_info rep_tycon+          orig_arg_tys orig_res_ty rep_info rep_tycon tag           stupid_theta work_id rep -- Warning: mkDataCon is not a good place to check certain invariants. -- If the programmer writes the wrong result type in the decl, thus:@@ -894,7 +894,11 @@       == Set.fromList (binderVars user_tvbs)     user_tvbs' =       ASSERT2( user_tvbs_invariant-             , ppr univ_tvs $$ ppr ex_tvs $$ ppr user_tvbs )+             , (vcat [ ppr name+                     , ppr univ_tvs+                     , ppr ex_tvs+                     , ppr eq_spec+                     , ppr user_tvbs ]) )       user_tvbs     con = MkData {dcName = name, dcUnique = nameUnique name,                   dcVanilla = is_vanilla, dcInfix = declared_infix,@@ -918,7 +922,6 @@         -- source-language arguments.  We add extra ones for the         -- dictionary arguments right here. -    tag = assoc "mkDataCon" (tyConDataCons rep_tycon `zip` [fIRST_TAG..]) con     rep_arg_tys = dataConRepArgTys con      rep_ty =@@ -1186,7 +1189,7 @@     , substTys   subst arg_tys)   where     univ_subst = zipTvSubst univ_tvs univ_tys-    (subst, ex_tvs') = mapAccumL Type.substTyVarBndr univ_subst ex_tvs+    (subst, ex_tvs') = Type.substTyVarBndrs univ_subst ex_tvs   -- | The \"full signature\" of the 'DataCon' returns, in order:@@ -1321,26 +1324,6 @@ specialPromotedDc :: DataCon -> Bool specialPromotedDc = isKindTyCon . dataConTyCon --- | Was this datacon promotable before GHC 8.0? That is, is it promotable--- without -XTypeInType-isLegacyPromotableDataCon :: DataCon -> Bool-isLegacyPromotableDataCon dc-  =  null (dataConEqSpec dc)  -- no GADTs-  && null (dataConTheta dc)   -- no context-  && not (isFamInstTyCon (dataConTyCon dc))   -- no data instance constructors-  && uniqSetAll isLegacyPromotableTyCon (tyConsOfType (dataConUserType dc))---- | Was this tycon promotable before GHC 8.0? That is, is it promotable--- without -XTypeInType-isLegacyPromotableTyCon :: TyCon -> Bool-isLegacyPromotableTyCon tc-  = isVanillaAlgTyCon tc ||-      -- This returns True more often than it should, but it's quite painful-      -- to make this fully accurate. And no harm is caused; we just don't-      -- require -XTypeInType every time we need to. (We'll always require-      -- -XDataKinds, though, so there's no standards-compliance issue.)-    isFunTyCon tc || isKindTyCon tc- classDataCon :: Class -> DataCon classDataCon clas = case tyConDataCons (classTyCon clas) of                       (dict_constr:no_more) -> ASSERT( null no_more ) dict_constr@@ -1459,8 +1442,8 @@   where     binders = mkTyConBindersPreferAnon ktvs liftedTypeKind -buildSynTyCon :: Name -> [TyConBinder] -> Kind   -- ^ /result/ kind-                  -> [Role] -> Type -> TyCon+buildSynTyCon :: Name -> [KnotTied TyConBinder] -> Kind   -- ^ /result/ kind+              -> [Role] -> KnotTied Type -> TyCon buildSynTyCon name binders res_kind roles rhs   = mkSynonymTyCon name binders res_kind roles rhs is_tau is_fam_free   where
basicTypes/DataCon.hs-boot view
@@ -25,6 +25,7 @@ dataConStupidTheta :: DataCon -> ThetaType dataConFullSig :: DataCon                -> ([TyVar], [TyVar], [EqSpec], ThetaType, [Type], Type)+isUnboxedSumCon :: DataCon -> Bool  instance Eq DataCon instance Uniquable DataCon
basicTypes/Demand.hs view
@@ -39,7 +39,7 @@         nopSig, botSig, exnSig, cprProdSig,         isTopSig, hasDemandEnvSig,         splitStrictSig, strictSigDmdEnv,-        increaseStrictSigArity,+        increaseStrictSigArity, etaExpandStrictSig,          seqDemand, seqDemandList, seqDmdType, seqStrictSig, @@ -1737,8 +1737,23 @@  increaseStrictSigArity :: Int -> StrictSig -> StrictSig -- Add extra arguments to a strictness signature-increaseStrictSigArity arity_increase (StrictSig (DmdType env dmds res))-  = StrictSig (DmdType env (replicate arity_increase topDmd ++ dmds) res)+increaseStrictSigArity arity_increase sig@(StrictSig dmd_ty@(DmdType env dmds res))+  | isTopDmdType dmd_ty = sig+  | arity_increase <= 0 = sig+  | 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  isTopSig :: StrictSig -> Bool isTopSig (StrictSig ty) = isTopDmdType ty
basicTypes/Id.hs view
@@ -74,7 +74,7 @@         DictId, isDictId, isEvVar,          -- ** Join variables-        JoinId, isJoinId, isJoinId_maybe, idJoinArity, isExitJoinId,+        JoinId, isJoinId, isJoinId_maybe, idJoinArity,         asJoinId, asJoinId_maybe, zapJoinId,          -- ** Inline pragma stuff@@ -119,7 +119,8 @@ import GhcPrelude  import DynFlags-import CoreSyn ( CoreRule, isStableUnfolding, evaldUnfolding, Unfolding( NoUnfolding ) )+import CoreSyn ( CoreRule, isStableUnfolding, evaldUnfolding,+                 isCompulsoryUnfolding, Unfolding( NoUnfolding ) )  import IdInfo import BasicTypes@@ -220,7 +221,7 @@ setIdInfo id info = info `seq` (lazySetIdInfo id info)         -- Try to avoid spack leaks by seq'ing -modifyIdInfo :: (IdInfo -> IdInfo) -> Id -> Id+modifyIdInfo :: HasDebugCallStack => (IdInfo -> IdInfo) -> Id -> Id modifyIdInfo fn id = setIdInfo id (fn (idInfo id))  -- maybeModifyIdInfo tries to avoid unnecessary thrashing@@ -497,10 +498,6 @@                 _            -> Nothing  | otherwise = Nothing --- see Note [Exitification] and see Note [Do not inline exit join points]-isExitJoinId :: Var -> Bool-isExitJoinId id = isJoinId id && isOneOcc (idOccInfo id) && occ_in_lam (idOccInfo id)- idDataCon :: Id -> DataCon -- ^ Get from either the worker or the wrapper 'Id' to the 'DataCon'. Currently used only in the desugarer. --@@ -519,7 +516,8 @@                         PrimOpId _       -> True        -- See Note [Primop wrappers]                         FCallId _        -> True                         DataConWorkId dc -> isUnboxedTupleCon dc || isUnboxedSumCon dc-                        _                -> False+                        _                -> isCompulsoryUnfolding (idUnfolding id)+                                            -- See Note [Levity-polymorphic Ids]  isImplicitId :: Id -> Bool -- ^ 'isImplicitId' tells whether an 'Id's info is implied by other@@ -541,7 +539,25 @@ idIsFrom :: Module -> Id -> Bool idIsFrom mod id = nameIsLocalOrFrom mod (idName id) -{-+{- Note [Levity-polymorphic Ids]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Some levity-polymorphic Ids must be applied and and inlined, not left+un-saturated.  Example:+  unsafeCoerceId :: forall r1 r2 (a::TYPE r1) (b::TYPE r2). a -> b++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)+  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+have a binding, but it does not harm to say they don't here, and its a very+simple way to fix Trac #14561.+ Note [Primop wrappers] ~~~~~~~~~~~~~~~~~~~~~~ Currently hasNoBinding claims that PrimOpIds don't have a curried
basicTypes/IdInfo.hs view
@@ -29,7 +29,7 @@         -- ** Zapping various forms of Info         zapLamInfo, zapFragileInfo,         zapDemandInfo, zapUsageInfo, zapUsageEnvInfo, zapUsedOnceInfo,-        zapTailCallInfo, zapCallArityInfo,+        zapTailCallInfo, zapCallArityInfo, zapUnfolding,          -- ** The ArityInfo type         ArityInfo,@@ -546,6 +546,11 @@ zapFragileUnfolding unf  | isFragileUnfolding unf = noUnfolding  | otherwise              = unf++zapUnfolding :: Unfolding -> Unfolding+-- Squash all unfolding info, preserving only evaluated-ness+zapUnfolding unf | isEvaldUnfolding unf = evaldUnfolding+                 | otherwise            = noUnfolding  zapTailCallInfo :: IdInfo -> Maybe IdInfo zapTailCallInfo info
basicTypes/Literal.hs view
@@ -5,26 +5,30 @@ \section[Literal]{@Literal@: Machine literals (unboxed, of course)} -} -{-# LANGUAGE CPP, DeriveDataTypeable #-}+{-# LANGUAGE CPP, DeriveDataTypeable, ScopedTypeVariables #-}  module Literal         (         -- * Main data type           Literal(..)           -- Exported to ParseIface+        , LitNumType(..)          -- ** Creating Literals-        , mkMachInt, mkMachIntWrap-        , mkMachWord, mkMachWordWrap+        , mkMachInt, mkMachIntWrap, mkMachIntWrapC+        , mkMachWord, mkMachWordWrap, mkMachWordWrapC         , mkMachInt64, mkMachInt64Wrap         , mkMachWord64, mkMachWord64Wrap         , mkMachFloat, mkMachDouble         , mkMachChar, mkMachString-        , mkLitInteger+        , mkLitInteger, mkLitNatural+        , mkLitNumber, mkLitNumberWrap          -- ** Operations on Literals         , literalType         , absentLiteralOf         , pprLiteral+        , litNumIsSigned+        , litNumCheckRange          -- ** Predicates on Literals and their contents         , litIsDupable, litIsTrivial, litIsLifted@@ -35,6 +39,7 @@          -- ** Coercions         , word2IntLit, int2WordLit+        , narrowLit         , narrow8IntLit, narrow16IntLit, narrow32IntLit         , narrow8WordLit, narrow16WordLit, narrow32WordLit         , char2IntLit, int2CharLit@@ -66,6 +71,7 @@ import Data.Char import Data.Maybe ( isJust ) import Data.Data ( Data )+import Data.Proxy import Numeric ( fromRat )  {-@@ -95,6 +101,10 @@         -- First the primitive guys     MachChar    Char            -- ^ @Char#@ - at least 31 bits. Create with 'mkMachChar' +  | LitNumber !LitNumType !Integer Type+      --  ^ Any numeric literal that can be+      -- internally represented with an Integer+   | MachStr     ByteString      -- ^ A string-literal: stored and emitted                                 -- UTF-8 encoded, we'll arrange to decode it                                 -- at runtime.  Also emitted with a @'\0'@@@ -104,11 +114,6 @@                                 -- that can be represented as a Literal. Create                                 -- with 'nullAddrLit' -  | MachInt     Integer         -- ^ @Int#@ - according to target machine-  | MachInt64   Integer         -- ^ @Int64#@ - exactly 64 bits-  | MachWord    Integer         -- ^ @Word#@ - according to target machine-  | MachWord64  Integer         -- ^ @Word64#@ - exactly 64 bits-   | MachFloat   Rational        -- ^ @Float#@. Create with 'mkMachFloat'   | MachDouble  Rational        -- ^ @Double#@. Create with 'mkMachDouble' @@ -123,11 +128,28 @@                 --    the label expects. Only applicable with                 --    @stdcall@ labels. @Just x@ => @\<x\>@ will                 --    be appended to label name when emitting assembly.--  | LitInteger Integer Type --  ^ Integer literals-                            -- See Note [Integer literals]   deriving Data +-- | Numeric literal type+data LitNumType+  = LitNumInteger -- ^ @Integer@ (see Note [Integer literals])+  | LitNumNatural -- ^ @Natural@ (see Note [Natural literals])+  | LitNumInt     -- ^ @Int#@ - according to target machine+  | LitNumInt64   -- ^ @Int64#@ - exactly 64 bits+  | LitNumWord    -- ^ @Word#@ - according to target machine+  | LitNumWord64  -- ^ @Word64#@ - exactly 64 bits+  deriving (Data,Enum,Eq,Ord)++-- | Indicate if a numeric literal type supports negative numbers+litNumIsSigned :: LitNumType -> Bool+litNumIsSigned nt = case nt of+  LitNumInteger -> True+  LitNumNatural -> False+  LitNumInt     -> True+  LitNumInt64   -> True+  LitNumWord    -> False+  LitNumWord64  -> False+ {- Note [Integer literals] ~~~~~~~~~~~~~~~~~~~~~~~@@ -146,26 +168,33 @@ just use an error thunk, and fill in the real Id when we do tcIfaceLit in TcIface. +Note [Natural literals]+~~~~~~~~~~~~~~~~~~~~~~~+Similar to Integer literals. -Binary instance -} +instance Binary LitNumType where+   put_ bh numTyp = putByte bh (fromIntegral (fromEnum numTyp))+   get bh = do+      h <- getByte bh+      return (toEnum (fromIntegral h))+ instance Binary Literal where     put_ bh (MachChar aa)     = do putByte bh 0; put_ bh aa     put_ bh (MachStr ab)      = do putByte bh 1; put_ bh ab     put_ bh (MachNullAddr)    = do putByte bh 2-    put_ bh (MachInt ad)      = do putByte bh 3; put_ bh ad-    put_ bh (MachInt64 ae)    = do putByte bh 4; put_ bh ae-    put_ bh (MachWord af)     = do putByte bh 5; put_ bh af-    put_ bh (MachWord64 ag)   = do putByte bh 6; put_ bh ag-    put_ bh (MachFloat ah)    = do putByte bh 7; put_ bh ah-    put_ bh (MachDouble ai)   = do putByte bh 8; put_ bh ai+    put_ bh (MachFloat ah)    = do putByte bh 3; put_ bh ah+    put_ bh (MachDouble ai)   = do putByte bh 4; put_ bh ai     put_ bh (MachLabel aj mb fod)-        = do putByte bh 9+        = do putByte bh 5              put_ bh aj              put_ bh mb              put_ bh fod-    put_ bh (LitInteger i _) = do putByte bh 10; put_ bh i+    put_ bh (LitNumber nt i _)+        = do putByte bh 6+             put_ bh nt+             put_ bh i     get bh = do             h <- getByte bh             case h of@@ -178,32 +207,31 @@               2 -> do                     return (MachNullAddr)               3 -> do-                    ad <- get bh-                    return (MachInt ad)-              4 -> do-                    ae <- get bh-                    return (MachInt64 ae)-              5 -> do-                    af <- get bh-                    return (MachWord af)-              6 -> do-                    ag <- get bh-                    return (MachWord64 ag)-              7 -> do                     ah <- get bh                     return (MachFloat ah)-              8 -> do+              4 -> do                     ai <- get bh                     return (MachDouble ai)-              9 -> do+              5 -> do                     aj <- get bh                     mb <- get bh                     fod <- get bh                     return (MachLabel aj mb fod)               _ -> do-                    i <- get bh-                    -- See Note [Integer literals]-                    return $ mkLitInteger i (panic "Evaluated the place holder for mkInteger")+                    nt <- get bh+                    i  <- get bh+                    let t = case nt of+                            LitNumInt     -> intPrimTy+                            LitNumInt64   -> int64PrimTy+                            LitNumWord    -> wordPrimTy+                            LitNumWord64  -> word64PrimTy+                            -- See Note [Integer literals]+                            LitNumInteger ->+                              panic "Evaluated the place holder for mkInteger"+                            -- and Note [Natural literals]+                            LitNumNatural ->+                              panic "Evaluated the place holder for mkNatural"+                    return (LitNumber nt i t)  instance Outputable Literal where     ppr lit = pprLiteral (\d -> d) lit@@ -242,56 +270,117 @@ Int/Word range. -} +-- | Wrap a literal number according to its type+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)+  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)+  LitNumInt64   -> LitNumber nt (toInteger (fromIntegral i :: Int64)) t+  LitNumWord64  -> LitNumber nt (toInteger (fromIntegral i :: Word64)) t+  LitNumInteger -> v+  LitNumNatural -> v+wrapLitNumber _ x = x++-- | Create a numeric 'Literal' of the given type+mkLitNumberWrap :: DynFlags -> LitNumType -> Integer -> Type -> Literal+mkLitNumberWrap dflags nt i t = wrapLitNumber dflags (LitNumber nt i t)++-- | Check that a given number is in the range of a numeric literal+litNumCheckRange :: DynFlags -> LitNumType -> Integer -> Bool+litNumCheckRange dflags nt i = case nt of+     LitNumInt     -> inIntRange dflags i+     LitNumWord    -> inWordRange dflags i+     LitNumInt64   -> inInt64Range i+     LitNumWord64  -> inWord64Range i+     LitNumNatural -> i >= 0+     LitNumInteger -> True++-- | Create a numeric 'Literal' of the given type+mkLitNumber :: DynFlags -> LitNumType -> Integer -> Type -> Literal+mkLitNumber dflags nt i t =+  ASSERT2(litNumCheckRange dflags nt i, integer i)+  (LitNumber nt i t)+ -- | Creates a 'Literal' of type @Int#@ mkMachInt :: DynFlags -> Integer -> Literal mkMachInt dflags x   = ASSERT2( inIntRange dflags x,  integer x )-                       MachInt x+                       (mkMachIntUnchecked x)  -- | Creates a 'Literal' of type @Int#@. --   If the argument is out of the (target-dependent) range, it is wrapped. --   See Note [Word/Int underflow/overflow] mkMachIntWrap :: DynFlags -> Integer -> Literal-mkMachIntWrap dflags i- = MachInt $ case platformWordSize (targetPlatform dflags) of-   4 -> toInteger (fromIntegral i :: Int32)-   8 -> toInteger (fromIntegral i :: Int64)-   w -> panic ("toIntRange: Unknown platformWordSize: " ++ show w)+mkMachIntWrap dflags i = wrapLitNumber dflags $ mkMachIntUnchecked i +-- | Creates a 'Literal' of type @Int#@ without checking its range.+mkMachIntUnchecked :: Integer -> Literal+mkMachIntUnchecked i = LitNumber LitNumInt i intPrimTy++-- | Creates a 'Literal' of type @Int#@, as well as a 'Bool'ean flag indicating+--   overflow. That is, if the argument is out of the (target-dependent) range+--   the argument is wrapped and the overflow flag will be set.+--   See Note [Word/Int underflow/overflow]+mkMachIntWrapC :: DynFlags -> Integer -> (Literal, Bool)+mkMachIntWrapC dflags i = (n, i /= i')+  where+    n@(LitNumber _ i' _) = mkMachIntWrap dflags i+ -- | Creates a 'Literal' of type @Word#@ mkMachWord :: DynFlags -> Integer -> Literal mkMachWord dflags x   = ASSERT2( inWordRange dflags x, integer x )-                        MachWord x+                        (mkMachWordUnchecked x)  -- | Creates a 'Literal' of type @Word#@. --   If the argument is out of the (target-dependent) range, it is wrapped. --   See Note [Word/Int underflow/overflow] mkMachWordWrap :: DynFlags -> Integer -> Literal-mkMachWordWrap dflags i- = MachWord $ case platformWordSize (targetPlatform dflags) of-   4 -> toInteger (fromInteger i :: Word32)-   8 -> toInteger (fromInteger i :: Word64)-   w -> panic ("toWordRange: Unknown platformWordSize: " ++ show w)+mkMachWordWrap dflags i = wrapLitNumber dflags $ mkMachWordUnchecked i +-- | Creates a 'Literal' of type @Word#@ without checking its range.+mkMachWordUnchecked :: Integer -> Literal+mkMachWordUnchecked i = LitNumber LitNumWord i wordPrimTy++-- | Creates a 'Literal' of type @Word#@, as well as a 'Bool'ean flag indicating+--   carry. That is, if the argument is out of the (target-dependent) range+--   the argument is wrapped and the carry flag will be set.+--   See Note [Word/Int underflow/overflow]+mkMachWordWrapC :: DynFlags -> Integer -> (Literal, Bool)+mkMachWordWrapC dflags i = (n, i /= i')+  where+    n@(LitNumber _ i' _) = mkMachWordWrap dflags i+ -- | Creates a 'Literal' of type @Int64#@ mkMachInt64 :: Integer -> Literal-mkMachInt64  x = ASSERT2( inInt64Range x, integer x )-                 MachInt64 x+mkMachInt64  x = ASSERT2( inInt64Range x, integer x ) (mkMachInt64Unchecked x)  -- | Creates a 'Literal' of type @Int64#@. --   If the argument is out of the range, it is wrapped.-mkMachInt64Wrap :: Integer -> Literal-mkMachInt64Wrap  i = MachInt64 (toInteger (fromIntegral i :: Int64))+mkMachInt64Wrap :: DynFlags -> Integer -> Literal+mkMachInt64Wrap dflags i = wrapLitNumber dflags $ mkMachInt64Unchecked i +-- | Creates a 'Literal' of type @Int64#@ without checking its range.+mkMachInt64Unchecked :: Integer -> Literal+mkMachInt64Unchecked i = LitNumber LitNumInt64 i int64PrimTy+ -- | Creates a 'Literal' of type @Word64#@ mkMachWord64 :: Integer -> Literal-mkMachWord64 x = ASSERT2( inWord64Range x, integer x )-                 MachWord64 x+mkMachWord64 x = ASSERT2( inWord64Range x, integer x ) (mkMachWord64Unchecked x)  -- | Creates a 'Literal' of type @Word64#@. --   If the argument is out of the range, it is wrapped.-mkMachWord64Wrap :: Integer -> Literal-mkMachWord64Wrap i = MachWord64 (toInteger (fromIntegral i :: Word64))+mkMachWord64Wrap :: DynFlags -> Integer -> Literal+mkMachWord64Wrap dflags i = wrapLitNumber dflags $ mkMachWord64Unchecked i +-- | Creates a 'Literal' of type @Word64#@ without checking its range.+mkMachWord64Unchecked :: Integer -> Literal+mkMachWord64Unchecked i = LitNumber LitNumWord64 i word64PrimTy+ -- | Creates a 'Literal' of type @Float#@ mkMachFloat :: Rational -> Literal mkMachFloat = MachFloat@@ -311,12 +400,19 @@ mkMachString s = MachStr (fastStringToByteString $ mkFastString s)  mkLitInteger :: Integer -> Type -> Literal-mkLitInteger = LitInteger+mkLitInteger x ty = LitNumber LitNumInteger x ty +mkLitNatural :: Integer -> Type -> Literal+mkLitNatural x ty = ASSERT2( inNaturalRange x,  integer x )+                    (LitNumber LitNumNatural x ty)+ inIntRange, inWordRange :: DynFlags -> Integer -> Bool inIntRange  dflags x = x >= tARGET_MIN_INT dflags && x <= tARGET_MAX_INT dflags inWordRange dflags x = x >= 0                     && x <= tARGET_MAX_WORD dflags +inNaturalRange :: Integer -> Bool+inNaturalRange x = x >= 0+ inInt64Range, inWord64Range :: Integer -> Bool inInt64Range x  = x >= toInteger (minBound :: Int64) &&                   x <= toInteger (maxBound :: Int64)@@ -328,49 +424,39 @@  -- | Tests whether the literal represents a zero of whatever type it is isZeroLit :: Literal -> Bool-isZeroLit (MachInt    0) = True-isZeroLit (MachInt64  0) = True-isZeroLit (MachWord   0) = True-isZeroLit (MachWord64 0) = True-isZeroLit (MachFloat  0) = True-isZeroLit (MachDouble 0) = True-isZeroLit _              = False+isZeroLit (LitNumber _ 0 _) = True+isZeroLit (MachFloat  0)    = True+isZeroLit (MachDouble 0)    = True+isZeroLit _                 = False  -- | Returns the 'Integer' contained in the 'Literal', for when that makes--- sense, i.e. for 'Char', 'Int', 'Word' and 'LitInteger'.+-- sense, i.e. for 'Char', 'Int', 'Word', 'LitInteger' and 'LitNatural'. litValue  :: Literal -> Integer litValue l = case isLitValue_maybe l of    Just x  -> x    Nothing -> pprPanic "litValue" (ppr l)  -- | Returns the 'Integer' contained in the 'Literal', for when that makes--- sense, i.e. for 'Char', 'Int', 'Word' and 'LitInteger'.+-- sense, i.e. for 'Char' and numbers. isLitValue_maybe  :: Literal -> Maybe Integer-isLitValue_maybe (MachChar   c)   = Just $ toInteger $ ord c-isLitValue_maybe (MachInt    i)   = Just i-isLitValue_maybe (MachInt64  i)   = Just i-isLitValue_maybe (MachWord   i)   = Just i-isLitValue_maybe (MachWord64 i)   = Just i-isLitValue_maybe (LitInteger i _) = Just i-isLitValue_maybe _                = Nothing+isLitValue_maybe (MachChar   c)    = Just $ toInteger $ ord c+isLitValue_maybe (LitNumber _ i _) = Just i+isLitValue_maybe _                 = Nothing  -- | Apply a function to the 'Integer' contained in the 'Literal', for when that--- makes sense, e.g. for 'Char', 'Int', 'Word' and 'LitInteger'. For--- fixed-size integral literals, the result will be wrapped in--- accordance with the semantics of the target type.+-- makes sense, e.g. for 'Char' and numbers.+-- For fixed-size integral literals, the result will be wrapped in accordance+-- with the semantics of the target type. -- See Note [Word/Int underflow/overflow] mapLitValue  :: DynFlags -> (Integer -> Integer) -> Literal -> Literal-mapLitValue _      f (MachChar   c)   = mkMachChar (fchar c)+mapLitValue _      f (MachChar   c)     = mkMachChar (fchar c)    where fchar = chr . fromInteger . f . toInteger . ord-mapLitValue dflags f (MachInt    i)   = mkMachIntWrap dflags (f i)-mapLitValue _      f (MachInt64  i)   = mkMachInt64Wrap (f i)-mapLitValue dflags f (MachWord   i)   = mkMachWordWrap dflags (f i)-mapLitValue _      f (MachWord64 i)   = mkMachWord64Wrap (f i)-mapLitValue _      f (LitInteger i t) = mkLitInteger (f i) t-mapLitValue _      _ l                = pprPanic "mapLitValue" (ppr l)+mapLitValue dflags f (LitNumber nt i t) = wrapLitNumber dflags+                                                        (LitNumber nt (f i) t)+mapLitValue _      _ l                  = pprPanic "mapLitValue" (ppr l)  -- | Indicate if the `Literal` contains an 'Integer' value, e.g. 'Char',--- 'Int', 'Word' and 'LitInteger'.+-- 'Int', 'Word', 'LitInteger' and 'LitNatural'. isLitValue  :: Literal -> Bool isLitValue = isJust . isLitValue_maybe @@ -387,43 +473,42 @@   :: Literal -> Literal  word2IntLit, int2WordLit :: DynFlags -> Literal -> Literal-word2IntLit dflags (MachWord w)-  | w > tARGET_MAX_INT dflags = MachInt (w - tARGET_MAX_WORD dflags - 1)-  | otherwise                 = MachInt w+word2IntLit dflags (LitNumber LitNumWord w _)+  | w > tARGET_MAX_INT dflags = mkMachInt dflags (w - tARGET_MAX_WORD dflags - 1)+  | otherwise                 = mkMachInt dflags w word2IntLit _ l = pprPanic "word2IntLit" (ppr l) -int2WordLit dflags (MachInt i)-  | i < 0     = MachWord (1 + tARGET_MAX_WORD dflags + i)      -- (-1)  --->  tARGET_MAX_WORD-  | otherwise = MachWord i+int2WordLit dflags (LitNumber LitNumInt i _)+  | i < 0     = mkMachWord dflags (1 + tARGET_MAX_WORD dflags + i)      -- (-1)  --->  tARGET_MAX_WORD+  | otherwise = mkMachWord dflags i int2WordLit _ l = pprPanic "int2WordLit" (ppr l) -narrow8IntLit    (MachInt  i) = MachInt  (toInteger (fromInteger i :: Int8))-narrow8IntLit    l            = pprPanic "narrow8IntLit" (ppr l)-narrow16IntLit   (MachInt  i) = MachInt  (toInteger (fromInteger i :: Int16))-narrow16IntLit   l            = pprPanic "narrow16IntLit" (ppr l)-narrow32IntLit   (MachInt  i) = MachInt  (toInteger (fromInteger i :: Int32))-narrow32IntLit   l            = pprPanic "narrow32IntLit" (ppr l)-narrow8WordLit   (MachWord w) = MachWord (toInteger (fromInteger w :: Word8))-narrow8WordLit   l            = pprPanic "narrow8WordLit" (ppr l)-narrow16WordLit  (MachWord w) = MachWord (toInteger (fromInteger w :: Word16))-narrow16WordLit  l            = pprPanic "narrow16WordLit" (ppr l)-narrow32WordLit  (MachWord w) = MachWord (toInteger (fromInteger w :: Word32))-narrow32WordLit  l            = pprPanic "narrow32WordLit" (ppr l)+-- | Narrow a literal number (unchecked result range)+narrowLit :: forall a. Integral a => Proxy a -> Literal -> Literal+narrowLit _ (LitNumber nt i t) = LitNumber nt (toInteger (fromInteger i :: a)) t+narrowLit _ l                  = pprPanic "narrowLit" (ppr l) -char2IntLit (MachChar c) = MachInt  (toInteger (ord c))+narrow8IntLit   = narrowLit (Proxy :: Proxy Int8)+narrow16IntLit  = narrowLit (Proxy :: Proxy Int16)+narrow32IntLit  = narrowLit (Proxy :: Proxy Int32)+narrow8WordLit  = narrowLit (Proxy :: Proxy Word8)+narrow16WordLit = narrowLit (Proxy :: Proxy Word16)+narrow32WordLit = narrowLit (Proxy :: Proxy Word32)++char2IntLit (MachChar c) = mkMachIntUnchecked (toInteger (ord c)) char2IntLit l            = pprPanic "char2IntLit" (ppr l)-int2CharLit (MachInt  i) = MachChar (chr (fromInteger i))-int2CharLit l            = pprPanic "int2CharLit" (ppr l)+int2CharLit (LitNumber _ i _) = MachChar (chr (fromInteger i))+int2CharLit l                 = pprPanic "int2CharLit" (ppr l) -float2IntLit (MachFloat f) = MachInt   (truncate    f)+float2IntLit (MachFloat f) = mkMachIntUnchecked (truncate f) float2IntLit l             = pprPanic "float2IntLit" (ppr l)-int2FloatLit (MachInt   i) = MachFloat (fromInteger i)-int2FloatLit l             = pprPanic "int2FloatLit" (ppr l)+int2FloatLit (LitNumber _ i _) = MachFloat (fromInteger i)+int2FloatLit l                 = pprPanic "int2FloatLit" (ppr l) -double2IntLit (MachDouble f) = MachInt    (truncate    f)+double2IntLit (MachDouble f) = mkMachIntUnchecked (truncate f) double2IntLit l              = pprPanic "double2IntLit" (ppr l)-int2DoubleLit (MachInt    i) = MachDouble (fromInteger i)-int2DoubleLit l              = pprPanic "int2DoubleLit" (ppr l)+int2DoubleLit (LitNumber _ i _) = MachDouble (fromInteger i)+int2DoubleLit l                 = pprPanic "int2DoubleLit" (ppr l)  float2DoubleLit (MachFloat  f) = MachDouble f float2DoubleLit l              = pprPanic "float2DoubleLit" (ppr l)@@ -474,24 +559,41 @@ litIsTrivial :: Literal -> Bool --      c.f. CoreUtils.exprIsTrivial litIsTrivial (MachStr _)      = False-litIsTrivial (LitInteger {})  = False+litIsTrivial (LitNumber nt _ _) = case nt of+  LitNumInteger -> False+  LitNumNatural -> False+  LitNumInt     -> True+  LitNumInt64   -> True+  LitNumWord    -> True+  LitNumWord64  -> True litIsTrivial _                = True  -- | True if code space does not go bad if we duplicate this literal--- Currently we treat it just like 'litIsTrivial' litIsDupable :: DynFlags -> Literal -> Bool --      c.f. CoreUtils.exprIsDupable litIsDupable _      (MachStr _)      = False-litIsDupable dflags (LitInteger i _) = inIntRange dflags i+litIsDupable dflags (LitNumber nt i _) = case nt of+  LitNumInteger -> inIntRange dflags i+  LitNumNatural -> inIntRange dflags i+  LitNumInt     -> True+  LitNumInt64   -> True+  LitNumWord    -> True+  LitNumWord64  -> True litIsDupable _      _                = True  litFitsInChar :: Literal -> Bool-litFitsInChar (MachInt i) = i >= toInteger (ord minBound)-                         && i <= toInteger (ord maxBound)-litFitsInChar _           = False+litFitsInChar (LitNumber _ i _) = i >= toInteger (ord minBound)+                               && i <= toInteger (ord maxBound)+litFitsInChar _                 = False  litIsLifted :: Literal -> Bool-litIsLifted (LitInteger {}) = True+litIsLifted (LitNumber nt _ _) = case nt of+  LitNumInteger -> True+  LitNumNatural -> True+  LitNumInt     -> False+  LitNumInt64   -> False+  LitNumWord    -> False+  LitNumWord64  -> False litIsLifted _               = False  {-@@ -501,17 +603,13 @@  -- | Find the Haskell 'Type' the literal occupies literalType :: Literal -> Type-literalType MachNullAddr    = addrPrimTy-literalType (MachChar _)    = charPrimTy-literalType (MachStr  _)    = addrPrimTy-literalType (MachInt  _)    = intPrimTy-literalType (MachWord  _)   = wordPrimTy-literalType (MachInt64  _)  = int64PrimTy-literalType (MachWord64  _) = word64PrimTy-literalType (MachFloat _)   = floatPrimTy-literalType (MachDouble _)  = doublePrimTy+literalType MachNullAddr      = addrPrimTy+literalType (MachChar _)      = charPrimTy+literalType (MachStr  _)      = addrPrimTy+literalType (MachFloat _)     = floatPrimTy+literalType (MachDouble _)    = doublePrimTy literalType (MachLabel _ _ _) = addrPrimTy-literalType (LitInteger _ t) = t+literalType (LitNumber _ _ t) = t  absentLiteralOf :: TyCon -> Maybe Literal -- Return a literal of the appropriate primitive@@ -521,12 +619,13 @@ absent_lits :: UniqFM Literal absent_lits = listToUFM [ (addrPrimTyConKey,    MachNullAddr)                         , (charPrimTyConKey,    MachChar 'x')-                        , (intPrimTyConKey,     MachInt 0)-                        , (int64PrimTyConKey,   MachInt64 0)+                        , (intPrimTyConKey,     mkMachIntUnchecked 0)+                        , (int64PrimTyConKey,   mkMachInt64Unchecked 0)+                        , (wordPrimTyConKey,    mkMachWordUnchecked 0)+                        , (word64PrimTyConKey,  mkMachWord64Unchecked 0)                         , (floatPrimTyConKey,   MachFloat 0)                         , (doublePrimTyConKey,  MachDouble 0)-                        , (wordPrimTyConKey,    MachWord 0)-                        , (word64PrimTyConKey,  MachWord64 0) ]+                        ]  {-         Comparison@@ -534,32 +633,27 @@ -}  cmpLit :: Literal -> Literal -> Ordering-cmpLit (MachChar      a)   (MachChar       b)   = a `compare` b-cmpLit (MachStr       a)   (MachStr        b)   = a `compare` b-cmpLit (MachNullAddr)      (MachNullAddr)       = EQ-cmpLit (MachInt       a)   (MachInt        b)   = a `compare` b-cmpLit (MachWord      a)   (MachWord       b)   = a `compare` b-cmpLit (MachInt64     a)   (MachInt64      b)   = a `compare` b-cmpLit (MachWord64    a)   (MachWord64     b)   = a `compare` b-cmpLit (MachFloat     a)   (MachFloat      b)   = a `compare` b-cmpLit (MachDouble    a)   (MachDouble     b)   = a `compare` b+cmpLit (MachChar      a)     (MachChar       b)     = a `compare` b+cmpLit (MachStr       a)     (MachStr        b)     = a `compare` b+cmpLit (MachNullAddr)        (MachNullAddr)         = EQ+cmpLit (MachFloat     a)     (MachFloat      b)     = a `compare` b+cmpLit (MachDouble    a)     (MachDouble     b)     = a `compare` b cmpLit (MachLabel     a _ _) (MachLabel      b _ _) = a `compare` b-cmpLit (LitInteger    a _) (LitInteger     b _) = a `compare` b-cmpLit lit1                lit2                 | litTag lit1 < litTag lit2 = LT-                                                | otherwise                 = GT+cmpLit (LitNumber nt1 a _)   (LitNumber nt2  b _)+  | nt1 == nt2 = a   `compare` b+  | otherwise  = nt1 `compare` nt2+cmpLit lit1 lit2+  | litTag lit1 < litTag lit2 = LT+  | otherwise                 = GT  litTag :: Literal -> Int litTag (MachChar      _)   = 1 litTag (MachStr       _)   = 2 litTag (MachNullAddr)      = 3-litTag (MachInt       _)   = 4-litTag (MachWord      _)   = 5-litTag (MachInt64     _)   = 6-litTag (MachWord64    _)   = 7-litTag (MachFloat     _)   = 8-litTag (MachDouble    _)   = 9-litTag (MachLabel _ _ _)   = 10-litTag (LitInteger  {})    = 11+litTag (MachFloat     _)   = 4+litTag (MachDouble    _)   = 5+litTag (MachLabel _ _ _)   = 6+litTag (LitNumber  {})     = 7  {-         Printing@@ -571,13 +665,16 @@ pprLiteral _       (MachChar c)     = pprPrimChar c pprLiteral _       (MachStr s)      = pprHsBytes s pprLiteral _       (MachNullAddr)   = text "__NULL"-pprLiteral _       (MachInt i)      = pprPrimInt i-pprLiteral _       (MachInt64 i)    = pprPrimInt64 i-pprLiteral _       (MachWord w)     = pprPrimWord w-pprLiteral _       (MachWord64 w)   = pprPrimWord64 w pprLiteral _       (MachFloat f)    = float (fromRat f) <> primFloatSuffix pprLiteral _       (MachDouble d)   = double (fromRat d) <> primDoubleSuffix-pprLiteral add_par (LitInteger i _) = pprIntegerVal add_par i+pprLiteral add_par (LitNumber nt i _)+   = case nt of+       LitNumInteger -> pprIntegerVal add_par i+       LitNumNatural -> pprIntegerVal add_par i+       LitNumInt     -> pprPrimInt i+       LitNumInt64   -> pprPrimInt64 i+       LitNumWord    -> pprPrimWord i+       LitNumWord64  -> pprPrimWord64 i pprLiteral add_par (MachLabel l mb fod) = add_par (text "__label" <+> b <+> ppr fod)     where b = case mb of               Nothing -> pprHsString l
basicTypes/MkId.hs view
@@ -19,17 +19,14 @@          mkPrimOpId, mkFCallId, -        wrapNewTypeBody, unwrapNewTypeBody,-        wrapFamInstBody, unwrapFamInstScrut,-        wrapTypeUnbranchedFamInstBody, unwrapTypeUnbranchedFamInstScrut,-+        unwrapNewTypeBody, wrapFamInstBody,         DataConBoxer(..), mkDataConRep, mkDataConWorkId,          -- And some particular Ids; see below for why they are wired in         wiredInIds, ghcPrimIds,         unsafeCoerceName, unsafeCoerceId, realWorldPrimId,         voidPrimId, voidArgId,-        nullAddrId, seqId, lazyId, lazyIdKey, runRWId,+        nullAddrId, seqId, lazyId, lazyIdKey,         coercionTokenId, magicDictId, coerceId,         proxyHashId, noinlineId, noinlineIdName, @@ -54,7 +51,6 @@ import CoreUnfold import Literal import TyCon-import CoAxiom import Class import NameSet import Name@@ -88,59 +84,75 @@  Note [Wired-in Ids] ~~~~~~~~~~~~~~~~~~~+A "wired-in" Id can be referred to directly in GHC (e.g. 'voidPrimId')+rather than by looking it up its name in some environment or fetching+it from an interface file.+ There are several reasons why an Id might appear in the wiredInIds: -(1) The ghcPrimIds are wired in because they can't be defined in-    Haskell at all, although the can be defined in Core.  They have-    compulsory unfoldings, so they are always inlined and they  have-    no definition site.  Their home module is GHC.Prim, so they-    also have a description in primops.txt.pp, where they are called-    'pseudoops'.+* ghcPrimIds: see Note [ghcPrimIds (aka pseudoops)] -(2) The 'error' function, eRROR_ID, is wired in because we don't yet have-    a way to express in an interface file that the result type variable-    is 'open'; that is can be unified with an unboxed type+* magicIds: see Note [magicIds] -    [The interface file format now carry such information, but there's-    no way yet of expressing at the definition site for these-    error-reporting functions that they have an 'open'-    result type. -- sof 1/99]+* errorIds, defined in coreSyn/MkCore.hs.+  These error functions (e.g. rUNTIME_ERROR_ID) are wired in+  because the desugarer generates code that mentions them directly -(3) Other error functions (rUNTIME_ERROR_ID) are wired in (a) because-    the desugarer generates code that mentions them directly, and-    (b) for the same reason as eRROR_ID+In all cases except ghcPrimIds, there is a definition site in a+library module, which may be called (e.g. in higher order situations);+but the wired-in version means that the details are never read from+that module's interface file; instead, the full definition is right+here. -(4) lazyId is wired in because the wired-in version overrides the-    strictness of the version defined in GHC.Base+Note [ghcPrimIds (aka pseudoops)]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The ghcPrimIds -(5) noinlineId is wired in because when we serialize to interfaces-    we may insert noinline statements.+  * Are exported from GHC.Prim -In cases (2-4), the function has a definition in a library module, and-can be called; but the wired-in version means that the details are-never read from that module's interface file; instead, the full definition-is right here.+  * Can't be defined in Haskell, and hence no Haskell binding site,+    but have perfectly reasonable unfoldings in Core++  * Either have a CompulsoryUnfolding (hence always inlined), or+        of an EvaldUnfolding and void representation (e.g. void#)++  * Are (or should be) defined in primops.txt.pp as 'pseudoop'+    Reason: that's how we generate documentation for them++Note [magicIds]+~~~~~~~~~~~~~~~+The magicIds++  * Are exported from GHC.Magic++  * Can be defined in Haskell (and are, in ghc-prim:GHC/Magic.hs).+    This definition at least generates Haddock documentation for them.++  * May or may not have a CompulsoryUnfolding.++  * But have some special behaviour that can't be done via an+    unfolding from an interface file -}  wiredInIds :: [Id] wiredInIds-  =  [lazyId, dollarId, oneShotId, runRWId, noinlineId]-  ++ errorIds           -- Defined in MkCore+  =  magicIds   ++ ghcPrimIds+  ++ errorIds           -- Defined in MkCore --- These Ids are exported from GHC.Prim-ghcPrimIds :: [Id]+magicIds :: [Id]    -- See Note [magicIds]+magicIds = [lazyId, oneShotId, noinlineId]++ghcPrimIds :: [Id]  -- See Note [ghcPrimIds (aka pseudoops)] ghcPrimIds-  = [   -- These can't be defined in Haskell, but they have-        -- perfectly reasonable unfoldings in Core-    realWorldPrimId,-    voidPrimId,-    unsafeCoerceId,-    nullAddrId,-    seqId,-    magicDictId,-    coerceId,-    proxyHashId+  = [ realWorldPrimId+    , voidPrimId+    , unsafeCoerceId+    , nullAddrId+    , seqId+    , magicDictId+    , coerceId+    , proxyHashId     ]  {-@@ -234,6 +246,47 @@         -- Coercion from family type to representation type   Co7T a :: T [a] ~ :R7T a +Newtype instances through an additional wrinkle into the mix. Consider the+following example (adapted from #15318, comment:2):++  data family T a+  newtype instance T [a] = MkT [a]++Within the newtype instance, there are three distinct types at play:++1. The newtype's underlying type, [a].+2. The instance's representation type, TList a (where TList is the+   representation tycon).+3. The family type, T [a].++We need two coercions in order to cast from (1) to (3):++(a) A newtype coercion axiom:++      axiom coTList a :: TList a ~ [a]++    (Where TList is the representation tycon of the newtype instance.)++(b) A data family instance coercion axiom:++      axiom coT a :: T [a] ~ TList a++When we translate the newtype instance to Core, we obtain:++    -- Wrapper+  $WMkT :: forall a. [a] -> T [a]+  $WMkT a x = MkT a x |> Sym (coT a)++    -- Worker+  MkT :: forall a. [a] -> TList [a]+  MkT a x = x |> Sym (coTList a)++Unlike for data instances, the worker for a newtype instance is actually an+executable function which expands to a cast, but otherwise, the general+strategy is essentially the same as for data instances. Also note that we have+a wrapper, which is unusual for a newtype, but we make GHC produce one anyway+for symmetry with the way data instances are handled.+ Note [Newtype datacons] ~~~~~~~~~~~~~~~~~~~~~~~ The "data constructor" for a newtype should always be vanilla.  At one@@ -601,8 +654,8 @@                      -- of some newtypes written with GADT syntax. See below.          && (any isBanged (ev_ibangs ++ arg_ibangs)                      -- Some forcing/unboxing (includes eq_spec)-             || isFamInstTyCon tycon  -- Cast result              || (not $ null eq_spec))) -- GADT+      || isFamInstTyCon tycon -- Cast result       || dataConUserTyVarsArePermuted data_con                      -- If the data type was written with GADT syntax and                      -- orders the type variables differently from what the@@ -839,7 +892,7 @@       -- A recursive newtype might mean that       -- 'arg_ty' is a newtype   , let rep_tys = dataConInstArgTys con tc_args-  = ASSERT( isVanillaDataCon con )+  = ASSERT( null (dataConExTyVars con) )  -- Note [Unpacking GADTs and existentials]     ( rep_tys `zip` dataConRepStrictness con     ,( \ arg_id ->        do { rep_ids <- mapM newLocal rep_tys@@ -863,32 +916,34 @@ -- we encounter on the way, because otherwise we might well -- end up relying on ourselves! isUnpackableType dflags fam_envs ty-  | Just (tc, _) <- splitTyConApp_maybe ty-  , Just con <- tyConSingleAlgDataCon_maybe tc-  , isVanillaDataCon con-  = ok_con_args (unitNameSet (getName tc)) con+  | Just data_con <- unpackable_type ty+  = ok_con_args emptyNameSet data_con   | otherwise   = False   where-    ok_arg tcs (ty, bang) = not (attempt_unpack bang) || ok_ty tcs norm_ty-        where-          norm_ty = topNormaliseType fam_envs ty-    ok_ty tcs ty-      | Just (tc, _) <- splitTyConApp_maybe ty-      , let tc_name = getName tc-      =  not (tc_name `elemNameSet` tcs)-      && case tyConSingleAlgDataCon_maybe tc of-            Just con | isVanillaDataCon con-                    -> ok_con_args (tcs `extendNameSet` getName tc) con-            _ -> True-      | otherwise-      = True+    ok_con_args dcs con+       | dc_name `elemNameSet` dcs+       = False+       | otherwise+       = all (ok_arg dcs')+             (dataConOrigArgTys con `zip` dataConSrcBangs con)+          -- NB: dataConSrcBangs gives the *user* request;+          -- We'd get a black hole if we used dataConImplBangs+       where+         dc_name = getName con+         dcs' = dcs `extendNameSet` dc_name -    ok_con_args tcs con-       = all (ok_arg tcs) (dataConOrigArgTys con `zip` dataConSrcBangs con)-         -- NB: dataConSrcBangs gives the *user* request;-         -- We'd get a black hole if we used dataConImplBangs+    ok_arg dcs (ty, bang)+      = not (attempt_unpack bang) || ok_ty dcs norm_ty+      where+        norm_ty = topNormaliseType fam_envs ty +    ok_ty dcs ty+      | Just data_con <- unpackable_type ty+      = ok_con_args dcs data_con+      | otherwise+      = True        -- NB True here, in contrast to False at top level+     attempt_unpack (HsSrcBang _ SrcUnpack NoSrcStrict)       = xopt LangExt.StrictData dflags     attempt_unpack (HsSrcBang _ SrcUnpack SrcStrict)@@ -899,7 +954,30 @@       = xopt LangExt.StrictData dflags -- Be conservative     attempt_unpack _ = False +    unpackable_type :: Type -> Maybe DataCon+    -- Works just on a single level+    unpackable_type ty+      | Just (tc, _) <- splitTyConApp_maybe ty+      , Just data_con <- tyConSingleAlgDataCon_maybe tc+      , null (dataConExTyVars data_con)  -- See Note [Unpacking GADTs and existentials]+      = Just data_con+      | otherwise+      = Nothing+ {-+Note [Unpacking GADTs and existentials]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There is nothing stopping us unpacking a data type with equality+components, like+  data Equal a b where+    Equal :: Equal a a++And it'd be fine to unpack a product type with existential components+too, but that would require a bit more plumbing, so currently we don't.++So for now we require: null (dataConExTyVars data_con)+See Trac #14978+ Note [Unpack one-wide fields] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The flag UnboxSmallStrictFields ensures that any field that can@@ -971,15 +1049,9 @@ -- -- If a coercion constructor is provided in the newtype, then we use -- it, otherwise the wrap/unwrap are both no-ops------ If the we are dealing with a newtype *instance*, we have a second coercion--- identifying the family instance with the constructor of the newtype--- instance.  This coercion is applied in any case (ie, composed with the--- coercion constructor of the newtype or applied by itself).  wrapNewTypeBody tycon args result_expr   = ASSERT( isNewTyCon tycon )-    wrapFamInstBody tycon args $     mkCast result_expr (mkSymCo co)   where     co = mkUnbranchedAxInstCo Representational (newTyConCo tycon) args []@@ -1006,35 +1078,6 @@   | otherwise   = body --- Same as `wrapFamInstBody`, but for type family instances, which are--- represented by a `CoAxiom`, and not a `TyCon`-wrapTypeFamInstBody :: CoAxiom br -> Int -> [Type] -> [Coercion]-                    -> CoreExpr -> CoreExpr-wrapTypeFamInstBody axiom ind args cos body-  = mkCast body (mkSymCo (mkAxInstCo Representational axiom ind args cos))--wrapTypeUnbranchedFamInstBody :: CoAxiom Unbranched -> [Type] -> [Coercion]-                              -> CoreExpr -> CoreExpr-wrapTypeUnbranchedFamInstBody axiom-  = wrapTypeFamInstBody axiom 0--unwrapFamInstScrut :: TyCon -> [Type] -> CoreExpr -> CoreExpr-unwrapFamInstScrut tycon args scrut-  | Just co_con <- tyConFamilyCoercion_maybe tycon-  = mkCast scrut (mkUnbranchedAxInstCo Representational co_con args []) -- data instances only-  | otherwise-  = scrut--unwrapTypeFamInstScrut :: CoAxiom br -> Int -> [Type] -> [Coercion]-                       -> CoreExpr -> CoreExpr-unwrapTypeFamInstScrut axiom ind args cos scrut-  = mkCast scrut (mkAxInstCo Representational axiom ind args cos)--unwrapTypeUnbranchedFamInstScrut :: CoAxiom Unbranched -> [Type] -> [Coercion]-                                 -> CoreExpr -> CoreExpr-unwrapTypeUnbranchedFamInstScrut axiom-  = unwrapTypeFamInstScrut axiom 0- {- ************************************************************************ *                                                                      *@@ -1158,37 +1201,24 @@ another gun with which to shoot yourself in the foot. -} -lazyIdName, unsafeCoerceName, nullAddrName, seqName,+unsafeCoerceName, nullAddrName, seqName,    realWorldName, voidPrimIdName, coercionTokenName,-   magicDictName, coerceName, proxyName, dollarName, oneShotName,-   runRWName, noinlineIdName :: Name+   magicDictName, coerceName, proxyName :: Name unsafeCoerceName  = mkWiredInIdName gHC_PRIM  (fsLit "unsafeCoerce#")  unsafeCoerceIdKey  unsafeCoerceId nullAddrName      = mkWiredInIdName gHC_PRIM  (fsLit "nullAddr#")      nullAddrIdKey      nullAddrId seqName           = mkWiredInIdName gHC_PRIM  (fsLit "seq")            seqIdKey           seqId realWorldName     = mkWiredInIdName gHC_PRIM  (fsLit "realWorld#")     realWorldPrimIdKey realWorldPrimId voidPrimIdName    = mkWiredInIdName gHC_PRIM  (fsLit "void#")          voidPrimIdKey      voidPrimId-lazyIdName        = mkWiredInIdName gHC_MAGIC (fsLit "lazy")           lazyIdKey          lazyId coercionTokenName = mkWiredInIdName gHC_PRIM  (fsLit "coercionToken#") coercionTokenIdKey coercionTokenId magicDictName     = mkWiredInIdName gHC_PRIM  (fsLit "magicDict")      magicDictKey       magicDictId coerceName        = mkWiredInIdName gHC_PRIM  (fsLit "coerce")         coerceKey          coerceId proxyName         = mkWiredInIdName gHC_PRIM  (fsLit "proxy#")         proxyHashKey       proxyHashId-dollarName        = mkWiredInIdName gHC_BASE  (fsLit "$")              dollarIdKey        dollarId++lazyIdName, oneShotName, noinlineIdName :: Name+lazyIdName        = mkWiredInIdName gHC_MAGIC (fsLit "lazy")           lazyIdKey          lazyId oneShotName       = mkWiredInIdName gHC_MAGIC (fsLit "oneShot")        oneShotKey         oneShotId-runRWName         = mkWiredInIdName gHC_MAGIC (fsLit "runRW#")         runRWKey           runRWId noinlineIdName    = mkWiredInIdName gHC_MAGIC (fsLit "noinline") noinlineIdKey noinlineId -dollarId :: Id  -- Note [dollarId magic]-dollarId = pcMiscPrelId dollarName ty-             (noCafIdInfo `setUnfoldingInfo` unf)-  where-    fun_ty = mkFunTy alphaTy openBetaTy-    ty     = mkSpecForAllTys [runtimeRep2TyVar, alphaTyVar, openBetaTyVar] $-             mkFunTy fun_ty fun_ty-    unf    = mkInlineUnfoldingWithArity 2 rhs-    [f,x]  = mkTemplateLocals [fun_ty, alphaTy]-    rhs    = mkLams [runtimeRep2TyVar, alphaTyVar, openBetaTyVar, f, x] $-             App (Var f) (Var x)- ------------------------------------------------ proxyHashId :: Id proxyHashId@@ -1279,33 +1309,12 @@                           (mkFunTy fun_ty fun_ty)     fun_ty = mkFunTy openAlphaTy openBetaTy     [body, x] = mkTemplateLocals [fun_ty, openAlphaTy]-    x' = setOneShotLambda x+    x' = setOneShotLambda x  -- Here is the magic bit!     rhs = mkLams [ runtimeRep1TyVar, runtimeRep2TyVar                  , openAlphaTyVar, openBetaTyVar                  , body, x'] $           Var body `App` Var x -runRWId :: Id -- See Note [runRW magic] in this module-runRWId = pcMiscPrelId runRWName ty info-  where-    info = noCafIdInfo `setInlinePragInfo` neverInlinePragma-                       `setStrictnessInfo` strict_sig-                       `setArityInfo`      1-    strict_sig = mkClosedStrictSig [strictApply1Dmd] topRes-      -- Important to express its strictness,-      -- since it is not inlined until CorePrep-      -- Also see Note [runRW arg] in CorePrep--    -- State# RealWorld-    stateRW = mkTyConApp statePrimTyCon [realWorldTy]-    -- o-    ret_ty  = openAlphaTy-    -- State# RealWorld -> o-    arg_ty  = stateRW `mkFunTy` ret_ty-    -- (State# RealWorld -> o) -> o-    ty      = mkSpecForAllTys [runtimeRep1TyVar, openAlphaTyVar] $-              arg_ty `mkFunTy` ret_ty- -------------------------------------------------------------------------------- magicDictId :: Id  -- See Note [magicDictId magic] magicDictId = pcMiscPrelId magicDictName ty info@@ -1336,20 +1345,6 @@           [(DataAlt coercibleDataCon, [eq], Cast (Var x) (mkCoVarCo eq))]  {--Note [dollarId magic]-~~~~~~~~~~~~~~~~~~~~~-The only reason that ($) is wired in is so that its type can be-    forall (a:*, b:Open). (a->b) -> a -> b-That is, the return type can be unboxed.  E.g. this is OK-    foo $ True    where  foo :: Bool -> Int#-because ($) doesn't inspect or move the result of the call to foo.-See Trac #8739.--There is a special typing rule for ($) in TcExpr, so the type of ($)-isn't looked at there, BUT Lint subsequently (and rightly) complains-if sees ($) applied to Int# (say), unless we give it a wired-in type-as we do here.- Note [Unsafe coerce magic] ~~~~~~~~~~~~~~~~~~~~~~~~~~ We define a *primitive*@@ -1474,45 +1469,6 @@ want use its fingerprints.  -Note [runRW magic]-~~~~~~~~~~~~~~~~~~-Some definitions, for instance @runST@, must have careful control over float out-of the bindings in their body. Consider this use of @runST@,--    f x = runST ( \ s -> let (a, s')  = newArray# 100 [] s-                             (_, s'') = fill_in_array_or_something a x s'-                         in freezeArray# a s'' )--If we inline @runST@, we'll get:--    f x = let (a, s')  = newArray# 100 [] realWorld#{-NB-}-              (_, s'') = fill_in_array_or_something a x s'-          in freezeArray# a s''--And now if we allow the @newArray#@ binding to float out to become a CAF,-we end up with a result that is totally and utterly wrong:--    f = let (a, s')  = newArray# 100 [] realWorld#{-NB-} -- YIKES!!!-        in \ x ->-            let (_, s'') = fill_in_array_or_something a x s'-            in freezeArray# a s''--All calls to @f@ will share a {\em single} array! Clearly this is nonsense and-must be prevented.--This is what @runRW#@ gives us: by being inlined extremely late in the-optimization (right before lowering to STG, in CorePrep), we can ensure that-no further floating will occur. This allows us to safely inline things like-@runST@, which are otherwise needlessly expensive (see #10678 and #5916).--While the definition of @GHC.Magic.runRW#@, we override its type in @MkId@-to be open-kinded,--    runRW# :: forall (r1 :: RuntimeRep). (o :: TYPE r)-           => (State# RealWorld -> (# State# RealWorld, o #))-                              -> (# State# RealWorld, o #)-- Note [The oneShot function] ~~~~~~~~~~~~~~~~~~~~~~~~~~~ In the context of making left-folds fuse somewhat okish (see ticket #7994@@ -1520,11 +1476,11 @@ if library authors could explicitly tell the compiler that a certain lambda is called at most once. The oneShot function allows that. -'oneShot' is open kinded, i.e. the type variables can refer to unlifted+'oneShot' is levity-polymorphic, i.e. the type variables can refer to unlifted types as well (Trac #10744); e.g.    oneShot (\x:Int# -> x +# 1#) -Like most magic functions it has a compulsary unfolding, so there is no need+Like most magic functions it has a compulsory unfolding, so there is no need for a real definition somewhere. We have one in GHC.Magic for the convenience of putting the documentation there. 
basicTypes/Module.hs view
@@ -78,8 +78,6 @@         baseUnitId,         rtsUnitId,         thUnitId,-        dphSeqUnitId,-        dphParUnitId,         mainUnitId,         thisGhcUnitId,         isHoleModule,@@ -151,13 +149,10 @@ import Data.List import Data.Ord import GHC.PackageDb (BinaryStringRep(..), DbUnitIdModuleRep(..), DbModule(..), DbUnitId(..))+import Fingerprint  import qualified Data.ByteString as BS-import qualified Data.ByteString.Unsafe as BS import qualified Data.ByteString.Char8 as BS.Char8-import System.IO.Unsafe-import Foreign.Ptr (castPtr)-import GHC.Fingerprint import Encoding  import qualified Text.ParserCombinators.ReadP as Parse@@ -551,7 +546,6 @@ data UnitId     = IndefiniteUnitId {-# UNPACK #-} !IndefUnitId     |   DefiniteUnitId {-# UNPACK #-} !DefUnitId-    deriving (Typeable)  unitIdFS :: UnitId -> FastString unitIdFS (IndefiniteUnitId x) = indefUnitIdFS x@@ -589,7 +583,7 @@         -- fully instantiated (free module variables are empty)         -- and whether or not a substitution can have any effect.         indefUnitIdFreeHoles :: UniqDSet ModuleName-    } deriving (Typeable)+    }  instance Eq IndefUnitId where   u1 == u2 = indefUnitIdKey u1 == indefUnitIdKey u2@@ -644,7 +638,7 @@ data IndefModule = IndefModule {         indefModuleUnitId :: IndefUnitId,         indefModuleName   :: ModuleName-    } deriving (Typeable, Eq, Ord)+    } deriving (Eq, Ord)  instance Outputable IndefModule where   ppr (IndefModule uid m) =@@ -672,7 +666,6 @@       -- and the hash.       installedUnitIdFS :: FastString     }-   deriving (Typeable)  instance Binary InstalledUnitId where   put_ bh (InstalledUnitId fs) = put_ bh fs@@ -763,7 +756,7 @@ -- it only refers to a definite library; i.e., one we have generated -- code for. newtype DefUnitId = DefUnitId { unDefUnitId :: InstalledUnitId }-    deriving (Eq, Ord, Typeable)+    deriving (Eq, Ord)  instance Outputable DefUnitId where     ppr (DefUnitId uid) = ppr uid@@ -849,11 +842,6 @@           fastStringToByteString (unitIdFS (moduleUnitId b)), BS.Char8.singleton ':',           toStringRep (moduleName b),   BS.Char8.singleton '\n'] -fingerprintByteString :: BS.ByteString -> Fingerprint-fingerprintByteString bs = unsafePerformIO-                         . BS.unsafeUseAsCStringLen bs-                         $ \(p,l) -> fingerprintData (castPtr p) l- fingerprintUnitId :: BS.ByteString -> Fingerprint -> BS.ByteString fingerprintUnitId prefix (Fingerprint a b)     = BS.concat@@ -1077,8 +1065,7 @@  integerUnitId, primUnitId,   baseUnitId, rtsUnitId,-  thUnitId, dphSeqUnitId, dphParUnitId,-  mainUnitId, thisGhcUnitId, interactiveUnitId  :: UnitId+  thUnitId, mainUnitId, thisGhcUnitId, interactiveUnitId  :: UnitId primUnitId        = fsToUnitId (fsLit "ghc-prim") integerUnitId     = fsToUnitId (fsLit n)   where@@ -1088,8 +1075,6 @@ baseUnitId        = fsToUnitId (fsLit "base") rtsUnitId         = fsToUnitId (fsLit "rts") thUnitId          = fsToUnitId (fsLit "template-haskell")-dphSeqUnitId      = fsToUnitId (fsLit "dph-seq")-dphParUnitId      = fsToUnitId (fsLit "dph-par") thisGhcUnitId     = fsToUnitId (fsLit "ghc") interactiveUnitId = fsToUnitId (fsLit "interactive") @@ -1137,9 +1122,7 @@                        baseUnitId,                        rtsUnitId,                        thUnitId,-                       thisGhcUnitId,-                       dphSeqUnitId,-                       dphParUnitId ]+                       thisGhcUnitId ]  {- ************************************************************************
basicTypes/Name.hs view
@@ -51,7 +51,6 @@         setNameLoc,         tidyNameOcc,         localiseName,-        mkLocalisedOccName,          nameSrcLoc, nameSrcSpan, pprNameDefnLoc, pprDefinedAt, @@ -70,7 +69,7 @@         NamedThing(..),         getSrcLoc, getSrcSpan, getOccString, getOccFS, -        pprInfixName, pprPrefixName, pprModulePrefix,+        pprInfixName, pprPrefixName, pprModulePrefix, pprNameUnqualified,         nameStableString,          -- Re-export the OccName stuff@@ -80,7 +79,6 @@ import GhcPrelude  import {-# SOURCE #-} TyCoRep( TyThing )-import {-# SOURCE #-} PrelNames( starKindTyConKey, unicodeStarKindTyConKey )  import OccName import Module@@ -117,6 +115,7 @@ -- (and real!) space leaks, due to the fact that we don't look at -- the SrcLoc in a Name all that often. +-- See Note [About the NameSorts] data NameSort   = External Module @@ -153,7 +152,7 @@ data BuiltInSyntax = BuiltInSyntax | UserSyntax  {--Notes about the NameSorts:+Note [About the NameSorts]  1.  Initially, top-level Ids (including locally-defined ones) get External names,     and all other local Ids get Internal names@@ -194,7 +193,7 @@  nameUnique              :: Name -> Unique nameOccName             :: Name -> OccName-nameModule              :: Name -> Module+nameModule              :: HasDebugCallStack => Name -> Module nameSrcLoc              :: Name -> SrcLoc nameSrcSpan             :: Name -> SrcSpan @@ -262,7 +261,7 @@ --                 you can find details (type, fixity, instances) in the --                     TcGblEnv or TcLclEnv ----- The isInteractiveModule part is because successive interactions of a GCHi session+-- The isInteractiveModule part is because successive interactions of a GHCi session -- each give rise to a fresh module (Ghci1, Ghci2, etc), but they all come -- from the magic 'interactive' package; and all the details are kept in the -- TcLclEnv, TcGblEnv, NOT in the HPT or EPT.@@ -295,7 +294,7 @@     this_pkg = moduleUnitId this_mod  -- | Returns True if the Name comes from some other package: neither this--- pacakge nor the interactive package.+-- package nor the interactive package. nameIsFromExternalPackage :: UnitId -> Name -> Bool nameIsFromExternalPackage this_pkg name   | Just mod <- nameModule_maybe name@@ -414,18 +413,6 @@ localiseName :: Name -> Name localiseName n = n { n_sort = Internal } --- |Create a localised variant of a name.------ If the name is external, encode the original's module name to disambiguate.--- SPJ says: this looks like a rather odd-looking function; but it seems to---           be used only during vectorisation, so I'm not going to worry-mkLocalisedOccName :: Module -> (Maybe String -> OccName -> OccName) -> Name -> OccName-mkLocalisedOccName this_mod mk_occ name = mk_occ origin (nameOccName name)-  where-    origin-      | nameIsLocalOrFrom this_mod name = Nothing-      | otherwise                       = Just (moduleNameColons . moduleName . nameModule $ name)- {- ************************************************************************ *                                                                      *@@ -467,10 +454,18 @@ ************************************************************************ -} +-- | The same comments as for `Name`'s `Ord` instance apply. instance Eq Name where     a == b = case (a `compare` b) of { EQ -> True;  _ -> False }     a /= b = case (a `compare` b) of { EQ -> False; _ -> True } +-- | __Caution__: This instance is implemented via `nonDetCmpUnique`, which+-- means that the ordering is not stable across deserialization or rebuilds.+--+-- See `nonDetCmpUnique` for further information, and trac #15240 for a bug+-- caused by improper use of this instance.++-- For a deterministic lexicographic ordering, use `stableNameCmp`. instance Ord Name 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 }@@ -535,6 +530,10 @@       System                  -> pprSystem sty uniq occ       Internal                -> pprInternal sty uniq occ +-- | Print the string of Name unqualifiedly directly.+pprNameUnqualified :: Name -> SDoc+pprNameUnqualified Name { n_occ = occ } = ppr_occ_name occ+ pprExternal :: PprStyle -> Unique -> Module -> OccName -> Bool -> BuiltInSyntax -> SDoc pprExternal sty uniq mod occ is_wired is_builtin   | codeStyle sty = ppr mod <> char '_' <> ppr_z_occ_name occ@@ -688,24 +687,6 @@ pprInfixName  n = pprInfixVar (isSymOcc (getOccName n)) (ppr n)  pprPrefixName :: NamedThing a => a -> SDoc-pprPrefixName thing- | name `hasKey` starKindTyConKey || name `hasKey` unicodeStarKindTyConKey- = ppr name   -- See Note [Special treatment for kind *]- | otherwise- = pprPrefixVar (isSymOcc (nameOccName name)) (ppr name)+pprPrefixName thing = pprPrefixVar (isSymOcc (nameOccName name)) (ppr name)  where    name = getName thing--{--Note [Special treatment for kind *]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Do not put parens around the kind '*'.  Even though it looks like-an operator, it is really a special case.--This pprPrefixName stuff is really only used when printing HsSyn,-which has to be polymorphic in the name type, and hence has to go via-the overloaded function pprPrefixOcc.  It's easier where we know the-type being pretty printed; eg the pretty-printing code in TyCoRep.--See Trac #7645, which led to this.--}
basicTypes/OccName.hs view
@@ -67,11 +67,6 @@         mkSuperDictSelOcc, mkSuperDictAuxOcc,         mkLocalOcc, mkMethodOcc, mkInstTyTcOcc,         mkInstTyCoOcc, mkEqPredCoOcc,-        mkVectOcc, mkVectTyConOcc, mkVectDataConOcc, mkVectIsoOcc,-        mkPDataTyConOcc,  mkPDataDataConOcc,-        mkPDatasTyConOcc, mkPDatasDataConOcc,-        mkPReprTyConOcc,-        mkPADFunOcc,         mkRecFldSelOcc,         mkTyConRepOcc, @@ -655,38 +650,12 @@ mkGenR   = mk_simple_deriv tcName "Rep_" mkGen1R  = mk_simple_deriv tcName "Rep1_" --- Vectorisation-mkVectOcc, mkVectTyConOcc, mkVectDataConOcc, mkVectIsoOcc,- mkPADFunOcc,      mkPReprTyConOcc,- mkPDataTyConOcc,  mkPDataDataConOcc,- mkPDatasTyConOcc, mkPDatasDataConOcc-  :: Maybe String -> OccName -> OccName-mkVectOcc          = mk_simple_deriv_with varName  "$v"-mkVectTyConOcc     = mk_simple_deriv_with tcName   "V:"-mkVectDataConOcc   = mk_simple_deriv_with dataName "VD:"-mkVectIsoOcc       = mk_simple_deriv_with varName  "$vi"-mkPADFunOcc        = mk_simple_deriv_with varName  "$pa"-mkPReprTyConOcc    = mk_simple_deriv_with tcName   "VR:"-mkPDataTyConOcc    = mk_simple_deriv_with tcName   "VP:"-mkPDatasTyConOcc   = mk_simple_deriv_with tcName   "VPs:"-mkPDataDataConOcc  = mk_simple_deriv_with dataName "VPD:"-mkPDatasDataConOcc = mk_simple_deriv_with dataName "VPDs:"- -- Overloaded record field selectors mkRecFldSelOcc :: String -> OccName mkRecFldSelOcc s = mk_deriv varName "$sel" [fsLit s]  mk_simple_deriv :: NameSpace -> FastString -> OccName -> OccName mk_simple_deriv sp px occ = mk_deriv sp px [occNameFS occ]--mk_simple_deriv_with :: NameSpace     -- ^ the namespace-                     -> FastString    -- ^ an identifying prefix-                     -> Maybe String  -- ^ another optional prefix-                     -> OccName       -- ^ the 'OccName' to derive from-                     -> OccName-mk_simple_deriv_with sp px Nothing     occ = mk_deriv sp px [occNameFS occ]-mk_simple_deriv_with sp px (Just with) occ =-    mk_deriv sp px [fsLit with, fsLit "_", occNameFS occ]  -- Data constructor workers are made by setting the name space -- of the data constructor OccName (which should be a DataName)
basicTypes/PatSyn.hs view
@@ -162,7 +162,7 @@    f :: T p q -> String    f (P x) = "urk" -This is differnet to the situation with GADTs:+This is different to the situation with GADTs:     data S a where      MkS :: Int -> S Bool@@ -285,7 +285,7 @@ Note [Pattern synonyms and the data type Type] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The type of a pattern synonym is of the form (See Note-[Pattern synonym signatures]):+[Pattern synonym signatures] in TcSigs):      forall univ_tvs. req => forall ex_tvs. prov => ... 
basicTypes/RdrName.hs view
@@ -34,8 +34,7 @@         -- ** Destruction         rdrNameOcc, rdrNameSpace, demoteRdrName,         isRdrDataCon, isRdrTyVar, isRdrTc, isQual, isQual_maybe, isUnqual,-        isOrig, isOrig_maybe, isExact, isExact_maybe, isSrcRdrName, isStar,-        isUniStar,+        isOrig, isOrig_maybe, isExact, isExact_maybe, isSrcRdrName,          -- * Local mapping of 'RdrName' to 'Name.Name'         LocalRdrEnv, emptyLocalRdrEnv, extendLocalRdrEnv, extendLocalRdrEnvList,@@ -48,6 +47,7 @@         lookupGlobalRdrEnv, extendGlobalRdrEnv, greOccName, shadowNames,         pprGlobalRdrEnv, globalRdrEnvElts,         lookupGRE_RdrName, lookupGRE_Name, lookupGRE_FieldLabel,+        lookupGRE_Name_OccName,         getGRE_NameQualifier_maybes,         transformGREs, pickGREs, pickGREsModExp, @@ -62,7 +62,10 @@         pprNameProvenance,         Parent(..),         ImportSpec(..), ImpDeclSpec(..), ImpItemSpec(..),-        importSpecLoc, importSpecModule, isExplicitItem, bestImport+        importSpecLoc, importSpecModule, isExplicitItem, bestImport,++        -- * Utils for StarIsType+        starInfo   ) where  #include "HsVersions.h"@@ -111,7 +114,7 @@ --           'ApiAnnotation.AnnOpen'  @'('@ or @'['@ or @'[:'@, --           'ApiAnnotation.AnnClose' @')'@ or @']'@ or @':]'@,, --           'ApiAnnotation.AnnBackquote' @'`'@,---           'ApiAnnotation.AnnVal','ApiAnnotation.AnnTildehsh',+--           'ApiAnnotation.AnnVal' --           'ApiAnnotation.AnnTilde',  -- For details on above see note [Api annotations] in ApiAnnotation@@ -261,10 +264,6 @@ isExact_maybe (Exact n) = Just n isExact_maybe _         = Nothing -isStar, isUniStar :: RdrName -> Bool-isStar     = (fsLit "*" ==) . occNameFS . rdrNameOcc-isUniStar = (fsLit "★" ==) . occNameFS . rdrNameOcc- {- ************************************************************************ *                                                                      *@@ -473,7 +472,7 @@             | ParentIs  { par_is :: Name }             | FldParent { par_is :: Name, par_lbl :: Maybe FieldLabelString }               -- ^ See Note [Parents for record fields]-            deriving (Eq, Data, Typeable)+            deriving (Eq, Data)  instance Outputable Parent where    ppr NoParent        = empty@@ -888,13 +887,13 @@    gre1:   gre_lcl = True,  gre_imp = []    gre2:   gre_lcl = False, gre_imp = [ imported from Bar ] -Now the the "ambiguous occurrence" message can correctly report how the+Now the "ambiguous occurrence" message can correctly report how the ambiguity arises. -}  pickGREs :: RdrName -> [GlobalRdrElt] -> [GlobalRdrElt] -- ^ Takes a list of GREs which have the right OccName 'x'--- Pick those GREs that are are in scope+-- Pick those GREs that are in scope --    * Qualified,   as 'M.x'  if want_qual    is Qual M _ --    * Unqualified, as 'x'    if want_unqual  is Unqual _ --@@ -1040,7 +1039,7 @@     hence the `mk_fake-imp_spec` in `shadowName`.  See also Note     [Interactively-bound Ids in GHCi] in HscTypes -  - Data types also have Extenal Names, like Ghci4.T; but we still want+  - Data types also have External Names, like Ghci4.T; but we still want     'T' to mean the newly-declared 'T', not an old one.  * Nested Template Haskell declaration brackets@@ -1276,3 +1275,80 @@ pprLoc :: SrcSpan -> SDoc pprLoc (RealSrcSpan s)    = text "at" <+> ppr s pprLoc (UnhelpfulSpan {}) = empty++-- | Display info about the treatment of '*' under NoStarIsType.+--+-- With StarIsType, three properties of '*' hold:+--+--   (a) it is not an infix operator+--   (b) it is always in scope+--   (c) it is a synonym for Data.Kind.Type+--+-- However, the user might not know that he's working on a module with+-- NoStarIsType and write code that still assumes (a), (b), and (c), which+-- actually do not hold in that module.+--+-- Violation of (a) shows up in the parser. For instance, in the following+-- examples, we have '*' not applied to enough arguments:+--+--   data A :: *+--   data F :: * -> *+--+-- Violation of (b) or (c) show up in the renamer and the typechecker+-- respectively. For instance:+--+--   type K = Either * Bool+--+-- This will parse differently depending on whether StarIsType is enabled,+-- but it will parse nonetheless. With NoStarIsType it is parsed as a type+-- operator, thus we have ((*) Either Bool). Now there are two cases to+-- consider:+--+--   1. There is no definition of (*) in scope. In this case the renamer will+--      fail to look it up. This is a violation of assumption (b).+--+--   2. There is a definition of the (*) type operator in scope (for example+--      coming from GHC.TypeNats). In this case the user will get a kind+--      mismatch error. This is a violation of assumption (c).+--+-- The user might unknowingly be working on a module with NoStarIsType+-- or use '*' as 'Data.Kind.Type' out of habit. So it is important to give a+-- hint whenever an assumption about '*' is violated. Unfortunately, it is+-- somewhat difficult to deal with (c), so we limit ourselves to (a) and (b).+--+-- 'starInfo' generates an appropriate hint to the user depending on the+-- extensions enabled in the module and the name that triggered the error.+-- That is, if we have NoStarIsType and the error is related to '*' or its+-- Unicode variant, the resulting SDoc will contain a helpful suggestion.+-- Otherwise it is empty.+--+starInfo :: Bool -> RdrName -> SDoc+starInfo star_is_type rdr_name =+  -- One might ask: if can use sdocWithDynFlags here, why bother to take+  -- star_is_type as input? Why not refactor?+  --+  -- The reason is that sdocWithDynFlags would provide DynFlags that are active+  -- in the module that tries to load the problematic definition, not+  -- in the module that is being loaded.+  --+  -- So if we have 'data T :: *' in a module with NoStarIsType, then the hint+  -- must be displayed even if we load this definition from a module (or GHCi)+  -- with StarIsType enabled!+  --+  if isUnqualStar && not star_is_type+     then text "With NoStarIsType, " <>+          quotes (ppr rdr_name) <>+          text " is treated as a regular type operator. "+        $$+          text "Did you mean to use " <> quotes (text "Type") <>+          text " from Data.Kind instead?"+      else empty+  where+    -- Does rdr_name look like the user might have meant the '*' kind by it?+    -- We focus on unqualified stars specifically, because qualified stars are+    -- treated as type operators even under StarIsType.+    isUnqualStar+      | Unqual occName <- rdr_name+      = let fs = occNameFS occName+        in fs == fsLit "*" || fs == fsLit "★"+      | otherwise = False
basicTypes/SrcLoc.hs view
@@ -307,12 +307,14 @@     = RealSrcSpan (mkRealSrcSpan loc1 loc2)  -- | Combines two 'SrcSpan' into one that spans at least all the characters--- within both spans. Assumes the "file" part is the same in both inputs+-- within both spans. Returns UnhelpfulSpan if the files differ. combineSrcSpans :: SrcSpan -> SrcSpan -> SrcSpan combineSrcSpans (UnhelpfulSpan _) r = r -- this seems more useful combineSrcSpans l (UnhelpfulSpan _) = l combineSrcSpans (RealSrcSpan span1) (RealSrcSpan span2)-    = RealSrcSpan (combineRealSrcSpans span1 span2)+  | srcSpanFile span1 == srcSpanFile span2+      = RealSrcSpan (combineRealSrcSpans span1 span2)+  | otherwise = UnhelpfulSpan (fsLit "<combineSrcSpans: files differ>")  -- | Combines two 'SrcSpan' into one that spans at least all the characters -- within both spans. Assumes the "file" part is the same in both inputs@@ -333,6 +335,7 @@   where     loc1@(SrcLoc f l c) = realSrcSpanStart span     loc2 = SrcLoc f l (c+1)+ {- ************************************************************************ *                                                                      *@@ -511,8 +514,8 @@ data GenLocated l e = L l e   deriving (Eq, Ord, Data, Functor, Foldable, Traversable) -type Located e = GenLocated SrcSpan e-type RealLocated e = GenLocated RealSrcSpan e+type Located = GenLocated SrcSpan+type RealLocated = GenLocated RealSrcSpan  unLoc :: GenLocated l e -> e unLoc (L _ e) = e
basicTypes/UniqSupply.hs view
@@ -32,6 +32,7 @@ import GhcPrelude  import Unique+import Panic (panic)  import GHC.IO @@ -39,6 +40,7 @@ import Control.Monad import Data.Bits import Data.Char+import Control.Monad.Fail  #include "Unique.h" @@ -146,6 +148,10 @@                             (# ff, us' #)  -> case x us' of                               (# xx, us'' #) -> (# ff xx, us'' #)     (*>) = thenUs_++-- TODO: try to get rid of this instance+instance MonadFail UniqSM where+    fail = panic  -- | Run the 'UniqSM' action, returning the final 'UniqSupply' initUs :: UniqSupply -> UniqSM a -> (a, UniqSupply)
basicTypes/Unique.hs view
@@ -32,6 +32,7 @@         mkUniqueGrimily,                -- Used in UniqSupply only!         getKey,                         -- Used in Var, UniqFM, Name only!         mkUnique, unpkUnique,           -- Used in BinIface only+        eqUnique, ltUnique,          deriveUnique,                   -- Ditto         newTagUnique,                   -- Used in CgCase@@ -48,7 +49,7 @@         mkPrimOpIdUnique,         mkPreludeMiscIdUnique, mkPreludeDataConUnique,         mkPreludeTyConUnique, mkPreludeClassUnique,-        mkPArrDataConUnique, mkCoVarUnique,+        mkCoVarUnique,          mkVarOccUnique, mkDataOccUnique, mkTvOccUnique, mkTcOccUnique,         mkRegSingleUnique, mkRegPairUnique, mkRegClassUnique, mkRegSubUnique,@@ -63,7 +64,7 @@         -- *** From TyCon name uniques         tyConRepNameUnique,         -- *** From DataCon name uniques-        dataConWorkerUnique, dataConRepNameUnique+        dataConWorkerUnique, dataConTyRepNameUnique     ) where  #include "HsVersions.h"@@ -240,6 +241,9 @@ eqUnique :: Unique -> Unique -> Bool eqUnique (MkUnique u1) (MkUnique u2) = u1 == u2 +ltUnique :: Unique -> Unique -> Bool+ltUnique (MkUnique u1) (MkUnique u2) = u1 < u2+ -- Provided here to make it explicit at the call-site that it can -- introduce non-determinism. -- See Note [Unique Determinism]@@ -365,7 +369,6 @@ mkPreludeDataConUnique :: Arity -> Unique mkPrimOpIdUnique       :: Int -> Unique mkPreludeMiscIdUnique  :: Int -> Unique-mkPArrDataConUnique    :: Int -> Unique mkCoVarUnique          :: Int -> Unique  mkAlphaTyVarUnique   i = mkUnique '1' i@@ -397,16 +400,13 @@ mkPreludeDataConUnique i              = mkUnique '6' (3*i)    -- Must be alphabetic  ---------------------------------------------------dataConRepNameUnique, dataConWorkerUnique :: Unique -> Unique+dataConTyRepNameUnique, dataConWorkerUnique :: Unique -> Unique dataConWorkerUnique  u = incrUnique u-dataConRepNameUnique u = stepUnique u 2+dataConTyRepNameUnique u = stepUnique u 2  -------------------------------------------------- mkPrimOpIdUnique op         = mkUnique '9' op mkPreludeMiscIdUnique  i    = mkUnique '0' i---- No numbers left anymore, so I pick something different for the character tag-mkPArrDataConUnique a           = mkUnique ':' (2*a)  -- The "tyvar uniques" print specially nicely: a, b, c, etc. -- See pprUnique for details
basicTypes/Var.hs view
@@ -35,7 +35,7 @@ module Var (         -- * The main data type and synonyms         Var, CoVar, Id, NcId, DictId, DFunId, EvVar, EqVar, EvId, IpId, JoinId,-        TyVar, TypeVar, KindVar, TKVar, TyCoVar,+        TyVar, TcTyVar, TypeVar, KindVar, TKVar, TyCoVar,          -- * In and Out variants         InVar,  InCoVar,  InId,  InTyVar,@@ -128,6 +128,9 @@ -- | Type or Kind Variable type TKVar   = Var     -- Type *or* kind variable (historical) +-- | Type variable that might be a metavariable+type TcTyVar = Var+ -- | Type Variable type TypeVar = Var     -- Definitely a type variable @@ -378,8 +381,9 @@ -- permitted by request ('Specified') (visible type application), or -- prohibited entirely from appearing in source Haskell ('Inferred')? -- See Note [TyVarBndrs, TyVarBinders, TyConBinders, and visibility] in TyCoRep-data ArgFlag = Required | Specified | Inferred-  deriving (Eq, Data)+data ArgFlag = Inferred | Specified | Required+  deriving (Eq, Ord, Data)+  -- (<) on ArgFlag meant "is less visible than"  -- | Does this 'ArgFlag' classify an argument that is written in Haskell? isVisibleArgFlag :: ArgFlag -> Bool
cmm/Bitmap.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, BangPatterns #-}+{-# LANGUAGE BangPatterns #-}  -- -- (c) The University of Glasgow 2003-2006@@ -14,9 +14,6 @@         mAX_SMALL_BITMAP_SIZE,         seqBitmap,   ) where--#include "HsVersions.h"-#include "MachDeps.h"  import GhcPrelude 
cmm/BlockId.hs view
@@ -16,8 +16,7 @@ import Unique import UniqSupply -import Hoopl.Label (Label, uniqueToLbl)-import Hoopl.Unique (intToUnique)+import Hoopl.Label (Label, mkHooplLabel)  ---------------------------------------------------------------- --- Block Ids, their environments, and their sets@@ -34,7 +33,7 @@ type BlockId = Label  mkBlockId :: Unique -> BlockId-mkBlockId unique = uniqueToLbl $ intToUnique $ getKey unique+mkBlockId unique = mkHooplLabel $ getKey unique  newBlockId :: MonadUnique m => m BlockId newBlockId = mkBlockId <$> getUniqueM
cmm/CLabel.hs view
@@ -14,12 +14,11 @@         pprDebugCLabel,          mkClosureLabel,-        mkTopSRTLabel,+        mkSRTLabel,         mkInfoTableLabel,         mkEntryLabel,         mkRednCountsLabel,         mkConInfoTableLabel,-        mkLargeSRTLabel,         mkApEntryLabel,         mkApInfoTableLabel,         mkClosureTableLabel,@@ -46,14 +45,15 @@         mkBHUpdInfoLabel,         mkIndStaticInfoLabel,         mkMainCapabilityLabel,-        mkMAP_FROZEN_infoLabel,-        mkMAP_FROZEN0_infoLabel,+        mkMAP_FROZEN_CLEAN_infoLabel,+        mkMAP_FROZEN_DIRTY_infoLabel,         mkMAP_DIRTY_infoLabel,-        mkSMAP_FROZEN_infoLabel,-        mkSMAP_FROZEN0_infoLabel,+        mkSMAP_FROZEN_CLEAN_infoLabel,+        mkSMAP_FROZEN_DIRTY_infoLabel,         mkSMAP_DIRTY_infoLabel,         mkBadAlignmentLabel,         mkArrWords_infoLabel,+        mkSRTInfoLabel,          mkTopTickyCtrLabel,         mkCAFBlackHoleInfoTableLabel,@@ -94,10 +94,12 @@          mkHpcTicksLabel, +        -- * Predicates         hasCAF,         needsCDecl, maybeLocalBlockLabel, externallyVisibleCLabel,         isMathFun,         isCFunctionLabel, isGcPtrLabel, labelDynamic,+        isLocalCLabel,          -- * Conversions         toClosureLbl, toSlowEntryLbl, toEntryLbl, toInfoLbl, hasHaskellName,@@ -250,10 +252,7 @@   | HpcTicksLabel Module    -- | Static reference table-  | SRTLabel !Unique--  -- | Label of an StgLargeSRT-  | LargeSRTLabel+  | SRTLabel         {-# UNPACK #-} !Unique    -- | A bitmap (function or case return)@@ -303,8 +302,6 @@     compare a1 a2   compare (SRTLabel u1) (SRTLabel u2) =     nonDetCmpUnique u1 u2-  compare (LargeSRTLabel u1) (LargeSRTLabel u2) =-    nonDetCmpUnique u1 u2   compare (LargeBitmapLabel u1) (LargeBitmapLabel u2) =     nonDetCmpUnique u1 u2   compare IdLabel{} _ = LT@@ -337,8 +334,6 @@   compare _ HpcTicksLabel{} = GT   compare SRTLabel{} _ = LT   compare _ SRTLabel{} = GT-  compare LargeSRTLabel{} _ = LT-  compare _ LargeSRTLabel{} = GT  -- | Record where a foreign label is stored. data ForeignLabelSource@@ -387,9 +382,6 @@  data IdLabelInfo   = Closure             -- ^ Label for closure-  | SRT                 -- ^ Static reference table (TODO: could be removed-                        -- with the old code generator, but might be needed-                        -- when we implement the New SRT Plan)   | InfoTable           -- ^ Info tables for closures; always read-only   | Entry               -- ^ Entry point   | Slow                -- ^ Slow entry point@@ -459,8 +451,8 @@ -- Constructing IdLabels -- These are always local: -mkTopSRTLabel     :: Unique -> CLabel-mkTopSRTLabel u = SRTLabel u+mkSRTLabel     :: Unique -> CLabel+mkSRTLabel u = SRTLabel u  mkRednCountsLabel :: Name -> CLabel mkRednCountsLabel       name    =@@ -494,11 +486,12 @@ -- Constructing Cmm Labels mkDirty_MUT_VAR_Label, mkSplitMarkerLabel, mkUpdInfoLabel,     mkBHUpdInfoLabel, mkIndStaticInfoLabel, mkMainCapabilityLabel,-    mkMAP_FROZEN_infoLabel, mkMAP_FROZEN0_infoLabel, mkMAP_DIRTY_infoLabel,+    mkMAP_FROZEN_CLEAN_infoLabel, mkMAP_FROZEN_DIRTY_infoLabel,+    mkMAP_DIRTY_infoLabel,     mkArrWords_infoLabel,     mkTopTickyCtrLabel,     mkCAFBlackHoleInfoTableLabel,-    mkSMAP_FROZEN_infoLabel, mkSMAP_FROZEN0_infoLabel,+    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@@ -506,17 +499,40 @@ mkBHUpdInfoLabel                = CmmLabel rtsUnitId (fsLit "stg_bh_upd_frame" )     CmmInfo mkIndStaticInfoLabel            = CmmLabel rtsUnitId (fsLit "stg_IND_STATIC")        CmmInfo mkMainCapabilityLabel           = CmmLabel rtsUnitId (fsLit "MainCapability")        CmmData-mkMAP_FROZEN_infoLabel          = CmmLabel rtsUnitId (fsLit "stg_MUT_ARR_PTRS_FROZEN") CmmInfo-mkMAP_FROZEN0_infoLabel         = CmmLabel rtsUnitId (fsLit "stg_MUT_ARR_PTRS_FROZEN0") CmmInfo+mkMAP_FROZEN_CLEAN_infoLabel    = CmmLabel rtsUnitId (fsLit "stg_MUT_ARR_PTRS_FROZEN_CLEAN") CmmInfo+mkMAP_FROZEN_DIRTY_infoLabel    = CmmLabel rtsUnitId (fsLit "stg_MUT_ARR_PTRS_FROZEN_DIRTY") CmmInfo mkMAP_DIRTY_infoLabel           = CmmLabel rtsUnitId (fsLit "stg_MUT_ARR_PTRS_DIRTY") CmmInfo mkTopTickyCtrLabel              = CmmLabel rtsUnitId (fsLit "top_ct")                CmmData mkCAFBlackHoleInfoTableLabel    = CmmLabel rtsUnitId (fsLit "stg_CAF_BLACKHOLE")     CmmInfo mkArrWords_infoLabel            = CmmLabel rtsUnitId (fsLit "stg_ARR_WORDS")         CmmInfo-mkSMAP_FROZEN_infoLabel         = CmmLabel rtsUnitId (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN") CmmInfo-mkSMAP_FROZEN0_infoLabel        = CmmLabel rtsUnitId (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN0") CmmInfo+mkSMAP_FROZEN_CLEAN_infoLabel   = CmmLabel rtsUnitId (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN") CmmInfo+mkSMAP_FROZEN_DIRTY_infoLabel   = CmmLabel rtsUnitId (fsLit "stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY") CmmInfo mkSMAP_DIRTY_infoLabel          = CmmLabel rtsUnitId (fsLit "stg_SMALL_MUT_ARR_PTRS_DIRTY") CmmInfo mkBadAlignmentLabel             = CmmLabel rtsUnitId (fsLit "stg_badAlignment")      CmmEntry +mkSRTInfoLabel :: Int -> CLabel+mkSRTInfoLabel n = CmmLabel rtsUnitId lbl CmmInfo+ where+   lbl =+     case n of+       1 -> fsLit "stg_SRT_1"+       2 -> fsLit "stg_SRT_2"+       3 -> fsLit "stg_SRT_3"+       4 -> fsLit "stg_SRT_4"+       5 -> fsLit "stg_SRT_5"+       6 -> fsLit "stg_SRT_6"+       7 -> fsLit "stg_SRT_7"+       8 -> fsLit "stg_SRT_8"+       9 -> fsLit "stg_SRT_9"+       10 -> fsLit "stg_SRT_10"+       11 -> fsLit "stg_SRT_11"+       12 -> fsLit "stg_SRT_12"+       13 -> fsLit "stg_SRT_13"+       14 -> fsLit "stg_SRT_14"+       15 -> fsLit "stg_SRT_15"+       16 -> fsLit "stg_SRT_16"+       _ -> panic "mkSRTInfoLabel"+ ----- mkCmmInfoLabel,   mkCmmEntryLabel, mkCmmRetInfoLabel, mkCmmRetLabel,   mkCmmCodeLabel, mkCmmDataLabel,  mkCmmClosureLabel@@ -601,9 +617,6 @@ isSomeRODataLabel (IdLabel _ _ InfoTable) = True isSomeRODataLabel (IdLabel _ _ LocalInfoTable) = True isSomeRODataLabel (IdLabel _ _ BlockInfoTable) = True--- static reference tables defined in haskell (.hs)-isSomeRODataLabel (IdLabel _ _ SRT) = True-isSomeRODataLabel (SRTLabel _) = True -- info table defined in cmm (.cmm) isSomeRODataLabel (CmmLabel _ _ CmmInfo) = True isSomeRODataLabel _lbl = False@@ -615,9 +628,7 @@   -- Constructing Large*Labels-mkLargeSRTLabel :: Unique -> CLabel mkBitmapLabel   :: Unique -> CLabel-mkLargeSRTLabel uniq            = LargeSRTLabel uniq mkBitmapLabel   uniq            = LargeBitmapLabel uniq  -- Constructing Cost Center Labels@@ -675,8 +686,6 @@ -- Convert between different kinds of label  toClosureLbl :: CLabel -> CLabel-toClosureLbl (IdLabel n _ BlockInfoTable)-  = pprPanic "toClosureLbl: BlockInfoTable" (ppr n) toClosureLbl (IdLabel n c _) = IdLabel n c Closure toClosureLbl (CmmLabel m str _) = CmmLabel m str CmmClosure toClosureLbl l = pprPanic "toClosureLbl" (ppr l)@@ -745,7 +754,6 @@   -- don't bother declaring Bitmap labels, we always make sure   -- they are defined before use. needsCDecl (SRTLabel _)                 = True-needsCDecl (LargeSRTLabel _)            = False needsCDecl (LargeBitmapLabel _)         = False needsCDecl (IdLabel _ _ _)              = True needsCDecl (LocalBlockLabel _)          = True@@ -892,12 +900,10 @@ externallyVisibleCLabel (HpcTicksLabel _)       = True externallyVisibleCLabel (LargeBitmapLabel _)    = False externallyVisibleCLabel (SRTLabel _)            = False-externallyVisibleCLabel (LargeSRTLabel _)       = False externallyVisibleCLabel (PicBaseLabel {}) = panic "externallyVisibleCLabel PicBaseLabel" externallyVisibleCLabel (DeadStripPreventer {}) = panic "externallyVisibleCLabel DeadStripPreventer"  externallyVisibleIdLabel :: IdLabelInfo -> Bool-externallyVisibleIdLabel SRT             = False externallyVisibleIdLabel LocalInfoTable  = False externallyVisibleIdLabel LocalEntry      = False externallyVisibleIdLabel BlockInfoTable  = False@@ -953,7 +959,6 @@ labelType PicBaseLabel                          = DataLabel labelType (DeadStripPreventer _)                = DataLabel labelType (HpcTicksLabel _)                     = DataLabel-labelType (LargeSRTLabel _)                     = DataLabel labelType (LargeBitmapLabel _)                  = DataLabel  idInfoLabelType :: IdLabelInfo -> CLabelType@@ -971,28 +976,46 @@   -- -------------------------------------------------------------------------------- Does a CLabel need dynamic linkage? +-- | Is a 'CLabel' defined in the current module being compiled?+--+-- Sometimes we can optimise references within a compilation unit in ways that+-- we couldn't for inter-module references. This provides a conservative+-- estimate of whether a 'CLabel' lives in the current module.+isLocalCLabel :: Module -> CLabel -> Bool+isLocalCLabel this_mod lbl =+  case lbl of+    IdLabel name _ _+      | isInternalName name -> True+      | otherwise           -> nameModule name == this_mod+    LocalBlockLabel _       -> True+    _                       -> False++-- -----------------------------------------------------------------------------++-- | Does a 'CLabel' need dynamic linkage?+-- -- When referring to data in code, we need to know whether -- that data resides in a DLL or not. [Win32 only.] -- @labelDynamic@ returns @True@ if the label is located -- in a DLL, be it a data reference or not.- labelDynamic :: DynFlags -> Module -> CLabel -> Bool labelDynamic dflags this_mod lbl =   case lbl of    -- is the RTS in a DLL or not?-   RtsLabel _           -> (WayDyn `elem` ways dflags) && (this_pkg /= rtsUnitId)+   RtsLabel _ ->+     (gopt Opt_ExternalDynamicRefs dflags) && (this_pkg /= rtsUnitId) -   IdLabel n _ _        -> isDllName dflags this_mod n+   IdLabel n _ _ ->+     isDllName dflags this_mod n     -- When compiling in the "dyn" way, each package is to be linked into    -- its own shared library.    CmmLabel pkg _ _     | os == OSMinGW32 ->-       (WayDyn `elem` ways dflags) && (this_pkg /= pkg)+       (gopt Opt_ExternalDynamicRefs dflags) && (this_pkg /= pkg)     | otherwise ->-       True+       gopt Opt_ExternalDynamicRefs dflags     LocalBlockLabel _    -> False @@ -1010,14 +1033,15 @@             -- When compiling in the "dyn" way, each package is to be             -- linked into its own DLL.             ForeignLabelInPackage pkgId ->-                (WayDyn `elem` ways dflags) && (this_pkg /= pkgId)+                (gopt Opt_ExternalDynamicRefs dflags) && (this_pkg /= pkgId)         else -- On Mac OS X and on ELF platforms, false positives are OK,             -- so we claim that all foreign imports come from dynamic             -- libraries             True -   HpcTicksLabel m        -> (WayDyn `elem` ways dflags) && this_mod /= m+   HpcTicksLabel m ->+     (gopt Opt_ExternalDynamicRefs dflags) && this_mod /= m     -- Note that DynamicLinkerLabels do NOT require dynamic linking themselves.    _                 -> False@@ -1039,7 +1063,6 @@           info                   Info table          srt                    Static reference table-         srtd                   Static reference table descriptor          entry                  Entry code (function, closure)          slow                   Slow entry code (if any)          ret                    Direct return address@@ -1178,11 +1201,10 @@ pprCLbl (SRTLabel u)   = pprUniqueAlways u <> pp_cSEP <> text "srt" -pprCLbl (LargeSRTLabel u)  = pprUniqueAlways u <> pp_cSEP <> text "srtd" pprCLbl (LargeBitmapLabel u)  = text "b" <> pprUniqueAlways u <> pp_cSEP <> text "btm" -- Some bitsmaps for tuple constructors have a numeric tag (e.g. '7') -- until that gets resolved we'll just force them to start--- with a letter so the label will be legal assmbly code.+-- with a letter so the label will be legal assembly code.   pprCLbl (CmmLabel _ str CmmCode)        = ftext str@@ -1271,7 +1293,6 @@ ppIdFlavor x = pp_cSEP <>                (case x of                        Closure          -> text "closure"-                       SRT              -> text "srt"                        InfoTable        -> text "info"                        LocalInfoTable   -> text "info"                        Entry            -> text "entry"
cmm/Cmm.hs view
@@ -1,5 +1,5 @@ -- Cmm representations using Hoopl's Graph CmmNode e x.-{-# LANGUAGE CPP, GADTs #-}+{-# LANGUAGE GADTs #-}  module Cmm (      -- * Cmm top-level datatypes@@ -18,7 +18,6 @@      -- * Info Tables      CmmTopInfo(..), CmmStackInfo(..), CmmInfoTable(..), topInfoTable,      ClosureTypeInfo(..),-     C_SRT(..), needsSRT,      ProfilingInfo(..), ConstrDescription,       -- * Statements, expressions and types@@ -28,6 +27,8 @@  import GhcPrelude +import Id+import CostCentre import CLabel import BlockId import CmmNode@@ -41,8 +42,6 @@  import Data.Word        ( Word8 ) -#include "HsVersions.h"- ----------------------------------------------------------------------------- --  Cmm, GenCmm -----------------------------------------------------------------------------@@ -140,23 +139,27 @@       cit_lbl  :: CLabel, -- Info table label       cit_rep  :: SMRep,       cit_prof :: ProfilingInfo,-      cit_srt  :: C_SRT+      cit_srt  :: Maybe CLabel,   -- empty, or a closure address+      cit_clo  :: Maybe (Id, CostCentreStack)+        -- Just (id,ccs) <=> build a static closure later+        -- Nothing <=> don't build a static closure+        --+        -- Static closures for FUNs and THUNKs are *not* generated by+        -- the code generator, because we might want to add SRT+        -- entries to them later (for FUNs at least; THUNKs are+        -- treated the same for consistency). See Note [SRTs] in+        -- CmmBuildInfoTables, in particular the [FUN] optimisation.+        --+        -- This is strictly speaking not a part of the info table that+        -- will be finally generated, but it's the only convenient+        -- place to convey this information from the code generator to+        -- where we build the static closures in+        -- CmmBuildInfoTables.doSRTs.     }  data ProfilingInfo   = NoProfilingInfo   | ProfilingInfo [Word8] [Word8] -- closure_type, closure_desc---- C_SRT is what StgSyn.SRT gets translated to...--- we add a label for the table, and expect only the 'offset/length' form--data C_SRT = NoC_SRT-           | C_SRT !CLabel !WordOff !StgHalfWord {-bitmap or escape-}-           deriving (Eq)--needsSRT :: C_SRT -> Bool-needsSRT NoC_SRT       = False-needsSRT (C_SRT _ _ _) = True  ----------------------------------------------------------------------------- --              Static Data
cmm/CmmBuildInfoTables.hs view
@@ -1,383 +1,896 @@-{-# LANGUAGE BangPatterns, CPP, GADTs #-}--module CmmBuildInfoTables-    ( CAFSet, CAFEnv, cafAnal-    , doSRTs, TopSRT, emptySRT, isEmptySRT, srtToData )-where--#include "HsVersions.h"--import GhcPrelude hiding (succ)--import Hoopl.Block-import Hoopl.Graph-import Hoopl.Label-import Hoopl.Collections-import Hoopl.Dataflow-import Digraph-import Bitmap-import CLabel-import PprCmmDecl ()-import Cmm-import CmmUtils-import CmmInfo-import Data.List-import DynFlags-import Maybes-import Outputable-import SMRep-import UniqSupply-import Util--import PprCmm()-import Data.Map (Map)-import qualified Data.Map as Map-import Data.Set (Set)-import qualified Data.Set as Set-import Control.Monad--foldSet :: (a -> b -> b) -> b -> Set a -> b-foldSet = Set.foldr---------------------------------------------------------------------------- SRTs--{- EXAMPLE--f = \x. ... g ...-  where-    g = \y. ... h ... c1 ...-    h = \z. ... c2 ...--c1 & c2 are CAFs--g and h are local functions, but they have no static closures.  When-we generate code for f, we start with a CmmGroup of four CmmDecls:--   [ f_closure, f_entry, g_entry, h_entry ]--we process each CmmDecl separately in cpsTop, giving us a list of-CmmDecls. e.g. for f_entry, we might end up with--   [ f_entry, f1_ret, f2_proc ]--where f1_ret is a return point, and f2_proc is a proc-point.  We have-a CAFSet for each of these CmmDecls, let's suppose they are--   [ f_entry{g_closure}, f1_ret{g_closure}, f2_proc{} ]-   [ g_entry{h_closure, c1_closure} ]-   [ h_entry{c2_closure} ]--Now, note that we cannot use g_closure and h_closure in an SRT,-because there are no static closures corresponding to these functions.-So we have to flatten out the structure, replacing g_closure and-h_closure with their contents:--   [ f_entry{c2_closure, c1_closure}, f1_ret{c2_closure,c1_closure}, f2_proc{} ]-   [ g_entry{c2_closure, c1_closure} ]-   [ h_entry{c2_closure} ]--This is what flattenCAFSets is doing.---}---------------------------------------------------------------------------- Finding the CAFs used by a procedure--type CAFSet = Set CLabel-type CAFEnv = LabelMap CAFSet--cafLattice :: DataflowLattice CAFSet-cafLattice = DataflowLattice Set.empty add-  where-    add (OldFact old) (NewFact new) =-        let !new' = old `Set.union` new-        in changedIf (Set.size new' > Set.size old) new'--cafTransfers :: TransferFun CAFSet-cafTransfers (BlockCC eNode middle xNode) fBase =-    let joined = cafsInNode xNode $! joinOutFacts cafLattice xNode fBase-        !result = foldNodesBwdOO cafsInNode middle joined-    in mapSingleton (entryLabel eNode) result--cafsInNode :: CmmNode e x -> CAFSet -> CAFSet-cafsInNode node set = foldExpDeep addCaf node set-  where-    addCaf expr !set =-        case expr of-            CmmLit (CmmLabel c) -> add c set-            CmmLit (CmmLabelOff c _) -> add c set-            CmmLit (CmmLabelDiffOff c1 c2 _) -> add c1 $! add c2 set-            _ -> set-    add l s | hasCAF l  = Set.insert (toClosureLbl l) s-            | otherwise = s---- | An analysis to find live CAFs.-cafAnal :: CmmGraph -> CAFEnv-cafAnal cmmGraph = analyzeCmmBwd cafLattice cafTransfers cmmGraph mapEmpty---------------------------------------------------------------------------- Building the SRTs---- Description of the SRT for a given module.--- Note that this SRT may grow as we greedily add new CAFs to it.-data TopSRT = TopSRT { lbl      :: CLabel-                     , next_elt :: Int -- the next entry in the table-                     , rev_elts :: [CLabel]-                     , elt_map  :: Map CLabel Int }-                        -- map: CLabel -> its last entry in the table-instance Outputable TopSRT where-  ppr (TopSRT lbl next elts eltmap) =-    text "TopSRT:" <+> ppr lbl-                   <+> ppr next-                   <+> ppr elts-                   <+> ppr eltmap--emptySRT :: MonadUnique m => m TopSRT-emptySRT =-  do top_lbl <- getUniqueM >>= \ u -> return $ mkTopSRTLabel u-     return TopSRT { lbl = top_lbl, next_elt = 0, rev_elts = [], elt_map = Map.empty }--isEmptySRT :: TopSRT -> Bool-isEmptySRT srt = null (rev_elts srt)--cafMember :: TopSRT -> CLabel -> Bool-cafMember srt lbl = Map.member lbl (elt_map srt)--cafOffset :: TopSRT -> CLabel -> Maybe Int-cafOffset srt lbl = Map.lookup lbl (elt_map srt)--addCAF :: CLabel -> TopSRT -> TopSRT-addCAF caf srt =-  srt { next_elt = last + 1-      , rev_elts = caf : rev_elts srt-      , elt_map  = Map.insert caf last (elt_map srt) }-    where last  = next_elt srt--srtToData :: TopSRT -> CmmGroup-srtToData srt = [CmmData sec (Statics (lbl srt) tbl)]-    where tbl = map (CmmStaticLit . CmmLabel) (reverse (rev_elts srt))-          sec = Section RelocatableReadOnlyData (lbl srt)---- Once we have found the CAFs, we need to do two things:--- 1. Build a table of all the CAFs used in the procedure.--- 2. Compute the C_SRT describing the subset of CAFs live at each procpoint.------ When building the local view of the SRT, we first make sure that all the CAFs are--- in the SRT. Then, if the number of CAFs is small enough to fit in a bitmap,--- we make sure they're all close enough to the bottom of the table that the--- bitmap will be able to cover all of them.-buildSRT :: DynFlags -> TopSRT -> CAFSet -> UniqSM (TopSRT, Maybe CmmDecl, C_SRT)-buildSRT dflags topSRT cafs =-  do let-         -- For each label referring to a function f without a static closure,-         -- replace it with the CAFs that are reachable from f.-         sub_srt topSRT localCafs =-           let cafs = Set.elems localCafs-               mkSRT topSRT =-                 do localSRTs <- procpointSRT dflags (lbl topSRT) (elt_map topSRT) cafs-                    return (topSRT, localSRTs)-           in if cafs `lengthExceeds` maxBmpSize dflags then-                mkSRT (foldl add_if_missing topSRT cafs)-              else -- make sure all the cafs are near the bottom of the srt-                mkSRT (add_if_too_far topSRT cafs)-         add_if_missing srt caf =-           if cafMember srt caf then srt else addCAF caf srt-         -- If a CAF is more than maxBmpSize entries from the young end of the-         -- SRT, then we add it to the SRT again.-         -- (Note: Not in the SRT => infinitely far.)-         add_if_too_far srt@(TopSRT {elt_map = m}) cafs =-           add srt (sortBy farthestFst cafs)-             where-               farthestFst x y = case (Map.lookup x m, Map.lookup y m) of-                                   (Nothing, Nothing) -> EQ-                                   (Nothing, Just _)  -> LT-                                   (Just _,  Nothing) -> GT-                                   (Just d, Just d')  -> compare d' d-               add srt [] = srt-               add srt@(TopSRT {next_elt = next}) (caf : rst) =-                 case cafOffset srt caf of-                   Just ix -> if next - ix > maxBmpSize dflags then-                                add (addCAF caf srt) rst-                              else srt-                   Nothing -> add (addCAF caf srt) rst-     (topSRT, subSRTs) <- sub_srt topSRT cafs-     let (sub_tbls, blockSRTs) = subSRTs-     return (topSRT, sub_tbls, blockSRTs)---- Construct an SRT bitmap.--- Adapted from simpleStg/SRT.hs, which expects Id's.-procpointSRT :: DynFlags -> CLabel -> Map CLabel Int -> [CLabel] ->-                UniqSM (Maybe CmmDecl, C_SRT)-procpointSRT _ _ _ [] =- return (Nothing, NoC_SRT)-procpointSRT dflags top_srt top_table entries =- do (top, srt) <- bitmap `seq` to_SRT dflags top_srt offset len bitmap-    return (top, srt)-  where-    ints = map (expectJust "constructSRT" . flip Map.lookup top_table) entries-    sorted_ints = sort ints-    offset = head sorted_ints-    bitmap_entries = map (subtract offset) sorted_ints-    len = GhcPrelude.last bitmap_entries + 1-    bitmap = intsToBitmap dflags len bitmap_entries--maxBmpSize :: DynFlags -> Int-maxBmpSize dflags = widthInBits (wordWidth dflags) `div` 2---- Adapted from codeGen/StgCmmUtils, which converts from SRT to C_SRT.-to_SRT :: DynFlags -> CLabel -> Int -> Int -> Bitmap -> UniqSM (Maybe CmmDecl, C_SRT)-to_SRT dflags top_srt off len bmp-  | len > maxBmpSize dflags || bmp == [toStgWord dflags (fromStgHalfWord (srtEscape dflags))]-  = do id <- getUniqueM-       let srt_desc_lbl = mkLargeSRTLabel id-           section = Section RelocatableReadOnlyData srt_desc_lbl-           tbl = CmmData section $-                   Statics srt_desc_lbl $ map CmmStaticLit-                     ( cmmLabelOffW dflags top_srt off-                     : mkWordCLit dflags (fromIntegral len)-                     : map (mkStgWordCLit dflags) bmp)-       return (Just tbl, C_SRT srt_desc_lbl 0 (srtEscape dflags))-  | otherwise-  = return (Nothing, C_SRT top_srt off (toStgHalfWord dflags (fromStgWord (head bmp))))-        -- The fromIntegral converts to StgHalfWord---- Gather CAF info for a procedure, but only if the procedure--- doesn't have a static closure.--- (If it has a static closure, it will already have an SRT to---  keep its CAFs live.)--- Any procedure referring to a non-static CAF c must keep live--- any CAF that is reachable from c.-localCAFInfo :: CAFEnv -> CmmDecl -> (CAFSet, Maybe CLabel)-localCAFInfo _      (CmmData _ _) = (Set.empty, Nothing)-localCAFInfo cafEnv proc@(CmmProc _ top_l _ (CmmGraph {g_entry=entry})) =-  case topInfoTable proc of-    Just (CmmInfoTable { cit_rep = rep })-      | not (isStaticRep rep) && not (isStackRep rep)-      -> (cafs, Just (toClosureLbl top_l))-    _other -> (cafs, Nothing)-  where-    cafs = expectJust "maybeBindCAFs" $ mapLookup entry cafEnv---- Once we have the local CAF sets for some (possibly) mutually--- recursive functions, we can create an environment mapping--- each function to its set of CAFs. Note that a CAF may--- be a reference to a function. If that function f does not have--- a static closure, then we need to refer specifically--- to the set of CAFs used by f. Of course, the set of CAFs--- used by f must be included in the local CAF sets that are input to--- this function. To minimize lookup time later, we return--- the environment with every reference to f replaced by its set of CAFs.--- To do this replacement efficiently, we gather strongly connected--- components, then we sort the components in topological order.-mkTopCAFInfo :: [(CAFSet, Maybe CLabel)] -> Map CLabel CAFSet-mkTopCAFInfo localCAFs = foldl addToTop Map.empty g-  where-        addToTop env (AcyclicSCC (l, cafset)) =-          Map.insert l (flatten env cafset) env-        addToTop env (CyclicSCC nodes) =-          let (lbls, cafsets) = unzip nodes-              cafset  = foldr Set.delete (foldl Set.union Set.empty cafsets) lbls-          in foldl (\env l -> Map.insert l (flatten env cafset) env) env lbls--        g = stronglyConnCompFromEdgedVerticesOrd-              [ DigraphNode (l,cafs) l (Set.elems cafs)-              | (cafs, Just l) <- localCAFs ]--flatten :: Map CLabel CAFSet -> CAFSet -> CAFSet-flatten env cafset = foldSet (lookup env) Set.empty cafset-  where-      lookup env caf cafset' =-          case Map.lookup caf env of-             Just cafs -> foldSet Set.insert cafset' cafs-             Nothing   -> Set.insert caf cafset'--bundle :: Map CLabel CAFSet-       -> (CAFEnv, CmmDecl)-       -> (CAFSet, Maybe CLabel)-       -> (LabelMap CAFSet, CmmDecl)-bundle flatmap (env, decl@(CmmProc infos _lbl _ g)) (closure_cafs, mb_lbl)-  = ( mapMapWithKey get_cafs (info_tbls infos), decl )- where-  entry = g_entry g--  entry_cafs-    | Just l <- mb_lbl = expectJust "bundle" $ Map.lookup l flatmap-    | otherwise        = flatten flatmap closure_cafs--  get_cafs l _-    | l == entry = entry_cafs-    | Just info <- mapLookup l env = flatten flatmap info-    | otherwise  = Set.empty-    -- the label might not be in the env if the code corresponding to-    -- this info table was optimised away (perhaps because it was-    -- unreachable).  In this case it doesn't matter what SRT we-    -- infer, since the info table will not appear in the generated-    -- code.  See #9329.--bundle _flatmap (_, decl) _-  = ( mapEmpty, decl )---flattenCAFSets :: [(CAFEnv, [CmmDecl])] -> [(LabelMap CAFSet, CmmDecl)]-flattenCAFSets cpsdecls = zipWith (bundle flatmap) zipped localCAFs-   where-     zipped    = [ (env,decl) | (env,decls) <- cpsdecls, decl <- decls ]-     localCAFs = unzipWith localCAFInfo zipped-     flatmap   = mkTopCAFInfo localCAFs -- transitive closure of localCAFs--doSRTs :: DynFlags-       -> TopSRT-       -> [(CAFEnv, [CmmDecl])]-       -> IO (TopSRT, [CmmDecl])--doSRTs dflags topSRT tops-  = do-     let caf_decls = flattenCAFSets tops-     us <- mkSplitUniqSupply 'u'-     let (topSRT', gs') = initUs_ us $ foldM setSRT (topSRT, []) caf_decls-     return (topSRT', reverse gs' {- Note [reverse gs] -})-  where-    setSRT (topSRT, rst) (caf_map, decl@(CmmProc{})) = do-       (topSRT, srt_tables, srt_env) <- buildSRTs dflags topSRT caf_map-       let decl' = updInfoSRTs srt_env decl-       return (topSRT, decl': srt_tables ++ rst)-    setSRT (topSRT, rst) (_, decl) =-      return (topSRT, decl : rst)--buildSRTs :: DynFlags -> TopSRT -> LabelMap CAFSet-          -> UniqSM (TopSRT, [CmmDecl], LabelMap C_SRT)-buildSRTs dflags top_srt caf_map-  = foldM doOne (top_srt, [], mapEmpty) (mapToList caf_map)-  where-  doOne (top_srt, decls, srt_env) (l, cafs)-    = do (top_srt, mb_decl, srt) <- buildSRT dflags top_srt cafs-         return ( top_srt, maybeToList mb_decl ++ decls-                , mapInsert l srt srt_env )--{--- In each CmmDecl there is a mapping from BlockId -> CmmInfoTable-- The one corresponding to g_entry is the closure info table, the-  rest are continuations.-- Each one needs an SRT.-- We get the CAFSet for each one from the CAFEnv-- flatten gives us-    [(LabelMap CAFSet, CmmDecl)]----}---{- Note [reverse gs]--   It is important to keep the code blocks in the same order,-   otherwise binary sizes get slightly bigger.  I'm not completely-   sure why this is, perhaps the assembler generates bigger jump-   instructions for forward refs.  --SDM--}--updInfoSRTs :: LabelMap C_SRT -> CmmDecl -> CmmDecl-updInfoSRTs srt_env (CmmProc top_info top_l live g) =-  CmmProc (top_info {info_tbls = mapMapWithKey updInfoTbl (info_tbls top_info)}) top_l live g-  where updInfoTbl l info_tbl-             = info_tbl { cit_srt = expectJust "updInfo" $ mapLookup l srt_env }-updInfoSRTs _ t = t+{-# LANGUAGE GADTs, BangPatterns, RecordWildCards,+    GeneralizedNewtypeDeriving, NondecreasingIndentation, TupleSections #-}++module CmmBuildInfoTables+  ( CAFSet, CAFEnv, cafAnal+  , doSRTs, ModuleSRTInfo, emptySRT+  ) where++import GhcPrelude hiding (succ)++import Id+import BlockId+import Hoopl.Block+import Hoopl.Graph+import Hoopl.Label+import Hoopl.Collections+import Hoopl.Dataflow+import Module+import Platform+import Digraph+import CLabel+import PprCmmDecl ()+import Cmm+import CmmUtils+import DynFlags+import Maybes+import Outputable+import SMRep+import UniqSupply+import CostCentre+import StgCmmHeap++import PprCmm()+import Control.Monad+import Data.Map (Map)+import qualified Data.Map as Map+import Data.Set (Set)+import qualified Data.Set as Set+import Data.Tuple+import Control.Monad.Trans.State+import Control.Monad.Trans.Class+++{- Note [SRTs]++SRTs are the mechanism by which the garbage collector can determine+the live CAFs in the program.++Representation+^^^^^^^^^^^^^^+++------++| info |+|      |     +-----+---+---+---++|   -------->|SRT_2| | | | | 0 |+|------|     +-----+-|-+-|-+---++|      |             |   |+| code |             |   |+|      |             v   v++An SRT is simply an object in the program's data segment. It has the+same representation as a static constructor.  There are 16+pre-compiled SRT info tables: stg_SRT_1_info, .. stg_SRT_16_info,+representing SRT objects with 1-16 pointers, respectively.++The entries of an SRT object point to static closures, which are either+- FUN_STATIC, THUNK_STATIC or CONSTR+- Another SRT (actually just a CONSTR)++The final field of the SRT is the static link field, used by the+garbage collector to chain together static closures that it visits and+to determine whether a static closure has been visited or not. (see+Note [STATIC_LINK fields])++By traversing the transitive closure of an SRT, the GC will reach all+of the CAFs that are reachable from the code associated with this SRT.++If we need to create an SRT with more than 16 entries, we build a+chain of SRT objects with all but the last having 16 entries.+++-----+---+- -+---+---++|SRT16| | |   | | | 0 |++-----+-|-+- -+-|-+---++        |       |+        v       v+              +----+---+---+---++              |SRT2| | | | | 0 |+              +----+-|-+-|-+---++                     |   |+                     |   |+                     v   v++Referring to an SRT from the info table+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^++The following things have SRTs:++- Static functions (FUN)+- Static thunks (THUNK), ie. CAFs+- Continuations (RET_SMALL, etc.)++In each case, the info table points to the SRT.++- info->srt is zero if there's no SRT, otherwise:+- info->srt == 1 and info->f.srt_offset points to the SRT++e.g. for a FUN with an SRT:++StgFunInfoTable       +------++  info->f.srt_offset  |  ------------> offset to SRT object+StgStdInfoTable       +------++  info->layout.ptrs   | ...  |+  info->layout.nptrs  | ...  |+  info->srt           |  1   |+  info->type          | ...  |+                      |------|++On x86_64, we optimise the info table representation further.  The+offset to the SRT can be stored in 32 bits (all code lives within a+2GB region in x86_64's small memory model), so we can save a word in+the info table by storing the srt_offset in the srt field, which is+half a word.++On x86_64 with TABLES_NEXT_TO_CODE (except on MachO, due to #15169):++- info->srt is zero if there's no SRT, otherwise:+- info->srt is an offset from the info pointer to the SRT object++StgStdInfoTable       +------++  info->layout.ptrs   |      |+  info->layout.nptrs  |      |+  info->srt           |  ------------> offset to SRT object+                      |------|+++EXAMPLE+^^^^^^^++f = \x. ... g ...+  where+    g = \y. ... h ... c1 ...+    h = \z. ... c2 ...++c1 & c2 are CAFs++g and h are local functions, but they have no static closures.  When+we generate code for f, we start with a CmmGroup of four CmmDecls:++   [ f_closure, f_entry, g_entry, h_entry ]++we process each CmmDecl separately in cpsTop, giving us a list of+CmmDecls. e.g. for f_entry, we might end up with++   [ f_entry, f1_ret, f2_proc ]++where f1_ret is a return point, and f2_proc is a proc-point.  We have+a CAFSet for each of these CmmDecls, let's suppose they are++   [ f_entry{g_info}, f1_ret{g_info}, f2_proc{} ]+   [ g_entry{h_info, c1_closure} ]+   [ h_entry{c2_closure} ]++Next, we make an SRT for each of these functions:++  f_srt : [g_info]+  g_srt : [h_info, c1_closure]+  h_srt : [c2_closure]++Now, for g_info and h_info, we want to refer to the SRTs for g and h+respectively, which we'll label g_srt and h_srt:++  f_srt : [g_srt]+  g_srt : [h_srt, c1_closure]+  h_srt : [c2_closure]++Now, when an SRT has a single entry, we don't actually generate an SRT+closure for it, instead we just replace references to it with its+single element.  So, since h_srt == c2_closure, we have++  f_srt : [g_srt]+  g_srt : [c2_closure, c1_closure]+  h_srt : [c2_closure]++and the only SRT closure we generate is++  g_srt = SRT_2 [c2_closure, c1_closure]+++Optimisations+^^^^^^^^^^^^^++To reduce the code size overhead and the cost of traversing SRTs in+the GC, we want to simplify SRTs where possible. We therefore apply+the following optimisations.  Each has a [keyword]; search for the+keyword in the code below to see where the optimisation is+implemented.++1. [Inline] we never create an SRT with a single entry, instead we+   point to the single entry directly from the info table.++   i.e. instead of++    +------++    | info |+    |      |     +-----+---+---++    |   -------->|SRT_1| | | 0 |+    |------|     +-----+-|-+---++    |      |             |+    | code |             |+    |      |             v+                         C++   we can point directly to the closure:++    +------++    | info |+    |      |+    |   -------->C+    |------|+    |      |+    | code |+    |      |+++   Furthermore, the SRT for any code that refers to this info table+   can point directly to C.++   The exception to this is when we're doing dynamic linking. In that+   case, if the closure is not locally defined then we can't point to+   it directly from the info table, because this is the text section+   which cannot contain runtime relocations. In this case we skip this+   optimisation and generate the singleton SRT, becase SRTs are in the+   data section and *can* have relocatable references.++2. [FUN] A static function closure can also be an SRT, we simply put+   the SRT entries as fields in the static closure.  This makes a lot+   of sense: the static references are just like the free variables of+   the FUN closure.++   i.e. instead of++   f_closure:+   +-----+---++   |  |  | 0 |+   +- |--+---++      |            +------++      |            | info |     f_srt:+      |            |      |     +-----+---+---+---++      |            |   -------->|SRT_2| | | | + 0 |+      `----------->|------|     +-----+-|-+-|-+---++                   |      |             |   |+                   | code |             |   |+                   |      |             v   v+++   We can generate:++   f_closure:+   +-----+---+---+---++   |  |  | | | | | 0 |+   +- |--+-|-+-|-+---++      |    |   |   +------++      |    v   v   | info |+      |            |      |+      |            |   0  |+      `----------->|------|+                   |      |+                   | code |+                   |      |+++   (note: we can't do this for THUNKs, because the thunk gets+   overwritten when it is entered, so we wouldn't be able to share+   this SRT with other info tables that want to refer to it (see+   [Common] below). FUNs are immutable so don't have this problem.)++3. [Common] Identical SRTs can be commoned up.++4. [Filter] If an SRT A refers to an SRT B and a closure C, and B also+   refers to C (perhaps transitively), then we can omit the reference+   to C from A.+++Note that there are many other optimisations that we could do, but+aren't implemented. In general, we could omit any reference from an+SRT if everything reachable from it is also reachable from the other+fields in the SRT. Our [Filter] optimisation is a special case of+this.++Another opportunity we don't exploit is this:++A = {X,Y,Z}+B = {Y,Z}+C = {X,B}++Here we could use C = {A} and therefore [Inline] C = A.+-}++-- ---------------------------------------------------------------------+{- Note [Invalid optimisation: shortcutting]++You might think that if we have something like++A's SRT = {B}+B's SRT = {X}++that we could replace the reference to B in A's SRT with X.++A's SRT = {X}+B's SRT = {X}++and thereby perhaps save a little work at runtime, because we don't+have to visit B.++But this is NOT valid.++Consider these cases:++0. B can't be a constructor, because constructors don't have SRTs++1. B is a CAF. This is the easy one. Obviously we want A's SRT to+   point to B, so that it keeps B alive.++2. B is a function.  This is the tricky one. The reason we can't+shortcut in this case is that we aren't allowed to resurrect static+objects.++== How does this cause a problem? ==++The particular case that cropped up when we tried this was #15544.+- A is a thunk+- B is a static function+- X is a CAF+- suppose we GC when A is alive, and B is not otherwise reachable.+- B is "collected", meaning that it doesn't make it onto the static+  objects list during this GC, but nothing bad happens yet.+- Next, suppose we enter A, and then call B. (remember that A refers to B)+  At the entry point to B, we GC. This puts B on the stack, as part of the+  RET_FUN stack frame that gets pushed when we GC at a function entry point.+- This GC will now reach B+- But because B was previous "collected", it breaks the assumption+  that static objects are never resurrected. See Note [STATIC_LINK+  fields] in rts/sm/Storage.h for why this is bad.+- In practice, the GC thinks that B has already been visited, and so+  doesn't visit X, and catastrophe ensues.++== Isn't this caused by the RET_FUN business? ==++Maybe, but could you prove that RET_FUN is the only way that+resurrection can occur?++So, no shortcutting.+-}++-- ---------------------------------------------------------------------+-- Label types++-- Labels that come from cafAnal can be:+--   - _closure labels for static functions or CAFs+--   - _info labels for dynamic functions, thunks, or continuations+--   - _entry labels for functions or thunks+--+-- Meanwhile the labels on top-level blocks are _entry labels.+--+-- To put everything in the same namespace we convert all labels to+-- closure labels using toClosureLbl.  Note that some of these+-- labels will not actually exist; that's ok because we're going to+-- map them to SRTEntry later, which ranges over labels that do exist.+--+newtype CAFLabel = CAFLabel CLabel+  deriving (Eq,Ord,Outputable)++type CAFSet = Set CAFLabel+type CAFEnv = LabelMap CAFSet++mkCAFLabel :: CLabel -> CAFLabel+mkCAFLabel lbl = CAFLabel (toClosureLbl lbl)++-- This is a label that we can put in an SRT.  It *must* be a closure label,+-- pointing to either a FUN_STATIC, THUNK_STATIC, or CONSTR.+newtype SRTEntry = SRTEntry CLabel+  deriving (Eq, Ord, Outputable)++-- ---------------------------------------------------------------------+-- CAF analysis++-- |+-- For each code block:+--   - collect the references reachable from this code block to FUN,+--     THUNK or RET labels for which hasCAF == True+--+-- This gives us a `CAFEnv`: a mapping from code block to sets of labels+--+cafAnal+  :: LabelSet   -- The blocks representing continuations, ie. those+                -- that will get RET info tables.  These labels will+                -- get their own SRTs, so we don't aggregate CAFs from+                -- references to these labels, we just use the label.+  -> CLabel     -- The top label of the proc+  -> CmmGraph+  -> CAFEnv+cafAnal contLbls topLbl cmmGraph =+  analyzeCmmBwd cafLattice+    (cafTransfers contLbls (g_entry cmmGraph) topLbl) cmmGraph mapEmpty+++cafLattice :: DataflowLattice CAFSet+cafLattice = DataflowLattice Set.empty add+  where+    add (OldFact old) (NewFact new) =+        let !new' = old `Set.union` new+        in changedIf (Set.size new' > Set.size old) new'+++cafTransfers :: LabelSet -> Label -> CLabel -> TransferFun CAFSet+cafTransfers contLbls entry topLbl+  (BlockCC eNode middle xNode) fBase =+    let joined = cafsInNode xNode $! live'+        !result = foldNodesBwdOO cafsInNode middle joined++        facts = mapMaybe successorFact (successors xNode)+        live' = joinFacts cafLattice facts++        successorFact s+          -- If this is a loop back to the entry, we can refer to the+          -- entry label.+          | s == entry = Just (add topLbl Set.empty)+          -- If this is a continuation, we want to refer to the+          -- SRT for the continuation's info table+          | s `setMember` contLbls+          = Just (Set.singleton (mkCAFLabel (infoTblLbl s)))+          -- Otherwise, takes the CAF references from the destination+          | otherwise+          = lookupFact s fBase++        cafsInNode :: CmmNode e x -> CAFSet -> CAFSet+        cafsInNode node set = foldExpDeep addCaf node set++        addCaf expr !set =+          case expr of+              CmmLit (CmmLabel c) -> add c set+              CmmLit (CmmLabelOff c _) -> add c set+              CmmLit (CmmLabelDiffOff c1 c2 _ _) -> add c1 $! add c2 set+              _ -> set+        add l s | hasCAF l  = Set.insert (mkCAFLabel l) s+                | otherwise = s++    in mapSingleton (entryLabel eNode) result+++-- -----------------------------------------------------------------------------+-- ModuleSRTInfo++data ModuleSRTInfo = ModuleSRTInfo+  { thisModule :: Module+    -- ^ Current module being compiled. Required for calling labelDynamic.+  , dedupSRTs :: Map (Set SRTEntry) SRTEntry+    -- ^ previous SRTs we've emitted, so we can de-duplicate.+    -- Used to implement the [Common] optimisation.+  , flatSRTs :: Map SRTEntry (Set SRTEntry)+    -- ^ The reverse mapping, so that we can remove redundant+    -- entries. e.g.  if we have an SRT [a,b,c], and we know that b+    -- points to [c,d], we can omit c and emit [a,b].+    -- Used to implement the [Filter] optimisation.+  }+instance Outputable ModuleSRTInfo where+  ppr ModuleSRTInfo{..} =+    text "ModuleSRTInfo:" <+> ppr dedupSRTs <+> ppr flatSRTs++emptySRT :: Module -> ModuleSRTInfo+emptySRT mod =+  ModuleSRTInfo+    { thisModule = mod+    , dedupSRTs = Map.empty+    , flatSRTs = Map.empty }++-- -----------------------------------------------------------------------------+-- Constructing SRTs++{- Implementation notes++- In each CmmDecl there is a mapping info_tbls from Label -> CmmInfoTable++- The entry in info_tbls corresponding to g_entry is the closure info+  table, the rest are continuations.++- Each entry in info_tbls possibly needs an SRT.  We need to make a+  label for each of these.++- We get the CAFSet for each entry from the CAFEnv++-}++-- | Return a (Label,CLabel) pair for each labelled block of a CmmDecl,+--   where the label is+--   - the info label for a continuation or dynamic closure+--   - the closure label for a top-level function (not a CAF)+getLabelledBlocks :: CmmDecl -> [(Label, CAFLabel)]+getLabelledBlocks (CmmData _ _) = []+getLabelledBlocks (CmmProc top_info _ _ _) =+  [ (blockId, mkCAFLabel (cit_lbl info))+  | (blockId, info) <- mapToList (info_tbls top_info)+  , let rep = cit_rep info+  , not (isStaticRep rep) || not (isThunkRep rep)+  ]+++-- | Put the labelled blocks that we will be annotating with SRTs into+-- dependency order.  This is so that we can process them one at a+-- time, resolving references to earlier blocks to point to their+-- SRTs. CAFs themselves are not included here; see getCAFs below.+depAnalSRTs+  :: CAFEnv+  -> [CmmDecl]+  -> [SCC (Label, CAFLabel, Set CAFLabel)]+depAnalSRTs cafEnv decls =+  srtTrace "depAnalSRTs" (ppr graph) graph+ where+  labelledBlocks = concatMap getLabelledBlocks decls+  labelToBlock = Map.fromList (map swap labelledBlocks)+  graph = stronglyConnCompFromEdgedVerticesOrd+             [ let cafs' = Set.delete lbl cafs in+               DigraphNode (l,lbl,cafs') l+                 (mapMaybe (flip Map.lookup labelToBlock) (Set.toList cafs'))+             | (l, lbl) <- labelledBlocks+             , Just cafs <- [mapLookup l cafEnv] ]+++-- | Get (Label, CAFLabel, Set CAFLabel) for each block that represents a CAF.+-- These are treated differently from other labelled blocks:+--  - we never shortcut a reference to a CAF to the contents of its+--    SRT, since the point of SRTs is to keep CAFs alive.+--  - CAFs therefore don't take part in the dependency analysis in depAnalSRTs.+--    instead we generate their SRTs after everything else.+getCAFs :: CAFEnv -> [CmmDecl] -> [(Label, CAFLabel, Set CAFLabel)]+getCAFs cafEnv decls =+  [ (g_entry g, mkCAFLabel topLbl, cafs)+  | CmmProc top_info topLbl _ g <- decls+  , Just info <- [mapLookup (g_entry g) (info_tbls top_info)]+  , let rep = cit_rep info+  , isStaticRep rep && isThunkRep rep+  , Just cafs <- [mapLookup (g_entry g) cafEnv]+  ]+++-- | Get the list of blocks that correspond to the entry points for+-- FUN_STATIC closures.  These are the blocks for which if we have an+-- SRT we can merge it with the static closure. [FUN]+getStaticFuns :: [CmmDecl] -> [(BlockId, CLabel)]+getStaticFuns decls =+  [ (g_entry g, lbl)+  | CmmProc top_info _ _ g <- decls+  , Just info <- [mapLookup (g_entry g) (info_tbls top_info)]+  , Just (id, _) <- [cit_clo info]+  , let rep = cit_rep info+  , isStaticRep rep && isFunRep rep+  , let lbl = mkLocalClosureLabel (idName id) (idCafInfo id)+  ]+++-- | Maps labels from 'cafAnal' to the final CLabel that will appear+-- in the SRT.+--   - closures with singleton SRTs resolve to their single entry+--   - closures with larger SRTs map to the label for that SRT+--   - CAFs must not map to anything!+--   - if a labels maps to Nothing, we found that this label's SRT+--     is empty, so we don't need to refer to it from other SRTs.+type SRTMap = Map CAFLabel (Maybe SRTEntry)++-- | resolve a CAFLabel to its SRTEntry using the SRTMap+resolveCAF :: SRTMap -> CAFLabel -> Maybe SRTEntry+resolveCAF srtMap lbl@(CAFLabel l) =+  Map.findWithDefault (Just (SRTEntry (toClosureLbl l))) lbl srtMap+++-- | Attach SRTs to all info tables in the CmmDecls, and add SRT+-- declarations to the ModuleSRTInfo.+--+doSRTs+  :: DynFlags+  -> ModuleSRTInfo+  -> [(CAFEnv, [CmmDecl])]+  -> IO (ModuleSRTInfo, [CmmDecl])++doSRTs dflags moduleSRTInfo tops = do+  us <- mkSplitUniqSupply 'u'++  -- Ignore the original grouping of decls, and combine all the+  -- CAFEnvs into a single CAFEnv.+  let (cafEnvs, declss) = unzip tops+      cafEnv = mapUnions cafEnvs+      decls = concat declss+      staticFuns = mapFromList (getStaticFuns decls)++  -- Put the decls in dependency order. Why? So that we can implement+  -- [Inline] and [Filter].  If we need to refer to an SRT that has+  -- a single entry, we use the entry itself, which means that we+  -- don't need to generate the singleton SRT in the first place.  But+  -- to do this we need to process blocks before things that depend on+  -- them.+  let+    sccs = depAnalSRTs cafEnv decls+    cafsWithSRTs = getCAFs cafEnv decls++  -- On each strongly-connected group of decls, construct the SRT+  -- closures and the SRT fields for info tables.+  let result ::+        [ ( [CmmDecl]              -- generated SRTs+          , [(Label, CLabel)]      -- SRT fields for info tables+          , [(Label, [SRTEntry])]  -- SRTs to attach to static functions+          ) ]+      ((result, _srtMap), moduleSRTInfo') =+        initUs_ us $+        flip runStateT moduleSRTInfo $+        flip runStateT Map.empty $ do+          nonCAFs <- mapM (doSCC dflags staticFuns) sccs+          cAFs <- forM cafsWithSRTs $ \(l, cafLbl, cafs) ->+            oneSRT dflags staticFuns [l] [cafLbl] True{-is a CAF-} cafs+          return (nonCAFs ++ cAFs)++      (declss, pairs, funSRTs) = unzip3 result++  -- Next, update the info tables with the SRTs+  let+    srtFieldMap = mapFromList (concat pairs)+    funSRTMap = mapFromList (concat funSRTs)+    decls' = concatMap (updInfoSRTs dflags srtFieldMap funSRTMap) decls++  return (moduleSRTInfo', concat declss ++ decls')+++-- | Build the SRT for a strongly-connected component of blocks+doSCC+  :: DynFlags+  -> LabelMap CLabel           -- which blocks are static function entry points+  -> SCC (Label, CAFLabel, Set CAFLabel)+  -> StateT SRTMap+        (StateT ModuleSRTInfo UniqSM)+        ( [CmmDecl]              -- generated SRTs+        , [(Label, CLabel)]      -- SRT fields for info tables+        , [(Label, [SRTEntry])]  -- SRTs to attach to static functions+        )++doSCC dflags staticFuns  (AcyclicSCC (l, cafLbl, cafs)) =+  oneSRT dflags staticFuns [l] [cafLbl] False cafs++doSCC dflags staticFuns (CyclicSCC nodes) = do+  -- build a single SRT for the whole cycle, see Note [recursive SRTs]+  let (blockids, lbls, cafsets) = unzip3 nodes+      cafs = Set.unions cafsets+  oneSRT dflags staticFuns blockids lbls False cafs+++{- Note [recursive SRTs]++If the dependency analyser has found us a recursive group of+declarations, then we build a single SRT for the whole group, on the+grounds that everything in the group is reachable from everything+else, so we lose nothing by having a single SRT.++However, there are a couple of wrinkles to be aware of.++* The Set CAFLabel for this SRT will contain labels in the group+itself. The SRTMap will therefore not contain entries for these labels+yet, so we can't turn them into SRTEntries using resolveCAF. BUT we+can just remove recursive references from the Set CAFLabel before+generating the SRT - the SRT will still contain all the CAFLabels that+we need to refer to from this group's SRT.++* That is, EXCEPT for static function closures. For the same reason+described in Note [Invalid optimisation: shortcutting], we cannot omit+references to static function closures.+  - But, since we will merge the SRT with one of the static function+    closures (see [FUN]), we can omit references to *that* static+    function closure from the SRT.+-}++-- | Build an SRT for a set of blocks+oneSRT+  :: DynFlags+  -> LabelMap CLabel            -- which blocks are static function entry points+  -> [Label]                    -- blocks in this set+  -> [CAFLabel]                 -- labels for those blocks+  -> Bool                       -- True <=> this SRT is for a CAF+  -> Set CAFLabel               -- SRT for this set+  -> StateT SRTMap+       (StateT ModuleSRTInfo UniqSM)+       ( [CmmDecl]                    -- SRT objects we built+       , [(Label, CLabel)]            -- SRT fields for these blocks' itbls+       , [(Label, [SRTEntry])]        -- SRTs to attach to static functions+       )++oneSRT dflags staticFuns blockids lbls isCAF cafs = do+  srtMap <- get+  topSRT <- lift get+  let+    -- Can we merge this SRT with a FUN_STATIC closure?+    (maybeFunClosure, otherFunLabels) =+      case [ (l,b) | b <- blockids, Just l <- [mapLookup b staticFuns] ] of+        [] -> (Nothing, [])+        ((l,b):xs) -> (Just (l,b), map (mkCAFLabel . fst) xs)++    -- Remove recursive references from the SRT, except for (all but+    -- one of the) static functions. See Note [recursive SRTs].+    nonRec = cafs `Set.difference`+      Set.fromList lbls `Set.difference` Set.fromList otherFunLabels++    -- First resolve all the CAFLabels to SRTEntries+    -- Implements the [Inline] optimisation.+    resolved =+       Set.fromList $+       catMaybes (map (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+                        , 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++  srtTrace "oneSRT:"+     (ppr cafs <+> ppr resolved <+> ppr allBelow <+> ppr filtered) $ return ()++  let+    isStaticFun = isJust maybeFunClosure++    -- For a label without a closure (e.g. a continuation), we must+    -- update the SRTMap for the label to point to a closure. It's+    -- 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+        let newSRTMap = Map.fromList [(cafLbl, srtEntry) | cafLbl <- lbls]+        put (Map.union newSRTMap srtMap)++    this_mod = thisModule topSRT++  case Set.toList filtered of+    [] -> do+      srtTrace "oneSRT: empty" (ppr lbls) $ return ()+      updateSRTMap Nothing+      return ([], [], [])++    -- [Inline] - when we have only one entry there is no need to+    -- build an SRT object at all, instead we put the singleton SRT+    -- entry in the info table.+    [one@(SRTEntry lbl)]+      | -- Info tables refer to SRTs by offset (as noted in the section+        -- "Referring to an SRT from the info table" of Note [SRTs]). However,+        -- when dynamic linking is used we cannot guarantee that the offset+        -- between the SRT and the info table will fit in the offset field.+        -- Consequently we build a singleton SRT in in this case.+        not (labelDynamic dflags this_mod lbl)++        -- MachO relocations can't express offsets between compilation units at+        -- all, so we are always forced to build a singleton SRT in this case.+          && (not (osMachOTarget $ platformOS $ targetPlatform dflags)+             || isLocalCLabel this_mod lbl) -> do++        -- If we have a static function closure, then it becomes the+        -- SRT object, and everything else points to it. (the only way+        -- we could have multiple labels here is if this is a+        -- recursive group, see Note [recursive SRTs])+        case maybeFunClosure of+          Just (staticFunLbl,staticFunBlock) -> return ([], withLabels, [])+            where+              withLabels =+                [ (b, if b == staticFunBlock then lbl else staticFunLbl)+                | b <- blockids ]+          Nothing -> do+            updateSRTMap (Just one)+            return ([], map (,lbl) blockids, [])++    cafList ->+      -- Check whether an SRT with the same entries has been emitted already.+      -- Implements the [Common] optimisation.+      case Map.lookup filtered (dedupSRTs topSRT) of+        Just srtEntry@(SRTEntry srtLbl)  -> do+          srtTrace "oneSRT [Common]" (ppr lbls <+> ppr srtLbl) $ return ()+          updateSRTMap (Just srtEntry)+          return ([], map (,srtLbl) blockids, [])+        Nothing -> do+          -- No duplicates: we have to build a new SRT object+          srtTrace "oneSRT: new" (ppr lbls <+> ppr filtered) $ return ()+          (decls, funSRTs, srtEntry) <-+            case maybeFunClosure of+              Just (fun,block) ->+                return ( [], [(block, cafList)], SRTEntry fun )+              Nothing -> do+                (decls, entry) <- lift . lift $ buildSRTChain dflags cafList+                return (decls, [], entry)+          updateSRTMap (Just srtEntry)+          let allBelowThis = Set.union allBelow filtered+              oldFlatSRTs = flatSRTs topSRT+              newFlatSRTs = Map.insert srtEntry allBelowThis oldFlatSRTs+              newDedupSRTs = Map.insert filtered srtEntry (dedupSRTs topSRT)+          lift (put (topSRT { dedupSRTs = newDedupSRTs+                            , flatSRTs = newFlatSRTs }))+          let SRTEntry lbl = srtEntry+          return (decls, map (,lbl) blockids, funSRTs)+++-- | build a static SRT object (or a chain of objects) from a list of+-- SRTEntries.+buildSRTChain+   :: DynFlags+   -> [SRTEntry]+   -> UniqSM+        ( [CmmDecl]    -- The SRT object(s)+        , SRTEntry     -- label to use in the info table+        )+buildSRTChain _ [] = panic "buildSRT: empty"+buildSRTChain dflags cafSet =+  case splitAt mAX_SRT_SIZE cafSet of+    (these, []) -> do+      (decl,lbl) <- buildSRT dflags these+      return ([decl], lbl)+    (these,those) -> do+      (rest, rest_lbl) <- buildSRTChain dflags (head these : those)+      (decl,lbl) <- buildSRT dflags (rest_lbl : tail these)+      return (decl:rest, lbl)+  where+    mAX_SRT_SIZE = 16+++buildSRT :: DynFlags -> [SRTEntry] -> UniqSM (CmmDecl, SRTEntry)+buildSRT dflags refs = do+  id <- getUniqueM+  let+    lbl = mkSRTLabel id+    srt_n_info = mkSRTInfoLabel (length refs)+    fields =+      mkStaticClosure dflags srt_n_info dontCareCCS+        [ CmmLabel lbl | SRTEntry lbl <- refs ]+        [] -- no padding+        [mkIntCLit dflags 0] -- link field+        [] -- no saved info+  return (mkDataLits (Section Data lbl) lbl fields, SRTEntry lbl)+++-- | Update info tables with references to their SRTs. Also generate+-- static closures, splicing in SRT fields as necessary.+updInfoSRTs+  :: DynFlags+  -> LabelMap CLabel               -- SRT labels for each block+  -> LabelMap [SRTEntry]           -- SRTs to merge into FUN_STATIC closures+  -> CmmDecl+  -> [CmmDecl]++updInfoSRTs dflags srt_env funSRTEnv (CmmProc top_info top_l live g)+  | Just (_,closure) <- maybeStaticClosure = [ proc, closure ]+  | otherwise = [ proc ]+  where+    proc = CmmProc top_info { info_tbls = newTopInfo } top_l live g+    newTopInfo = mapMapWithKey updInfoTbl (info_tbls top_info)+    updInfoTbl l info_tbl+      | l == g_entry g, Just (inf, _) <- maybeStaticClosure = inf+      | otherwise  = info_tbl { cit_srt = mapLookup l srt_env }++    -- Generate static closures [FUN].  Note that this also generates+    -- static closures for thunks (CAFs), because it's easier to treat+    -- them uniformly in the code generator.+    maybeStaticClosure :: Maybe (CmmInfoTable, CmmDecl)+    maybeStaticClosure+      | Just info_tbl@CmmInfoTable{..} <-+           mapLookup (g_entry g) (info_tbls top_info)+      , Just (id, ccs) <- cit_clo+      , isStaticRep cit_rep =+        let+          (newInfo, srtEntries) = case mapLookup (g_entry g) funSRTEnv of+            Nothing ->+              -- if we don't add SRT entries to this closure, then we+              -- want to set the srt field in its info table as usual+              (info_tbl { cit_srt = mapLookup (g_entry g) srt_env }, [])+            Just srtEntries -> srtTrace "maybeStaticFun" (ppr res)+              (info_tbl { cit_rep = new_rep }, res)+              where res = [ CmmLabel lbl | SRTEntry lbl <- srtEntries ]+          fields = mkStaticClosureFields dflags info_tbl ccs (idCafInfo id)+            srtEntries+          new_rep = case cit_rep of+             HeapRep sta ptrs nptrs ty ->+               HeapRep sta (ptrs + length srtEntries) nptrs ty+             _other -> panic "maybeStaticFun"+          lbl = mkLocalClosureLabel (idName id) (idCafInfo id)+        in+          Just (newInfo, mkDataLits (Section Data lbl) lbl fields)+      | otherwise = Nothing++updInfoSRTs _ _ _ t = [t]+++srtTrace :: String -> SDoc -> b -> b+-- srtTrace = pprTrace+srtTrace _ _ b = b
cmm/CmmCallConv.hs view
@@ -1,13 +1,9 @@-{-# LANGUAGE CPP #-}- module CmmCallConv (   ParamLocation(..),   assignArgumentsPos,   assignStack,   realArgRegsCover ) where--#include "HsVersions.h"  import GhcPrelude 
cmm/CmmCommonBlockElim.hs view
@@ -1,4 +1,5 @@-{-# LANGUAGE GADTs, BangPatterns #-}+{-# LANGUAGE GADTs, BangPatterns, ScopedTypeVariables #-}+ module CmmCommonBlockElim   ( elimCommonBlocks   )@@ -24,11 +25,11 @@ import Data.Word import qualified Data.Map as M import Outputable-import UniqFM-import UniqDFM import qualified TrieMap as TM+import UniqFM import Unique import Control.Arrow (first, second)+import Data.List (foldl')  -- ----------------------------------------------------------------------------- -- Eliminate common blocks@@ -63,7 +64,11 @@ elimCommonBlocks g = replaceLabels env $ copyTicks env g   where      env = iterate mapEmpty blocks_with_key-     groups = groupByInt hash_block (postorderDfs g)+     -- The order of blocks doesn't matter here. While we could use+     -- revPostorder which drops unreachable blocks this is done in+     -- ContFlowOpt already which runs before this pass. So we use+     -- toBlockList since it is faster.+     groups = groupByInt hash_block (toBlockList g) :: [[CmmBlock]]      blocks_with_key = [ [ (successors b, [b]) | b <- bs] | bs <- groups]  -- Invariant: The blocks in the list are pairwise distinct@@ -91,6 +96,8 @@     subst' = subst `mapUnion` new_substs     updated_blocks = map (map (first (map (lookupBid subst')))) merged_blocks +-- Combine two lists of blocks.+-- While they are internally distinct they can still share common blocks. mergeBlocks :: Subst -> DistinctBlocks -> DistinctBlocks -> (Subst, DistinctBlocks) mergeBlocks subst existing new = go new   where@@ -166,14 +173,14 @@         hash_lit (CmmVec ls) = hash_list hash_lit ls         hash_lit (CmmLabel _) = 119 -- ugh         hash_lit (CmmLabelOff _ i) = cvt $ 199 + i-        hash_lit (CmmLabelDiffOff _ _ i) = cvt $ 299 + i+        hash_lit (CmmLabelDiffOff _ _ i _) = cvt $ 299 + i         hash_lit (CmmBlock _) = 191 -- ugh         hash_lit (CmmHighStackMark) = cvt 313          hash_tgt (ForeignTarget e _) = hash_e e         hash_tgt (PrimTarget _) = 31 -- lots of these -        hash_list f = foldl (\z x -> f x + z) (0::Word32)+        hash_list f = foldl' (\z x -> f x + z) (0::Word32)          cvt = fromInteger . toInteger @@ -281,8 +288,8 @@   | otherwise   = ofBlockMap (g_entry g) $ mapMap copyTo blockMap   where -- Reverse block merge map         blockMap = toBlockMap g-        revEnv = mapFoldWithKey insertRev M.empty env-        insertRev k x = M.insertWith (const (k:)) x [k]+        revEnv = mapFoldlWithKey insertRev M.empty env+        insertRev m k x = M.insertWith (const (k:)) x [k] m         -- Copy ticks and scopes into the given block         copyTo block = case M.lookup (entryLabel block) revEnv of           Nothing -> block@@ -295,17 +302,21 @@              foldr blockCons code (map CmmTick ticks)  -- Group by [Label]-groupByLabel :: [(Key, a)] -> [(Key, [a])]-groupByLabel = go (TM.emptyTM :: TM.ListMap UniqDFM a)-  where-    go !m [] = TM.foldTM (:) m []-    go !m ((k,v) : entries) = go (TM.alterTM k' adjust m) entries-      where k' = map getUnique k-            adjust Nothing       = Just (k,[v])-            adjust (Just (_,vs)) = Just (k,v:vs)-+-- See Note [Compressed TrieMap] in coreSyn/TrieMap about the usage of GenMap.+groupByLabel :: [(Key, DistinctBlocks)] -> [(Key, [DistinctBlocks])]+groupByLabel =+  go (TM.emptyTM :: TM.ListMap (TM.GenMap LabelMap) (Key, [DistinctBlocks]))+    where+      go !m [] = TM.foldTM (:) m []+      go !m ((k,v) : entries) = go (TM.alterTM k adjust m) entries+        where --k' = map (getKey . getUnique) k+              adjust Nothing       = Just (k,[v])+              adjust (Just (_,vs)) = Just (k,v:vs)  groupByInt :: (a -> Int) -> [a] -> [[a]] groupByInt f xs = nonDetEltsUFM $ List.foldl' go emptyUFM xs-  -- See Note [Unique Determinism and code generation]-  where go m x = alterUFM (Just . maybe [x] (x:)) m (f x)+   -- See Note [Unique Determinism and code generation]+  where+    go m x = alterUFM addEntry m (f x)+      where+        addEntry xs = Just $! maybe [x] (x:) xs
cmm/CmmContFlowOpt.hs view
@@ -24,6 +24,7 @@ import Util  import Control.Monad+import Data.List   -- Note [What is shortcutting]@@ -173,11 +174,10 @@        | otherwise        = (entry_id, shortcut_map) -     -- blocks is a list of blocks in DFS postorder, while blockmap is-     -- a map of blocks. We process each element from blocks and update-     -- blockmap accordingly-     blocks = postorderDfs g-     blockmap = foldr addBlock emptyBody blocks+     -- blocks are sorted in reverse postorder, but we want to go from the exit+     -- towards beginning, so we use foldr below.+     blocks = revPostorder g+     blockmap = foldl' (flip addBlock) emptyBody blocks       -- Accumulator contains three components:      --  * map of blocks in a graph@@ -254,8 +254,8 @@         -- unconditional jump to a block that can be shortcut.         | Nothing <- callContinuation_maybe last         = let oldSuccs = successors last-              newSuccs = successors swapcond_last-          in ( mapInsert bid (blockJoinTail head swapcond_last) blocks+              newSuccs = successors rewrite_last+          in ( mapInsert bid (blockJoinTail head rewrite_last) blocks              , shortcut_map              , if oldSuccs == newSuccs                then backEdges@@ -283,34 +283,58 @@                    Just b | Just dest <- canShortcut b -> dest                    _otherwise -> l -          -- For a conditional, we invert the conditional if that would make it-          -- more likely that the branch-not-taken case becomes a fallthrough.-          -- This helps the native codegen a little bit, and probably has no-          -- effect on LLVM.  It's convenient to do it here, where we have the-          -- information about predecessors.-          swapcond_last+          rewrite_last+            -- Sometimes we can get rid of the conditional completely.+            | CmmCondBranch _cond t f _l <- shortcut_last+            , t == f+            = CmmBranch t++            -- See Note [Invert Cmm conditionals]             | CmmCondBranch cond t f l <- shortcut_last-            , likelyFalse l-            , numPreds f > 1-            , hasOnePredecessor t+            , hasOnePredecessor t -- inverting will make t a fallthrough+            , likelyTrue l || (numPreds f > 1)             , Just cond' <- maybeInvertCmmExpr cond             = CmmCondBranch cond' f t (invertLikeliness l)              | otherwise             = shortcut_last -          likelyFalse (Just False) = True-          likelyFalse Nothing      = True-          likelyFalse _            = False+          likelyTrue (Just True)   = True+          likelyTrue _             = False -          invertLikeliness (Just b)     = Just (not b)-          invertLikeliness Nothing      = Nothing+          invertLikeliness :: Maybe Bool -> Maybe Bool+          invertLikeliness         = fmap not            -- Number of predecessors for a block           numPreds bid = mapLookup bid backEdges `orElse` 0            hasOnePredecessor b = numPreds b == 1 +{-+  Note [Invert Cmm conditionals]+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+  The native code generator always produces jumps to the true branch.+  Falling through to the false branch is however faster. So we try to+  arrange for that to happen.+  This means we invert the condition if:+  * The likely path will become a fallthrough.+  * We can't guarantee a fallthrough for the false branch but for the+    true branch.++  In some cases it's faster to avoid inverting when the false branch is likely.+  However determining when that is the case is neither easy nor cheap so for+  now we always invert as this produces smaller binaries and code that is+  equally fast on average. (On an i7-6700K)++  TODO:+  There is also the edge case when both branches have multiple predecessors.+  In this case we could assume that we will end up with a jump for BOTH+  branches. In this case it might be best to put the likely path in the true+  branch especially if there are large numbers of predecessors as this saves+  us the jump thats not taken. However I haven't tested this and as of early+  2018 we almost never generate cmm where this would apply.+-}+ -- Functions for incrementing and decrementing number of predecessors. If -- decrementing would set the predecessor count to 0, we remove entry from the -- map.@@ -408,14 +432,14 @@              -- Remove any info_tbls for unreachable       keep_used :: LabelMap CmmInfoTable -> LabelMap CmmInfoTable-     keep_used bs = mapFoldWithKey keep mapEmpty bs+     keep_used bs = mapFoldlWithKey keep mapEmpty bs -     keep :: Label -> CmmInfoTable -> LabelMap CmmInfoTable -> LabelMap CmmInfoTable-     keep l i env | l `setMember` used_lbls = mapInsert l i env+     keep :: LabelMap CmmInfoTable -> Label -> CmmInfoTable -> LabelMap CmmInfoTable+     keep env l i | l `setMember` used_lbls = mapInsert l i env                   | otherwise               = env       used_blocks :: [CmmBlock]-     used_blocks = postorderDfs g+     used_blocks = revPostorder g       used_lbls :: LabelSet      used_lbls = setFromList $ map entryLabel used_blocks
cmm/CmmExpr.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE BangPatterns #-}-{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -10,7 +9,10 @@     , CmmReg(..), cmmRegType     , CmmLit(..), cmmLitType     , LocalReg(..), localRegType-    , GlobalReg(..), isArgReg, globalRegType, spReg, hpReg, spLimReg, nodeReg, node, baseReg+    , GlobalReg(..), isArgReg, globalRegType+    , spReg, hpReg, spLimReg, hpLimReg, nodeReg+    , currentTSOReg, currentNurseryReg, hpAllocReg, cccsReg+    , node, baseReg     , VGcPtr(..)      , DefinerOfRegs, UserOfRegs@@ -186,7 +188,14 @@         -- Don't use it at all unless tablesNextToCode.         -- It is also used inside the NCG during when generating         -- position-independent code.-  | CmmLabelDiffOff CLabel CLabel Int   -- label1 - label2 + offset+  | CmmLabelDiffOff CLabel CLabel Int Width -- label1 - label2 + offset+        -- In an expression, the width just has the effect of MO_SS_Conv+        -- from wordWidth to the desired width.+        --+        -- In a static literal, the supported Widths depend on the+        -- architecture: wordWidth is supported on all+        -- architectures. Additionally W32 is supported on x86_64 when+        -- using the small memory model.    | CmmBlock {-# UNPACK #-} !BlockId     -- Code label         -- Invariant: must be a continuation BlockId@@ -219,7 +228,7 @@                                             else panic "cmmLitType: CmmVec" cmmLitType dflags (CmmLabel lbl)       = cmmLabelType dflags lbl cmmLitType dflags (CmmLabelOff lbl _)  = cmmLabelType dflags lbl-cmmLitType dflags (CmmLabelDiffOff {}) = bWord dflags+cmmLitType _      (CmmLabelDiffOff _ _ _ width) = cmmBits width cmmLitType dflags (CmmBlock _)         = bWord dflags cmmLitType dflags (CmmHighStackMark)   = bWord dflags @@ -551,12 +560,18 @@    compare _ EagerBlackholeInfo = GT  -- convenient aliases-baseReg, spReg, hpReg, spLimReg, nodeReg :: CmmReg+baseReg, spReg, hpReg, spLimReg, hpLimReg, nodeReg,+  currentTSOReg, currentNurseryReg, hpAllocReg, cccsReg  :: CmmReg baseReg = CmmGlobal BaseReg spReg = CmmGlobal Sp hpReg = CmmGlobal Hp+hpLimReg = CmmGlobal HpLim spLimReg = CmmGlobal SpLim nodeReg = CmmGlobal node+currentTSOReg = CmmGlobal CurrentTSO+currentNurseryReg = CmmGlobal CurrentNursery+hpAllocReg = CmmGlobal HpAlloc+cccsReg = CmmGlobal CCCS  node :: GlobalReg node = VanillaReg 1 VGcPtr
cmm/CmmInfo.hs view
@@ -45,6 +45,7 @@ import qualified Stream import Hoopl.Collections +import Platform import Maybes import DynFlags import Panic@@ -62,7 +63,8 @@   = CmmInfoTable { cit_lbl  = info_lbl                  , cit_rep  = mkStackRep []                  , cit_prof = NoProfilingInfo-                 , cit_srt  = NoC_SRT }+                 , cit_srt  = Nothing+                 , cit_clo  = Nothing }  cmmToRawCmm :: DynFlags -> Stream IO CmmGroup ()             -> IO (Stream IO RawCmmGroup ())@@ -188,7 +190,7 @@    | StackRep frame <- smrep   = do { (prof_lits, prof_data) <- mkProfLits dflags prof-       ; let (srt_label, srt_bitmap) = mkSRTLit dflags srt+       ; let (srt_label, srt_bitmap) = mkSRTLit dflags info_lbl srt        ; (liveness_lit, liveness_data) <- mkLivenessBits dflags frame        ; let              std_info = mkStdInfoTable dflags prof_lits rts_tag srt_bitmap liveness_lit@@ -201,7 +203,7 @@   | HeapRep _ ptrs nonptrs closure_type <- smrep   = do { let layout  = packIntsCLit dflags ptrs nonptrs        ; (prof_lits, prof_data) <- mkProfLits dflags prof-       ; let (srt_label, srt_bitmap) = mkSRTLit dflags srt+       ; let (srt_label, srt_bitmap) = mkSRTLit dflags info_lbl srt        ; (mb_srt_field, mb_layout, extra_bits, ct_data)                                 <- mk_pieces closure_type srt_label        ; let std_info = mkStdInfoTable dflags prof_lits@@ -211,20 +213,22 @@        ; return (prof_data ++ ct_data, (std_info, extra_bits)) }   where     mk_pieces :: ClosureTypeInfo -> [CmmLit]-              -> UniqSM ( Maybe StgHalfWord  -- Override the SRT field with this-                        , Maybe CmmLit       -- Override the layout field with this+              -> UniqSM ( Maybe CmmLit  -- Override the SRT field with this+                        , Maybe CmmLit  -- Override the layout field with this                         , [CmmLit]           -- "Extra bits" for info table                         , [RawCmmDecl])      -- Auxiliary data decls     mk_pieces (Constr con_tag con_descr) _no_srt    -- A data constructor       = do { (descr_lit, decl) <- newStringLit con_descr-           ; return ( Just (toStgHalfWord dflags (fromIntegral con_tag))+           ; return ( Just (CmmInt (fromIntegral con_tag)+                                   (halfWordWidth dflags))                     , Nothing, [descr_lit], [decl]) }      mk_pieces Thunk srt_label       = return (Nothing, Nothing, srt_label, [])      mk_pieces (ThunkSelector offset) _no_srt-      = return (Just (toStgHalfWord dflags 0), Just (mkWordCLit dflags (fromIntegral offset)), [], [])+      = return (Just (CmmInt 0 (halfWordWidth dflags)),+                Just (mkWordCLit dflags (fromIntegral offset)), [], [])          -- Layout known (one free var); we use the layout field for offset      mk_pieces (Fun arity (ArgSpec fun_type)) srt_label@@ -235,8 +239,9 @@       = do { (liveness_lit, liveness_data) <- mkLivenessBits dflags arg_bits            ; let fun_type | null liveness_data = aRG_GEN                           | otherwise          = aRG_GEN_BIG-                 extra_bits = [ packIntsCLit dflags fun_type arity-                              , srt_lit, liveness_lit, slow_entry ]+                 extra_bits = [ packIntsCLit dflags fun_type arity ]+                           ++ (if inlineSRT dflags then [] else [ srt_lit ])+                           ++ [ liveness_lit, slow_entry ]            ; return (Nothing, Nothing, extra_bits, liveness_data) }       where         slow_entry = CmmLabel (toSlowEntryLbl info_lbl)@@ -255,13 +260,25 @@   mkSRTLit :: DynFlags-         -> C_SRT+         -> CLabel+         -> Maybe CLabel          -> ([CmmLit],    -- srt_label, if any-             StgHalfWord) -- srt_bitmap-mkSRTLit dflags NoC_SRT                = ([], toStgHalfWord dflags 0)-mkSRTLit dflags (C_SRT lbl off bitmap) = ([cmmLabelOffW dflags lbl off], bitmap)+             CmmLit)      -- srt_bitmap+mkSRTLit dflags info_lbl (Just lbl)+  | inlineSRT dflags+  = ([], CmmLabelDiffOff lbl info_lbl 0 (halfWordWidth dflags))+mkSRTLit dflags _ Nothing    = ([], CmmInt 0 (halfWordWidth dflags))+mkSRTLit dflags _ (Just lbl) = ([CmmLabel lbl], CmmInt 1 (halfWordWidth dflags))  +-- | Is the SRT offset field inline in the info table on this platform?+--+-- See the section "Referring to an SRT from the info table" in+-- Note [SRTs] in CmmBuildInfoTables.hs+inlineSRT :: DynFlags -> Bool+inlineSRT dflags = platformArch (targetPlatform dflags) == ArchX86_64+  && tablesNextToCode dflags+ ------------------------------------------------------------------------- -- --      Lay out the info table and handle relative offsets@@ -292,10 +309,10 @@  makeRelativeRefTo dflags info_lbl (CmmLabel lbl)   | tablesNextToCode dflags-  = CmmLabelDiffOff lbl info_lbl 0+  = CmmLabelDiffOff lbl info_lbl 0 (wordWidth dflags) makeRelativeRefTo dflags info_lbl (CmmLabelOff lbl off)   | tablesNextToCode dflags-  = CmmLabelDiffOff lbl info_lbl off+  = CmmLabelDiffOff lbl info_lbl off (wordWidth dflags) makeRelativeRefTo _ _ lit = lit  @@ -368,23 +385,23 @@    :: DynFlags    -> (CmmLit,CmmLit)   -- Closure type descr and closure descr  (profiling)    -> Int               -- Closure RTS tag-   -> StgHalfWord       -- SRT length+   -> CmmLit            -- SRT length    -> CmmLit            -- layout field    -> [CmmLit] -mkStdInfoTable dflags (type_descr, closure_descr) cl_type srt_len layout_lit+mkStdInfoTable dflags (type_descr, closure_descr) cl_type srt layout_lit  =      -- Parallel revertible-black hole field     prof_info         -- Ticky info (none at present)         -- Debug info (none at present)- ++ [layout_lit, type_lit]+ ++ [layout_lit, tag, srt]   where     prof_info         | gopt Opt_SccProfilingOn dflags = [type_descr, closure_descr]         | otherwise = [] -    type_lit = packHalfWordsCLit dflags (toStgHalfWord dflags (fromIntegral cl_type)) srt_len+    tag = CmmInt (fromIntegral cl_type) (halfWordWidth dflags)  ------------------------------------------------------------------------- --
cmm/CmmLayoutStack.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns, CPP, RecordWildCards, GADTs #-}+{-# LANGUAGE BangPatterns, RecordWildCards, GADTs #-} module CmmLayoutStack (        cmmLayoutStack, setInfoTableStackMap   ) where@@ -37,9 +37,7 @@ import Control.Monad.Fix import Data.Array as Array import Data.Bits-import Data.List (nub)--#include "HsVersions.h"+import Data.List (nub, foldl')  {- Note [Stack Layout] @@ -246,7 +244,7 @@     -- We need liveness info. Dead assignments are removed later     -- by the sinking pass.     let liveness = cmmLocalLiveness dflags graph-        blocks = postorderDfs graph+        blocks = revPostorder graph      (final_stackmaps, _final_high_sp, new_blocks) <-           mfix $ \ ~(rec_stackmaps, rec_high_sp, _new_blocks) ->@@ -324,7 +322,7 @@        --    Sp = Sp + sp_off -- Sp adjustment goes here        --    last1            -- the last node        ---       let middle_pre = blockToList $ foldl blockSnoc middle0 middle1+       let middle_pre = blockToList $ foldl' blockSnoc middle0 middle1         let final_blocks =                manifestSp dflags final_stackmaps stack0 sp0 final_sp_high@@ -579,15 +577,8 @@   | otherwise = do     tmp_lbl <- newBlockId     let sp_off = sp0 - sm_sp stack-        maybeAddUnwind block-          | debugLevel dflags > 0-          = block `blockSnoc` CmmUnwind [(Sp, Just unwind_val)]-          | otherwise-          = block-          where unwind_val = cmmOffset dflags (CmmReg spReg) (sm_sp stack)         block = blockJoin (CmmEntry tmp_lbl tscope)-                          (  maybeAddSpAdj dflags sp_off-                           $ maybeAddUnwind+                          ( maybeAddSpAdj dflags sp0 sp_off                            $ blockFromList assigs )                           (CmmBranch l)     return (tmp_lbl, [block])@@ -853,28 +844,7 @@     adj_pre_sp  = mapExpDeep (areaToSp dflags sp0            sp_high area_off)     adj_post_sp = mapExpDeep (areaToSp dflags (sp0 - sp_off) sp_high area_off) -    -- Add unwind pseudo-instruction at the beginning of each block to-    -- document Sp level for debugging-    add_initial_unwind block-      | debugLevel dflags > 0-      = CmmUnwind [(Sp, Just sp_unwind)] `blockCons` block-      | otherwise-      = block-      where sp_unwind = CmmRegOff spReg (sp0 - wORD_SIZE dflags)--    -- Add unwind pseudo-instruction right before the Sp adjustment-    -- if there is one.-    add_adj_unwind block-      | debugLevel dflags > 0-      , sp_off /= 0-      = block `blockSnoc` CmmUnwind [(Sp, Just sp_unwind)]-      | otherwise-      = block-      where sp_unwind = CmmRegOff spReg (sp0 - wORD_SIZE dflags - sp_off)--    final_middle = maybeAddSpAdj dflags sp_off-                 . add_adj_unwind-                 . add_initial_unwind+    final_middle = maybeAddSpAdj dflags sp0 sp_off                  . blockFromList                  . map adj_pre_sp                  . elimStackStores stack0 stackmaps area_off@@ -893,12 +863,34 @@     Nothing -> pprPanic "getAreaOff" (ppr l)  -maybeAddSpAdj :: DynFlags -> ByteOff -> Block CmmNode O O -> Block CmmNode O O-maybeAddSpAdj _      0      block = block-maybeAddSpAdj dflags sp_off block = block `blockSnoc` adj+maybeAddSpAdj+  :: DynFlags -> ByteOff -> ByteOff -> Block CmmNode O O -> Block CmmNode O O+maybeAddSpAdj dflags sp0 sp_off block =+  add_initial_unwind $ add_adj_unwind $ adj block   where-    adj = CmmAssign spReg (cmmOffset dflags (CmmReg spReg) sp_off)+    adj block+      | sp_off /= 0+      = block `blockSnoc` CmmAssign spReg (cmmOffset dflags spExpr sp_off)+      | otherwise = block+    -- Add unwind pseudo-instruction at the beginning of each block to+    -- document Sp level for debugging+    add_initial_unwind block+      | debugLevel dflags > 0+      = CmmUnwind [(Sp, Just sp_unwind)] `blockCons` block+      | otherwise+      = block+      where sp_unwind = CmmRegOff spReg (sp0 - wORD_SIZE dflags) +    -- Add unwind pseudo-instruction right after the Sp adjustment+    -- if there is one.+    add_adj_unwind block+      | debugLevel dflags > 0+      , sp_off /= 0+      = block `blockSnoc` CmmUnwind [(Sp, Just sp_unwind)]+      | otherwise+      = block+      where sp_unwind = CmmRegOff spReg (sp0 - wORD_SIZE dflags - sp_off)+ {- Note [SP old/young offsets]  Sp(L) is the Sp offset on entry to block L relative to the base of the@@ -920,7 +912,7 @@ areaToSp :: DynFlags -> ByteOff -> ByteOff -> (Area -> StackLoc) -> CmmExpr -> CmmExpr  areaToSp dflags sp_old _sp_hwm area_off (CmmStackSlot area n)-  = cmmOffset dflags (CmmReg spReg) (sp_old - area_off area - n)+  = cmmOffset dflags spExpr (sp_old - area_off area - n)     -- Replace (CmmStackSlot area n) with an offset from Sp  areaToSp dflags _ sp_hwm _ (CmmLit CmmHighStackMark)@@ -1090,7 +1082,7 @@      [ CmmAssign (CmmLocal reg)                  -- This cmmOffset basically corresponds to manifesting                  -- @CmmStackSlot Old sp_off@, see Note [SP old/young offsets]-                 (CmmLoad (cmmOffset dflags (CmmReg spReg) (sp_off - reg_off))+                 (CmmLoad (cmmOffset dflags spExpr (sp_off - reg_off))                           (localRegType reg))      | (reg, reg_off) <- stackSlotRegs stackmap      , reg `elemRegSet` live@@ -1143,7 +1135,7 @@     -- Both 'id' and 'new_base' are KindNonPtr because they're     -- RTS-only objects and are not subject to garbage collection     id <- newTemp (bWord dflags)-    new_base <- newTemp (cmmRegType dflags (CmmGlobal BaseReg))+    new_base <- newTemp (cmmRegType dflags baseReg)     let (caller_save, caller_load) = callerSaveVolatileRegs dflags     save_state_code <- saveThreadState dflags     load_state_code <- loadThreadState dflags@@ -1154,7 +1146,7 @@         resume  = mkMiddle (callResumeThread new_base id) <*>                   -- Assign the result to BaseReg: we                   -- might now have a different Capability!-                  mkAssign (CmmGlobal BaseReg) (CmmReg (CmmLocal new_base)) <*>+                  mkAssign baseReg (CmmReg (CmmLocal new_base)) <*>                   caller_load <*>                   load_state_code @@ -1169,7 +1161,7 @@         -- different.  Hence we continue by jumping to the top stack frame,         -- not by jumping to succ.         jump = CmmCall { cml_target    = entryCode dflags $-                                         CmmLoad (CmmReg spReg) (bWord dflags)+                                         CmmLoad spExpr (bWord dflags)                        , cml_cont      = Just succ                        , cml_args_regs = regs                        , cml_args      = widthInBytes (wordWidth dflags)@@ -1199,7 +1191,7 @@   CmmUnsafeForeignCall        (ForeignTarget (foreignLbl (fsLit "suspendThread"))         (ForeignConvention CCallConv [AddrHint, NoHint] [AddrHint] CmmMayReturn))-       [id] [CmmReg (CmmGlobal BaseReg), mkIntExpr dflags (fromEnum intrbl)]+       [id] [baseExpr, mkIntExpr dflags (fromEnum intrbl)]  callResumeThread :: LocalReg -> LocalReg -> CmmNode O O callResumeThread new_base id =
− cmm/CmmLex.hs
@@ -1,850 +0,0 @@-{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-}-{-# LANGUAGE CPP,MagicHash #-}-{-# LINE 13 "compiler/cmm/CmmLex.x" #-}---- See Note [Warnings in code generated by Alex] in compiler/parser/Lexer.x-{-# OPTIONS_GHC -fno-warn-unused-matches #-}-{-# OPTIONS_GHC -fno-warn-unused-binds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-tabs #-}-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}--module CmmLex (-   CmmToken(..), cmmlex,-  ) where--import GhcPrelude--import CmmExpr--import Lexer-import CmmMonad-import SrcLoc-import UniqFM-import StringBuffer-import FastString-import Ctype-import Util---import TRACE--import Data.Word-import Data.Char--#if __GLASGOW_HASKELL__ >= 603-#include "ghcconfig.h"-#elif defined(__GLASGOW_HASKELL__)-#include "config.h"-#endif-#if __GLASGOW_HASKELL__ >= 503-import Data.Array-import Data.Array.Base (unsafeAt)-#else-import Array-#endif-#if __GLASGOW_HASKELL__ >= 503-import GHC.Exts-#else-import GlaExts-#endif-alex_tab_size :: Int-alex_tab_size = 8-alex_base :: AlexAddr-alex_base = AlexA#-  "\x01\x00\x00\x00\xc9\x00\x00\x00\x4e\x00\x00\x00\xb9\x00\x00\x00\x9f\xff\xff\xff\xd6\x00\x00\x00\xf2\x00\x00\x00\x0f\x01\x00\x00\x1d\x01\x00\x00\xa4\xff\xff\xff\x2b\x01\x00\x00\xb8\xff\xff\xff\xd8\xff\xff\xff\xdb\xff\xff\xff\xe5\xff\xff\xff\xd6\xff\xff\xff\x43\x01\x00\x00\xdc\xff\xff\xff\xba\x01\x00\x00\xdd\x01\x00\x00\x41\x00\x00\x00\x42\x00\x00\x00\xd2\x00\x00\x00\x72\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf4\xff\xff\xff\x45\x00\x00\x00\x5b\x00\x00\x00\x65\x01\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x68\x00\x00\x00\x5f\x00\x00\x00\x65\x00\x00\x00\x61\x00\x00\x00\x6c\x00\x00\x00\x46\x00\x00\x00\x5d\x00\x00\x00\x62\x00\x00\x00\x48\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x1b\x00\x00\x00\x00\x00\x00\x00\xe6\xff\xff\xff\x44\x00\x00\x00\x37\x00\x00\x00\x3a\x00\x00\x00\x2e\x00\x00\x00\x15\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\xdd\x02\x00\x00\xdc\x03\x00\x00\xdb\x04\x00\x00\xda\x05\x00\x00\xd9\x06\x00\x00\xd9\x07\x00\x00\xac\x08\x00\x00\x7f\x09\x00\x00\x52\x0a\x00\x00\x25\x0b\x00\x00\xf8\x0b\x00\x00\xcb\x0c\x00\x00\x9e\x0d\x00\x00\x71\x0e\x00\x00\x44\x0f\x00\x00\x17\x10\x00\x00\xdf\x10\x00\x00\xde\x11\x00\x00\xdd\x12\x00\x00\xdc\x13\x00\x00\xdb\x14\x00\x00\xdb\x15\x00\x00\xae\x16\x00\x00\x81\x17\x00\x00\x54\x18\x00\x00\x27\x19\x00\x00\xfa\x19\x00\x00\xcd\x1a\x00\x00\xa0\x1b\x00\x00\x73\x1c\x00\x00\x46\x1d\x00\x00\x19\x1e\x00\x00\xec\x1e\x00\x00\xbf\x1f\x00\x00\x92\x20\x00\x00\x65\x21\x00\x00\x38\x22\x00\x00\x0b\x23\x00\x00\xde\x23\x00\x00\xb1\x24\x00\x00\x84\x25\x00\x00\x57\x26\x00\x00\x2a\x27\x00\x00\xfd\x27\x00\x00\xd0\x28\x00\x00\xa3\x29\x00\x00\x76\x2a\x00\x00\x49\x2b\x00\x00\x1c\x2c\x00\x00\xef\x2c\x00\x00\xc2\x2d\x00\x00\x95\x2e\x00\x00\x68\x2f\x00\x00\x3b\x30\x00\x00\x0e\x31\x00\x00\xe1\x31\x00\x00\xb4\x32\x00\x00\x87\x33\x00\x00\x5a\x34\x00\x00\x2d\x35\x00\x00\x00\x36\x00\x00\xd3\x36\x00\x00\xa6\x37\x00\x00\x79\x38\x00\x00\x4c\x39\x00\x00\x1f\x3a\x00\x00\xf2\x3a\x00\x00\xc5\x3b\x00\x00\x98\x3c\x00\x00\x6b\x3d\x00\x00\x3e\x3e\x00\x00\x11\x3f\x00\x00\xe4\x3f\x00\x00\xb7\x40\x00\x00\x8a\x41\x00\x00\x37\x03\x00\x00\xb3\x03\x00\x00\x52\x42\x00\x00\x5c\x42\x00\x00\x36\x04\x00\x00\x46\x02\x00\x00\x00\x00\x00\x00"#--alex_table :: AlexAddr-alex_table = AlexA#-  "\x00\x00\xff\xff\x88\x00\xff\xff\x19\x00\x15\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\x29\x00\x16\x00\x16\x00\x16\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\x16\x00\x2b\x00\x13\x00\x1a\x00\x09\x00\x2c\x00\x2e\x00\xff\xff\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x2c\x00\x86\x00\x2c\x00\x89\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x31\x00\x2c\x00\x2f\x00\x2a\x00\x30\x00\xff\xff\x11\x00\x0b\x00\x6a\x00\x61\x00\x4f\x00\x0d\x00\x4e\x00\x0e\x00\x84\x00\x04\x00\xff\xff\x18\x00\x50\x00\x67\x00\xff\xff\xff\xff\x4c\x00\x18\x00\x4d\x00\x85\x00\x38\x00\x70\x00\x16\x00\x39\x00\x16\x00\x16\x00\x16\x00\x2c\x00\xff\xff\x2c\x00\x2c\x00\x0c\x00\x2c\x00\x3b\x00\x1e\x00\x0f\x00\xff\xff\xff\xff\xff\xff\x33\x00\xff\xff\x3a\x00\xff\xff\xff\xff\x00\x00\x16\x00\xff\xff\x14\x00\x1a\x00\xff\xff\x35\x00\x37\x00\x00\x00\xff\xff\x36\x00\x34\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x2d\x00\x2c\x00\x2c\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\x16\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\x1b\x00\x17\x00\xff\xff\x17\x00\x17\x00\x17\x00\x22\x00\x21\x00\x28\x00\x1d\x00\x26\x00\x20\x00\x23\x00\x27\x00\x24\x00\x1f\x00\x00\x00\x16\x00\x00\x00\x16\x00\x16\x00\x16\x00\x8a\x00\xff\xff\x17\x00\x00\x00\x16\x00\x1c\x00\x16\x00\x16\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x00\x00\x1a\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x16\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x08\x00\x8c\x00\x08\x00\x00\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x00\x00\x00\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x00\x00\x00\x00\x17\x00\x00\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x13\x00\x1d\x00\x00\x00\x00\x00\x16\x00\x13\x00\x00\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x16\x00\x13\x00\x13\x00\x13\x00\x13\x00\x13\x00\x13\x00\x13\x00\x13\x00\x17\x00\xff\xff\x17\x00\x17\x00\x17\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x12\x00\x17\x00\x00\x00\x00\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x1d\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x13\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x13\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x8d\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\x00\x00\x00\x00\x8d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xff\xff\x10\x00\xff\xff\x00\x00\x00\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\x10\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\xff\xff\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x88\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\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\x00\x00\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x88\x00\x88\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\x06\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x88\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x3d\x00\x00\x00\x6f\x00\x6f\x00\x07\x00\x00\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\x00\x88\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\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x00\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\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\x06\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x3e\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x3f\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x40\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\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\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\xff\xff\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x3d\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x3e\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x3e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x3f\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x40\x00\x00\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\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\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x45\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x53\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x62\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x64\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x79\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x78\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x71\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x32\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x88\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\xff\xff\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x87\x00\x88\x00\x88\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\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\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\x00\x8a\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--alex_check :: AlexAddr-alex_check = AlexA#-  "\xff\xff\x00\x00\x01\x00\x02\x00\x65\x00\x61\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x6d\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x69\x00\x67\x00\x42\x00\x43\x00\x44\x00\x61\x00\x46\x00\x72\x00\x48\x00\x6e\x00\x0a\x00\x0a\x00\x4c\x00\x4d\x00\x0a\x00\x0a\x00\x50\x00\x0a\x00\x52\x00\x53\x00\x3d\x00\x55\x00\x09\x00\x3d\x00\x0b\x00\x0c\x00\x0d\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x6c\x00\x60\x00\x7c\x00\x22\x00\x70\x00\x0a\x00\x0a\x00\x0a\x00\x3a\x00\x0a\x00\x26\x00\x0a\x00\x0a\x00\xff\xff\x20\x00\x0a\x00\x22\x00\x23\x00\x0a\x00\x3c\x00\x3d\x00\xff\xff\x0a\x00\x3d\x00\x3e\x00\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\x65\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x6c\x00\x67\x00\x61\x00\x01\x00\x70\x00\x6d\x00\x61\x00\x69\x00\x72\x00\x6e\x00\xff\xff\x09\x00\xff\xff\x0b\x00\x0c\x00\x0d\x00\x01\x00\xd7\x00\x20\x00\xff\xff\x09\x00\x23\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\x23\x00\xff\xff\xa0\x00\xff\xff\xff\xff\xff\xff\x20\x00\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf7\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\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x2b\x00\x01\x00\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xa0\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x22\x00\x01\x00\xff\xff\xff\xff\xa0\x00\x27\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xa0\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\x3f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x20\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\xff\xff\xff\xff\xff\xff\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6e\x00\xff\xff\xff\xff\xff\xff\x72\x00\xff\xff\x74\x00\xff\xff\xff\xff\x00\x00\x78\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\x00\x00\x00\x01\x00\x02\x00\x03\x00\x04\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\xff\xff\xff\xff\x22\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\xa0\x00\xff\xff\xff\xff\x00\x00\x5c\x00\x02\x00\xff\xff\xff\xff\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x5c\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xf7\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\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x01\x00\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\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\x65\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\x01\x00\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x65\x00\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x01\x00\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x45\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\x65\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\xff\xff\x02\x00\xff\xff\xff\xff\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x4c\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\x03\x00\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xf7\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\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x01\x00\xff\xff\x03\x00\x04\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\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\xcd\x00\xce\x00\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xd3\x00\xd4\x00\xd5\x00\xd6\x00\xff\xff\xd8\x00\xd9\x00\xda\x00\xdb\x00\xdc\x00\xdd\x00\xde\x00\xdf\x00\xe0\x00\xe1\x00\xe2\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xe7\x00\xe8\x00\xe9\x00\xea\x00\xeb\x00\xec\x00\xed\x00\xee\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xf5\x00\xf6\x00\xff\xff\xf8\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\xfd\x00\xfe\x00\xff\x00\x00\x00\xff\xff\x02\x00\xff\xff\xff\xff\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6d\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6d\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x79\x00\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\x63\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\x43\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x53\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\xff\xff\x43\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x75\x00\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x73\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\x63\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x73\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\x61\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x75\x00\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\x61\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x75\x00\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\x65\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x77\x00\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6e\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6e\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\x64\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x72\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x72\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x72\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x72\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6e\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x6e\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6c\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x74\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x68\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6c\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x72\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\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\x00\x00\xff\xff\x02\x00\xff\xff\xd7\x00\x05\x00\x06\x00\x07\x00\x08\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xf7\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\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\x5b\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\x60\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\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\x8f\x00\x90\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\x00\x9b\x00\x9c\x00\x9d\x00\x9e\x00\x9f\x00\xa0\x00\xa1\x00\xa2\x00\xa3\x00\xa4\x00\xa5\x00\xa6\x00\xa7\x00\xa8\x00\xa9\x00\xaa\x00\xab\x00\xac\x00\xad\x00\xae\x00\xaf\x00\xb0\x00\xb1\x00\xb2\x00\xb3\x00\xb4\x00\xb5\x00\xb6\x00\xb7\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\xff\xff\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\x2e\x00\xf7\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x78\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#--alex_deflt :: AlexAddr-alex_deflt = AlexA#-  "\x6f\x00\xff\xff\xff\xff\x25\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\x13\x00\x13\x00\x14\x00\x15\x00\xff\xff\x25\x00\xff\xff\xff\xff\xff\xff\x25\x00\x25\x00\xff\xff\xff\xff\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x25\x00\x28\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6f\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\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#--alex_accept = listArray (0 :: Int, 141)-  [ AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAcc 118-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccSkip-  , AlexAccSkip-  , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 117 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 116 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 115 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAcc 114)-  , AlexAccPred 113 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAcc 112)-  , AlexAcc 111-  , AlexAcc 110-  , AlexAcc 109-  , AlexAcc 108-  , AlexAcc 107-  , AlexAcc 106-  , AlexAcc 105-  , AlexAcc 104-  , AlexAcc 103-  , AlexAcc 102-  , AlexAcc 101-  , AlexAcc 100-  , AlexAccSkip-  , AlexAcc 99-  , AlexAcc 98-  , AlexAcc 97-  , AlexAcc 96-  , AlexAcc 95-  , AlexAcc 94-  , AlexAcc 93-  , AlexAcc 92-  , AlexAcc 91-  , AlexAcc 90-  , AlexAcc 89-  , AlexAcc 88-  , AlexAcc 87-  , AlexAcc 86-  , AlexAcc 85-  , AlexAcc 84-  , AlexAcc 83-  , AlexAcc 82-  , AlexAcc 81-  , AlexAcc 80-  , AlexAcc 79-  , AlexAcc 78-  , AlexAcc 77-  , AlexAcc 76-  , AlexAcc 75-  , AlexAcc 74-  , AlexAcc 73-  , AlexAcc 72-  , AlexAcc 71-  , AlexAcc 70-  , AlexAcc 69-  , AlexAcc 68-  , AlexAcc 67-  , AlexAcc 66-  , AlexAcc 65-  , AlexAcc 64-  , AlexAcc 63-  , AlexAcc 62-  , AlexAcc 61-  , AlexAcc 60-  , AlexAcc 59-  , AlexAcc 58-  , AlexAcc 57-  , AlexAcc 56-  , AlexAcc 55-  , AlexAcc 54-  , AlexAcc 53-  , AlexAcc 52-  , AlexAcc 51-  , AlexAcc 50-  , AlexAcc 49-  , AlexAcc 48-  , AlexAcc 47-  , AlexAcc 46-  , AlexAcc 45-  , AlexAcc 44-  , AlexAcc 43-  , AlexAcc 42-  , AlexAcc 41-  , AlexAcc 40-  , AlexAcc 39-  , AlexAcc 38-  , AlexAcc 37-  , AlexAcc 36-  , AlexAcc 35-  , AlexAcc 34-  , AlexAcc 33-  , AlexAcc 32-  , AlexAcc 31-  , AlexAcc 30-  , AlexAcc 29-  , AlexAcc 28-  , AlexAcc 27-  , AlexAcc 26-  , AlexAcc 25-  , AlexAcc 24-  , AlexAcc 23-  , AlexAcc 22-  , AlexAcc 21-  , AlexAcc 20-  , AlexAcc 19-  , AlexAcc 18-  , AlexAcc 17-  , AlexAcc 16-  , AlexAcc 15-  , AlexAcc 14-  , AlexAcc 13-  , AlexAcc 12-  , AlexAcc 11-  , AlexAcc 10-  , AlexAcc 9-  , AlexAcc 8-  , AlexAcc 7-  , AlexAcc 6-  , AlexAcc 5-  , AlexAcc 4-  , AlexAcc 3-  , AlexAcc 2-  , AlexAcc 1-  , AlexAcc 0-  ]--alex_actions = array (0 :: Int, 119)-  [ (118,alex_action_5)-  , (117,alex_action_2)-  , (116,alex_action_2)-  , (115,alex_action_2)-  , (114,alex_action_5)-  , (113,alex_action_2)-  , (112,alex_action_5)-  , (111,alex_action_3)-  , (110,alex_action_4)-  , (109,alex_action_5)-  , (108,alex_action_5)-  , (107,alex_action_5)-  , (106,alex_action_5)-  , (105,alex_action_5)-  , (104,alex_action_5)-  , (103,alex_action_5)-  , (102,alex_action_5)-  , (101,alex_action_5)-  , (100,alex_action_5)-  , (99,alex_action_7)-  , (98,alex_action_7)-  , (97,alex_action_7)-  , (96,alex_action_7)-  , (95,alex_action_7)-  , (94,alex_action_7)-  , (93,alex_action_7)-  , (92,alex_action_7)-  , (91,alex_action_8)-  , (90,alex_action_9)-  , (89,alex_action_10)-  , (88,alex_action_11)-  , (87,alex_action_12)-  , (86,alex_action_13)-  , (85,alex_action_14)-  , (84,alex_action_15)-  , (83,alex_action_16)-  , (82,alex_action_17)-  , (81,alex_action_18)-  , (80,alex_action_19)-  , (79,alex_action_20)-  , (78,alex_action_21)-  , (77,alex_action_22)-  , (76,alex_action_23)-  , (75,alex_action_24)-  , (74,alex_action_25)-  , (73,alex_action_26)-  , (72,alex_action_27)-  , (71,alex_action_28)-  , (70,alex_action_29)-  , (69,alex_action_30)-  , (68,alex_action_31)-  , (67,alex_action_32)-  , (66,alex_action_33)-  , (65,alex_action_34)-  , (64,alex_action_34)-  , (63,alex_action_34)-  , (62,alex_action_34)-  , (61,alex_action_34)-  , (60,alex_action_34)-  , (59,alex_action_34)-  , (58,alex_action_34)-  , (57,alex_action_34)-  , (56,alex_action_34)-  , (55,alex_action_34)-  , (54,alex_action_34)-  , (53,alex_action_34)-  , (52,alex_action_34)-  , (51,alex_action_34)-  , (50,alex_action_34)-  , (49,alex_action_34)-  , (48,alex_action_34)-  , (47,alex_action_34)-  , (46,alex_action_34)-  , (45,alex_action_34)-  , (44,alex_action_34)-  , (43,alex_action_34)-  , (42,alex_action_34)-  , (41,alex_action_34)-  , (40,alex_action_34)-  , (39,alex_action_34)-  , (38,alex_action_34)-  , (37,alex_action_34)-  , (36,alex_action_34)-  , (35,alex_action_34)-  , (34,alex_action_34)-  , (33,alex_action_34)-  , (32,alex_action_34)-  , (31,alex_action_34)-  , (30,alex_action_34)-  , (29,alex_action_34)-  , (28,alex_action_34)-  , (27,alex_action_34)-  , (26,alex_action_34)-  , (25,alex_action_34)-  , (24,alex_action_34)-  , (23,alex_action_34)-  , (22,alex_action_34)-  , (21,alex_action_34)-  , (20,alex_action_34)-  , (19,alex_action_34)-  , (18,alex_action_34)-  , (17,alex_action_34)-  , (16,alex_action_34)-  , (15,alex_action_34)-  , (14,alex_action_34)-  , (13,alex_action_34)-  , (12,alex_action_34)-  , (11,alex_action_34)-  , (10,alex_action_34)-  , (9,alex_action_34)-  , (8,alex_action_34)-  , (7,alex_action_34)-  , (6,alex_action_35)-  , (5,alex_action_36)-  , (4,alex_action_36)-  , (3,alex_action_37)-  , (2,alex_action_38)-  , (1,alex_action_38)-  , (0,alex_action_39)-  ]--{-# LINE 129 "compiler/cmm/CmmLex.x" #-}--data CmmToken-  = CmmT_SpecChar  Char-  | CmmT_DotDot-  | CmmT_DoubleColon-  | CmmT_Shr-  | CmmT_Shl-  | CmmT_Ge-  | CmmT_Le-  | CmmT_Eq-  | CmmT_Ne-  | CmmT_BoolAnd-  | CmmT_BoolOr-  | CmmT_CLOSURE-  | CmmT_INFO_TABLE-  | CmmT_INFO_TABLE_RET-  | CmmT_INFO_TABLE_FUN-  | CmmT_INFO_TABLE_CONSTR-  | CmmT_INFO_TABLE_SELECTOR-  | CmmT_else-  | CmmT_export-  | CmmT_section-  | CmmT_goto-  | CmmT_if-  | CmmT_call-  | CmmT_jump-  | CmmT_foreign-  | CmmT_never-  | CmmT_prim-  | CmmT_reserve-  | CmmT_return-  | CmmT_returns-  | CmmT_import-  | CmmT_switch-  | CmmT_case-  | CmmT_default-  | CmmT_push-  | CmmT_unwind-  | CmmT_bits8-  | CmmT_bits16-  | CmmT_bits32-  | CmmT_bits64-  | CmmT_bits128-  | CmmT_bits256-  | CmmT_bits512-  | CmmT_float32-  | CmmT_float64-  | CmmT_gcptr-  | CmmT_GlobalReg GlobalReg-  | CmmT_Name      FastString-  | CmmT_String    String-  | CmmT_Int       Integer-  | CmmT_Float     Rational-  | CmmT_EOF-  deriving (Show)---- -------------------------------------------------------------------------------- Lexer actions--type Action = RealSrcSpan -> StringBuffer -> Int -> PD (RealLocated CmmToken)--begin :: Int -> Action-begin code _span _str _len = do liftP (pushLexState code); lexToken--pop :: Action-pop _span _buf _len = liftP popLexState >> lexToken--special_char :: Action-special_char span buf _len = return (L span (CmmT_SpecChar (currentChar buf)))--kw :: CmmToken -> Action-kw tok span _buf _len = return (L span tok)--global_regN :: (Int -> GlobalReg) -> Action-global_regN con span buf len-  = return (L span (CmmT_GlobalReg (con (fromIntegral n))))-  where buf' = stepOn buf-        n = parseUnsignedInteger buf' (len-1) 10 octDecDigit--global_reg :: GlobalReg -> Action-global_reg r span _buf _len = return (L span (CmmT_GlobalReg r))--strtoken :: (String -> CmmToken) -> Action-strtoken f span buf len =-  return (L span $! (f $! lexemeToString buf len))--name :: Action-name span buf len =-  case lookupUFM reservedWordsFM fs of-        Just tok -> return (L span tok)-        Nothing  -> return (L span (CmmT_Name fs))-  where-        fs = lexemeToFastString buf len--reservedWordsFM = listToUFM $-        map (\(x, y) -> (mkFastString x, y)) [-        ( "CLOSURE",            CmmT_CLOSURE ),-        ( "INFO_TABLE",         CmmT_INFO_TABLE ),-        ( "INFO_TABLE_RET",     CmmT_INFO_TABLE_RET ),-        ( "INFO_TABLE_FUN",     CmmT_INFO_TABLE_FUN ),-        ( "INFO_TABLE_CONSTR",  CmmT_INFO_TABLE_CONSTR ),-        ( "INFO_TABLE_SELECTOR",CmmT_INFO_TABLE_SELECTOR ),-        ( "else",               CmmT_else ),-        ( "export",             CmmT_export ),-        ( "section",            CmmT_section ),-        ( "goto",               CmmT_goto ),-        ( "if",                 CmmT_if ),-        ( "call",               CmmT_call ),-        ( "jump",               CmmT_jump ),-        ( "foreign",            CmmT_foreign ),-        ( "never",              CmmT_never ),-        ( "prim",               CmmT_prim ),-        ( "reserve",            CmmT_reserve ),-        ( "return",             CmmT_return ),-        ( "returns",            CmmT_returns ),-        ( "import",             CmmT_import ),-        ( "switch",             CmmT_switch ),-        ( "case",               CmmT_case ),-        ( "default",            CmmT_default ),-        ( "push",               CmmT_push ),-        ( "unwind",             CmmT_unwind ),-        ( "bits8",              CmmT_bits8 ),-        ( "bits16",             CmmT_bits16 ),-        ( "bits32",             CmmT_bits32 ),-        ( "bits64",             CmmT_bits64 ),-        ( "bits128",            CmmT_bits128 ),-        ( "bits256",            CmmT_bits256 ),-        ( "bits512",            CmmT_bits512 ),-        ( "float32",            CmmT_float32 ),-        ( "float64",            CmmT_float64 ),--- New forms-        ( "b8",                 CmmT_bits8 ),-        ( "b16",                CmmT_bits16 ),-        ( "b32",                CmmT_bits32 ),-        ( "b64",                CmmT_bits64 ),-        ( "b128",               CmmT_bits128 ),-        ( "b256",               CmmT_bits256 ),-        ( "b512",               CmmT_bits512 ),-        ( "f32",                CmmT_float32 ),-        ( "f64",                CmmT_float64 ),-        ( "gcptr",              CmmT_gcptr )-        ]--tok_decimal span buf len-  = return (L span (CmmT_Int  $! parseUnsignedInteger buf len 10 octDecDigit))--tok_octal span buf len-  = return (L span (CmmT_Int  $! parseUnsignedInteger (offsetBytes 1 buf) (len-1) 8 octDecDigit))--tok_hexadecimal span buf len-  = return (L span (CmmT_Int  $! parseUnsignedInteger (offsetBytes 2 buf) (len-2) 16 hexDigit))--tok_float str = CmmT_Float $! readRational str--tok_string str = CmmT_String (read str)-                 -- urk, not quite right, but it'll do for now---- -------------------------------------------------------------------------------- Line pragmas--setLine :: Int -> Action-setLine code span buf len = do-  let line = parseUnsignedInteger buf len 10 octDecDigit-  liftP $ do-    setSrcLoc (mkRealSrcLoc (srcSpanFile span) (fromIntegral line - 1) 1)-          -- subtract one: the line number refers to the *following* line-    -- trace ("setLine "  ++ show line) $ do-    popLexState >> pushLexState code-  lexToken--setFile :: Int -> Action-setFile code span buf len = do-  let file = lexemeToFastString (stepOn buf) (len-2)-  liftP $ do-    setSrcLoc (mkRealSrcLoc file (srcSpanEndLine span) (srcSpanEndCol span))-    popLexState >> pushLexState code-  lexToken---- -------------------------------------------------------------------------------- This is the top-level function: called from the parser each time a--- new token is to be read from the input.--cmmlex :: (Located CmmToken -> PD a) -> PD a-cmmlex cont = do-  (L span tok) <- lexToken-  --trace ("token: " ++ show tok) $ do-  cont (L (RealSrcSpan span) tok)--lexToken :: PD (RealLocated CmmToken)-lexToken = do-  inp@(loc1,buf) <- getInput-  sc <- liftP getLexState-  case alexScan inp sc of-    AlexEOF -> do let span = mkRealSrcSpan loc1 loc1-                  liftP (setLastToken span 0)-                  return (L span CmmT_EOF)-    AlexError (loc2,_) -> liftP $ failLocMsgP loc1 loc2 "lexical error"-    AlexSkip inp2 _ -> do-        setInput inp2-        lexToken-    AlexToken inp2@(end,_buf2) len t -> do-        setInput inp2-        let span = mkRealSrcSpan loc1 end-        span `seq` liftP (setLastToken span len)-        t span buf len---- -------------------------------------------------------------------------------- Monad stuff---- Stuff that Alex needs to know about our input type:-type AlexInput = (RealSrcLoc,StringBuffer)--alexInputPrevChar :: AlexInput -> Char-alexInputPrevChar (_,s) = prevChar s '\n'---- backwards compatibility for Alex 2.x-alexGetChar :: AlexInput -> Maybe (Char,AlexInput)-alexGetChar inp = case alexGetByte inp of-                    Nothing    -> Nothing-                    Just (b,i) -> c `seq` Just (c,i)-                       where c = chr $ fromIntegral b--alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)-alexGetByte (loc,s)-  | atEnd s   = Nothing-  | otherwise = b `seq` loc' `seq` s' `seq` Just (b, (loc', s'))-  where c    = currentChar s-        b    = fromIntegral $ ord $ c-        loc' = advanceSrcLoc loc c-        s'   = stepOn s--getInput :: PD AlexInput-getInput = PD $ \_ s@PState{ loc=l, buffer=b } -> POk s (l,b)--setInput :: AlexInput -> PD ()-setInput (l,b) = PD $ \_ s -> POk s{ loc=l, buffer=b } ()---line_prag,line_prag1,line_prag2 :: Int-line_prag = 1-line_prag1 = 2-line_prag2 = 3-alex_action_2 =  begin line_prag -alex_action_3 =  setLine line_prag1 -alex_action_4 =  setFile line_prag2 -alex_action_5 =  pop -alex_action_7 =  special_char -alex_action_8 =  kw CmmT_DotDot -alex_action_9 =  kw CmmT_DoubleColon -alex_action_10 =  kw CmmT_Shr -alex_action_11 =  kw CmmT_Shl -alex_action_12 =  kw CmmT_Ge -alex_action_13 =  kw CmmT_Le -alex_action_14 =  kw CmmT_Eq -alex_action_15 =  kw CmmT_Ne -alex_action_16 =  kw CmmT_BoolAnd -alex_action_17 =  kw CmmT_BoolOr -alex_action_18 =  global_regN (\n -> VanillaReg n VGcPtr) -alex_action_19 =  global_regN (\n -> VanillaReg n VNonGcPtr) -alex_action_20 =  global_regN FloatReg -alex_action_21 =  global_regN DoubleReg -alex_action_22 =  global_regN LongReg -alex_action_23 =  global_reg Sp -alex_action_24 =  global_reg SpLim -alex_action_25 =  global_reg Hp -alex_action_26 =  global_reg HpLim -alex_action_27 =  global_reg CCCS -alex_action_28 =  global_reg CurrentTSO -alex_action_29 =  global_reg CurrentNursery -alex_action_30 =  global_reg HpAlloc -alex_action_31 =  global_reg BaseReg -alex_action_32 =  global_reg MachSp -alex_action_33 =  global_reg UnwindReturnReg -alex_action_34 =  name -alex_action_35 =  tok_octal -alex_action_36 =  tok_decimal -alex_action_37 =  tok_hexadecimal -alex_action_38 =  strtoken tok_float -alex_action_39 =  strtoken tok_string -{-# LINE 1 "templates/GenericTemplate.hs" #-}--- -------------------------------------------------------------------------------- ALEX TEMPLATE------ This code is in the PUBLIC DOMAIN; you may copy it freely and use--- it for any purpose whatsoever.---- -------------------------------------------------------------------------------- INTERNALS and main scanner engine-------------------- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.-#if __GLASGOW_HASKELL__ > 706-#define GTE(n,m) (tagToEnum# (n >=# m))-#define EQ(n,m) (tagToEnum# (n ==# m))-#else-#define GTE(n,m) (n >=# m)-#define EQ(n,m) (n ==# m)-#endif--------------------data AlexAddr = AlexA# Addr#--- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.-#if __GLASGOW_HASKELL__ < 503-uncheckedShiftL# = shiftL#-#endif--{-# INLINE alexIndexInt16OffAddr #-}-alexIndexInt16OffAddr (AlexA# arr) off =-#ifdef WORDS_BIGENDIAN-  narrow16Int# i-  where-        i    = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)-        high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))-        low  = int2Word# (ord# (indexCharOffAddr# arr off'))-        off' = off *# 2#-#else-  indexInt16OffAddr# arr off-#endif------{-# INLINE alexIndexInt32OffAddr #-}-alexIndexInt32OffAddr (AlexA# arr) off =-#ifdef WORDS_BIGENDIAN-  narrow32Int# i-  where-   i    = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`-                     (b2 `uncheckedShiftL#` 16#) `or#`-                     (b1 `uncheckedShiftL#` 8#) `or#` b0)-   b3   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))-   b2   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))-   b1   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))-   b0   = int2Word# (ord# (indexCharOffAddr# arr off'))-   off' = off *# 4#-#else-  indexInt32OffAddr# arr off-#endif-------#if __GLASGOW_HASKELL__ < 503-quickIndex arr i = arr ! i-#else--- GHC >= 503, unsafeAt is available from Data.Array.Base.-quickIndex = unsafeAt-#endif------- -------------------------------------------------------------------------------- Main lexing routines--data AlexReturn a-  = AlexEOF-  | AlexError  !AlexInput-  | AlexSkip   !AlexInput !Int-  | AlexToken  !AlexInput !Int a---- alexScan :: AlexInput -> StartCode -> AlexReturn a-alexScan input__ (I# (sc))-  = alexScanUser undefined input__ (I# (sc))--alexScanUser user__ input__ (I# (sc))-  = case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of-  (AlexNone, input__') ->-    case alexGetByte input__ of-      Nothing ->----                                   AlexEOF-      Just _ ->----                                   AlexError input__'--  (AlexLastSkip input__'' len, _) ->----    AlexSkip input__'' len--  (AlexLastAcc k input__''' len, _) ->----    AlexToken input__''' len (alex_actions ! k)----- Push the input through the DFA, remembering the most recent accepting--- state it encountered.--alex_scan_tkn user__ orig_input len input__ s last_acc =-  input__ `seq` -- strict in the input-  let-  new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))-  in-  new_acc `seq`-  case alexGetByte input__ of-     Nothing -> (new_acc, input__)-     Just (c, new_input) ->----      case fromIntegral c of { (I# (ord_c)) ->-        let-                base   = alexIndexInt32OffAddr alex_base s-                offset = (base +# ord_c)-                check  = alexIndexInt16OffAddr alex_check offset--                new_s = if GTE(offset,0#) && EQ(check,ord_c)-                          then alexIndexInt16OffAddr alex_table offset-                          else alexIndexInt16OffAddr alex_deflt s-        in-        case new_s of-            -1# -> (new_acc, input__)-                -- on an error, we want to keep the input *before* the-                -- character that failed, not after.-            _ -> alex_scan_tkn user__ orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len)-                                                -- note that the length is increased ONLY if this is the 1st byte in a char encoding)-                        new_input new_s new_acc-      }-  where-        check_accs (AlexAccNone) = last_acc-        check_accs (AlexAcc a  ) = AlexLastAcc a input__ (I# (len))-        check_accs (AlexAccSkip) = AlexLastSkip  input__ (I# (len))--        check_accs (AlexAccPred a predx rest)-           | predx user__ orig_input (I# (len)) input__-           = AlexLastAcc a input__ (I# (len))-           | otherwise-           = check_accs rest-        check_accs (AlexAccSkipPred predx rest)-           | predx user__ orig_input (I# (len)) input__-           = AlexLastSkip input__ (I# (len))-           | otherwise-           = check_accs rest---data AlexLastAcc-  = AlexNone-  | AlexLastAcc !Int !AlexInput !Int-  | AlexLastSkip     !AlexInput !Int--data AlexAcc user-  = AlexAccNone-  | AlexAcc Int-  | AlexAccSkip--  | AlexAccPred Int (AlexAccPred user) (AlexAcc user)-  | AlexAccSkipPred (AlexAccPred user) (AlexAcc user)--type AlexAccPred user = user -> AlexInput -> Int -> AlexInput -> Bool---- -------------------------------------------------------------------------------- Predicates on a rule--alexAndPred p1 p2 user__ in1 len in2-  = p1 user__ in1 len in2 && p2 user__ in1 len in2----alexPrevCharIsPred :: Char -> AlexAccPred _-alexPrevCharIs c _ input__ _ _ = c == alexInputPrevChar input__--alexPrevCharMatches f _ input__ _ _ = f (alexInputPrevChar input__)----alexPrevCharIsOneOfPred :: Array Char Bool -> AlexAccPred _-alexPrevCharIsOneOf arr _ input__ _ _ = arr ! alexInputPrevChar input__----alexRightContext :: Int -> AlexAccPred _-alexRightContext (I# (sc)) user__ _ _ input__ =-     case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of-          (AlexNone, _) -> False-          _ -> True-        -- TODO: there's no need to find the longest-        -- match when checking the right context, just-        -- the first match will do.-
+ cmm/CmmLex.x view
@@ -0,0 +1,375 @@+-----------------------------------------------------------------------------+--+-- (c) The University of Glasgow, 2004-2006+--+-- Lexer for concrete Cmm.  We try to stay close to the C-- spec, but there+-- are a few minor differences:+--+--   * extra keywords for our macros, and float32/float64 types+--   * global registers (Sp,Hp, etc.)+--+-----------------------------------------------------------------------------++{+-- See Note [Warnings in code generated by Alex] in compiler/parser/Lexer.x+{-# OPTIONS_GHC -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-tabs #-}+{-# OPTIONS_GHC -fno-warn-missing-signatures #-}++module CmmLex (+   CmmToken(..), cmmlex,+  ) where++import GhcPrelude++import CmmExpr++import Lexer+import CmmMonad+import SrcLoc+import UniqFM+import StringBuffer+import FastString+import Ctype+import Util+--import TRACE++import Data.Word+import Data.Char+}++$whitechar   = [\ \t\n\r\f\v\xa0] -- \xa0 is Unicode no-break space+$white_no_nl = $whitechar # \n++$ascdigit  = 0-9+$unidigit  = \x01 -- Trick Alex into handling Unicode. See alexGetChar.+$digit     = [$ascdigit $unidigit]+$octit     = 0-7+$hexit     = [$digit A-F a-f]++$unilarge  = \x03 -- Trick Alex into handling Unicode. See alexGetChar.+$asclarge  = [A-Z \xc0-\xd6 \xd8-\xde]+$large     = [$asclarge $unilarge]++$unismall  = \x04 -- Trick Alex into handling Unicode. See alexGetChar.+$ascsmall  = [a-z \xdf-\xf6 \xf8-\xff]+$small     = [$ascsmall $unismall \_]++$namebegin = [$large $small \. \$ \@]+$namechar  = [$namebegin $digit]++@decimal     = $digit++@octal       = $octit++@hexadecimal = $hexit++@exponent    = [eE] [\-\+]? @decimal++@floating_point = @decimal \. @decimal @exponent? | @decimal @exponent++@escape      = \\ ([abfnrt\\\'\"\?] | x $hexit{1,2} | $octit{1,3})+@strchar     = ($printable # [\"\\]) | @escape++cmm :-++$white_no_nl+           ;+^\# pragma .* \n        ; -- Apple GCC 3.3 CPP generates pragmas in its output++^\# (line)?             { begin line_prag }++-- single-line line pragmas, of the form+--    # <line> "<file>" <extra-stuff> \n+<line_prag> $digit+                     { setLine line_prag1 }+<line_prag1> \" [^\"]* \"       { setFile line_prag2 }+<line_prag2> .*                         { pop }++<0> {+  \n                    ;++  [\:\;\{\}\[\]\(\)\=\`\~\/\*\%\-\+\&\^\|\>\<\,\!]      { special_char }++  ".."                  { kw CmmT_DotDot }+  "::"                  { kw CmmT_DoubleColon }+  ">>"                  { kw CmmT_Shr }+  "<<"                  { kw CmmT_Shl }+  ">="                  { kw CmmT_Ge }+  "<="                  { kw CmmT_Le }+  "=="                  { kw CmmT_Eq }+  "!="                  { kw CmmT_Ne }+  "&&"                  { kw CmmT_BoolAnd }+  "||"                  { kw CmmT_BoolOr }++  "True"                { kw CmmT_True  }+  "False"               { kw CmmT_False }+  "likely"              { kw CmmT_likely}++  P@decimal             { global_regN (\n -> VanillaReg n VGcPtr) }+  R@decimal             { global_regN (\n -> VanillaReg n VNonGcPtr) }+  F@decimal             { global_regN FloatReg }+  D@decimal             { global_regN DoubleReg }+  L@decimal             { global_regN LongReg }+  Sp                    { global_reg Sp }+  SpLim                 { global_reg SpLim }+  Hp                    { global_reg Hp }+  HpLim                 { global_reg HpLim }+  CCCS                  { global_reg CCCS }+  CurrentTSO            { global_reg CurrentTSO }+  CurrentNursery        { global_reg CurrentNursery }+  HpAlloc               { global_reg HpAlloc }+  BaseReg               { global_reg BaseReg }+  MachSp                { global_reg MachSp }+  UnwindReturnReg       { global_reg UnwindReturnReg }++  $namebegin $namechar* { name }++  0 @octal              { tok_octal }+  @decimal              { tok_decimal }+  0[xX] @hexadecimal    { tok_hexadecimal }+  @floating_point       { strtoken tok_float }++  \" @strchar* \"       { strtoken tok_string }+}++{+data CmmToken+  = CmmT_SpecChar  Char+  | CmmT_DotDot+  | CmmT_DoubleColon+  | CmmT_Shr+  | CmmT_Shl+  | CmmT_Ge+  | CmmT_Le+  | CmmT_Eq+  | CmmT_Ne+  | CmmT_BoolAnd+  | CmmT_BoolOr+  | CmmT_CLOSURE+  | CmmT_INFO_TABLE+  | CmmT_INFO_TABLE_RET+  | CmmT_INFO_TABLE_FUN+  | CmmT_INFO_TABLE_CONSTR+  | CmmT_INFO_TABLE_SELECTOR+  | CmmT_else+  | CmmT_export+  | CmmT_section+  | CmmT_goto+  | CmmT_if+  | CmmT_call+  | CmmT_jump+  | CmmT_foreign+  | CmmT_never+  | CmmT_prim+  | CmmT_reserve+  | CmmT_return+  | CmmT_returns+  | CmmT_import+  | CmmT_switch+  | CmmT_case+  | CmmT_default+  | CmmT_push+  | CmmT_unwind+  | CmmT_bits8+  | CmmT_bits16+  | CmmT_bits32+  | CmmT_bits64+  | CmmT_bits128+  | CmmT_bits256+  | CmmT_bits512+  | CmmT_float32+  | CmmT_float64+  | CmmT_gcptr+  | CmmT_GlobalReg GlobalReg+  | CmmT_Name      FastString+  | CmmT_String    String+  | CmmT_Int       Integer+  | CmmT_Float     Rational+  | CmmT_EOF+  | CmmT_False+  | CmmT_True+  | CmmT_likely+  deriving (Show)++-- -----------------------------------------------------------------------------+-- Lexer actions++type Action = RealSrcSpan -> StringBuffer -> Int -> PD (RealLocated CmmToken)++begin :: Int -> Action+begin code _span _str _len = do liftP (pushLexState code); lexToken++pop :: Action+pop _span _buf _len = liftP popLexState >> lexToken++special_char :: Action+special_char span buf _len = return (L span (CmmT_SpecChar (currentChar buf)))++kw :: CmmToken -> Action+kw tok span _buf _len = return (L span tok)++global_regN :: (Int -> GlobalReg) -> Action+global_regN con span buf len+  = return (L span (CmmT_GlobalReg (con (fromIntegral n))))+  where buf' = stepOn buf+        n = parseUnsignedInteger buf' (len-1) 10 octDecDigit++global_reg :: GlobalReg -> Action+global_reg r span _buf _len = return (L span (CmmT_GlobalReg r))++strtoken :: (String -> CmmToken) -> Action+strtoken f span buf len =+  return (L span $! (f $! lexemeToString buf len))++name :: Action+name span buf len =+  case lookupUFM reservedWordsFM fs of+        Just tok -> return (L span tok)+        Nothing  -> return (L span (CmmT_Name fs))+  where+        fs = lexemeToFastString buf len++reservedWordsFM = listToUFM $+        map (\(x, y) -> (mkFastString x, y)) [+        ( "CLOSURE",            CmmT_CLOSURE ),+        ( "INFO_TABLE",         CmmT_INFO_TABLE ),+        ( "INFO_TABLE_RET",     CmmT_INFO_TABLE_RET ),+        ( "INFO_TABLE_FUN",     CmmT_INFO_TABLE_FUN ),+        ( "INFO_TABLE_CONSTR",  CmmT_INFO_TABLE_CONSTR ),+        ( "INFO_TABLE_SELECTOR",CmmT_INFO_TABLE_SELECTOR ),+        ( "else",               CmmT_else ),+        ( "export",             CmmT_export ),+        ( "section",            CmmT_section ),+        ( "goto",               CmmT_goto ),+        ( "if",                 CmmT_if ),+        ( "call",               CmmT_call ),+        ( "jump",               CmmT_jump ),+        ( "foreign",            CmmT_foreign ),+        ( "never",              CmmT_never ),+        ( "prim",               CmmT_prim ),+        ( "reserve",            CmmT_reserve ),+        ( "return",             CmmT_return ),+        ( "returns",            CmmT_returns ),+        ( "import",             CmmT_import ),+        ( "switch",             CmmT_switch ),+        ( "case",               CmmT_case ),+        ( "default",            CmmT_default ),+        ( "push",               CmmT_push ),+        ( "unwind",             CmmT_unwind ),+        ( "bits8",              CmmT_bits8 ),+        ( "bits16",             CmmT_bits16 ),+        ( "bits32",             CmmT_bits32 ),+        ( "bits64",             CmmT_bits64 ),+        ( "bits128",            CmmT_bits128 ),+        ( "bits256",            CmmT_bits256 ),+        ( "bits512",            CmmT_bits512 ),+        ( "float32",            CmmT_float32 ),+        ( "float64",            CmmT_float64 ),+-- New forms+        ( "b8",                 CmmT_bits8 ),+        ( "b16",                CmmT_bits16 ),+        ( "b32",                CmmT_bits32 ),+        ( "b64",                CmmT_bits64 ),+        ( "b128",               CmmT_bits128 ),+        ( "b256",               CmmT_bits256 ),+        ( "b512",               CmmT_bits512 ),+        ( "f32",                CmmT_float32 ),+        ( "f64",                CmmT_float64 ),+        ( "gcptr",              CmmT_gcptr ),+        ( "likely",             CmmT_likely),+        ( "True",               CmmT_True  ),+        ( "False",              CmmT_False )+        ]++tok_decimal span buf len+  = return (L span (CmmT_Int  $! parseUnsignedInteger buf len 10 octDecDigit))++tok_octal span buf len+  = return (L span (CmmT_Int  $! parseUnsignedInteger (offsetBytes 1 buf) (len-1) 8 octDecDigit))++tok_hexadecimal span buf len+  = return (L span (CmmT_Int  $! parseUnsignedInteger (offsetBytes 2 buf) (len-2) 16 hexDigit))++tok_float str = CmmT_Float $! readRational str++tok_string str = CmmT_String (read str)+                 -- urk, not quite right, but it'll do for now++-- -----------------------------------------------------------------------------+-- Line pragmas++setLine :: Int -> Action+setLine code span buf len = do+  let line = parseUnsignedInteger buf len 10 octDecDigit+  liftP $ do+    setSrcLoc (mkRealSrcLoc (srcSpanFile span) (fromIntegral line - 1) 1)+          -- subtract one: the line number refers to the *following* line+    -- trace ("setLine "  ++ show line) $ do+    popLexState >> pushLexState code+  lexToken++setFile :: Int -> Action+setFile code span buf len = do+  let file = lexemeToFastString (stepOn buf) (len-2)+  liftP $ do+    setSrcLoc (mkRealSrcLoc file (srcSpanEndLine span) (srcSpanEndCol span))+    popLexState >> pushLexState code+  lexToken++-- -----------------------------------------------------------------------------+-- This is the top-level function: called from the parser each time a+-- new token is to be read from the input.++cmmlex :: (Located CmmToken -> PD a) -> PD a+cmmlex cont = do+  (L span tok) <- lexToken+  --trace ("token: " ++ show tok) $ do+  cont (L (RealSrcSpan span) tok)++lexToken :: PD (RealLocated CmmToken)+lexToken = do+  inp@(loc1,buf) <- getInput+  sc <- liftP getLexState+  case alexScan inp sc of+    AlexEOF -> do let span = mkRealSrcSpan loc1 loc1+                  liftP (setLastToken span 0)+                  return (L span CmmT_EOF)+    AlexError (loc2,_) -> liftP $ failLocMsgP loc1 loc2 "lexical error"+    AlexSkip inp2 _ -> do+        setInput inp2+        lexToken+    AlexToken inp2@(end,_buf2) len t -> do+        setInput inp2+        let span = mkRealSrcSpan loc1 end+        span `seq` liftP (setLastToken span len)+        t span buf len++-- -----------------------------------------------------------------------------+-- Monad stuff++-- Stuff that Alex needs to know about our input type:+type AlexInput = (RealSrcLoc,StringBuffer)++alexInputPrevChar :: AlexInput -> Char+alexInputPrevChar (_,s) = prevChar s '\n'++-- backwards compatibility for Alex 2.x+alexGetChar :: AlexInput -> Maybe (Char,AlexInput)+alexGetChar inp = case alexGetByte inp of+                    Nothing    -> Nothing+                    Just (b,i) -> c `seq` Just (c,i)+                       where c = chr $ fromIntegral b++alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)+alexGetByte (loc,s)+  | atEnd s   = Nothing+  | otherwise = b `seq` loc' `seq` s' `seq` Just (b, (loc', s'))+  where c    = currentChar s+        b    = fromIntegral $ ord $ c+        loc' = advanceSrcLoc loc c+        s'   = stepOn s++getInput :: PD AlexInput+getInput = PD $ \_ s@PState{ loc=l, buffer=b } -> POk s (l,b)++setInput :: AlexInput -> PD ()+setInput (l,b) = PD $ \_ s -> POk s{ loc=l, buffer=b } ()+}
cmm/CmmMachOp.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- module CmmMachOp     ( MachOp(..)     , pprMachOp, isCommutableMachOp, isAssociativeMachOp@@ -28,8 +26,6 @@    ) where -#include "HsVersions.h"- import GhcPrelude  import CmmType@@ -560,6 +556,7 @@   | MO_U_QuotRem Width   | MO_U_QuotRem2 Width   | MO_Add2      Width+  | MO_AddWordC  Width   | MO_SubWordC  Width   | MO_AddIntC   Width   | MO_SubIntC   Width
cmm/CmmOpt.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- -- The default iteration limit is a bit too low for the definitions -- in this module. {-# OPTIONS_GHC -fmax-pmcheck-iterations=10000000 #-}@@ -19,8 +17,6 @@         cmmMachOpFoldM  ) where -#include "HsVersions.h"- import GhcPrelude  import CmmUtils@@ -425,14 +421,6 @@  -- ----------------------------------------------------------------------------- -- Utils--isLit :: CmmExpr -> Bool-isLit (CmmLit _) = True-isLit _          = False--isComparisonExpr :: CmmExpr -> Bool-isComparisonExpr (CmmMachOp op _) = isComparisonMachOp op-isComparisonExpr _                  = False  isPicReg :: CmmExpr -> Bool isPicReg (CmmReg (CmmGlobal PicBaseReg)) = True
− cmm/CmmParse.hs
@@ -1,3700 +0,0 @@-{-# OPTIONS_GHC -w #-}-{-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-}-#if __GLASGOW_HASKELL__ >= 710-{-# OPTIONS_GHC -XPartialTypeSignatures #-}-#endif-module CmmParse ( parseCmmFile ) where--import GhcPrelude--import StgCmmExtCode-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 CoreSyn          ( Tickish(SourceNote) )--import CmmOpt-import MkGraph-import Cmm-import CmmUtils-import CmmSwitch        ( mkSwitchTargets )-import CmmInfo-import BlockId-import CmmLex-import CLabel-import SMRep-import Lexer-import CmmMonad--import CostCentre-import ForeignCall-import Module-import Platform-import Literal-import Unique-import UniqFM-import SrcLoc-import DynFlags-import ErrUtils-import StringBuffer-import FastString-import Panic-import Constants-import Outputable-import BasicTypes-import Bag              ( emptyBag, unitBag )-import Var--import Control.Monad-import Data.Array-import Data.Char        ( ord )-import System.Exit-import Data.Maybe-import qualified Data.Map as M--#include "HsVersions.h"-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.9--newtype HappyAbsSyn  = HappyAbsSyn HappyAny-#if __GLASGOW_HASKELL__ >= 607-type HappyAny = Happy_GHC_Exts.Any-#else-type HappyAny = forall a . a-#endif-happyIn4 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn4 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn4 #-}-happyOut4 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut4 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut4 #-}-happyIn5 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn5 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn5 #-}-happyOut5 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut5 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut5 #-}-happyIn6 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn6 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn6 #-}-happyOut6 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut6 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut6 #-}-happyIn7 :: (CmmParse CLabel) -> (HappyAbsSyn )-happyIn7 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn7 #-}-happyOut7 :: (HappyAbsSyn ) -> (CmmParse CLabel)-happyOut7 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut7 #-}-happyIn8 :: ([CmmParse [CmmStatic]]) -> (HappyAbsSyn )-happyIn8 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn8 #-}-happyOut8 :: (HappyAbsSyn ) -> ([CmmParse [CmmStatic]])-happyOut8 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut8 #-}-happyIn9 :: (CmmParse [CmmStatic]) -> (HappyAbsSyn )-happyIn9 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn9 #-}-happyOut9 :: (HappyAbsSyn ) -> (CmmParse [CmmStatic])-happyOut9 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut9 #-}-happyIn10 :: ([CmmParse CmmExpr]) -> (HappyAbsSyn )-happyIn10 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn10 #-}-happyOut10 :: (HappyAbsSyn ) -> ([CmmParse CmmExpr])-happyOut10 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut10 #-}-happyIn11 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn11 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn11 #-}-happyOut11 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut11 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut11 #-}-happyIn12 :: (Convention) -> (HappyAbsSyn )-happyIn12 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn12 #-}-happyOut12 :: (HappyAbsSyn ) -> (Convention)-happyOut12 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut12 #-}-happyIn13 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn13 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn13 #-}-happyOut13 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut13 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut13 #-}-happyIn14 :: (CmmParse (CLabel, Maybe CmmInfoTable, [LocalReg])) -> (HappyAbsSyn )-happyIn14 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn14 #-}-happyOut14 :: (HappyAbsSyn ) -> (CmmParse (CLabel, Maybe CmmInfoTable, [LocalReg]))-happyOut14 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut14 #-}-happyIn15 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn15 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn15 #-}-happyOut15 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut15 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut15 #-}-happyIn16 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn16 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn16 #-}-happyOut16 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut16 #-}-happyIn17 :: ([(FastString, CLabel)]) -> (HappyAbsSyn )-happyIn17 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn17 #-}-happyOut17 :: (HappyAbsSyn ) -> ([(FastString, CLabel)])-happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut17 #-}-happyIn18 :: ((FastString,  CLabel)) -> (HappyAbsSyn )-happyIn18 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn18 #-}-happyOut18 :: (HappyAbsSyn ) -> ((FastString,  CLabel))-happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut18 #-}-happyIn19 :: ([FastString]) -> (HappyAbsSyn )-happyIn19 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn19 #-}-happyOut19 :: (HappyAbsSyn ) -> ([FastString])-happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut19 #-}-happyIn20 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn20 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn20 #-}-happyOut20 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut20 #-}-happyIn21 :: (CmmParse [(GlobalReg, Maybe CmmExpr)]) -> (HappyAbsSyn )-happyIn21 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn21 #-}-happyOut21 :: (HappyAbsSyn ) -> (CmmParse [(GlobalReg, Maybe CmmExpr)])-happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut21 #-}-happyIn22 :: (CmmParse (Maybe CmmExpr)) -> (HappyAbsSyn )-happyIn22 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn22 #-}-happyOut22 :: (HappyAbsSyn ) -> (CmmParse (Maybe CmmExpr))-happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut22 #-}-happyIn23 :: (CmmParse CmmExpr) -> (HappyAbsSyn )-happyIn23 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn23 #-}-happyOut23 :: (HappyAbsSyn ) -> (CmmParse CmmExpr)-happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut23 #-}-happyIn24 :: (CmmReturnInfo) -> (HappyAbsSyn )-happyIn24 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn24 #-}-happyOut24 :: (HappyAbsSyn ) -> (CmmReturnInfo)-happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut24 #-}-happyIn25 :: (CmmParse BoolExpr) -> (HappyAbsSyn )-happyIn25 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn25 #-}-happyOut25 :: (HappyAbsSyn ) -> (CmmParse BoolExpr)-happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut25 #-}-happyIn26 :: (CmmParse BoolExpr) -> (HappyAbsSyn )-happyIn26 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn26 #-}-happyOut26 :: (HappyAbsSyn ) -> (CmmParse BoolExpr)-happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut26 #-}-happyIn27 :: (Safety) -> (HappyAbsSyn )-happyIn27 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn27 #-}-happyOut27 :: (HappyAbsSyn ) -> (Safety)-happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut27 #-}-happyIn28 :: ([GlobalReg]) -> (HappyAbsSyn )-happyIn28 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn28 #-}-happyOut28 :: (HappyAbsSyn ) -> ([GlobalReg])-happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut28 #-}-happyIn29 :: ([GlobalReg]) -> (HappyAbsSyn )-happyIn29 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn29 #-}-happyOut29 :: (HappyAbsSyn ) -> ([GlobalReg])-happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut29 #-}-happyIn30 :: (Maybe (Integer,Integer)) -> (HappyAbsSyn )-happyIn30 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn30 #-}-happyOut30 :: (HappyAbsSyn ) -> (Maybe (Integer,Integer))-happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut30 #-}-happyIn31 :: ([CmmParse ([Integer],Either BlockId (CmmParse ()))]) -> (HappyAbsSyn )-happyIn31 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn31 #-}-happyOut31 :: (HappyAbsSyn ) -> ([CmmParse ([Integer],Either BlockId (CmmParse ()))])-happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut31 #-}-happyIn32 :: (CmmParse ([Integer],Either BlockId (CmmParse ()))) -> (HappyAbsSyn )-happyIn32 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn32 #-}-happyOut32 :: (HappyAbsSyn ) -> (CmmParse ([Integer],Either BlockId (CmmParse ())))-happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut32 #-}-happyIn33 :: (CmmParse (Either BlockId (CmmParse ()))) -> (HappyAbsSyn )-happyIn33 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn33 #-}-happyOut33 :: (HappyAbsSyn ) -> (CmmParse (Either BlockId (CmmParse ())))-happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut33 #-}-happyIn34 :: ([Integer]) -> (HappyAbsSyn )-happyIn34 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn34 #-}-happyOut34 :: (HappyAbsSyn ) -> ([Integer])-happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut34 #-}-happyIn35 :: (Maybe (CmmParse ())) -> (HappyAbsSyn )-happyIn35 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn35 #-}-happyOut35 :: (HappyAbsSyn ) -> (Maybe (CmmParse ()))-happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut35 #-}-happyIn36 :: (CmmParse ()) -> (HappyAbsSyn )-happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn36 #-}-happyOut36 :: (HappyAbsSyn ) -> (CmmParse ())-happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut36 #-}-happyIn37 :: (CmmParse CmmExpr) -> (HappyAbsSyn )-happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn37 #-}-happyOut37 :: (HappyAbsSyn ) -> (CmmParse CmmExpr)-happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut37 #-}-happyIn38 :: (CmmParse CmmExpr) -> (HappyAbsSyn )-happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn38 #-}-happyOut38 :: (HappyAbsSyn ) -> (CmmParse CmmExpr)-happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut38 #-}-happyIn39 :: (CmmType) -> (HappyAbsSyn )-happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn39 #-}-happyOut39 :: (HappyAbsSyn ) -> (CmmType)-happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut39 #-}-happyIn40 :: ([CmmParse (CmmExpr, ForeignHint)]) -> (HappyAbsSyn )-happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn40 #-}-happyOut40 :: (HappyAbsSyn ) -> ([CmmParse (CmmExpr, ForeignHint)])-happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut40 #-}-happyIn41 :: ([CmmParse (CmmExpr, ForeignHint)]) -> (HappyAbsSyn )-happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn41 #-}-happyOut41 :: (HappyAbsSyn ) -> ([CmmParse (CmmExpr, ForeignHint)])-happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut41 #-}-happyIn42 :: (CmmParse (CmmExpr, ForeignHint)) -> (HappyAbsSyn )-happyIn42 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn42 #-}-happyOut42 :: (HappyAbsSyn ) -> (CmmParse (CmmExpr, ForeignHint))-happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut42 #-}-happyIn43 :: ([CmmParse CmmExpr]) -> (HappyAbsSyn )-happyIn43 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn43 #-}-happyOut43 :: (HappyAbsSyn ) -> ([CmmParse CmmExpr])-happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut43 #-}-happyIn44 :: ([CmmParse CmmExpr]) -> (HappyAbsSyn )-happyIn44 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn44 #-}-happyOut44 :: (HappyAbsSyn ) -> ([CmmParse CmmExpr])-happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut44 #-}-happyIn45 :: (CmmParse CmmExpr) -> (HappyAbsSyn )-happyIn45 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn45 #-}-happyOut45 :: (HappyAbsSyn ) -> (CmmParse CmmExpr)-happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut45 #-}-happyIn46 :: ([CmmParse (LocalReg, ForeignHint)]) -> (HappyAbsSyn )-happyIn46 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn46 #-}-happyOut46 :: (HappyAbsSyn ) -> ([CmmParse (LocalReg, ForeignHint)])-happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut46 #-}-happyIn47 :: ([CmmParse (LocalReg, ForeignHint)]) -> (HappyAbsSyn )-happyIn47 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn47 #-}-happyOut47 :: (HappyAbsSyn ) -> ([CmmParse (LocalReg, ForeignHint)])-happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut47 #-}-happyIn48 :: (CmmParse (LocalReg, ForeignHint)) -> (HappyAbsSyn )-happyIn48 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn48 #-}-happyOut48 :: (HappyAbsSyn ) -> (CmmParse (LocalReg, ForeignHint))-happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut48 #-}-happyIn49 :: (CmmParse LocalReg) -> (HappyAbsSyn )-happyIn49 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn49 #-}-happyOut49 :: (HappyAbsSyn ) -> (CmmParse LocalReg)-happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut49 #-}-happyIn50 :: (CmmParse CmmReg) -> (HappyAbsSyn )-happyIn50 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn50 #-}-happyOut50 :: (HappyAbsSyn ) -> (CmmParse CmmReg)-happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut50 #-}-happyIn51 :: (Maybe [CmmParse LocalReg]) -> (HappyAbsSyn )-happyIn51 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn51 #-}-happyOut51 :: (HappyAbsSyn ) -> (Maybe [CmmParse LocalReg])-happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut51 #-}-happyIn52 :: ([CmmParse LocalReg]) -> (HappyAbsSyn )-happyIn52 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn52 #-}-happyOut52 :: (HappyAbsSyn ) -> ([CmmParse LocalReg])-happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut52 #-}-happyIn53 :: ([CmmParse LocalReg]) -> (HappyAbsSyn )-happyIn53 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn53 #-}-happyOut53 :: (HappyAbsSyn ) -> ([CmmParse LocalReg])-happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut53 #-}-happyIn54 :: (CmmParse LocalReg) -> (HappyAbsSyn )-happyIn54 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn54 #-}-happyOut54 :: (HappyAbsSyn ) -> (CmmParse LocalReg)-happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut54 #-}-happyIn55 :: (CmmType) -> (HappyAbsSyn )-happyIn55 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn55 #-}-happyOut55 :: (HappyAbsSyn ) -> (CmmType)-happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut55 #-}-happyIn56 :: (CmmType) -> (HappyAbsSyn )-happyIn56 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn56 #-}-happyOut56 :: (HappyAbsSyn ) -> (CmmType)-happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut56 #-}-happyInTok :: (Located CmmToken) -> (HappyAbsSyn )-happyInTok x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyInTok #-}-happyOutTok :: (HappyAbsSyn ) -> (Located CmmToken)-happyOutTok x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOutTok #-}---happyExpList :: HappyAddr-happyExpList = HappyA# "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7e\x03\x10\xfc\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xdf\x00\x04\xff\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\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\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\x04\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\x40\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\x04\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\x20\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\x20\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\x20\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x01\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\x80\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\x08\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\x80\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\x08\x00\x00\x00\x00\x00\x00\x00\x02\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\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\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\x08\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\x80\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\x08\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\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\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\x20\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\x08\x00\x00\xf0\x3f\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\x80\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\x08\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\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\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\x20\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\x42\x00\x00\x00\x00\x3d\x36\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x04\x00\x00\x00\xd0\x63\xf3\xff\x03\x00\x00\x00\x00\x00\x00\x80\x10\x00\x00\x00\x40\x8f\xcd\xff\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x01\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\x01\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\xfc\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x44\x06\x04\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x04\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\x40\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\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\xf0\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\x08\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\x02\x80\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\x08\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\x80\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\xff\x03\x00\x00\x00\x00\x00\x00\x00\x42\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x40\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\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x00\x00\x00\x00\x00\x00\x00\x80\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\x08\x00\x00\x00\x00\x00\x00\x80\x00\xfe\x87\x1f\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\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\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\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\x40\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\x20\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\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\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\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\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x20\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\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x1f\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\xe1\x7f\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\xff\xe1\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\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\xe0\x7f\xf8\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x06\x04\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x10\x19\x10\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x02\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\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\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\x02\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x02\xf8\x1f\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\xe0\x7f\xf8\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\x40\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\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\x80\x01\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\x88\xff\xe1\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x80\x10\x00\x00\x00\x40\x8f\xcd\xff\x0f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x40\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x91\x01\x01\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x40\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x3f\x7e\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\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\xf8\x1f\x7e\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\x44\x06\x00\x00\x00\x40\xc0\xff\x1f\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\xe0\xff\xf8\x01\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\x08\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\x80\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\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\xf0\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\x0e\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\x88\xff\xe1\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\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\x02\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\x40\x00\x00\x00\x00\x00\x00\x00\x80\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\x80\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\x08\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\x08\xfe\x87\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\x91\x01\x00\x00\x00\x00\xf0\xff\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\x10\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\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\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\x20\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\xf8\x1f\x7e\x00\x00\x00\x00\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\x10\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\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\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\x02\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\x20\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\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\x06\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\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x07\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x1f\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7f\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x81\x01\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\xe0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x7f\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\x81\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x03\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x07\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x0f\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x91\x01\x00\x00\x00\x00\xf0\xff\x07\x00\x00\x00\x00\x00\x00\x00\x44\x06\x00\x00\x00\x00\xc0\xff\x1f\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x40\x64\x00\x00\x00\x00\x00\xfc\xff\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\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\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\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\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\x20\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\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\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\x80\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\x08\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\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\x10\x08\x00\x00\x00\x00\x00\xff\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\x04\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\x40\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\x40\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\x80\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\x44\x06\x00\x00\x00\x00\xc0\xff\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\xfe\x87\x1f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xf8\x1f\x7e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x7f\xf8\x01\x00\x00\x00\x00\x01\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\x20\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\x20\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x10\x19\x00\x00\x00\x00\x00\xff\x7f\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\x10\x19\x00\x00\x00\x00\x00\xff\x7f\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x3d\x36\xff\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x02\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\x80\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x00\x00\x10\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\x08\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\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\x10\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\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x10\x00\x00\x00\x40\x8f\xcd\xff\x0f\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\x20\x04\x00\x00\x00\xd0\x63\xf3\xff\x03\x00\x00\x00\x00\x00\x00\x80\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\x02\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\x20\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\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\x02\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\x20\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\x08\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\x01\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\x08\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"#--{-# NOINLINE happyExpListPerState #-}-happyExpListPerState st =-    token_strs_expected-  where token_strs = ["error","%dummy","%start_cmmParse","cmm","cmmtop","cmmdata","data_label","statics","static","lits","cmmproc","maybe_conv","maybe_body","info","body","decl","importNames","importName","names","stmt","unwind_regs","expr_or_unknown","foreignLabel","opt_never_returns","bool_expr","bool_op","safety","vols","globals","maybe_range","arms","arm","arm_body","ints","default","else","expr","expr0","maybe_ty","cmm_hint_exprs0","cmm_hint_exprs","cmm_hint_expr","exprs0","exprs","reg","foreign_results","foreign_formals","foreign_formal","local_lreg","lreg","maybe_formals","formals0","formals","formal","type","typenot8","':'","';'","'{'","'}'","'['","']'","'('","')'","'='","'`'","'~'","'/'","'*'","'%'","'-'","'+'","'&'","'^'","'|'","'>'","'<'","','","'!'","'..'","'::'","'>>'","'<<'","'>='","'<='","'=='","'!='","'&&'","'||'","'CLOSURE'","'INFO_TABLE'","'INFO_TABLE_RET'","'INFO_TABLE_FUN'","'INFO_TABLE_CONSTR'","'INFO_TABLE_SELECTOR'","'else'","'export'","'section'","'goto'","'if'","'call'","'jump'","'foreign'","'never'","'prim'","'reserve'","'return'","'returns'","'import'","'switch'","'case'","'default'","'push'","'unwind'","'bits8'","'bits16'","'bits32'","'bits64'","'bits128'","'bits256'","'bits512'","'float32'","'float64'","'gcptr'","GLOBALREG","NAME","STRING","INT","FLOAT","%eof"]-        bit_start = st * 130-        bit_end = (st + 1) * 130-        read_bit = readArrayBit happyExpList-        bits = map read_bit [bit_start..bit_end - 1]-        bits_indexed = zip bits [0..129]-        token_strs_expected = concatMap f bits_indexed-        f (False, _) = []-        f (True, nr) = [token_strs !! nr]--happyActOffsets :: HappyAddr-happyActOffsets = HappyA# "\x45\x01\x00\x00\xb8\xff\x45\x01\x00\x00\x00\x00\xe1\xff\x00\x00\xd2\xff\x00\x00\x1c\x00\x65\x00\x6b\x00\x72\x00\x74\x00\x92\x00\x7e\x00\x7f\x00\xe7\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\x00\xe5\x00\xb8\x00\x00\x00\xc0\x00\x08\x01\x14\x01\x02\x01\xd8\x00\xda\x00\xe8\x00\xf0\x00\xf6\x00\xfb\x00\x41\x01\x2d\x01\x00\x00\x00\x00\x19\x00\x14\x04\x00\x00\x38\x01\x3c\x01\x40\x01\x42\x01\x43\x01\x47\x01\x18\x01\x00\x00\x19\x01\x00\x00\x00\x00\xe7\xff\x00\x00\x00\x00\x09\x01\x62\x01\x00\x00\x1c\x01\x25\x01\x2f\x01\x30\x01\x31\x01\x35\x01\x74\x01\x00\x00\x67\x01\x44\x01\x00\x00\x00\x00\x20\x00\x90\x01\x20\x00\x20\x00\xd6\xff\x8c\x01\x23\x00\x00\x00\x07\x04\x50\x01\x60\x00\x6f\x00\x6f\x00\x6f\x00\x9a\x01\x92\x01\x9c\x01\x60\x01\x00\x00\x16\x00\x00\x00\x14\x04\x00\x00\x91\x01\x93\x01\x03\x00\xa7\x01\xa8\x01\xa9\x01\x00\x00\xcd\x01\x09\x01\xff\xff\xdf\x01\xcb\x01\xe1\x01\x02\x00\x8d\x01\x9f\x01\xa6\x01\xef\x01\x00\x00\xf3\x01\x00\x00\x6f\x00\x6f\x00\xb4\x01\x6f\x00\x00\x00\x00\x00\x00\x00\xea\x01\xea\x01\x00\x00\x00\x00\xb3\x01\xbd\x01\xbe\x01\x00\x00\x14\x04\xbf\x01\x00\x02\x6f\x00\x00\x00\x00\x00\x6f\x00\x11\x02\x0b\x02\x6f\x00\x6f\x00\xe5\x01\x6f\x00\x92\x02\xfd\x01\x4a\x02\x09\x00\x00\x00\xce\x02\x60\x00\x60\x00\x13\x02\x0e\x02\x18\x02\x00\x00\x27\x02\x00\x00\x01\x02\x6f\x00\x6f\x00\xe9\x01\x3a\x02\x00\x00\x00\x00\x00\x00\x03\x02\x04\x02\xba\x01\x17\x02\x00\x00\x49\x02\x7b\x00\x4b\x02\x00\x00\x00\x00\xc2\x00\x4d\x02\x7b\x02\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x20\x00\x60\x00\x60\x00\x0d\x02\x6f\x00\x5e\x02\x25\x00\x6f\x00\xac\x00\xa6\x02\x59\x02\x00\x00\x53\x02\xe2\x01\x5a\x02\x49\x00\x00\x00\x5b\x02\xba\x02\x6a\x02\x57\x02\x66\x02\x64\x02\x65\x02\x6e\x02\x00\x00\x14\x04\x00\x00\x29\x00\x72\x02\x00\x00\x7b\x02\x6f\x00\x36\x02\x00\x00\x7f\x02\x70\x02\x4c\x02\x8b\x02\x90\x02\x9a\x02\x8c\x02\x9b\x02\x9e\x02\x31\x02\x00\x00\x6f\x00\x00\x00\x62\x02\x75\x02\x76\x02\x00\x00\x77\x02\x00\x00\x00\x00\xa8\x02\x95\x02\xce\x02\x00\x00\xfd\x00\x9c\x02\x89\x02\xd0\x02\x6f\x00\xfd\x00\x00\x00\xdc\x02\xdf\x02\x00\x00\xe0\x02\xd1\x02\x00\x00\xf0\x02\x00\x00\xd3\x00\xd9\x02\xf6\x02\xe2\x02\xe2\x02\xe2\x02\xe2\x02\x88\x00\x88\x00\xe2\x02\xe2\x02\x64\x01\x20\x04\x26\x04\x29\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x02\xf2\x02\x00\x00\x00\x03\x00\x00\x07\x03\x6f\x00\x6f\x00\x6f\x00\x6f\x00\xe7\x02\x0e\x03\xcc\x02\x00\x00\x00\x00\x66\x00\x00\x00\x00\x00\x00\x00\x0c\x03\xdb\x02\xee\x02\xd3\x02\x00\x00\xe3\x02\x00\x00\x08\x03\x10\x03\x11\x03\x13\x03\x22\x03\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x02\xe5\x02\xeb\x02\xf5\x02\x00\x00\x34\x03\x27\x03\x00\x00\x3a\x03\x3e\x03\x00\x00\x00\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x46\x03\x63\x02\xce\x01\xca\x00\x38\x03\x00\x00\x2b\x03\x3c\x03\x4a\x03\x6f\x00\x0d\x03\x00\x00\x00\x00\x6f\x00\x20\x00\x4b\x03\x52\x03\x00\x00\x21\x03\x01\x00\x40\x03\x42\x03\x45\x03\x4f\x03\x00\x00\x24\x03\x25\x03\x32\x03\x00\x00\x20\x00\x53\x03\x00\x00\x20\x00\x6b\x03\x7a\x03\x7b\x03\x55\x03\x00\x00\x00\x00\x00\x00\x84\x03\x54\x03\x85\x03\x00\x00\x00\x00\x87\x03\x99\x03\x9b\x03\x95\x03\x8a\x03\x9d\x03\x5a\x03\x6d\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x03\xb1\x03\x00\x00\x00\x00\x00\x00"#--happyGotoOffsets :: HappyAddr-happyGotoOffsets = HappyA# "\xb9\x00\x00\x00\x00\x00\xee\x00\x00\x00\x00\x00\xb2\x03\x00\x00\xac\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbe\x03\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\xa0\x03\x00\x00\x00\x00\xc8\x03\xee\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc4\x03\x00\x00\xd1\x03\x00\x00\x00\x00\x0f\x01\x00\x00\x00\x00\xdc\x00\x00\x00\x00\x00\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\xf1\x00\xf9\x00\x00\x00\x00\x00\xc6\x03\x00\x00\x2e\x04\x00\x00\xe1\x00\xfd\xff\x41\x03\x4d\x03\x00\x00\xcd\x03\x00\x00\xd8\x03\x00\x00\x00\x00\x00\x00\x8b\x00\x00\x00\xe5\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\x00\x56\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x03\x5b\x03\x00\x00\x6f\x03\x00\x00\x00\x00\x00\x00\xca\x03\xcb\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x08\x02\x00\x00\x00\x00\x71\x03\x00\x00\x00\x00\xe1\x02\x00\x00\x00\x00\xe4\x02\x73\x03\x00\x00\xf8\x02\x00\x00\xe9\x03\x00\x00\x00\x00\x00\x00\x00\x00\x77\x01\x79\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x03\x75\x03\x89\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x03\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x03\x8d\x03\x8f\x03\xa3\x03\xa5\x03\xa7\x03\xa9\x03\xbd\x03\xbf\x03\xc1\x03\xc3\x03\xd7\x03\xd9\x03\xdb\x03\xdd\x03\xf1\x03\xfc\x00\x7b\x01\x7d\x01\x00\x00\xfb\x02\x00\x00\xec\x03\x0f\x03\xda\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\xff\x00\x00\x00\x00\x01\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf3\x03\x00\x00\x00\x00\x00\x00\x03\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\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\x12\x04\x1d\x01\x00\x00\x00\x00\x3f\x03\x16\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\x26\x03\x4f\x00\xf5\x03\xf7\x03\xfd\x03\x00\x00\x08\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x24\x01\x19\x04\x00\x00\x11\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x2e\x01\x21\x04\x00\x00\x00\x00\x3d\x03\x07\x01\x00\x00\x00\x00\x00\x00\x1b\x04\x1f\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x01\x00\x00\x00\x00\x32\x01\x00\x00\x00\x00\x00\x00\x29\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"#--happyAdjustOffset :: Happy_GHC_Exts.Int# -> Happy_GHC_Exts.Int#-happyAdjustOffset off = off--happyDefActions :: HappyAddr-happyDefActions = HappyA# "\xfe\xff\x00\x00\x00\x00\xfe\xff\xfb\xff\xfc\xff\xeb\xff\xfa\xff\x00\x00\x62\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\xff\x61\xff\x60\xff\x5f\xff\x5e\xff\x5d\xff\x5c\xff\x5b\xff\x5a\xff\x59\xff\xe7\xff\x00\x00\xda\xff\x00\x00\xd8\xff\x00\x00\x00\x00\x00\x00\xd5\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\xff\xea\xff\xfd\xff\x00\x00\x69\xff\xdd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdb\xff\x00\x00\xd6\xff\xd7\xff\x00\x00\xdc\xff\xd9\xff\xf6\xff\x00\x00\xd4\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x68\xff\x66\xff\x00\x00\xec\xff\xe9\xff\xe0\xff\x00\x00\xe0\xff\xe0\xff\x00\x00\x00\x00\x00\x00\xd3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xff\x00\x00\x00\x00\x6c\xff\x6d\xff\x64\xff\x67\xff\x6a\xff\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf7\xff\x00\x00\xf6\xff\x00\x00\x62\xff\x00\x00\x63\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xff\x87\xff\x00\x00\xf3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x76\xff\x77\xff\x88\xff\x83\xff\x83\xff\xf5\xff\xf8\xff\x00\x00\x00\x00\x00\x00\xe2\xff\x69\xff\x00\x00\x00\x00\x00\x00\x65\xff\xd2\xff\x7b\xff\x00\x00\x00\x00\x7b\xff\x00\x00\x00\x00\x7b\xff\x00\x00\x00\x00\x00\x00\x00\x00\xb8\xff\xb7\xff\x00\x00\x00\x00\x00\x00\x00\x00\x73\xff\x70\xff\x00\x00\x6e\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\xff\xdf\xff\xe8\xff\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xff\x00\x00\x72\xff\x00\x00\xcb\xff\xb4\xff\x00\x00\xb8\xff\xb7\xff\x00\x00\x00\x00\x00\x00\x00\x00\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\xff\x00\x00\x00\x00\x00\x00\x7b\xff\x00\x00\x00\x00\x7b\xff\x00\x00\x79\xff\x00\x00\x7a\xff\x00\x00\x00\x00\x00\x00\x00\x00\xc0\xff\x00\x00\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x00\x00\x8a\xff\x8d\xff\x00\x00\x8e\xff\x00\x00\x00\x00\x00\x00\xf4\xff\x00\x00\xee\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x84\xff\x7b\xff\x82\xff\x00\x00\x00\x00\x00\x00\xe1\xff\x00\x00\xf9\xff\xed\xff\x00\x00\xbe\xff\xbc\xff\xbd\xff\x00\x00\xa9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x6d\xff\x00\x00\x00\x00\xb0\xff\x00\x00\xad\xff\xc9\xff\x00\x00\xc4\xff\xb5\xff\xb6\xff\x00\x00\x90\xff\x8f\xff\x92\xff\x94\xff\x98\xff\x99\xff\x91\xff\x93\xff\x95\xff\x96\xff\x97\xff\x9a\xff\x9b\xff\x9c\xff\x9d\xff\x9e\xff\xb3\xff\x74\xff\x71\xff\x00\x00\x00\x00\xd1\xff\x00\x00\xbb\xff\x00\x00\x7b\xff\x81\xff\x00\x00\x00\x00\xa0\xff\x00\x00\x00\x00\xaf\xff\xae\xff\x00\x00\xc1\xff\x78\xff\xca\xff\x00\x00\xa1\xff\xa9\xff\x00\x00\xc2\xff\x00\x00\xcd\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\xff\x00\x00\xf0\xff\xef\xff\xf2\xff\xf1\xff\x8c\xff\x85\xff\x00\x00\x00\x00\x00\x00\x00\x00\xbf\xff\x00\x00\xa4\xff\xa8\xff\x00\x00\x00\x00\xab\xff\xc8\xff\x7b\xff\xac\xff\xc6\xff\xc3\xff\x00\x00\x00\x00\x00\x00\x7d\xff\x00\x00\x80\xff\x7f\xff\x00\x00\x00\x00\x00\x00\xb2\xff\x7c\xff\xd0\xff\x7b\xff\xe0\xff\x00\x00\x00\x00\xcc\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe3\xff\x00\x00\x00\x00\x00\x00\xa7\xff\xe0\xff\x00\x00\xa3\xff\xe0\xff\x00\x00\x00\x00\x00\x00\xba\xff\xb1\xff\x7e\xff\xce\xff\x00\x00\x00\x00\x00\x00\x9f\xff\xc7\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xff\xa6\xff\xa5\xff\xa2\xff\xc5\xff\xb9\xff\xcf\xff\x00\x00\x00\x00\xe4\xff\xe5\xff"#--happyCheck :: HappyAddr-happyCheck = HappyA# "\xff\xff\x02\x00\x4a\x00\x12\x00\x03\x00\x2f\x00\x07\x00\x31\x00\x06\x00\x22\x00\x0b\x00\x08\x00\x03\x00\x0e\x00\x0f\x00\x22\x00\x0b\x00\x0c\x00\x21\x00\x22\x00\x33\x00\x10\x00\x29\x00\x01\x00\x46\x00\x16\x00\x29\x00\x02\x00\x03\x00\x07\x00\x21\x00\x22\x00\x33\x00\x34\x00\x02\x00\x07\x00\x33\x00\x34\x00\x29\x00\x07\x00\x05\x00\x20\x00\x21\x00\x06\x00\x2b\x00\x46\x00\x47\x00\x2a\x00\x33\x00\x34\x00\x0d\x00\x2e\x00\x2b\x00\x0c\x00\x0d\x00\x0e\x00\x33\x00\x34\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x29\x00\x48\x00\x2b\x00\x2c\x00\x2d\x00\x2e\x00\x2f\x00\x07\x00\x31\x00\x32\x00\x33\x00\x0b\x00\x35\x00\x36\x00\x0e\x00\x0f\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x07\x00\x02\x00\x46\x00\x45\x00\x0b\x00\x07\x00\x07\x00\x0e\x00\x0f\x00\x21\x00\x22\x00\x07\x00\x24\x00\x25\x00\x26\x00\x07\x00\x17\x00\x29\x00\x07\x00\x0b\x00\x07\x00\x33\x00\x0e\x00\x0f\x00\x2b\x00\x2c\x00\x2d\x00\x33\x00\x34\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x07\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x07\x00\x0e\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x00\x00\x01\x00\x02\x00\x31\x00\x32\x00\x33\x00\x34\x00\x07\x00\x46\x00\x47\x00\x0a\x00\x46\x00\x0c\x00\x47\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x04\x00\x05\x00\x20\x00\x21\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x04\x00\x05\x00\x33\x00\x34\x00\x00\x00\x01\x00\x02\x00\x45\x00\x46\x00\x20\x00\x21\x00\x07\x00\x15\x00\x16\x00\x0a\x00\x02\x00\x0c\x00\x16\x00\x0b\x00\x0c\x00\x46\x00\x02\x00\x03\x00\x10\x00\x21\x00\x22\x00\x0b\x00\x0c\x00\x46\x00\x0b\x00\x0c\x00\x10\x00\x29\x00\x03\x00\x10\x00\x0d\x00\x0e\x00\x33\x00\x34\x00\x47\x00\x0b\x00\x0c\x00\x33\x00\x34\x00\x02\x00\x10\x00\x16\x00\x33\x00\x34\x00\x2a\x00\x0d\x00\x0e\x00\x46\x00\x2e\x00\x46\x00\x33\x00\x34\x00\x2a\x00\x33\x00\x34\x00\x2a\x00\x2e\x00\x33\x00\x34\x00\x2e\x00\x22\x00\x33\x00\x34\x00\x46\x00\x33\x00\x34\x00\x2a\x00\x0b\x00\x0c\x00\x07\x00\x2e\x00\x46\x00\x10\x00\x1b\x00\x1c\x00\x33\x00\x34\x00\x46\x00\x0b\x00\x0c\x00\x1b\x00\x1c\x00\x46\x00\x10\x00\x02\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x16\x00\x21\x00\x22\x00\x2a\x00\x16\x00\x25\x00\x26\x00\x2e\x00\x16\x00\x29\x00\x16\x00\x16\x00\x33\x00\x34\x00\x2a\x00\x16\x00\x46\x00\x46\x00\x2e\x00\x33\x00\x34\x00\x01\x00\x48\x00\x33\x00\x34\x00\x22\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x48\x00\x29\x00\x2a\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x48\x00\x48\x00\x48\x00\x35\x00\x46\x00\x08\x00\x16\x00\x1a\x00\x1b\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x46\x00\x46\x00\x15\x00\x16\x00\x15\x00\x16\x00\x15\x00\x16\x00\x15\x00\x16\x00\x04\x00\x09\x00\x46\x00\x05\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x07\x00\x29\x00\x07\x00\x29\x00\x45\x00\x29\x00\x16\x00\x02\x00\x16\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x16\x00\x16\x00\x16\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x04\x00\x07\x00\x46\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x05\x00\x03\x00\x05\x00\x48\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x05\x00\x0a\x00\x46\x00\x48\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x05\x00\x19\x00\x07\x00\x48\x00\x48\x00\x48\x00\x08\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x09\x00\x02\x00\x08\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x06\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x48\x00\x16\x00\x08\x00\x47\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x06\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x46\x00\x0e\x00\x46\x00\x46\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x07\x00\x09\x00\x46\x00\x09\x00\x08\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x02\x00\x08\x00\x08\x00\x08\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x07\x00\x18\x00\x02\x00\x16\x00\x08\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x07\x00\x16\x00\x16\x00\x46\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x08\x00\x16\x00\x06\x00\x16\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x06\x00\x02\x00\x47\x00\x08\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x09\x00\x02\x00\x02\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x0a\x00\x47\x00\x02\x00\x16\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x48\x00\x48\x00\x48\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x16\x00\x48\x00\x02\x00\x37\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x08\x00\x06\x00\x06\x00\x16\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x12\x00\x13\x00\x14\x00\x15\x00\x08\x00\x20\x00\x04\x00\x09\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x21\x00\x22\x00\x2d\x00\x21\x00\x22\x00\x07\x00\x27\x00\x28\x00\x29\x00\x27\x00\x28\x00\x29\x00\x07\x00\x28\x00\x02\x00\x45\x00\x06\x00\x38\x00\x33\x00\x34\x00\x47\x00\x33\x00\x34\x00\x21\x00\x22\x00\x48\x00\x21\x00\x22\x00\x16\x00\x27\x00\x28\x00\x29\x00\x27\x00\x28\x00\x29\x00\x37\x00\x16\x00\x16\x00\x45\x00\x16\x00\x08\x00\x33\x00\x34\x00\x48\x00\x33\x00\x34\x00\x21\x00\x22\x00\x47\x00\x21\x00\x22\x00\x01\x00\x27\x00\x28\x00\x29\x00\x27\x00\x28\x00\x29\x00\x47\x00\x16\x00\x04\x00\x01\x00\x08\x00\x16\x00\x33\x00\x34\x00\x08\x00\x33\x00\x34\x00\x21\x00\x22\x00\x03\x00\x21\x00\x22\x00\x02\x00\x27\x00\x28\x00\x29\x00\x27\x00\x28\x00\x29\x00\x08\x00\x47\x00\x03\x00\x16\x00\x08\x00\x16\x00\x33\x00\x34\x00\x16\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x27\x00\x28\x00\x29\x00\x28\x00\x29\x00\x48\x00\x29\x00\x47\x00\x47\x00\x02\x00\x21\x00\x22\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x29\x00\x21\x00\x22\x00\x47\x00\x21\x00\x22\x00\x21\x00\x22\x00\x04\x00\x29\x00\x33\x00\x34\x00\x29\x00\x08\x00\x29\x00\x30\x00\x02\x00\x02\x00\x34\x00\x33\x00\x34\x00\x04\x00\x33\x00\x34\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x46\x00\x29\x00\x02\x00\x29\x00\x08\x00\x29\x00\x04\x00\x16\x00\x47\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x16\x00\x29\x00\x48\x00\x29\x00\x08\x00\x29\x00\x08\x00\x08\x00\x0f\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x0f\x00\x29\x00\x2f\x00\x29\x00\x09\x00\x29\x00\x0f\x00\x03\x00\x0f\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x1a\x00\x29\x00\x11\x00\x29\x00\x06\x00\x29\x00\x23\x00\x23\x00\x2d\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x18\x00\x29\x00\x13\x00\x29\x00\x19\x00\x29\x00\x06\x00\x2e\x00\x06\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x21\x00\x22\x00\x29\x00\x09\x00\x29\x00\x20\x00\x29\x00\x09\x00\x29\x00\x19\x00\x11\x00\x1f\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x33\x00\x34\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x11\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x1e\x00\x17\x00\x1e\x00\x1a\x00\x1b\x00\x1d\x00\x14\x00\xff\xff\xff\xff\x1a\x00\x1b\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\xff\xff\x46\x00\x47\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x2b\x00\x2c\x00\x2d\x00\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\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"#--happyTable :: HappyAddr-happyTable = HappyA# "\x00\x00\x7c\x00\xff\xff\x03\x01\x80\x01\xaa\x00\x7d\x00\xab\x00\xf1\x00\x21\x00\x7e\x00\x8b\x00\xcc\x00\x7f\x00\x80\x00\x50\x01\x51\x00\x52\x00\x04\x01\x78\x00\x2f\x00\x53\x00\x79\x00\x91\x00\x26\x00\x8c\x00\x79\x00\x50\x00\x51\x00\x92\x00\x9a\x00\x78\x00\x7a\x00\x09\x00\x58\x00\x2c\x00\x7a\x00\x09\x00\x79\x00\x59\x00\xa8\x00\xcd\x00\xce\x00\x10\x01\x81\x01\x22\x00\x23\x00\x54\x00\x7a\x00\x09\x00\x11\x01\x55\x00\xcf\x00\xbc\x00\xbd\x00\xbe\x00\x56\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x11\x00\xf2\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x75\xff\x7d\x00\x75\xff\x5e\x00\x5f\x00\x7e\x00\x13\x00\x60\x00\x7f\x00\x80\x00\x61\x00\x62\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x63\x00\x64\x00\x9f\x00\x5e\x01\x26\x00\x12\x01\x7e\x00\x2b\x00\x5f\x01\x7f\x00\x80\x00\x65\x01\x78\x00\x2a\x00\x66\x01\x67\x01\x68\x01\x7d\x00\xa0\x00\x79\x00\x29\x00\x7e\x00\x28\x00\x06\x01\x7f\x00\x80\x00\x2a\x01\xa2\x00\xa3\x00\x7a\x00\x09\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x7d\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\x27\x00\x7f\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x02\x00\x03\x00\x04\x00\x8f\x00\x4c\x00\x4d\x00\x09\x00\x05\x00\xa6\x00\xa7\x00\x06\x00\x26\x00\x07\x00\x24\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x6e\x00\x6f\x00\xcd\x00\xce\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\x85\x00\x6f\x00\x08\x00\x09\x00\x2f\x00\x03\x00\x04\x00\x63\x00\x0d\x01\xcd\x00\xce\x00\x05\x00\x9b\x00\x9c\x00\x06\x00\x40\x00\x07\x00\x3f\x00\xac\x00\x52\x00\x3e\x00\x50\x00\x51\x00\x53\x00\x9d\x00\x78\x00\xab\x00\x52\x00\x3d\x00\x17\x01\x52\x00\x53\x00\x79\x00\x3c\x00\x53\x00\x1e\x00\x1f\x00\x70\x00\x71\x00\x6e\x01\x84\x01\x52\x00\x7a\x00\x09\x00\x3b\x00\x53\x00\x3a\x00\x70\x00\x71\x00\x54\x00\x40\x00\x1f\x00\x39\x00\x55\x00\x38\x00\x08\x00\x09\x00\x54\x00\x56\x00\x09\x00\x54\x00\x55\x00\xfa\x00\x09\x00\x55\x00\x73\x00\x56\x00\x09\x00\x37\x00\x56\x00\x09\x00\x54\x00\x91\x01\x52\x00\x32\x00\x55\x00\x36\x00\x53\x00\x3f\x01\x40\x01\x56\x00\x09\x00\x35\x00\x8f\x01\x52\x00\x59\x01\x40\x01\x34\x00\x53\x00\x33\x00\x74\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x4a\x00\x65\x01\x78\x00\x54\x00\x49\x00\x88\x01\x68\x01\x55\x00\x48\x00\x79\x00\x47\x00\x46\x00\x56\x00\x09\x00\x54\x00\x45\x00\x26\x00\x43\x00\x55\x00\x7a\x00\x09\x00\x6e\x00\x6d\x00\x56\x00\x09\x00\x0b\x00\x0c\x00\x0d\x00\x0e\x00\x0f\x00\x10\x00\x6c\x00\x11\x00\x12\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x6b\x00\x6a\x00\x69\x00\x13\x00\x68\x00\x67\x00\x66\x00\xc6\x00\xc7\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x65\x00\x1e\x00\xb8\x00\xb9\x00\xb7\x00\x9c\x00\x16\x01\x9c\x00\x15\x01\x9c\x00\xae\x00\xa9\x00\xa1\x00\x97\x00\xba\x00\x78\x00\x9d\x00\x78\x00\x9d\x00\x78\x00\x9d\x00\x78\x00\x79\x00\x98\x00\x79\x00\x95\x00\x79\x00\x94\x00\x79\x00\x8f\x00\xee\x00\x8d\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x2e\x01\x8a\x00\x89\x00\x88\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x6f\x01\x87\x00\x76\x00\xf0\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x77\x00\x08\x01\x75\x00\xef\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xec\x00\xed\x00\xe9\x00\xe4\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xd2\x00\xe6\x00\xd3\x00\xe3\x00\xe2\x00\xe0\x00\xdf\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xdc\x00\xdb\x00\xb7\x00\xb6\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\x2d\x01\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x09\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xd8\x00\xb5\x00\xb4\x00\xb0\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\x4b\x01\xe0\x00\x4b\x00\x4c\x00\x4d\x00\x09\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xa6\x00\xaf\x00\x31\x01\x30\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xd0\x00\x2c\x01\x15\x01\x2a\x01\x29\x01\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x13\x01\x0a\x01\x07\x01\x03\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\x70\x01\x09\x01\x01\x01\x00\x01\xff\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xfa\x00\xfe\x00\xfd\x00\xf7\x00\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xf9\x00\xfc\x00\xf6\x00\x8f\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\xf3\x00\x50\x01\xf4\x00\x4e\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xd4\x00\x4f\x01\x4d\x01\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x4c\x01\x49\x01\x45\x01\x44\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x0b\x01\x48\x01\x47\x01\x46\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x8f\x00\x3f\x01\x3e\x01\x42\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xc5\x00\x3b\x01\x3a\x01\x39\x01\x38\x01\xc6\x00\xc7\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\x00\x00\x00\x00\x37\x01\xcd\x00\x36\x01\x34\x01\xc6\x00\xc7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd4\x00\x78\x00\x35\x01\xd4\x00\x78\x00\x33\x01\xdc\x00\xd6\x00\x79\x00\xd9\x00\xd6\x00\x79\x00\x32\x01\x63\x01\x61\x01\x12\x01\x5d\x01\x5c\x01\x7a\x00\x09\x00\x7a\x01\x7a\x00\x09\x00\xd4\x00\x78\x00\x59\x01\xd4\x00\x78\x00\x56\x01\xd5\x00\xd6\x00\x79\x00\x13\x01\xd6\x00\x79\x00\x42\x01\x55\x01\x54\x01\x94\x00\x53\x01\x52\x01\x7a\x00\x09\x00\x79\x01\x7a\x00\x09\x00\xd4\x00\x78\x00\x78\x01\xd4\x00\x78\x00\x76\x01\x0d\x01\xd6\x00\x79\x00\x49\x01\xd6\x00\x79\x00\x77\x01\x75\x01\x74\x01\x73\x01\x6d\x01\x6c\x01\x7a\x00\x09\x00\x6b\x01\x7a\x00\x09\x00\xd4\x00\x78\x00\x71\x01\xd4\x00\x78\x00\x8a\x01\x69\x01\xd6\x00\x79\x00\x71\x01\xd6\x00\x79\x00\x84\x01\x88\x01\x83\x01\x7e\x01\x7b\x01\x7d\x01\x7a\x00\x09\x00\x7c\x01\x7a\x00\x09\x00\xd4\x00\x78\x00\xd4\x00\x78\x00\x99\x00\x78\x00\x85\x01\xd6\x00\x79\x00\x3c\x01\x79\x00\x59\x01\x79\x00\x95\x01\x94\x01\x8f\x01\x98\x00\x78\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x79\x00\x77\x00\x78\x00\x93\x01\xea\x00\x78\x00\xe9\x00\x78\x00\x8e\x01\x79\x00\x7a\x00\x09\x00\x79\x00\x8d\x01\x79\x00\x8c\x01\x9e\x01\x9c\x01\x9d\x01\x7a\x00\x09\x00\x9b\x01\x7a\x00\x09\x00\x7a\x00\x09\x00\xe7\x00\x78\x00\xdd\x00\x78\x00\xd8\x00\x78\x00\xb1\x00\x78\x00\x79\x00\x91\x01\x79\x00\x9a\x01\x79\x00\x98\x01\x79\x00\x99\x01\x97\x01\xa0\x01\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\xb0\x00\x78\x00\x27\x01\x78\x00\x26\x01\x78\x00\x25\x01\x78\x00\x79\x00\x96\x01\x79\x00\x9f\x01\x79\x00\xa2\x01\x79\x00\xa1\x01\x2d\x00\x2c\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x24\x01\x78\x00\x23\x01\x78\x00\x22\x01\x78\x00\x21\x01\x78\x00\x79\x00\x24\x00\x79\x00\x30\x00\x79\x00\x4e\x00\x79\x00\x43\x00\x41\x00\x2c\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x20\x01\x78\x00\x1f\x01\x78\x00\x1e\x01\x78\x00\x1d\x01\x78\x00\x79\x00\x95\x00\x79\x00\x92\x00\x79\x00\x8d\x00\x79\x00\xe6\x00\xe4\x00\xb2\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x1c\x01\x78\x00\x1b\x01\x78\x00\x1a\x01\x78\x00\x19\x01\x78\x00\x79\x00\xd0\x00\x79\x00\x2e\x01\x79\x00\x0e\x01\x79\x00\x01\x01\x0b\x01\xf4\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x18\x01\x78\x00\xf7\x00\x78\x00\x64\x01\x78\x00\x63\x01\x78\x00\x79\x00\x42\x01\x79\x00\x61\x01\x79\x00\x3b\x01\x79\x00\x5f\x01\x56\x01\x5a\x01\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\x7a\x00\x09\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\x57\x01\x86\x01\x81\x01\xc6\x00\xc7\x00\x7e\x01\x8a\x01\x00\x00\x00\x00\xc6\x00\xc7\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\x00\x00\xa6\x00\xa7\x00\x14\x00\x15\x00\x16\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x1d\x00\xa1\x00\xa2\x00\xa3\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x4c\x00\x4d\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"#--happyReduceArr = Happy_Data_Array.array (1, 166) [-	(1 , happyReduce_1),-	(2 , happyReduce_2),-	(3 , happyReduce_3),-	(4 , happyReduce_4),-	(5 , happyReduce_5),-	(6 , happyReduce_6),-	(7 , happyReduce_7),-	(8 , happyReduce_8),-	(9 , happyReduce_9),-	(10 , happyReduce_10),-	(11 , happyReduce_11),-	(12 , happyReduce_12),-	(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)-	]--happy_n_terms = 75 :: Int-happy_n_nonterms = 53 :: Int--happyReduce_1 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_1 = happySpecReduce_0  0# happyReduction_1-happyReduction_1  =  happyIn4-		 (return ()-	)--happyReduce_2 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_2 = happySpecReduce_2  0# happyReduction_2-happyReduction_2 happy_x_2-	happy_x_1-	 =  case happyOut5 happy_x_1 of { happy_var_1 -> -	case happyOut4 happy_x_2 of { happy_var_2 -> -	happyIn4-		 (do happy_var_1; happy_var_2-	)}}--happyReduce_3 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_3 = happySpecReduce_1  1# happyReduction_3-happyReduction_3 happy_x_1-	 =  case happyOut11 happy_x_1 of { happy_var_1 -> -	happyIn5-		 (happy_var_1-	)}--happyReduce_4 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_4 = happySpecReduce_1  1# happyReduction_4-happyReduction_4 happy_x_1-	 =  case happyOut6 happy_x_1 of { happy_var_1 -> -	happyIn5-		 (happy_var_1-	)}--happyReduce_5 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_5 = happySpecReduce_1  1# happyReduction_5-happyReduction_5 happy_x_1-	 =  case happyOut16 happy_x_1 of { happy_var_1 -> -	happyIn5-		 (happy_var_1-	)}--happyReduce_6 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_6 = happyMonadReduce 8# 1# happyReduction_6-happyReduction_6 (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_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Name        happy_var_5)) -> -	case happyOut10 happy_x_6 of { happy_var_6 -> -	( liftP . withThisPackage $ \pkg ->-                   do lits <- sequence happy_var_6;-                      staticClosure pkg happy_var_3 happy_var_5 (map getLit lits))}}})-	) (\r -> happyReturn (happyIn5 r))--happyReduce_7 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_7 = happyReduce 6# 2# happyReduction_7-happyReduction_7 (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_2 of { (L _ (CmmT_String      happy_var_2)) -> -	case happyOut7 happy_x_4 of { happy_var_4 -> -	case happyOut8 happy_x_5 of { happy_var_5 -> -	happyIn6-		 (do lbl <- happy_var_4;-                     ss <- sequence happy_var_5;-                     code (emitDecl (CmmData (Section (section happy_var_2) lbl) (Statics lbl $ concat ss)))-	) `HappyStk` happyRest}}}--happyReduce_8 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_8 = happyMonadReduce 2# 3# happyReduction_8-happyReduction_8 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	( liftP . withThisPackage $ \pkg ->-                   return (mkCmmDataLabel pkg happy_var_1))})-	) (\r -> happyReturn (happyIn7 r))--happyReduce_9 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_9 = happySpecReduce_0  4# happyReduction_9-happyReduction_9  =  happyIn8-		 ([]-	)--happyReduce_10 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_10 = happySpecReduce_2  4# happyReduction_10-happyReduction_10 happy_x_2-	happy_x_1-	 =  case happyOut9 happy_x_1 of { happy_var_1 -> -	case happyOut8 happy_x_2 of { happy_var_2 -> -	happyIn8-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_11 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_11 = happySpecReduce_3  5# happyReduction_11-happyReduction_11 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_2 of { happy_var_2 -> -	happyIn9-		 (do e <- happy_var_2;-                             return [CmmStaticLit (getLit e)]-	)}--happyReduce_12 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_12 = happySpecReduce_2  5# happyReduction_12-happyReduction_12 happy_x_2-	happy_x_1-	 =  case happyOut55 happy_x_1 of { happy_var_1 -> -	happyIn9-		 (return [CmmUninitialised-                                                        (widthInBytes (typeWidth happy_var_1))]-	)}--happyReduce_13 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_13 = happyReduce 5# 5# happyReduction_13-happyReduction_13 (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_4 of { (L _ (CmmT_String      happy_var_4)) -> -	happyIn9-		 (return [mkString happy_var_4]-	) `HappyStk` happyRest}--happyReduce_14 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_14 = happyReduce 5# 5# happyReduction_14-happyReduction_14 (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_3 of { (L _ (CmmT_Int         happy_var_3)) -> -	happyIn9-		 (return [CmmUninitialised -                                                        (fromIntegral happy_var_3)]-	) `HappyStk` happyRest}--happyReduce_15 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_15 = happyReduce 5# 5# happyReduction_15-happyReduction_15 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut56 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_3 of { (L _ (CmmT_Int         happy_var_3)) -> -	happyIn9-		 (return [CmmUninitialised -                                                (widthInBytes (typeWidth happy_var_1) * -                                                        fromIntegral happy_var_3)]-	) `HappyStk` happyRest}}--happyReduce_16 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_16 = happyReduce 5# 5# happyReduction_16-happyReduction_16 (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_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOut10 happy_x_4 of { happy_var_4 -> -	happyIn9-		 (do { lits <- sequence happy_var_4-                ; dflags <- getDynFlags-                     ; return $ map CmmStaticLit $-                        mkStaticClosure dflags (mkForeignLabel happy_var_3 Nothing ForeignLabelInExternalPackage IsData)-                         -- mkForeignLabel because these are only used-                         -- for CHARLIKE and INTLIKE closures in the RTS.-                        dontCareCCS (map getLit lits) [] [] [] }-	) `HappyStk` happyRest}}--happyReduce_17 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_17 = happySpecReduce_0  6# happyReduction_17-happyReduction_17  =  happyIn10-		 ([]-	)--happyReduce_18 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_18 = happySpecReduce_3  6# happyReduction_18-happyReduction_18 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_2 of { happy_var_2 -> -	case happyOut10 happy_x_3 of { happy_var_3 -> -	happyIn10-		 (happy_var_2 : happy_var_3-	)}}--happyReduce_19 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_19 = happyReduce 4# 7# happyReduction_19-happyReduction_19 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut14 happy_x_1 of { happy_var_1 -> -	case happyOut12 happy_x_2 of { happy_var_2 -> -	case happyOut51 happy_x_3 of { happy_var_3 -> -	case happyOut13 happy_x_4 of { happy_var_4 -> -	happyIn11-		 (do ((entry_ret_label, info, stk_formals, formals), agraph) <--                       getCodeScoped $ loopDecls $ do {-                         (entry_ret_label, info, stk_formals) <- happy_var_1;-                         dflags <- getDynFlags;-                         formals <- sequence (fromMaybe [] happy_var_3);-                         withName (showSDoc dflags (ppr entry_ret_label))-                           happy_var_4;-                         return (entry_ret_label, info, stk_formals, formals) }-                     let do_layout = isJust happy_var_3-                     code (emitProcWithStackFrame happy_var_2 info-                                entry_ret_label stk_formals formals agraph-                                do_layout )-	) `HappyStk` happyRest}}}}--happyReduce_20 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_20 = happySpecReduce_0  8# happyReduction_20-happyReduction_20  =  happyIn12-		 (NativeNodeCall-	)--happyReduce_21 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_21 = happySpecReduce_1  8# happyReduction_21-happyReduction_21 happy_x_1-	 =  happyIn12-		 (NativeReturn-	)--happyReduce_22 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_22 = happySpecReduce_1  9# happyReduction_22-happyReduction_22 happy_x_1-	 =  happyIn13-		 (return ()-	)--happyReduce_23 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_23 = happySpecReduce_3  9# happyReduction_23-happyReduction_23 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut15 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn13-		 (withSourceNote happy_var_1 happy_var_3 happy_var_2-	)}}}--happyReduce_24 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_24 = happyMonadReduce 1# 10# happyReduction_24-happyReduction_24 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	( liftP . withThisPackage $ \pkg ->-                   do   newFunctionName happy_var_1 pkg-                        return (mkCmmCodeLabel pkg happy_var_1, Nothing, []))})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_25 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_25 = happyMonadReduce 14# 10# happyReduction_25-happyReduction_25 (happy_x_14 `HappyStk`-	happy_x_13 `HappyStk`-	happy_x_12 `HappyStk`-	happy_x_11 `HappyStk`-	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) tk-	 = happyThen ((case happyOutTok happy_x_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Int         happy_var_5)) -> -	case happyOutTok happy_x_7 of { (L _ (CmmT_Int         happy_var_7)) -> -	case happyOutTok happy_x_9 of { (L _ (CmmT_Int         happy_var_9)) -> -	case happyOutTok happy_x_11 of { (L _ (CmmT_String      happy_var_11)) -> -	case happyOutTok happy_x_13 of { (L _ (CmmT_String      happy_var_13)) -> -	( liftP . withThisPackage $ \pkg ->-                   do dflags <- getDynFlags-                      let prof = profilingInfo dflags happy_var_11 happy_var_13-                          rep  = mkRTSRep (fromIntegral happy_var_9) $-                                   mkHeapRep dflags False (fromIntegral happy_var_5)-                                                   (fromIntegral happy_var_7) Thunk-                              -- not really Thunk, but that makes the info table-                              -- we want.-                      return (mkCmmEntryLabel pkg happy_var_3,-                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3-                                           , cit_rep = rep-                                           , cit_prof = prof, cit_srt = NoC_SRT },-                              []))}}}}}})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_26 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_26 = happyMonadReduce 16# 10# happyReduction_26-happyReduction_26 (happy_x_16 `HappyStk`-	happy_x_15 `HappyStk`-	happy_x_14 `HappyStk`-	happy_x_13 `HappyStk`-	happy_x_12 `HappyStk`-	happy_x_11 `HappyStk`-	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) tk-	 = happyThen ((case happyOutTok happy_x_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Int         happy_var_5)) -> -	case happyOutTok happy_x_7 of { (L _ (CmmT_Int         happy_var_7)) -> -	case happyOutTok happy_x_9 of { (L _ (CmmT_Int         happy_var_9)) -> -	case happyOutTok happy_x_11 of { (L _ (CmmT_String      happy_var_11)) -> -	case happyOutTok happy_x_13 of { (L _ (CmmT_String      happy_var_13)) -> -	case happyOutTok happy_x_15 of { (L _ (CmmT_Int         happy_var_15)) -> -	( liftP . withThisPackage $ \pkg ->-                   do dflags <- getDynFlags-                      let prof = profilingInfo dflags happy_var_11 happy_var_13-                          ty   = Fun 0 (ArgSpec (fromIntegral happy_var_15))-                                -- Arity zero, arg_type happy_var_15-                          rep = mkRTSRep (fromIntegral happy_var_9) $-                                    mkHeapRep dflags False (fromIntegral happy_var_5)-                                                    (fromIntegral happy_var_7) ty-                      return (mkCmmEntryLabel pkg happy_var_3,-                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3-                                           , cit_rep = rep-                                           , cit_prof = prof, cit_srt = NoC_SRT },-                              []))}}}}}}})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_27 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_27 = happyMonadReduce 16# 10# happyReduction_27-happyReduction_27 (happy_x_16 `HappyStk`-	happy_x_15 `HappyStk`-	happy_x_14 `HappyStk`-	happy_x_13 `HappyStk`-	happy_x_12 `HappyStk`-	happy_x_11 `HappyStk`-	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) tk-	 = happyThen ((case happyOutTok happy_x_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Int         happy_var_5)) -> -	case happyOutTok happy_x_7 of { (L _ (CmmT_Int         happy_var_7)) -> -	case happyOutTok happy_x_9 of { (L _ (CmmT_Int         happy_var_9)) -> -	case happyOutTok happy_x_11 of { (L _ (CmmT_Int         happy_var_11)) -> -	case happyOutTok happy_x_13 of { (L _ (CmmT_String      happy_var_13)) -> -	case happyOutTok happy_x_15 of { (L _ (CmmT_String      happy_var_15)) -> -	( liftP . withThisPackage $ \pkg ->-                   do dflags <- getDynFlags-                      let prof = profilingInfo dflags happy_var_13 happy_var_15-                          ty  = Constr (fromIntegral happy_var_9)  -- Tag-                                       (stringToWord8s happy_var_13)-                          rep = mkRTSRep (fromIntegral happy_var_11) $-                                  mkHeapRep dflags False (fromIntegral happy_var_5)-                                                  (fromIntegral happy_var_7) ty-                      return (mkCmmEntryLabel pkg happy_var_3,-                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3-                                           , cit_rep = rep-                                           , cit_prof = prof, cit_srt = NoC_SRT },-                              []))}}}}}}})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_28 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_28 = happyMonadReduce 12# 10# happyReduction_28-happyReduction_28 (happy_x_12 `HappyStk`-	happy_x_11 `HappyStk`-	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) tk-	 = happyThen ((case happyOutTok happy_x_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Int         happy_var_5)) -> -	case happyOutTok happy_x_7 of { (L _ (CmmT_Int         happy_var_7)) -> -	case happyOutTok happy_x_9 of { (L _ (CmmT_String      happy_var_9)) -> -	case happyOutTok happy_x_11 of { (L _ (CmmT_String      happy_var_11)) -> -	( liftP . withThisPackage $ \pkg ->-                   do dflags <- getDynFlags-                      let prof = profilingInfo dflags happy_var_9 happy_var_11-                          ty  = ThunkSelector (fromIntegral happy_var_5)-                          rep = mkRTSRep (fromIntegral happy_var_7) $-                                   mkHeapRep dflags False 0 0 ty-                      return (mkCmmEntryLabel pkg happy_var_3,-                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg happy_var_3-                                           , cit_rep = rep-                                           , cit_prof = prof, cit_srt = NoC_SRT },-                              []))}}}}})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_29 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_29 = happyMonadReduce 6# 10# happyReduction_29-happyReduction_29 (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_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Int         happy_var_5)) -> -	( liftP . withThisPackage $ \pkg ->-                   do let prof = NoProfilingInfo-                          rep  = mkRTSRep (fromIntegral happy_var_5) $ mkStackRep []-                      return (mkCmmRetLabel pkg happy_var_3,-                              Just $ CmmInfoTable { cit_lbl = mkCmmRetInfoLabel pkg happy_var_3-                                           , cit_rep = rep-                                           , cit_prof = prof, cit_srt = NoC_SRT },-                              []))}})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_30 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_30 = happyMonadReduce 8# 10# happyReduction_30-happyReduction_30 (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_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOutTok happy_x_5 of { (L _ (CmmT_Int         happy_var_5)) -> -	case happyOut52 happy_x_7 of { happy_var_7 -> -	( liftP . withThisPackage $ \pkg ->-                   do dflags <- getDynFlags-                      live <- sequence happy_var_7-                      let prof = NoProfilingInfo-                          -- drop one for the info pointer-                          bitmap = mkLiveness dflags (map Just (drop 1 live))-                          rep  = mkRTSRep (fromIntegral happy_var_5) $ mkStackRep bitmap-                      return (mkCmmRetLabel pkg happy_var_3,-                              Just $ CmmInfoTable { cit_lbl = mkCmmRetInfoLabel pkg happy_var_3-                                           , cit_rep = rep-                                           , cit_prof = prof, cit_srt = NoC_SRT },-                              live))}}})-	) (\r -> happyReturn (happyIn14 r))--happyReduce_31 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_31 = happySpecReduce_0  11# happyReduction_31-happyReduction_31  =  happyIn15-		 (return ()-	)--happyReduce_32 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_32 = happySpecReduce_2  11# happyReduction_32-happyReduction_32 happy_x_2-	happy_x_1-	 =  case happyOut16 happy_x_1 of { happy_var_1 -> -	case happyOut15 happy_x_2 of { happy_var_2 -> -	happyIn15-		 (do happy_var_1; happy_var_2-	)}}--happyReduce_33 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_33 = happySpecReduce_2  11# happyReduction_33-happyReduction_33 happy_x_2-	happy_x_1-	 =  case happyOut20 happy_x_1 of { happy_var_1 -> -	case happyOut15 happy_x_2 of { happy_var_2 -> -	happyIn15-		 (do happy_var_1; happy_var_2-	)}}--happyReduce_34 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_34 = happySpecReduce_3  12# happyReduction_34-happyReduction_34 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut55 happy_x_1 of { happy_var_1 -> -	case happyOut19 happy_x_2 of { happy_var_2 -> -	happyIn16-		 (mapM_ (newLocal happy_var_1) happy_var_2-	)}}--happyReduce_35 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_35 = happySpecReduce_3  12# happyReduction_35-happyReduction_35 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut17 happy_x_2 of { happy_var_2 -> -	happyIn16-		 (mapM_ newImport happy_var_2-	)}--happyReduce_36 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_36 = happySpecReduce_3  12# happyReduction_36-happyReduction_36 happy_x_3-	happy_x_2-	happy_x_1-	 =  happyIn16-		 (return ()-	)--happyReduce_37 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_37 = happySpecReduce_1  13# happyReduction_37-happyReduction_37 happy_x_1-	 =  case happyOut18 happy_x_1 of { happy_var_1 -> -	happyIn17-		 ([happy_var_1]-	)}--happyReduce_38 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_38 = happySpecReduce_3  13# happyReduction_38-happyReduction_38 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_1 of { happy_var_1 -> -	case happyOut17 happy_x_3 of { happy_var_3 -> -	happyIn17-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_39 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_39 = happySpecReduce_1  14# happyReduction_39-happyReduction_39 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn18-		 ((happy_var_1, mkForeignLabel happy_var_1 Nothing ForeignLabelInExternalPackage IsFunction)-	)}--happyReduce_40 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_40 = happySpecReduce_2  14# happyReduction_40-happyReduction_40 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { (L _ (CmmT_Name        happy_var_2)) -> -	happyIn18-		 ((happy_var_2, mkForeignLabel happy_var_2 Nothing ForeignLabelInExternalPackage IsData)-	)}--happyReduce_41 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_41 = happySpecReduce_2  14# happyReduction_41-happyReduction_41 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_String      happy_var_1)) -> -	case happyOutTok happy_x_2 of { (L _ (CmmT_Name        happy_var_2)) -> -	happyIn18-		 ((happy_var_2, mkCmmCodeLabel (fsToUnitId (mkFastString happy_var_1)) happy_var_2)-	)}}--happyReduce_42 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_42 = happySpecReduce_1  15# happyReduction_42-happyReduction_42 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn19-		 ([happy_var_1]-	)}--happyReduce_43 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_43 = happySpecReduce_3  15# happyReduction_43-happyReduction_43 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	case happyOut19 happy_x_3 of { happy_var_3 -> -	happyIn19-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_44 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_44 = happySpecReduce_1  16# happyReduction_44-happyReduction_44 happy_x_1-	 =  happyIn20-		 (return ()-	)--happyReduce_45 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_45 = happySpecReduce_2  16# happyReduction_45-happyReduction_45 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn20-		 (do l <- newLabel happy_var_1; emitLabel l-	)}--happyReduce_46 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_46 = happyReduce 4# 16# happyReduction_46-happyReduction_46 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut50 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn20-		 (do reg <- happy_var_1; e <- happy_var_3; withSourceNote happy_var_2 happy_var_4 (emitAssign reg e)-	) `HappyStk` happyRest}}}}--happyReduce_47 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_47 = happyReduce 7# 16# happyReduction_47-happyReduction_47 (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 happyOut55 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	case happyOut37 happy_x_6 of { happy_var_6 -> -	case happyOutTok happy_x_7 of { happy_var_7 -> -	happyIn20-		 (withSourceNote happy_var_2 happy_var_7 (doStore happy_var_1 happy_var_3 happy_var_6)-	) `HappyStk` happyRest}}}}}--happyReduce_48 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_48 = happyMonadReduce 10# 16# happyReduction_48-happyReduction_48 (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) tk-	 = happyThen ((case happyOut46 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_3 of { (L _ (CmmT_String      happy_var_3)) -> -	case happyOut23 happy_x_4 of { happy_var_4 -> -	case happyOut40 happy_x_6 of { happy_var_6 -> -	case happyOut27 happy_x_8 of { happy_var_8 -> -	case happyOut24 happy_x_9 of { happy_var_9 -> -	( foreignCall happy_var_3 happy_var_1 happy_var_4 happy_var_6 happy_var_8 happy_var_9)}}}}}})-	) (\r -> happyReturn (happyIn20 r))--happyReduce_49 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_49 = happyMonadReduce 8# 16# happyReduction_49-happyReduction_49 (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 happyOut46 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_4 of { (L _ (CmmT_Name        happy_var_4)) -> -	case happyOut43 happy_x_6 of { happy_var_6 -> -	( primCall happy_var_1 happy_var_4 happy_var_6)}}})-	) (\r -> happyReturn (happyIn20 r))--happyReduce_50 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_50 = happyMonadReduce 5# 16# happyReduction_50-happyReduction_50 (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 { (L _ (CmmT_Name        happy_var_1)) -> -	case happyOut43 happy_x_3 of { happy_var_3 -> -	( stmtMacro happy_var_1 happy_var_3)}})-	) (\r -> happyReturn (happyIn20 r))--happyReduce_51 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_51 = happyReduce 7# 16# happyReduction_51-happyReduction_51 (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 happyOut30 happy_x_2 of { happy_var_2 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	case happyOut31 happy_x_5 of { happy_var_5 -> -	case happyOut35 happy_x_6 of { happy_var_6 -> -	happyIn20-		 (do as <- sequence happy_var_5; doSwitch happy_var_2 happy_var_3 as happy_var_6-	) `HappyStk` happyRest}}}}--happyReduce_52 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_52 = happySpecReduce_3  16# happyReduction_52-happyReduction_52 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { (L _ (CmmT_Name        happy_var_2)) -> -	happyIn20-		 (do l <- lookupLabel happy_var_2; emit (mkBranch l)-	)}--happyReduce_53 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_53 = happyReduce 5# 16# happyReduction_53-happyReduction_53 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut43 happy_x_3 of { happy_var_3 -> -	happyIn20-		 (doReturn happy_var_3-	) `HappyStk` happyRest}--happyReduce_54 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_54 = happyReduce 4# 16# happyReduction_54-happyReduction_54 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut37 happy_x_2 of { happy_var_2 -> -	case happyOut28 happy_x_3 of { happy_var_3 -> -	happyIn20-		 (doRawJump happy_var_2 happy_var_3-	) `HappyStk` happyRest}}--happyReduce_55 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_55 = happyReduce 6# 16# happyReduction_55-happyReduction_55 (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 happyOut37 happy_x_2 of { happy_var_2 -> -	case happyOut43 happy_x_4 of { happy_var_4 -> -	happyIn20-		 (doJumpWithStack happy_var_2 [] happy_var_4-	) `HappyStk` happyRest}}--happyReduce_56 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_56 = happyReduce 9# 16# happyReduction_56-happyReduction_56 (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 happyOut37 happy_x_2 of { happy_var_2 -> -	case happyOut43 happy_x_4 of { happy_var_4 -> -	case happyOut43 happy_x_7 of { happy_var_7 -> -	happyIn20-		 (doJumpWithStack happy_var_2 happy_var_4 happy_var_7-	) `HappyStk` happyRest}}}--happyReduce_57 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_57 = happyReduce 6# 16# happyReduction_57-happyReduction_57 (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 happyOut37 happy_x_2 of { happy_var_2 -> -	case happyOut43 happy_x_4 of { happy_var_4 -> -	happyIn20-		 (doCall happy_var_2 [] happy_var_4-	) `HappyStk` happyRest}}--happyReduce_58 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_58 = happyReduce 10# 16# happyReduction_58-happyReduction_58 (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 happyOut53 happy_x_2 of { happy_var_2 -> -	case happyOut37 happy_x_6 of { happy_var_6 -> -	case happyOut43 happy_x_8 of { happy_var_8 -> -	happyIn20-		 (doCall happy_var_6 happy_var_2 happy_var_8-	) `HappyStk` happyRest}}}--happyReduce_59 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_59 = happyReduce 4# 16# happyReduction_59-happyReduction_59 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut25 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_4 of { (L _ (CmmT_Name        happy_var_4)) -> -	happyIn20-		 (do l <- lookupLabel happy_var_4; cmmRawIf happy_var_2 l-	) `HappyStk` happyRest}}--happyReduce_60 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_60 = happyReduce 6# 16# happyReduction_60-happyReduction_60 (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 happyOut25 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut15 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut36 happy_x_6 of { happy_var_6 -> -	happyIn20-		 (cmmIfThenElse happy_var_2 (withSourceNote happy_var_3 happy_var_5 happy_var_4) happy_var_6-	) `HappyStk` happyRest}}}}}--happyReduce_61 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_61 = happyReduce 5# 16# happyReduction_61-happyReduction_61 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut43 happy_x_3 of { happy_var_3 -> -	case happyOut13 happy_x_5 of { happy_var_5 -> -	happyIn20-		 (pushStackFrame happy_var_3 happy_var_5-	) `HappyStk` happyRest}}--happyReduce_62 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_62 = happyReduce 5# 16# happyReduction_62-happyReduction_62 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut37 happy_x_2 of { happy_var_2 -> -	case happyOut50 happy_x_4 of { happy_var_4 -> -	case happyOut13 happy_x_5 of { happy_var_5 -> -	happyIn20-		 (reserveStackFrame happy_var_2 happy_var_4 happy_var_5-	) `HappyStk` happyRest}}}--happyReduce_63 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_63 = happySpecReduce_3  16# happyReduction_63-happyReduction_63 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut21 happy_x_2 of { happy_var_2 -> -	happyIn20-		 (happy_var_2 >>= code . emitUnwind-	)}--happyReduce_64 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_64 = happyReduce 5# 17# happyReduction_64-happyReduction_64 (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 { (L _ (CmmT_GlobalReg   happy_var_1)) -> -	case happyOut22 happy_x_3 of { happy_var_3 -> -	case happyOut21 happy_x_5 of { happy_var_5 -> -	happyIn21-		 (do e <- happy_var_3; rest <- happy_var_5; return ((happy_var_1, e) : rest)-	) `HappyStk` happyRest}}}--happyReduce_65 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_65 = happySpecReduce_3  17# happyReduction_65-happyReduction_65 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg   happy_var_1)) -> -	case happyOut22 happy_x_3 of { happy_var_3 -> -	happyIn21-		 (do e <- happy_var_3; return [(happy_var_1, e)]-	)}}--happyReduce_66 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_66 = happySpecReduce_1  18# happyReduction_66-happyReduction_66 happy_x_1-	 =  happyIn22-		 (do return Nothing-	)--happyReduce_67 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_67 = happySpecReduce_1  18# happyReduction_67-happyReduction_67 happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	happyIn22-		 (do e <- happy_var_1; return (Just e)-	)}--happyReduce_68 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_68 = happySpecReduce_1  19# happyReduction_68-happyReduction_68 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn23-		 (return (CmmLit (CmmLabel (mkForeignLabel happy_var_1 Nothing ForeignLabelInThisPackage IsFunction)))-	)}--happyReduce_69 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_69 = happySpecReduce_0  20# happyReduction_69-happyReduction_69  =  happyIn24-		 (CmmMayReturn-	)--happyReduce_70 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_70 = happySpecReduce_2  20# happyReduction_70-happyReduction_70 happy_x_2-	happy_x_1-	 =  happyIn24-		 (CmmNeverReturns-	)--happyReduce_71 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_71 = happySpecReduce_1  21# happyReduction_71-happyReduction_71 happy_x_1-	 =  case happyOut26 happy_x_1 of { happy_var_1 -> -	happyIn25-		 (happy_var_1-	)}--happyReduce_72 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_72 = happySpecReduce_1  21# happyReduction_72-happyReduction_72 happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	happyIn25-		 (do e <- happy_var_1; return (BoolTest e)-	)}--happyReduce_73 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_73 = happySpecReduce_3  22# happyReduction_73-happyReduction_73 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut25 happy_x_1 of { happy_var_1 -> -	case happyOut25 happy_x_3 of { happy_var_3 -> -	happyIn26-		 (do e1 <- happy_var_1; e2 <- happy_var_3; -                                          return (BoolAnd e1 e2)-	)}}--happyReduce_74 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_74 = happySpecReduce_3  22# happyReduction_74-happyReduction_74 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut25 happy_x_1 of { happy_var_1 -> -	case happyOut25 happy_x_3 of { happy_var_3 -> -	happyIn26-		 (do e1 <- happy_var_1; e2 <- happy_var_3; -                                          return (BoolOr e1 e2)-	)}}--happyReduce_75 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_75 = happySpecReduce_2  22# happyReduction_75-happyReduction_75 happy_x_2-	happy_x_1-	 =  case happyOut25 happy_x_2 of { happy_var_2 -> -	happyIn26-		 (do e <- happy_var_2; return (BoolNot e)-	)}--happyReduce_76 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_76 = happySpecReduce_3  22# happyReduction_76-happyReduction_76 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut26 happy_x_2 of { happy_var_2 -> -	happyIn26-		 (happy_var_2-	)}--happyReduce_77 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_77 = happySpecReduce_0  23# happyReduction_77-happyReduction_77  =  happyIn27-		 (PlayRisky-	)--happyReduce_78 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_78 = happyMonadReduce 1# 23# happyReduction_78-happyReduction_78 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_String      happy_var_1)) -> -	( parseSafety happy_var_1)})-	) (\r -> happyReturn (happyIn27 r))--happyReduce_79 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_79 = happySpecReduce_2  24# happyReduction_79-happyReduction_79 happy_x_2-	happy_x_1-	 =  happyIn28-		 ([]-	)--happyReduce_80 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_80 = happyMonadReduce 3# 24# happyReduction_80-happyReduction_80 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((( do df <- getDynFlags-                                         ; return (realArgRegsCover df)))-	) (\r -> happyReturn (happyIn28 r))--happyReduce_81 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_81 = happySpecReduce_3  24# happyReduction_81-happyReduction_81 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut29 happy_x_2 of { happy_var_2 -> -	happyIn28-		 (happy_var_2-	)}--happyReduce_82 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_82 = happySpecReduce_1  25# happyReduction_82-happyReduction_82 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg   happy_var_1)) -> -	happyIn29-		 ([happy_var_1]-	)}--happyReduce_83 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_83 = happySpecReduce_3  25# happyReduction_83-happyReduction_83 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg   happy_var_1)) -> -	case happyOut29 happy_x_3 of { happy_var_3 -> -	happyIn29-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_84 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_84 = happyReduce 5# 26# happyReduction_84-happyReduction_84 (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_2 of { (L _ (CmmT_Int         happy_var_2)) -> -	case happyOutTok happy_x_4 of { (L _ (CmmT_Int         happy_var_4)) -> -	happyIn30-		 (Just (happy_var_2, happy_var_4)-	) `HappyStk` happyRest}}--happyReduce_85 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_85 = happySpecReduce_0  26# happyReduction_85-happyReduction_85  =  happyIn30-		 (Nothing-	)--happyReduce_86 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_86 = happySpecReduce_0  27# happyReduction_86-happyReduction_86  =  happyIn31-		 ([]-	)--happyReduce_87 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_87 = happySpecReduce_2  27# happyReduction_87-happyReduction_87 happy_x_2-	happy_x_1-	 =  case happyOut32 happy_x_1 of { happy_var_1 -> -	case happyOut31 happy_x_2 of { happy_var_2 -> -	happyIn31-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_88 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_88 = happyReduce 4# 28# happyReduction_88-happyReduction_88 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut34 happy_x_2 of { happy_var_2 -> -	case happyOut33 happy_x_4 of { happy_var_4 -> -	happyIn32-		 (do b <- happy_var_4; return (happy_var_2, b)-	) `HappyStk` happyRest}}--happyReduce_89 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_89 = happySpecReduce_3  29# happyReduction_89-happyReduction_89 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut15 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn33-		 (return (Right (withSourceNote happy_var_1 happy_var_3 happy_var_2))-	)}}}--happyReduce_90 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_90 = happySpecReduce_3  29# happyReduction_90-happyReduction_90 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { (L _ (CmmT_Name        happy_var_2)) -> -	happyIn33-		 (do l <- lookupLabel happy_var_2; return (Left l)-	)}--happyReduce_91 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_91 = happySpecReduce_1  30# happyReduction_91-happyReduction_91 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Int         happy_var_1)) -> -	happyIn34-		 ([ happy_var_1 ]-	)}--happyReduce_92 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_92 = happySpecReduce_3  30# happyReduction_92-happyReduction_92 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Int         happy_var_1)) -> -	case happyOut34 happy_x_3 of { happy_var_3 -> -	happyIn34-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_93 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_93 = happyReduce 5# 31# happyReduction_93-happyReduction_93 (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_3 of { happy_var_3 -> -	case happyOut15 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	happyIn35-		 (Just (withSourceNote happy_var_3 happy_var_5 happy_var_4)-	) `HappyStk` happyRest}}}--happyReduce_94 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_94 = happySpecReduce_0  31# happyReduction_94-happyReduction_94  =  happyIn35-		 (Nothing-	)--happyReduce_95 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_95 = happySpecReduce_0  32# happyReduction_95-happyReduction_95  =  happyIn36-		 (return ()-	)--happyReduce_96 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_96 = happyReduce 4# 32# happyReduction_96-happyReduction_96 (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 happyOut15 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn36-		 (withSourceNote happy_var_2 happy_var_4 happy_var_3-	) `HappyStk` happyRest}}}--happyReduce_97 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_97 = happySpecReduce_3  33# happyReduction_97-happyReduction_97 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Quot [happy_var_1,happy_var_3]-	)}}--happyReduce_98 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_98 = happySpecReduce_3  33# happyReduction_98-happyReduction_98 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Mul [happy_var_1,happy_var_3]-	)}}--happyReduce_99 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_99 = happySpecReduce_3  33# happyReduction_99-happyReduction_99 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Rem [happy_var_1,happy_var_3]-	)}}--happyReduce_100 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_100 = happySpecReduce_3  33# happyReduction_100-happyReduction_100 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Sub [happy_var_1,happy_var_3]-	)}}--happyReduce_101 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_101 = happySpecReduce_3  33# happyReduction_101-happyReduction_101 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Add [happy_var_1,happy_var_3]-	)}}--happyReduce_102 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_102 = happySpecReduce_3  33# happyReduction_102-happyReduction_102 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Shr [happy_var_1,happy_var_3]-	)}}--happyReduce_103 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_103 = happySpecReduce_3  33# happyReduction_103-happyReduction_103 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Shl [happy_var_1,happy_var_3]-	)}}--happyReduce_104 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_104 = happySpecReduce_3  33# happyReduction_104-happyReduction_104 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_And [happy_var_1,happy_var_3]-	)}}--happyReduce_105 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_105 = happySpecReduce_3  33# happyReduction_105-happyReduction_105 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Xor [happy_var_1,happy_var_3]-	)}}--happyReduce_106 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_106 = happySpecReduce_3  33# happyReduction_106-happyReduction_106 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Or [happy_var_1,happy_var_3]-	)}}--happyReduce_107 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_107 = happySpecReduce_3  33# happyReduction_107-happyReduction_107 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Ge [happy_var_1,happy_var_3]-	)}}--happyReduce_108 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_108 = happySpecReduce_3  33# happyReduction_108-happyReduction_108 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Gt [happy_var_1,happy_var_3]-	)}}--happyReduce_109 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_109 = happySpecReduce_3  33# happyReduction_109-happyReduction_109 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Le [happy_var_1,happy_var_3]-	)}}--happyReduce_110 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_110 = happySpecReduce_3  33# happyReduction_110-happyReduction_110 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_U_Lt [happy_var_1,happy_var_3]-	)}}--happyReduce_111 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_111 = happySpecReduce_3  33# happyReduction_111-happyReduction_111 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Ne [happy_var_1,happy_var_3]-	)}}--happyReduce_112 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_112 = happySpecReduce_3  33# happyReduction_112-happyReduction_112 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn37-		 (mkMachOp MO_Eq [happy_var_1,happy_var_3]-	)}}--happyReduce_113 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_113 = happySpecReduce_2  33# happyReduction_113-happyReduction_113 happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_2 of { happy_var_2 -> -	happyIn37-		 (mkMachOp MO_Not [happy_var_2]-	)}--happyReduce_114 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_114 = happySpecReduce_2  33# happyReduction_114-happyReduction_114 happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_2 of { happy_var_2 -> -	happyIn37-		 (mkMachOp MO_S_Neg [happy_var_2]-	)}--happyReduce_115 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_115 = happyMonadReduce 5# 33# happyReduction_115-happyReduction_115 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut38 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_3 of { (L _ (CmmT_Name        happy_var_3)) -> -	case happyOut38 happy_x_5 of { happy_var_5 -> -	( do { mo <- nameToMachOp happy_var_3 ;-                                                return (mkMachOp mo [happy_var_1,happy_var_5]) })}}})-	) (\r -> happyReturn (happyIn37 r))--happyReduce_116 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_116 = happySpecReduce_1  33# happyReduction_116-happyReduction_116 happy_x_1-	 =  case happyOut38 happy_x_1 of { happy_var_1 -> -	happyIn37-		 (happy_var_1-	)}--happyReduce_117 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_117 = happySpecReduce_2  34# happyReduction_117-happyReduction_117 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Int         happy_var_1)) -> -	case happyOut39 happy_x_2 of { happy_var_2 -> -	happyIn38-		 (return (CmmLit (CmmInt happy_var_1 (typeWidth happy_var_2)))-	)}}--happyReduce_118 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_118 = happySpecReduce_2  34# happyReduction_118-happyReduction_118 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Float       happy_var_1)) -> -	case happyOut39 happy_x_2 of { happy_var_2 -> -	happyIn38-		 (return (CmmLit (CmmFloat happy_var_1 (typeWidth happy_var_2)))-	)}}--happyReduce_119 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_119 = happySpecReduce_1  34# happyReduction_119-happyReduction_119 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_String      happy_var_1)) -> -	happyIn38-		 (do s <- code (newStringCLit happy_var_1); -                                      return (CmmLit s)-	)}--happyReduce_120 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_120 = happySpecReduce_1  34# happyReduction_120-happyReduction_120 happy_x_1-	 =  case happyOut45 happy_x_1 of { happy_var_1 -> -	happyIn38-		 (happy_var_1-	)}--happyReduce_121 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_121 = happyReduce 4# 34# happyReduction_121-happyReduction_121 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut55 happy_x_1 of { happy_var_1 -> -	case happyOut37 happy_x_3 of { happy_var_3 -> -	happyIn38-		 (do e <- happy_var_3; return (CmmLoad e happy_var_1)-	) `HappyStk` happyRest}}--happyReduce_122 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_122 = happyMonadReduce 5# 34# happyReduction_122-happyReduction_122 (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_2 of { (L _ (CmmT_Name        happy_var_2)) -> -	case happyOut43 happy_x_4 of { happy_var_4 -> -	( exprOp happy_var_2 happy_var_4)}})-	) (\r -> happyReturn (happyIn38 r))--happyReduce_123 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_123 = happySpecReduce_3  34# happyReduction_123-happyReduction_123 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_2 of { happy_var_2 -> -	happyIn38-		 (happy_var_2-	)}--happyReduce_124 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_124 = happyMonadReduce 0# 35# happyReduction_124-happyReduction_124 (happyRest) tk-	 = happyThen ((( do dflags <- getDynFlags; return $ bWord dflags))-	) (\r -> happyReturn (happyIn39 r))--happyReduce_125 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_125 = happySpecReduce_2  35# happyReduction_125-happyReduction_125 happy_x_2-	happy_x_1-	 =  case happyOut55 happy_x_2 of { happy_var_2 -> -	happyIn39-		 (happy_var_2-	)}--happyReduce_126 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_126 = happySpecReduce_0  36# happyReduction_126-happyReduction_126  =  happyIn40-		 ([]-	)--happyReduce_127 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_127 = happySpecReduce_1  36# happyReduction_127-happyReduction_127 happy_x_1-	 =  case happyOut41 happy_x_1 of { happy_var_1 -> -	happyIn40-		 (happy_var_1-	)}--happyReduce_128 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_128 = happySpecReduce_1  37# happyReduction_128-happyReduction_128 happy_x_1-	 =  case happyOut42 happy_x_1 of { happy_var_1 -> -	happyIn41-		 ([happy_var_1]-	)}--happyReduce_129 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_129 = happySpecReduce_3  37# happyReduction_129-happyReduction_129 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut42 happy_x_1 of { happy_var_1 -> -	case happyOut41 happy_x_3 of { happy_var_3 -> -	happyIn41-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_130 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_130 = happySpecReduce_1  38# happyReduction_130-happyReduction_130 happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	happyIn42-		 (do e <- happy_var_1;-                                             return (e, inferCmmHint e)-	)}--happyReduce_131 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_131 = happyMonadReduce 2# 38# happyReduction_131-happyReduction_131 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { (L _ (CmmT_String      happy_var_2)) -> -	( do h <- parseCmmHint happy_var_2;-                                              return $ do-                                                e <- happy_var_1; return (e, h))}})-	) (\r -> happyReturn (happyIn42 r))--happyReduce_132 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_132 = happySpecReduce_0  39# happyReduction_132-happyReduction_132  =  happyIn43-		 ([]-	)--happyReduce_133 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_133 = happySpecReduce_1  39# happyReduction_133-happyReduction_133 happy_x_1-	 =  case happyOut44 happy_x_1 of { happy_var_1 -> -	happyIn43-		 (happy_var_1-	)}--happyReduce_134 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_134 = happySpecReduce_1  40# happyReduction_134-happyReduction_134 happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	happyIn44-		 ([ happy_var_1 ]-	)}--happyReduce_135 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_135 = happySpecReduce_3  40# happyReduction_135-happyReduction_135 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut37 happy_x_1 of { happy_var_1 -> -	case happyOut44 happy_x_3 of { happy_var_3 -> -	happyIn44-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_136 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_136 = happySpecReduce_1  41# happyReduction_136-happyReduction_136 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn45-		 (lookupName happy_var_1-	)}--happyReduce_137 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_137 = happySpecReduce_1  41# happyReduction_137-happyReduction_137 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg   happy_var_1)) -> -	happyIn45-		 (return (CmmReg (CmmGlobal happy_var_1))-	)}--happyReduce_138 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_138 = happySpecReduce_0  42# happyReduction_138-happyReduction_138  =  happyIn46-		 ([]-	)--happyReduce_139 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_139 = happyReduce 4# 42# happyReduction_139-happyReduction_139 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut47 happy_x_2 of { happy_var_2 -> -	happyIn46-		 (happy_var_2-	) `HappyStk` happyRest}--happyReduce_140 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_140 = happySpecReduce_1  43# happyReduction_140-happyReduction_140 happy_x_1-	 =  case happyOut48 happy_x_1 of { happy_var_1 -> -	happyIn47-		 ([happy_var_1]-	)}--happyReduce_141 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_141 = happySpecReduce_2  43# happyReduction_141-happyReduction_141 happy_x_2-	happy_x_1-	 =  case happyOut48 happy_x_1 of { happy_var_1 -> -	happyIn47-		 ([happy_var_1]-	)}--happyReduce_142 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_142 = happySpecReduce_3  43# happyReduction_142-happyReduction_142 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut48 happy_x_1 of { happy_var_1 -> -	case happyOut47 happy_x_3 of { happy_var_3 -> -	happyIn47-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_143 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_143 = happySpecReduce_1  44# happyReduction_143-happyReduction_143 happy_x_1-	 =  case happyOut49 happy_x_1 of { happy_var_1 -> -	happyIn48-		 (do e <- happy_var_1; return (e, (inferCmmHint (CmmReg (CmmLocal e))))-	)}--happyReduce_144 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_144 = happyMonadReduce 2# 44# happyReduction_144-happyReduction_144 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { (L _ (CmmT_String      happy_var_1)) -> -	case happyOut49 happy_x_2 of { happy_var_2 -> -	( do h <- parseCmmHint happy_var_1;-                                      return $ do-                                         e <- happy_var_2; return (e,h))}})-	) (\r -> happyReturn (happyIn48 r))--happyReduce_145 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_145 = happySpecReduce_1  45# happyReduction_145-happyReduction_145 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn49-		 (do e <- lookupName happy_var_1;-                                     return $-                                       case e of -                                        CmmReg (CmmLocal r) -> r-                                        other -> pprPanic "CmmParse:" (ftext happy_var_1 <> text " not a local register")-	)}--happyReduce_146 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_146 = happySpecReduce_1  46# happyReduction_146-happyReduction_146 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_Name        happy_var_1)) -> -	happyIn50-		 (do e <- lookupName happy_var_1;-                                     return $-                                       case e of -                                        CmmReg r -> r-                                        other -> pprPanic "CmmParse:" (ftext happy_var_1 <> text " not a register")-	)}--happyReduce_147 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_147 = happySpecReduce_1  46# happyReduction_147-happyReduction_147 happy_x_1-	 =  case happyOutTok happy_x_1 of { (L _ (CmmT_GlobalReg   happy_var_1)) -> -	happyIn50-		 (return (CmmGlobal happy_var_1)-	)}--happyReduce_148 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_148 = happySpecReduce_0  47# happyReduction_148-happyReduction_148  =  happyIn51-		 (Nothing-	)--happyReduce_149 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_149 = happySpecReduce_3  47# happyReduction_149-happyReduction_149 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut52 happy_x_2 of { happy_var_2 -> -	happyIn51-		 (Just happy_var_2-	)}--happyReduce_150 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_150 = happySpecReduce_0  48# happyReduction_150-happyReduction_150  =  happyIn52-		 ([]-	)--happyReduce_151 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_151 = happySpecReduce_1  48# happyReduction_151-happyReduction_151 happy_x_1-	 =  case happyOut53 happy_x_1 of { happy_var_1 -> -	happyIn52-		 (happy_var_1-	)}--happyReduce_152 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_152 = happySpecReduce_2  49# happyReduction_152-happyReduction_152 happy_x_2-	happy_x_1-	 =  case happyOut54 happy_x_1 of { happy_var_1 -> -	happyIn53-		 ([happy_var_1]-	)}--happyReduce_153 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_153 = happySpecReduce_1  49# happyReduction_153-happyReduction_153 happy_x_1-	 =  case happyOut54 happy_x_1 of { happy_var_1 -> -	happyIn53-		 ([happy_var_1]-	)}--happyReduce_154 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_154 = happySpecReduce_3  49# happyReduction_154-happyReduction_154 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut54 happy_x_1 of { happy_var_1 -> -	case happyOut53 happy_x_3 of { happy_var_3 -> -	happyIn53-		 (happy_var_1 : happy_var_3-	)}}--happyReduce_155 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_155 = happySpecReduce_2  50# happyReduction_155-happyReduction_155 happy_x_2-	happy_x_1-	 =  case happyOut55 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { (L _ (CmmT_Name        happy_var_2)) -> -	happyIn54-		 (newLocal happy_var_1 happy_var_2-	)}}--happyReduce_156 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_156 = happySpecReduce_1  51# happyReduction_156-happyReduction_156 happy_x_1-	 =  happyIn55-		 (b8-	)--happyReduce_157 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_157 = happySpecReduce_1  51# happyReduction_157-happyReduction_157 happy_x_1-	 =  case happyOut56 happy_x_1 of { happy_var_1 -> -	happyIn55-		 (happy_var_1-	)}--happyReduce_158 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_158 = happySpecReduce_1  52# happyReduction_158-happyReduction_158 happy_x_1-	 =  happyIn56-		 (b16-	)--happyReduce_159 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_159 = happySpecReduce_1  52# happyReduction_159-happyReduction_159 happy_x_1-	 =  happyIn56-		 (b32-	)--happyReduce_160 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_160 = happySpecReduce_1  52# happyReduction_160-happyReduction_160 happy_x_1-	 =  happyIn56-		 (b64-	)--happyReduce_161 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_161 = happySpecReduce_1  52# happyReduction_161-happyReduction_161 happy_x_1-	 =  happyIn56-		 (b128-	)--happyReduce_162 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_162 = happySpecReduce_1  52# happyReduction_162-happyReduction_162 happy_x_1-	 =  happyIn56-		 (b256-	)--happyReduce_163 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_163 = happySpecReduce_1  52# happyReduction_163-happyReduction_163 happy_x_1-	 =  happyIn56-		 (b512-	)--happyReduce_164 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_164 = happySpecReduce_1  52# happyReduction_164-happyReduction_164 happy_x_1-	 =  happyIn56-		 (f32-	)--happyReduce_165 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_165 = happySpecReduce_1  52# happyReduction_165-happyReduction_165 happy_x_1-	 =  happyIn56-		 (f64-	)--happyReduce_166 :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )-happyReduce_166 = happyMonadReduce 1# 52# happyReduction_166-happyReduction_166 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((( do dflags <- getDynFlags; return $ gcWord dflags))-	) (\r -> happyReturn (happyIn56 r))--happyNewToken action sts stk-	= cmmlex(\tk -> -	let cont i = happyDoAction i tk action sts stk in-	case tk of {-	L _ CmmT_EOF -> happyDoAction 74# tk action sts stk;-	L _ (CmmT_SpecChar ':') -> cont 1#;-	L _ (CmmT_SpecChar ';') -> cont 2#;-	L _ (CmmT_SpecChar '{') -> cont 3#;-	L _ (CmmT_SpecChar '}') -> cont 4#;-	L _ (CmmT_SpecChar '[') -> cont 5#;-	L _ (CmmT_SpecChar ']') -> cont 6#;-	L _ (CmmT_SpecChar '(') -> cont 7#;-	L _ (CmmT_SpecChar ')') -> cont 8#;-	L _ (CmmT_SpecChar '=') -> cont 9#;-	L _ (CmmT_SpecChar '`') -> cont 10#;-	L _ (CmmT_SpecChar '~') -> cont 11#;-	L _ (CmmT_SpecChar '/') -> cont 12#;-	L _ (CmmT_SpecChar '*') -> cont 13#;-	L _ (CmmT_SpecChar '%') -> cont 14#;-	L _ (CmmT_SpecChar '-') -> cont 15#;-	L _ (CmmT_SpecChar '+') -> cont 16#;-	L _ (CmmT_SpecChar '&') -> cont 17#;-	L _ (CmmT_SpecChar '^') -> cont 18#;-	L _ (CmmT_SpecChar '|') -> cont 19#;-	L _ (CmmT_SpecChar '>') -> cont 20#;-	L _ (CmmT_SpecChar '<') -> cont 21#;-	L _ (CmmT_SpecChar ',') -> cont 22#;-	L _ (CmmT_SpecChar '!') -> cont 23#;-	L _ (CmmT_DotDot) -> cont 24#;-	L _ (CmmT_DoubleColon) -> cont 25#;-	L _ (CmmT_Shr) -> cont 26#;-	L _ (CmmT_Shl) -> cont 27#;-	L _ (CmmT_Ge) -> cont 28#;-	L _ (CmmT_Le) -> cont 29#;-	L _ (CmmT_Eq) -> cont 30#;-	L _ (CmmT_Ne) -> cont 31#;-	L _ (CmmT_BoolAnd) -> cont 32#;-	L _ (CmmT_BoolOr) -> cont 33#;-	L _ (CmmT_CLOSURE) -> cont 34#;-	L _ (CmmT_INFO_TABLE) -> cont 35#;-	L _ (CmmT_INFO_TABLE_RET) -> cont 36#;-	L _ (CmmT_INFO_TABLE_FUN) -> cont 37#;-	L _ (CmmT_INFO_TABLE_CONSTR) -> cont 38#;-	L _ (CmmT_INFO_TABLE_SELECTOR) -> cont 39#;-	L _ (CmmT_else) -> cont 40#;-	L _ (CmmT_export) -> cont 41#;-	L _ (CmmT_section) -> cont 42#;-	L _ (CmmT_goto) -> cont 43#;-	L _ (CmmT_if) -> cont 44#;-	L _ (CmmT_call) -> cont 45#;-	L _ (CmmT_jump) -> cont 46#;-	L _ (CmmT_foreign) -> cont 47#;-	L _ (CmmT_never) -> cont 48#;-	L _ (CmmT_prim) -> cont 49#;-	L _ (CmmT_reserve) -> cont 50#;-	L _ (CmmT_return) -> cont 51#;-	L _ (CmmT_returns) -> cont 52#;-	L _ (CmmT_import) -> cont 53#;-	L _ (CmmT_switch) -> cont 54#;-	L _ (CmmT_case) -> cont 55#;-	L _ (CmmT_default) -> cont 56#;-	L _ (CmmT_push) -> cont 57#;-	L _ (CmmT_unwind) -> cont 58#;-	L _ (CmmT_bits8) -> cont 59#;-	L _ (CmmT_bits16) -> cont 60#;-	L _ (CmmT_bits32) -> cont 61#;-	L _ (CmmT_bits64) -> cont 62#;-	L _ (CmmT_bits128) -> cont 63#;-	L _ (CmmT_bits256) -> cont 64#;-	L _ (CmmT_bits512) -> cont 65#;-	L _ (CmmT_float32) -> cont 66#;-	L _ (CmmT_float64) -> cont 67#;-	L _ (CmmT_gcptr) -> cont 68#;-	L _ (CmmT_GlobalReg   happy_dollar_dollar) -> cont 69#;-	L _ (CmmT_Name        happy_dollar_dollar) -> cont 70#;-	L _ (CmmT_String      happy_dollar_dollar) -> cont 71#;-	L _ (CmmT_Int         happy_dollar_dollar) -> cont 72#;-	L _ (CmmT_Float       happy_dollar_dollar) -> cont 73#;-	_ -> happyError' (tk, [])-	})--happyError_ explist 74# tk = happyError' (tk, explist)-happyError_ explist _ tk = happyError' (tk, explist)--happyThen :: () => PD a -> (a -> PD b) -> PD b-happyThen = (>>=)-happyReturn :: () => a -> PD a-happyReturn = (return)-happyParse :: () => Happy_GHC_Exts.Int# -> PD (HappyAbsSyn )--happyNewToken :: () => Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )--happyDoAction :: () => Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn )--happyReduceArr :: () => Happy_Data_Array.Array Int (Happy_GHC_Exts.Int# -> Located CmmToken -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> PD (HappyAbsSyn ))--happyThen1 :: () => PD a -> (a -> PD b) -> PD b-happyThen1 = happyThen-happyReturn1 :: () => a -> PD a-happyReturn1 = happyReturn-happyError' :: () => ((Located CmmToken), [String]) -> PD a-happyError' tk = (\(tokens, explist) -> happyError) tk-cmmParse = happySomeParser where- happySomeParser = happyThen (happyParse 0#) (\x -> happyReturn (happyOut4 x))--happySeq = happyDoSeq---section :: String -> SectionType-section "text"      = Text-section "data"      = Data-section "rodata"    = ReadOnlyData-section "relrodata" = RelocatableReadOnlyData-section "bss"       = UninitialisedData-section s           = OtherSection s--mkString :: String -> CmmStatic-mkString s = CmmString (map (fromIntegral.ord) s)---- |--- Given an info table, decide what the entry convention for the proc--- is.  That is, for an INFO_TABLE_RET we want the return convention,--- otherwise it is a NativeNodeCall.----infoConv :: Maybe CmmInfoTable -> Convention-infoConv Nothing = NativeNodeCall-infoConv (Just info)-  | isStackRep (cit_rep info) = NativeReturn-  | otherwise                 = NativeNodeCall---- mkMachOp infers the type of the MachOp from the type of its first--- argument.  We assume that this is correct: for MachOps that don't have--- symmetrical args (e.g. shift ops), the first arg determines the type of--- the op.-mkMachOp :: (Width -> MachOp) -> [CmmParse CmmExpr] -> CmmParse CmmExpr-mkMachOp fn args = do-  dflags <- getDynFlags-  arg_exprs <- sequence args-  return (CmmMachOp (fn (typeWidth (cmmExprType dflags (head arg_exprs)))) arg_exprs)--getLit :: CmmExpr -> CmmLit-getLit (CmmLit l) = l-getLit (CmmMachOp (MO_S_Neg _) [CmmLit (CmmInt i r)])  = CmmInt (negate i) r-getLit _ = panic "invalid literal" -- TODO messy failure--nameToMachOp :: FastString -> PD (Width -> MachOp)-nameToMachOp name =-  case lookupUFM machOps name of-        Nothing -> fail ("unknown primitive " ++ unpackFS name)-        Just m  -> return m--exprOp :: FastString -> [CmmParse CmmExpr] -> PD (CmmParse CmmExpr)-exprOp name args_code = do-  dflags <- getDynFlags-  case lookupUFM (exprMacros dflags) name of-     Just f  -> return $ do-        args <- sequence args_code-        return (f args)-     Nothing -> do-        mo <- nameToMachOp name-        return $ mkMachOp mo args_code--exprMacros :: DynFlags -> UniqFM ([CmmExpr] -> CmmExpr)-exprMacros dflags = listToUFM [-  ( fsLit "ENTRY_CODE",   \ [x] -> entryCode dflags x ),-  ( fsLit "INFO_PTR",     \ [x] -> closureInfoPtr dflags x ),-  ( fsLit "STD_INFO",     \ [x] -> infoTable dflags x ),-  ( fsLit "FUN_INFO",     \ [x] -> funInfoTable dflags x ),-  ( fsLit "GET_ENTRY",    \ [x] -> entryCode dflags (closureInfoPtr dflags x) ),-  ( fsLit "GET_STD_INFO", \ [x] -> infoTable dflags (closureInfoPtr dflags x) ),-  ( fsLit "GET_FUN_INFO", \ [x] -> funInfoTable dflags (closureInfoPtr dflags x) ),-  ( fsLit "INFO_TYPE",    \ [x] -> infoTableClosureType dflags x ),-  ( fsLit "INFO_PTRS",    \ [x] -> infoTablePtrs dflags x ),-  ( fsLit "INFO_NPTRS",   \ [x] -> infoTableNonPtrs dflags x )-  ]---- we understand a subset of C-- primitives:-machOps = listToUFM $-        map (\(x, y) -> (mkFastString x, y)) [-        ( "add",        MO_Add ),-        ( "sub",        MO_Sub ),-        ( "eq",         MO_Eq ),-        ( "ne",         MO_Ne ),-        ( "mul",        MO_Mul ),-        ( "neg",        MO_S_Neg ),-        ( "quot",       MO_S_Quot ),-        ( "rem",        MO_S_Rem ),-        ( "divu",       MO_U_Quot ),-        ( "modu",       MO_U_Rem ),--        ( "ge",         MO_S_Ge ),-        ( "le",         MO_S_Le ),-        ( "gt",         MO_S_Gt ),-        ( "lt",         MO_S_Lt ),--        ( "geu",        MO_U_Ge ),-        ( "leu",        MO_U_Le ),-        ( "gtu",        MO_U_Gt ),-        ( "ltu",        MO_U_Lt ),--        ( "and",        MO_And ),-        ( "or",         MO_Or ),-        ( "xor",        MO_Xor ),-        ( "com",        MO_Not ),-        ( "shl",        MO_Shl ),-        ( "shrl",       MO_U_Shr ),-        ( "shra",       MO_S_Shr ),--        ( "fadd",       MO_F_Add ),-        ( "fsub",       MO_F_Sub ),-        ( "fneg",       MO_F_Neg ),-        ( "fmul",       MO_F_Mul ),-        ( "fquot",      MO_F_Quot ),--        ( "feq",        MO_F_Eq ),-        ( "fne",        MO_F_Ne ),-        ( "fge",        MO_F_Ge ),-        ( "fle",        MO_F_Le ),-        ( "fgt",        MO_F_Gt ),-        ( "flt",        MO_F_Lt ),--        ( "lobits8",  flip MO_UU_Conv W8  ),-        ( "lobits16", flip MO_UU_Conv W16 ),-        ( "lobits32", flip MO_UU_Conv W32 ),-        ( "lobits64", flip MO_UU_Conv W64 ),--        ( "zx16",     flip MO_UU_Conv W16 ),-        ( "zx32",     flip MO_UU_Conv W32 ),-        ( "zx64",     flip MO_UU_Conv W64 ),--        ( "sx16",     flip MO_SS_Conv W16 ),-        ( "sx32",     flip MO_SS_Conv W32 ),-        ( "sx64",     flip MO_SS_Conv W64 ),--        ( "f2f32",    flip MO_FF_Conv W32 ),  -- TODO; rounding mode-        ( "f2f64",    flip MO_FF_Conv W64 ),  -- TODO; rounding mode-        ( "f2i8",     flip MO_FS_Conv W8 ),-        ( "f2i16",    flip MO_FS_Conv W16 ),-        ( "f2i32",    flip MO_FS_Conv W32 ),-        ( "f2i64",    flip MO_FS_Conv W64 ),-        ( "i2f32",    flip MO_SF_Conv W32 ),-        ( "i2f64",    flip MO_SF_Conv W64 )-        ]--callishMachOps :: UniqFM ([CmmExpr] -> (CallishMachOp, [CmmExpr]))-callishMachOps = listToUFM $-        map (\(x, y) -> (mkFastString x, y)) [-        ( "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),--        ( "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 ),--        ( "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 )--        -- ToDo: the rest, maybe-        -- edit: which rest?-        -- also: how do we tell CMM Lint how to type check callish macops?-    ]-  where-    memcpyLikeTweakArgs :: (Int -> CallishMachOp) -> [CmmExpr] -> (CallishMachOp, [CmmExpr])-    memcpyLikeTweakArgs op [] = pgmError "memcpy-like function requires at least one argument"-    memcpyLikeTweakArgs op args@(_:_) =-        (op align, args')-      where-        args' = init args-        align = case last args of-          CmmLit (CmmInt alignInteger _) -> fromInteger alignInteger-          e -> pprPgmError "Non-constant alignment in memcpy-like function:" (ppr e)-        -- The alignment of memcpy-ish operations must be a-        -- compile-time constant. We verify this here, passing it around-        -- in the MO_* constructor. In order to do this, however, we-        -- must intercept the arguments in primCall.--parseSafety :: String -> PD Safety-parseSafety "safe"   = return PlaySafe-parseSafety "unsafe" = return PlayRisky-parseSafety "interruptible" = return PlayInterruptible-parseSafety str      = fail ("unrecognised safety: " ++ str)--parseCmmHint :: String -> PD ForeignHint-parseCmmHint "ptr"    = return AddrHint-parseCmmHint "signed" = return SignedHint-parseCmmHint str      = fail ("unrecognised hint: " ++ str)---- labels are always pointers, so we might as well infer the hint-inferCmmHint :: CmmExpr -> ForeignHint-inferCmmHint (CmmLit (CmmLabel _)) = AddrHint-inferCmmHint (CmmReg (CmmGlobal g)) | isPtrGlobalReg g = AddrHint-inferCmmHint _ = NoHint--isPtrGlobalReg Sp                    = True-isPtrGlobalReg SpLim                 = True-isPtrGlobalReg Hp                    = True-isPtrGlobalReg HpLim                 = True-isPtrGlobalReg CCCS                  = True-isPtrGlobalReg CurrentTSO            = True-isPtrGlobalReg CurrentNursery        = True-isPtrGlobalReg (VanillaReg _ VGcPtr) = True-isPtrGlobalReg _                     = False--happyError :: PD a-happyError = PD $ \_ s -> unP srcParseFail s---- -------------------------------------------------------------------------------- Statement-level macros--stmtMacro :: FastString -> [CmmParse CmmExpr] -> PD (CmmParse ())-stmtMacro fun args_code = do-  case lookupUFM stmtMacros fun of-    Nothing -> fail ("unknown macro: " ++ unpackFS fun)-    Just fcode -> return $ do-        args <- sequence args_code-        code (fcode args)--stmtMacros :: UniqFM ([CmmExpr] -> FCode ())-stmtMacros = listToUFM [-  ( fsLit "CCS_ALLOC",             \[words,ccs]  -> profAlloc words ccs ),-  ( fsLit "ENTER_CCS_THUNK",       \[e] -> enterCostCentreThunk e ),--  ( fsLit "CLOSE_NURSERY",         \[]  -> emitCloseNursery ),-  ( fsLit "OPEN_NURSERY",          \[]  -> emitOpenNursery ),--  -- completely generic heap and stack checks, for use in high-level cmm.-  ( fsLit "HP_CHK_GEN",            \[bytes] ->-                                      heapStackCheckGen Nothing (Just bytes) ),-  ( fsLit "STK_CHK_GEN",           \[] ->-                                      heapStackCheckGen (Just (CmmLit CmmHighStackMark)) Nothing ),--  -- A stack check for a fixed amount of stack.  Sounds a bit strange, but-  -- we use the stack for a bit of temporary storage in a couple of primops-  ( fsLit "STK_CHK_GEN_N",         \[bytes] ->-                                      heapStackCheckGen (Just bytes) Nothing ),--  -- A stack check on entry to a thunk, where the argument is the thunk pointer.-  ( fsLit "STK_CHK_NP"   ,         \[node] -> entryHeapCheck' False node 0 [] (return ())),--  ( fsLit "LOAD_THREAD_STATE",     \[] -> emitLoadThreadState ),-  ( fsLit "SAVE_THREAD_STATE",     \[] -> emitSaveThreadState ),--  ( fsLit "LDV_ENTER",             \[e] -> ldvEnter e ),-  ( fsLit "LDV_RECORD_CREATE",     \[e] -> ldvRecordCreate e ),--  ( fsLit "PUSH_UPD_FRAME",        \[sp,e] -> emitPushUpdateFrame sp e ),-  ( fsLit "SET_HDR",               \[ptr,info,ccs] ->-                                        emitSetDynHdr ptr info ccs ),-  ( fsLit "TICK_ALLOC_PRIM",       \[hdr,goods,slop] ->-                                        tickyAllocPrim hdr goods slop ),-  ( fsLit "TICK_ALLOC_PAP",        \[goods,slop] ->-                                        tickyAllocPAP goods slop ),-  ( fsLit "TICK_ALLOC_UP_THK",     \[goods,slop] ->-                                        tickyAllocThunk goods slop ),-  ( fsLit "UPD_BH_UPDATABLE",      \[reg] -> emitBlackHoleCode reg )- ]--emitPushUpdateFrame :: CmmExpr -> CmmExpr -> FCode ()-emitPushUpdateFrame sp e = do-  dflags <- getDynFlags-  emitUpdateFrame dflags sp mkUpdInfoLabel e--pushStackFrame :: [CmmParse CmmExpr] -> CmmParse () -> CmmParse ()-pushStackFrame fields body = do-  dflags <- getDynFlags-  exprs <- sequence fields-  updfr_off <- getUpdFrameOff-  let (new_updfr_off, _, g) = copyOutOflow dflags NativeReturn Ret Old-                                           [] updfr_off exprs-  emit g-  withUpdFrameOff new_updfr_off body--reserveStackFrame-  :: CmmParse CmmExpr-  -> CmmParse CmmReg-  -> CmmParse ()-  -> CmmParse ()-reserveStackFrame psize preg body = do-  dflags <- getDynFlags-  old_updfr_off <- getUpdFrameOff-  reg <- preg-  esize <- psize-  let size = case constantFoldExpr dflags esize of-               CmmLit (CmmInt n _) -> n-               _other -> pprPanic "CmmParse: not a compile-time integer: "-                            (ppr esize)-  let frame = old_updfr_off + wORD_SIZE dflags * fromIntegral size-  emitAssign reg (CmmStackSlot Old frame)-  withUpdFrameOff frame body--profilingInfo dflags desc_str ty_str-  = if not (gopt Opt_SccProfilingOn dflags)-    then NoProfilingInfo-    else ProfilingInfo (stringToWord8s desc_str)-                       (stringToWord8s ty_str)--staticClosure :: UnitId -> FastString -> FastString -> [CmmLit] -> CmmParse ()-staticClosure pkg cl_label info payload-  = do dflags <- getDynFlags-       let lits = mkStaticClosure dflags (mkCmmInfoLabel pkg info) dontCareCCS payload [] [] []-       code $ emitDataLits (mkCmmDataLabel pkg cl_label) lits--foreignCall-        :: String-        -> [CmmParse (LocalReg, ForeignHint)]-        -> CmmParse CmmExpr-        -> [CmmParse (CmmExpr, ForeignHint)]-        -> Safety-        -> CmmReturnInfo-        -> PD (CmmParse ())-foreignCall conv_string results_code expr_code args_code safety ret-  = do  conv <- case conv_string of-          "C" -> return CCallConv-          "stdcall" -> return StdCallConv-          _ -> fail ("unknown calling convention: " ++ conv_string)-        return $ do-          dflags <- getDynFlags-          results <- sequence results_code-          expr <- expr_code-          args <- sequence args_code-          let-                  expr' = adjCallTarget dflags conv expr args-                  (arg_exprs, arg_hints) = unzip args-                  (res_regs,  res_hints) = unzip results-                  fc = ForeignConvention conv arg_hints res_hints ret-                  target = ForeignTarget expr' fc-          _ <- code $ emitForeignCall safety res_regs target arg_exprs-          return ()---doReturn :: [CmmParse CmmExpr] -> CmmParse ()-doReturn exprs_code = do-  dflags <- getDynFlags-  exprs <- sequence exprs_code-  updfr_off <- getUpdFrameOff-  emit (mkReturnSimple dflags exprs updfr_off)--mkReturnSimple  :: DynFlags -> [CmmActual] -> UpdFrameOffset -> CmmAGraph-mkReturnSimple dflags actuals updfr_off =-  mkReturn dflags e actuals updfr_off-  where e = entryCode dflags (CmmLoad (CmmStackSlot Old updfr_off)-                             (gcWord dflags))--doRawJump :: CmmParse CmmExpr -> [GlobalReg] -> CmmParse ()-doRawJump expr_code vols = do-  dflags <- getDynFlags-  expr <- expr_code-  updfr_off <- getUpdFrameOff-  emit (mkRawJump dflags expr updfr_off vols)--doJumpWithStack :: CmmParse CmmExpr -> [CmmParse CmmExpr]-                -> [CmmParse CmmExpr] -> CmmParse ()-doJumpWithStack expr_code stk_code args_code = do-  dflags <- getDynFlags-  expr <- expr_code-  stk_args <- sequence stk_code-  args <- sequence args_code-  updfr_off <- getUpdFrameOff-  emit (mkJumpExtra dflags NativeNodeCall expr args updfr_off stk_args)--doCall :: CmmParse CmmExpr -> [CmmParse LocalReg] -> [CmmParse CmmExpr]-       -> CmmParse ()-doCall expr_code res_code args_code = do-  dflags <- getDynFlags-  expr <- expr_code-  args <- sequence args_code-  ress <- sequence res_code-  updfr_off <- getUpdFrameOff-  c <- code $ mkCall expr (NativeNodeCall,NativeReturn) ress args updfr_off []-  emit c--adjCallTarget :: DynFlags -> CCallConv -> CmmExpr -> [(CmmExpr, ForeignHint) ]-              -> CmmExpr--- On Windows, we have to add the '@N' suffix to the label when making--- a call with the stdcall calling convention.-adjCallTarget dflags StdCallConv (CmmLit (CmmLabel lbl)) args- | platformOS (targetPlatform dflags) == OSMinGW32-  = CmmLit (CmmLabel (addLabelSize lbl (sum (map size args))))-  where size (e, _) = max (wORD_SIZE dflags) (widthInBytes (typeWidth (cmmExprType dflags e)))-                 -- c.f. CgForeignCall.emitForeignCall-adjCallTarget _ _ expr _-  = expr--primCall-        :: [CmmParse (CmmFormal, ForeignHint)]-        -> FastString-        -> [CmmParse CmmExpr]-        -> PD (CmmParse ())-primCall results_code name args_code-  = case lookupUFM callishMachOps name of-        Nothing -> fail ("unknown primitive " ++ unpackFS name)-        Just f  -> return $ do-                results <- sequence results_code-                args <- sequence args_code-                let (p, args') = f args-                code (emitPrimCall (map fst results) p args')--doStore :: CmmType -> CmmParse CmmExpr  -> CmmParse CmmExpr -> CmmParse ()-doStore rep addr_code val_code-  = do dflags <- getDynFlags-       addr <- addr_code-       val <- val_code-        -- if the specified store type does not match the type of the expr-        -- on the rhs, then we insert a coercion that will cause the type-        -- mismatch to be flagged by cmm-lint.  If we don't do this, then-        -- the store will happen at the wrong type, and the error will not-        -- be noticed.-       let val_width = typeWidth (cmmExprType dflags val)-           rep_width = typeWidth rep-       let coerce_val-                | val_width /= rep_width = CmmMachOp (MO_UU_Conv val_width rep_width) [val]-                | otherwise              = val-       emitStore addr coerce_val---- -------------------------------------------------------------------------------- If-then-else and boolean expressions--data BoolExpr-  = BoolExpr `BoolAnd` BoolExpr-  | BoolExpr `BoolOr`  BoolExpr-  | BoolNot BoolExpr-  | BoolTest CmmExpr---- ToDo: smart constructors which simplify the boolean expression.--cmmIfThenElse cond then_part else_part = do-     then_id <- newBlockId-     join_id <- newBlockId-     c <- cond-     emitCond c then_id-     else_part-     emit (mkBranch join_id)-     emitLabel then_id-     then_part-     -- fall through to join-     emitLabel join_id--cmmRawIf cond then_id = do-    c <- cond-    emitCond c then_id---- 'emitCond cond true_id'  emits code to test whether the cond is true,--- branching to true_id if so, and falling through otherwise.-emitCond (BoolTest e) then_id = do-  else_id <- newBlockId-  emit (mkCbranch e then_id else_id Nothing)-  emitLabel else_id-emitCond (BoolNot (BoolTest (CmmMachOp op args))) then_id-  | Just op' <- maybeInvertComparison op-  = emitCond (BoolTest (CmmMachOp op' args)) then_id-emitCond (BoolNot e) then_id = do-  else_id <- newBlockId-  emitCond e else_id-  emit (mkBranch then_id)-  emitLabel else_id-emitCond (e1 `BoolOr` e2) then_id = do-  emitCond e1 then_id-  emitCond e2 then_id-emitCond (e1 `BoolAnd` e2) then_id = do-        -- we'd like to invert one of the conditionals here to avoid an-        -- extra branch instruction, but we can't use maybeInvertComparison-        -- here because we can't look too closely at the expression since-        -- we're in a loop.-  and_id <- newBlockId-  else_id <- newBlockId-  emitCond e1 and_id-  emit (mkBranch else_id)-  emitLabel and_id-  emitCond e2 then_id-  emitLabel else_id---- -------------------------------------------------------------------------------- Source code notes---- | Generate a source note spanning from "a" to "b" (inclusive), then--- proceed with parsing. This allows debugging tools to reason about--- locations in Cmm code.-withSourceNote :: Located a -> Located b -> CmmParse c -> CmmParse c-withSourceNote a b parse = do-  name <- getName-  case combineSrcSpans (getLoc a) (getLoc b) of-    RealSrcSpan span -> code (emitTick (SourceNote span name)) >> parse-    _other           -> parse---- -------------------------------------------------------------------------------- Table jumps---- We use a simplified form of C-- switch statements for now.  A--- switch statement always compiles to a table jump.  Each arm can--- specify a list of values (not ranges), and there can be a single--- default branch.  The range of the table is given either by the--- optional range on the switch (eg. switch [0..7] {...}), or by--- the minimum/maximum values from the branches.--doSwitch :: Maybe (Integer,Integer)-         -> CmmParse CmmExpr-         -> [([Integer],Either BlockId (CmmParse ()))]-         -> Maybe (CmmParse ()) -> CmmParse ()-doSwitch mb_range scrut arms deflt-   = do-        -- Compile code for the default branch-        dflt_entry <- -                case deflt of-                  Nothing -> return Nothing-                  Just e  -> do b <- forkLabelledCode e; return (Just b)--        -- Compile each case branch-        table_entries <- mapM emitArm arms-        let table = M.fromList (concat table_entries)--        dflags <- getDynFlags-        let range = fromMaybe (0, tARGET_MAX_WORD dflags) mb_range--        expr <- scrut-        -- ToDo: check for out of range and jump to default if necessary-        emit $ mkSwitch expr (mkSwitchTargets False range dflt_entry table)-   where-        emitArm :: ([Integer],Either BlockId (CmmParse ())) -> CmmParse [(Integer,BlockId)]-        emitArm (ints,Left blockid) = return [ (i,blockid) | i <- ints ]-        emitArm (ints,Right code) = do-           blockid <- forkLabelledCode code-           return [ (i,blockid) | i <- ints ]--forkLabelledCode :: CmmParse () -> CmmParse BlockId-forkLabelledCode p = do-  (_,ag) <- getCodeScoped p-  l <- newBlockId-  emitOutOfLine l ag-  return l---- -------------------------------------------------------------------------------- Putting it all together---- The initial environment: we define some constants that the compiler--- knows about here.-initEnv :: DynFlags -> Env-initEnv dflags = listToUFM [-  ( fsLit "SIZEOF_StgHeader",-    VarN (CmmLit (CmmInt (fromIntegral (fixedHdrSize dflags)) (wordWidth dflags)) )),-  ( fsLit "SIZEOF_StgInfoTable",-    VarN (CmmLit (CmmInt (fromIntegral (stdInfoTableSizeB dflags)) (wordWidth dflags)) ))-  ]--parseCmmFile :: DynFlags -> FilePath -> IO (Messages, Maybe CmmGroup)-parseCmmFile dflags filename = withTiming (pure dflags) (text "ParseCmm"<+>brackets (text filename)) (\_ -> ()) $ do-  buf <- hGetStringBuffer filename-  let-        init_loc = mkRealSrcLoc (mkFastString filename) 1 1-        init_state = (mkPState dflags buf init_loc) { lex_state = [0] }-                -- 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)-    POk pst code -> do-        st <- initC-        let fcode = getCmm $ unEC code "global" (initEnv dflags) [] >> return ()-            (cmm,_) = runC dflags no_module st fcode-        let ms = getMessages pst dflags-        if (errorsFound dflags ms)-         then return (ms, Nothing)-         else return (ms, Just cmm)-  where-        no_module = panic "parseCmmFile: no module"-{-# 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/akak0rxhbi4n87z3nx78ipv76frvj841-glibc-2.27-dev/include/stdc-predef.h" 1 3 4--# 17 "/nix/store/akak0rxhbi4n87z3nx78ipv76frvj841-glibc-2.27-dev/include/stdc-predef.h" 3 4-----------------------------------------------{-# LINE 11 "<command-line>" #-}-{-# LINE 1 "/nix/store/n5i1zdpmk2b1s3z96649xh8f9kr3g96s-ghc-8.4.3/lib/ghc-8.4.3/include/ghcversion.h" #-}----------------{-# LINE 11 "<command-line>" #-}-{-# LINE 1 "/build/ghc1653_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 ---------------- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.-#if __GLASGOW_HASKELL__ > 706-#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool)-#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool)-#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool)-#else-#define LT(n,m) (n Happy_GHC_Exts.<# m)-#define GTE(n,m) (n Happy_GHC_Exts.>=# m)-#define EQ(n,m) (n Happy_GHC_Exts.==# m)-#endif-{-# LINE 43 "templates/GenericTemplate.hs" #-}--data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList--------{-# LINE 65 "templates/GenericTemplate.hs" #-}--{-# LINE 75 "templates/GenericTemplate.hs" #-}--{-# LINE 84 "templates/GenericTemplate.hs" #-}--infixr 9 `HappyStk`-data HappyStk a = HappyStk a (HappyStk a)---------------------------------------------------------------------------------- starting the parse--happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll---------------------------------------------------------------------------------- Accepting the parse---- If the current token is 0#, it means we've just accepted a partial--- parse (a %partial parser).  We must ignore the saved token on the top of--- the stack in this case.-happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =-        happyReturn1 ans-happyAccept j tk st sts (HappyStk ans _) = -        (happyTcHack j (happyTcHack st)) (happyReturn1 ans)---------------------------------------------------------------------------------- Arrays only: do the next action----happyDoAction i tk st-        = {- nothing -}---          case action of-                0#           -> {- nothing -}-                                     happyFail (happyExpListPerState ((Happy_GHC_Exts.I# (st)) :: Int)) i tk st-                -1#          -> {- nothing -}-                                     happyAccept i tk st-                n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}--                                                   (happyReduceArr Happy_Data_Array.! rule) i tk st-                                                   where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))-                n                 -> {- nothing -}---                                     happyShift new_state i tk st-                                     where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))-   where off    = happyAdjustOffset (indexShortOffAddr happyActOffsets st)-         off_i  = (off Happy_GHC_Exts.+#  i)-         check  = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))-                  then EQ(indexShortOffAddr happyCheck off_i, i)-                  else False-         action-          | check     = indexShortOffAddr happyTable off_i-          | otherwise = indexShortOffAddr happyDefActions st-----indexShortOffAddr (HappyA# arr) off =-        Happy_GHC_Exts.narrow16Int# i-  where-        i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)-        high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))-        low  = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))-        off' = off Happy_GHC_Exts.*# 2#-----{-# INLINE happyLt #-}-happyLt x y = LT(x,y)---readArrayBit arr bit =-    Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `mod` 16)-  where unbox_int (Happy_GHC_Exts.I# x) = x-------data HappyAddr = HappyA# Happy_GHC_Exts.Addr#----------------------------------------------------------------------------------- HappyState data type (not arrays)--{-# LINE 180 "templates/GenericTemplate.hs" #-}---------------------------------------------------------------------------------- Shifting a token--happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =-     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in---     trace "shifting the error token" $-     happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)--happyShift new_state i tk st sts stk =-     happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)---- happyReduce is specialised for the common cases.--happySpecReduce_0 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_0 nt fn j tk st@((action)) sts stk-     = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)--happySpecReduce_1 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')-     = let r = fn v1 in-       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))--happySpecReduce_2 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')-     = let r = fn v1 v2 in-       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))--happySpecReduce_3 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')-     = let r = fn v1 v2 v3 in-       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))--happyReduce k i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happyReduce k nt fn j tk st sts stk-     = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of-         sts1@((HappyCons (st1@(action)) (_))) ->-                let r = fn stk in  -- it doesn't hurt to always seq here...-                happyDoSeq r (happyGoto nt j tk st1 sts1 r)--happyMonadReduce k nt fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happyMonadReduce k nt fn j tk st sts stk =-      case happyDrop k (HappyCons (st) (sts)) of-        sts1@((HappyCons (st1@(action)) (_))) ->-          let drop_stk = happyDropStk k stk in-          happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))--happyMonad2Reduce k nt fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happyMonad2Reduce k nt fn j tk st sts stk =-      case happyDrop k (HappyCons (st) (sts)) of-        sts1@((HappyCons (st1@(action)) (_))) ->-         let drop_stk = happyDropStk k stk--             off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st1)-             off_i = (off Happy_GHC_Exts.+#  nt)-             new_state = indexShortOffAddr happyTable off_i-----          in-          happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))--happyDrop 0# l = l-happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t--happyDropStk 0# l = l-happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs---------------------------------------------------------------------------------- Moving to a new state after a reduction---happyGoto nt j tk st = -   {- nothing -}-   happyDoAction j tk new_state-   where off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st)-         off_i = (off Happy_GHC_Exts.+#  nt)-         new_state = indexShortOffAddr happyTable off_i------------------------------------------------------------------------------------- Error recovery (0# is the error token)---- parse error if we are in recovery and we fail again-happyFail explist 0# tk old_st _ stk@(x `HappyStk` _) =-     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in---      trace "failing" $ -        happyError_ explist i tk--{-  We don't need state discarding for our restricted implementation of-    "error".  In fact, it can cause some bogus parses, so I've disabled it-    for now --SDM---- discard a state-happyFail  0# tk old_st (HappyCons ((action)) (sts)) -                                                (saved_tok `HappyStk` _ `HappyStk` stk) =---      trace ("discarding state, depth " ++ show (length stk))  $-        happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))--}---- Enter error recovery: generate an error token,---                       save the old token and carry on.-happyFail explist i tk (action) sts stk =---      trace "entering error recovery" $-        happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)---- Internal happy errors:--notHappyAtAll :: a-notHappyAtAll = error "Internal Happy error\n"---------------------------------------------------------------------------------- Hack to get the typechecker to accept our action functions---happyTcHack :: Happy_GHC_Exts.Int# -> a -> a-happyTcHack x y = y-{-# INLINE happyTcHack #-}----------------------------------------------------------------------------------- Seq-ing.  If the --strict flag is given, then Happy emits ---      happySeq = happyDoSeq--- otherwise it emits---      happySeq = happyDontSeq--happyDoSeq, happyDontSeq :: a -> b -> b-happyDoSeq   a b = a `seq` b-happyDontSeq a b = b---------------------------------------------------------------------------------- Don't inline any functions from the template.  GHC has a nasty habit--- of deciding to inline happyGoto everywhere, which increases the size of--- the generated parser quite a bit.---{-# NOINLINE happyDoAction #-}-{-# NOINLINE happyTable #-}-{-# NOINLINE happyCheck #-}-{-# NOINLINE happyActOffsets #-}-{-# NOINLINE happyGotoOffsets #-}-{-# NOINLINE happyDefActions #-}--{-# NOINLINE happyShift #-}-{-# NOINLINE happySpecReduce_0 #-}-{-# NOINLINE happySpecReduce_1 #-}-{-# NOINLINE happySpecReduce_2 #-}-{-# NOINLINE happySpecReduce_3 #-}-{-# NOINLINE happyReduce #-}-{-# NOINLINE happyMonadReduce #-}-{-# NOINLINE happyGoto #-}-{-# NOINLINE happyFail #-}---- end of Happy Template.
+ cmm/CmmParse.y view
@@ -0,0 +1,1442 @@+-----------------------------------------------------------------------------+--+-- (c) The University of Glasgow, 2004-2012+--+-- Parser for concrete Cmm.+--+-----------------------------------------------------------------------------++{- -----------------------------------------------------------------------------+Note [Syntax of .cmm files]++NOTE: You are very much on your own in .cmm.  There is very little+error checking at all:++  * Type errors are detected by the (optional) -dcmm-lint pass, if you+    don't turn this on then a type error will likely result in a panic+    from the native code generator.++  * Passing the wrong number of arguments or arguments of the wrong+    type is not detected.++There are two ways to write .cmm code:++ (1) High-level Cmm code delegates the stack handling to GHC, and+     never explicitly mentions Sp or registers.++ (2) Low-level Cmm manages the stack itself, and must know about+     calling conventions.++Whether you want high-level or low-level Cmm is indicated by the+presence of an argument list on a procedure.  For example:++foo ( gcptr a, bits32 b )+{+  // this is high-level cmm code++  if (b > 0) {+     // we can make tail calls passing arguments:+     jump stg_ap_0_fast(a);+  }++  push (stg_upd_frame_info, a) {+    // stack frames can be explicitly pushed++    (x,y) = call wibble(a,b,3,4);+      // calls pass arguments and return results using the native+      // Haskell calling convention.  The code generator will automatically+      // construct a stack frame and an info table for the continuation.++    return (x,y);+      // we can return multiple values from the current proc+  }+}++bar+{+  // this is low-level cmm code, indicated by the fact that we did not+  // put an argument list on bar.++  x = R1;  // the calling convention is explicit: better be careful+           // that this works on all platforms!++  jump %ENTRY_CODE(Sp(0))+}++Here is a list of rules for high-level and low-level code.  If you+break the rules, you get a panic (for using a high-level construct in+a low-level proc), or wrong code (when using low-level code in a+high-level proc).  This stuff isn't checked! (TODO!)++High-level only:++  - tail-calls with arguments, e.g.+    jump stg_fun (arg1, arg2);++  - function calls:+    (ret1,ret2) = call stg_fun (arg1, arg2);++    This makes a call with the NativeNodeCall convention, and the+    values are returned to the following code using the NativeReturn+    convention.++  - returning:+    return (ret1, ret2)++    These use the NativeReturn convention to return zero or more+    results to the caller.++  - pushing stack frames:+    push (info_ptr, field1, ..., fieldN) { ... statements ... }++  - reserving temporary stack space:++      reserve N = x { ... }++    this reserves an area of size N (words) on the top of the stack,+    and binds its address to x (a local register).  Typically this is+    used for allocating temporary storage for passing to foreign+    functions.++    Note that if you make any native calls or invoke the GC in the+    scope of the reserve block, you are responsible for ensuring that+    the stack you reserved is laid out correctly with an info table.++Low-level only:++  - References to Sp, R1-R8, F1-F4 etc.++    NB. foreign calls may clobber the argument registers R1-R8, F1-F4+    etc., so ensure they are saved into variables around foreign+    calls.++  - SAVE_THREAD_STATE() and LOAD_THREAD_STATE(), which modify Sp+    directly.++Both high-level and low-level code can use a raw tail-call:++    jump stg_fun [R1,R2]++NB. you *must* specify the list of GlobalRegs that are passed via a+jump, otherwise the register allocator will assume that all the+GlobalRegs are dead at the jump.+++Calling Conventions+-------------------++High-level procedures use the NativeNode calling convention, or the+NativeReturn convention if the 'return' keyword is used (see Stack+Frames below).++Low-level procedures implement their own calling convention, so it can+be anything at all.++If a low-level procedure implements the NativeNode calling convention,+then it can be called by high-level code using an ordinary function+call.  In general this is hard to arrange because the calling+convention depends on the number of physical registers available for+parameter passing, but there are two cases where the calling+convention is platform-independent:++ - Zero arguments.++ - One argument of pointer or non-pointer word type; this is always+   passed in R1 according to the NativeNode convention.++ - Returning a single value; these conventions are fixed and platform+   independent.+++Stack Frames+------------++A stack frame is written like this:++INFO_TABLE_RET ( label, FRAME_TYPE, info_ptr, field1, ..., fieldN )+               return ( arg1, ..., argM )+{+  ... code ...+}++where field1 ... fieldN are the fields of the stack frame (with types)+arg1...argN are the values returned to the stack frame (with types).+The return values are assumed to be passed according to the+NativeReturn convention.++On entry to the code, the stack frame looks like:++   |----------|+   | fieldN   |+   |   ...    |+   | field1   |+   |----------|+   | info_ptr |+   |----------|+   |  argN    |+   |   ...    | <- Sp++and some of the args may be in registers.++We prepend the code by a copyIn of the args, and assign all the stack+frame fields to their formals.  The initial "arg offset" for stack+layout purposes consists of the whole stack frame plus any args that+might be on the stack.++A tail-call may pass a stack frame to the callee using the following+syntax:++jump f (info_ptr, field1,..,fieldN) (arg1,..,argN)++where info_ptr and field1..fieldN describe the stack frame, and+arg1..argN are the arguments passed to f using the NativeNodeCall+convention. Note if a field is longer than a word (e.g. a D_ on+a 32-bit machine) then the call will push as many words as+necessary to the stack to accommodate it (e.g. 2).+++----------------------------------------------------------------------------- -}++{+module CmmParse ( parseCmmFile ) where++import GhcPrelude++import StgCmmExtCode+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 CoreSyn          ( Tickish(SourceNote) )++import CmmOpt+import MkGraph+import Cmm+import CmmUtils+import CmmSwitch        ( mkSwitchTargets )+import CmmInfo+import BlockId+import CmmLex+import CLabel+import SMRep+import Lexer+import CmmMonad++import CostCentre+import ForeignCall+import Module+import Platform+import Literal+import Unique+import UniqFM+import SrcLoc+import DynFlags+import ErrUtils+import StringBuffer+import FastString+import Panic+import Constants+import Outputable+import BasicTypes+import Bag              ( emptyBag, unitBag )+import Var++import Control.Monad+import Data.Array+import Data.Char        ( ord )+import System.Exit+import Data.Maybe+import qualified Data.Map as M++#include "HsVersions.h"+}++%expect 0++%token+        ':'     { L _ (CmmT_SpecChar ':') }+        ';'     { L _ (CmmT_SpecChar ';') }+        '{'     { L _ (CmmT_SpecChar '{') }+        '}'     { L _ (CmmT_SpecChar '}') }+        '['     { L _ (CmmT_SpecChar '[') }+        ']'     { L _ (CmmT_SpecChar ']') }+        '('     { L _ (CmmT_SpecChar '(') }+        ')'     { L _ (CmmT_SpecChar ')') }+        '='     { L _ (CmmT_SpecChar '=') }+        '`'     { L _ (CmmT_SpecChar '`') }+        '~'     { L _ (CmmT_SpecChar '~') }+        '/'     { L _ (CmmT_SpecChar '/') }+        '*'     { L _ (CmmT_SpecChar '*') }+        '%'     { L _ (CmmT_SpecChar '%') }+        '-'     { L _ (CmmT_SpecChar '-') }+        '+'     { L _ (CmmT_SpecChar '+') }+        '&'     { L _ (CmmT_SpecChar '&') }+        '^'     { L _ (CmmT_SpecChar '^') }+        '|'     { L _ (CmmT_SpecChar '|') }+        '>'     { L _ (CmmT_SpecChar '>') }+        '<'     { L _ (CmmT_SpecChar '<') }+        ','     { L _ (CmmT_SpecChar ',') }+        '!'     { L _ (CmmT_SpecChar '!') }++        '..'    { L _ (CmmT_DotDot) }+        '::'    { L _ (CmmT_DoubleColon) }+        '>>'    { L _ (CmmT_Shr) }+        '<<'    { L _ (CmmT_Shl) }+        '>='    { L _ (CmmT_Ge) }+        '<='    { L _ (CmmT_Le) }+        '=='    { L _ (CmmT_Eq) }+        '!='    { L _ (CmmT_Ne) }+        '&&'    { L _ (CmmT_BoolAnd) }+        '||'    { L _ (CmmT_BoolOr) }++        'True'  { L _ (CmmT_True ) }+        'False' { L _ (CmmT_False) }+        'likely'{ L _ (CmmT_likely)}++        'CLOSURE'       { L _ (CmmT_CLOSURE) }+        'INFO_TABLE'    { L _ (CmmT_INFO_TABLE) }+        'INFO_TABLE_RET'{ L _ (CmmT_INFO_TABLE_RET) }+        'INFO_TABLE_FUN'{ L _ (CmmT_INFO_TABLE_FUN) }+        'INFO_TABLE_CONSTR'{ L _ (CmmT_INFO_TABLE_CONSTR) }+        'INFO_TABLE_SELECTOR'{ L _ (CmmT_INFO_TABLE_SELECTOR) }+        'else'          { L _ (CmmT_else) }+        'export'        { L _ (CmmT_export) }+        'section'       { L _ (CmmT_section) }+        'goto'          { L _ (CmmT_goto) }+        'if'            { L _ (CmmT_if) }+        'call'          { L _ (CmmT_call) }+        'jump'          { L _ (CmmT_jump) }+        'foreign'       { L _ (CmmT_foreign) }+        'never'         { L _ (CmmT_never) }+        'prim'          { L _ (CmmT_prim) }+        'reserve'       { L _ (CmmT_reserve) }+        'return'        { L _ (CmmT_return) }+        'returns'       { L _ (CmmT_returns) }+        'import'        { L _ (CmmT_import) }+        'switch'        { L _ (CmmT_switch) }+        'case'          { L _ (CmmT_case) }+        'default'       { L _ (CmmT_default) }+        'push'          { L _ (CmmT_push) }+        'unwind'        { L _ (CmmT_unwind) }+        'bits8'         { L _ (CmmT_bits8) }+        'bits16'        { L _ (CmmT_bits16) }+        'bits32'        { L _ (CmmT_bits32) }+        'bits64'        { L _ (CmmT_bits64) }+        'bits128'       { L _ (CmmT_bits128) }+        'bits256'       { L _ (CmmT_bits256) }+        'bits512'       { L _ (CmmT_bits512) }+        'float32'       { L _ (CmmT_float32) }+        'float64'       { L _ (CmmT_float64) }+        'gcptr'         { L _ (CmmT_gcptr) }++        GLOBALREG       { L _ (CmmT_GlobalReg   $$) }+        NAME            { L _ (CmmT_Name        $$) }+        STRING          { L _ (CmmT_String      $$) }+        INT             { L _ (CmmT_Int         $$) }+        FLOAT           { L _ (CmmT_Float       $$) }++%monad { PD } { >>= } { return }+%lexer { cmmlex } { L _ CmmT_EOF }+%name cmmParse cmm+%tokentype { Located CmmToken }++-- C-- operator precedences, taken from the C-- spec+%right '||'     -- non-std extension, called %disjoin in C--+%right '&&'     -- non-std extension, called %conjoin in C--+%right '!'+%nonassoc '>=' '>' '<=' '<' '!=' '=='+%left '|'+%left '^'+%left '&'+%left '>>' '<<'+%left '-' '+'+%left '/' '*' '%'+%right '~'++%%++cmm     :: { CmmParse () }+        : {- empty -}                   { return () }+        | cmmtop cmm                    { do $1; $2 }++cmmtop  :: { CmmParse () }+        : cmmproc                       { $1 }+        | cmmdata                       { $1 }+        | decl                          { $1 } +        | 'CLOSURE' '(' NAME ',' NAME lits ')' ';'  +                {% liftP . withThisPackage $ \pkg ->+                   do lits <- sequence $6;+                      staticClosure pkg $3 $5 (map getLit lits) }++-- The only static closures in the RTS are dummy closures like+-- stg_END_TSO_QUEUE_closure and stg_dummy_ret.  We don't need+-- to provide the full generality of static closures here.+-- In particular:+--      * CCS can always be CCS_DONT_CARE+--      * closure is always extern+--      * payload is always empty+--      * we can derive closure and info table labels from a single NAME++cmmdata :: { CmmParse () }+        : 'section' STRING '{' data_label statics '}' +                { do lbl <- $4;+                     ss <- sequence $5;+                     code (emitDecl (CmmData (Section (section $2) lbl) (Statics lbl $ concat ss))) }++data_label :: { CmmParse CLabel }+    : NAME ':'  +                {% liftP . withThisPackage $ \pkg ->+                   return (mkCmmDataLabel pkg $1) }++statics :: { [CmmParse [CmmStatic]] }+        : {- empty -}                   { [] }+        | static statics                { $1 : $2 }+    +static  :: { CmmParse [CmmStatic] }+        : type expr ';' { do e <- $2;+                             return [CmmStaticLit (getLit e)] }+        | type ';'                      { return [CmmUninitialised+                                                        (widthInBytes (typeWidth $1))] }+        | 'bits8' '[' ']' STRING ';'    { return [mkString $4] }+        | 'bits8' '[' INT ']' ';'       { return [CmmUninitialised +                                                        (fromIntegral $3)] }+        | typenot8 '[' INT ']' ';'      { return [CmmUninitialised +                                                (widthInBytes (typeWidth $1) * +                                                        fromIntegral $3)] }+        | 'CLOSURE' '(' NAME lits ')'+                { do { lits <- sequence $4+                ; dflags <- getDynFlags+                     ; return $ map CmmStaticLit $+                        mkStaticClosure dflags (mkForeignLabel $3 Nothing ForeignLabelInExternalPackage IsData)+                         -- mkForeignLabel because these are only used+                         -- for CHARLIKE and INTLIKE closures in the RTS.+                        dontCareCCS (map getLit lits) [] [] [] } }+        -- arrays of closures required for the CHARLIKE & INTLIKE arrays++lits    :: { [CmmParse CmmExpr] }+        : {- empty -}           { [] }+        | ',' expr lits         { $2 : $3 }++cmmproc :: { CmmParse () }+        : info maybe_conv maybe_formals maybe_body+                { do ((entry_ret_label, info, stk_formals, formals), agraph) <-+                       getCodeScoped $ loopDecls $ do {+                         (entry_ret_label, info, stk_formals) <- $1;+                         dflags <- getDynFlags;+                         formals <- sequence (fromMaybe [] $3);+                         withName (showSDoc dflags (ppr entry_ret_label))+                           $4;+                         return (entry_ret_label, info, stk_formals, formals) }+                     let do_layout = isJust $3+                     code (emitProcWithStackFrame $2 info+                                entry_ret_label stk_formals formals agraph+                                do_layout ) }++maybe_conv :: { Convention }+           : {- empty -}        { NativeNodeCall }+           | 'return'           { NativeReturn }++maybe_body :: { CmmParse () }+           : ';'                { return () }+           | '{' body '}'       { withSourceNote $1 $3 $2 }++info    :: { CmmParse (CLabel, Maybe CmmInfoTable, [LocalReg]) }+        : NAME+                {% liftP . withThisPackage $ \pkg ->+                   do   newFunctionName $1 pkg+                        return (mkCmmCodeLabel pkg $1, Nothing, []) }+++        | 'INFO_TABLE' '(' NAME ',' INT ',' INT ',' INT ',' STRING ',' STRING ')'+                -- ptrs, nptrs, closure type, description, type+                {% liftP . withThisPackage $ \pkg ->+                   do dflags <- getDynFlags+                      let prof = profilingInfo dflags $11 $13+                          rep  = mkRTSRep (fromIntegral $9) $+                                   mkHeapRep dflags False (fromIntegral $5)+                                                   (fromIntegral $7) Thunk+                              -- not really Thunk, but that makes the info table+                              -- we want.+                      return (mkCmmEntryLabel pkg $3,+                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg $3+                                           , cit_rep = rep+                                           , cit_prof = prof, cit_srt = Nothing, cit_clo = Nothing },+                              []) }+        +        | 'INFO_TABLE_FUN' '(' NAME ',' INT ',' INT ',' INT ',' STRING ',' STRING ',' INT ')'+                -- ptrs, nptrs, closure type, description, type, fun type+                {% liftP . withThisPackage $ \pkg ->+                   do dflags <- getDynFlags+                      let prof = profilingInfo dflags $11 $13+                          ty   = Fun 0 (ArgSpec (fromIntegral $15))+                                -- Arity zero, arg_type $15+                          rep = mkRTSRep (fromIntegral $9) $+                                    mkHeapRep dflags False (fromIntegral $5)+                                                    (fromIntegral $7) ty+                      return (mkCmmEntryLabel pkg $3,+                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg $3+                                           , cit_rep = rep+                                           , cit_prof = prof, cit_srt = Nothing, cit_clo = Nothing },+                              []) }+                -- we leave most of the fields zero here.  This is only used+                -- to generate the BCO info table in the RTS at the moment.++        | 'INFO_TABLE_CONSTR' '(' NAME ',' INT ',' INT ',' INT ',' INT ',' STRING ',' STRING ')'+                -- ptrs, nptrs, tag, closure type, description, type+                {% liftP . withThisPackage $ \pkg ->+                   do dflags <- getDynFlags+                      let prof = profilingInfo dflags $13 $15+                          ty  = Constr (fromIntegral $9)  -- Tag+                                       (stringToWord8s $13)+                          rep = mkRTSRep (fromIntegral $11) $+                                  mkHeapRep dflags False (fromIntegral $5)+                                                  (fromIntegral $7) ty+                      return (mkCmmEntryLabel pkg $3,+                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg $3+                                           , cit_rep = rep+                                           , cit_prof = prof, cit_srt = Nothing,cit_clo = Nothing },+                              []) }++                     -- If profiling is on, this string gets duplicated,+                     -- but that's the way the old code did it we can fix it some other time.+        +        | 'INFO_TABLE_SELECTOR' '(' NAME ',' INT ',' INT ',' STRING ',' STRING ')'+                -- selector, closure type, description, type+                {% liftP . withThisPackage $ \pkg ->+                   do dflags <- getDynFlags+                      let prof = profilingInfo dflags $9 $11+                          ty  = ThunkSelector (fromIntegral $5)+                          rep = mkRTSRep (fromIntegral $7) $+                                   mkHeapRep dflags False 0 0 ty+                      return (mkCmmEntryLabel pkg $3,+                              Just $ CmmInfoTable { cit_lbl = mkCmmInfoLabel pkg $3+                                           , cit_rep = rep+                                           , cit_prof = prof, cit_srt = Nothing, cit_clo = Nothing },+                              []) }++        | 'INFO_TABLE_RET' '(' NAME ',' INT ')'+                -- closure type (no live regs)+                {% liftP . withThisPackage $ \pkg ->+                   do let prof = NoProfilingInfo+                          rep  = mkRTSRep (fromIntegral $5) $ mkStackRep []+                      return (mkCmmRetLabel pkg $3,+                              Just $ CmmInfoTable { cit_lbl = mkCmmRetInfoLabel pkg $3+                                           , cit_rep = rep+                                           , cit_prof = prof, cit_srt = Nothing, cit_clo = Nothing },+                              []) }++        | 'INFO_TABLE_RET' '(' NAME ',' INT ',' formals0 ')'+                -- closure type, live regs+                {% liftP . withThisPackage $ \pkg ->+                   do dflags <- getDynFlags+                      live <- sequence $7+                      let prof = NoProfilingInfo+                          -- drop one for the info pointer+                          bitmap = mkLiveness dflags (map Just (drop 1 live))+                          rep  = mkRTSRep (fromIntegral $5) $ mkStackRep bitmap+                      return (mkCmmRetLabel pkg $3,+                              Just $ CmmInfoTable { cit_lbl = mkCmmRetInfoLabel pkg $3+                                           , cit_rep = rep+                                           , cit_prof = prof, cit_srt = Nothing, cit_clo = Nothing },+                              live) }++body    :: { CmmParse () }+        : {- empty -}                   { return () }+        | decl body                     { do $1; $2 }+        | stmt body                     { do $1; $2 }++decl    :: { CmmParse () }+        : type names ';'                { mapM_ (newLocal $1) $2 }+        | 'import' importNames ';'      { mapM_ newImport $2 }+        | 'export' names ';'            { return () }  -- ignore exports+++-- an imported function name, with optional packageId+importNames+        :: { [(FastString, CLabel)] }+        : importName                    { [$1] }+        | importName ',' importNames    { $1 : $3 }++importName+        :: { (FastString,  CLabel) }++        -- A label imported without an explicit packageId.+        --      These are taken to come frome some foreign, unnamed package.+        : NAME  +        { ($1, mkForeignLabel $1 Nothing ForeignLabelInExternalPackage IsFunction) }++        -- as previous 'NAME', but 'IsData'+        | 'CLOSURE' NAME+        { ($2, mkForeignLabel $2 Nothing ForeignLabelInExternalPackage IsData) }++        -- A label imported with an explicit packageId.+        | STRING NAME+        { ($2, mkCmmCodeLabel (fsToUnitId (mkFastString $1)) $2) }+        +        +names   :: { [FastString] }+        : NAME                          { [$1] }+        | NAME ',' names                { $1 : $3 }++stmt    :: { CmmParse () }+        : ';'                                   { return () }++        | NAME ':'+                { do l <- newLabel $1; emitLabel l }++++        | lreg '=' expr ';'+                { do reg <- $1; e <- $3; withSourceNote $2 $4 (emitAssign reg e) }+        | type '[' expr ']' '=' expr ';'+                { withSourceNote $2 $7 (doStore $1 $3 $6) }++        -- Gah! We really want to say "foreign_results" but that causes+        -- a shift/reduce conflict with assignment.  We either+        -- we expand out the no-result and single result cases or+        -- we tweak the syntax to avoid the conflict.  The later+        -- option is taken here because the other way would require+        -- multiple levels of expanding and get unwieldy.+        | foreign_results 'foreign' STRING foreignLabel '(' cmm_hint_exprs0 ')' safety opt_never_returns ';'+                {% foreignCall $3 $1 $4 $6 $8 $9 }+        | foreign_results 'prim' '%' NAME '(' exprs0 ')' ';'+                {% primCall $1 $4 $6 }+        -- stmt-level macros, stealing syntax from ordinary C-- function calls.+        -- Perhaps we ought to use the %%-form?+        | NAME '(' exprs0 ')' ';'+                {% stmtMacro $1 $3  }+        | 'switch' maybe_range expr '{' arms default '}'+                { do as <- sequence $5; doSwitch $2 $3 as $6 }+        | 'goto' NAME ';'+                { do l <- lookupLabel $2; emit (mkBranch l) }+        | 'return' '(' exprs0 ')' ';'+                { doReturn $3 }+        | 'jump' expr vols ';'+                { doRawJump $2 $3 }+        | 'jump' expr '(' exprs0 ')' ';'+                { doJumpWithStack $2 [] $4 }+        | 'jump' expr '(' exprs0 ')' '(' exprs0 ')' ';'+                { doJumpWithStack $2 $4 $7 }+        | 'call' expr '(' exprs0 ')' ';'+                { doCall $2 [] $4 }+        | '(' formals ')' '=' 'call' expr '(' exprs0 ')' ';'+                { doCall $6 $2 $8 }+        | 'if' bool_expr cond_likely 'goto' NAME+                { do l <- lookupLabel $5; cmmRawIf $2 l $3 }+        | 'if' bool_expr cond_likely '{' body '}' else+                { cmmIfThenElse $2 (withSourceNote $4 $6 $5) $7 $3 }+        | 'push' '(' exprs0 ')' maybe_body+                { pushStackFrame $3 $5 }+        | 'reserve' expr '=' lreg maybe_body+                { reserveStackFrame $2 $4 $5 }+        | 'unwind' unwind_regs ';'+                { $2 >>= code . emitUnwind }++unwind_regs+        :: { CmmParse [(GlobalReg, Maybe CmmExpr)] }+        : GLOBALREG '=' expr_or_unknown ',' unwind_regs+                { do e <- $3; rest <- $5; return (($1, e) : rest) }+        | GLOBALREG '=' expr_or_unknown+                { do e <- $3; return [($1, e)] }++-- | Used by unwind to indicate unknown unwinding values.+expr_or_unknown+        :: { CmmParse (Maybe CmmExpr) }+        : 'return'+                { do return Nothing }+        | expr+                { do e <- $1; return (Just e) }++foreignLabel     :: { CmmParse CmmExpr }+        : NAME                          { return (CmmLit (CmmLabel (mkForeignLabel $1 Nothing ForeignLabelInThisPackage IsFunction))) }++opt_never_returns :: { CmmReturnInfo }+        :                               { CmmMayReturn }+        | 'never' 'returns'             { CmmNeverReturns }++bool_expr :: { CmmParse BoolExpr }+        : bool_op                       { $1 }+        | expr                          { do e <- $1; return (BoolTest e) }++bool_op :: { CmmParse BoolExpr }+        : bool_expr '&&' bool_expr      { do e1 <- $1; e2 <- $3; +                                          return (BoolAnd e1 e2) }+        | bool_expr '||' bool_expr      { do e1 <- $1; e2 <- $3; +                                          return (BoolOr e1 e2)  }+        | '!' bool_expr                 { do e <- $2; return (BoolNot e) }+        | '(' bool_op ')'               { $2 }++safety  :: { Safety }+        : {- empty -}                   { PlayRisky }+        | STRING                        {% parseSafety $1 }++vols    :: { [GlobalReg] }+        : '[' ']'                       { [] }+        | '[' '*' ']'                   {% do df <- getDynFlags+                                         ; return (realArgRegsCover df) }+                                           -- All of them. See comment attached+                                           -- to realArgRegsCover+        | '[' globals ']'               { $2 }++globals :: { [GlobalReg] }+        : GLOBALREG                     { [$1] }+        | GLOBALREG ',' globals         { $1 : $3 }++maybe_range :: { Maybe (Integer,Integer) }+        : '[' INT '..' INT ']'  { Just ($2, $4) }+        | {- empty -}           { Nothing }++arms    :: { [CmmParse ([Integer],Either BlockId (CmmParse ()))] }+        : {- empty -}                   { [] }+        | arm arms                      { $1 : $2 }++arm     :: { CmmParse ([Integer],Either BlockId (CmmParse ())) }+        : 'case' ints ':' arm_body      { do b <- $4; return ($2, b) }++arm_body :: { CmmParse (Either BlockId (CmmParse ())) }+        : '{' body '}'                  { return (Right (withSourceNote $1 $3 $2)) }+        | 'goto' NAME ';'               { do l <- lookupLabel $2; return (Left l) }++ints    :: { [Integer] }+        : INT                           { [ $1 ] }+        | INT ',' ints                  { $1 : $3 }++default :: { Maybe (CmmParse ()) }+        : 'default' ':' '{' body '}'    { Just (withSourceNote $3 $5 $4) }+        -- taking a few liberties with the C-- syntax here; C-- doesn't have+        -- 'default' branches+        | {- empty -}                   { Nothing }++-- Note: OldCmm doesn't support a first class 'else' statement, though+-- CmmNode does.+else    :: { CmmParse () }+        : {- empty -}                   { return () }+        | 'else' '{' body '}'           { withSourceNote $2 $4 $3 }++cond_likely :: { Maybe Bool }+        : '(' 'likely' ':' 'True'  ')'  { Just True  }+        | '(' 'likely' ':' 'False' ')'  { Just False }+        | {- empty -}                   { Nothing }+++-- we have to write this out longhand so that Happy's precedence rules+-- can kick in.+expr    :: { CmmParse CmmExpr }+        : expr '/' expr                 { mkMachOp MO_U_Quot [$1,$3] }+        | expr '*' expr                 { mkMachOp MO_Mul [$1,$3] }+        | expr '%' expr                 { mkMachOp MO_U_Rem [$1,$3] }+        | expr '-' expr                 { mkMachOp MO_Sub [$1,$3] }+        | expr '+' expr                 { mkMachOp MO_Add [$1,$3] }+        | expr '>>' expr                { mkMachOp MO_U_Shr [$1,$3] }+        | expr '<<' expr                { mkMachOp MO_Shl [$1,$3] }+        | expr '&' expr                 { mkMachOp MO_And [$1,$3] }+        | expr '^' expr                 { mkMachOp MO_Xor [$1,$3] }+        | expr '|' expr                 { mkMachOp MO_Or [$1,$3] }+        | expr '>=' expr                { mkMachOp MO_U_Ge [$1,$3] }+        | expr '>' expr                 { mkMachOp MO_U_Gt [$1,$3] }+        | expr '<=' expr                { mkMachOp MO_U_Le [$1,$3] }+        | expr '<' expr                 { mkMachOp MO_U_Lt [$1,$3] }+        | expr '!=' expr                { mkMachOp MO_Ne [$1,$3] }+        | expr '==' expr                { mkMachOp MO_Eq [$1,$3] }+        | '~' expr                      { mkMachOp MO_Not [$2] }+        | '-' expr                      { mkMachOp MO_S_Neg [$2] }+        | expr0 '`' NAME '`' expr0      {% do { mo <- nameToMachOp $3 ;+                                                return (mkMachOp mo [$1,$5]) } }+        | expr0                         { $1 }++expr0   :: { CmmParse CmmExpr }+        : INT   maybe_ty         { return (CmmLit (CmmInt $1 (typeWidth $2))) }+        | FLOAT maybe_ty         { return (CmmLit (CmmFloat $1 (typeWidth $2))) }+        | STRING                 { do s <- code (newStringCLit $1); +                                      return (CmmLit s) }+        | reg                    { $1 }+        | type '[' expr ']'      { do e <- $3; return (CmmLoad e $1) }+        | '%' NAME '(' exprs0 ')' {% exprOp $2 $4 }+        | '(' expr ')'           { $2 }+++-- leaving out the type of a literal gives you the native word size in C--+maybe_ty :: { CmmType }+        : {- empty -}                   {% do dflags <- getDynFlags; return $ bWord dflags }+        | '::' type                     { $2 }++cmm_hint_exprs0 :: { [CmmParse (CmmExpr, ForeignHint)] }+        : {- empty -}                   { [] }+        | cmm_hint_exprs                { $1 }++cmm_hint_exprs :: { [CmmParse (CmmExpr, ForeignHint)] }+        : cmm_hint_expr                 { [$1] }+        | cmm_hint_expr ',' cmm_hint_exprs      { $1 : $3 }++cmm_hint_expr :: { CmmParse (CmmExpr, ForeignHint) }+        : expr                          { do e <- $1;+                                             return (e, inferCmmHint e) }+        | expr STRING                   {% do h <- parseCmmHint $2;+                                              return $ do+                                                e <- $1; return (e, h) }++exprs0  :: { [CmmParse CmmExpr] }+        : {- empty -}                   { [] }+        | exprs                         { $1 }++exprs   :: { [CmmParse CmmExpr] }+        : expr                          { [ $1 ] }+        | expr ',' exprs                { $1 : $3 }++reg     :: { CmmParse CmmExpr }+        : NAME                  { lookupName $1 }+        | GLOBALREG             { return (CmmReg (CmmGlobal $1)) }++foreign_results :: { [CmmParse (LocalReg, ForeignHint)] }+        : {- empty -}                   { [] }+        | '(' foreign_formals ')' '='   { $2 }++foreign_formals :: { [CmmParse (LocalReg, ForeignHint)] }+        : foreign_formal                        { [$1] }+        | foreign_formal ','                    { [$1] }+        | foreign_formal ',' foreign_formals    { $1 : $3 }++foreign_formal :: { CmmParse (LocalReg, ForeignHint) }+        : local_lreg            { do e <- $1; return (e, (inferCmmHint (CmmReg (CmmLocal e)))) }+        | STRING local_lreg     {% do h <- parseCmmHint $1;+                                      return $ do+                                         e <- $2; return (e,h) }++local_lreg :: { CmmParse LocalReg }+        : NAME                  { do e <- lookupName $1;+                                     return $+                                       case e of +                                        CmmReg (CmmLocal r) -> r+                                        other -> pprPanic "CmmParse:" (ftext $1 <> text " not a local register") }++lreg    :: { CmmParse CmmReg }+        : NAME                  { do e <- lookupName $1;+                                     return $+                                       case e of +                                        CmmReg r -> r+                                        other -> pprPanic "CmmParse:" (ftext $1 <> text " not a register") }+        | GLOBALREG             { return (CmmGlobal $1) }++maybe_formals :: { Maybe [CmmParse LocalReg] }+        : {- empty -}           { Nothing }+        | '(' formals0 ')'      { Just $2 }++formals0 :: { [CmmParse LocalReg] }+        : {- empty -}           { [] }+        | formals               { $1 }++formals :: { [CmmParse LocalReg] }+        : formal ','            { [$1] }+        | formal                { [$1] }+        | formal ',' formals       { $1 : $3 }++formal :: { CmmParse LocalReg }+        : type NAME             { newLocal $1 $2 }++type    :: { CmmType }+        : 'bits8'               { b8 }+        | typenot8              { $1 }++typenot8 :: { CmmType }+        : 'bits16'              { b16 }+        | 'bits32'              { b32 }+        | 'bits64'              { b64 }+        | 'bits128'             { b128 }+        | 'bits256'             { b256 }+        | 'bits512'             { b512 }+        | 'float32'             { f32 }+        | 'float64'             { f64 }+        | 'gcptr'               {% do dflags <- getDynFlags; return $ gcWord dflags }++{+section :: String -> SectionType+section "text"      = Text+section "data"      = Data+section "rodata"    = ReadOnlyData+section "relrodata" = RelocatableReadOnlyData+section "bss"       = UninitialisedData+section s           = OtherSection s++mkString :: String -> CmmStatic+mkString s = CmmString (map (fromIntegral.ord) s)++-- |+-- Given an info table, decide what the entry convention for the proc+-- is.  That is, for an INFO_TABLE_RET we want the return convention,+-- otherwise it is a NativeNodeCall.+--+infoConv :: Maybe CmmInfoTable -> Convention+infoConv Nothing = NativeNodeCall+infoConv (Just info)+  | isStackRep (cit_rep info) = NativeReturn+  | otherwise                 = NativeNodeCall++-- mkMachOp infers the type of the MachOp from the type of its first+-- argument.  We assume that this is correct: for MachOps that don't have+-- symmetrical args (e.g. shift ops), the first arg determines the type of+-- the op.+mkMachOp :: (Width -> MachOp) -> [CmmParse CmmExpr] -> CmmParse CmmExpr+mkMachOp fn args = do+  dflags <- getDynFlags+  arg_exprs <- sequence args+  return (CmmMachOp (fn (typeWidth (cmmExprType dflags (head arg_exprs)))) arg_exprs)++getLit :: CmmExpr -> CmmLit+getLit (CmmLit l) = l+getLit (CmmMachOp (MO_S_Neg _) [CmmLit (CmmInt i r)])  = CmmInt (negate i) r+getLit _ = panic "invalid literal" -- TODO messy failure++nameToMachOp :: FastString -> PD (Width -> MachOp)+nameToMachOp name =+  case lookupUFM machOps name of+        Nothing -> fail ("unknown primitive " ++ unpackFS name)+        Just m  -> return m++exprOp :: FastString -> [CmmParse CmmExpr] -> PD (CmmParse CmmExpr)+exprOp name args_code = do+  dflags <- getDynFlags+  case lookupUFM (exprMacros dflags) name of+     Just f  -> return $ do+        args <- sequence args_code+        return (f args)+     Nothing -> do+        mo <- nameToMachOp name+        return $ mkMachOp mo args_code++exprMacros :: DynFlags -> UniqFM ([CmmExpr] -> CmmExpr)+exprMacros dflags = listToUFM [+  ( fsLit "ENTRY_CODE",   \ [x] -> entryCode dflags x ),+  ( fsLit "INFO_PTR",     \ [x] -> closureInfoPtr dflags x ),+  ( fsLit "STD_INFO",     \ [x] -> infoTable dflags x ),+  ( fsLit "FUN_INFO",     \ [x] -> funInfoTable dflags x ),+  ( fsLit "GET_ENTRY",    \ [x] -> entryCode dflags (closureInfoPtr dflags x) ),+  ( fsLit "GET_STD_INFO", \ [x] -> infoTable dflags (closureInfoPtr dflags x) ),+  ( fsLit "GET_FUN_INFO", \ [x] -> funInfoTable dflags (closureInfoPtr dflags x) ),+  ( fsLit "INFO_TYPE",    \ [x] -> infoTableClosureType dflags x ),+  ( fsLit "INFO_PTRS",    \ [x] -> infoTablePtrs dflags x ),+  ( fsLit "INFO_NPTRS",   \ [x] -> infoTableNonPtrs dflags x )+  ]++-- we understand a subset of C-- primitives:+machOps = listToUFM $+        map (\(x, y) -> (mkFastString x, y)) [+        ( "add",        MO_Add ),+        ( "sub",        MO_Sub ),+        ( "eq",         MO_Eq ),+        ( "ne",         MO_Ne ),+        ( "mul",        MO_Mul ),+        ( "neg",        MO_S_Neg ),+        ( "quot",       MO_S_Quot ),+        ( "rem",        MO_S_Rem ),+        ( "divu",       MO_U_Quot ),+        ( "modu",       MO_U_Rem ),++        ( "ge",         MO_S_Ge ),+        ( "le",         MO_S_Le ),+        ( "gt",         MO_S_Gt ),+        ( "lt",         MO_S_Lt ),++        ( "geu",        MO_U_Ge ),+        ( "leu",        MO_U_Le ),+        ( "gtu",        MO_U_Gt ),+        ( "ltu",        MO_U_Lt ),++        ( "and",        MO_And ),+        ( "or",         MO_Or ),+        ( "xor",        MO_Xor ),+        ( "com",        MO_Not ),+        ( "shl",        MO_Shl ),+        ( "shrl",       MO_U_Shr ),+        ( "shra",       MO_S_Shr ),++        ( "fadd",       MO_F_Add ),+        ( "fsub",       MO_F_Sub ),+        ( "fneg",       MO_F_Neg ),+        ( "fmul",       MO_F_Mul ),+        ( "fquot",      MO_F_Quot ),++        ( "feq",        MO_F_Eq ),+        ( "fne",        MO_F_Ne ),+        ( "fge",        MO_F_Ge ),+        ( "fle",        MO_F_Le ),+        ( "fgt",        MO_F_Gt ),+        ( "flt",        MO_F_Lt ),++        ( "lobits8",  flip MO_UU_Conv W8  ),+        ( "lobits16", flip MO_UU_Conv W16 ),+        ( "lobits32", flip MO_UU_Conv W32 ),+        ( "lobits64", flip MO_UU_Conv W64 ),++        ( "zx16",     flip MO_UU_Conv W16 ),+        ( "zx32",     flip MO_UU_Conv W32 ),+        ( "zx64",     flip MO_UU_Conv W64 ),++        ( "sx16",     flip MO_SS_Conv W16 ),+        ( "sx32",     flip MO_SS_Conv W32 ),+        ( "sx64",     flip MO_SS_Conv W64 ),++        ( "f2f32",    flip MO_FF_Conv W32 ),  -- TODO; rounding mode+        ( "f2f64",    flip MO_FF_Conv W64 ),  -- TODO; rounding mode+        ( "f2i8",     flip MO_FS_Conv W8 ),+        ( "f2i16",    flip MO_FS_Conv W16 ),+        ( "f2i32",    flip MO_FS_Conv W32 ),+        ( "f2i64",    flip MO_FS_Conv W64 ),+        ( "i2f32",    flip MO_SF_Conv W32 ),+        ( "i2f64",    flip MO_SF_Conv W64 )+        ]++callishMachOps :: UniqFM ([CmmExpr] -> (CallishMachOp, [CmmExpr]))+callishMachOps = listToUFM $+        map (\(x, y) -> (mkFastString x, y)) [+        ( "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),++        ( "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 ),++        ( "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 )++        -- ToDo: the rest, maybe+        -- edit: which rest?+        -- also: how do we tell CMM Lint how to type check callish macops?+    ]+  where+    memcpyLikeTweakArgs :: (Int -> CallishMachOp) -> [CmmExpr] -> (CallishMachOp, [CmmExpr])+    memcpyLikeTweakArgs op [] = pgmError "memcpy-like function requires at least one argument"+    memcpyLikeTweakArgs op args@(_:_) =+        (op align, args')+      where+        args' = init args+        align = case last args of+          CmmLit (CmmInt alignInteger _) -> fromInteger alignInteger+          e -> pprPgmError "Non-constant alignment in memcpy-like function:" (ppr e)+        -- The alignment of memcpy-ish operations must be a+        -- compile-time constant. We verify this here, passing it around+        -- in the MO_* constructor. In order to do this, however, we+        -- must intercept the arguments in primCall.++parseSafety :: String -> PD Safety+parseSafety "safe"   = return PlaySafe+parseSafety "unsafe" = return PlayRisky+parseSafety "interruptible" = return PlayInterruptible+parseSafety str      = fail ("unrecognised safety: " ++ str)++parseCmmHint :: String -> PD ForeignHint+parseCmmHint "ptr"    = return AddrHint+parseCmmHint "signed" = return SignedHint+parseCmmHint str      = fail ("unrecognised hint: " ++ str)++-- labels are always pointers, so we might as well infer the hint+inferCmmHint :: CmmExpr -> ForeignHint+inferCmmHint (CmmLit (CmmLabel _)) = AddrHint+inferCmmHint (CmmReg (CmmGlobal g)) | isPtrGlobalReg g = AddrHint+inferCmmHint _ = NoHint++isPtrGlobalReg Sp                    = True+isPtrGlobalReg SpLim                 = True+isPtrGlobalReg Hp                    = True+isPtrGlobalReg HpLim                 = True+isPtrGlobalReg CCCS                  = True+isPtrGlobalReg CurrentTSO            = True+isPtrGlobalReg CurrentNursery        = True+isPtrGlobalReg (VanillaReg _ VGcPtr) = True+isPtrGlobalReg _                     = False++happyError :: PD a+happyError = PD $ \_ s -> unP srcParseFail s++-- -----------------------------------------------------------------------------+-- Statement-level macros++stmtMacro :: FastString -> [CmmParse CmmExpr] -> PD (CmmParse ())+stmtMacro fun args_code = do+  case lookupUFM stmtMacros fun of+    Nothing -> fail ("unknown macro: " ++ unpackFS fun)+    Just fcode -> return $ do+        args <- sequence args_code+        code (fcode args)++stmtMacros :: UniqFM ([CmmExpr] -> FCode ())+stmtMacros = listToUFM [+  ( fsLit "CCS_ALLOC",             \[words,ccs]  -> profAlloc words ccs ),+  ( fsLit "ENTER_CCS_THUNK",       \[e] -> enterCostCentreThunk e ),++  ( fsLit "CLOSE_NURSERY",         \[]  -> emitCloseNursery ),+  ( fsLit "OPEN_NURSERY",          \[]  -> emitOpenNursery ),++  -- completely generic heap and stack checks, for use in high-level cmm.+  ( fsLit "HP_CHK_GEN",            \[bytes] ->+                                      heapStackCheckGen Nothing (Just bytes) ),+  ( fsLit "STK_CHK_GEN",           \[] ->+                                      heapStackCheckGen (Just (CmmLit CmmHighStackMark)) Nothing ),++  -- A stack check for a fixed amount of stack.  Sounds a bit strange, but+  -- we use the stack for a bit of temporary storage in a couple of primops+  ( fsLit "STK_CHK_GEN_N",         \[bytes] ->+                                      heapStackCheckGen (Just bytes) Nothing ),++  -- A stack check on entry to a thunk, where the argument is the thunk pointer.+  ( fsLit "STK_CHK_NP"   ,         \[node] -> entryHeapCheck' False node 0 [] (return ())),++  ( fsLit "LOAD_THREAD_STATE",     \[] -> emitLoadThreadState ),+  ( fsLit "SAVE_THREAD_STATE",     \[] -> emitSaveThreadState ),++  ( fsLit "LDV_ENTER",             \[e] -> ldvEnter e ),+  ( fsLit "LDV_RECORD_CREATE",     \[e] -> ldvRecordCreate e ),++  ( fsLit "PUSH_UPD_FRAME",        \[sp,e] -> emitPushUpdateFrame sp e ),+  ( fsLit "SET_HDR",               \[ptr,info,ccs] ->+                                        emitSetDynHdr ptr info ccs ),+  ( fsLit "TICK_ALLOC_PRIM",       \[hdr,goods,slop] ->+                                        tickyAllocPrim hdr goods slop ),+  ( fsLit "TICK_ALLOC_PAP",        \[goods,slop] ->+                                        tickyAllocPAP goods slop ),+  ( fsLit "TICK_ALLOC_UP_THK",     \[goods,slop] ->+                                        tickyAllocThunk goods slop ),+  ( fsLit "UPD_BH_UPDATABLE",      \[reg] -> emitBlackHoleCode reg )+ ]++emitPushUpdateFrame :: CmmExpr -> CmmExpr -> FCode ()+emitPushUpdateFrame sp e = do+  dflags <- getDynFlags+  emitUpdateFrame dflags sp mkUpdInfoLabel e++pushStackFrame :: [CmmParse CmmExpr] -> CmmParse () -> CmmParse ()+pushStackFrame fields body = do+  dflags <- getDynFlags+  exprs <- sequence fields+  updfr_off <- getUpdFrameOff+  let (new_updfr_off, _, g) = copyOutOflow dflags NativeReturn Ret Old+                                           [] updfr_off exprs+  emit g+  withUpdFrameOff new_updfr_off body++reserveStackFrame+  :: CmmParse CmmExpr+  -> CmmParse CmmReg+  -> CmmParse ()+  -> CmmParse ()+reserveStackFrame psize preg body = do+  dflags <- getDynFlags+  old_updfr_off <- getUpdFrameOff+  reg <- preg+  esize <- psize+  let size = case constantFoldExpr dflags esize of+               CmmLit (CmmInt n _) -> n+               _other -> pprPanic "CmmParse: not a compile-time integer: "+                            (ppr esize)+  let frame = old_updfr_off + wORD_SIZE dflags * fromIntegral size+  emitAssign reg (CmmStackSlot Old frame)+  withUpdFrameOff frame body++profilingInfo dflags desc_str ty_str+  = if not (gopt Opt_SccProfilingOn dflags)+    then NoProfilingInfo+    else ProfilingInfo (stringToWord8s desc_str)+                       (stringToWord8s ty_str)++staticClosure :: UnitId -> FastString -> FastString -> [CmmLit] -> CmmParse ()+staticClosure pkg cl_label info payload+  = do dflags <- getDynFlags+       let lits = mkStaticClosure dflags (mkCmmInfoLabel pkg info) dontCareCCS payload [] [] []+       code $ emitDataLits (mkCmmDataLabel pkg cl_label) lits++foreignCall+        :: String+        -> [CmmParse (LocalReg, ForeignHint)]+        -> CmmParse CmmExpr+        -> [CmmParse (CmmExpr, ForeignHint)]+        -> Safety+        -> CmmReturnInfo+        -> PD (CmmParse ())+foreignCall conv_string results_code expr_code args_code safety ret+  = do  conv <- case conv_string of+          "C" -> return CCallConv+          "stdcall" -> return StdCallConv+          _ -> fail ("unknown calling convention: " ++ conv_string)+        return $ do+          dflags <- getDynFlags+          results <- sequence results_code+          expr <- expr_code+          args <- sequence args_code+          let+                  expr' = adjCallTarget dflags conv expr args+                  (arg_exprs, arg_hints) = unzip args+                  (res_regs,  res_hints) = unzip results+                  fc = ForeignConvention conv arg_hints res_hints ret+                  target = ForeignTarget expr' fc+          _ <- code $ emitForeignCall safety res_regs target arg_exprs+          return ()+++doReturn :: [CmmParse CmmExpr] -> CmmParse ()+doReturn exprs_code = do+  dflags <- getDynFlags+  exprs <- sequence exprs_code+  updfr_off <- getUpdFrameOff+  emit (mkReturnSimple dflags exprs updfr_off)++mkReturnSimple  :: DynFlags -> [CmmActual] -> UpdFrameOffset -> CmmAGraph+mkReturnSimple dflags actuals updfr_off =+  mkReturn dflags e actuals updfr_off+  where e = entryCode dflags (CmmLoad (CmmStackSlot Old updfr_off)+                             (gcWord dflags))++doRawJump :: CmmParse CmmExpr -> [GlobalReg] -> CmmParse ()+doRawJump expr_code vols = do+  dflags <- getDynFlags+  expr <- expr_code+  updfr_off <- getUpdFrameOff+  emit (mkRawJump dflags expr updfr_off vols)++doJumpWithStack :: CmmParse CmmExpr -> [CmmParse CmmExpr]+                -> [CmmParse CmmExpr] -> CmmParse ()+doJumpWithStack expr_code stk_code args_code = do+  dflags <- getDynFlags+  expr <- expr_code+  stk_args <- sequence stk_code+  args <- sequence args_code+  updfr_off <- getUpdFrameOff+  emit (mkJumpExtra dflags NativeNodeCall expr args updfr_off stk_args)++doCall :: CmmParse CmmExpr -> [CmmParse LocalReg] -> [CmmParse CmmExpr]+       -> CmmParse ()+doCall expr_code res_code args_code = do+  dflags <- getDynFlags+  expr <- expr_code+  args <- sequence args_code+  ress <- sequence res_code+  updfr_off <- getUpdFrameOff+  c <- code $ mkCall expr (NativeNodeCall,NativeReturn) ress args updfr_off []+  emit c++adjCallTarget :: DynFlags -> CCallConv -> CmmExpr -> [(CmmExpr, ForeignHint) ]+              -> CmmExpr+-- On Windows, we have to add the '@N' suffix to the label when making+-- a call with the stdcall calling convention.+adjCallTarget dflags StdCallConv (CmmLit (CmmLabel lbl)) args+ | platformOS (targetPlatform dflags) == OSMinGW32+  = CmmLit (CmmLabel (addLabelSize lbl (sum (map size args))))+  where size (e, _) = max (wORD_SIZE dflags) (widthInBytes (typeWidth (cmmExprType dflags e)))+                 -- c.f. CgForeignCall.emitForeignCall+adjCallTarget _ _ expr _+  = expr++primCall+        :: [CmmParse (CmmFormal, ForeignHint)]+        -> FastString+        -> [CmmParse CmmExpr]+        -> PD (CmmParse ())+primCall results_code name args_code+  = case lookupUFM callishMachOps name of+        Nothing -> fail ("unknown primitive " ++ unpackFS name)+        Just f  -> return $ do+                results <- sequence results_code+                args <- sequence args_code+                let (p, args') = f args+                code (emitPrimCall (map fst results) p args')++doStore :: CmmType -> CmmParse CmmExpr  -> CmmParse CmmExpr -> CmmParse ()+doStore rep addr_code val_code+  = do dflags <- getDynFlags+       addr <- addr_code+       val <- val_code+        -- if the specified store type does not match the type of the expr+        -- on the rhs, then we insert a coercion that will cause the type+        -- mismatch to be flagged by cmm-lint.  If we don't do this, then+        -- the store will happen at the wrong type, and the error will not+        -- be noticed.+       let val_width = typeWidth (cmmExprType dflags val)+           rep_width = typeWidth rep+       let coerce_val+                | val_width /= rep_width = CmmMachOp (MO_UU_Conv val_width rep_width) [val]+                | otherwise              = val+       emitStore addr coerce_val++-- -----------------------------------------------------------------------------+-- If-then-else and boolean expressions++data BoolExpr+  = BoolExpr `BoolAnd` BoolExpr+  | BoolExpr `BoolOr`  BoolExpr+  | BoolNot BoolExpr+  | BoolTest CmmExpr++-- ToDo: smart constructors which simplify the boolean expression.++cmmIfThenElse cond then_part else_part likely = do+     then_id <- newBlockId+     join_id <- newBlockId+     c <- cond+     emitCond c then_id likely+     else_part+     emit (mkBranch join_id)+     emitLabel then_id+     then_part+     -- fall through to join+     emitLabel join_id++cmmRawIf cond then_id likely = do+    c <- cond+    emitCond c then_id likely++-- 'emitCond cond true_id'  emits code to test whether the cond is true,+-- branching to true_id if so, and falling through otherwise.+emitCond (BoolTest e) then_id likely = do+  else_id <- newBlockId+  emit (mkCbranch e then_id else_id likely)+  emitLabel else_id+emitCond (BoolNot (BoolTest (CmmMachOp op args))) then_id likely+  | Just op' <- maybeInvertComparison op+  = emitCond (BoolTest (CmmMachOp op' args)) then_id (not <$> likely)+emitCond (BoolNot e) then_id likely = do+  else_id <- newBlockId+  emitCond e else_id likely+  emit (mkBranch then_id)+  emitLabel else_id+emitCond (e1 `BoolOr` e2) then_id likely = do+  emitCond e1 then_id likely+  emitCond e2 then_id likely+emitCond (e1 `BoolAnd` e2) then_id likely = do+        -- we'd like to invert one of the conditionals here to avoid an+        -- extra branch instruction, but we can't use maybeInvertComparison+        -- here because we can't look too closely at the expression since+        -- we're in a loop.+  and_id <- newBlockId+  else_id <- newBlockId+  emitCond e1 and_id likely+  emit (mkBranch else_id)+  emitLabel and_id+  emitCond e2 then_id likely+  emitLabel else_id++-- -----------------------------------------------------------------------------+-- Source code notes++-- | Generate a source note spanning from "a" to "b" (inclusive), then+-- proceed with parsing. This allows debugging tools to reason about+-- locations in Cmm code.+withSourceNote :: Located a -> Located b -> CmmParse c -> CmmParse c+withSourceNote a b parse = do+  name <- getName+  case combineSrcSpans (getLoc a) (getLoc b) of+    RealSrcSpan span -> code (emitTick (SourceNote span name)) >> parse+    _other           -> parse++-- -----------------------------------------------------------------------------+-- Table jumps++-- We use a simplified form of C-- switch statements for now.  A+-- switch statement always compiles to a table jump.  Each arm can+-- specify a list of values (not ranges), and there can be a single+-- default branch.  The range of the table is given either by the+-- optional range on the switch (eg. switch [0..7] {...}), or by+-- the minimum/maximum values from the branches.++doSwitch :: Maybe (Integer,Integer)+         -> CmmParse CmmExpr+         -> [([Integer],Either BlockId (CmmParse ()))]+         -> Maybe (CmmParse ()) -> CmmParse ()+doSwitch mb_range scrut arms deflt+   = do+        -- Compile code for the default branch+        dflt_entry <- +                case deflt of+                  Nothing -> return Nothing+                  Just e  -> do b <- forkLabelledCode e; return (Just b)++        -- Compile each case branch+        table_entries <- mapM emitArm arms+        let table = M.fromList (concat table_entries)++        dflags <- getDynFlags+        let range = fromMaybe (0, tARGET_MAX_WORD dflags) mb_range++        expr <- scrut+        -- ToDo: check for out of range and jump to default if necessary+        emit $ mkSwitch expr (mkSwitchTargets False range dflt_entry table)+   where+        emitArm :: ([Integer],Either BlockId (CmmParse ())) -> CmmParse [(Integer,BlockId)]+        emitArm (ints,Left blockid) = return [ (i,blockid) | i <- ints ]+        emitArm (ints,Right code) = do+           blockid <- forkLabelledCode code+           return [ (i,blockid) | i <- ints ]++forkLabelledCode :: CmmParse () -> CmmParse BlockId+forkLabelledCode p = do+  (_,ag) <- getCodeScoped p+  l <- newBlockId+  emitOutOfLine l ag+  return l++-- -----------------------------------------------------------------------------+-- Putting it all together++-- The initial environment: we define some constants that the compiler+-- knows about here.+initEnv :: DynFlags -> Env+initEnv dflags = listToUFM [+  ( fsLit "SIZEOF_StgHeader",+    VarN (CmmLit (CmmInt (fromIntegral (fixedHdrSize dflags)) (wordWidth dflags)) )),+  ( fsLit "SIZEOF_StgInfoTable",+    VarN (CmmLit (CmmInt (fromIntegral (stdInfoTableSizeB dflags)) (wordWidth dflags)) ))+  ]++parseCmmFile :: DynFlags -> FilePath -> IO (Messages, Maybe CmmGroup)+parseCmmFile dflags filename = withTiming (pure dflags) (text "ParseCmm"<+>brackets (text filename)) (\_ -> ()) $ do+  buf <- hGetStringBuffer filename+  let+        init_loc = mkRealSrcLoc (mkFastString filename) 1 1+        init_state = (mkPState dflags buf init_loc) { lex_state = [0] }+                -- 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)+    POk pst code -> do+        st <- initC+        let fcode = getCmm $ unEC code "global" (initEnv dflags) [] >> return ()+            (cmm,_) = runC dflags no_module st fcode+        let ms = getMessages pst dflags+        if (errorsFound dflags ms)+         then return (ms, Nothing)+         else return (ms, Just cmm)+  where+        no_module = panic "parseCmmFile: no module"+}
cmm/CmmPipeline.hs view
@@ -32,21 +32,22 @@ -- | Top level driver for C-- pipeline ----------------------------------------------------------------------------- -cmmPipeline  :: HscEnv -- Compilation env including-                       -- dynamic flags: -dcmm-lint -ddump-cmm-cps-             -> TopSRT     -- SRT table and accumulating list of compiled procs-             -> CmmGroup             -- Input C-- with Procedures-             -> IO (TopSRT, CmmGroup) -- Output CPS transformed C--+cmmPipeline+ :: HscEnv -- Compilation env including+           -- dynamic flags: -dcmm-lint -ddump-cmm-cps+ -> ModuleSRTInfo        -- Info about SRTs generated so far+ -> CmmGroup             -- Input C-- with Procedures+ -> IO (ModuleSRTInfo, CmmGroup) -- Output CPS transformed C-- -cmmPipeline hsc_env topSRT prog =+cmmPipeline hsc_env srtInfo prog =   do let dflags = hsc_dflags hsc_env       tops <- {-# SCC "tops" #-} mapM (cpsTop hsc_env) prog -     (topSRT, cmms) <- {-# SCC "doSRTs" #-} doSRTs dflags topSRT tops+     (srtInfo, cmms) <- {-# SCC "doSRTs" #-} doSRTs dflags srtInfo tops      dumpWith dflags Opt_D_dump_cmm_cps "Post CPS Cmm" (ppr cmms) -     return (topSRT, cmms)+     return (srtInfo, cmms)   cpsTop :: HscEnv -> CmmDecl -> IO (CAFEnv, [CmmDecl])@@ -105,7 +106,7 @@                      Opt_D_dump_cmm_sink "Sink assignments"         ------------- CAF analysis -----------------------------------------------       let cafEnv = {-# SCC "cafAnal" #-} cafAnal g+       let cafEnv = {-# SCC "cafAnal" #-} cafAnal call_pps l g        dumpWith dflags Opt_D_dump_cmm_caf "CAFEnv" (ppr cafEnv)         g <- if splitting_proc_points
cmm/CmmProcPoint.hs view
@@ -178,9 +178,9 @@ -- -- Extract the set of Continuation BlockIds, see Note [Continuation BlockIds]. callProcPoints      :: CmmGraph -> ProcPointSet-callProcPoints g = foldGraphBlocks add (setSingleton (g_entry g)) g-  where add :: CmmBlock -> LabelSet -> LabelSet-        add b set = case lastNode b of+callProcPoints g = foldlGraphBlocks add (setSingleton (g_entry g)) g+  where add :: LabelSet -> CmmBlock -> LabelSet+        add set b = case lastNode b of                       CmmCall {cml_cont = Just k} -> setInsert k set                       CmmForeignCall {succ=k}     -> setInsert k set                       _ -> set@@ -190,17 +190,17 @@ -- Given the set of successors of calls (which must be proc-points) -- figure out the minimal set of necessary proc-points minimalProcPointSet platform callProcPoints g-  = extendPPSet platform g (postorderDfs g) callProcPoints+  = extendPPSet platform g (revPostorder g) callProcPoints  extendPPSet     :: Platform -> CmmGraph -> [CmmBlock] -> ProcPointSet -> UniqSM ProcPointSet extendPPSet platform g blocks procPoints =     let env = procPointAnalysis procPoints g-        add block pps = let id = entryLabel block+        add pps block = let id = entryLabel block                         in  case mapLookup id env of                               Just ProcPoint -> setInsert id pps                               _ -> pps-        procPoints' = foldGraphBlocks add setEmpty g+        procPoints' = foldlGraphBlocks add setEmpty g         newPoints = mapMaybe ppSuccessor blocks         newPoint  = listToMaybe newPoints         ppSuccessor b =@@ -242,11 +242,11 @@                   (CmmProc (TopInfo {info_tbls = info_tbls})                            top_l _ g@(CmmGraph {g_entry=entry})) =   do -- Build a map from procpoints to the blocks they reach-     let addBlock-             :: CmmBlock-             -> LabelMap (LabelMap CmmBlock)+     let add_block+             :: LabelMap (LabelMap CmmBlock)+             -> CmmBlock              -> LabelMap (LabelMap CmmBlock)-         addBlock b graphEnv =+         add_block graphEnv b =            case mapLookup bid procMap of              Just ProcPoint -> add graphEnv bid bid b              Just (ReachedBy set) ->@@ -265,7 +265,7 @@                          regSetToList $                          expectJust "ppLiveness" $ mapLookup pp liveness -     graphEnv <- return $ foldGraphBlocks addBlock mapEmpty g+     graphEnv <- return $ foldlGraphBlocks add_block mapEmpty g       -- Build a map from proc point BlockId to pairs of:      --  * Labels for their new procedures@@ -302,7 +302,7 @@              -> UniqSM (LabelMap CmmGraph)          add_jumps newGraphEnv (ppId, blockEnv) =            do let needed_jumps = -- find which procpoints we currently branch to-                    mapFold add_if_branch_to_pp [] blockEnv+                    mapFoldr add_if_branch_to_pp [] blockEnv                   add_if_branch_to_pp :: CmmBlock -> [(BlockId, CLabel)] -> [(BlockId, CLabel)]                   add_if_branch_to_pp block rst =                     case lastNode block of@@ -330,7 +330,7 @@                   -- replace branches to procpoints with branches to jumps                   blockEnv'' = toBlockMap $ replaceBranches jumpEnv $ ofBlockMap ppId blockEnv'                   -- add the jump blocks to the graph-                  blockEnv''' = foldl (flip insertBlock) blockEnv'' jumpBlocks+                  blockEnv''' = foldl' (flip addBlock) blockEnv'' jumpBlocks               let g' = ofBlockMap ppId blockEnv'''               -- pprTrace "g' pre jumps" (ppr g') $ do               return (mapInsert ppId g' newGraphEnv)@@ -373,9 +373,10 @@      -- call sites.  Here, we sort them in reverse order -- it gets      -- reversed later.      let (_, block_order) =-             foldl add_block_num (0::Int, mapEmpty :: LabelMap Int)-                   (postorderDfs g)-         add_block_num (i, map) block = (i+1, mapInsert (entryLabel block) i map)+             foldl' add_block_num (0::Int, mapEmpty :: LabelMap Int)+                   (revPostorder g)+         add_block_num (i, map) block =+           (i + 1, mapInsert (entryLabel block) i map)          sort_fn (bid, _) (bid', _) =            compare (expectJust "block_order" $ mapLookup bid  block_order)                    (expectJust "block_order" $ mapLookup bid' block_order)
cmm/CmmSink.hs view
@@ -24,6 +24,7 @@ import qualified Data.IntSet as IntSet import Data.List (partition) import qualified Data.Set as Set+import Data.List import Data.Maybe  -- Compact sets for membership tests of local variables.@@ -172,7 +173,7 @@   liveness = cmmLocalLiveness dflags graph   getLive l = mapFindWithDefault Set.empty l liveness -  blocks = postorderDfs graph+  blocks = revPostorder graph    join_pts = findJoinPoints blocks @@ -233,7 +234,7 @@              live_rhs = foldRegsUsed dflags extendRegSet emptyRegSet rhs -      final_middle = foldl blockSnoc middle' dropped_last+      final_middle = foldl' blockSnoc middle' dropped_last        sunk' = mapUnion sunk $                  mapFromList [ (l, filterAssignments dflags (getLive l) assigs'')@@ -343,7 +344,7 @@       (dropped, as') = dropAssignmentsSimple dflags                           (\a -> conflicts dflags a node2) as1 -      block' = foldl blockSnoc block dropped `blockSnoc` node2+      block' = foldl' blockSnoc block dropped `blockSnoc` node2   --@@ -457,13 +458,7 @@         occurs_once = not l_live && l_usages == Just 1         occurs_none = not l_live && l_usages == Nothing -        inl_node = case mapExpDeep inl_exp node of-                     -- See Note [Improving conditionals]-                     CmmCondBranch (CmmMachOp (MO_Ne w) args)-                                   ti fi l-                           -> CmmCondBranch (cmmMachOpFold dflags (MO_Eq w) args)-                                            fi ti l-                     node' -> node'+        inl_node = improveConditional (mapExpDeep inl_exp node)          inl_exp :: CmmExpr -> CmmExpr         -- inl_exp is where the inlining actually takes place!@@ -474,22 +469,43 @@         inl_exp (CmmMachOp op args) = cmmMachOpFold dflags op args         inl_exp other = other -{- Note [Improving conditionals]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Given-  CmmCondBranch ((a >## b) != 1) t f-where a,b, are Floats, the constant folder /cannot/ turn it into-  CmmCondBranch (a <=## b) t f-because comparison on floats are not invertible-(see CmmMachOp.maybeInvertComparison). -What we want instead is simply to reverse the true/false branches thus+{- Note [improveConditional]++cmmMachOpFold tries to simplify conditionals to turn things like+  (a == b) != 1+into+  (a != b)+but there's one case it can't handle: when the comparison is over+floating-point values, we can't invert it, because floating-point+comparisions aren't invertible (because NaN).++But we *can* optimise this conditional by swapping the true and false+branches. Given   CmmCondBranch ((a >## b) != 1) t f--->+we can turn it into   CmmCondBranch (a >## b) f t -And we do that right here in tryToInline, just as we do cmmMachOpFold.+So here we catch conditionals that weren't optimised by cmmMachOpFold,+and apply above transformation to eliminate the comparison against 1.++It's tempting to just turn every != into == and then let cmmMachOpFold+do its thing, but that risks changing a nice fall-through conditional+into one that requires two jumps. (see swapcond_last in+CmmContFlowOpt), so instead we carefully look for just the cases where+we can eliminate a comparison. -}+improveConditional :: CmmNode O x -> CmmNode O x+improveConditional+  (CmmCondBranch (CmmMachOp mop [x, CmmLit (CmmInt 1 _)]) t f l)+  | neLike mop, isComparisonExpr x+  = CmmCondBranch x f t (fmap not l)+  where+    neLike (MO_Ne _) = True+    neLike (MO_U_Lt _) = True   -- (x<y) < 1 behaves like (x<y) != 1+    neLike (MO_S_Lt _) = True   -- (x<y) < 1 behaves like (x<y) != 1+    neLike _ = False+improveConditional other = other  -- Note [dependent assignments] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -741,7 +757,7 @@   case e of    CmmReg r       -> regAddr dflags r 0 w    CmmRegOff r i  -> regAddr dflags r i w-   _other | regUsedIn dflags (CmmGlobal Sp) e -> StackMem+   _other | regUsedIn dflags spReg e -> StackMem           | otherwise -> AnyMem  regAddr :: DynFlags -> CmmReg -> Int -> Width -> AbsMem
cmm/CmmSwitch.hs view
@@ -251,7 +251,69 @@ --     findSingleValues --  5. The thus collected pieces are assembled to a balanced binary tree. +{-+  Note [Two alts + default]+  ~~~~~~~~~~~~~~~~~~~~~~~~~ +Discussion and a bit more info at #14644++When dealing with a switch of the form:+switch(e) {+  case 1: goto l1;+  case 3000: goto l2;+  default: goto ldef;+}++If we treat it as a sparse jump table we would generate:++if (e > 3000) //Check if value is outside of the jump table.+    goto ldef;+else {+    if (e < 3000) { //Compare to upper value+        if(e != 1) //Compare to remaining value+            goto ldef;+          else+            goto l2;+    }+    else+        goto l1;+}++Instead we special case this to :++if (e==1) goto l1;+else if (e==3000) goto l2;+else goto l3;++This means we have:+* Less comparisons for: 1,<3000+* Unchanged for 3000+* One more for >3000++This improves code in a few ways:+* One comparison less means smaller code which helps with cache.+* It exchanges a taken jump for two jumps no taken in the >range case.+  Jumps not taken are cheaper (See Agner guides) making this about as fast.+* For all other cases the first range check is removed making it faster.++The end result is that the change is not measurably slower for the case+>3000 and faster for the other cases.++This makes running this kind of match in an inner loop cheaper by 10-20%+depending on the data.+In nofib this improves wheel-sieve1 by 4-9% depending on problem+size.++We could also add a second conditional jump after the comparison to+keep the range check like this:+    cmp 3000, rArgument+    jg <default>+    je <branch 2>+While this is fairly cheap it made no big difference for the >3000 case+and slowed down all other cases making it not worthwhile.+-}++ -- | Does the target support switch out of the box? Then leave this to the -- target! targetSupportsSwitch :: HscTarget -> Bool@@ -266,13 +328,16 @@ createSwitchPlan (SwitchTargets _signed _range (Just defLabel) m)     | [(x, l)] <- M.toList m     = IfEqual x l (Unconditionally defLabel)--- And another common case, matching booleans+-- And another common case, matching "booleans" createSwitchPlan (SwitchTargets _signed (lo,hi) Nothing m)-    | [(x1, l1), (x2,l2)] <- M.toAscList m-    , x1 == lo-    , x2 == hi-    , x1 + 1 == x2+    | [(x1, l1), (_x2,l2)] <- M.toAscList m+    --Checking If |range| = 2 is enough if we have two unique literals+    , hi - lo == 1     = IfEqual x1 l1 (Unconditionally l2)+-- See Note [Two alts + default]+createSwitchPlan (SwitchTargets _signed _range (Just defLabel) m)+    | [(x1, l1), (x2,l2)] <- M.toAscList m+    = IfEqual x1 l1 (IfEqual x2 l2 (Unconditionally defLabel)) createSwitchPlan (SwitchTargets signed range mbdef m) =     -- pprTrace "createSwitchPlan" (text (show ids) $$ text (show (range,m)) $$ text (show pieces) $$ text (show flatPlan) $$ text (show plan)) $     plan
cmm/CmmType.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- module CmmType     ( CmmType   -- Abstract     , b8, b16, b32, b64, b128, b256, b512, f32, f64, bWord, bHalfWord, gcWord@@ -29,7 +27,6 @@    ) where -#include "HsVersions.h"  import GhcPrelude 
cmm/CmmUtils.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, GADTs, RankNTypes #-}+{-# LANGUAGE GADTs, RankNTypes #-}  ----------------------------------------------------------------------------- --@@ -35,8 +35,11 @@         cmmSubWord, cmmAddWord, cmmMulWord, cmmQuotWord,         cmmToWord, -        isTrivialCmmExpr, hasNoGlobalRegs,+        isTrivialCmmExpr, hasNoGlobalRegs, isLit, isComparisonExpr, +        baseExpr, spExpr, hpExpr, spLimExpr, hpLimExpr,+        currentTSOExpr, currentNurseryExpr, cccsExpr,+         -- Statics         blankWord, @@ -53,17 +56,15 @@         -- * Operations that probably don't belong here         modifyGraph, -        ofBlockMap, toBlockMap, insertBlock,+        ofBlockMap, toBlockMap,         ofBlockList, toBlockList, bodyToBlockList,         toBlockListEntryFirst, toBlockListEntryFirstFalseFallthrough,-        foldGraphBlocks, mapGraphNodes, postorderDfs, mapGraphNodes1,+        foldlGraphBlocks, mapGraphNodes, revPostorder, mapGraphNodes1,          -- * Ticks         blockTicks   ) where -#include "HsVersions.h"- import GhcPrelude  import TyCon    ( PrimRep(..), PrimElemRep(..) )@@ -75,11 +76,9 @@ import CLabel import Outputable import DynFlags-import Util import CodeGen.Platform  import Data.Word-import Data.Maybe import Data.Bits import Hoopl.Graph import Hoopl.Label@@ -254,8 +253,8 @@ cmmOffsetLit :: CmmLit -> Int -> CmmLit cmmOffsetLit (CmmLabel l)      byte_off = cmmLabelOff l byte_off cmmOffsetLit (CmmLabelOff l m) byte_off = cmmLabelOff l (m+byte_off)-cmmOffsetLit (CmmLabelDiffOff l1 l2 m) byte_off-                                        = CmmLabelDiffOff l1 l2 (m+byte_off)+cmmOffsetLit (CmmLabelDiffOff l1 l2 m w) byte_off+                                        = CmmLabelDiffOff l1 l2 (m+byte_off) w cmmOffsetLit (CmmInt m rep)    byte_off = CmmInt (m + fromIntegral byte_off) rep cmmOffsetLit _                 byte_off = pprPanic "cmmOffsetLit" (ppr byte_off) @@ -386,6 +385,14 @@ hasNoGlobalRegs (CmmRegOff (CmmLocal _) _) = True hasNoGlobalRegs _ = False +isLit :: CmmExpr -> Bool+isLit (CmmLit _) = True+isLit _          = False++isComparisonExpr :: CmmExpr -> Bool+isComparisonExpr (CmmMachOp op _) = isComparisonMachOp op+isComparisonExpr _                  = False+ --------------------------------------------------- -- --      Tagging@@ -484,12 +491,6 @@ ofBlockMap :: BlockId -> LabelMap CmmBlock -> CmmGraph ofBlockMap entry bodyMap = CmmGraph {g_entry=entry, g_graph=GMany NothingO bodyMap NothingO} -insertBlock :: CmmBlock -> LabelMap CmmBlock -> LabelMap CmmBlock-insertBlock block map =-  ASSERT(isNothing $ mapLookup id map)-  mapInsert id block map-  where id = entryLabel block- toBlockList :: CmmGraph -> [CmmBlock] toBlockList g = mapElems $ toBlockMap g @@ -552,11 +553,12 @@ mapGraphNodes1 f = modifyGraph (mapGraph f)  -foldGraphBlocks :: (CmmBlock -> a -> a) -> a -> CmmGraph -> a-foldGraphBlocks k z g = mapFold k z $ toBlockMap g+foldlGraphBlocks :: (a -> CmmBlock -> a) -> a -> CmmGraph -> a+foldlGraphBlocks k z g = mapFoldl k z $ toBlockMap g -postorderDfs :: CmmGraph -> [CmmBlock]-postorderDfs g = {-# SCC "postorderDfs" #-} postorder_dfs_from (toBlockMap g) (g_entry g)+revPostorder :: CmmGraph -> [CmmBlock]+revPostorder g = {-# SCC "revPostorder" #-}+    revPostorderFrom (toBlockMap g) (g_entry g)  ------------------------------------------------- -- Tick utilities@@ -567,3 +569,18 @@   where goStmt :: CmmNode e x -> [CmmTickish] -> [CmmTickish]         goStmt  (CmmTick t) ts = t:ts         goStmt  _other      ts = ts+++-- -----------------------------------------------------------------------------+-- Access to common global registers++baseExpr, spExpr, hpExpr, currentTSOExpr, currentNurseryExpr,+  spLimExpr, hpLimExpr, cccsExpr :: CmmExpr+baseExpr = CmmReg baseReg+spExpr = CmmReg spReg+spLimExpr = CmmReg spLimReg+hpExpr = CmmReg hpReg+hpLimExpr = CmmReg hpLimReg+currentTSOExpr = CmmReg currentTSOReg+currentNurseryExpr = CmmReg currentNurseryReg+cccsExpr = CmmReg cccsReg
cmm/Debug.hs view
@@ -35,7 +35,7 @@ import PprCore         () import PprCmmExpr      ( pprExpr ) import SrcLoc-import Util+import Util            ( seqList )  import Hoopl.Block import Hoopl.Collections@@ -46,6 +46,7 @@ import Data.List     ( minimumBy, nubBy ) import Data.Ord      ( comparing ) import qualified Data.Map as Map+import Data.Either   ( partitionEithers )  -- | Debug information about a block of code. Ticks scope over nested -- blocks.@@ -100,7 +101,7 @@       -- Analyse tick scope structure: Each one is either a top-level       -- tick scope, or the child of another.       (topScopes, childScopes)-        = splitEithers $ map (\a -> findP a a) $ Map.keys blockCtxs+        = partitionEithers $ map (\a -> findP a a) $ Map.keys blockCtxs       findP tsc GlobalScope = Left tsc -- top scope       findP tsc scp | scp' `Map.member` blockCtxs = Right (scp', tsc)                     | otherwise                   = findP tsc scp'@@ -330,7 +331,7 @@            v :: P64 = R2;            if ((Sp + 8) - 32 < SpLim) (likely: False) goto c2ff; else goto c2fg; -After c2fe we we may pass to either c2ff or c2fg; let's first consider the+After c2fe we may pass to either c2ff or c2fg; let's first consider the former. In this case there is nothing in particular that we need to do other than reiterate what we already know about Sp, @@ -348,8 +349,8 @@            unwind Sp = Just Sp + 0;            I64[Sp - 8] = c2dD;            R1 = v :: P64;-           unwind Sp = Just Sp + 8;            Sp = Sp - 8;+           unwind Sp = Just Sp + 8;            if (R1 & 7 != 0) goto c2dD; else goto c2dE;  The remaining blocks are simple,@@ -391,10 +392,95 @@   * This unwind information is converted to DebugBlocks by Debug.cmmDebugGen - * These DebugBlcosk are then converted to, e.g., DWARF unwinding tables+ * These DebugBlocks are then converted to, e.g., DWARF unwinding tables    (by the Dwarf module) and emitted in the final object. -See also: Note [Unwinding information in the NCG] in AsmCodeGen.+See also:+  Note [Unwinding information in the NCG] in AsmCodeGen,+  Note [Unwind pseudo-instruction in Cmm],+  Note [Debugging DWARF unwinding info].+++Note [Debugging DWARF unwinding info]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++For debugging generated unwinding info I've found it most useful to dump the+disassembled binary with objdump -D and dump the debug info with+readelf --debug-dump=frames-interp.++You should get something like this:++  0000000000000010 <stg_catch_frame_info>:+    10:   48 83 c5 18             add    $0x18,%rbp+    14:   ff 65 00                jmpq   *0x0(%rbp)++and:++  Contents of the .debug_frame section:++  00000000 0000000000000014 ffffffff CIE "" cf=1 df=-8 ra=16+     LOC           CFA      rbp   rsp   ra+  0000000000000000 rbp+0    v+0   s     c+0++  00000018 0000000000000024 00000000 FDE cie=00000000 pc=000000000000000f..0000000000000017+     LOC           CFA      rbp   rsp   ra+  000000000000000f rbp+0    v+0   s     c+0+  000000000000000f rbp+24   v+0   s     c+0++To read it http://www.dwarfstd.org/doc/dwarf-2.0.0.pdf has a nice example in+Appendix 5 (page 101 of the pdf) and more details in the relevant section.++The key thing to keep in mind is that the value at LOC is the value from+*before* the instruction at LOC executes. In other words it answers the+question: if my $rip is at LOC, how do I get the relevant values given the+values obtained through unwinding so far.++If the readelf --debug-dump=frames-interp output looks wrong, it may also be+useful to look at readelf --debug-dump=frames, which is closer to the+information that GHC generated.++It's also useful to dump the relevant Cmm with -ddump-cmm -ddump-opt-cmm+-ddump-cmm-proc -ddump-cmm-verbose. Note [Unwind pseudo-instruction in Cmm]+explains how to interpret it.++Inside gdb there are a couple useful commands for inspecting frames.+For example:++  gdb> info frame <num>++It shows the values of registers obtained through unwinding.++Another useful thing to try when debugging the DWARF unwinding is to enable+extra debugging output in GDB:++  gdb> set debug frame 1++This makes GDB produce a trace of its internal workings. Having gone this far,+it's just a tiny step to run GDB in GDB. Make sure you install debugging+symbols for gdb if you obtain it through a package manager.++Keep in mind that the current release of GDB has an instruction pointer handling+heuristic that works well for C-like languages, but doesn't always work for+Haskell. See Note [Info Offset] in Dwarf.Types for more details.++Note [Unwind pseudo-instruction in Cmm]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++One of the possible CmmNodes is a CmmUnwind pseudo-instruction. It doesn't+generate any assembly, but controls what DWARF unwinding information gets+generated.++It's important to understand what ranges of code the unwind pseudo-instruction+refers to.+For a sequence of CmmNodes like:++  A // starts at addr X and ends at addr Y-1+  unwind Sp = Just Sp + 16;+  B // starts at addr Y and ends at addr Z++the unwind statement reflects the state after A has executed, but before B+has executed. If you consult the Note [Debugging DWARF unwinding info], the+LOC this information will end up in is Y. -}  -- | A label associated with an 'UnwindTable'
cmm/Hoopl/Collections.hs view
@@ -1,13 +1,22 @@+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE DeriveTraversable #-}+{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+ module Hoopl.Collections     ( IsSet(..)     , setInsertList, setDeleteList, setUnions     , IsMap(..)     , mapInsertList, mapDeleteList, mapUnions+    , UniqueMap, UniqueSet     ) where  import GhcPrelude +import qualified Data.IntMap.Strict as M+import qualified Data.IntSet as S+ import Data.List (foldl', foldl1')  class IsSet set where@@ -27,7 +36,8 @@   setIntersection :: set -> set -> set   setIsSubsetOf :: set -> set -> Bool -  setFold :: (ElemOf set -> b -> b) -> b -> set -> b+  setFoldl :: (b -> ElemOf set -> b) -> b -> set -> b+  setFoldr :: (ElemOf set -> b -> b) -> b -> set -> b    setElems :: set -> [ElemOf set]   setFromList :: [ElemOf set] -> set@@ -58,6 +68,7 @@   mapInsert :: KeyOf map -> a -> map a -> map a   mapInsertWith :: (a -> a -> a) -> KeyOf map -> a -> map a -> map a   mapDelete :: KeyOf map -> map a -> map a+  mapAlter :: (Maybe a -> Maybe a) -> KeyOf map -> map a -> map a    mapUnion :: map a -> map a -> map a   mapUnionWithKey :: (KeyOf map -> a -> a -> a) -> map a -> map a -> map a@@ -67,8 +78,9 @@    mapMap :: (a -> b) -> map a -> map b   mapMapWithKey :: (KeyOf map -> a -> b) -> map a -> map b-  mapFold :: (a -> b -> b) -> b -> map a -> b-  mapFoldWithKey :: (KeyOf map -> a -> b -> b) -> b -> map a -> b+  mapFoldl :: (b -> a -> b) -> b -> map a -> b+  mapFoldr :: (a -> b -> b) -> b -> map a -> b+  mapFoldlWithKey :: (b -> KeyOf map -> a -> b) -> b -> map a -> b   mapFilter :: (a -> Bool) -> map a -> map a    mapElems :: map a -> [a]@@ -87,3 +99,70 @@ mapUnions :: IsMap map => [map a] -> map a mapUnions [] = mapEmpty mapUnions maps = foldl1' mapUnion maps++-----------------------------------------------------------------------------+-- Basic instances+-----------------------------------------------------------------------------++newtype UniqueSet = US S.IntSet deriving (Eq, Ord, Show)++instance IsSet UniqueSet where+  type ElemOf UniqueSet = Int++  setNull (US s) = S.null s+  setSize (US s) = S.size s+  setMember k (US s) = S.member k s++  setEmpty = US S.empty+  setSingleton k = US (S.singleton k)+  setInsert k (US s) = US (S.insert k s)+  setDelete k (US s) = US (S.delete k s)++  setUnion (US x) (US y) = US (S.union x y)+  setDifference (US x) (US y) = US (S.difference x y)+  setIntersection (US x) (US y) = US (S.intersection x y)+  setIsSubsetOf (US x) (US y) = S.isSubsetOf x y++  setFoldl k z (US s) = S.foldl' k z s+  setFoldr k z (US s) = S.foldr k z s++  setElems (US s) = S.elems s+  setFromList ks = US (S.fromList ks)++newtype UniqueMap v = UM (M.IntMap v)+  deriving (Eq, Ord, Show, Functor, Foldable, Traversable)++instance IsMap UniqueMap where+  type KeyOf UniqueMap = Int++  mapNull (UM m) = M.null m+  mapSize (UM m) = M.size m+  mapMember k (UM m) = M.member k m+  mapLookup k (UM m) = M.lookup k m+  mapFindWithDefault def k (UM m) = M.findWithDefault def k m++  mapEmpty = UM M.empty+  mapSingleton k v = UM (M.singleton k v)+  mapInsert k v (UM m) = UM (M.insert k v m)+  mapInsertWith f k v (UM m) = UM (M.insertWith f k v m)+  mapDelete k (UM m) = UM (M.delete k m)+  mapAlter f k (UM m) = UM (M.alter f k m)++  mapUnion (UM x) (UM y) = UM (M.union x y)+  mapUnionWithKey f (UM x) (UM y) = UM (M.unionWithKey f x y)+  mapDifference (UM x) (UM y) = UM (M.difference x y)+  mapIntersection (UM x) (UM y) = UM (M.intersection x y)+  mapIsSubmapOf (UM x) (UM y) = M.isSubmapOf x y++  mapMap f (UM m) = UM (M.map f m)+  mapMapWithKey f (UM m) = UM (M.mapWithKey f m)+  mapFoldl k z (UM m) = M.foldl' k z m+  mapFoldr k z (UM m) = M.foldr k z m+  mapFoldlWithKey k z (UM m) = M.foldlWithKey' k z m+  mapFilter f (UM m) = UM (M.filter f m)++  mapElems (UM m) = M.elems m+  mapKeys (UM m) = M.keys m+  mapToList (UM m) = M.toList m+  mapFromList assocs = UM (M.fromList assocs)+  mapFromListWith f assocs = UM (M.fromListWith f assocs)
cmm/Hoopl/Dataflow.hs view
@@ -30,6 +30,7 @@   , rewriteCmmBwd   , changedIf   , joinOutFacts+  , joinFacts   ) where @@ -111,8 +112,7 @@         blockMap =             case hooplGraph of                 GMany NothingO bm NothingO -> bm-        entries = if mapNull initFact then [entry] else mapKeys initFact-    in fixpointAnalysis dir lattice transfer entries blockMap initFact+    in fixpointAnalysis dir lattice transfer entry blockMap initFact  -- Fixpoint algorithm. fixpointAnalysis@@ -120,19 +120,20 @@        Direction     -> DataflowLattice f     -> TransferFun f-    -> [Label]+    -> Label     -> LabelMap CmmBlock     -> FactBase f     -> FactBase f-fixpointAnalysis direction lattice do_block entries blockmap = loop start+fixpointAnalysis direction lattice do_block entry blockmap = loop start   where     -- Sorting the blocks helps to minimize the number of times we need to     -- process blocks. For instance, for forward analysis we want to look at     -- blocks in reverse postorder. Also, see comments for sortBlocks.-    blocks     = sortBlocks direction entries blockmap+    blocks     = sortBlocks direction entry blockmap     num_blocks = length blocks     block_arr  = {-# SCC "block_arr" #-} listArray (0, num_blocks - 1) blocks-    start      = {-# SCC "start" #-} [0 .. num_blocks - 1]+    start      = {-# SCC "start" #-} IntSet.fromDistinctAscList+      [0 .. num_blocks - 1]     dep_blocks = {-# SCC "dep_blocks" #-} mkDepBlocks direction blocks     join       = fact_join lattice @@ -140,17 +141,17 @@         :: IntHeap     -- ^ Worklist, i.e., blocks to process         -> FactBase f  -- ^ Current result (increases monotonically)         -> FactBase f-    loop []              !fbase1 = fbase1-    loop (index : todo1) !fbase1 =+    loop todo !fbase1 | Just (index, todo1) <- IntSet.minView todo =         let block = block_arr ! index             out_facts = {-# SCC "do_block" #-} do_block block fbase1             -- For each of the outgoing edges, we join it with the current             -- information in fbase1 and (if something changed) we update it             -- and add the affected blocks to the worklist.             (todo2, fbase2) = {-# SCC "mapFoldWithKey" #-}-                mapFoldWithKey+                mapFoldlWithKey                     (updateFact join dep_blocks) (todo1, fbase1) out_facts         in loop todo2 fbase2+    loop _ !fbase1 = fbase1  rewriteCmmBwd     :: DataflowLattice f@@ -173,9 +174,8 @@         blockMap1 =             case hooplGraph of                 GMany NothingO bm NothingO -> bm-        entries = if mapNull initFact then [entry] else mapKeys initFact     (blockMap2, facts) <--        fixpointRewrite dir lattice rwFun entries blockMap1 initFact+        fixpointRewrite dir lattice rwFun entry blockMap1 initFact     return (cmmGraph {g_graph = GMany NothingO blockMap2 NothingO}, facts)  fixpointRewrite@@ -183,20 +183,21 @@        Direction     -> DataflowLattice f     -> RewriteFun f-    -> [Label]+    -> Label     -> LabelMap CmmBlock     -> FactBase f     -> UniqSM (LabelMap CmmBlock, FactBase f)-fixpointRewrite dir lattice do_block entries blockmap = loop start blockmap+fixpointRewrite dir lattice do_block entry blockmap = loop start blockmap   where     -- Sorting the blocks helps to minimize the number of times we need to     -- process blocks. For instance, for forward analysis we want to look at     -- blocks in reverse postorder. Also, see comments for sortBlocks.-    blocks     = sortBlocks dir entries blockmap+    blocks     = sortBlocks dir entry blockmap     num_blocks = length blocks     block_arr  = {-# SCC "block_arr_rewrite" #-}                  listArray (0, num_blocks - 1) blocks-    start      = {-# SCC "start_rewrite" #-} [0 .. num_blocks - 1]+    start      = {-# SCC "start_rewrite" #-}+                 IntSet.fromDistinctAscList [0 .. num_blocks - 1]     dep_blocks = {-# SCC "dep_blocks_rewrite" #-} mkDepBlocks dir blocks     join       = fact_join lattice @@ -205,8 +206,8 @@         -> LabelMap CmmBlock  -- ^ Rewritten blocks.         -> FactBase f         -- ^ Current facts.         -> UniqSM (LabelMap CmmBlock, FactBase f)-    loop []              !blocks1 !fbase1 = return (blocks1, fbase1)-    loop (index : todo1) !blocks1 !fbase1 = do+    loop todo !blocks1 !fbase1+      | Just (index, todo1) <- IntSet.minView todo = do         -- Note that we use the *original* block here. This is important.         -- We're optimistically rewriting blocks even before reaching the fixed         -- point, which means that the rewrite might be incorrect. So if the@@ -217,9 +218,10 @@             do_block block fbase1         let blocks2 = mapInsert (entryLabel new_block) new_block blocks1             (todo2, fbase2) = {-# SCC "mapFoldWithKey_rewrite" #-}-                mapFoldWithKey+                mapFoldlWithKey                     (updateFact join dep_blocks) (todo1, fbase1) out_facts         loop todo2 blocks2 fbase2+    loop _ !blocks1 !fbase1 = return (blocks1, fbase1)   {-@@ -265,20 +267,15 @@ -- | Sort the blocks into the right order for analysis. This means reverse -- postorder for a forward analysis. For the backward one, we simply reverse -- that (see Note [Backward vs forward analysis]).------ Note: We're using Hoopl's confusingly named `postorder_dfs_from` but AFAICS--- it returns the *reverse* postorder of the blocks (it visits blocks in the--- postorder and uses (:) to collect them, which gives the reverse of the--- visitation order). sortBlocks     :: NonLocal n-    => Direction -> [Label] -> LabelMap (Block n C C) -> [Block n C C]-sortBlocks direction entries blockmap =+    => Direction -> Label -> LabelMap (Block n C C) -> [Block n C C]+sortBlocks direction entry blockmap =     case direction of         Fwd -> fwd         Bwd -> reverse fwd   where-    fwd = postorder_dfs_from blockmap entries+    fwd = revPostorderFrom blockmap entry  -- Note [Backward vs forward analysis] --@@ -330,11 +327,11 @@ updateFact     :: JoinFun f     -> LabelMap IntSet+    -> (IntHeap, FactBase f)     -> Label     -> f -- out fact     -> (IntHeap, FactBase f)-    -> (IntHeap, FactBase f)-updateFact fact_join dep_blocks lbl new_fact (todo, fbase)+updateFact fact_join dep_blocks (todo, fbase) lbl new_fact   = case lookupFact lbl fbase of       Nothing ->           -- Note [No old fact]@@ -344,7 +341,7 @@               (NotChanged _) -> (todo, fbase)               (Changed f) -> let !z = mapInsert lbl f fbase in (changed, z)   where-    changed = IntSet.foldr insertIntHeap todo $+    changed = todo `IntSet.union`               mapFindWithDefault IntSet.empty lbl dep_blocks  {-@@ -378,6 +375,11 @@         , isJust fact         ] +joinFacts :: DataflowLattice f -> [f] -> f+joinFacts lattice facts  = foldl' join (fact_bot lattice) facts+  where+    join new old = getJoined $ fact_join lattice (OldFact old) (NewFact new)+ -- | Returns the joined facts for each label. mkFactBase :: DataflowLattice f -> [(Label, f)] -> FactBase f mkFactBase lattice = foldl' add mapEmpty@@ -436,19 +438,4 @@ joinBlocksOO b (BMiddle n) = blockSnoc b n joinBlocksOO b1 b2 = BCat b1 b2 --- -------------------------------------------------------------------------------- a Heap of Int---- We should really use a proper Heap here, but my attempts to make--- one have not succeeded in beating the simple ordered list.  Another--- alternative is IntSet (using deleteFindMin), but that was also--- slower than the ordered list in my experiments --SDM 25/1/2012--type IntHeap = [Int] -- ordered--insertIntHeap :: Int -> [Int] -> [Int]-insertIntHeap x [] = [x]-insertIntHeap x (y:ys)-  | x < y     = x : y : ys-  | x == y    = x : ys-  | otherwise = y : insertIntHeap x ys+type IntHeap = IntSet
cmm/Hoopl/Graph.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-}@@ -14,11 +15,12 @@     , labelsDefined     , mapGraph     , mapGraphBlocks-    , postorder_dfs_from+    , revPostorderFrom     ) where   import GhcPrelude+import Util  import Hoopl.Label import Hoopl.Block@@ -51,13 +53,14 @@ bodyList :: Body' block n -> [(Label,block n C C)] bodyList body = mapToList body -addBlock :: NonLocal thing-         => thing C C -> LabelMap (thing C C)-         -> LabelMap (thing C C)-addBlock b body-  | mapMember lbl body = error $ "duplicate label " ++ show lbl ++ " in graph"-  | otherwise          = mapInsert lbl b body-  where lbl = entryLabel b+addBlock+    :: (NonLocal block, HasDebugCallStack)+    => block C C -> LabelMap (block C C) -> LabelMap (block C C)+addBlock block body = mapAlter add lbl body+  where+    lbl = entryLabel block+    add Nothing = Just block+    add _ = error $ "duplicate label " ++ show lbl ++ " in graph"   -- ---------------------------------------------------------------------------@@ -109,9 +112,9 @@               -> LabelSet labelsDefined GNil      = setEmpty labelsDefined (GUnit{}) = setEmpty-labelsDefined (GMany _ body x) = mapFoldWithKey addEntry (exitLabel x) body-  where addEntry :: forall a. ElemOf LabelSet -> a -> LabelSet -> LabelSet-        addEntry label _ labels = setInsert label labels+labelsDefined (GMany _ body x) = mapFoldlWithKey addEntry (exitLabel x) body+  where addEntry :: forall a. LabelSet -> ElemOf LabelSet -> a -> LabelSet+        addEntry labels label _ = setInsert label labels         exitLabel :: MaybeO x (block n C O) -> LabelSet         exitLabel NothingO  = setEmpty         exitLabel (JustO b) = setSingleton (entryLabel b)@@ -119,22 +122,10 @@  ---------------------------------------------------------------- -class LabelsPtr l where-  targetLabels :: l -> [Label]--instance NonLocal n => LabelsPtr (n e C) where-  targetLabels n = successors n--instance LabelsPtr Label where-  targetLabels l = [l]--instance LabelsPtr LabelSet where-  targetLabels = setElems--instance LabelsPtr l => LabelsPtr [l] where-  targetLabels = concatMap targetLabels---- | This is the most important traversal over this data structure.  It drops+-- | Returns a list of blocks reachable from the provided Labels in the reverse+-- postorder.+--+-- This is the most important traversal over this data structure.  It drops -- unreachable code and puts blocks in an order that is good for solving forward -- dataflow problems quickly.  The reverse order is good for solving backward -- dataflow problems quickly.  The forward order is also reasonably good for@@ -143,59 +134,52 @@ -- that you would need a more serious analysis, probably based on dominators, to -- identify loop headers. ----- The ubiquity of 'postorder_dfs' is one reason for the ubiquity of the 'LGraph'--- representation, when for most purposes the plain 'Graph' representation is--- more mathematically elegant (but results in more complicated code).------ Here's an easy way to go wrong!  Consider+-- For forward analyses we want reverse postorder visitation, consider: -- @ --      A -> [B,C] --      B -> D --      C -> D -- @--- Then ordinary dfs would give [A,B,D,C] which has a back ref from C to D.--- Better to get [A,B,C,D]-+-- Postorder: [D, C, B, A] (or [D, B, C, A])+-- Reverse postorder: [A, B, C, D] (or [A, C, B, D])+-- This matters for, e.g., forward analysis, because we want to analyze *both*+-- B and C before we analyze D.+revPostorderFrom+  :: forall block.  (NonLocal block)+  => LabelMap (block C C) -> Label -> [block C C]+revPostorderFrom graph start = go start_worklist setEmpty []+  where+    start_worklist = lookup_for_descend start Nil --- | Traversal: 'postorder_dfs' returns a list of blocks reachable--- from the entry of enterable graph. The entry and exit are *not* included.--- The list has the following property:------      Say a "back reference" exists if one of a block's---      control-flow successors precedes it in the output list------      Then there are as few back references as possible------ The output is suitable for use in--- a forward dataflow problem.  For a backward problem, simply reverse--- the list.  ('postorder_dfs' is sufficiently tricky to implement that--- one doesn't want to try and maintain both forward and backward--- versions.)+    -- To compute the postorder we need to "visit" a block (mark as done)+    -- *after* visiting all its successors. So we need to know whether we+    -- already processed all successors of each block (and @NonLocal@ allows+    -- arbitrary many successors). So we use an explicit stack with an extra bit+    -- of information:+    -- * @ConsTodo@ means to explore the block if it wasn't visited before+    -- * @ConsMark@ means that all successors were already done and we can add+    --   the block to the result.+    --+    -- NOTE: We add blocks to the result list in postorder, but we *prepend*+    -- them (i.e., we use @(:)@), which means that the final list is in reverse+    -- postorder.+    go :: DfsStack (block C C) -> LabelSet -> [block C C] -> [block C C]+    go Nil                      !_           !result = result+    go (ConsMark block rest)    !wip_or_done !result =+        go rest wip_or_done (block : result)+    go (ConsTodo block rest)    !wip_or_done !result+        | entryLabel block `setMember` wip_or_done = go rest wip_or_done result+        | otherwise =+            let new_worklist =+                    foldr lookup_for_descend+                          (ConsMark block rest)+                          (successors block)+            in go new_worklist (setInsert (entryLabel block) wip_or_done) result -postorder_dfs_from_except :: forall block e . (NonLocal block, LabelsPtr e)-                          => LabelMap (block C C) -> e -> LabelSet -> [block C C]-postorder_dfs_from_except blocks b visited =- vchildren (get_children b) (\acc _visited -> acc) [] visited- where-   vnode :: block C C -> ([block C C] -> LabelSet -> a) -> [block C C] -> LabelSet -> a-   vnode block cont acc visited =-        if setMember id visited then-            cont acc visited-        else-            let cont' acc visited = cont (block:acc) visited in-            vchildren (get_children block) cont' acc (setInsert id visited)-      where id = entryLabel block-   vchildren :: forall a. [block C C] -> ([block C C] -> LabelSet -> a) -> [block C C] -> LabelSet -> a-   vchildren bs cont acc visited = next bs acc visited-      where next children acc visited =-                case children of []     -> cont acc visited-                                 (b:bs) -> vnode b (next bs) acc visited-   get_children :: forall l. LabelsPtr l => l -> [block C C]-   get_children block = foldr add_id [] $ targetLabels block-   add_id id rst = case lookupFact id blocks of-                      Just b -> b : rst-                      Nothing -> rst+    lookup_for_descend :: Label -> DfsStack (block C C) -> DfsStack (block C C)+    lookup_for_descend label wl+      | Just b <- mapLookup label graph = ConsTodo b wl+      | otherwise =+           error $ "Label that doesn't have a block?! " ++ show label -postorder_dfs_from-    :: (NonLocal block, LabelsPtr b) => LabelMap (block C C) -> b -> [block C C]-postorder_dfs_from blocks b = postorder_dfs_from_except blocks b setEmpty+data DfsStack a = ConsTodo a (DfsStack a) | ConsMark a (DfsStack a) | Nil
cmm/Hoopl/Label.hs view
@@ -2,34 +2,37 @@ {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveTraversable #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+ module Hoopl.Label     ( Label     , LabelMap     , LabelSet     , FactBase     , lookupFact-    , uniqueToLbl+    , mkHooplLabel     ) where  import GhcPrelude  import Outputable -import Hoopl.Collections -- TODO: This should really just use GHC's Unique and Uniq{Set,FM}-import Hoopl.Unique+import Hoopl.Collections  import Unique (Uniquable(..))+import TrieMap + ----------------------------------------------------------------------------- --              Label ----------------------------------------------------------------------------- -newtype Label = Label { lblToUnique :: Unique }+newtype Label = Label { lblToUnique :: Int }   deriving (Eq, Ord) -uniqueToLbl :: Unique -> Label-uniqueToLbl = Label+mkHooplLabel :: Int -> Label+mkHooplLabel = Label  instance Show Label where   show (Label n) = "L" ++ show n@@ -62,9 +65,10 @@   setIntersection (LS x) (LS y) = LS (setIntersection x y)   setIsSubsetOf (LS x) (LS y) = setIsSubsetOf x y -  setFold k z (LS s) = setFold (k . uniqueToLbl) z s+  setFoldl k z (LS s) = setFoldl (\a v -> k a (mkHooplLabel v)) z s+  setFoldr k z (LS s) = setFoldr (\v a -> k (mkHooplLabel v) a) z s -  setElems (LS s) = map uniqueToLbl (setElems s)+  setElems (LS s) = map mkHooplLabel (setElems s)   setFromList ks = LS (setFromList (map lblToUnique ks))  -----------------------------------------------------------------------------@@ -87,22 +91,25 @@   mapInsert (Label k) v (LM m) = LM (mapInsert k v m)   mapInsertWith f (Label k) v (LM m) = LM (mapInsertWith f k v m)   mapDelete (Label k) (LM m) = LM (mapDelete k m)+  mapAlter f (Label k) (LM m) = LM (mapAlter f k m)    mapUnion (LM x) (LM y) = LM (mapUnion x y)-  mapUnionWithKey f (LM x) (LM y) = LM (mapUnionWithKey (f . uniqueToLbl) x y)+  mapUnionWithKey f (LM x) (LM y) = LM (mapUnionWithKey (f . mkHooplLabel) x y)   mapDifference (LM x) (LM y) = LM (mapDifference x y)   mapIntersection (LM x) (LM y) = LM (mapIntersection x y)   mapIsSubmapOf (LM x) (LM y) = mapIsSubmapOf x y    mapMap f (LM m) = LM (mapMap f m)-  mapMapWithKey f (LM m) = LM (mapMapWithKey (f . uniqueToLbl) m)-  mapFold k z (LM m) = mapFold k z m-  mapFoldWithKey k z (LM m) = mapFoldWithKey (k . uniqueToLbl) z m+  mapMapWithKey f (LM m) = LM (mapMapWithKey (f . mkHooplLabel) m)+  mapFoldl k z (LM m) = mapFoldl k z m+  mapFoldr k z (LM m) = mapFoldr k z m+  mapFoldlWithKey k z (LM m) =+      mapFoldlWithKey (\a v -> k a (mkHooplLabel v)) z m   mapFilter f (LM m) = LM (mapFilter f m)    mapElems (LM m) = mapElems m-  mapKeys (LM m) = map uniqueToLbl (mapKeys m)-  mapToList (LM m) = [(uniqueToLbl k, v) | (k, v) <- mapToList m]+  mapKeys (LM m) = map mkHooplLabel (mapKeys m)+  mapToList (LM m) = [(mkHooplLabel k, v) | (k, v) <- mapToList m]   mapFromList assocs = LM (mapFromList [(lblToUnique k, v) | (k, v) <- assocs])   mapFromListWith f assocs = LM (mapFromListWith f [(lblToUnique k, v) | (k, v) <- assocs]) @@ -114,6 +121,14 @@  instance Outputable a => Outputable (LabelMap a) where   ppr = ppr . mapToList++instance TrieMap LabelMap where+  type Key LabelMap = Label+  emptyTM = mapEmpty+  lookupTM k m = mapLookup k m+  alterTM k f m = mapAlter f k m+  foldTM k m z = mapFoldr k z m+  mapTM f m = mapMap f m  ----------------------------------------------------------------------------- -- FactBase
− cmm/Hoopl/Unique.hs
@@ -1,93 +0,0 @@-{-# LANGUAGE DeriveFunctor #-}-{-# LANGUAGE DeriveTraversable #-}-{-# LANGUAGE DeriveFoldable #-}-{-# LANGUAGE TypeFamilies #-}-module Hoopl.Unique-    ( Unique-    , UniqueMap-    , UniqueSet-    , intToUnique-    ) where--import GhcPrelude--import qualified Data.IntMap as M-import qualified Data.IntSet as S--import Hoopl.Collections-----------------------------------------------------------------------------------              Unique--------------------------------------------------------------------------------type Unique = Int--intToUnique :: Int -> Unique-intToUnique = id---------------------------------------------------------------------------------- UniqueSet--newtype UniqueSet = US S.IntSet deriving (Eq, Ord, Show)--instance IsSet UniqueSet where-  type ElemOf UniqueSet = Unique--  setNull (US s) = S.null s-  setSize (US s) = S.size s-  setMember k (US s) = S.member k s--  setEmpty = US S.empty-  setSingleton k = US (S.singleton k)-  setInsert k (US s) = US (S.insert k s)-  setDelete k (US s) = US (S.delete k s)--  setUnion (US x) (US y) = US (S.union x y)-  setDifference (US x) (US y) = US (S.difference x y)-  setIntersection (US x) (US y) = US (S.intersection x y)-  setIsSubsetOf (US x) (US y) = S.isSubsetOf x y--  setFold k z (US s) = S.foldr k z s--  setElems (US s) = S.elems s-  setFromList ks = US (S.fromList ks)---------------------------------------------------------------------------------- UniqueMap--newtype UniqueMap v = UM (M.IntMap v)-  deriving (Eq, Ord, Show, Functor, Foldable, Traversable)--instance IsMap UniqueMap where-  type KeyOf UniqueMap = Unique--  mapNull (UM m) = M.null m-  mapSize (UM m) = M.size m-  mapMember k (UM m) = M.member k m-  mapLookup k (UM m) = M.lookup k m-  mapFindWithDefault def k (UM m) = M.findWithDefault def k m--  mapEmpty = UM M.empty-  mapSingleton k v = UM (M.singleton k v)-  mapInsert k v (UM m) = UM (M.insert k v m)-  mapInsertWith f k v (UM m) = UM (M.insertWith f k v m)-  mapDelete k (UM m) = UM (M.delete k m)--  mapUnion (UM x) (UM y) = UM (M.union x y)-  mapUnionWithKey f (UM x) (UM y) = UM (M.unionWithKey (f . intToUnique) x y)-  mapDifference (UM x) (UM y) = UM (M.difference x y)-  mapIntersection (UM x) (UM y) = UM (M.intersection x y)-  mapIsSubmapOf (UM x) (UM y) = M.isSubmapOf x y--  mapMap f (UM m) = UM (M.map f m)-  mapMapWithKey f (UM m) = UM (M.mapWithKey (f . intToUnique) m)-  mapFold k z (UM m) = M.foldr k z m-  mapFoldWithKey k z (UM m) = M.foldrWithKey (k . intToUnique) z m-  mapFilter f (UM m) = UM (M.filter f m)--  mapElems (UM m) = M.elems m-  mapKeys (UM m) = M.keys m-  mapToList (UM m) = M.toList m-  mapFromList assocs = UM (M.fromList assocs)-  mapFromListWith f assocs = UM (M.fromListWith f assocs)
cmm/MkGraph.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns, CPP, GADTs #-}+{-# LANGUAGE BangPatterns, GADTs #-}  module MkGraph   ( CmmAGraph, CmmAGraphScoped, CgStmt(..)@@ -21,7 +21,7 @@   ) where -import GhcPrelude (($),Int,Bool,Eq(..)) -- avoid importing (<*>)+import GhcPrelude hiding ( (<*>) ) -- avoid importing (<*>)  import BlockId import Cmm@@ -37,12 +37,7 @@ import OrdList import SMRep (ByteOff) import UniqSupply--import Control.Monad-import Data.List-import Data.Maybe--#include "HsVersions.h"+import Util   -----------------------------------------------------------------------------@@ -186,12 +181,10 @@ mkNop         = nilOL  mkComment    :: FastString -> CmmAGraph-#if defined(DEBUG)--- SDM: generating all those comments takes time, this saved about 4% for me-mkComment fs  = mkMiddle $ CmmComment fs-#else-mkComment _   = nilOL-#endif+mkComment fs+  -- SDM: generating all those comments takes time, this saved about 4% for me+  | debugIsOn = mkMiddle $ CmmComment fs+  | otherwise = nilOL  ---------- Assignment and store mkAssign     :: CmmReg  -> CmmExpr -> CmmAGraph
cmm/PprC.hs view
@@ -379,14 +379,10 @@     CmmReg reg      -> pprCastReg reg     CmmRegOff reg 0 -> pprCastReg reg -    CmmRegOff reg i-        | i < 0 && negate_ok -> pprRegOff (char '-') (-i)-        | otherwise          -> pprRegOff (char '+') i-      where-        pprRegOff op i' = pprCastReg reg <> op <> int i'-        negate_ok = negate (fromIntegral i :: Integer) <-                    fromIntegral (maxBound::Int)-                     -- overflow is undefined; see #7620+    -- CmmRegOff is an alias of MO_Add+    CmmRegOff reg i -> sdocWithDynFlags $ \dflags ->+                       pprCastReg reg <> char '+' <>+                       pprHexVal (fromIntegral i) (wordWidth dflags)      CmmMachOp mop args -> pprMachOpApp mop args @@ -495,7 +491,7 @@     CmmHighStackMark   -> panic "PprC printing high stack mark"     CmmLabel clbl      -> mkW_ <> pprCLabelAddr clbl     CmmLabelOff clbl i -> mkW_ <> pprCLabelAddr clbl <> char '+' <> int i-    CmmLabelDiffOff clbl1 _ i+    CmmLabelDiffOff clbl1 _ i _   -- non-word widths not supported via C         -- WARNING:         --  * the lit must occur in the info table clbl2         --  * clbl1 must be an SRT, a slow entry point or a large bitmap@@ -506,7 +502,7 @@  pprLit1 :: CmmLit -> SDoc pprLit1 lit@(CmmLabelOff _ _) = parens (pprLit lit)-pprLit1 lit@(CmmLabelDiffOff _ _ _) = parens (pprLit lit)+pprLit1 lit@(CmmLabelDiffOff _ _ _ _) = parens (pprLit lit) pprLit1 lit@(CmmFloat _ _)    = parens (pprLit lit) pprLit1 other = pprLit other @@ -538,13 +534,29 @@                             CmmStaticLit (CmmInt q W32) : rest)   where r = i .&. 0xffffffff         q = i `shiftR` 32+pprStatics dflags (CmmStaticLit (CmmInt a W32) :+                   CmmStaticLit (CmmInt b W32) : rest)+  | wordWidth dflags == W64+  = if wORDS_BIGENDIAN dflags+    then pprStatics dflags (CmmStaticLit (CmmInt ((shiftL a 32) .|. b) W64) :+                            rest)+    else pprStatics dflags (CmmStaticLit (CmmInt ((shiftL b 32) .|. a) W64) :+                            rest)+pprStatics dflags (CmmStaticLit (CmmInt a W16) :+                   CmmStaticLit (CmmInt b W16) : rest)+  | wordWidth dflags == W32+  = if wORDS_BIGENDIAN dflags+    then pprStatics dflags (CmmStaticLit (CmmInt ((shiftL a 16) .|. b) W32) :+                            rest)+    else pprStatics dflags (CmmStaticLit (CmmInt ((shiftL b 16) .|. a) W32) :+                            rest) pprStatics dflags (CmmStaticLit (CmmInt _ w) : _)   | w /= wordWidth dflags-  = panic "pprStatics: cannot emit a non-word-sized static literal"+  = pprPanic "pprStatics: cannot emit a non-word-sized static literal" (ppr w) pprStatics dflags (CmmStaticLit lit : rest)   = pprLit1 lit : pprStatics dflags rest pprStatics _ (other : _)-  = pprPanic "pprWord" (pprStatic other)+  = pprPanic "pprStatics: other" (pprStatic other)  pprStatic :: CmmStatic -> SDoc pprStatic s = case s of@@ -803,6 +815,7 @@         MO_U_QuotRem  {} -> unsupported         MO_U_QuotRem2 {} -> unsupported         MO_Add2       {} -> unsupported+        MO_AddWordC   {} -> unsupported         MO_SubWordC   {} -> unsupported         MO_AddIntC    {} -> unsupported         MO_SubIntC    {} -> unsupported@@ -1082,7 +1095,7 @@ te_Lit :: CmmLit -> TE () te_Lit (CmmLabel l) = te_lbl l te_Lit (CmmLabelOff l _) = te_lbl l-te_Lit (CmmLabelDiffOff l1 _ _) = te_lbl l1+te_Lit (CmmLabelDiffOff l1 _ _ _) = te_lbl l1 te_Lit _ = return ()  te_Stmt :: CmmNode e x -> TE ()
cmm/PprCmm.hs view
@@ -15,8 +15,8 @@ -- -- As such, this should be a well-defined syntax: we want it to look nice. -- Thus, we try wherever possible to use syntax defined in [1],--- "The C-- Reference Manual", http://www.cminusminus.org/. We differ--- slightly, in some cases. For one, we use I8 .. I64 for types, rather+-- "The C-- Reference Manual", http://www.cs.tufts.edu/~nr/c--/index.html. We+-- differ slightly, in some cases. For one, we use I8 .. I64 for types, rather -- than C--'s bits8 .. bits64. -- -- We try to ensure that all information available in the abstract@@ -108,7 +108,7 @@  pprTopInfo :: CmmTopInfo -> SDoc pprTopInfo (TopInfo {info_tbls=info_tbl, stack_info=stack_info}) =-  vcat [text "info_tbl: " <> ppr info_tbl,+  vcat [text "info_tbls: " <> ppr info_tbl,         text "stack_info: " <> ppr stack_info]  ----------------------------------------------------------@@ -141,8 +141,8 @@    = text "{" <> text "offset"   $$ nest 2 (vcat $ map ppr blocks)   $$ text "}"-  where blocks = postorderDfs g-    -- postorderDfs has the side-effect of discarding unreachable code,+  where blocks = revPostorder g+    -- revPostorder has the side-effect of discarding unreachable code,     -- so pretty-printed Cmm will omit any unreachable blocks.  This can     -- sometimes be confusing. @@ -185,9 +185,13 @@     pp_node :: SDoc     pp_node = sdocWithDynFlags $ \dflags -> case node of       -- label:-      CmmEntry id tscope -> ppr id <> colon <+>+      CmmEntry id tscope -> lbl <> colon <+>          (sdocWithDynFlags $ \dflags ->            ppUnless (gopt Opt_SuppressTicks dflags) (text "//" <+> ppr tscope))+          where+            lbl = if gopt Opt_SuppressUniques dflags+                then text "_lbl_"+                else ppr id        -- // text       CmmComment s -> text "//" <+> ftext s@@ -252,8 +256,8 @@                             , ppr l <> semi                             ]             def | Just l <- mbdef = hsep-                            [ text "default: goto"-                            , ppr l <> semi+                            [ text "default:"+                            , braces (text "goto" <+> ppr l <> semi)                             ]                 | otherwise = empty 
cmm/PprCmmDecl.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- ---------------------------------------------------------------------------- -- -- Pretty-printing of common Cmm types@@ -15,8 +13,8 @@ -- -- As such, this should be a well-defined syntax: we want it to look nice. -- Thus, we try wherever possible to use syntax defined in [1],--- "The C-- Reference Manual", http://www.cminusminus.org/. We differ--- slightly, in some cases. For one, we use I8 .. I64 for types, rather+-- "The C-- Reference Manual", http://www.cs.tufts.edu/~nr/c--/index.html. We+-- differ slightly, in some cases. For one, we use I8 .. I64 for types, rather -- than C--'s bits8 .. bits64. -- -- We try to ensure that all information available in the abstract@@ -54,7 +52,6 @@  -- Temp Jan08 import SMRep-#include "rts/storage/FunTypes.h"   pprCmms :: (Outputable info, Outputable g)@@ -118,18 +115,15 @@ pprInfoTable :: CmmInfoTable -> SDoc pprInfoTable (CmmInfoTable { cit_lbl = lbl, cit_rep = rep                            , cit_prof = prof_info-                           , cit_srt = _srt })-  = vcat [ text "label:" <+> ppr lbl-         , text "rep:" <> ppr rep+                           , cit_srt = srt })+  = vcat [ text "label: " <> ppr lbl+         , text "rep: " <> ppr rep          , case prof_info of              NoProfilingInfo -> empty-             ProfilingInfo ct cd -> vcat [ text "type:" <+> pprWord8String ct-                                         , text "desc: " <> pprWord8String cd ] ]--instance Outputable C_SRT where-  ppr NoC_SRT = text "_no_srt_"-  ppr (C_SRT label off bitmap)-      = parens (ppr label <> comma <> ppr off <> comma <> ppr bitmap)+             ProfilingInfo ct cd ->+               vcat [ text "type: " <> pprWord8String ct+                    , text "desc: " <> pprWord8String cd ]+         , text "srt: " <> ppr srt ]  instance Outputable ForeignHint where   ppr NoHint     = empty
cmm/PprCmmExpr.hs view
@@ -13,8 +13,8 @@ -- -- As such, this should be a well-defined syntax: we want it to look nice. -- Thus, we try wherever possible to use syntax defined in [1],--- "The C-- Reference Manual", http://www.cminusminus.org/. We differ--- slightly, in some cases. For one, we use I8 .. I64 for types, rather+-- "The C-- Reference Manual", http://www.cs.tufts.edu/~nr/c--/index.html. We+-- differ slightly, in some cases. For one, we use I8 .. I64 for types, rather -- than C--'s bits8 .. bits64. -- -- We try to ensure that all information available in the abstract@@ -43,6 +43,7 @@ import CmmExpr  import Outputable+import DynFlags  import Data.Maybe import Numeric ( fromRat )@@ -198,7 +199,7 @@     CmmVec lits        -> char '<' <> commafy (map pprLit lits) <> char '>'     CmmLabel clbl      -> ppr clbl     CmmLabelOff clbl i -> ppr clbl <> ppr_offset i-    CmmLabelDiffOff clbl1 clbl2 i -> ppr clbl1 <> char '-'+    CmmLabelDiffOff clbl1 clbl2 i _ -> ppr clbl1 <> char '-'                                   <> ppr clbl2 <> ppr_offset i     CmmBlock id        -> ppr id     CmmHighStackMark -> text "<highSp>"@@ -226,14 +227,18 @@ -- We only print the type of the local reg if it isn't wordRep -- pprLocalReg :: LocalReg -> SDoc-pprLocalReg (LocalReg uniq rep)+pprLocalReg (LocalReg uniq rep) = sdocWithDynFlags $ \dflags -> --   = ppr rep <> char '_' <> ppr uniq -- Temp Jan08-   = char '_' <> ppr uniq <>+    char '_' <> pprUnique dflags uniq <>        (if isWord32 rep -- && not (isGcPtrType rep) -- Temp Jan08               -- sigh                     then dcolon <> ptr <> ppr rep                     else dcolon <> ptr <> ppr rep)    where+     pprUnique dflags unique =+        if gopt Opt_SuppressUniques dflags+            then text "_locVar_"+            else ppr unique      ptr = empty          --if isGcPtrType rep          --      then doubleQuotes (text "ptr")
cmm/SMRep.hs view
@@ -47,9 +47,6 @@         pprWord8String, stringToWord8s     ) where -#include "HsVersions.h"-#include "MachDeps.h"- import GhcPrelude  import BasicTypes( ConTagZ )@@ -282,10 +279,10 @@ isConRep _                        = False  isThunkRep :: SMRep -> Bool-isThunkRep (HeapRep _ _ _ Thunk{})         = True+isThunkRep (HeapRep _ _ _ Thunk)           = True isThunkRep (HeapRep _ _ _ ThunkSelector{}) = True-isThunkRep (HeapRep _ _ _ BlackHole{})     = True-isThunkRep (HeapRep _ _ _ IndStatic{})     = True+isThunkRep (HeapRep _ _ _ BlackHole)       = True+isThunkRep (HeapRep _ _ _ IndStatic)       = True isThunkRep _                               = False  isFunRep :: SMRep -> Bool@@ -389,10 +386,10 @@  closureTypeHdrSize :: DynFlags -> ClosureTypeInfo -> WordOff closureTypeHdrSize dflags ty = case ty of-                  Thunk{}         -> thunkHdrSize dflags+                  Thunk           -> thunkHdrSize dflags                   ThunkSelector{} -> thunkHdrSize dflags-                  BlackHole{}     -> thunkHdrSize dflags-                  IndStatic{}     -> thunkHdrSize dflags+                  BlackHole       -> thunkHdrSize dflags+                  IndStatic       -> thunkHdrSize dflags                   _               -> fixedHdrSizeW dflags         -- All thunks use thunkHdrSize, even if they are non-updatable.         -- this is because we don't have separate closure types for@@ -451,21 +448,19 @@       HeapRep False 0 2 Fun{} -> FUN_0_2       HeapRep False _ _ Fun{} -> FUN -      HeapRep False 1 0 Thunk{} -> THUNK_1_0-      HeapRep False 0 1 Thunk{} -> THUNK_0_1-      HeapRep False 2 0 Thunk{} -> THUNK_2_0-      HeapRep False 1 1 Thunk{} -> THUNK_1_1-      HeapRep False 0 2 Thunk{} -> THUNK_0_2-      HeapRep False _ _ Thunk{} -> THUNK+      HeapRep False 1 0 Thunk -> THUNK_1_0+      HeapRep False 0 1 Thunk -> THUNK_0_1+      HeapRep False 2 0 Thunk -> THUNK_2_0+      HeapRep False 1 1 Thunk -> THUNK_1_1+      HeapRep False 0 2 Thunk -> THUNK_0_2+      HeapRep False _ _ Thunk -> THUNK        HeapRep False _ _ ThunkSelector{} ->  THUNK_SELECTOR -      HeapRep True _ _ Fun{}    -> FUN_STATIC-      HeapRep True _ _ Thunk{}  -> THUNK_STATIC--      HeapRep False _ _ BlackHole{} -> BLACKHOLE--      HeapRep False _ _ IndStatic{} -> IND_STATIC+      HeapRep True _ _ Fun{}      -> FUN_STATIC+      HeapRep True _ _ Thunk      -> THUNK_STATIC+      HeapRep False _ _ BlackHole -> BLACKHOLE+      HeapRep False _ _ IndStatic -> IND_STATIC        _ -> panic "rtsClosureType" 
codeGen/CgUtils.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, GADTs #-}+{-# LANGUAGE GADTs #-}  ----------------------------------------------------------------------------- --@@ -10,8 +10,6 @@  module CgUtils ( fixStgRegisters ) where -#include "HsVersions.h"- import GhcPrelude  import CodeGen.Platform@@ -118,7 +116,7 @@ get_Regtable_addr_from_offset :: DynFlags -> CmmType -> Int -> CmmExpr get_Regtable_addr_from_offset dflags _ offset =     if haveRegBase (targetPlatform dflags)-    then CmmRegOff (CmmGlobal BaseReg) offset+    then CmmRegOff baseReg offset     else regTableOffset dflags offset  -- | Fixup global registers so that they assign to locations within the
codeGen/StgCmmBind.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- ----------------------------------------------------------------------------- -- -- Stg to C-- code generation: bindings@@ -15,8 +13,6 @@         pushUpdateFrame, emitUpdateFrame   ) where -#include "HsVersions.h"- import GhcPrelude hiding ((<*>))  import StgCmmExpr@@ -24,7 +20,7 @@ import StgCmmEnv import StgCmmCon import StgCmmHeap-import StgCmmProf (curCCS, ldvEnterClosure, enterCostCentreFun, enterCostCentreThunk,+import StgCmmProf (ldvEnterClosure, enterCostCentreFun, enterCostCentreThunk,                    initUpdFrameProf) import StgCmmTicky import StgCmmLayout@@ -99,19 +95,17 @@          emitDataLits closure_label closure_rep          return () -  gen_code dflags lf_info closure_label-   = do {     -- LAY OUT THE OBJECT-          let name = idName id+  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 -              caffy         = idCafInfo id-              info_tbl      = mkCmmInfo closure_info -- XXX short-cut-              closure_rep   = mkStaticClosureFields dflags info_tbl ccs caffy []+        -- 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. -                 -- BUILD THE OBJECT, AND GENERATE INFO TABLE (IF NECESSARY)-        ; emitDataLits closure_label closure_rep         ; let fv_details :: [(NonVoid Id, ByteOff)]               header = if isLFThunk lf_info then ThunkHeader else StdHeader               (_, _, fv_details) = mkVirtHeapOffsets dflags header []@@ -368,10 +362,10 @@          -- BUILD THE OBJECT --      ; (use_cc, blame_cc) <- chooseDynCostCentres cc args body-        ; let use_cc = curCCS; blame_cc = curCCS+        ; 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+        ; 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) @@ -407,11 +401,11 @@                                      descr  --  ; (use_cc, blame_cc) <- chooseDynCostCentres cc [{- no args-}] body-  ; let use_cc = curCCS; blame_cc = curCCS+  ; let use_cc = cccsExpr; blame_cc = cccsExpr           -- BUILD THE OBJECT-  ; let info_tbl = mkCmmInfo closure_info+  ; 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 @@ -467,7 +461,7 @@       \(_, node, _) -> thunkCode cl_info fv_details cc node arity body    where      lf_info  = closureLFInfo cl_info-     info_tbl = mkCmmInfo 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@@ -478,7 +472,7 @@          ; let              lf_info  = closureLFInfo cl_info-             info_tbl = mkCmmInfo cl_info+             info_tbl = mkCmmInfo cl_info bndr cc          -- Emit the main entry code         ; emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args $@@ -634,8 +628,7 @@              -- work with profiling.    when eager_blackholing $ do-    emitStore (cmmOffsetW dflags node (fixedHdrSizeW dflags))-                  (CmmReg (CmmGlobal CurrentTSO))+    emitStore (cmmOffsetW dflags node (fixedHdrSizeW dflags)) currentTSOExpr     emitPrimCall [] MO_WriteBarrier []     emitStore node (CmmReg (CmmGlobal EagerBlackholeInfo)) @@ -720,7 +713,7 @@                                     ForeignLabelInExternalPackage IsFunction   ; bh <- newTemp (bWord dflags)   ; emitRtsCallGen [(bh,AddrHint)] newCAF_lbl-      [ (CmmReg (CmmGlobal BaseReg),  AddrHint),+      [ (baseExpr,  AddrHint),         (CmmReg (CmmLocal node), AddrHint) ]       False 
codeGen/StgCmmClosure.hs view
@@ -27,7 +27,7 @@         mkApLFInfo, mkLFImported, mkLFArgument, mkLFLetNoEscape,         mkLFStringLit,         lfDynTag,-        maybeIsLFCon, isLFThunk, isLFReEntrant, lfUpdatable,+        isLFThunk, isLFReEntrant, lfUpdatable,          -- * Used by other modules         CgLoc(..), SelfLoopInfo, CallMethod(..),@@ -73,6 +73,7 @@ import Cmm import PprCmmExpr() +import CostCentre import BlockId import CLabel import Id@@ -361,18 +362,13 @@ isSmallFamily :: DynFlags -> Int -> Bool isSmallFamily dflags fam_size = fam_size <= mAX_PTR_TAG dflags --- | Faster version of isSmallFamily if you haven't computed the size yet.-isSmallFamilyTyCon :: DynFlags -> TyCon -> Bool-isSmallFamilyTyCon dflags tycon =-  tyConFamilySizeAtMost tycon (mAX_PTR_TAG dflags)- tagForCon :: DynFlags -> DataCon -> DynTag tagForCon dflags con-  | isSmallFamilyTyCon dflags tycon = con_tag-  | otherwise                       = 1+  | isSmallFamily dflags fam_size = con_tag+  | otherwise                     = 1   where     con_tag  = dataConTag con -- NB: 1-indexed-    tycon = dataConTyCon con+    fam_size = tyConFamilySize (dataConTyCon con)  tagForArity :: DynFlags -> RepArity -> DynTag tagForArity dflags arity@@ -391,11 +387,6 @@ --                Observing LambdaFormInfo ----------------------------------------------------------------------------- ---------------maybeIsLFCon :: LambdaFormInfo -> Maybe DataCon-maybeIsLFCon (LFCon con) = Just con-maybeIsLFCon _ = Nothing- ------------ isLFThunk :: LambdaFormInfo -> Bool isLFThunk (LFThunk {})  = True@@ -755,12 +746,15 @@     }  -- | Convert from 'ClosureInfo' to 'CmmInfoTable'.-mkCmmInfo :: ClosureInfo -> CmmInfoTable-mkCmmInfo ClosureInfo {..}+mkCmmInfo :: ClosureInfo -> Id -> CostCentreStack -> CmmInfoTable+mkCmmInfo ClosureInfo {..} id ccs   = CmmInfoTable { cit_lbl  = closureInfoLabel                  , cit_rep  = closureSMRep                  , cit_prof = closureProf-                 , cit_srt  = NoC_SRT }+                 , cit_srt  = Nothing+                 , cit_clo  = if isStaticRep closureSMRep+                                then Just (id,ccs)+                                else Nothing }  -------------------------------------- --        Building ClosureInfos@@ -1045,7 +1039,8 @@  = CmmInfoTable { cit_lbl  = info_lbl                 , cit_rep  = sm_rep                 , cit_prof = prof-                , cit_srt  = NoC_SRT }+                , cit_srt  = Nothing+                , cit_clo  = Nothing }  where    name = dataConName data_con    info_lbl = mkConInfoTableLabel name NoCafRefs@@ -1068,14 +1063,16 @@   = CmmInfoTable { cit_lbl  = mkCAFBlackHoleInfoTableLabel                  , cit_rep  = blackHoleRep                  , cit_prof = NoProfilingInfo-                 , cit_srt  = NoC_SRT }+                 , cit_srt  = Nothing+                 , cit_clo  = Nothing }  indStaticInfoTable :: CmmInfoTable indStaticInfoTable   = CmmInfoTable { cit_lbl  = mkIndStaticInfoLabel                  , cit_rep  = indStaticRep                  , cit_prof = NoProfilingInfo-                 , cit_srt  = NoC_SRT }+                 , cit_srt  = Nothing+                 , cit_clo  = Nothing }  staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool -- A static closure needs a link field to aid the GC when traversing@@ -1086,4 +1083,4 @@ -- of the SRT. staticClosureNeedsLink has_srt CmmInfoTable{ cit_rep = smrep }   | isConRep smrep         = not (isStaticNoCafCon smrep)-  | otherwise              = has_srt -- needsSRT (cit_srt info_tbl)+  | otherwise              = has_srt
codeGen/StgCmmCon.hs view
@@ -28,9 +28,9 @@ import StgCmmLayout import StgCmmUtils import StgCmmClosure-import StgCmmProf ( curCCS )  import CmmExpr+import CmmUtils import CLabel import MkGraph import SMRep@@ -86,8 +86,10 @@              mk_payload (Padding len _) = return (CmmInt 0 (widthFromBytes len))             mk_payload (FieldOff arg _) = do-                CmmLit lit <- getArgAmode arg-                return lit+                amode <- getArgAmode arg+                case amode of+                  CmmLit lit -> return lit+                  _          -> panic "StgCmmCon.cgTopRhsCon"              nonptr_wds = tot_wds - ptr_wds @@ -198,7 +200,7 @@ buildDynCon' dflags platform binder _ _cc con [arg]   | maybeIntLikeCon con   , platformOS platform /= OSMinGW32 || not (positionIndependent dflags)-  , NonVoid (StgLitArg (MachInt val)) <- arg+  , 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")@@ -245,7 +247,7 @@           ; return (mkRhsInit dflags reg lf_info hp_plus_n) }     where       use_cc      -- cost-centre to stick in the object-        | isCurrentCCS ccs = curCCS+        | isCurrentCCS ccs = cccsExpr         | otherwise        = panic "buildDynCon: non-current CCS not implemented"        blame_cc = use_cc -- cost-centre on which to blame the alloc (same)
codeGen/StgCmmExpr.hs view
@@ -1,5 +1,4 @@ {-# LANGUAGE CPP #-}-{-# OPTIONS_GHC -fno-warn-unused-do-bind #-}  ----------------------------------------------------------------------------- --@@ -410,7 +409,8 @@        ; v_info <- getCgIdInfo v        ; emitAssign (CmmLocal (idToReg dflags (NonVoid bndr)))                     (idInfoToAmode v_info)-       ; bindArgToReg (NonVoid bndr)+       -- Add bndr to the environment+       ; _ <- bindArgToReg (NonVoid bndr)        ; cgAlts (NoGcInAlts,AssignedDirectly) (NonVoid bndr) alt_type alts }   where     reps_compatible = ((==) `on` (primRepSlot . idPrimRep)) v bndr@@ -436,7 +436,8 @@ cgCase scrut@(StgApp v []) _ (PrimAlt _) _   = do { dflags <- getDynFlags        ; mb_cc <- maybeSaveCostCentre True-       ; withSequel (AssignTo [idToReg dflags (NonVoid v)] False) (cgExpr scrut)+       ; _ <- withSequel+                  (AssignTo [idToReg dflags (NonVoid v)] False) (cgExpr scrut)        ; restoreCurrentCostCentre mb_cc        ; emitComment $ mkFastString "should be unreachable code"        ; l <- newBlockId
codeGen/StgCmmForeign.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- ----------------------------------------------------------------------------- -- -- Code generation for foreign calls.@@ -20,12 +18,10 @@   emitCloseNursery,  ) where -#include "HsVersions.h"- import GhcPrelude hiding( succ, (<*>) )  import StgSyn-import StgCmmProf (storeCurCCS, ccsType, curCCS)+import StgCmmProf (storeCurCCS, ccsType) import StgCmmEnv import StgCmmMonad import StgCmmUtils@@ -287,7 +283,7 @@   close_nursery <- closeNursery dflags tso   pure $ catAGraphs [     -- tso = CurrentTSO;-    mkAssign (CmmLocal tso) stgCurrentTSO,+    mkAssign (CmmLocal tso) currentTSOExpr,     -- tso->stackobj->sp = Sp;     mkStore (cmmOffset dflags                        (CmmLoad (cmmOffset dflags@@ -295,11 +291,11 @@                                            (tso_stackobj dflags))                                 (bWord dflags))                        (stack_SP dflags))-            stgSp,+            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)) curCCS+        mkStore (cmmOffset dflags (CmmReg (CmmLocal tso)) (tso_CCCS dflags)) cccsExpr       else mkNop     ] @@ -308,7 +304,7 @@   dflags <- getDynFlags   tso <- newTemp (bWord dflags)   code <- closeNursery dflags tso-  emit $ mkAssign (CmmLocal tso) stgCurrentTSO <*> code+  emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code  {- | @closeNursery dflags tso@ produces code to close the nursery.@@ -336,14 +332,14 @@   let tsoreg  = CmmLocal tso   cnreg      <- CmmLocal <$> newTemp (bWord df)   pure $ catAGraphs [-    mkAssign cnreg stgCurrentNursery,+    mkAssign cnreg currentNurseryExpr,      -- CurrentNursery->free = Hp+1;-    mkStore (nursery_bdescr_free df cnreg) (cmmOffsetW df stgHp 1),+    mkStore (nursery_bdescr_free df cnreg) (cmmOffsetW df hpExpr 1),      let alloc =            CmmMachOp (mo_wordSub df)-              [ cmmOffsetW df stgHp 1+              [ cmmOffsetW df hpExpr 1               , CmmLoad (nursery_bdescr_start df cnreg) (bWord df)               ] @@ -370,18 +366,18 @@   open_nursery <- openNursery dflags tso   pure $ catAGraphs [     -- tso = CurrentTSO;-    mkAssign (CmmLocal tso) stgCurrentTSO,+    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 sp (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_SP dflags)) (bWord dflags)),+    mkAssign spReg (CmmLoad (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_SP dflags)) (bWord dflags)),     -- SpLim = stack->stack + RESERVED_STACK_WORDS;-    mkAssign spLim (cmmOffsetW dflags (cmmOffset dflags (CmmReg (CmmLocal stack)) (stack_STACK dflags))+    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 hpAlloc (zeroExpr dflags),+    mkAssign hpAllocReg (zeroExpr dflags),     open_nursery,     -- and load the current cost centre stack from the TSO when profiling:     if gopt Opt_SccProfilingOn dflags@@ -397,7 +393,7 @@   dflags <- getDynFlags   tso <- newTemp (bWord dflags)   code <- openNursery dflags tso-  emit $ mkAssign (CmmLocal tso) stgCurrentTSO <*> code+  emit $ mkAssign (CmmLocal tso) currentTSOExpr <*> code  {- | @openNursery dflags tso@ produces code to open the nursery. A local register@@ -408,8 +404,8 @@ @    tso = CurrentTSO;    cn = CurrentNursery;-   bdfree = CurrentNuresry->free;-   bdstart = CurrentNuresry->start;+   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@@ -439,17 +435,17 @@   -- what code we generate, look at the assembly for   -- stg_returnToStackTop in rts/StgStartup.cmm.   pure $ catAGraphs [-     mkAssign cnreg stgCurrentNursery,+     mkAssign cnreg currentNurseryExpr,      mkAssign bdfreereg  (CmmLoad (nursery_bdescr_free df cnreg)  (bWord df)),       -- Hp = CurrentNursery->free - 1;-     mkAssign hp (cmmOffsetW df (CmmReg bdfreereg) (-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 hpLim+     mkAssign hpLimReg          (cmmOffsetExpr df              (CmmReg bdstartreg)              (cmmOffset df@@ -495,21 +491,6 @@  closureField :: DynFlags -> ByteOff -> ByteOff closureField dflags off = off + fixedHdrSize dflags--stgSp, stgHp, stgCurrentTSO, stgCurrentNursery :: CmmExpr-stgSp             = CmmReg sp-stgHp             = CmmReg hp-stgCurrentTSO     = CmmReg currentTSO-stgCurrentNursery = CmmReg currentNursery--sp, spLim, hp, hpLim, currentTSO, currentNursery, hpAlloc :: CmmReg-sp                = CmmGlobal Sp-spLim             = CmmGlobal SpLim-hp                = CmmGlobal Hp-hpLim             = CmmGlobal HpLim-currentTSO        = CmmGlobal CurrentTSO-currentNursery    = CmmGlobal CurrentNursery-hpAlloc           = CmmGlobal HpAlloc  -- ----------------------------------------------------------------------------- -- For certain types passed to foreign calls, we adjust the actual
codeGen/StgCmmHeap.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- ----------------------------------------------------------------------------- -- -- Stg to C--: heap management functions@@ -22,8 +20,6 @@         emitSetDynHdr     ) where -#include "HsVersions.h"- import GhcPrelude hiding ((<*>))  import StgSyn@@ -149,7 +145,7 @@   where     header :: DynFlags -> [CmmExpr]     header dflags = [info_ptr] ++ dynProfHdr dflags ccs-        -- ToDof: Parallel stuff+        -- ToDo: Parallel stuff         -- No ticky header  -- Store the item (expr,off) in base[off]@@ -603,7 +599,7 @@   let     Just alloc_lit = mb_alloc_lit -    bump_hp   = cmmOffsetExprB dflags (CmmReg hpReg) 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@@ -617,10 +613,9 @@     -- 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)-                  [CmmReg hpReg, CmmReg (CmmGlobal HpLim)]+    hp_oflo = CmmMachOp (mo_wordUGt dflags) [hpExpr, hpLimExpr] -    alloc_n = mkAssign (CmmGlobal HpAlloc) alloc_lit+    alloc_n = mkAssign hpAllocReg alloc_lit    case mb_stk_hwm of     Nothing -> return ()@@ -645,7 +640,7 @@       when (checkYield && not (gopt Opt_OmitYields dflags)) $ do          -- Yielding if HpLim == 0          let yielding = CmmMachOp (mo_wordEq dflags)-                                  [CmmReg (CmmGlobal HpLim),+                                  [CmmReg hpLimReg,                                    CmmLit (zeroCLit dflags)]          emit =<< mkCmmIfGoto' yielding gc_id (Just False) 
codeGen/StgCmmLayout.hs view
@@ -40,7 +40,6 @@ import StgCmmTicky import StgCmmMonad import StgCmmUtils-import StgCmmProf (curCCS)  import MkGraph import SMRep@@ -374,7 +373,7 @@      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 curCCS)]+    save_cccs  = [(N, Just (mkLblExpr save_cccs_lbl)), (N, Just cccsExpr)]     save_cccs_lbl = mkCmmRetInfoLabel rtsUnitId (fsLit "stg_restore_cccs")  -------------------------------------------------------------------------
codeGen/StgCmmMonad.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, GADTs, UnboxedTuples #-}+{-# LANGUAGE GADTs, UnboxedTuples #-}  ----------------------------------------------------------------------------- --@@ -29,7 +29,7 @@          mkCall, mkCmmCall, -        forkClosureBody, forkLneBody, forkAlts, codeOnly,+        forkClosureBody, forkLneBody, forkAlts, forkAltPair, codeOnly,          ConTagZ, @@ -58,8 +58,6 @@         CgInfoDownwards(..), CgState(..)        -- non-abstract     ) where -#include "HsVersions.h"- import GhcPrelude hiding( sequence, succ )  import Cmm@@ -79,6 +77,7 @@ import UniqSupply import FastString import Outputable+import Util  import Control.Monad import Data.List@@ -637,6 +636,15 @@                 -- 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@@ -696,11 +704,9 @@                   emitCgStmt (CgLabel id tscope)  emitComment :: FastString -> FCode ()-#if 0 /* def DEBUG */-emitComment s = emitCgStmt (CgStmt (CmmComment s))-#else-emitComment _ = return ()-#endif+emitComment s+  | debugIsOn = emitCgStmt (CgStmt (CmmComment s))+  | otherwise = return ()  emitTick :: CmmTickish -> FCode () emitTick = emitCgStmt . CgStmt . CmmTick
codeGen/StgCmmPrim.hs view
@@ -1,4 +1,6 @@ {-# LANGUAGE CPP #-}+-- emitPrimOp is quite large+{-# OPTIONS_GHC -fmax-pmcheck-iterations=4000000 #-}  ---------------------------------------------------------------------------- --@@ -26,7 +28,7 @@ import StgCmmUtils import StgCmmTicky import StgCmmHeap-import StgCmmProf ( costCentreFrom, curCCS )+import StgCmmProf ( costCentreFrom )  import DynFlags import Platform@@ -192,7 +194,7 @@  shouldInlinePrimOp dflags CloneArrayOp [src, src_off, (CmmLit (CmmInt n w))]   | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneArray mkMAP_FROZEN_infoLabel res src src_off (fromInteger n)+      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) =@@ -200,7 +202,7 @@  shouldInlinePrimOp dflags FreezeArrayOp [src, src_off, (CmmLit (CmmInt n w))]   | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneArray mkMAP_FROZEN_infoLabel res src src_off (fromInteger n)+      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) =@@ -225,7 +227,7 @@  shouldInlinePrimOp dflags CloneSmallArrayOp [src, src_off, (CmmLit (CmmInt n w))]   | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n)+      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) =@@ -233,7 +235,7 @@  shouldInlinePrimOp dflags FreezeSmallArrayOp [src, src_off, (CmmLit (CmmInt n w))]   | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) =-      Just $ \ [res] -> emitCloneSmallArray mkSMAP_FROZEN_infoLabel res src src_off (fromInteger n)+      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) =@@ -281,7 +283,7 @@     emitCCall         [(res,NoHint)]         (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))-        [(CmmReg (CmmGlobal BaseReg), AddrHint), (arg,AddrHint)]+        [(baseExpr, AddrHint), (arg,AddrHint)]  emitPrimOp dflags [res] SparkOp [arg]   = do@@ -293,7 +295,7 @@         emitCCall             [(tmp2,NoHint)]             (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction)))-            [(CmmReg (CmmGlobal BaseReg), AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)]+            [(baseExpr, AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)]         emitAssign (CmmLocal res) (CmmReg (CmmLocal tmp))  emitPrimOp dflags [res] GetCCSOfOp [arg]@@ -304,8 +306,11 @@      | otherwise                      = CmmLit (zeroCLit dflags)  emitPrimOp _ [res] GetCurrentCCSOp [_dummy_arg]-   = emitAssign (CmmLocal res) curCCS+   = 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)) @@ -317,7 +322,7 @@         emitCCall                 [{-no results-}]                 (CmmLit (CmmLabel mkDirty_MUT_VAR_Label))-                [(CmmReg (CmmGlobal BaseReg), AddrHint), (mutv,AddrHint)]+                [(baseExpr, AddrHint), (mutv,AddrHint)]  --  #define sizzeofByteArrayzh(r,a) \ --     r = ((StgArrBytes *)(a))->bytes@@ -378,20 +383,20 @@  --  #define unsafeFreezzeArrayzh(r,a) --      {---        SET_INFO((StgClosure *)a,&stg_MUT_ARR_PTRS_FROZEN0_info);+--        SET_INFO((StgClosure *)a,&stg_MUT_ARR_PTRS_FROZEN_DIRTY_info); --        r = a; --      } emitPrimOp _      [res] UnsafeFreezeArrayOp [arg]    = emit $ catAGraphs-   [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN0_infoLabel)),+   [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN_DIRTY_infoLabel)),      mkAssign (CmmLocal res) arg ] emitPrimOp _      [res] UnsafeFreezeArrayArrayOp [arg]    = emit $ catAGraphs-   [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN0_infoLabel)),+   [ setInfo arg (CmmLit (CmmLabel mkMAP_FROZEN_DIRTY_infoLabel)),      mkAssign (CmmLocal res) arg ] emitPrimOp _      [res] UnsafeFreezeSmallArrayOp [arg]    = emit $ catAGraphs-   [ setInfo arg (CmmLit (CmmLabel mkSMAP_FROZEN0_infoLabel)),+   [ setInfo arg (CmmLit (CmmLabel mkSMAP_FROZEN_DIRTY_infoLabel)),      mkAssign (CmmLocal res) arg ]  --  #define unsafeFreezzeByteArrayzh(r,a)       r=(a)@@ -516,6 +521,40 @@ 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@@ -554,6 +593,23 @@ 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@@ -851,6 +907,11 @@                          || 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))@@ -987,17 +1048,64 @@                    (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-    [ -- Put the result into 'res_r'.-      mkAssign (CmmLocal res_r) $-        CmmMachOp (mo_wordSub dflags) [aa, bb]-      -- Set 'res_c' to 1 if 'bb > aa' and to 0 otherwise.-    , mkAssign (CmmLocal res_c) $-        CmmMachOp (mo_wordUGt dflags) [bb, aa]-    ]+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@@ -1730,7 +1838,7 @@      let hdr_size = fixedHdrSize dflags -    base <- allocHeapClosure rep info_ptr curCCS+    base <- allocHeapClosure rep info_ptr cccsExpr                      [ (mkIntExpr dflags n,                         hdr_size + oFFSET_StgArrBytes_bytes dflags)                      ]@@ -1821,10 +1929,9 @@     -- TODO: Optimize branch for common case of no aliasing.     copy src dst dst_p src_p bytes = do         dflags <- getDynFlags-        [moveCall, cpyCall] <- forkAlts [-            getCode $ emitMemmoveCall dst_p src_p bytes 1,-            getCode $ emitMemcpyCall  dst_p src_p bytes 1-            ]+        (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@@ -1898,12 +2005,12 @@         (mkIntExpr dflags (nonHdrSize dflags rep))         (zeroExpr dflags) -    base <- allocHeapClosure rep info_ptr curCCS payload+    base <- allocHeapClosure rep info_ptr cccsExpr payload      arr <- CmmLocal `fmap` newTemp (bWord dflags)     emit $ mkAssign arr base -    -- Initialise all elements of the the array+    -- Initialise all elements of the array     p <- assignTemp $ cmmOffsetB dflags (CmmReg arr) (hdrSize dflags rep)     for <- newBlockId     emitLabel for@@ -1965,12 +2072,11 @@     -- TODO: Optimize branch for common case of no aliasing.     copy src dst dst_p src_p bytes = do         dflags <- getDynFlags-        [moveCall, cpyCall] <- forkAlts [-            getCode $ emitMemmoveCall dst_p src_p (mkIntExpr dflags bytes)-            (wORD_SIZE dflags),-            getCode $ emitMemcpyCall  dst_p src_p (mkIntExpr dflags bytes)-            (wORD_SIZE dflags)-            ]+        (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@@ -2028,12 +2134,11 @@     -- TODO: Optimize branch for common case of no aliasing.     copy src dst dst_p src_p bytes = do         dflags <- getDynFlags-        [moveCall, cpyCall] <- forkAlts-            [ getCode $ emitMemmoveCall dst_p src_p (mkIntExpr dflags bytes)-              (wORD_SIZE dflags)-            , getCode $ emitMemcpyCall  dst_p src_p (mkIntExpr dflags bytes)-              (wORD_SIZE dflags)-            ]+        (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@@ -2080,7 +2185,7 @@      let hdr_size = fixedHdrSize dflags -    base <- allocHeapClosure rep info_ptr curCCS+    base <- allocHeapClosure rep info_ptr cccsExpr                      [ (mkIntExpr dflags n,                         hdr_size + oFFSET_StgMutArrPtrs_ptrs dflags)                      , (mkIntExpr dflags (nonHdrSizeW rep),@@ -2119,7 +2224,7 @@      let hdr_size = fixedHdrSize dflags -    base <- allocHeapClosure rep info_ptr curCCS+    base <- allocHeapClosure rep info_ptr cccsExpr                      [ (mkIntExpr dflags n,                         hdr_size + oFFSET_StgSmallMutArrPtrs_ptrs dflags)                      ]
codeGen/StgCmmProf.hs view
@@ -1,5 +1,3 @@-{-# LANGUAGE CPP #-}- ----------------------------------------------------------------------------- -- -- Code generation for profiling@@ -16,7 +14,7 @@         dynProfHdr, profDynAlloc, profAlloc, staticProfHdr, initUpdFrameProf,         enterCostCentreThunk, enterCostCentreFun,         costCentreFrom,-        curCCS, storeCurCCS,+        storeCurCCS,         emitSetCCC,          saveCurrentCostCentre, restoreCurrentCostCentre,@@ -25,8 +23,6 @@         ldvEnter, ldvEnterClosure, ldvRecordCreate   ) where -#include "HsVersions.h"- import GhcPrelude  import StgCmmClosure@@ -62,11 +58,8 @@ ccType :: DynFlags -> CmmType -- Type of a cost centre ccType = bWord -curCCS :: CmmExpr-curCCS = CmmReg (CmmGlobal CCCS)- storeCurCCS :: CmmExpr -> CmmAGraph-storeCurCCS e = mkAssign (CmmGlobal CCCS) e+storeCurCCS e = mkAssign cccsReg e  mkCCostCentre :: CostCentre -> CmmLit mkCCostCentre cc = CmmLabel (mkCCLabel cc)@@ -93,7 +86,7 @@ initUpdFrameProf frame   = ifProfiling $        -- frame->header.prof.ccs = CCCS     do dflags <- getDynFlags-       emitStore (cmmOffset dflags frame (oFFSET_StgHeader_ccs dflags)) curCCS+       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. @@ -133,7 +126,7 @@        if not (gopt Opt_SccProfilingOn dflags)            then return Nothing            else do local_cc <- newTemp (ccType dflags)-                   emitAssign (CmmLocal local_cc) curCCS+                   emitAssign (CmmLocal local_cc) cccsExpr                    return (Just local_cc)  restoreCurrentCostCentre :: Maybe LocalReg -> FCode ()@@ -186,7 +179,7 @@     if isCurrentCCS ccs        then do dflags <- getDynFlags                emitRtsCall rtsUnitId (fsLit "enterFunCCS")-                   [(CmmReg (CmmGlobal BaseReg), AddrHint),+                   [(baseExpr, AddrHint),                     (costCentreFrom dflags closure, AddrHint)] False        else return () -- top-level function, nothing to do @@ -280,7 +273,7 @@       if not (gopt Opt_SccProfilingOn dflags)           then return ()           else do tmp <- newTemp (ccsType dflags)-                  pushCostCentre tmp curCCS cc+                  pushCostCentre tmp cccsExpr cc                   when tick $ emit (bumpSccCount dflags (CmmReg (CmmLocal tmp)))                   when push $ emit (storeCurCCS (CmmReg (CmmLocal tmp))) 
codeGen/StgCmmTicky.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE BangPatterns, CPP #-}+{-# LANGUAGE BangPatterns #-}  ----------------------------------------------------------------------------- --@@ -103,8 +103,6 @@   tickyKnownCallTooFewArgs, tickyKnownCallExact, tickyKnownCallExtraArgs,   tickySlowCall, tickySlowCallPat,   ) where--#include "HsVersions.h"  import GhcPrelude 
codeGen/StgCmmUtils.hs view
@@ -94,10 +94,10 @@ mkSimpleLit :: DynFlags -> Literal -> CmmLit mkSimpleLit dflags (MachChar   c)    = CmmInt (fromIntegral (ord c)) (wordWidth dflags) mkSimpleLit dflags MachNullAddr      = zeroCLit dflags-mkSimpleLit dflags (MachInt i)       = CmmInt i (wordWidth dflags)-mkSimpleLit _      (MachInt64 i)     = CmmInt i W64-mkSimpleLit dflags (MachWord i)      = CmmInt i (wordWidth dflags)-mkSimpleLit _      (MachWord64 i)    = CmmInt i W64+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 _      (MachFloat r)     = CmmFloat r W32 mkSimpleLit _      (MachDouble r)    = CmmFloat r W64 mkSimpleLit _      (MachLabel fs ms fod)@@ -280,7 +280,7 @@ get_Regtable_addr_from_offset :: DynFlags -> CmmType -> Int -> CmmExpr get_Regtable_addr_from_offset dflags _rep offset =     if haveRegBase (targetPlatform dflags)-    then CmmRegOff (CmmGlobal BaseReg) offset+    then CmmRegOff baseReg offset     else regTableOffset dflags offset  @@ -529,8 +529,7 @@      -- We find the necessary type information in the literals in the branches     let signed = case head branches of-                    (MachInt _, _) ->   True-                    (MachInt64 _, _) -> True+                    (LitNumber nt _ _, _) -> litNumIsSigned nt                     _ -> False      let range | signed    = (tARGET_MIN_INT dflags, tARGET_MAX_INT dflags)@@ -585,7 +584,7 @@ -------------- label_default :: BlockId -> Maybe CmmAGraphScoped -> FCode (Maybe BlockId) label_default _ Nothing-  = return  Nothing+  = return Nothing label_default join_lbl (Just code)   = do lbl <- label_code join_lbl code        return (Just lbl)
coreSyn/CoreFVs.hs view
@@ -37,7 +37,6 @@         ruleRhsFreeVars, ruleFreeVars, rulesFreeVars,         rulesFreeVarsDSet,         ruleLhsFreeIds, ruleLhsFreeIdsList,-        vectsFreeVars,          expr_fvs, @@ -379,7 +378,7 @@ orphNamesOfCo (UnivCo p _ t1 t2)    = orphNamesOfProv p `unionNameSet` orphNamesOfType t1 `unionNameSet` orphNamesOfType t2 orphNamesOfCo (SymCo co)            = orphNamesOfCo co orphNamesOfCo (TransCo co1 co2)     = orphNamesOfCo co1 `unionNameSet` orphNamesOfCo co2-orphNamesOfCo (NthCo _ co)          = orphNamesOfCo co+orphNamesOfCo (NthCo _ _ co)        = orphNamesOfCo co orphNamesOfCo (LRCo  _ co)          = orphNamesOfCo co orphNamesOfCo (InstCo co arg)       = orphNamesOfCo co `unionNameSet` orphNamesOfCo arg orphNamesOfCo (CoherenceCo co1 co2) = orphNamesOfCo co1 `unionNameSet` orphNamesOfCo co2@@ -515,17 +514,6 @@ breaker, which is perfectly inlinable. -} --- |Free variables of a vectorisation declaration-vectsFreeVars :: [CoreVect] -> VarSet-vectsFreeVars = mapUnionVarSet vectFreeVars-  where-    vectFreeVars (Vect   _ rhs)   = fvVarSet $ filterFV isLocalId $ expr_fvs rhs-    vectFreeVars (NoVect _)       = noFVs-    vectFreeVars (VectType _ _ _) = noFVs-    vectFreeVars (VectClass _)    = noFVs-    vectFreeVars (VectInst _)     = noFVs-      -- this function is only concerned with values, not types- {- ************************************************************************ *                                                                      *@@ -537,14 +525,23 @@ NON-GLOBAL free variables and type variables. -} -type FVAnn = DVarSet+type FVAnn = DVarSet  -- See Note [The FVAnn invariant] +{- Note [The FVAnn invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Invariant: a FVAnn, say S, is closed:+  That is: if v is in S,+           then freevars( v's type/kind ) is also in S+-}+ -- | Every node in a binding group annotated with its -- (non-global) free variables, both Ids and TyVars, and type. type CoreBindWithFVs = AnnBind Id FVAnn+ -- | Every node in an expression annotated with its -- (non-global) free variables, both Ids and TyVars, and type.-type CoreExprWithFVs  = AnnExpr Id FVAnn+-- NB: see Note [The FVAnn invariant]+type CoreExprWithFVs  = AnnExpr  Id FVAnn type CoreExprWithFVs' = AnnExpr' Id FVAnn  -- | Every node in an expression annotated with its@@ -698,12 +695,14 @@     rhss2        = map freeVars rhss     rhs_body_fvs = foldr (unionFVs . freeVarsOf) body_fvs rhss2     binders_fvs  = fvDVarSet $ mapUnionFV bndrRuleAndUnfoldingFVs binders+                   -- See Note [The FVAnn invariant]     all_fvs      = rhs_body_fvs `unionFVs` binders_fvs             -- The "delBinderFV" happens after adding the idSpecVars,             -- since the latter may add some of the binders as fvs  freeVars :: CoreExpr -> CoreExprWithFVs--- ^ Annotate a 'CoreExpr' with its (non-global) free type and value variables at every tree node+-- ^ Annotate a 'CoreExpr' with its (non-global) free type+--   and value variables at every tree node. freeVars = go   where     go :: CoreExpr -> CoreExprWithFVs@@ -711,7 +710,8 @@       | isLocalVar v = (aFreeVar v `unionFVs` ty_fvs, AnnVar v)       | otherwise    = (emptyDVarSet,                 AnnVar v)       where-        ty_fvs = dVarTypeTyCoVars v  -- Do we need this?+        ty_fvs = dVarTypeTyCoVars v+                 -- See Note [The FVAnn invariant]      go (Lit lit) = (emptyDVarSet, AnnLit lit)     go (Lam b body)@@ -721,6 +721,7 @@         body'@(body_fvs, _) = go body         b_ty  = idType b         b_fvs = tyCoVarsOfTypeDSet b_ty+                -- See Note [The FVAnn invariant]      go (App fun arg)       = ( freeVarsOf fun' `unionFVs` freeVarsOf arg'@@ -733,8 +734,8 @@       = ( (bndr `delBinderFV` alts_fvs)            `unionFVs` freeVarsOf scrut2            `unionFVs` tyCoVarsOfTypeDSet ty-          -- don't need to look at (idType bndr)-          -- b/c that's redundant with scrut+          -- Don't need to look at (idType bndr)+          -- because that's redundant with scrut         , AnnCase scrut2 bndr ty alts2 )       where         scrut2 = go scrut
coreSyn/CoreLint.hs view
@@ -11,7 +11,7 @@ module CoreLint (     lintCoreBindings, lintUnfolding,     lintPassResult, lintInteractiveExpr, lintExpr,-    lintAnnots,+    lintAnnots, lintTypes,      -- ** Debug output     endPass, endPassIO,@@ -202,8 +202,8 @@ ************************************************************************  These functions are not CoreM monad stuff, but they probably ought to-be, and it makes a conveneint place.  place for them.  They print out-stuff before and after core passes, and do Core Lint when necessary.+be, and it makes a convenient place for them.  They print out stuff+before and after core passes, and do Core Lint when necessary. -}  endPass :: CoreToDo -> CoreProgram -> [CoreRule] -> CoreM ()@@ -274,8 +274,7 @@ coreDumpFlag CoreDoSpecialising       = Just Opt_D_dump_spec coreDumpFlag CoreDoSpecConstr         = Just Opt_D_dump_spec coreDumpFlag CoreCSE                  = Just Opt_D_dump_cse-coreDumpFlag CoreDoVectorisation      = Just Opt_D_dump_vect-coreDumpFlag CoreDesugar              = Just Opt_D_dump_ds+coreDumpFlag CoreDesugar              = Just Opt_D_dump_ds_preopt coreDumpFlag CoreDesugarOpt           = Just Opt_D_dump_ds coreDumpFlag CoreTidy                 = Just Opt_D_dump_simpl coreDumpFlag CorePrep                 = Just Opt_D_dump_prep@@ -407,7 +406,8 @@   where     in_scope_set = mkInScopeSet (mkVarSet local_in_scope) -    flags = LF { lf_check_global_ids = check_globals+    flags = defaultLintFlags+               { lf_check_global_ids = check_globals                , lf_check_inline_loop_breakers = check_lbs                , lf_check_static_ptrs = check_static_ptrs } @@ -715,8 +715,7 @@   = do { expr_ty <- markAllJoinsBad $ lintCoreExpr expr        ; co' <- applySubstCo co        ; (_, k2, from_ty, to_ty, r) <- lintCoercion co'-       ; lintL (classifiesTypeWithValues k2)-               (text "Target of cast not # or *:" <+> ppr co)+       ; checkValueKind k2 (text "target of cast" <+> quotes (ppr co))        ; lintRole co' Representational r        ; ensureEqTys from_ty expr_ty (mkCastErr expr co' from_ty expr_ty)        ; return to_ty }@@ -1275,6 +1274,19 @@ %************************************************************************ -} +lintTypes :: DynFlags+          -> [TyCoVar]   -- Treat these as in scope+          -> [Type]+          -> Maybe MsgDoc -- Nothing => OK+lintTypes dflags vars tys+  | isEmptyBag errs = Nothing+  | otherwise       = Just (pprMessageBag errs)+  where+    in_scope = emptyInScopeSet+    (_warns, errs) = initL dflags defaultLintFlags in_scope linter+    linter = lintBinders LambdaBind vars $ \_ ->+             mapM_ lintInTy tys+ lintInTy :: InType -> LintM (LintedType, LintedKind) -- Types only, not kinds -- Check the type, and apply the substitution to it@@ -1283,7 +1295,9 @@   = addLoc (InType ty) $     do  { ty' <- applySubstTy ty         ; k  <- lintType ty'-        ; lintKind k+        ; lintKind k  -- The kind returned by lintType is already+                      -- a LintedKind but we also want to check that+                      -- k :: *, which lintKind does         ; return (ty', k) }  checkTyCon :: TyCon -> LintM ()@@ -1311,25 +1325,25 @@        ; lint_ty_app ty k1 [(t2,k2)] }  lintType ty@(TyConApp tc tys)-  | Just ty' <- coreView ty-  = lintType ty'   -- Expand type synonyms, so that we do not bogusly complain-                   --  about un-saturated type synonyms+  | isTypeSynonymTyCon tc+  = do { report_unsat <- lf_report_unsat_syns <$> getLintFlags+       ; lintTySynApp report_unsat ty tc tys } -  -- We should never see a saturated application of funTyCon; such applications-  -- should be represented with the FunTy constructor. See Note [Linting-  -- function types] and Note [Representation of function types].   | isFunTyCon tc   , tys `lengthIs` 4+    -- We should never see a saturated application of funTyCon; such+    -- applications should be represented with the FunTy constructor.+    -- See Note [Linting function types] and+    -- Note [Representation of function types].   = failWithL (hang (text "Saturated application of (->)") 2 (ppr ty)) -  | isTypeSynonymTyCon tc || isTypeFamilyTyCon tc-       -- Also type synonyms and type families+  | isTypeFamilyTyCon tc -- Check for unsaturated type family   , tys `lengthLessThan` tyConArity tc   = failWithL (hang (text "Un-saturated type application") 2 (ppr ty))    | otherwise   = do { checkTyCon tc-       ; ks <- mapM lintType tys+       ; ks <- setReportUnsat True (mapM lintType tys)        ; lint_ty_app ty (tyConKind tc) (tys `zip` ks) }  -- arrows can related *unlifted* kinds, so this has to be separate from@@ -1342,12 +1356,14 @@ lintType t@(ForAllTy (TvBndr tv _vis) ty)   = do { lintL (isTyVar tv) (text "Covar bound in type:" <+> ppr t)        ; lintTyBndr tv $ \tv' ->-          do { k <- lintType ty-             ; lintL (not (tv' `elemVarSet` tyCoVarsOfType k))-                     (text "Variable escape in forall:" <+> ppr t)-             ; lintL (classifiesTypeWithValues k)-                     (text "Non-* and non-# kind in forall:" <+> ppr t)-             ; return k }}+    do { k <- lintType ty+       ; checkValueKind k (text "the body of forall:" <+> ppr t)+       ; case occCheckExpand [tv'] k of  -- See Note [Stupid type synonyms]+           Just k' -> return k'+           Nothing -> failWithL (hang (text "Variable escape in forall:")+                                    2 (vcat [ text "type:" <+> ppr t+                                            , text "kind:" <+> ppr k ]))+    }}  lintType ty@(LitTy l) = lintTyLit l >> return (typeKind ty) @@ -1361,6 +1377,44 @@   = do { (k1, k2, ty1, ty2, r) <- lintCoercion co        ; return $ mkHeteroCoercionType r k1 k2 ty1 ty2 } +{- Note [Stupid type synonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider (Trac #14939)+   type Alg cls ob = ob+   f :: forall (cls :: * -> Constraint) (b :: Alg cls *). b++Here 'cls' appears free in b's kind, which would usually be illegal+(because in (forall a. ty), ty's kind should not mention 'a'). But+#in this case (Alg cls *) = *, so all is well.  Currently we allow+this, and make Lint expand synonyms where necessary to make it so.++c.f. TcUnify.occCheckExpand and CoreUtils.coreAltsType which deal+with the same problem. A single systematic solution eludes me.+-}++-----------------+lintTySynApp :: Bool -> Type -> TyCon -> [Type] -> LintM LintedKind+-- See Note [Linting type synonym applications]+lintTySynApp report_unsat ty tc tys+  | report_unsat   -- Report unsaturated only if report_unsat is on+  , tys `lengthLessThan` tyConArity tc+  = failWithL (hang (text "Un-saturated type application") 2 (ppr ty))++  | otherwise+  = do { ks <- setReportUnsat False (mapM lintType tys)++       ; when report_unsat $+         case expandSynTyCon_maybe tc tys of+            Nothing -> pprPanic "lintTySynApp" (ppr tc <+> ppr tys)+                       -- Previous guards should have made this impossible+            Just (tenv, rhs, tys') -> do { _ <- lintType expanded_ty+                                         ; return () }+                where+                  expanded_ty = mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys'++       ; lint_ty_app ty (tyConKind tc) (tys `zip` ks) }++----------------- lintKind :: OutKind -> LintM () -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism]@@ -1369,13 +1423,15 @@                          (addErrL (hang (text "Ill-kinded kind:" <+> ppr k)                                       2 (text "has kind:" <+> ppr sk))) } --- confirms that a type is really *-lintStar :: SDoc -> OutKind -> LintM ()-lintStar doc k+-----------------+-- Confirms that a type is really *, #, Constraint etc+checkValueKind :: OutKind -> SDoc -> LintM ()+checkValueKind k doc   = lintL (classifiesTypeWithValues k)           (text "Non-*-like kind when *-like expected:" <+> ppr k $$            text "when checking" <+> doc) +----------------- lintArrow :: SDoc -> LintedKind -> LintedKind -> LintM LintedKind -- If you edit this function, you may need to update the GHC formalism -- See Note [GHC Formalism]@@ -1390,6 +1446,7 @@                   2 (text "in" <+> what)              , what <+> text "kind:" <+> ppr k ] +----------------- lint_ty_app :: Type -> LintedKind -> [(LintedType,LintedKind)] -> LintM LintedKind lint_ty_app ty k tys   = lint_app (text "type" <+> quotes (ppr ty)) k tys@@ -1457,7 +1514,7 @@ lintCoreRule fun fun_ty rule@(Rule { ru_name = name, ru_bndrs = bndrs                                    , ru_args = args, ru_rhs = rhs })   = lintBinders LambdaBind bndrs $ \ _ ->-    do { lhs_ty <- foldM lintCoreArg fun_ty args+    do { lhs_ty <- lintCoreArgs fun_ty args        ; rhs_ty <- case isJoinId_maybe fun of                      Just join_arity                        -> do { checkL (args `lengthIs` join_arity) $@@ -1467,7 +1524,8 @@                      _ -> markAllJoinsBad $ lintCoreExpr rhs        ; ensureEqTys lhs_ty rhs_ty $          (rule_doc <+> vcat [ text "lhs type:" <+> ppr lhs_ty-                            , text "rhs type:" <+> ppr rhs_ty ])+                            , text "rhs type:" <+> ppr rhs_ty+                            , text "fun_ty:" <+> ppr fun_ty ])        ; let bad_bndrs = filter is_bad_bndr bndrs         ; checkL (null bad_bndrs)@@ -1555,8 +1613,8 @@ lintStarCoercion :: OutCoercion -> LintM (LintedType, LintedType) lintStarCoercion g   = do { (k1, k2, t1, t2, r) <- lintCoercion g-       ; lintStar (text "the kind of the left type in" <+> ppr g) k1-       ; lintStar (text "the kind of the right type in" <+> ppr g) k2+       ; checkValueKind k1 (text "the kind of the left type in" <+> ppr g)+       ; checkValueKind k2 (text "the kind of the right type in" <+> ppr g)        ; lintRole g Nominal r        ; return (t1, t2) } @@ -1731,12 +1789,13 @@        ; lintRole co r1 r2        ; return (k1a, k2b, ty1a, ty2b, r1) } -lintCoercion the_co@(NthCo n co)+lintCoercion the_co@(NthCo r0 n co)   = do { (_, _, s, t, r) <- lintCoercion co        ; case (splitForAllTy_maybe s, splitForAllTy_maybe t) of          { (Just (tv_s, _ty_s), Just (tv_t, _ty_t))              |  n == 0-             -> return (ks, kt, ts, tt, Nominal)+             -> do { lintRole the_co Nominal r0+                   ; return (ks, kt, ts, tt, r0) }              where                ts = tyVarKind tv_s                tt = tyVarKind tv_t@@ -1750,7 +1809,8 @@                  -- see Note [NthCo and newtypes] in TyCoRep              , tys_s `equalLength` tys_t              , tys_s `lengthExceeds` n-             -> return (ks, kt, ts, tt, tr)+             -> do { lintRole the_co tr r0+                   ; return (ks, kt, ts, tt, r0) }              where                ts = getNth tys_s n                tt = getNth tys_t n@@ -1909,8 +1969,8 @@ data LintFlags   = LF { lf_check_global_ids           :: Bool -- See Note [Checking for global Ids]        , lf_check_inline_loop_breakers :: Bool -- See Note [Checking for INLINE loop breakers]-       , lf_check_static_ptrs          :: StaticPtrCheck-                                             -- ^ See Note [Checking StaticPtrs]+       , lf_check_static_ptrs :: StaticPtrCheck -- ^ See Note [Checking StaticPtrs]+       , lf_report_unsat_syns :: Bool -- ^ See Note [Linting type synonym applications]     }  -- See Note [Checking StaticPtrs]@@ -1927,6 +1987,7 @@ defaultLintFlags = LF { lf_check_global_ids = False                       , lf_check_inline_loop_breakers = True                       , lf_check_static_ptrs = AllowAnywhere+                      , lf_report_unsat_syns = True                       }  newtype LintM a =@@ -1971,6 +2032,37 @@ The same substitution also supports let-type, current expressed as         (/\(a:*). body) ty Here we substitute 'ty' for 'a' in 'body', on the fly.++Note [Linting type synonym applications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When lining a type-synonym application+  S ty1 .. tyn+we behave as follows (Trac #15057):++* If lf_report_unsat_syns = True, and S has arity < n,+  complain about an unsaturated type synonym.++* Switch off lf_report_unsat_syns, and lint ty1 .. tyn.++  Reason: catch out of scope variables or other ill-kinded gubbins,+  even if S discards that argument entirely. E.g. (#15012):+     type FakeOut a = Int+     type family TF a+     type instance TF Int = FakeOut a+  Here 'a' is out of scope; but if we expand FakeOut, we conceal+  that out-of-scope error.++  Reason for switching off lf_report_unsat_syns: with+  LiberalTypeSynonyms, GHC allows unsaturated synonyms provided they+  are saturated when the type is expanded. Example+     type T f = f Int+     type S a = a -> a+     type Z = T S+  In Z's RHS, S appears unsaturated, but it is saturated when T is expanded.++* If lf_report_unsat_syns is on, expand the synonym application and+  lint the result.  Reason: want to check that synonyms are saturated+  when the type is expanded. -}  instance Functor LintM where@@ -2018,6 +2110,13 @@              , le_joins = emptyVarSet              , le_loc = []              , le_dynflags = dflags }++setReportUnsat :: Bool -> LintM a -> LintM a+-- Switch off lf_report_unsat_syns+setReportUnsat ru thing_inside+  = LintM $ \ env errs ->+    let env' = env { le_flags = (le_flags env) { lf_report_unsat_syns = ru } }+    in unLintM thing_inside env' errs  getLintFlags :: LintM LintFlags getLintFlags = LintM $ \ env errs -> (Just (le_flags env), errs)
+ coreSyn/CoreMap.hs view
@@ -0,0 +1,799 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+-}++{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-}+module CoreMap(+   -- * Maps over Core expressions+   CoreMap, emptyCoreMap, extendCoreMap, lookupCoreMap, foldCoreMap,+   -- * Maps over 'Type's+   TypeMap, emptyTypeMap, extendTypeMap, lookupTypeMap, foldTypeMap,+   LooseTypeMap,+   -- ** With explicit scoping+   CmEnv, lookupCME, extendTypeMapWithScope, lookupTypeMapWithScope,+   mkDeBruijnContext,+   -- * Maps over 'Maybe' values+   MaybeMap,+   -- * Maps over 'List' values+   ListMap,+   -- * Maps over 'Literal's+   LiteralMap,+   -- * Map for compressing leaves. See Note [Compressed TrieMap]+   GenMap,+   -- * 'TrieMap' class+   TrieMap(..), insertTM, deleteTM,+   lkDFreeVar, xtDFreeVar,+   lkDNamed, xtDNamed,+   (>.>), (|>), (|>>),+ ) where++import GhcPrelude++import TrieMap+import CoreSyn+import Coercion+import Name+import Type+import TyCoRep+import Var+import FastString(FastString)+import Util++import qualified Data.Map    as Map+import qualified Data.IntMap as IntMap+import VarEnv+import NameEnv+import Outputable+import Control.Monad( (>=>) )++{-+This module implements TrieMaps over Core related data structures+like CoreExpr or Type. It is built on the Tries from the TrieMap+module.++The code is very regular and boilerplate-like, but there is+some neat handling of *binders*.  In effect they are deBruijn+numbered on the fly.+++-}++----------------------+-- Recall that+--   Control.Monad.(>=>) :: (a -> Maybe b) -> (b -> Maybe c) -> a -> Maybe c++-- NB: Be careful about RULES and type families (#5821).  So we should make sure+-- to specify @Key TypeMapX@ (and not @DeBruijn Type@, the reduced form)++-- The CoreMap makes heavy use of GenMap. However the CoreMap Types are not+-- known when defining GenMap so we can only specialize them here.++{-# SPECIALIZE lkG :: Key TypeMapX     -> TypeMapG a     -> Maybe a #-}+{-# SPECIALIZE lkG :: Key CoercionMapX -> CoercionMapG a -> Maybe a #-}+{-# SPECIALIZE lkG :: Key CoreMapX     -> CoreMapG a     -> Maybe a #-}+++{-# SPECIALIZE xtG :: Key TypeMapX     -> XT a -> TypeMapG a -> TypeMapG a #-}+{-# SPECIALIZE xtG :: Key CoercionMapX -> XT a -> CoercionMapG a -> CoercionMapG a #-}+{-# SPECIALIZE xtG :: Key CoreMapX     -> XT a -> CoreMapG a -> CoreMapG a #-}++{-# SPECIALIZE mapG :: (a -> b) -> TypeMapG a     -> TypeMapG b #-}+{-# SPECIALIZE mapG :: (a -> b) -> CoercionMapG a -> CoercionMapG b #-}+{-# SPECIALIZE mapG :: (a -> b) -> CoreMapG a     -> CoreMapG b #-}++{-# SPECIALIZE fdG :: (a -> b -> b) -> TypeMapG a     -> b -> b #-}+{-# SPECIALIZE fdG :: (a -> b -> b) -> CoercionMapG a -> b -> b #-}+{-# SPECIALIZE fdG :: (a -> b -> b) -> CoreMapG a     -> b -> b #-}+++{-+************************************************************************+*                                                                      *+                   CoreMap+*                                                                      *+************************************************************************+-}++lkDNamed :: NamedThing n => n -> DNameEnv a -> Maybe a+lkDNamed n env = lookupDNameEnv env (getName n)++xtDNamed :: NamedThing n => n -> XT a -> DNameEnv a -> DNameEnv a+xtDNamed tc f m = alterDNameEnv f m (getName tc)+++{-+Note [Binders]+~~~~~~~~~~~~~~+ * In general we check binders as late as possible because types are+   less likely to differ than expression structure.  That's why+      cm_lam :: CoreMapG (TypeMapG a)+   rather than+      cm_lam :: TypeMapG (CoreMapG a)++ * We don't need to look at the type of some binders, notably+     - the case binder in (Case _ b _ _)+     - the binders in an alternative+   because they are totally fixed by the context++Note [Empty case alternatives]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+* For a key (Case e b ty (alt:alts))  we don't need to look the return type+  'ty', because every alternative has that type.++* 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)++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)+for the two possibilities.  Only cm_ecase looks at the type.++See also Note [Empty case alternatives] in CoreSyn.+-}++-- | @CoreMap a@ is a map from 'CoreExpr' to @a@.  If you are a client, this+-- is the type you want.+newtype CoreMap a = CoreMap (CoreMapG a)++instance TrieMap CoreMap where+    type Key CoreMap = CoreExpr+    emptyTM = CoreMap emptyTM+    lookupTM k (CoreMap m) = lookupTM (deBruijnize k) m+    alterTM k f (CoreMap m) = CoreMap (alterTM (deBruijnize k) f m)+    foldTM k (CoreMap m) = foldTM k m+    mapTM f (CoreMap m) = CoreMap (mapTM f m)++-- | @CoreMapG a@ is a map from @DeBruijn CoreExpr@ to @a@.  The extended+-- key makes it suitable for recursive traversal, since it can track binders,+-- but it is strictly internal to this module.  If you are including a 'CoreMap'+-- inside another 'TrieMap', this is the type you want.+type CoreMapG = GenMap CoreMapX++-- | @CoreMapX a@ is the base map from @DeBruijn CoreExpr@ to @a@, but without+-- the 'GenMap' optimization.+data CoreMapX a+  = CM { cm_var   :: VarMap a+       , cm_lit   :: LiteralMap a+       , cm_co    :: CoercionMapG a+       , cm_type  :: TypeMapG a+       , cm_cast  :: CoreMapG (CoercionMapG a)+       , cm_tick  :: CoreMapG (TickishMap a)+       , cm_app   :: CoreMapG (CoreMapG a)+       , cm_lam   :: CoreMapG (BndrMap a)    -- Note [Binders]+       , cm_letn  :: CoreMapG (CoreMapG (BndrMap a))+       , cm_letr  :: ListMap CoreMapG (CoreMapG (ListMap BndrMap a))+       , cm_case  :: CoreMapG (ListMap AltMap a)+       , cm_ecase :: CoreMapG (TypeMapG a)    -- Note [Empty case alternatives]+     }++instance Eq (DeBruijn CoreExpr) where+  D env1 e1 == D env2 e2 = go e1 e2 where+    go (Var v1) (Var v2) = case (lookupCME env1 v1, lookupCME env2 v2) of+                            (Just b1, Just b2) -> b1 == b2+                            (Nothing, Nothing) -> v1 == v2+                            _ -> False+    go (Lit lit1)    (Lit lit2)      = lit1 == lit2+    go (Type t1)    (Type t2)        = D env1 t1 == D env2 t2+    go (Coercion co1) (Coercion co2) = D env1 co1 == D env2 co2+    go (Cast e1 co1) (Cast e2 co2) = D env1 co1 == D env2 co2 && go e1 e2+    go (App f1 a1)   (App f2 a2)   = go f1 f2 && go a1 a2+    -- This seems a bit dodgy, see 'eqTickish'+    go (Tick n1 e1)  (Tick n2 e2)  = n1 == n2 && go e1 e2++    go (Lam b1 e1)  (Lam b2 e2)+      =  D env1 (varType b1) == D env2 (varType b2)+      && D (extendCME env1 b1) e1 == D (extendCME env2 b2) e2++    go (Let (NonRec v1 r1) e1) (Let (NonRec v2 r2) e2)+      =  go r1 r2+      && D (extendCME env1 v1) e1 == D (extendCME env2 v2) e2++    go (Let (Rec ps1) e1) (Let (Rec ps2) e2)+      = equalLength ps1 ps2+      && D env1' rs1 == D env2' rs2+      && D env1' e1  == D env2' e2+      where+        (bs1,rs1) = unzip ps1+        (bs2,rs2) = unzip ps2+        env1' = extendCMEs env1 bs1+        env2' = extendCMEs env2 bs2++    go (Case e1 b1 t1 a1) (Case e2 b2 t2 a2)+      | null a1   -- See Note [Empty case alternatives]+      = null a2 && go e1 e2 && D env1 t1 == D env2 t2+      | otherwise+      =  go e1 e2 && D (extendCME env1 b1) a1 == D (extendCME env2 b2) a2++    go _ _ = False++emptyE :: CoreMapX a+emptyE = CM { cm_var = emptyTM, cm_lit = emptyTM+            , cm_co = emptyTM, cm_type = emptyTM+            , cm_cast = emptyTM, cm_app = emptyTM+            , cm_lam = emptyTM, cm_letn = emptyTM+            , cm_letr = emptyTM, cm_case = emptyTM+            , cm_ecase = emptyTM, cm_tick = emptyTM }++instance TrieMap CoreMapX where+   type Key CoreMapX = DeBruijn CoreExpr+   emptyTM  = emptyE+   lookupTM = lkE+   alterTM  = xtE+   foldTM   = fdE+   mapTM    = mapE++--------------------------+mapE :: (a->b) -> CoreMapX a -> CoreMapX b+mapE f (CM { cm_var = cvar, cm_lit = clit+           , cm_co = cco, cm_type = ctype+           , cm_cast = ccast , cm_app = capp+           , cm_lam = clam, cm_letn = cletn+           , cm_letr = cletr, cm_case = ccase+           , cm_ecase = cecase, cm_tick = ctick })+  = CM { cm_var = mapTM f cvar, cm_lit = mapTM f clit+       , cm_co = mapTM f cco, cm_type = mapTM f ctype+       , cm_cast = mapTM (mapTM f) ccast, cm_app = mapTM (mapTM f) capp+       , cm_lam = mapTM (mapTM f) clam, cm_letn = mapTM (mapTM (mapTM f)) cletn+       , cm_letr = mapTM (mapTM (mapTM f)) cletr, cm_case = mapTM (mapTM f) ccase+       , cm_ecase = mapTM (mapTM f) cecase, cm_tick = mapTM (mapTM f) ctick }++--------------------------+lookupCoreMap :: CoreMap a -> CoreExpr -> Maybe a+lookupCoreMap cm e = lookupTM e cm++extendCoreMap :: CoreMap a -> CoreExpr -> a -> CoreMap a+extendCoreMap m e v = alterTM e (\_ -> Just v) m++foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b+foldCoreMap k z m = foldTM k m z++emptyCoreMap :: CoreMap a+emptyCoreMap = emptyTM++instance Outputable a => Outputable (CoreMap a) where+  ppr m = text "CoreMap elts" <+> ppr (foldTM (:) m [])++-------------------------+fdE :: (a -> b -> b) -> CoreMapX a -> b -> b+fdE k m+  = foldTM k (cm_var m)+  . foldTM k (cm_lit m)+  . foldTM k (cm_co m)+  . foldTM k (cm_type m)+  . foldTM (foldTM k) (cm_cast m)+  . foldTM (foldTM k) (cm_tick m)+  . foldTM (foldTM k) (cm_app m)+  . foldTM (foldTM k) (cm_lam m)+  . foldTM (foldTM (foldTM k)) (cm_letn m)+  . foldTM (foldTM (foldTM k)) (cm_letr m)+  . foldTM (foldTM k) (cm_case m)+  . foldTM (foldTM k) (cm_ecase m)++-- lkE: lookup in trie for expressions+lkE :: DeBruijn CoreExpr -> CoreMapX a -> Maybe a+lkE (D env expr) cm = go expr cm+  where+    go (Var v)              = cm_var  >.> lkVar env v+    go (Lit l)              = cm_lit  >.> lookupTM l+    go (Type t)             = cm_type >.> lkG (D env t)+    go (Coercion c)         = cm_co   >.> lkG (D env c)+    go (Cast e c)           = cm_cast >.> lkG (D env e) >=> lkG (D env c)+    go (Tick tickish e)     = cm_tick >.> lkG (D env e) >=> lkTickish tickish+    go (App e1 e2)          = cm_app  >.> lkG (D env e2) >=> lkG (D env e1)+    go (Lam v e)            = cm_lam  >.> lkG (D (extendCME env v) e)+                              >=> lkBndr env v+    go (Let (NonRec b r) e) = cm_letn >.> lkG (D env r)+                              >=> lkG (D (extendCME env b) e) >=> lkBndr env b+    go (Let (Rec prs) e)    = let (bndrs,rhss) = unzip prs+                                  env1 = extendCMEs env bndrs+                              in cm_letr+                                 >.> lkList (lkG . D env1) rhss+                                 >=> lkG (D env1 e)+                                 >=> lkList (lkBndr env1) bndrs+    go (Case e b ty as)     -- See Note [Empty case alternatives]+               | null as    = cm_ecase >.> lkG (D env e) >=> lkG (D env ty)+               | otherwise  = cm_case >.> lkG (D env e)+                              >=> lkList (lkA (extendCME env b)) as++xtE :: DeBruijn CoreExpr -> XT a -> CoreMapX a -> CoreMapX a+xtE (D env (Var v))              f m = m { cm_var  = cm_var m+                                                 |> xtVar env v f }+xtE (D env (Type t))             f m = m { cm_type = cm_type m+                                                 |> xtG (D env t) f }+xtE (D env (Coercion c))         f m = m { cm_co   = cm_co m+                                                 |> xtG (D env c) f }+xtE (D _   (Lit l))              f m = m { cm_lit  = cm_lit m  |> alterTM l f }+xtE (D env (Cast e c))           f m = m { cm_cast = cm_cast m |> xtG (D env e)+                                                 |>> xtG (D env c) f }+xtE (D env (Tick t e))           f m = m { cm_tick = cm_tick m |> xtG (D env e)+                                                 |>> xtTickish t f }+xtE (D env (App e1 e2))          f m = m { cm_app = cm_app m |> xtG (D env e2)+                                                 |>> xtG (D env e1) f }+xtE (D env (Lam v e))            f m = m { cm_lam = cm_lam m+                                                 |> xtG (D (extendCME env v) e)+                                                 |>> xtBndr env v f }+xtE (D env (Let (NonRec b r) e)) f m = m { cm_letn = cm_letn m+                                                 |> xtG (D (extendCME env b) e)+                                                 |>> xtG (D env r)+                                                 |>> xtBndr env b f }+xtE (D env (Let (Rec prs) e))    f m = m { cm_letr =+                                              let (bndrs,rhss) = unzip prs+                                                  env1 = extendCMEs env bndrs+                                              in cm_letr m+                                                 |>  xtList (xtG . D env1) rhss+                                                 |>> xtG (D env1 e)+                                                 |>> xtList (xtBndr env1)+                                                            bndrs f }+xtE (D env (Case e b ty as))     f m+                     | null as   = m { cm_ecase = cm_ecase m |> xtG (D env e)+                                                 |>> xtG (D env ty) f }+                     | otherwise = m { cm_case = cm_case m |> xtG (D env e)+                                                 |>> let env1 = extendCME env b+                                                     in xtList (xtA env1) as f }++-- TODO: this seems a bit dodgy, see 'eqTickish'+type TickishMap a = Map.Map (Tickish Id) a+lkTickish :: Tickish Id -> TickishMap a -> Maybe a+lkTickish = lookupTM++xtTickish :: Tickish Id -> XT a -> TickishMap a -> TickishMap a+xtTickish = alterTM++------------------------+data AltMap a   -- A single alternative+  = AM { am_deflt :: CoreMapG a+       , am_data  :: DNameEnv (CoreMapG a)+       , am_lit   :: LiteralMap (CoreMapG a) }++instance TrieMap AltMap where+   type Key AltMap = CoreAlt+   emptyTM  = AM { am_deflt = emptyTM+                 , am_data = emptyDNameEnv+                 , am_lit  = emptyTM }+   lookupTM = lkA emptyCME+   alterTM  = xtA emptyCME+   foldTM   = fdA+   mapTM    = mapA++instance Eq (DeBruijn CoreAlt) where+  D env1 a1 == D env2 a2 = go a1 a2 where+    go (DEFAULT, _, rhs1) (DEFAULT, _, rhs2)+        = D env1 rhs1 == D env2 rhs2+    go (LitAlt lit1, _, rhs1) (LitAlt lit2, _, rhs2)+        = lit1 == lit2 && D env1 rhs1 == D env2 rhs2+    go (DataAlt dc1, bs1, rhs1) (DataAlt dc2, bs2, rhs2)+        = dc1 == dc2 &&+          D (extendCMEs env1 bs1) rhs1 == D (extendCMEs env2 bs2) rhs2+    go _ _ = False++mapA :: (a->b) -> AltMap a -> AltMap b+mapA f (AM { am_deflt = adeflt, am_data = adata, am_lit = alit })+  = AM { am_deflt = mapTM f adeflt+       , am_data = mapTM (mapTM f) adata+       , am_lit = mapTM (mapTM f) alit }++lkA :: CmEnv -> CoreAlt -> AltMap a -> Maybe a+lkA env (DEFAULT,    _, rhs)  = am_deflt >.> lkG (D env rhs)+lkA env (LitAlt lit, _, rhs)  = am_lit >.> lookupTM lit >=> lkG (D env rhs)+lkA env (DataAlt dc, bs, rhs) = am_data >.> lkDNamed dc+                                        >=> lkG (D (extendCMEs env bs) rhs)++xtA :: CmEnv -> CoreAlt -> XT a -> AltMap a -> AltMap a+xtA env (DEFAULT, _, rhs)    f m =+    m { am_deflt = am_deflt m |> xtG (D env rhs) f }+xtA env (LitAlt l, _, rhs)   f m =+    m { am_lit   = am_lit m   |> alterTM l |>> xtG (D env rhs) f }+xtA env (DataAlt d, bs, rhs) f m =+    m { am_data  = am_data m  |> xtDNamed d+                             |>> xtG (D (extendCMEs env bs) rhs) f }++fdA :: (a -> b -> b) -> AltMap a -> b -> b+fdA k m = foldTM k (am_deflt m)+        . foldTM (foldTM k) (am_data m)+        . foldTM (foldTM k) (am_lit m)++{-+************************************************************************+*                                                                      *+                   Coercions+*                                                                      *+************************************************************************+-}++-- We should really never care about the contents of a coercion. Instead,+-- just look up the coercion's type.+newtype CoercionMap a = CoercionMap (CoercionMapG a)++instance TrieMap CoercionMap where+   type Key CoercionMap = Coercion+   emptyTM                     = CoercionMap emptyTM+   lookupTM k  (CoercionMap m) = lookupTM (deBruijnize k) m+   alterTM k f (CoercionMap m) = CoercionMap (alterTM (deBruijnize k) f m)+   foldTM k    (CoercionMap m) = foldTM k m+   mapTM f     (CoercionMap m) = CoercionMap (mapTM f m)++type CoercionMapG = GenMap CoercionMapX+newtype CoercionMapX a = CoercionMapX (TypeMapX a)++instance TrieMap CoercionMapX where+  type Key CoercionMapX = DeBruijn Coercion+  emptyTM = CoercionMapX emptyTM+  lookupTM = lkC+  alterTM  = xtC+  foldTM f (CoercionMapX core_tm) = foldTM f core_tm+  mapTM f (CoercionMapX core_tm)  = CoercionMapX (mapTM f core_tm)++instance Eq (DeBruijn Coercion) where+  D env1 co1 == D env2 co2+    = D env1 (coercionType co1) ==+      D env2 (coercionType co2)++lkC :: DeBruijn Coercion -> CoercionMapX a -> Maybe a+lkC (D env co) (CoercionMapX core_tm) = lkT (D env $ coercionType co)+                                        core_tm++xtC :: DeBruijn Coercion -> XT a -> CoercionMapX a -> CoercionMapX a+xtC (D env co) f (CoercionMapX m)+  = CoercionMapX (xtT (D env $ coercionType co) f m)++{-+************************************************************************+*                                                                      *+                   Types+*                                                                      *+************************************************************************+-}++-- | @TypeMapG a@ is a map from @DeBruijn Type@ to @a@.  The extended+-- key makes it suitable for recursive traversal, since it can track binders,+-- but it is strictly internal to this module.  If you are including a 'TypeMap'+-- inside another 'TrieMap', this is the type you want. Note that this+-- lookup does not do a kind-check. Thus, all keys in this map must have+-- the same kind. Also note that this map respects the distinction between+-- @Type@ and @Constraint@, despite the fact that they are equivalent type+-- synonyms in Core.+type TypeMapG = GenMap TypeMapX++-- | @TypeMapX a@ is the base map from @DeBruijn Type@ to @a@, but without the+-- 'GenMap' optimization.+data TypeMapX a+  = TM { tm_var    :: VarMap a+       , tm_app    :: TypeMapG (TypeMapG a)+       , tm_tycon  :: DNameEnv a+       , tm_forall :: TypeMapG (BndrMap a) -- See Note [Binders]+       , tm_tylit  :: TyLitMap a+       , tm_coerce :: Maybe a+       }+    -- Note that there is no tyconapp case; see Note [Equality on AppTys] in Type++-- | Squeeze out any synonyms, and change TyConApps to nested AppTys. Why the+-- last one? See Note [Equality on AppTys] in Type+--+-- Note, however, that we keep Constraint and Type apart here, despite the fact+-- that they are both synonyms of TYPE 'LiftedRep (see #11715).+trieMapView :: Type -> Maybe Type+trieMapView ty+  -- First check for TyConApps that need to be expanded to+  -- AppTy chains.+  | Just (tc, tys@(_:_)) <- tcSplitTyConApp_maybe ty+  = Just $ foldl AppTy (TyConApp tc []) tys++  -- Then resolve any remaining nullary synonyms.+  | Just ty' <- tcView ty = Just ty'+trieMapView _ = Nothing++instance TrieMap TypeMapX where+   type Key TypeMapX = DeBruijn Type+   emptyTM  = emptyT+   lookupTM = lkT+   alterTM  = xtT+   foldTM   = fdT+   mapTM    = mapT++instance Eq (DeBruijn Type) where+  env_t@(D env t) == env_t'@(D env' t')+    | Just new_t  <- tcView t  = D env new_t == env_t'+    | Just new_t' <- tcView t' = env_t       == D env' new_t'+    | otherwise+    = case (t, t') of+        (CastTy t1 _, _)  -> D env t1 == D env t'+        (_, CastTy t1' _) -> D env t  == D env t1'++        (TyVarTy v, TyVarTy v')+            -> case (lookupCME env v, lookupCME env' v') of+                (Just bv, Just bv') -> bv == bv'+                (Nothing, Nothing)  -> v == v'+                _ -> False+                -- See Note [Equality on AppTys] in Type+        (AppTy t1 t2, s) | Just (t1', t2') <- repSplitAppTy_maybe s+            -> 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')+            -> 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'+        (LitTy l, LitTy l')+            -> l == l'+        (ForAllTy (TvBndr tv _) ty, ForAllTy (TvBndr tv' _) ty')+            -> D env (tyVarKind tv)    == D env' (tyVarKind tv') &&+               D (extendCME env tv) ty == D (extendCME env' tv') ty'+        (CoercionTy {}, CoercionTy {})+            -> True+        _ -> False++instance {-# OVERLAPPING #-}+         Outputable a => Outputable (TypeMapG a) where+  ppr m = text "TypeMap elts" <+> ppr (foldTM (:) m [])++emptyT :: TypeMapX a+emptyT = TM { tm_var  = emptyTM+            , tm_app  = emptyTM+            , tm_tycon  = emptyDNameEnv+            , tm_forall = emptyTM+            , tm_tylit  = emptyTyLitMap+            , tm_coerce = Nothing }++mapT :: (a->b) -> TypeMapX a -> TypeMapX b+mapT f (TM { tm_var  = tvar, tm_app = tapp, tm_tycon = ttycon+           , tm_forall = tforall, tm_tylit = tlit+           , tm_coerce = tcoerce })+  = TM { tm_var    = mapTM f tvar+       , tm_app    = mapTM (mapTM f) tapp+       , tm_tycon  = mapTM f ttycon+       , tm_forall = mapTM (mapTM f) tforall+       , tm_tylit  = mapTM f tlit+       , tm_coerce = fmap f tcoerce }++-----------------+lkT :: DeBruijn Type -> TypeMapX a -> Maybe a+lkT (D env ty) m = go ty m+  where+    go ty | Just ty' <- trieMapView ty = go ty'+    go (TyVarTy v)                 = tm_var    >.> lkVar env v+    go (AppTy t1 t2)               = tm_app    >.> lkG (D env t1)+                                               >=> lkG (D env t2)+    go (TyConApp tc [])            = tm_tycon  >.> lkDNamed tc+    go ty@(TyConApp _ (_:_))       = pprPanic "lkT TyConApp" (ppr ty)+    go (LitTy l)                   = tm_tylit  >.> lkTyLit l+    go (ForAllTy (TvBndr tv _) ty) = tm_forall >.> lkG (D (extendCME env tv) ty)+                                               >=> lkBndr env tv+    go ty@(FunTy {})               = pprPanic "lkT FunTy" (ppr ty)+    go (CastTy t _)                = go t+    go (CoercionTy {})             = tm_coerce++-----------------+xtT :: DeBruijn Type -> XT a -> TypeMapX a -> TypeMapX a+xtT (D env ty) f m | Just ty' <- trieMapView ty = xtT (D env ty') f m++xtT (D env (TyVarTy v))       f m = m { tm_var    = tm_var m |> xtVar env v f }+xtT (D env (AppTy t1 t2))     f m = m { tm_app    = tm_app m |> xtG (D env t1)+                                                            |>> xtG (D env t2) f }+xtT (D _   (TyConApp tc []))  f m = m { tm_tycon  = tm_tycon m |> xtDNamed tc f }+xtT (D _   (LitTy l))         f m = m { tm_tylit  = tm_tylit m |> xtTyLit l f }+xtT (D env (CastTy t _))      f m = xtT (D env t) f m+xtT (D _   (CoercionTy {}))   f m = m { tm_coerce = tm_coerce m |> f }+xtT (D env (ForAllTy (TvBndr tv _) ty))  f m+  = m { tm_forall = tm_forall m |> xtG (D (extendCME env tv) ty)+                                |>> xtBndr env tv f }+xtT (D _   ty@(TyConApp _ (_:_))) _ _ = pprPanic "xtT TyConApp" (ppr ty)+xtT (D _   ty@(FunTy {}))         _ _ = pprPanic "xtT FunTy" (ppr ty)++fdT :: (a -> b -> b) -> TypeMapX a -> b -> b+fdT k m = foldTM k (tm_var m)+        . foldTM (foldTM k) (tm_app m)+        . foldTM k (tm_tycon m)+        . foldTM (foldTM k) (tm_forall m)+        . foldTyLit k (tm_tylit m)+        . foldMaybe k (tm_coerce m)++------------------------+data TyLitMap a = TLM { tlm_number :: Map.Map Integer a+                      , tlm_string :: Map.Map FastString a+                      }++instance TrieMap TyLitMap where+   type Key TyLitMap = TyLit+   emptyTM  = emptyTyLitMap+   lookupTM = lkTyLit+   alterTM  = xtTyLit+   foldTM   = foldTyLit+   mapTM    = mapTyLit++emptyTyLitMap :: TyLitMap a+emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = Map.empty }++mapTyLit :: (a->b) -> TyLitMap a -> TyLitMap b+mapTyLit f (TLM { tlm_number = tn, tlm_string = ts })+  = TLM { tlm_number = Map.map f tn, tlm_string = Map.map f ts }++lkTyLit :: TyLit -> TyLitMap a -> Maybe a+lkTyLit l =+  case l of+    NumTyLit n -> tlm_number >.> Map.lookup n+    StrTyLit n -> tlm_string >.> Map.lookup n++xtTyLit :: TyLit -> XT a -> TyLitMap a -> TyLitMap a+xtTyLit l f m =+  case l of+    NumTyLit n -> m { tlm_number = tlm_number m |> Map.alter f n }+    StrTyLit n -> m { tlm_string = tlm_string m |> Map.alter f n }++foldTyLit :: (a -> b -> b) -> TyLitMap a -> b -> b+foldTyLit l m = flip (Map.foldr l) (tlm_string m)+              . flip (Map.foldr l) (tlm_number m)++-------------------------------------------------+-- | @TypeMap a@ is a map from 'Type' to @a@.  If you are a client, this+-- is the type you want. The keys in this map may have different kinds.+newtype TypeMap a = TypeMap (TypeMapG (TypeMapG a))++lkTT :: DeBruijn Type -> TypeMap a -> Maybe a+lkTT (D env ty) (TypeMap m) = lkG (D env $ typeKind ty) m+                          >>= lkG (D env ty)++xtTT :: DeBruijn Type -> XT a -> TypeMap a -> TypeMap a+xtTT (D env ty) f (TypeMap m)+  = TypeMap (m |> xtG (D env $ typeKind ty)+               |>> xtG (D env ty) f)++-- Below are some client-oriented functions which operate on 'TypeMap'.++instance TrieMap TypeMap where+    type Key TypeMap = Type+    emptyTM = TypeMap emptyTM+    lookupTM k m = lkTT (deBruijnize k) m+    alterTM k f m = xtTT (deBruijnize k) f m+    foldTM k (TypeMap m) = foldTM (foldTM k) m+    mapTM f (TypeMap m) = TypeMap (mapTM (mapTM f) m)++foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b+foldTypeMap k z m = foldTM k m z++emptyTypeMap :: TypeMap a+emptyTypeMap = emptyTM++lookupTypeMap :: TypeMap a -> Type -> Maybe a+lookupTypeMap cm t = lookupTM t cm++extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a+extendTypeMap m t v = alterTM t (const (Just v)) m++lookupTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> Maybe a+lookupTypeMapWithScope m cm t = lkTT (D cm t) m++-- | Extend a 'TypeMap' with a type in the given context.+-- @extendTypeMapWithScope m (mkDeBruijnContext [a,b,c]) t v@ is equivalent to+-- @extendTypeMap m (forall a b c. t) v@, but allows reuse of the context over+-- multiple insertions.+extendTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> a -> TypeMap a+extendTypeMapWithScope m cm t v = xtTT (D cm t) (const (Just v)) m++-- | Construct a deBruijn environment with the given variables in scope.+-- e.g. @mkDeBruijnEnv [a,b,c]@ constructs a context @forall a b c.@+mkDeBruijnContext :: [Var] -> CmEnv+mkDeBruijnContext = extendCMEs emptyCME++-- | A 'LooseTypeMap' doesn't do a kind-check. Thus, when lookup up (t |> g),+-- you'll find entries inserted under (t), even if (g) is non-reflexive.+newtype LooseTypeMap a+  = LooseTypeMap (TypeMapG a)++instance TrieMap LooseTypeMap where+  type Key LooseTypeMap = Type+  emptyTM = LooseTypeMap emptyTM+  lookupTM k (LooseTypeMap m) = lookupTM (deBruijnize k) m+  alterTM k f (LooseTypeMap m) = LooseTypeMap (alterTM (deBruijnize k) f m)+  foldTM f (LooseTypeMap m) = foldTM f m+  mapTM f (LooseTypeMap m) = LooseTypeMap (mapTM f m)++{-+************************************************************************+*                                                                      *+                   Variables+*                                                                      *+************************************************************************+-}++type BoundVar = Int  -- Bound variables are deBruijn numbered+type BoundVarMap a = IntMap.IntMap a++data CmEnv = CME { cme_next :: !BoundVar+                 , cme_env  :: VarEnv BoundVar }++emptyCME :: CmEnv+emptyCME = CME { cme_next = 0, cme_env = emptyVarEnv }++extendCME :: CmEnv -> Var -> CmEnv+extendCME (CME { cme_next = bv, cme_env = env }) v+  = CME { cme_next = bv+1, cme_env = extendVarEnv env v bv }++extendCMEs :: CmEnv -> [Var] -> CmEnv+extendCMEs env vs = foldl extendCME env vs++lookupCME :: CmEnv -> Var -> Maybe BoundVar+lookupCME (CME { cme_env = env }) v = lookupVarEnv env v++-- | @DeBruijn a@ represents @a@ modulo alpha-renaming.  This is achieved+-- by equipping the value with a 'CmEnv', which tracks an on-the-fly deBruijn+-- numbering.  This allows us to define an 'Eq' instance for @DeBruijn a@, even+-- if this was not (easily) possible for @a@.  Note: we purposely don't+-- export the constructor.  Make a helper function if you find yourself+-- needing it.+data DeBruijn a = D CmEnv a++-- | Synthesizes a @DeBruijn a@ from an @a@, by assuming that there are no+-- bound binders (an empty 'CmEnv').  This is usually what you want if there+-- isn't already a 'CmEnv' in scope.+deBruijnize :: a -> DeBruijn a+deBruijnize = D emptyCME++instance Eq (DeBruijn a) => Eq (DeBruijn [a]) where+    D _   []     == D _    []       = True+    D env (x:xs) == D env' (x':xs') = D env x  == D env' x' &&+                                      D env xs == D env' xs'+    _            == _               = False++--------- Variable binders -------------++-- | A 'BndrMap' is a 'TypeMapG' which allows us to distinguish between+-- binding forms whose binders have different types.  For example,+-- if we are doing a 'TrieMap' lookup on @\(x :: Int) -> ()@, we should+-- not pick up an entry in the 'TrieMap' for @\(x :: Bool) -> ()@:+-- we can disambiguate this by matching on the type (or kind, if this+-- a binder in a type) of the binder.+type BndrMap = TypeMapG++-- Note [Binders]+-- ~~~~~~~~~~~~~~+-- We need to use 'BndrMap' for 'Coercion', 'CoreExpr' AND 'Type', since all+-- of these data types have binding forms.++lkBndr :: CmEnv -> Var -> BndrMap a -> Maybe a+lkBndr env v m = lkG (D env (varType v)) m++xtBndr :: CmEnv -> Var -> XT a -> BndrMap a -> BndrMap a+xtBndr env v f = xtG (D env (varType v)) f++--------- Variable occurrence -------------+data VarMap a = VM { vm_bvar   :: BoundVarMap a  -- Bound variable+                   , vm_fvar   :: DVarEnv a }      -- Free variable++instance TrieMap VarMap where+   type Key VarMap = Var+   emptyTM  = VM { vm_bvar = IntMap.empty, vm_fvar = emptyDVarEnv }+   lookupTM = lkVar emptyCME+   alterTM  = xtVar emptyCME+   foldTM   = fdVar+   mapTM    = mapVar++mapVar :: (a->b) -> VarMap a -> VarMap b+mapVar f (VM { vm_bvar = bv, vm_fvar = fv })+  = VM { vm_bvar = mapTM f bv, vm_fvar = mapTM f fv }++lkVar :: CmEnv -> Var -> VarMap a -> Maybe a+lkVar env v+  | Just bv <- lookupCME env v = vm_bvar >.> lookupTM bv+  | otherwise                  = vm_fvar >.> lkDFreeVar v++xtVar :: CmEnv -> Var -> XT a -> VarMap a -> VarMap a+xtVar env v f m+  | Just bv <- lookupCME env v = m { vm_bvar = vm_bvar m |> alterTM bv f }+  | otherwise                  = m { vm_fvar = vm_fvar m |> xtDFreeVar v f }++fdVar :: (a -> b -> b) -> VarMap a -> b -> b+fdVar k m = foldTM k (vm_bvar m)+          . foldTM k (vm_fvar m)++lkDFreeVar :: Var -> DVarEnv a -> Maybe a+lkDFreeVar var env = lookupDVarEnv env var++xtDFreeVar :: Var -> XT a -> DVarEnv a -> DVarEnv a+xtDFreeVar v f m = alterDVarEnv f m v
coreSyn/CoreOpt.hs view
@@ -36,6 +36,7 @@ import VarSet import VarEnv import DataCon+import Demand( etaExpandStrictSig ) import OptCoercion ( optCoercion ) import Type     hiding ( substTy, extendTvSubst, extendCvSubst, extendTvSubstList                        , isInScope, substTyVarBndr, cloneTyVarBndr )@@ -86,7 +87,7 @@  -} -simpleOptExpr :: CoreExpr -> CoreExpr+simpleOptExpr :: DynFlags -> CoreExpr -> CoreExpr -- See Note [The simple optimiser] -- Do simple optimisation on an expression -- The optimisation is very straightforward: just@@ -103,9 +104,9 @@ -- in  (let x = y in ....) we substitute for x; so y's occ-info -- may change radically -simpleOptExpr expr+simpleOptExpr dflags expr   = -- pprTrace "simpleOptExpr" (ppr init_subst $$ ppr expr)-    simpleOptExprWith init_subst expr+    simpleOptExprWith dflags init_subst expr   where     init_subst = mkEmptySubst (mkInScopeSet (exprFreeVars expr))         -- It's potentially important to make a proper in-scope set@@ -118,32 +119,35 @@         -- It's a bit painful to call exprFreeVars, because it makes         -- three passes instead of two (occ-anal, and go) -simpleOptExprWith :: Subst -> InExpr -> OutExpr+simpleOptExprWith :: DynFlags -> Subst -> InExpr -> OutExpr -- See Note [The simple optimiser]-simpleOptExprWith subst expr+simpleOptExprWith dflags subst expr   = simple_opt_expr init_env (occurAnalyseExpr expr)   where-    init_env = SOE { soe_inl = emptyVarEnv, soe_subst = subst }+    init_env = SOE { soe_dflags = dflags+                   , soe_inl = emptyVarEnv+                   , soe_subst = subst }  ---------------------- simpleOptPgm :: DynFlags -> Module-             -> CoreProgram -> [CoreRule] -> [CoreVect]-             -> IO (CoreProgram, [CoreRule], [CoreVect])+             -> CoreProgram -> [CoreRule]+             -> IO (CoreProgram, [CoreRule]) -- See Note [The simple optimiser]-simpleOptPgm dflags this_mod binds rules vects+simpleOptPgm dflags this_mod binds rules   = do { dumpIfSet_dyn dflags Opt_D_dump_occur_anal "Occurrence analysis"                        (pprCoreBindings occ_anald_binds $$ pprRules rules ); -       ; return (reverse binds', rules', vects') }+       ; return (reverse binds', rules') }   where-    occ_anald_binds  = occurAnalysePgm this_mod (\_ -> False) {- No rules active -}-                                       rules vects emptyVarSet binds+    occ_anald_binds  = occurAnalysePgm this_mod+                          (\_ -> True)  {- All unfoldings active -}+                          (\_ -> False) {- No rules active -}+                          rules binds -    (final_env, binds') = foldl do_one (emptyEnv, []) occ_anald_binds+    (final_env, binds') = foldl do_one (emptyEnv dflags, []) occ_anald_binds     final_subst = soe_subst final_env      rules' = substRulesForImportedIds final_subst rules-    vects' = substVects final_subst vects              -- We never unconditionally inline into rules,              -- hence paying just a substitution @@ -158,7 +162,8 @@ type SimpleClo = (SimpleOptEnv, InExpr)  data SimpleOptEnv-  = SOE { soe_inl   :: IdEnv SimpleClo+  = SOE { soe_dflags :: DynFlags+        , soe_inl   :: IdEnv SimpleClo              -- Deals with preInlineUnconditionally; things              -- that occur exactly once and are inlined              -- without having first been simplified@@ -173,13 +178,15 @@                             , text "soe_subst =" <+> ppr subst ]                    <+> text "}" -emptyEnv :: SimpleOptEnv-emptyEnv = SOE { soe_inl = emptyVarEnv-               , soe_subst = emptySubst }+emptyEnv :: DynFlags -> SimpleOptEnv+emptyEnv dflags+  = SOE { soe_dflags = dflags+        , soe_inl = emptyVarEnv+        , soe_subst = emptySubst }  soeZapSubst :: SimpleOptEnv -> SimpleOptEnv-soeZapSubst (SOE { soe_subst = subst })-  = SOE { soe_inl = emptyVarEnv, soe_subst = zapSubstEnv subst }+soeZapSubst env@(SOE { soe_subst = subst })+  = env { soe_inl = emptyVarEnv, soe_subst = zapSubstEnv subst }  soeSetInScope :: SimpleOptEnv -> SimpleOptEnv -> SimpleOptEnv -- Take in-scope set from env1, and the rest from env2@@ -208,13 +215,13 @@      go (App e1 e2)      = simple_app env e1 [(env,e2)]     go (Type ty)        = Type     (substTy subst ty)-    go (Coercion co)    = Coercion (optCoercion (getTCvSubst subst) co)+    go (Coercion co)    = Coercion (optCoercion (soe_dflags env) (getTCvSubst subst) co)     go (Lit lit)        = Lit lit     go (Tick tickish e) = mkTick (substTickish subst tickish) (go e)     go (Cast e co)      | isReflCo co' = go e                         | otherwise    = Cast (go e) co'                         where-                          co' = optCoercion (getTCvSubst subst) co+                          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@@ -349,7 +356,7 @@     (env { soe_subst = extendTvSubst subst in_bndr out_ty }, Nothing)    | Coercion co <- in_rhs-  , let out_co = optCoercion (getTCvSubst (soe_subst rhs_env)) co+  , let out_co = optCoercion (soe_dflags env) (getTCvSubst (soe_subst rhs_env)) co   = ASSERT( isCoVar in_bndr )     (env { soe_subst = extendCvSubst subst in_bndr out_co }, Nothing) @@ -357,14 +364,25 @@   = (env { soe_inl = extendVarEnv inl_env in_bndr clo }, Nothing)    | otherwise-  = simple_out_bind_pair env in_bndr mb_out_bndr-                         (simple_opt_clo env clo)+  = simple_out_bind_pair env in_bndr mb_out_bndr out_rhs                          occ active stable_unf   where     stable_unf = isStableUnfolding (idUnfolding in_bndr)     active     = isAlwaysActive (idInlineActivation in_bndr)     occ        = idOccInfo in_bndr +    out_rhs | Just join_arity <- isJoinId_maybe in_bndr+            = simple_join_rhs join_arity+            | otherwise+            = simple_opt_clo env clo++    simple_join_rhs join_arity -- See Note [Preserve join-binding arity]+      = mkLams join_bndrs' (simple_opt_expr env_body join_body)+      where+        env0 = soeSetInScope env rhs_env+        (join_bndrs, join_body) = collectNBinders join_arity in_rhs+        (env_body, join_bndrs') = subst_opt_bndrs env0 join_bndrs+     pre_inline_unconditionally :: Bool     pre_inline_unconditionally        | isCoVar in_bndr          = False    -- See Note [Do not inline CoVars unconditionally]@@ -449,6 +467,14 @@ Those differences obviate the reasons for not inlining a trivial rhs, and increase the benefit for doing so.  So we unconditionally inline trivial rhss here.++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 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). -}  ----------------------@@ -473,8 +499,8 @@ -- It's important to zap fragile OccInfo (which CoreSubst.substIdBndr -- carefully does not do) because simplOptExpr invalidates it -subst_opt_id_bndr (SOE { soe_subst = subst, soe_inl = inl }) old_id-  = (SOE { soe_subst = new_subst, soe_inl = new_inl }, new_id)+subst_opt_id_bndr env@(SOE { soe_subst = subst, soe_inl = inl }) old_id+  = (env { soe_subst = new_subst, soe_inl = new_inl }, new_id)   where     Subst in_scope id_subst tv_subst cv_subst = subst @@ -515,18 +541,6 @@ wrapLet Nothing      body = body wrapLet (Just (b,r)) body = Let (NonRec b r) body --------------------substVects :: Subst -> [CoreVect] -> [CoreVect]-substVects subst = map (substVect subst)---------------------substVect :: Subst -> CoreVect -> CoreVect-substVect subst  (Vect v rhs)        = Vect v (simpleOptExprWith subst rhs)-substVect _subst vd@(NoVect _)       = vd-substVect _subst vd@(VectType _ _ _) = vd-substVect _subst vd@(VectClass _)    = vd-substVect _subst vd@(VectInst _)     = vd- {- Note [Inline prag in simplOpt] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -645,7 +659,11 @@    | AlwaysTailCalled join_arity <- tailCallInfo (idOccInfo bndr)   , (bndrs, body) <- etaExpandToJoinPoint join_arity rhs-  = Just (bndr `asJoinId` join_arity, mkLams bndrs body)+  , let str_sig   = idStrictness bndr+        str_arity = count isId bndrs  -- Strictness demands are for Ids only+        join_bndr = bndr `asJoinId`        join_arity+                         `setIdStrictness` etaExpandStrictSig str_arity str_sig+  = Just (join_bndr, mkLams bndrs body)    | otherwise   = Nothing@@ -655,6 +673,27 @@   = mapM (uncurry joinPointBinding_maybe) bndrs  +{- Note [Strictness and join points]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have++   let f = \x.  if x>200 then e1 else e1++and we know that f is strict in x.  Then if we subsequently+discover that f is an arity-2 join point, we'll eta-expand it to++   let f = \x y.  if x>200 then e1 else e1++and now it's only strict if applied to two arguments.  So we should+adjust the strictness info.++A more common case is when++   f = \x. error ".."++and again its arity increses (Trac #15517)+-}+ {- ********************************************************************* *                                                                      *          exprIsConApp_maybe@@ -730,9 +769,11 @@     go subst (Tick t expr) cont        | not (tickishIsCode t) = go subst expr cont     go subst (Cast expr co1) (CC args co2)-       | Just (args', co1') <- pushCoArgs (subst_co subst co1) args+       | Just (args', m_co1') <- pushCoArgs (subst_co subst co1) args             -- See Note [Push coercions in exprIsConApp_maybe]-       = go subst expr (CC args' (co1' `mkTransCo` co2))+       = 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)@@ -892,7 +933,7 @@     -- Make sure there is hope to get a lambda     , Just rhs <- expandUnfolding_maybe (id_unf f)     -- Optimize, for beta-reduction-    , let e' =  simpleOptExprWith (mkEmptySubst in_scope_set) (rhs `mkApps` as)+    , let e' = simpleOptExprWith unsafeGlobalDynFlags (mkEmptySubst in_scope_set) (rhs `mkApps` as)     -- Recurse, because of possible casts     , Just (x', e'', ts') <- exprIsLambda_maybe (in_scope_set, id_unf) e'     , let res = Just (x', e'', ts++ts')@@ -926,36 +967,45 @@   by pushing the coercion into the arguments -} -pushCoArgs :: Coercion -> [CoreArg] -> Maybe ([CoreArg], Coercion)-pushCoArgs co []         = return ([], co)-pushCoArgs co (arg:args) = do { (arg',  co1) <- pushCoArg  co  arg-                              ; (args', co2) <- pushCoArgs co1 args-                              ; return (arg':args', co2) }+pushCoArgs :: CoercionR -> [CoreArg] -> Maybe ([CoreArg], MCoercion)+pushCoArgs co []         = return ([], MCo co)+pushCoArgs co (arg:args) = do { (arg',  m_co1) <- pushCoArg  co  arg+                              ; case m_co1 of+                                  MCo co1 -> do { (args', m_co2) <- pushCoArgs co1 args+                                                 ; return (arg':args', m_co2) }+                                  MRefl  -> return (arg':args, MRefl) } -pushCoArg :: Coercion -> CoreArg -> Maybe (CoreArg, Coercion)+pushCoArg :: CoercionR -> CoreArg -> Maybe (CoreArg, MCoercion) -- We have (fun |> co) arg, and we want to transform it to --         (fun arg) |> co -- This may fail, e.g. if (fun :: N) where N is a newtype -- C.f. simplCast in Simplify.hs -- 'co' is always Representational--pushCoArg co (Type ty) = do { (ty', co') <- pushCoTyArg co ty-                            ; return (Type ty', co') }-pushCoArg co val_arg   = do { (arg_co, co') <- pushCoValArg co-                            ; return (mkCast val_arg arg_co, co') }+-- If the returned coercion is Nothing, then it would have been reflexive+pushCoArg co (Type ty) = do { (ty', m_co') <- pushCoTyArg co ty+                            ; return (Type ty', m_co') }+pushCoArg co val_arg   = do { (arg_co, m_co') <- pushCoValArg co+                            ; return (val_arg `mkCast` arg_co, m_co') } -pushCoTyArg :: Coercion -> Type -> Maybe (Type, Coercion)+pushCoTyArg :: CoercionR -> Type -> Maybe (Type, MCoercionR) -- We have (fun |> co) @ty -- Push the coercion through to return --         (fun @ty') |> co' -- 'co' is always Representational+-- If the returned coercion is Nothing, then it would have been reflexive;+-- it's faster not to compute it, though. pushCoTyArg co ty-  | tyL `eqType` tyR-  = Just (ty, mkRepReflCo (piResultTy tyR ty))+  -- The following is inefficient - don't do `eqType` here, the coercion+  -- optimizer will take care of it. See Trac #14737.+  -- -- | tyL `eqType` tyR+  -- -- = Just (ty, Nothing) +  | isReflCo co+  = Just (ty, MRefl)+   | isForAllTy tyL   = ASSERT2( isForAllTy tyR, ppr co $$ ppr ty )-    Just (ty `mkCastTy` mkSymCo co1, co2)+    Just (ty `mkCastTy` co1, MCo co2)    | otherwise   = Nothing@@ -965,41 +1015,48 @@        -- tyL = forall (a1 :: k1). ty1        -- tyR = forall (a2 :: k2). ty2 -    co1 = mkNthCo 0 co-       -- co1 :: k1 ~ k2-       -- Note that NthCo can extract an equality between the kinds-       -- of the types related by a coercion between forall-types.+    co1 = mkSymCo (mkNthCo Nominal 0 co)+       -- co1 :: k2 ~N k1+       -- Note that NthCo can extract a Nominal equality between the+       -- kinds of the types related by a coercion between forall-types.        -- See the NthCo case in CoreLint.      co2 = mkInstCo co (mkCoherenceLeftCo (mkNomReflCo ty) co1)         -- co2 :: ty1[ (ty|>co1)/a1 ] ~ ty2[ ty/a2 ]         -- Arg of mkInstCo is always nominal, hence mkNomReflCo -pushCoValArg :: Coercion -> Maybe (Coercion, Coercion)+pushCoValArg :: CoercionR -> Maybe (Coercion, MCoercion) -- We have (fun |> co) arg -- Push the coercion through to return --         (fun (arg |> co_arg)) |> co_res -- 'co' is always Representational+-- If the second returned Coercion is actually Nothing, then no cast is necessary;+-- the returned coercion would have been reflexive. pushCoValArg co-  | tyL `eqType` tyR-  = Just (mkRepReflCo arg, mkRepReflCo res)+  -- The following is inefficient - don't do `eqType` here, the coercion+  -- optimizer will take care of it. See Trac #14737.+  -- -- | tyL `eqType` tyR+  -- -- = Just (mkRepReflCo arg, Nothing) +  | isReflCo co+  = Just (mkRepReflCo arg, MRefl)+   | isFunTy tyL-  , (co1, co2) <- decomposeFunCo co+  , (co1, co2) <- decomposeFunCo Representational co               -- If   co  :: (tyL1 -> tyL2) ~ (tyR1 -> tyR2)               -- then co1 :: tyL1 ~ tyR1               --      co2 :: tyL2 ~ tyR2   = ASSERT2( isFunTy tyR, ppr co $$ ppr arg )-    Just (mkSymCo co1, co2)+    Just (mkSymCo co1, MCo co2)    | otherwise   = Nothing   where-    (arg, res)   = splitFunTy tyR+    arg = funArgTy tyR     Pair tyL tyR = coercionKind co  pushCoercionIntoLambda-    :: InScopeSet -> Var -> CoreExpr -> Coercion -> Maybe (Var, CoreExpr)+    :: InScopeSet -> Var -> CoreExpr -> CoercionR -> Maybe (Var, CoreExpr) -- This implements the Push rule from the paper on coercions --    (\x. e) |> co -- ===>@@ -1009,7 +1066,7 @@     , Pair s1s2 t1t2 <- coercionKind co     , Just (_s1,_s2) <- splitFunTy_maybe s1s2     , Just (t1,_t2) <- splitFunTy_maybe t1t2-    = let (co1, co2) = decomposeFunCo co+    = let (co1, co2) = decomposeFunCo Representational co           -- Should we optimize the coercions here?           -- Otherwise they might not match too well           x' = x `setIdType` t1@@ -1055,7 +1112,7 @@         (ex_args, val_args) = splitAtList dc_ex_tyvars non_univ_args          -- Make the "Psi" from the paper-        omegas = decomposeCo tc_arity co+        omegas = decomposeCo tc_arity co (tyConRolesRepresentational to_tc)         (psi_subst, to_ex_arg_tys)           = liftCoSubstWithEx Representational                               dc_univ_tyvars@@ -1102,7 +1159,7 @@     go bs e           = (reverse bs, e)      -- We are in a cast; peel off casts until we hit a lambda.-    go_c :: [Var] -> CoreExpr -> Coercion -> ([Var], CoreExpr)+    go_c :: [Var] -> CoreExpr -> CoercionR -> ([Var], CoreExpr)     -- (go_c bs e c) is same as (go bs e (e |> c))     go_c bs (Cast e co1) co2 = go_c bs e (co1 `mkTransCo` co2)     go_c bs (Lam b e)    co  = go_lam bs b e co@@ -1110,20 +1167,20 @@      -- We are in a lambda under a cast; peel off lambdas and build a     -- new coercion for the body.-    go_lam :: [Var] -> Var -> CoreExpr -> Coercion -> ([Var], CoreExpr)+    go_lam :: [Var] -> Var -> CoreExpr -> CoercionR -> ([Var], CoreExpr)     -- (go_lam bs b e c) is same as (go_c bs (\b.e) c)     go_lam bs b e co       | isTyVar b       , let Pair tyL tyR = coercionKind co       , ASSERT( isForAllTy tyL )         isForAllTy tyR-      , isReflCo (mkNthCo 0 co)  -- See Note [collectBindersPushingCo]+      , isReflCo (mkNthCo Nominal 0 co)  -- See Note [collectBindersPushingCo]       = go_c (b:bs) e (mkInstCo co (mkNomReflCo (mkTyVarTy b)))        | isId b       , let Pair tyL tyR = coercionKind co       , ASSERT( isFunTy tyL) isFunTy tyR-      , (co_arg, co_res) <- decomposeFunCo co+      , (co_arg, co_res) <- decomposeFunCo Representational co       , isReflCo co_arg  -- See Note [collectBindersPushingCo]       = go_c (b:bs) e co_res 
coreSyn/CorePrep.hs view
@@ -8,8 +8,9 @@ {-# LANGUAGE BangPatterns, CPP, MultiWayIf #-}  module CorePrep (-      corePrepPgm, corePrepExpr, cvtLitInteger,-      lookupMkIntegerName, lookupIntegerSDataConName+      corePrepPgm, corePrepExpr, cvtLitInteger, cvtLitNatural,+      lookupMkIntegerName, lookupIntegerSDataConName,+      lookupMkNaturalName, lookupNaturalSDataConName   ) where  #include "HsVersions.h"@@ -122,11 +123,13 @@     special case where we use the S# constructor for Integers that     are in the range of Int. -11. Uphold tick consistency while doing this: We move ticks out of+11. Same for LitNatural.++12. Uphold tick consistency while doing this: We move ticks out of     (non-type) applications where we can, and make sure that we     annotate according to scoping rules when floating. -12. Collect cost centres (including cost centres in unfoldings) if we're in+13. Collect cost centres (including cost centres in unfoldings) if we're in     profiling mode. We have to do this here beucase we won't have unfoldings     after this pass (see `zapUnfolding` and Note [Drop unfoldings and rules]. @@ -419,23 +422,21 @@   = do { (_, bndr1) <- cpCloneBndr env bndr        ; let dmd         = idDemandInfo bndr              is_unlifted = isUnliftedType (idType bndr)-       ; (floats, bndr2, rhs2) <- cpePair top_lvl NonRecursive-                                          dmd-                                          is_unlifted-                                          env bndr1 rhs+       ; (floats, rhs1) <- cpePair top_lvl NonRecursive+                                   dmd is_unlifted+                                   env bndr1 rhs        -- See Note [Inlining in CorePrep]-       ; if exprIsTrivial rhs2 && isNotTopLevel top_lvl-            then return (extendCorePrepEnvExpr env bndr rhs2, floats, Nothing)+       ; if exprIsTrivial rhs1 && isNotTopLevel top_lvl+            then return (extendCorePrepEnvExpr env bndr rhs1, floats, Nothing)             else do { -       ; let new_float = mkFloat dmd is_unlifted bndr2 rhs2+       ; let new_float = mkFloat dmd is_unlifted bndr1 rhs1 -        -- We want bndr'' in the envt, because it records-        -- the evaluated-ness of the binder-       ; return (extendCorePrepEnv env bndr bndr2,+       ; return (extendCorePrepEnv env bndr bndr1,                  addFloat floats new_float,                  Nothing) }}-  | otherwise -- See Note [Join points and floating]++  | otherwise -- A join point; see Note [Join points and floating]   = ASSERT(not (isTopLevel top_lvl)) -- can't have top-level join point     do { (_, bndr1) <- cpCloneBndr env bndr        ; (bndr2, rhs1) <- cpeJoinPair env bndr1 rhs@@ -446,14 +447,17 @@ cpeBind top_lvl env (Rec pairs)   | not (isJoinId (head bndrs))   = do { (env', bndrs1) <- cpCloneBndrs env bndrs-       ; stuff <- zipWithM (cpePair top_lvl Recursive topDmd False env') bndrs1 rhss+       ; stuff <- zipWithM (cpePair top_lvl Recursive topDmd False env')+                           bndrs1 rhss -       ; let (floats_s, bndrs2, rhss2) = unzip3 stuff-             all_pairs = foldrOL add_float (bndrs2 `zip` rhss2)+       ; let (floats_s, rhss1) = unzip stuff+             all_pairs = foldrOL add_float (bndrs1 `zip` rhss1)                                            (concatFloats floats_s)-       ; return (extendCorePrepEnvList env (bndrs `zip` bndrs2),++       ; return (extendCorePrepEnvList env (bndrs `zip` bndrs1),                  unitFloat (FloatLet (Rec all_pairs)),                  Nothing) }+   | otherwise -- See Note [Join points and floating]   = do { (env', bndrs1) <- cpCloneBndrs env bndrs        ; pairs1 <- zipWithM (cpeJoinPair env') bndrs1 rhss@@ -473,9 +477,10 @@  --------------- cpePair :: TopLevelFlag -> RecFlag -> Demand -> Bool-        -> CorePrepEnv -> Id -> CoreExpr-        -> UniqSM (Floats, Id, CpeRhs)+        -> CorePrepEnv -> OutId -> CoreExpr+        -> UniqSM (Floats, CpeRhs) -- Used for all bindings+-- The binder is already cloned, hence an OutId cpePair top_lvl is_rec dmd is_unlifted env bndr rhs   = ASSERT(not (isJoinId bndr)) -- those should use cpeJoinPair     do { (floats1, rhs1) <- cpeRhsE env rhs@@ -497,15 +502,7 @@         -- Wrap floating ticks        ; let (floats4, rhs4) = wrapTicks floats3 rhs3 -        -- Record if the binder is evaluated-        -- and otherwise trim off the unfolding altogether-        -- It's not used by the code generator; getting rid of it reduces-        -- heap usage and, since we may be changing uniques, we'd have-        -- to substitute to keep it right-       ; let bndr' | exprIsHNF rhs3 = bndr `setIdUnfolding` evaldUnfolding-                   | otherwise      = bndr `setIdUnfolding` noUnfolding--       ; return (floats4, bndr', rhs4) }+       ; return (floats4, rhs4) }   where     platform = targetPlatform (cpe_dynFlags env) @@ -585,7 +582,6 @@ {- Note [Arity and join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~- Up to now, we've allowed a join point to have an arity greater than its join arity (minus type arguments), since this is what's useful for eta expansion. However, for code gen purposes, its arity must be exactly the number of value@@ -615,9 +611,12 @@  cpeRhsE _env expr@(Type {})      = return (emptyFloats, expr) cpeRhsE _env expr@(Coercion {})  = return (emptyFloats, expr)-cpeRhsE env (Lit (LitInteger i _))+cpeRhsE env (Lit (LitNumber LitNumInteger i _))     = cpeRhsE env (cvtLitInteger (cpe_dynFlags env) (getMkIntegerId env)                    (cpe_integerSDataCon env) i)+cpeRhsE env (Lit (LitNumber LitNumNatural i _))+    = cpeRhsE env (cvtLitNatural (cpe_dynFlags env) (getMkNaturalId env)+                   (cpe_naturalSDataCon env) i) cpeRhsE _env expr@(Lit {}) = return (emptyFloats, expr) cpeRhsE env expr@(Var {})  = cpeApp env expr cpeRhsE env expr@(App {}) = cpeApp env expr@@ -656,9 +655,7 @@  cpeRhsE env (Case scrut bndr ty alts)   = do { (floats, scrut') <- cpeBody env scrut-       ; let bndr1 = bndr `setIdUnfolding` evaldUnfolding-            -- Record that the case binder is evaluated in the alternatives-       ; (env', bndr2) <- cpCloneBndr env bndr1+       ; (env', bndr2) <- cpCloneBndr env bndr        ; let alts'                  -- This flag is intended to aid in debugging strictness                  -- analysis bugs. These are particularly nasty to chase down as@@ -702,6 +699,24 @@         bits = 31         mask = 2 ^ bits - 1 +cvtLitNatural :: DynFlags -> Id -> Maybe DataCon -> Integer -> CoreExpr+-- Here we convert a literal Natural to the low-level+-- representation.+-- See Note [Natural literals] in Literal+cvtLitNatural dflags _ (Just sdatacon) i+  | inWordRange dflags i -- Special case for small naturals+    = mkConApp sdatacon [Lit (mkMachWord dflags i)]++cvtLitNatural dflags mk_natural _ i+    = mkApps (Var mk_natural) [words]+  where words = mkListExpr wordTy (f i)+        f 0 = []+        f x = let low  = x .&. mask+                  high = x `shiftR` bits+              in mkConApp wordDataCon [Lit (mkMachWord dflags low)] : f high+        bits = 32+        mask = 2 ^ bits - 1+ -- --------------------------------------------------------------------------- --              CpeBody: produces a result satisfying CpeBody -- ---------------------------------------------------------------------------@@ -837,6 +852,7 @@           in cpe_app env terminal (args' ++ args) (depth + depth' - 1)     cpe_app env (Var f) [CpeApp _runtimeRep@Type{}, CpeApp _type@Type{}, CpeApp arg] 1         | f `hasKey` runRWKey+        -- See Note [runRW magic]         -- Replace (runRW# f) by (f realWorld#), beta reducing if possible (this         -- is why we return a CorePrepEnv as well)         = case arg of@@ -930,11 +946,51 @@ isLazyExpr (Var f `App` _ `App` _) = f `hasKey` lazyIdKey isLazyExpr _                       = False +{- Note [runRW magic]+~~~~~~~~~~~~~~~~~~~~~+Some definitions, for instance @runST@, must have careful control over float out+of the bindings in their body. Consider this use of @runST@,++    f x = runST ( \ s -> let (a, s')  = newArray# 100 [] s+                             (_, s'') = fill_in_array_or_something a x s'+                         in freezeArray# a s'' )++If we inline @runST@, we'll get:++    f x = let (a, s')  = newArray# 100 [] realWorld#{-NB-}+              (_, s'') = fill_in_array_or_something a x s'+          in freezeArray# a s''++And now if we allow the @newArray#@ binding to float out to become a CAF,+we end up with a result that is totally and utterly wrong:++    f = let (a, s')  = newArray# 100 [] realWorld#{-NB-} -- YIKES!!!+        in \ x ->+            let (_, s'') = fill_in_array_or_something a x s'+            in freezeArray# a s''++All calls to @f@ will share a {\em single} array! Clearly this is nonsense and+must be prevented.++This is what @runRW#@ gives us: by being inlined extremely late in the+optimization (right before lowering to STG, in CorePrep), we can ensure that+no further floating will occur. This allows us to safely inline things like+@runST@, which are otherwise needlessly expensive (see #10678 and #5916).++'runRW' is defined (for historical reasons) in GHC.Magic, with a NOINLINE+pragma.  It is levity-polymorphic.++    runRW# :: forall (r1 :: RuntimeRep). (o :: TYPE r)+           => (State# RealWorld -> (# State# RealWorld, o #))+                              -> (# State# RealWorld, o #)++It needs no special treatment in GHC except this special inlining here+in CorePrep (and in ByteCodeGen).+ -- --------------------------------------------------------------------------- --      CpeArg: produces a result satisfying CpeArg -- --------------------------------------------------------------------------- -{- Note [ANF-ising literal string arguments] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1054,17 +1110,27 @@     eval_data2tag_arg other     -- Should not happen         = pprPanic "eval_data2tag" (ppr other) -{--Note [dataToTag magic]-~~~~~~~~~~~~~~~~~~~~~~-Horrid: we must ensure that the arg of data2TagOp is evaluated-  (data2tag x) -->  (case x of y -> data2tag y)+{- Note [dataToTag magic]+~~~~~~~~~~~~~~~~~~~~~~~~~+We must ensure that the arg of data2TagOp is evaluated. So+in general CorePrep does this transformation:+  data2tag e   -->   case e of y -> data2tag y (yuk yuk) take into account the lambdas we've now introduced  How might it not be evaluated?  Well, we might have floated it out of the scope of a `seq`, or dropped the `seq` altogether. +We only do this if 'e' is not a WHNF.  But if it's a simple+variable (common case) we need to know its evaluated-ness flag.+Example:+   data T = MkT !Bool+   f v = case v of+           MkT y -> dataToTag# y+Here we don't want to generate an extra case on 'y', because it's+already evaluated.  So we want to keep the evaluated-ness flag+on y.  See Note [Preserve evaluated-ness in CorePrep]. + ************************************************************************ *                                                                      *                 Simple CoreSyn operations@@ -1346,8 +1412,8 @@     -- the new binding is static. However it can't mention     -- any non-static things or it would *already* be Caffy     rhs_ok = rhsIsStatic platform (\_ -> False)-                         (\i -> pprPanic "rhsIsStatic" (integer i))-                         -- Integer literals should not show up+                         (\_nt i -> pprPanic "rhsIsStatic" (integer i))+                         -- Integer or Natural literals should not show up  wantFloatNested :: RecFlag -> Demand -> Bool -> Floats -> CpeRhs -> Bool wantFloatNested is_rec dmd is_unlifted floats rhs@@ -1456,7 +1522,9 @@         --      see Note [lazyId magic], Note [Inlining in CorePrep]         --      and Note [CorePrep inlines trivial CoreExpr not Id] (#12076)         , cpe_mkIntegerId     :: Id+        , cpe_mkNaturalId     :: Id         , cpe_integerSDataCon :: Maybe DataCon+        , cpe_naturalSDataCon :: Maybe DataCon     }  lookupMkIntegerName :: DynFlags -> HscEnv -> IO Id@@ -1464,13 +1532,24 @@     = guardIntegerUse dflags $ liftM tyThingId $       lookupGlobal hsc_env mkIntegerName +lookupMkNaturalName :: DynFlags -> HscEnv -> IO Id+lookupMkNaturalName dflags hsc_env+    = guardNaturalUse dflags $ liftM tyThingId $+      lookupGlobal hsc_env mkNaturalName+ lookupIntegerSDataConName :: DynFlags -> HscEnv -> IO (Maybe DataCon) lookupIntegerSDataConName dflags hsc_env = case cIntegerLibraryType of     IntegerGMP -> guardIntegerUse dflags $ liftM (Just . tyThingDataCon) $                   lookupGlobal hsc_env integerSDataConName     IntegerSimple -> return Nothing --- | Helper for 'lookupMkIntegerName' and 'lookupIntegerSDataConName'+lookupNaturalSDataConName :: DynFlags -> HscEnv -> IO (Maybe DataCon)+lookupNaturalSDataConName dflags hsc_env = case cIntegerLibraryType of+    IntegerGMP -> guardNaturalUse dflags $ liftM (Just . tyThingDataCon) $+                  lookupGlobal hsc_env naturalSDataConName+    IntegerSimple -> return Nothing++-- | Helper for 'lookupMkIntegerName', 'lookupIntegerSDataConName' guardIntegerUse :: DynFlags -> IO a -> IO a guardIntegerUse dflags act   | thisPackage dflags == primUnitId@@ -1479,15 +1558,33 @@   = return $ panic "Can't use Integer in integer-*"   | otherwise = act +-- | Helper for 'lookupMkNaturalName', 'lookupNaturalSDataConName'+--+-- Just like we can't use Integer literals in `integer-*`, we can't use Natural+-- literals in `base`. If we do, we get interface loading error for GHC.Natural.+guardNaturalUse :: DynFlags -> IO a -> IO a+guardNaturalUse dflags act+  | thisPackage dflags == primUnitId+  = return $ panic "Can't use Natural in ghc-prim"+  | thisPackage dflags == integerUnitId+  = return $ panic "Can't use Natural in integer-*"+  | thisPackage dflags == baseUnitId+  = return $ panic "Can't use Natural in base"+  | otherwise = act+ mkInitialCorePrepEnv :: DynFlags -> HscEnv -> IO CorePrepEnv mkInitialCorePrepEnv dflags hsc_env     = do mkIntegerId <- lookupMkIntegerName dflags hsc_env+         mkNaturalId <- lookupMkNaturalName dflags hsc_env          integerSDataCon <- lookupIntegerSDataConName dflags hsc_env+         naturalSDataCon <- lookupNaturalSDataConName dflags hsc_env          return $ CPE {                       cpe_dynFlags = dflags,                       cpe_env = emptyVarEnv,                       cpe_mkIntegerId = mkIntegerId,-                      cpe_integerSDataCon = integerSDataCon+                      cpe_mkNaturalId = mkNaturalId,+                      cpe_integerSDataCon = integerSDataCon,+                      cpe_naturalSDataCon = naturalSDataCon                   }  extendCorePrepEnv :: CorePrepEnv -> Id -> Id -> CorePrepEnv@@ -1512,30 +1609,74 @@ getMkIntegerId :: CorePrepEnv -> Id getMkIntegerId = cpe_mkIntegerId +getMkNaturalId :: CorePrepEnv -> Id+getMkNaturalId = cpe_mkNaturalId+ ------------------------------------------------------------------------------ -- Cloning binders -- --------------------------------------------------------------------------- -cpCloneBndrs :: CorePrepEnv -> [Var] -> UniqSM (CorePrepEnv, [Var])+cpCloneBndrs :: CorePrepEnv -> [InVar] -> UniqSM (CorePrepEnv, [OutVar]) cpCloneBndrs env bs = mapAccumLM cpCloneBndr env bs -cpCloneBndr  :: CorePrepEnv -> Var -> UniqSM (CorePrepEnv, Var)+cpCloneBndr  :: CorePrepEnv -> InVar -> UniqSM (CorePrepEnv, OutVar) cpCloneBndr env bndr-  | isLocalId bndr, not (isCoVar bndr)-  = do bndr' <- setVarUnique bndr <$> getUniqueM+  | not (isId bndr)+  = return (env, bndr) -       -- We are going to OccAnal soon, so drop (now-useless) rules/unfoldings-       -- so that we can drop more stuff as dead code.-       -- See also Note [Dead code in CorePrep]-       let bndr'' = bndr' `setIdUnfolding` noUnfolding-                          `setIdSpecialisation` emptyRuleInfo-       return (extendCorePrepEnv env bndr bndr'', bndr'')+  | otherwise+  = do { bndr' <- clone_it bndr -  | otherwise   -- Top level things, which we don't want-                -- to clone, have become GlobalIds by now-                -- And we don't clone tyvars, or coercion variables-  = return (env, bndr)+       -- Drop (now-useless) rules/unfoldings+       -- See Note [Drop unfoldings and rules]+       -- and Note [Preserve evaluated-ness in CorePrep]+       ; let unfolding' = zapUnfolding (realIdUnfolding bndr)+                          -- Simplifier will set the Id's unfolding +             bndr'' = bndr' `setIdUnfolding`      unfolding'+                            `setIdSpecialisation` emptyRuleInfo++       ; return (extendCorePrepEnv env bndr bndr'', bndr'') }+  where+    clone_it bndr+      | isLocalId bndr, not (isCoVar bndr)+      = do { uniq <- getUniqueM; return (setVarUnique bndr uniq) }+      | otherwise   -- Top level things, which we don't want+                    -- to clone, have become GlobalIds by now+                    -- And we don't clone tyvars, or coercion variables+      = return bndr++{- Note [Drop unfoldings and rules]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We want to drop the unfolding/rules on every Id:++  - We are now past interface-file generation, and in the+    codegen pipeline, so we really don't need full unfoldings/rules++  - The unfolding/rule may be keeping stuff alive that we'd like+    to discard.  See  Note [Dead code in CorePrep]++  - Getting rid of unnecessary unfoldings reduces heap usage++  - We are changing uniques, so if we didn't discard unfoldings/rules+    we'd have to substitute in them++HOWEVER, we want to preserve evaluated-ness; see+Note [Preserve evaluated-ness in CorePrep]++Note [Preserve evaluated-ness in CorePrep]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We want to preserve the evaluated-ness of each binder (via+evaldUnfolding) for two reasons++* In the code generator if we have+     case x of y { Red -> e1; DEFAULT -> y }+  we can return 'y' rather than entering it, if we know+  it is evaluated (Trac #14626)++* In the DataToTag magic (in CorePrep itself) we rely on+  evaluated-ness.  See Note Note [dataToTag magic].+-}  ------------------------------------------------------------------------------ -- Cloning ccall Ids; each must have a unique name,
coreSyn/CoreSubst.hs view
@@ -79,19 +79,9 @@ -- -- Some invariants apply to how you use the substitution: ----- 1. #in_scope_invariant# The in-scope set contains at least those 'Id's and 'TyVar's that will be in scope /after/--- applying the substitution to a term. Precisely, the in-scope set must be a superset of the free vars of the--- substitution range that might possibly clash with locally-bound variables in the thing being substituted in.------ 2. #apply_once# You may apply the substitution only /once/------ There are various ways of setting up the in-scope set such that the first of these invariants hold:------ * Arrange that the in-scope set really is all the things in scope------ * Arrange that it's the free vars of the range of the substitution+-- 1. Note [The substitution invariant] in TyCoRep ----- * Make it empty, if you know that all the free vars of the substitution are fresh, and hence can't possibly clash+-- 2. Note [Substitutions apply only once] in TyCoRep data Subst   = Subst InScopeSet  -- Variables in in scope (both Ids and TyVars) /after/                       -- applying the substitution@@ -99,7 +89,7 @@           TvSubstEnv  -- Substitution from TyVars to Types           CvSubstEnv  -- Substitution from CoVars to Coercions -        -- INVARIANT 1: See #in_scope_invariant#+        -- INVARIANT 1: See TyCORep Note [The substitution invariant]         -- This is what lets us deal with name capture properly         -- It's a hard invariant to check...         --@@ -181,7 +171,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 "CoreSubst#in_scope_invariant"+-- | Find the in-scope set: see TyCORep Note [The substitution invariant] substInScope :: Subst -> InScopeSet substInScope (Subst in_scope _ _ _) = in_scope @@ -191,7 +181,8 @@ 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 the "CoreSubst#in_scope_invariant" is true after extending the substitution like this+-- such that TyCORep 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 extendIdSubst (Subst in_scope ids tvs cvs) v r@@ -207,8 +198,8 @@ -- | 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--- the "CoreSubst#in_scope_invariant" is true after extending--- the substitution like this.+-- TyCORep 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   = ASSERT( isTyVar tv )@@ -221,8 +212,10 @@   where     extend subst (v, r) = extendTvSubst subst v r --- | Add a substitution from a 'CoVar' to a 'Coercion' to the 'Subst': you must ensure that the in-scope set is--- such that the "CoreSubst#in_scope_invariant" is true after extending the substitution like this+-- | 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]+-- after extending the substitution like this extendCvSubst :: Subst -> CoVar -> Coercion -> Subst extendCvSubst (Subst in_scope ids tvs cvs) v r   = ASSERT( isCoVar v )@@ -345,7 +338,8 @@ -}  -- | Apply a substitution to an entire 'CoreExpr'. Remember, you may only--- apply the substitution /once/: see "CoreSubst#apply_once"+-- apply the substitution /once/:+-- see Note [Substitutions apply only once] in TyCoRep -- -- Do *not* attempt to short-cut in the case of an empty substitution! -- See Note [Extending the Subst]
coreSyn/CoreSyn.hs view
@@ -5,6 +5,7 @@  {-# LANGUAGE CPP, DeriveDataTypeable, FlexibleContexts #-} {-# LANGUAGE NamedFieldPuns #-}+{-# LANGUAGE BangPatterns #-}  -- | CoreSyn holds all the main data types for use by for the Glasgow Haskell Compiler midsection module CoreSyn (@@ -18,7 +19,7 @@         InId, InBind, InExpr, InAlt, InArg, InType, InKind,                InBndr, InVar, InCoercion, InTyVar, InCoVar,         OutId, OutBind, OutExpr, OutAlt, OutArg, OutType, OutKind,-               OutBndr, OutVar, OutCoercion, OutTyVar, OutCoVar,+               OutBndr, OutVar, OutCoercion, OutTyVar, OutCoVar, MOutCoercion,          -- ** 'Expr' construction         mkLet, mkLets, mkLetNonRec, mkLetRec, mkLams,@@ -40,7 +41,7 @@         bindersOf, bindersOfBinds, rhssOfBind, rhssOfAlts,         collectBinders, collectTyBinders, collectTyAndValBinders,         collectNBinders,-        collectArgs, collectArgsTicks, flattenBinds,+        collectArgs, stripNArgs, collectArgsTicks, flattenBinds,          exprToType, exprToCoercion_maybe,         applyTypeToArg,@@ -92,9 +93,6 @@         ruleArity, ruleName, ruleIdName, ruleActivation,         setRuleIdName, ruleModule,         isBuiltinRule, isLocalRule, isAutoRule,--        -- * Core vectorisation declarations data type-        CoreVect(..)     ) where  #include "HsVersions.h"@@ -112,7 +110,6 @@ import Literal import DataCon import Module-import TyCon import BasicTypes import DynFlags import Outputable@@ -706,34 +703,65 @@   forall a1 ... ak. t1 -> ... -> tn -> r  where its join arity is k+n, none of the type parameters ai may occur free in r.-The most direct explanation is that given -  join j @a1 ... @ak x1 ... xn = e1 in e2+In some way, this falls out of the fact that given -our typing rules require `e1` and `e2` to have the same type. Therefore the type-of `e1`---the return type of the join point---must be the same as the type of-e2. Since the type variables aren't bound in `e2`, its type can't include them,-and thus neither can the type of `e1`.+  join+     j @a1 ... @ak x1 ... xn = e1+  in e2 -There's a deeper explanation in terms of the sequent calculus in Section 5.3 of-a previous paper:+then all calls to `j` are in tail-call positions of `e`, and expressions in+tail-call positions in `e` have the same type as `e`.+Therefore the type of `e1` -- the return type of the join point -- must be the+same as the type of e2.+Since the type variables aren't bound in `e2`, its type can't include them, and+thus neither can the type of `e1`. -  Paul Downen, Luke Maurer, Zena Ariola, and Simon Peyton Jones. "Sequent-  calculus as a compiler intermediate language." ICFP'16.+This unfortunately prevents the `go` in the following code from being a+join-point: -  https://www.microsoft.com/en-us/research/wp-content/uploads/2016/04/sequent-calculus-icfp16.pdf+  iter :: forall a. Int -> (a -> a) -> a -> a+  iter @a n f x = go @a n f x+    where+      go :: forall a. Int -> (a -> a) -> a -> a+      go @a 0 _ x = x+      go @a n f x = go @a (n-1) f (f x) -The quick version: Consider the CPS term (the paper uses the sequent calculus,-but we can translate readily):+In this case, a static argument transformation would fix that (see+ticket #14620): -  \k -> join j @a1 ... @ak x1 ... xn = e1 k in e2 k+  iter :: forall a. Int -> (a -> a) -> a -> a+  iter @a n f x = go' @a n f x+    where+      go' :: Int -> (a -> a) -> a -> a+      go' 0 _ x = x+      go' n f x = go' (n-1) f (f x) -Since `j` is a join point, it doesn't bind a continuation variable but reuses-the variable `k` from the context. But the parameters `ai` are not in `k`'s-scope, and `k`'s type determines the return type of `j`; thus the `ai`s don't-appear in the return type of `j`. (Also, since `e1` and `e2` are passed the same-continuation, they must have the same type; hence the direct explanation above.)+In general, loopification could be employed to do that (see #14068.) +Can we simply drop the requirement, and allow `go` to be a join-point? We+could, and it would work. But we could not longer apply the case-of-join-point+transformation universally. This transformation would do:++  case (join go @a n f x = case n of 0 -> x+                                     n -> go @a (n-1) f (f x)+        in go @Bool n neg True) of+    True -> e1; False -> e2++ ===>++  join go @a n f x = case n of 0 -> case x of True -> e1; False -> e2+                          n -> go @a (n-1) f (f x)+  in go @Bool n neg True++but that is ill-typed, as `x` is type `a`, not `Bool`.+++This also justifies why we do not consider the `e` in `e |> co` to be in+tail position: A cast changes the type, but the type must be the same. But+operationally, casts are vacuous, so this is a bit unfortunate! See #14610 for+ideas how to fix this.+ ************************************************************************ *                                                                      *             In/Out type synonyms@@ -762,6 +790,7 @@ type OutExpr     = CoreExpr type OutAlt      = CoreAlt type OutArg      = CoreArg+type MOutCoercion = MCoercion   {- *********************************************************************@@ -859,7 +888,7 @@      -- | Soft scoping: We want all code that is covered to stay     -- covered.  Note that this scope type does not forbid-    -- transformations from happening, as as long as all results of+    -- transformations from happening, as long as all results of     -- the transformations are still covered by this tick or a copy of     -- it. For example     --@@ -1273,23 +1302,6 @@ {- ************************************************************************ *                                                                      *-\subsection{Vectorisation declarations}-*                                                                      *-************************************************************************--Representation of desugared vectorisation declarations that are fed to the vectoriser (via-'ModGuts').--}--data CoreVect = Vect      Id   CoreExpr-              | NoVect    Id-              | VectType  Bool TyCon (Maybe TyCon)-              | VectClass TyCon                     -- class tycon-              | VectInst  Id                        -- instance dfun (always SCALAR)  !!!FIXME: should be superfluous now--{--************************************************************************-*                                                                      *                 Unfoldings *                                                                      * ************************************************************************@@ -2024,7 +2036,7 @@     go n bs (Lam b e) = go (n-1) (b:bs) e     go _ _  _         = pprPanic "collectNBinders" $ int orig_n --- | Takes a nested application expression and returns the the function+-- | Takes a nested application expression and returns the function -- being applied and the arguments to which it is applied collectArgs :: Expr b -> (Expr b, [Arg b]) collectArgs expr@@ -2033,6 +2045,16 @@     go (App f a) as = go f (a:as)     go e         as = (e, as) +-- | Attempt to remove the last N arguments of a function call.+-- Strip off any ticks or coercions encountered along the way and any+-- at the end.+stripNArgs :: Word -> Expr a -> Maybe (Expr a)+stripNArgs !n (Tick _ e) = stripNArgs n e+stripNArgs n (Cast f _) = stripNArgs n f+stripNArgs 0 e = Just e+stripNArgs n (App f _) = stripNArgs (n - 1) f+stripNArgs _ _ = Nothing+ -- | Like @collectArgs@, but also collects looks through floatable -- ticks if it means that we can find more arguments. collectArgsTicks :: (Tickish Id -> Bool) -> Expr b@@ -2127,7 +2149,7 @@   = AnnNonRec bndr (AnnExpr bndr annot)   | AnnRec    [(bndr, AnnExpr bndr annot)] --- | Takes a nested application expression and returns the the function+-- | Takes a nested application expression and returns the function -- being applied and the arguments to which it is applied collectAnnArgs :: AnnExpr b a -> (AnnExpr b a, [AnnExpr b a]) collectAnnArgs expr
coreSyn/CoreTidy.hs view
@@ -159,9 +159,7 @@                                  `setOneShotInfo` oneShotInfo old_info         old_info = idInfo id         old_unf  = unfoldingInfo old_info-        new_unf | isEvaldUnfolding old_unf = evaldUnfolding-                | otherwise                = noUnfolding-          -- See Note [Preserve evaluatedness]+        new_unf  = zapUnfolding old_unf  -- See Note [Preserve evaluatedness]     in     ((tidy_env', var_env'), id')    }@@ -207,11 +205,10 @@                     `setInlinePragInfo` inlinePragInfo old_info                     `setUnfoldingInfo`  new_unf +        old_unf = unfoldingInfo old_info         new_unf | isStableUnfolding old_unf = tidyUnfolding rec_tidy_env old_unf old_unf-                | isEvaldUnfolding  old_unf = evaldUnfolding+                | otherwise                 = zapUnfolding old_unf                                               -- See Note [Preserve evaluatedness]-                | otherwise                 = noUnfolding-        old_unf = unfoldingInfo old_info     in     ((tidy_env', var_env'), id') } 
coreSyn/CoreUnfold.hs view
@@ -65,8 +65,10 @@ import Util import Outputable import ForeignCall+import Name  import qualified Data.ByteString as BS+import Data.List  {- ************************************************************************@@ -83,7 +85,7 @@ mkImplicitUnfolding :: DynFlags -> CoreExpr -> Unfolding -- For implicit Ids, do a tiny bit of optimising first mkImplicitUnfolding dflags expr-  = mkTopUnfolding dflags False (simpleOptExpr expr)+  = mkTopUnfolding dflags False (simpleOptExpr dflags expr)  -- Note [Top-level flag on inline rules] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -102,17 +104,17 @@                   , df_args = map occurAnalyseExpr ops }                   -- See Note [Occurrence analysis of unfoldings] -mkWwInlineRule :: CoreExpr -> Arity -> Unfolding-mkWwInlineRule expr arity+mkWwInlineRule :: DynFlags -> CoreExpr -> Arity -> Unfolding+mkWwInlineRule dflags expr arity   = mkCoreUnfolding InlineStable True-                   (simpleOptExpr expr)+                   (simpleOptExpr dflags expr)                    (UnfWhen { ug_arity = arity, ug_unsat_ok = unSaturatedOk                             , ug_boring_ok = boringCxtNotOk })  mkCompulsoryUnfolding :: CoreExpr -> Unfolding mkCompulsoryUnfolding expr         -- Used for things that absolutely must be unfolded   = mkCoreUnfolding InlineCompulsory True-                    (simpleOptExpr expr)+                    (simpleOptExpr unsafeGlobalDynFlags expr)                     (UnfWhen { ug_arity = 0    -- Arity of unfolding doesn't matter                              , ug_unsat_ok = unSaturatedOk, ug_boring_ok = boringCxtOk }) @@ -124,7 +126,7 @@   | isStableSource src   = mkCoreUnfolding src top_lvl new_tmpl guidance   where-    new_tmpl = simpleOptExpr (work_fn tmpl)+    new_tmpl = simpleOptExpr dflags (work_fn tmpl)     guidance = calcUnfoldingGuidance dflags False new_tmpl  mkWorkerUnfolding _ _ _ = noUnfolding@@ -139,7 +141,7 @@                     True         -- Note [Top-level flag on inline rules]                     expr' guide   where-    expr' = simpleOptExpr expr+    expr' = simpleOptExpr unsafeGlobalDynFlags expr     guide = UnfWhen { ug_arity = manifestArity expr'                     , ug_unsat_ok = unSaturatedOk                     , ug_boring_ok = boring_ok }@@ -153,7 +155,7 @@                     True         -- Note [Top-level flag on inline rules]                     expr' guide   where-    expr' = simpleOptExpr expr+    expr' = simpleOptExpr unsafeGlobalDynFlags expr     guide = UnfWhen { ug_arity = arity                     , ug_unsat_ok = needSaturated                     , ug_boring_ok = boring_ok }@@ -163,14 +165,15 @@ mkInlinableUnfolding dflags expr   = mkUnfolding dflags InlineStable False False expr'   where-    expr' = simpleOptExpr expr+    expr' = simpleOptExpr dflags expr -specUnfolding :: [Var] -> (CoreExpr -> CoreExpr) -> Arity -> Unfolding -> Unfolding+specUnfolding :: DynFlags -> [Var] -> (CoreExpr -> CoreExpr) -> Arity+              -> Unfolding -> Unfolding -- See Note [Specialising unfoldings] -- specUnfolding spec_bndrs spec_app arity_decrease unf --   = \spec_bndrs. spec_app( unf ) ---specUnfolding spec_bndrs spec_app arity_decrease+specUnfolding dflags spec_bndrs spec_app arity_decrease               df@(DFunUnfolding { df_bndrs = old_bndrs, df_con = con, df_args = args })   = ASSERT2( arity_decrease == count isId old_bndrs - count isId spec_bndrs, ppr df )     mkDFunUnfolding spec_bndrs con (map spec_arg args)@@ -182,11 +185,11 @@       --       \new_bndrs. MkD (spec_app(\old_bndrs. <op1>)) ... ditto <opn>       -- The ASSERT checks the value part of that   where-    spec_arg arg = simpleOptExpr (spec_app (mkLams old_bndrs arg))+    spec_arg arg = simpleOptExpr dflags (spec_app (mkLams old_bndrs arg))                    -- The beta-redexes created by spec_app will be                    -- simplified away by simplOptExpr -specUnfolding spec_bndrs spec_app arity_decrease+specUnfolding dflags spec_bndrs spec_app arity_decrease               (CoreUnfolding { uf_src = src, uf_tmpl = tmpl                              , uf_is_top = top_lvl                              , uf_guidance = old_guidance })@@ -197,13 +200,13 @@  = let guidance = UnfWhen { ug_arity     = old_arity - arity_decrease                           , ug_unsat_ok  = unsat_ok                           , ug_boring_ok = boring_ok }-       new_tmpl = simpleOptExpr (mkLams spec_bndrs (spec_app tmpl))+       new_tmpl = simpleOptExpr dflags (mkLams spec_bndrs (spec_app tmpl))                    -- The beta-redexes created by spec_app will be                    -- simplified away by simplOptExpr     in mkCoreUnfolding src top_lvl new_tmpl guidance -specUnfolding _ _ _ _ = noUnfolding+specUnfolding _ _ _ _ _ = noUnfolding  {- Note [Specialising unfoldings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -698,7 +701,8 @@ -- | Finds a nominal size of a string literal. litSize :: Literal -> Int -- Used by CoreUnfold.sizeExpr-litSize (LitInteger {}) = 100   -- Note [Size of literal integers]+litSize (LitNumber LitNumInteger _ _) = 100   -- Note [Size of literal integers]+litSize (LitNumber LitNumNatural _ _) = 100 litSize (MachStr str)   = 10 + 10 * ((BS.length str + 3) `div` 4)         -- If size could be 0 then @f "x"@ might be too small         -- [Sept03: make literal strings a bit bigger to avoid fruitless@@ -1155,14 +1159,18 @@           | active_unfolding -> tryUnfolding dflags id lone_variable                                     arg_infos cont_info unf_template is_top                                     is_wf is_exp guidance-          | otherwise -> traceInline dflags "Inactive unfolding:" (ppr id) Nothing+          | otherwise -> traceInline dflags id "Inactive unfolding:" (ppr id) Nothing         NoUnfolding      -> Nothing         BootUnfolding    -> Nothing         OtherCon {}      -> Nothing         DFunUnfolding {} -> Nothing     -- Never unfold a DFun -traceInline :: DynFlags -> String -> SDoc -> a -> a-traceInline dflags str doc result+traceInline :: DynFlags -> Id -> String -> SDoc -> a -> a+traceInline dflags inline_id str doc result+ | Just prefix <- inlineCheck dflags+ =  if prefix `isPrefixOf` occNameString (getOccName inline_id)+      then pprTrace str doc result+      else result  | dopt Opt_D_dump_inlinings dflags && dopt Opt_D_verbose_core2core dflags  = pprTrace str doc result  | otherwise@@ -1175,25 +1183,25 @@              arg_infos cont_info unf_template is_top              is_wf is_exp guidance  = case guidance of-     UnfNever -> traceInline dflags str (text "UnfNever") Nothing+     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)                 -- See Note [INLINE for small functions (3)]-        -> traceInline dflags str (mk_doc some_benefit empty True) (Just unf_template)+        -> traceInline dflags id str (mk_doc some_benefit empty True) (Just unf_template)         | otherwise-        -> traceInline dflags str (mk_doc some_benefit empty False) Nothing+        -> traceInline dflags id str (mk_doc some_benefit empty False) Nothing         where           some_benefit = calc_some_benefit uf_arity           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-        -> traceInline dflags str (mk_doc some_benefit extra_doc True) (Just unf_template)+        -> traceInline dflags id str (mk_doc some_benefit extra_doc True) (Just unf_template)         | is_wf && some_benefit && small_enough-        -> traceInline dflags str (mk_doc some_benefit extra_doc True) (Just unf_template)+        -> traceInline dflags id str (mk_doc some_benefit extra_doc True) (Just unf_template)         | otherwise-        -> traceInline dflags str (mk_doc some_benefit extra_doc False) Nothing+        -> traceInline dflags id str (mk_doc some_benefit extra_doc False) Nothing         where           some_benefit = calc_some_benefit (length arg_discounts)           extra_doc = text "discounted size =" <+> int discounted_size@@ -1241,8 +1249,8 @@           = True           | otherwise           = case cont_info of-              CaseCtxt   -> not (lone_variable && is_wf)  -- Note [Lone variables]-              ValAppCtxt -> True                              -- Note [Cast then apply]+              CaseCtxt   -> not (lone_variable && is_exp)  -- Note [Lone variables]+              ValAppCtxt -> True                           -- Note [Cast then apply]               RuleArgCtxt -> uf_arity > 0  -- See Note [Unfold info lazy contexts]               DiscArgCtxt -> uf_arity > 0  --               RhsCtxt     -> uf_arity > 0  --@@ -1388,9 +1396,10 @@         s = "foo"         f = \x -> ...(error s)... -Fundamentally such contexts should not encourage inlining because the+Fundamentally such contexts should not encourage inlining because, provided+the RHS is "expandable" (see Note [exprIsExpandable] in CoreUtils) the context can ``see'' the unfolding of the variable (e.g. case or a-RULE) so there's no gain.  If the thing is bound to a value.+RULE) so there's no gain.  However, watch out: 
coreSyn/CoreUtils.hs view
@@ -96,6 +96,8 @@ import Data.List import Data.Ord            ( comparing ) import OrdList+import qualified Data.Set as Set+import UniqSet  {- ************************************************************************@@ -128,13 +130,13 @@  coreAltType :: CoreAlt -> Type -- ^ Returns the type of the alternatives right hand side-coreAltType (_,bs,rhs)-  | any bad_binder bs = expandTypeSynonyms ty-  | otherwise         = ty    -- Note [Existential variables and silly type synonyms]+coreAltType alt@(_,bs,rhs)+  = case occCheckExpand bs rhs_ty of+      -- Note [Existential variables and silly type synonyms]+      Just ty -> ty+      Nothing -> pprPanic "coreAltType" (pprCoreAlt alt $$ ppr rhs_ty)   where-    ty           = exprType rhs-    free_tvs     = tyCoVarsOfType ty-    bad_binder b = b `elemVarSet` free_tvs+    rhs_ty = exprType rhs  coreAltsType :: [CoreAlt] -> Type -- ^ Returns the type of the first alternative, which should be the same as for all alternatives@@ -184,7 +186,7 @@ Note [Type bindings] ~~~~~~~~~~~~~~~~~~~~ Core does allow type bindings, although such bindings are-not much used, except in the output of the desuguarer.+not much used, except in the output of the desugarer. Example:      let a = Int in (\x:a. x) Given this, exprType must be careful to substitute 'a' in the@@ -255,7 +257,7 @@  -- | Wrap the given expression in the coercion safely, dropping -- identity coercions and coalescing nested coercions-mkCast :: CoreExpr -> Coercion -> CoreExpr+mkCast :: CoreExpr -> CoercionR -> CoreExpr mkCast e co   | ASSERT2( coercionRole co == Representational            , text "coercion" <+> ppr co <+> ptext (sLit "passed to mkCast")@@ -612,8 +614,6 @@              --  2. The new alternatives, trimmed by              --        a) remove imposs_cons              --        b) remove constructors which can't match because of GADTs-             --      and with the DEFAULT expanded to a DataAlt if there is exactly-             --      remaining constructor that can match              --              -- NB: the final list of alternatives may be empty:              -- This is a tricky corner case.  If the data type has no constructors,@@ -631,22 +631,26 @@      trimmed_alts = filterOut (impossible_alt inst_tys) alts_wo_default -    imposs_deflt_cons = nub (imposs_cons ++ alt_cons)+    imposs_cons_set = Set.fromList imposs_cons+    imposs_deflt_cons =+      imposs_cons ++ filterOut (`Set.member` imposs_cons_set) alt_cons          -- "imposs_deflt_cons" are handled          --   EITHER by the context,          --   OR by a non-DEFAULT branch in this case expression.      impossible_alt :: [Type] -> (AltCon, a, b) -> Bool-    impossible_alt _ (con, _, _) | con `elem` imposs_cons = True+    impossible_alt _ (con, _, _) | con `Set.member` imposs_cons_set = True     impossible_alt inst_tys (DataAlt con, _, _) = dataConCannotMatch inst_tys con     impossible_alt _  _                         = False -refineDefaultAlt :: [Unique] -> TyCon -> [Type]-                 -> [AltCon]  -- Constructors that cannot match the DEFAULT (if any)+-- | Refine the default alternative to a 'DataAlt', if there is a unique way to do so.+-- See Note [Refine Default Alts]+refineDefaultAlt :: [Unique]          -- ^ Uniques for constructing new binders+                 -> TyCon             -- ^ Type constructor of scrutinee's type+                 -> [Type]            -- ^ Type arguments of scrutinee's type+                 -> [AltCon]          -- ^ Constructors that cannot match the DEFAULT (if any)                  -> [CoreAlt]-                 -> (Bool, [CoreAlt])--- Refine the default alternative to a DataAlt,--- if there is a unique way to do so+                 -> (Bool, [CoreAlt]) -- ^ 'True', if a default alt was replaced with a 'DataAlt' refineDefaultAlt us tycon tys imposs_deflt_cons all_alts   | (DEFAULT,_,rhs) : rest_alts <- all_alts   , isAlgTyCon tycon            -- It's a data type, tuple, or unboxed tuples.@@ -654,8 +658,11 @@                                 --      case x of { DEFAULT -> e }                                 -- and we don't want to fill in a default for them!   , Just all_cons <- tyConDataCons_maybe tycon-  , let imposs_data_cons = [con | DataAlt con <- imposs_deflt_cons]   -- We now know it's a data type-        impossible con   = con `elem` imposs_data_cons || dataConCannotMatch tys con+  , let imposs_data_cons = mkUniqSet [con | DataAlt con <- imposs_deflt_cons]+                             -- We now know it's a data type, so we can use+                             -- UniqSet rather than Set (more efficient)+        impossible con   = con `elementOfUniqSet` imposs_data_cons+                             || dataConCannotMatch tys con   = case filterOut impossible all_cons of        -- Eliminate the default alternative        -- altogether if it can't match:@@ -680,6 +687,93 @@   | otherwise      -- The common case   = (False, all_alts) +{- Note [Refine Default Alts]++refineDefaultAlt replaces the DEFAULT alt with a constructor if there is one+possible value it could be.++The simplest example being++foo :: () -> ()+foo x = case x of !_ -> ()++rewrites to++foo :: () -> ()+foo x = case x of () -> ()++There are two reasons in general why this is desirable.++1. We can simplify inner expressions++In this example we can eliminate the inner case by refining the outer case.+If we don't refine it, we are left with both case expressions.++```+{-# LANGUAGE BangPatterns #-}+module Test where++mid x = x+{-# NOINLINE mid #-}++data Foo = Foo1 ()++test :: Foo -> ()+test x =+  case x of+    !_ -> mid (case x of+                Foo1 x1 -> x1)++```++refineDefaultAlt fills in the DEFAULT here with `Foo ip1` and then x+becomes bound to `Foo ip1` so is inlined into the other case which+causes the KnownBranch optimisation to kick in.+++2. combineIdenticalAlts does a better job++Simon Jakobi also points out that that combineIdenticalAlts will do a better job+if we refine the DEFAULT first.++```+data D = C0 | C1 | C2++case e of+   DEFAULT -> e0+   C0 -> e1+   C1 -> e1+```++When we apply combineIdenticalAlts to this expression, it can't+combine the alts for C0 and C1, as we already have a default case.++If we apply refineDefaultAlt first, we get++```+case e of+  C0 -> e1+  C1 -> e1+  C2 -> e0+```++and combineIdenticalAlts can turn that into++```+case e of+  DEFAULT -> e1+  C2 -> e0+```++It isn't obvious that refineDefaultAlt does this but if you look at its one+call site in SimplUtils then the `imposs_deflt_cons` argument is populated with+constructors which are matched elsewhere.++-}++++ {- Note [Combine identical alternatives] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If several alternatives are identical, merge them into a single@@ -1078,29 +1172,6 @@ This responds True to exprIsHNF (you can discard a seq), but False to exprIsCheap. -Note [exprIsExpandable]-~~~~~~~~~~~~~~~~~~~~~~~-An expression is "expandable" if we are willing to dupicate it, if doing-so might make a RULE or case-of-constructor fire.  Mainly this means-data-constructor applications, but it's a bit more generous than exprIsCheap-because it is true of "CONLIKE" Ids: see Note [CONLIKE pragma] in BasicTypes.--It is used to set the uf_expandable field of an Unfolding, and that-in turn is used-  * In RULE matching-  * In exprIsConApp_maybe, exprIsLiteral_maybe, exprIsLambda_maybe--But take care: exprIsExpandable should /not/ be true of primops.  I-found this in test T5623a:-    let q = /\a. Ptr a (a +# b)-    in case q @ Float of Ptr v -> ...q...--q's inlining should not be expandable, else exprIsConApp_maybe will-say that (q @ Float) expands to (Ptr a (a +# b)), and that will-duplicate the (a +# b) primop, which we should not do lightly.-(It's quite hard to trigger this bug, but T13155 does so for GHC 8.0.)-- Note [Arguments and let-bindings exprIsCheapX] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What predicate should we apply to the argument of an application, or the@@ -1126,16 +1197,12 @@ -}  ---------------------exprIsCheap :: CoreExpr -> Bool-exprIsCheap = exprIsCheapX isCheapApp--exprIsExpandable :: CoreExpr -> Bool -- See Note [exprIsExpandable]-exprIsExpandable = exprIsCheapX isExpandableApp- exprIsWorkFree :: CoreExpr -> Bool   -- See Note [exprIsWorkFree] exprIsWorkFree = exprIsCheapX isWorkFreeApp ---------------------+exprIsCheap :: CoreExpr -> Bool+exprIsCheap = exprIsCheapX isCheapApp+ exprIsCheapX :: CheapAppFun -> CoreExpr -> Bool exprIsCheapX ok_app e   = ok e@@ -1163,7 +1230,76 @@       -- App, Let: see Note [Arguments and let-bindings exprIsCheapX]  +{- Note [exprIsExpandable]+~~~~~~~~~~~~~~~~~~~~~~~~~~+An expression is "expandable" if we are willing to duplicate it, if doing+so might make a RULE or case-of-constructor fire.  Consider+   let x = (a,b)+       y = build g+   in ....(case x of (p,q) -> rhs)....(foldr k z y)....++We don't inline 'x' or 'y' (see Note [Lone variables] in CoreUnfold),+but we do want++ * the case-expression to simplify+   (via exprIsConApp_maybe, exprIsLiteral_maybe)++ * the foldr/build RULE to fire+   (by expanding the unfolding during rule matching)++So we classify the unfolding of a let-binding as "expandable" (via the+uf_expandable field) if we want to do this kind of on-the-fly+expansion.  Specifically:++* True of constructor applications (K a b)++* True of applications of a "CONLIKE" Id; see Note [CONLIKE pragma] in BasicTypes.+  (NB: exprIsCheap might not be true of this)++* 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.++* False of let-expressions (same reason); and in any case we+  float lets out of an RHS if doing so will reveal an expandable+  application (see SimplEnv.doFloatFromRhs).++* Take care: exprIsExpandable should /not/ be true of primops.  I+  found this in test T5623a:+    let q = /\a. Ptr a (a +# b)+    in case q @ Float of Ptr v -> ...q...++  q's inlining should not be expandable, else exprIsConApp_maybe will+  say that (q @ Float) expands to (Ptr a (a +# b)), and that will+  duplicate the (a +# b) primop, which we should not do lightly.+  (It's quite hard to trigger this bug, but T13155 does so for GHC 8.0.)+-}+ -------------------------------------+exprIsExpandable :: CoreExpr -> Bool+-- See Note [exprIsExpandable]+exprIsExpandable e+  = ok e+  where+    ok e = go 0 e++    -- n is the number of value arguments+    go n (Var v)                      = isExpandableApp v n+    go _ (Lit {})                     = True+    go _ (Type {})                    = True+    go _ (Coercion {})                = True+    go n (Cast e _)                   = go n e+    go n (Tick t e) | tickishCounts t = False+                    | otherwise       = go n e+    go n (Lam x e)  | isRuntimeVar x  = n==0 || go (n-1) e+                    | otherwise       = go n e+    go n (App f e)  | isRuntimeArg e  = go (n+1) f && ok e+                    | otherwise       = go n f+    go _ (Case {})                    = False+    go _ (Let {})                     = False+++------------------------------------- type CheapAppFun = Id -> Arity -> Bool   -- Is an application of this function to n *value* args   -- always cheap, assuming the arguments are cheap?@@ -1505,7 +1641,7 @@          _ ->  ...v...v....   Should v be considered ok-for-speculation?  Its scrutinee may be   evaluated, but the alternatives are incomplete so we should not-  evalutate it strictly.+  evaluate it strictly.    Now, all this is for lifted types, but it'd be the same for any   finite unlifted type. We don't have many of them, but we might@@ -1543,8 +1679,8 @@ and do not perform evaluation.  There is one primop, dataToTag#, which does /require/ a lifted-argument to be evaluted.  To ensure this, CorePrep adds an-eval if it can't see the the argument is definitely evaluated+argument to be evaluated.  To ensure this, CorePrep adds an+eval if it can't see the argument is definitely evaluated (see [dataToTag magic] in CorePrep).  We make no attempt to guarantee that dataToTag#'s argument is@@ -1698,6 +1834,8 @@ exprIsTopLevelBindable :: CoreExpr -> Type -> Bool -- See Note [CoreSyn top-level string literals] -- Precondition: exprType expr = ty+-- 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)   || exprIsTickedString expr@@ -2271,12 +2409,13 @@ -- | This function is called only on *top-level* right-hand sides. -- Returns @True@ if the RHS can be allocated statically in the output, -- with no thunks involved at all.-rhsIsStatic :: Platform-            -> (Name -> Bool)         -- Which names are dynamic-            -> (Integer -> CoreExpr)  -- Desugaring for integer literals (disgusting)-                                      -- C.f. Note [Disgusting computation of CafRefs]-                                      --      in TidyPgm-            -> CoreExpr -> Bool+rhsIsStatic+   :: Platform+   -> (Name -> Bool)         -- Which names are dynamic+   -> (LitNumType -> Integer -> Maybe CoreExpr)+      -- Desugaring for some literals (disgusting)+      -- C.f. Note [Disgusting computation of CafRefs] in TidyPgm+   -> CoreExpr -> Bool -- It's called (i) in TidyPgm.hasCafRefs to decide if the rhs is, or -- refers to, CAFs; (ii) in CoreToStg to decide whether to put an -- update flag on it and (iii) in DsExpr to decide how to expand@@ -2331,7 +2470,7 @@ -- --    c) don't look through unfolding of f in (f x). -rhsIsStatic platform is_dynamic_name cvt_integer rhs = is_static False rhs+rhsIsStatic platform is_dynamic_name cvt_literal rhs = is_static False rhs   where   is_static :: Bool     -- True <=> in a constructor argument; must be atomic             -> CoreExpr -> Bool@@ -2341,7 +2480,9 @@                                               && is_static in_arg e   is_static in_arg (Cast e _)             = is_static in_arg e   is_static _      (Coercion {})          = True   -- Behaves just like a literal-  is_static in_arg (Lit (LitInteger i _)) = is_static in_arg (cvt_integer i)+  is_static in_arg (Lit (LitNumber nt i _)) = case cvt_literal nt i of+    Just e  -> is_static in_arg e+    Nothing -> True   is_static _      (Lit (MachLabel {}))   = False   is_static _      (Lit _)                = True         -- A MachLabel (foreign import "&foo") in an argument
coreSyn/MkCore.hs view
@@ -43,7 +43,7 @@          -- * Error Ids         mkRuntimeErrorApp, mkImpossibleExpr, mkAbsentErrorApp, errorIds,-        rEC_CON_ERROR_ID, iRREFUT_PAT_ERROR_ID, rUNTIME_ERROR_ID,+        rEC_CON_ERROR_ID, rUNTIME_ERROR_ID,         nON_EXHAUSTIVE_GUARDS_ERROR_ID, nO_METHOD_BINDING_ERROR_ID,         pAT_ERROR_ID, rEC_SEL_ERROR_ID, aBSENT_ERROR_ID,         tYPE_ERROR_ID, aBSENT_SUM_FIELD_ERROR_ID@@ -81,6 +81,7 @@ import Data.List  import Data.Char        ( ord )+import Control.Monad.Fail ( MonadFail )  infixl 4 `mkCoreApp`, `mkCoreApps` @@ -180,7 +181,7 @@         --         -- This is Dangerous.  But this is the only place we play this         -- game, mk_val_app returns an expression that does not have-        -- have a free wild-id.  So the only thing that can go wrong+        -- 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'. @@ -260,13 +261,9 @@                      return (Lit (mkLitInteger i (mkTyConTy t)))  -- | Create a 'CoreExpr' which will evaluate to the given @Natural@------ TODO: should we add LitNatural to Core?-mkNaturalExpr  :: MonadThings m => Integer -> m CoreExpr  -- Result :: Natural-mkNaturalExpr i = do iExpr <- mkIntegerExpr i-                     fiExpr <- lookupId naturalFromIntegerName-                     return (mkCoreApps (Var fiExpr) [iExpr])-+mkNaturalExpr  :: MonadThings m => Integer -> m CoreExpr+mkNaturalExpr i = do t <- lookupTyCon naturalTyConName+                     return (Lit (mkLitNatural i (mkTyConTy t)))  -- | Create a 'CoreExpr' which will evaluate to the given @Float@ mkFloatExpr :: Float -> CoreExpr@@ -337,7 +334,7 @@ * Flatten it out, so that     mkCoreTup [e1] = e1 -* Built a one-tuple (see Note [One-tuples] in TysWiredIn)+* Build a one-tuple (see Note [One-tuples] in TysWiredIn)     mkCoreTup1 [e1] = Unit e1   We use a suffix "1" to indicate this. @@ -605,7 +602,7 @@            `App` list)  -- | Make a 'build' expression applied to a locally-bound worker function-mkBuildExpr :: (MonadThings m, MonadUnique m)+mkBuildExpr :: (MonadFail m, MonadThings m, MonadUnique m)             => Type                                     -- ^ Type of list elements to be built             -> ((Id, Type) -> (Id, Type) -> m CoreExpr) -- ^ Function that, given information about the 'Id's                                                         -- of the binders for the build worker function, returns@@ -695,7 +692,6 @@ errorIds :: [Id] errorIds   = [ rUNTIME_ERROR_ID,-      iRREFUT_PAT_ERROR_ID,       nON_EXHAUSTIVE_GUARDS_ERROR_ID,       nO_METHOD_BINDING_ERROR_ID,       pAT_ERROR_ID,@@ -706,7 +702,7 @@       ]  recSelErrorName, runtimeErrorName, absentErrorName :: Name-irrefutPatErrorName, recConErrorName, patErrorName :: Name+recConErrorName, patErrorName :: Name nonExhaustiveGuardsErrorName, noMethodBindingErrorName :: Name typeErrorName :: Name absentSumFieldErrorName :: Name@@ -716,7 +712,6 @@ absentSumFieldErrorName = err_nm "absentSumFieldError"  absentSumFieldErrorIdKey                             aBSENT_SUM_FIELD_ERROR_ID runtimeErrorName    = err_nm "runtimeError"    runtimeErrorIdKey    rUNTIME_ERROR_ID-irrefutPatErrorName = err_nm "irrefutPatError" irrefutPatErrorIdKey iRREFUT_PAT_ERROR_ID recConErrorName     = err_nm "recConError"     recConErrorIdKey     rEC_CON_ERROR_ID patErrorName        = err_nm "patError"        patErrorIdKey        pAT_ERROR_ID typeErrorName       = err_nm "typeError"       typeErrorIdKey       tYPE_ERROR_ID@@ -729,12 +724,11 @@ err_nm :: String -> Unique -> Id -> Name err_nm str uniq id = mkWiredInIdName cONTROL_EXCEPTION_BASE (fsLit str) uniq id -rEC_SEL_ERROR_ID, rUNTIME_ERROR_ID, iRREFUT_PAT_ERROR_ID, rEC_CON_ERROR_ID :: Id+rEC_SEL_ERROR_ID, rUNTIME_ERROR_ID, rEC_CON_ERROR_ID :: Id pAT_ERROR_ID, nO_METHOD_BINDING_ERROR_ID, nON_EXHAUSTIVE_GUARDS_ERROR_ID :: Id tYPE_ERROR_ID, aBSENT_ERROR_ID, aBSENT_SUM_FIELD_ERROR_ID :: Id rEC_SEL_ERROR_ID                = mkRuntimeErrorId recSelErrorName rUNTIME_ERROR_ID                = mkRuntimeErrorId runtimeErrorName-iRREFUT_PAT_ERROR_ID            = mkRuntimeErrorId irrefutPatErrorName rEC_CON_ERROR_ID                = mkRuntimeErrorId recConErrorName pAT_ERROR_ID                    = mkRuntimeErrorId patErrorName nO_METHOD_BINDING_ERROR_ID      = mkRuntimeErrorId noMethodBindingErrorName@@ -859,40 +853,43 @@  This is extremely tiresome.  Another way to think of this is that, in Core, it is an invariant that a strict data contructor, like MkT, must-be be applied only to an argument in HNF. so (absentError "blah") had+be applied only to an argument in HNF. So (absentError "blah") had better be non-bottom. -So the "solution" is to make absentError behave like a data constructor,-to respect this invariant.  Rather than have a special case in exprIsHNF,-I eneded up doing this:-- * Make absentError claim to be ConLike-- * Make exprOkForSpeculation/exprOkForSideEffects-   return True for ConLike things--  * In Simplify.rebuildCase, make the-        Note [Case to let transformation]-    branch use exprOkForSpeculation rather than exprIsHNF, so that-    it converts the absentError case to a let.+So the "solution" is to add a special case for absentError to exprIsHNFlike.+This allows Simplify.rebuildCase, in the Note [Case to let transformation]+branch, to convert the case on absentError into a let. We also make+absentError *not* be diverging, unlike the other error-ids, so that we+can be sure not to remove the case branches before converting the case to+a let. -On the other hand if, by some bug or bizarre happenstance, we ever call-absentError, we should thow an exception.  This should never happen, of-course, but we definitely can't return anything.  e.g. if somehow we had+If, by some bug or bizarre happenstance, we ever call absentError, we should+throw an exception.  This should never happen, of course, but we definitely+can't return anything.  e.g. if somehow we had     case absentError "foo" of        Nothing -> ...        Just x  -> ... then if we return, the case expression will select a field and continue.-Seg fault city. Better to throw an exception.  (Even though we've said-it is ConLike :-)+Seg fault city. Better to throw an exception. (Even though we've said+it is in HNF :-)++It might seem a bit surprising that seq on absentError is simply erased++    absentError "foo" `seq` x ==> x++but that should be okay; since there's no pattern match we can't really+be relying on anything from it. -}  aBSENT_ERROR_ID- = mkVanillaGlobal absentErrorName absent_ty+ = mkVanillaGlobalWithInfo absentErrorName absent_ty arity_info  where    absent_ty = mkSpecForAllTys [alphaTyVar] (mkFunTy 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+   -- NB: no bottoming strictness info, unlike other error-ids.+   -- See Note [aBSENT_ERROR_ID]  mkAbsentErrorApp :: Type         -- The type to instantiate 'a'                  -> String       -- The string to print
coreSyn/PprCore.hs view
@@ -128,10 +128,18 @@       -- lambda (the first rendering looks like a nullary join point returning       -- an n-argument function).     pp_join_bind join_arity+      | bndrs `lengthAtLeast` join_arity       = hang (ppr val_bdr <+> sep (map (pprBndr LambdaBind) lhs_bndrs))            2 (equals <+> pprCoreExpr rhs)+      | otherwise -- Yikes!  A join-binding with too few lambda+                  -- Lint will complain, but we don't want to crash+                  -- the pretty-printer else we can't see what's wrong+                  -- So refer to printing  j = e+      = pp_normal_bind       where-        (lhs_bndrs, rhs) = collectNBinders join_arity expr+        (bndrs, body) = collectBinders expr+        lhs_bndrs = take join_arity bndrs+        rhs       = mkLams (drop join_arity bndrs) body  pprParendExpr expr = ppr_expr parens expr pprCoreExpr   expr = ppr_expr noParens expr@@ -604,21 +612,3 @@   ppr (SourceNote span _) =       hcat [ text "src<", pprUserRealSpan True span, char '>'] -{----------------------------------------------------------      Vectorisation declarations--------------------------------------------------------}--instance Outputable CoreVect where-  ppr (Vect     var e)               = hang (text "VECTORISE" <+> ppr var <+> char '=')-                                         4 (pprCoreExpr e)-  ppr (NoVect   var)                 = text "NOVECTORISE" <+> ppr var-  ppr (VectType False var Nothing)   = text "VECTORISE type" <+> ppr var-  ppr (VectType True  var Nothing)   = text "VECTORISE SCALAR type" <+> ppr var-  ppr (VectType False var (Just tc)) = text "VECTORISE type" <+> ppr var <+> char '=' <+>-                                       ppr tc-  ppr (VectType True var (Just tc))  = text "VECTORISE SCALAR type" <+> ppr var <+>-                                       char '=' <+> ppr tc-  ppr (VectClass tc)                 = text "VECTORISE class" <+> ppr tc-  ppr (VectInst var)                 = text "VECTORISE SCALAR instance" <+> ppr var
− coreSyn/TrieMap.hs
@@ -1,1135 +0,0 @@-{--(c) The University of Glasgow 2006-(c) The GRASP/AQUA Project, Glasgow University, 1992-1998--}--{-# LANGUAGE RankNTypes #-}-{-# LANGUAGE TypeFamilies #-}-{-# LANGUAGE FlexibleContexts #-}-{-# LANGUAGE TypeSynonymInstances #-}-{-# LANGUAGE FlexibleInstances #-}-{-# LANGUAGE UndecidableInstances #-}-module TrieMap(-   -- * Maps over Core expressions-   CoreMap, emptyCoreMap, extendCoreMap, lookupCoreMap, foldCoreMap,-   -- * Maps over 'Type's-   TypeMap, emptyTypeMap, extendTypeMap, lookupTypeMap, foldTypeMap,-   LooseTypeMap,-   -- ** With explicit scoping-   CmEnv, lookupCME, extendTypeMapWithScope, lookupTypeMapWithScope,-   mkDeBruijnContext,-   -- * Maps over 'Maybe' values-   MaybeMap,-   -- * Maps over 'List' values-   ListMap,-   -- * Maps over 'Literal's-   LiteralMap,-   -- * 'TrieMap' class-   TrieMap(..), insertTM, deleteTM,-   lkDFreeVar, xtDFreeVar,-   lkDNamed, xtDNamed,-   (>.>), (|>), (|>>),- ) where--import GhcPrelude--import CoreSyn-import Coercion-import Literal-import Name-import Type-import TyCoRep-import Var-import UniqDFM-import Unique( Unique )-import FastString(FastString)-import Util--import qualified Data.Map    as Map-import qualified Data.IntMap as IntMap-import VarEnv-import NameEnv-import Outputable-import Control.Monad( (>=>) )--{--This module implements TrieMaps, which are finite mappings-whose key is a structured value like a CoreExpr or Type.--The code is very regular and boilerplate-like, but there is-some neat handling of *binders*.  In effect they are deBruijn-numbered on the fly.--The regular pattern for handling TrieMaps on data structures was first-described (to my knowledge) in Connelly and Morris's 1995 paper "A-generalization of the Trie Data Structure"; there is also an accessible-description of the idea in Okasaki's book "Purely Functional Data-Structures", Section 10.3.2--************************************************************************-*                                                                      *-                   The TrieMap class-*                                                                      *-************************************************************************--}--type XT a = Maybe a -> Maybe a  -- How to alter a non-existent elt (Nothing)-                                --               or an existing elt (Just)--class TrieMap m where-   type Key m :: *-   emptyTM  :: m a-   lookupTM :: forall b. Key m -> m b -> Maybe b-   alterTM  :: forall b. Key m -> XT b -> m b -> m b-   mapTM    :: (a->b) -> m a -> m b--   foldTM   :: (a -> b -> b) -> m a -> b -> b-      -- The unusual argument order here makes-      -- it easy to compose calls to foldTM;-      -- see for example fdE below--insertTM :: TrieMap m => Key m -> a -> m a -> m a-insertTM k v m = alterTM k (\_ -> Just v) m--deleteTM :: TrieMap m => Key m -> m a -> m a-deleteTM k m = alterTM k (\_ -> Nothing) m--------------------------- Recall that---   Control.Monad.(>=>) :: (a -> Maybe b) -> (b -> Maybe c) -> a -> Maybe c--(>.>) :: (a -> b) -> (b -> c) -> a -> c--- Reverse function composition (do f first, then g)-infixr 1 >.>-(f >.> g) x = g (f x)-infixr 1 |>, |>>--(|>) :: a -> (a->b) -> b     -- Reverse application-x |> f = f x-------------------------(|>>) :: TrieMap m2-      => (XT (m2 a) -> m1 (m2 a) -> m1 (m2 a))-      -> (m2 a -> m2 a)-      -> m1 (m2 a) -> m1 (m2 a)-(|>>) f g = f (Just . g . deMaybe)--deMaybe :: TrieMap m => Maybe (m a) -> m a-deMaybe Nothing  = emptyTM-deMaybe (Just m) = m--{--************************************************************************-*                                                                      *-                   IntMaps-*                                                                      *-************************************************************************--}--instance TrieMap IntMap.IntMap where-  type Key IntMap.IntMap = Int-  emptyTM = IntMap.empty-  lookupTM k m = IntMap.lookup k m-  alterTM = xtInt-  foldTM k m z = IntMap.foldr k z m-  mapTM f m = IntMap.map f m--xtInt :: Int -> XT a -> IntMap.IntMap a -> IntMap.IntMap a-xtInt k f m = IntMap.alter f k m--instance Ord k => TrieMap (Map.Map k) where-  type Key (Map.Map k) = k-  emptyTM = Map.empty-  lookupTM = Map.lookup-  alterTM k f m = Map.alter f k m-  foldTM k m z = Map.foldr k z m-  mapTM f m = Map.map f m---{--Note [foldTM determinism]-~~~~~~~~~~~~~~~~~~~~~~~~~-We want foldTM to be deterministic, which is why we have an instance of-TrieMap for UniqDFM, but not for UniqFM. Here's an example of some things that-go wrong if foldTM is nondeterministic. Consider:--  f a b = return (a <> b)--Depending on the order that the typechecker generates constraints you-get either:--  f :: (Monad m, Monoid a) => a -> a -> m a--or:--  f :: (Monoid a, Monad m) => a -> a -> m a--The generated code will be different after desugaring as the dictionaries-will be bound in different orders, leading to potential ABI incompatibility.--One way to solve this would be to notice that the typeclasses could be-sorted alphabetically.--Unfortunately that doesn't quite work with this example:--  f a b = let x = a <> a; y = b <> b in x--where you infer:--  f :: (Monoid m, Monoid m1) => m1 -> m -> m1--or:--  f :: (Monoid m1, Monoid m) => m1 -> m -> m1--Here you could decide to take the order of the type variables in the type-according to depth first traversal and use it to order the constraints.--The real trouble starts when the user enables incoherent instances and-the compiler has to make an arbitrary choice. Consider:--  class T a b where-    go :: a -> b -> String--  instance (Show b) => T Int b where-    go a b = show a ++ show b--  instance (Show a) => T a Bool where-    go a b = show a ++ show b--  f = go 10 True--GHC is free to choose either dictionary to implement f, but for the sake of-determinism we'd like it to be consistent when compiling the same sources-with the same flags.--inert_dicts :: DictMap is implemented with a TrieMap. In getUnsolvedInerts it-gets converted to a bag of (Wanted) Cts using a fold. Then in-solve_simple_wanteds it's merged with other WantedConstraints. We want the-conversion to a bag to be deterministic. For that purpose we use UniqDFM-instead of UniqFM to implement the TrieMap.--See Note [Deterministic UniqFM] in UniqDFM for more details on how it's made-deterministic.--}--instance TrieMap UniqDFM where-  type Key UniqDFM = Unique-  emptyTM = emptyUDFM-  lookupTM k m = lookupUDFM m k-  alterTM k f m = alterUDFM f m k-  foldTM k m z = foldUDFM k z m-  mapTM f m = mapUDFM f m--{--************************************************************************-*                                                                      *-                   Maybes-*                                                                      *-************************************************************************--If              m is a map from k -> val-then (MaybeMap m) is a map from (Maybe k) -> val--}--data MaybeMap m a = MM { mm_nothing  :: Maybe a, mm_just :: m a }--instance TrieMap m => TrieMap (MaybeMap m) where-   type Key (MaybeMap m) = Maybe (Key m)-   emptyTM  = MM { mm_nothing = Nothing, mm_just = emptyTM }-   lookupTM = lkMaybe lookupTM-   alterTM  = xtMaybe alterTM-   foldTM   = fdMaybe-   mapTM    = mapMb--mapMb :: TrieMap m => (a->b) -> MaybeMap m a -> MaybeMap m b-mapMb f (MM { mm_nothing = mn, mm_just = mj })-  = MM { mm_nothing = fmap f mn, mm_just = mapTM f mj }--lkMaybe :: (forall b. k -> m b -> Maybe b)-        -> Maybe k -> MaybeMap m a -> Maybe a-lkMaybe _  Nothing  = mm_nothing-lkMaybe lk (Just x) = mm_just >.> lk x--xtMaybe :: (forall b. k -> XT b -> m b -> m b)-        -> Maybe k -> XT a -> MaybeMap m a -> MaybeMap m a-xtMaybe _  Nothing  f m = m { mm_nothing  = f (mm_nothing m) }-xtMaybe tr (Just x) f m = m { mm_just = mm_just m |> tr x f }--fdMaybe :: TrieMap m => (a -> b -> b) -> MaybeMap m a -> b -> b-fdMaybe k m = foldMaybe k (mm_nothing m)-            . foldTM k (mm_just m)--{--************************************************************************-*                                                                      *-                   Lists-*                                                                      *-************************************************************************--}--data ListMap m a-  = LM { lm_nil  :: Maybe a-       , lm_cons :: m (ListMap m a) }--instance TrieMap m => TrieMap (ListMap m) where-   type Key (ListMap m) = [Key m]-   emptyTM  = LM { lm_nil = Nothing, lm_cons = emptyTM }-   lookupTM = lkList lookupTM-   alterTM  = xtList alterTM-   foldTM   = fdList-   mapTM    = mapList--instance (TrieMap m, Outputable a) => Outputable (ListMap m a) where-  ppr m = text "List elts" <+> ppr (foldTM (:) m [])--mapList :: TrieMap m => (a->b) -> ListMap m a -> ListMap m b-mapList f (LM { lm_nil = mnil, lm_cons = mcons })-  = LM { lm_nil = fmap f mnil, lm_cons = mapTM (mapTM f) mcons }--lkList :: TrieMap m => (forall b. k -> m b -> Maybe b)-        -> [k] -> ListMap m a -> Maybe a-lkList _  []     = lm_nil-lkList lk (x:xs) = lm_cons >.> lk x >=> lkList lk xs--xtList :: TrieMap m => (forall b. k -> XT b -> m b -> m b)-        -> [k] -> XT a -> ListMap m a -> ListMap m a-xtList _  []     f m = m { lm_nil  = f (lm_nil m) }-xtList tr (x:xs) f m = m { lm_cons = lm_cons m |> tr x |>> xtList tr xs f }--fdList :: forall m a b. TrieMap m-       => (a -> b -> b) -> ListMap m a -> b -> b-fdList k m = foldMaybe k          (lm_nil m)-           . foldTM    (fdList k) (lm_cons m)--foldMaybe :: (a -> b -> b) -> Maybe a -> b -> b-foldMaybe _ Nothing  b = b-foldMaybe k (Just a) b = k a b--{--************************************************************************-*                                                                      *-                   Basic maps-*                                                                      *-************************************************************************--}--lkDNamed :: NamedThing n => n -> DNameEnv a -> Maybe a-lkDNamed n env = lookupDNameEnv env (getName n)--xtDNamed :: NamedThing n => n -> XT a -> DNameEnv a -> DNameEnv a-xtDNamed tc f m = alterDNameEnv f m (getName tc)---------------------------type LiteralMap  a = Map.Map Literal a--emptyLiteralMap :: LiteralMap a-emptyLiteralMap = emptyTM--lkLit :: Literal -> LiteralMap a -> Maybe a-lkLit = lookupTM--xtLit :: Literal -> XT a -> LiteralMap a -> LiteralMap a-xtLit = alterTM--{--************************************************************************-*                                                                      *-                   GenMap-*                                                                      *-************************************************************************--Note [Compressed TrieMap]-~~~~~~~~~~~~~~~~~~~~~~~~~--The GenMap constructor augments TrieMaps with leaf compression.  This helps-solve the performance problem detailed in #9960: suppose we have a handful-H of entries in a TrieMap, each with a very large key, size K. If you fold over-such a TrieMap you'd expect time O(H). That would certainly be true of an-association list! But with TrieMap we actually have to navigate down a long-singleton structure to get to the elements, so it takes time O(K*H).  This-can really hurt on many type-level computation benchmarks:-see for example T9872d.--The point of a TrieMap is that you need to navigate to the point where only one-key remains, and then things should be fast.  So the point of a SingletonMap-is that, once we are down to a single (key,value) pair, we stop and-just use SingletonMap.--'EmptyMap' provides an even more basic (but essential) optimization: if there is-nothing in the map, don't bother building out the (possibly infinite) recursive-TrieMap structure!--}--data GenMap m a-   = EmptyMap-   | SingletonMap (Key m) a-   | MultiMap (m a)--instance (Outputable a, Outputable (m a)) => Outputable (GenMap m a) where-  ppr EmptyMap = text "Empty map"-  ppr (SingletonMap _ v) = text "Singleton map" <+> ppr v-  ppr (MultiMap m) = ppr m---- TODO undecidable instance-instance (Eq (Key m), TrieMap m) => TrieMap (GenMap m) where-   type Key (GenMap m) = Key m-   emptyTM  = EmptyMap-   lookupTM = lkG-   alterTM  = xtG-   foldTM   = fdG-   mapTM    = mapG---- NB: Be careful about RULES and type families (#5821).  So we should make sure--- to specify @Key TypeMapX@ (and not @DeBruijn Type@, the reduced form)--{-# SPECIALIZE lkG :: Key TypeMapX     -> TypeMapG a     -> Maybe a #-}-{-# SPECIALIZE lkG :: Key CoercionMapX -> CoercionMapG a -> Maybe a #-}-{-# SPECIALIZE lkG :: Key CoreMapX     -> CoreMapG a     -> Maybe a #-}-lkG :: (Eq (Key m), TrieMap m) => Key m -> GenMap m a -> Maybe a-lkG _ EmptyMap                         = Nothing-lkG k (SingletonMap k' v') | k == k'   = Just v'-                           | otherwise = Nothing-lkG k (MultiMap m)                     = lookupTM k m--{-# SPECIALIZE xtG :: Key TypeMapX     -> XT a -> TypeMapG a -> TypeMapG a #-}-{-# SPECIALIZE xtG :: Key CoercionMapX -> XT a -> CoercionMapG a -> CoercionMapG a #-}-{-# SPECIALIZE xtG :: Key CoreMapX     -> XT a -> CoreMapG a -> CoreMapG a #-}-xtG :: (Eq (Key m), TrieMap m) => Key m -> XT a -> GenMap m a -> GenMap m a-xtG k f EmptyMap-    = case f Nothing of-        Just v  -> SingletonMap k v-        Nothing -> EmptyMap-xtG k f m@(SingletonMap k' v')-    | k' == k-    -- The new key matches the (single) key already in the tree.  Hence,-    -- apply @f@ to @Just v'@ and build a singleton or empty map depending-    -- on the 'Just'/'Nothing' response respectively.-    = case f (Just v') of-        Just v'' -> SingletonMap k' v''-        Nothing  -> EmptyMap-    | otherwise-    -- We've hit a singleton tree for a different key than the one we are-    -- searching for. Hence apply @f@ to @Nothing@. If result is @Nothing@ then-    -- we can just return the old map. If not, we need a map with *two*-    -- entries. The easiest way to do that is to insert two items into an empty-    -- map of type @m a@.-    = case f Nothing of-        Nothing  -> m-        Just v   -> emptyTM |> alterTM k' (const (Just v'))-                           >.> alterTM k  (const (Just v))-                           >.> MultiMap-xtG k f (MultiMap m) = MultiMap (alterTM k f m)--{-# SPECIALIZE mapG :: (a -> b) -> TypeMapG a     -> TypeMapG b #-}-{-# SPECIALIZE mapG :: (a -> b) -> CoercionMapG a -> CoercionMapG b #-}-{-# SPECIALIZE mapG :: (a -> b) -> CoreMapG a     -> CoreMapG b #-}-mapG :: TrieMap m => (a -> b) -> GenMap m a -> GenMap m b-mapG _ EmptyMap = EmptyMap-mapG f (SingletonMap k v) = SingletonMap k (f v)-mapG f (MultiMap m) = MultiMap (mapTM f m)--{-# SPECIALIZE fdG :: (a -> b -> b) -> TypeMapG a     -> b -> b #-}-{-# SPECIALIZE fdG :: (a -> b -> b) -> CoercionMapG a -> b -> b #-}-{-# SPECIALIZE fdG :: (a -> b -> b) -> CoreMapG a     -> b -> b #-}-fdG :: TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b-fdG _ EmptyMap = \z -> z-fdG k (SingletonMap _ v) = \z -> k v z-fdG k (MultiMap m) = foldTM k m--{--************************************************************************-*                                                                      *-                   CoreMap-*                                                                      *-************************************************************************--Note [Binders]-~~~~~~~~~~~~~~- * In general we check binders as late as possible because types are-   less likely to differ than expression structure.  That's why-      cm_lam :: CoreMapG (TypeMapG a)-   rather than-      cm_lam :: TypeMapG (CoreMapG a)-- * We don't need to look at the type of some binders, notably-     - the case binder in (Case _ b _ _)-     - the binders in an alternative-   because they are totally fixed by the context--Note [Empty case alternatives]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* For a key (Case e b ty (alt:alts))  we don't need to look the return type-  'ty', because every alternative has that type.--* 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)--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)-for the two possibilities.  Only cm_ecase looks at the type.--See also Note [Empty case alternatives] in CoreSyn.--}---- | @CoreMap a@ is a map from 'CoreExpr' to @a@.  If you are a client, this--- is the type you want.-newtype CoreMap a = CoreMap (CoreMapG a)--instance TrieMap CoreMap where-    type Key CoreMap = CoreExpr-    emptyTM = CoreMap emptyTM-    lookupTM k (CoreMap m) = lookupTM (deBruijnize k) m-    alterTM k f (CoreMap m) = CoreMap (alterTM (deBruijnize k) f m)-    foldTM k (CoreMap m) = foldTM k m-    mapTM f (CoreMap m) = CoreMap (mapTM f m)---- | @CoreMapG a@ is a map from @DeBruijn CoreExpr@ to @a@.  The extended--- key makes it suitable for recursive traversal, since it can track binders,--- but it is strictly internal to this module.  If you are including a 'CoreMap'--- inside another 'TrieMap', this is the type you want.-type CoreMapG = GenMap CoreMapX---- | @CoreMapX a@ is the base map from @DeBruijn CoreExpr@ to @a@, but without--- the 'GenMap' optimization.-data CoreMapX a-  = CM { cm_var   :: VarMap a-       , cm_lit   :: LiteralMap a-       , cm_co    :: CoercionMapG a-       , cm_type  :: TypeMapG a-       , cm_cast  :: CoreMapG (CoercionMapG a)-       , cm_tick  :: CoreMapG (TickishMap a)-       , cm_app   :: CoreMapG (CoreMapG a)-       , cm_lam   :: CoreMapG (BndrMap a)    -- Note [Binders]-       , cm_letn  :: CoreMapG (CoreMapG (BndrMap a))-       , cm_letr  :: ListMap CoreMapG (CoreMapG (ListMap BndrMap a))-       , cm_case  :: CoreMapG (ListMap AltMap a)-       , cm_ecase :: CoreMapG (TypeMapG a)    -- Note [Empty case alternatives]-     }--instance Eq (DeBruijn CoreExpr) where-  D env1 e1 == D env2 e2 = go e1 e2 where-    go (Var v1) (Var v2) = case (lookupCME env1 v1, lookupCME env2 v2) of-                            (Just b1, Just b2) -> b1 == b2-                            (Nothing, Nothing) -> v1 == v2-                            _ -> False-    go (Lit lit1)    (Lit lit2)      = lit1 == lit2-    go (Type t1)    (Type t2)        = D env1 t1 == D env2 t2-    go (Coercion co1) (Coercion co2) = D env1 co1 == D env2 co2-    go (Cast e1 co1) (Cast e2 co2) = D env1 co1 == D env2 co2 && go e1 e2-    go (App f1 a1)   (App f2 a2)   = go f1 f2 && go a1 a2-    -- This seems a bit dodgy, see 'eqTickish'-    go (Tick n1 e1)  (Tick n2 e2)  = n1 == n2 && go e1 e2--    go (Lam b1 e1)  (Lam b2 e2)-      =  D env1 (varType b1) == D env2 (varType b2)-      && D (extendCME env1 b1) e1 == D (extendCME env2 b2) e2--    go (Let (NonRec v1 r1) e1) (Let (NonRec v2 r2) e2)-      =  go r1 r2-      && D (extendCME env1 v1) e1 == D (extendCME env2 v2) e2--    go (Let (Rec ps1) e1) (Let (Rec ps2) e2)-      = equalLength ps1 ps2-      && D env1' rs1 == D env2' rs2-      && D env1' e1  == D env2' e2-      where-        (bs1,rs1) = unzip ps1-        (bs2,rs2) = unzip ps2-        env1' = extendCMEs env1 bs1-        env2' = extendCMEs env2 bs2--    go (Case e1 b1 t1 a1) (Case e2 b2 t2 a2)-      | null a1   -- See Note [Empty case alternatives]-      = null a2 && go e1 e2 && D env1 t1 == D env2 t2-      | otherwise-      =  go e1 e2 && D (extendCME env1 b1) a1 == D (extendCME env2 b2) a2--    go _ _ = False--emptyE :: CoreMapX a-emptyE = CM { cm_var = emptyTM, cm_lit = emptyLiteralMap-            , cm_co = emptyTM, cm_type = emptyTM-            , cm_cast = emptyTM, cm_app = emptyTM-            , cm_lam = emptyTM, cm_letn = emptyTM-            , cm_letr = emptyTM, cm_case = emptyTM-            , cm_ecase = emptyTM, cm_tick = emptyTM }--instance TrieMap CoreMapX where-   type Key CoreMapX = DeBruijn CoreExpr-   emptyTM  = emptyE-   lookupTM = lkE-   alterTM  = xtE-   foldTM   = fdE-   mapTM    = mapE-----------------------------mapE :: (a->b) -> CoreMapX a -> CoreMapX b-mapE f (CM { cm_var = cvar, cm_lit = clit-           , cm_co = cco, cm_type = ctype-           , cm_cast = ccast , cm_app = capp-           , cm_lam = clam, cm_letn = cletn-           , cm_letr = cletr, cm_case = ccase-           , cm_ecase = cecase, cm_tick = ctick })-  = CM { cm_var = mapTM f cvar, cm_lit = mapTM f clit-       , cm_co = mapTM f cco, cm_type = mapTM f ctype-       , cm_cast = mapTM (mapTM f) ccast, cm_app = mapTM (mapTM f) capp-       , cm_lam = mapTM (mapTM f) clam, cm_letn = mapTM (mapTM (mapTM f)) cletn-       , cm_letr = mapTM (mapTM (mapTM f)) cletr, cm_case = mapTM (mapTM f) ccase-       , cm_ecase = mapTM (mapTM f) cecase, cm_tick = mapTM (mapTM f) ctick }-----------------------------lookupCoreMap :: CoreMap a -> CoreExpr -> Maybe a-lookupCoreMap cm e = lookupTM e cm--extendCoreMap :: CoreMap a -> CoreExpr -> a -> CoreMap a-extendCoreMap m e v = alterTM e (\_ -> Just v) m--foldCoreMap :: (a -> b -> b) -> b -> CoreMap a -> b-foldCoreMap k z m = foldTM k m z--emptyCoreMap :: CoreMap a-emptyCoreMap = emptyTM--instance Outputable a => Outputable (CoreMap a) where-  ppr m = text "CoreMap elts" <+> ppr (foldTM (:) m [])----------------------------fdE :: (a -> b -> b) -> CoreMapX a -> b -> b-fdE k m-  = foldTM k (cm_var m)-  . foldTM k (cm_lit m)-  . foldTM k (cm_co m)-  . foldTM k (cm_type m)-  . foldTM (foldTM k) (cm_cast m)-  . foldTM (foldTM k) (cm_tick m)-  . foldTM (foldTM k) (cm_app m)-  . foldTM (foldTM k) (cm_lam m)-  . foldTM (foldTM (foldTM k)) (cm_letn m)-  . foldTM (foldTM (foldTM k)) (cm_letr m)-  . foldTM (foldTM k) (cm_case m)-  . foldTM (foldTM k) (cm_ecase m)---- lkE: lookup in trie for expressions-lkE :: DeBruijn CoreExpr -> CoreMapX a -> Maybe a-lkE (D env expr) cm = go expr cm-  where-    go (Var v)              = cm_var  >.> lkVar env v-    go (Lit l)              = cm_lit  >.> lkLit l-    go (Type t)             = cm_type >.> lkG (D env t)-    go (Coercion c)         = cm_co   >.> lkG (D env c)-    go (Cast e c)           = cm_cast >.> lkG (D env e) >=> lkG (D env c)-    go (Tick tickish e)     = cm_tick >.> lkG (D env e) >=> lkTickish tickish-    go (App e1 e2)          = cm_app  >.> lkG (D env e2) >=> lkG (D env e1)-    go (Lam v e)            = cm_lam  >.> lkG (D (extendCME env v) e)-                              >=> lkBndr env v-    go (Let (NonRec b r) e) = cm_letn >.> lkG (D env r)-                              >=> lkG (D (extendCME env b) e) >=> lkBndr env b-    go (Let (Rec prs) e)    = let (bndrs,rhss) = unzip prs-                                  env1 = extendCMEs env bndrs-                              in cm_letr-                                 >.> lkList (lkG . D env1) rhss-                                 >=> lkG (D env1 e)-                                 >=> lkList (lkBndr env1) bndrs-    go (Case e b ty as)     -- See Note [Empty case alternatives]-               | null as    = cm_ecase >.> lkG (D env e) >=> lkG (D env ty)-               | otherwise  = cm_case >.> lkG (D env e)-                              >=> lkList (lkA (extendCME env b)) as--xtE :: DeBruijn CoreExpr -> XT a -> CoreMapX a -> CoreMapX a-xtE (D env (Var v))              f m = m { cm_var  = cm_var m-                                                 |> xtVar env v f }-xtE (D env (Type t))             f m = m { cm_type = cm_type m-                                                 |> xtG (D env t) f }-xtE (D env (Coercion c))         f m = m { cm_co   = cm_co m-                                                 |> xtG (D env c) f }-xtE (D _   (Lit l))              f m = m { cm_lit  = cm_lit m  |> xtLit l f }-xtE (D env (Cast e c))           f m = m { cm_cast = cm_cast m |> xtG (D env e)-                                                 |>> xtG (D env c) f }-xtE (D env (Tick t e))           f m = m { cm_tick = cm_tick m |> xtG (D env e)-                                                 |>> xtTickish t f }-xtE (D env (App e1 e2))          f m = m { cm_app = cm_app m |> xtG (D env e2)-                                                 |>> xtG (D env e1) f }-xtE (D env (Lam v e))            f m = m { cm_lam = cm_lam m-                                                 |> xtG (D (extendCME env v) e)-                                                 |>> xtBndr env v f }-xtE (D env (Let (NonRec b r) e)) f m = m { cm_letn = cm_letn m-                                                 |> xtG (D (extendCME env b) e)-                                                 |>> xtG (D env r)-                                                 |>> xtBndr env b f }-xtE (D env (Let (Rec prs) e))    f m = m { cm_letr =-                                              let (bndrs,rhss) = unzip prs-                                                  env1 = extendCMEs env bndrs-                                              in cm_letr m-                                                 |>  xtList (xtG . D env1) rhss-                                                 |>> xtG (D env1 e)-                                                 |>> xtList (xtBndr env1)-                                                            bndrs f }-xtE (D env (Case e b ty as))     f m-                     | null as   = m { cm_ecase = cm_ecase m |> xtG (D env e)-                                                 |>> xtG (D env ty) f }-                     | otherwise = m { cm_case = cm_case m |> xtG (D env e)-                                                 |>> let env1 = extendCME env b-                                                     in xtList (xtA env1) as f }---- TODO: this seems a bit dodgy, see 'eqTickish'-type TickishMap a = Map.Map (Tickish Id) a-lkTickish :: Tickish Id -> TickishMap a -> Maybe a-lkTickish = lookupTM--xtTickish :: Tickish Id -> XT a -> TickishMap a -> TickishMap a-xtTickish = alterTM---------------------------data AltMap a   -- A single alternative-  = AM { am_deflt :: CoreMapG a-       , am_data  :: DNameEnv (CoreMapG a)-       , am_lit   :: LiteralMap (CoreMapG a) }--instance TrieMap AltMap where-   type Key AltMap = CoreAlt-   emptyTM  = AM { am_deflt = emptyTM-                 , am_data = emptyDNameEnv-                 , am_lit  = emptyLiteralMap }-   lookupTM = lkA emptyCME-   alterTM  = xtA emptyCME-   foldTM   = fdA-   mapTM    = mapA--instance Eq (DeBruijn CoreAlt) where-  D env1 a1 == D env2 a2 = go a1 a2 where-    go (DEFAULT, _, rhs1) (DEFAULT, _, rhs2)-        = D env1 rhs1 == D env2 rhs2-    go (LitAlt lit1, _, rhs1) (LitAlt lit2, _, rhs2)-        = lit1 == lit2 && D env1 rhs1 == D env2 rhs2-    go (DataAlt dc1, bs1, rhs1) (DataAlt dc2, bs2, rhs2)-        = dc1 == dc2 &&-          D (extendCMEs env1 bs1) rhs1 == D (extendCMEs env2 bs2) rhs2-    go _ _ = False--mapA :: (a->b) -> AltMap a -> AltMap b-mapA f (AM { am_deflt = adeflt, am_data = adata, am_lit = alit })-  = AM { am_deflt = mapTM f adeflt-       , am_data = mapTM (mapTM f) adata-       , am_lit = mapTM (mapTM f) alit }--lkA :: CmEnv -> CoreAlt -> AltMap a -> Maybe a-lkA env (DEFAULT,    _, rhs)  = am_deflt >.> lkG (D env rhs)-lkA env (LitAlt lit, _, rhs)  = am_lit >.> lkLit lit >=> lkG (D env rhs)-lkA env (DataAlt dc, bs, rhs) = am_data >.> lkDNamed dc-                                        >=> lkG (D (extendCMEs env bs) rhs)--xtA :: CmEnv -> CoreAlt -> XT a -> AltMap a -> AltMap a-xtA env (DEFAULT, _, rhs)    f m =-    m { am_deflt = am_deflt m |> xtG (D env rhs) f }-xtA env (LitAlt l, _, rhs)   f m =-    m { am_lit   = am_lit m   |> xtLit l |>> xtG (D env rhs) f }-xtA env (DataAlt d, bs, rhs) f m =-    m { am_data  = am_data m  |> xtDNamed d-                             |>> xtG (D (extendCMEs env bs) rhs) f }--fdA :: (a -> b -> b) -> AltMap a -> b -> b-fdA k m = foldTM k (am_deflt m)-        . foldTM (foldTM k) (am_data m)-        . foldTM (foldTM k) (am_lit m)--{--************************************************************************-*                                                                      *-                   Coercions-*                                                                      *-************************************************************************--}---- We should really never care about the contents of a coercion. Instead,--- just look up the coercion's type.-newtype CoercionMap a = CoercionMap (CoercionMapG a)--instance TrieMap CoercionMap where-   type Key CoercionMap = Coercion-   emptyTM                     = CoercionMap emptyTM-   lookupTM k  (CoercionMap m) = lookupTM (deBruijnize k) m-   alterTM k f (CoercionMap m) = CoercionMap (alterTM (deBruijnize k) f m)-   foldTM k    (CoercionMap m) = foldTM k m-   mapTM f     (CoercionMap m) = CoercionMap (mapTM f m)--type CoercionMapG = GenMap CoercionMapX-newtype CoercionMapX a = CoercionMapX (TypeMapX a)--instance TrieMap CoercionMapX where-  type Key CoercionMapX = DeBruijn Coercion-  emptyTM = CoercionMapX emptyTM-  lookupTM = lkC-  alterTM  = xtC-  foldTM f (CoercionMapX core_tm) = foldTM f core_tm-  mapTM f (CoercionMapX core_tm)  = CoercionMapX (mapTM f core_tm)--instance Eq (DeBruijn Coercion) where-  D env1 co1 == D env2 co2-    = D env1 (coercionType co1) ==-      D env2 (coercionType co2)--lkC :: DeBruijn Coercion -> CoercionMapX a -> Maybe a-lkC (D env co) (CoercionMapX core_tm) = lkT (D env $ coercionType co)-                                        core_tm--xtC :: DeBruijn Coercion -> XT a -> CoercionMapX a -> CoercionMapX a-xtC (D env co) f (CoercionMapX m)-  = CoercionMapX (xtT (D env $ coercionType co) f m)--{--************************************************************************-*                                                                      *-                   Types-*                                                                      *-************************************************************************--}---- | @TypeMapG a@ is a map from @DeBruijn Type@ to @a@.  The extended--- key makes it suitable for recursive traversal, since it can track binders,--- but it is strictly internal to this module.  If you are including a 'TypeMap'--- inside another 'TrieMap', this is the type you want. Note that this--- lookup does not do a kind-check. Thus, all keys in this map must have--- the same kind. Also note that this map respects the distinction between--- @Type@ and @Constraint@, despite the fact that they are equivalent type--- synonyms in Core.-type TypeMapG = GenMap TypeMapX---- | @TypeMapX a@ is the base map from @DeBruijn Type@ to @a@, but without the--- 'GenMap' optimization.-data TypeMapX a-  = TM { tm_var    :: VarMap a-       , tm_app    :: TypeMapG (TypeMapG a)-       , tm_tycon  :: DNameEnv a-       , tm_forall :: TypeMapG (BndrMap a) -- See Note [Binders]-       , tm_tylit  :: TyLitMap a-       , tm_coerce :: Maybe a-       }-    -- Note that there is no tyconapp case; see Note [Equality on AppTys] in Type---- | Squeeze out any synonyms, and change TyConApps to nested AppTys. Why the--- last one? See Note [Equality on AppTys] in Type------ Note, however, that we keep Constraint and Type apart here, despite the fact--- that they are both synonyms of TYPE 'LiftedRep (see #11715).-trieMapView :: Type -> Maybe Type-trieMapView ty-  -- First check for TyConApps that need to be expanded to-  -- AppTy chains.-  | Just (tc, tys@(_:_)) <- tcSplitTyConApp_maybe ty-  = Just $ foldl AppTy (TyConApp tc []) tys--  -- Then resolve any remaining nullary synonyms.-  | Just ty' <- tcView ty = Just ty'-trieMapView _ = Nothing--instance TrieMap TypeMapX where-   type Key TypeMapX = DeBruijn Type-   emptyTM  = emptyT-   lookupTM = lkT-   alterTM  = xtT-   foldTM   = fdT-   mapTM    = mapT--instance Eq (DeBruijn Type) where-  env_t@(D env t) == env_t'@(D env' t')-    | Just new_t  <- tcView t  = D env new_t == env_t'-    | Just new_t' <- tcView t' = env_t       == D env' new_t'-    | otherwise-    = case (t, t') of-        (CastTy t1 _, _)  -> D env t1 == D env t'-        (_, CastTy t1' _) -> D env t  == D env t1'--        (TyVarTy v, TyVarTy v')-            -> case (lookupCME env v, lookupCME env' v') of-                (Just bv, Just bv') -> bv == bv'-                (Nothing, Nothing)  -> v == v'-                _ -> False-                -- See Note [Equality on AppTys] in Type-        (AppTy t1 t2, s) | Just (t1', t2') <- repSplitAppTy_maybe s-            -> 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')-            -> 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'-        (LitTy l, LitTy l')-            -> l == l'-        (ForAllTy (TvBndr tv _) ty, ForAllTy (TvBndr tv' _) ty')-            -> D env (tyVarKind tv)    == D env' (tyVarKind tv') &&-               D (extendCME env tv) ty == D (extendCME env' tv') ty'-        (CoercionTy {}, CoercionTy {})-            -> True-        _ -> False--instance {-# OVERLAPPING #-}-         Outputable a => Outputable (TypeMapG a) where-  ppr m = text "TypeMap elts" <+> ppr (foldTM (:) m [])--emptyT :: TypeMapX a-emptyT = TM { tm_var  = emptyTM-            , tm_app  = EmptyMap-            , tm_tycon  = emptyDNameEnv-            , tm_forall = EmptyMap-            , tm_tylit  = emptyTyLitMap-            , tm_coerce = Nothing }--mapT :: (a->b) -> TypeMapX a -> TypeMapX b-mapT f (TM { tm_var  = tvar, tm_app = tapp, tm_tycon = ttycon-           , tm_forall = tforall, tm_tylit = tlit-           , tm_coerce = tcoerce })-  = TM { tm_var    = mapTM f tvar-       , tm_app    = mapTM (mapTM f) tapp-       , tm_tycon  = mapTM f ttycon-       , tm_forall = mapTM (mapTM f) tforall-       , tm_tylit  = mapTM f tlit-       , tm_coerce = fmap f tcoerce }--------------------lkT :: DeBruijn Type -> TypeMapX a -> Maybe a-lkT (D env ty) m = go ty m-  where-    go ty | Just ty' <- trieMapView ty = go ty'-    go (TyVarTy v)                 = tm_var    >.> lkVar env v-    go (AppTy t1 t2)               = tm_app    >.> lkG (D env t1)-                                               >=> lkG (D env t2)-    go (TyConApp tc [])            = tm_tycon  >.> lkDNamed tc-    go ty@(TyConApp _ (_:_))       = pprPanic "lkT TyConApp" (ppr ty)-    go (LitTy l)                   = tm_tylit  >.> lkTyLit l-    go (ForAllTy (TvBndr tv _) ty) = tm_forall >.> lkG (D (extendCME env tv) ty)-                                               >=> lkBndr env tv-    go ty@(FunTy {})               = pprPanic "lkT FunTy" (ppr ty)-    go (CastTy t _)                = go t-    go (CoercionTy {})             = tm_coerce--------------------xtT :: DeBruijn Type -> XT a -> TypeMapX a -> TypeMapX a-xtT (D env ty) f m | Just ty' <- trieMapView ty = xtT (D env ty') f m--xtT (D env (TyVarTy v))       f m = m { tm_var    = tm_var m |> xtVar env v f }-xtT (D env (AppTy t1 t2))     f m = m { tm_app    = tm_app m |> xtG (D env t1)-                                                            |>> xtG (D env t2) f }-xtT (D _   (TyConApp tc []))  f m = m { tm_tycon  = tm_tycon m |> xtDNamed tc f }-xtT (D _   (LitTy l))         f m = m { tm_tylit  = tm_tylit m |> xtTyLit l f }-xtT (D env (CastTy t _))      f m = xtT (D env t) f m-xtT (D _   (CoercionTy {}))   f m = m { tm_coerce = tm_coerce m |> f }-xtT (D env (ForAllTy (TvBndr tv _) ty))  f m-  = m { tm_forall = tm_forall m |> xtG (D (extendCME env tv) ty)-                                |>> xtBndr env tv f }-xtT (D _   ty@(TyConApp _ (_:_))) _ _ = pprPanic "xtT TyConApp" (ppr ty)-xtT (D _   ty@(FunTy {}))         _ _ = pprPanic "xtT FunTy" (ppr ty)--fdT :: (a -> b -> b) -> TypeMapX a -> b -> b-fdT k m = foldTM k (tm_var m)-        . foldTM (foldTM k) (tm_app m)-        . foldTM k (tm_tycon m)-        . foldTM (foldTM k) (tm_forall m)-        . foldTyLit k (tm_tylit m)-        . foldMaybe k (tm_coerce m)---------------------------data TyLitMap a = TLM { tlm_number :: Map.Map Integer a-                      , tlm_string :: Map.Map FastString a-                      }--instance TrieMap TyLitMap where-   type Key TyLitMap = TyLit-   emptyTM  = emptyTyLitMap-   lookupTM = lkTyLit-   alterTM  = xtTyLit-   foldTM   = foldTyLit-   mapTM    = mapTyLit--emptyTyLitMap :: TyLitMap a-emptyTyLitMap = TLM { tlm_number = Map.empty, tlm_string = Map.empty }--mapTyLit :: (a->b) -> TyLitMap a -> TyLitMap b-mapTyLit f (TLM { tlm_number = tn, tlm_string = ts })-  = TLM { tlm_number = Map.map f tn, tlm_string = Map.map f ts }--lkTyLit :: TyLit -> TyLitMap a -> Maybe a-lkTyLit l =-  case l of-    NumTyLit n -> tlm_number >.> Map.lookup n-    StrTyLit n -> tlm_string >.> Map.lookup n--xtTyLit :: TyLit -> XT a -> TyLitMap a -> TyLitMap a-xtTyLit l f m =-  case l of-    NumTyLit n -> m { tlm_number = tlm_number m |> Map.alter f n }-    StrTyLit n -> m { tlm_string = tlm_string m |> Map.alter f n }--foldTyLit :: (a -> b -> b) -> TyLitMap a -> b -> b-foldTyLit l m = flip (Map.foldr l) (tlm_string m)-              . flip (Map.foldr l) (tlm_number m)------------------------------------------------------ | @TypeMap a@ is a map from 'Type' to @a@.  If you are a client, this--- is the type you want. The keys in this map may have different kinds.-newtype TypeMap a = TypeMap (TypeMapG (TypeMapG a))--lkTT :: DeBruijn Type -> TypeMap a -> Maybe a-lkTT (D env ty) (TypeMap m) = lkG (D env $ typeKind ty) m-                          >>= lkG (D env ty)--xtTT :: DeBruijn Type -> XT a -> TypeMap a -> TypeMap a-xtTT (D env ty) f (TypeMap m)-  = TypeMap (m |> xtG (D env $ typeKind ty)-               |>> xtG (D env ty) f)---- Below are some client-oriented functions which operate on 'TypeMap'.--instance TrieMap TypeMap where-    type Key TypeMap = Type-    emptyTM = TypeMap emptyTM-    lookupTM k m = lkTT (deBruijnize k) m-    alterTM k f m = xtTT (deBruijnize k) f m-    foldTM k (TypeMap m) = foldTM (foldTM k) m-    mapTM f (TypeMap m) = TypeMap (mapTM (mapTM f) m)--foldTypeMap :: (a -> b -> b) -> b -> TypeMap a -> b-foldTypeMap k z m = foldTM k m z--emptyTypeMap :: TypeMap a-emptyTypeMap = emptyTM--lookupTypeMap :: TypeMap a -> Type -> Maybe a-lookupTypeMap cm t = lookupTM t cm--extendTypeMap :: TypeMap a -> Type -> a -> TypeMap a-extendTypeMap m t v = alterTM t (const (Just v)) m--lookupTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> Maybe a-lookupTypeMapWithScope m cm t = lkTT (D cm t) m---- | Extend a 'TypeMap' with a type in the given context.--- @extendTypeMapWithScope m (mkDeBruijnContext [a,b,c]) t v@ is equivalent to--- @extendTypeMap m (forall a b c. t) v@, but allows reuse of the context over--- multiple insertions.-extendTypeMapWithScope :: TypeMap a -> CmEnv -> Type -> a -> TypeMap a-extendTypeMapWithScope m cm t v = xtTT (D cm t) (const (Just v)) m---- | Construct a deBruijn environment with the given variables in scope.--- e.g. @mkDeBruijnEnv [a,b,c]@ constructs a context @forall a b c.@-mkDeBruijnContext :: [Var] -> CmEnv-mkDeBruijnContext = extendCMEs emptyCME---- | A 'LooseTypeMap' doesn't do a kind-check. Thus, when lookup up (t |> g),--- you'll find entries inserted under (t), even if (g) is non-reflexive.-newtype LooseTypeMap a-  = LooseTypeMap (TypeMapG a)--instance TrieMap LooseTypeMap where-  type Key LooseTypeMap = Type-  emptyTM = LooseTypeMap emptyTM-  lookupTM k (LooseTypeMap m) = lookupTM (deBruijnize k) m-  alterTM k f (LooseTypeMap m) = LooseTypeMap (alterTM (deBruijnize k) f m)-  foldTM f (LooseTypeMap m) = foldTM f m-  mapTM f (LooseTypeMap m) = LooseTypeMap (mapTM f m)--{--************************************************************************-*                                                                      *-                   Variables-*                                                                      *-************************************************************************--}--type BoundVar = Int  -- Bound variables are deBruijn numbered-type BoundVarMap a = IntMap.IntMap a--data CmEnv = CME { cme_next :: !BoundVar-                 , cme_env  :: VarEnv BoundVar }--emptyCME :: CmEnv-emptyCME = CME { cme_next = 0, cme_env = emptyVarEnv }--extendCME :: CmEnv -> Var -> CmEnv-extendCME (CME { cme_next = bv, cme_env = env }) v-  = CME { cme_next = bv+1, cme_env = extendVarEnv env v bv }--extendCMEs :: CmEnv -> [Var] -> CmEnv-extendCMEs env vs = foldl extendCME env vs--lookupCME :: CmEnv -> Var -> Maybe BoundVar-lookupCME (CME { cme_env = env }) v = lookupVarEnv env v---- | @DeBruijn a@ represents @a@ modulo alpha-renaming.  This is achieved--- by equipping the value with a 'CmEnv', which tracks an on-the-fly deBruijn--- numbering.  This allows us to define an 'Eq' instance for @DeBruijn a@, even--- if this was not (easily) possible for @a@.  Note: we purposely don't--- export the constructor.  Make a helper function if you find yourself--- needing it.-data DeBruijn a = D CmEnv a---- | Synthesizes a @DeBruijn a@ from an @a@, by assuming that there are no--- bound binders (an empty 'CmEnv').  This is usually what you want if there--- isn't already a 'CmEnv' in scope.-deBruijnize :: a -> DeBruijn a-deBruijnize = D emptyCME--instance Eq (DeBruijn a) => Eq (DeBruijn [a]) where-    D _   []     == D _    []       = True-    D env (x:xs) == D env' (x':xs') = D env x  == D env' x' &&-                                      D env xs == D env' xs'-    _            == _               = False----------- Variable binders ----------------- | A 'BndrMap' is a 'TypeMapG' which allows us to distinguish between--- binding forms whose binders have different types.  For example,--- if we are doing a 'TrieMap' lookup on @\(x :: Int) -> ()@, we should--- not pick up an entry in the 'TrieMap' for @\(x :: Bool) -> ()@:--- we can disambiguate this by matching on the type (or kind, if this--- a binder in a type) of the binder.-type BndrMap = TypeMapG---- Note [Binders]--- ~~~~~~~~~~~~~~--- We need to use 'BndrMap' for 'Coercion', 'CoreExpr' AND 'Type', since all--- of these data types have binding forms.--lkBndr :: CmEnv -> Var -> BndrMap a -> Maybe a-lkBndr env v m = lkG (D env (varType v)) m--xtBndr :: CmEnv -> Var -> XT a -> BndrMap a -> BndrMap a-xtBndr env v f = xtG (D env (varType v)) f----------- Variable occurrence --------------data VarMap a = VM { vm_bvar   :: BoundVarMap a  -- Bound variable-                   , vm_fvar   :: DVarEnv a }      -- Free variable--instance TrieMap VarMap where-   type Key VarMap = Var-   emptyTM  = VM { vm_bvar = IntMap.empty, vm_fvar = emptyDVarEnv }-   lookupTM = lkVar emptyCME-   alterTM  = xtVar emptyCME-   foldTM   = fdVar-   mapTM    = mapVar--mapVar :: (a->b) -> VarMap a -> VarMap b-mapVar f (VM { vm_bvar = bv, vm_fvar = fv })-  = VM { vm_bvar = mapTM f bv, vm_fvar = mapTM f fv }--lkVar :: CmEnv -> Var -> VarMap a -> Maybe a-lkVar env v-  | Just bv <- lookupCME env v = vm_bvar >.> lookupTM bv-  | otherwise                  = vm_fvar >.> lkDFreeVar v--xtVar :: CmEnv -> Var -> XT a -> VarMap a -> VarMap a-xtVar env v f m-  | Just bv <- lookupCME env v = m { vm_bvar = vm_bvar m |> alterTM bv f }-  | otherwise                  = m { vm_fvar = vm_fvar m |> xtDFreeVar v f }--fdVar :: (a -> b -> b) -> VarMap a -> b -> b-fdVar k m = foldTM k (vm_bvar m)-          . foldTM k (vm_fvar m)--lkDFreeVar :: Var -> DVarEnv a -> Maybe a-lkDFreeVar var env = lookupDVarEnv env var--xtDFreeVar :: Var -> XT a -> DVarEnv a -> DVarEnv a-xtDFreeVar v f m = alterDVarEnv f m v
deSugar/Check.hs view
@@ -9,7 +9,7 @@  module Check (         -- Checking and printing-        checkSingle, checkMatches, isAnyPmCheckEnabled,+        checkSingle, checkMatches, checkGuardMatches, isAnyPmCheckEnabled,          -- See Note [Type and Term Equality Propagation]         genCaseTmCs1, genCaseTmCs2,@@ -24,7 +24,6 @@  import TmOracle import Unify( tcMatchTy )-import BasicTypes import DynFlags import HsSyn import TcHsSyn@@ -40,23 +39,25 @@ import Outputable import FastString import DataCon+import PatSyn import HscTypes (CompleteMatch(..))  import DsMonad import TcSimplify    (tcCheckSatisfiability)-import TcType        (toTcType, isStringTy, isIntTy, isWordTy)+import TcType        (isStringTy) import Bag import ErrUtils import Var           (EvVar) import TyCoRep import Type import UniqSupply-import DsGRHSs       (isTrueLHsExpr)-import Maybes        ( expectJust )+import DsUtils       (isTrueLHsExpr)+import Maybes        (expectJust)+import qualified GHC.LanguageExtensions as LangExt  import Data.List     (find)-import Data.Maybe    (isJust, fromMaybe)-import Control.Monad (forM, when, forM_)+import Data.Maybe    (catMaybes, isJust, fromMaybe)+import Control.Monad (forM, when, forM_, zipWithM) import Coercion import TcEvidence import IOEnv@@ -342,6 +343,23 @@     (NotCovered, Diverged )   -> PmResult prov [] us' m  -- inaccessible rhs   where m = [L locn [L 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 = L 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 ()@@ -368,7 +386,7 @@   | otherwise = do       liftD resetPmIterDs -- set the iter-no to zero       missing    <- mkInitialUncovered vars-      tracePm "checkMatches: missing" (vcat (map pprValVecDebug missing))+      tracePm "checkMatches': missing" (vcat (map pprValVecDebug missing))       (prov, rs,us,ds) <- go matches missing       return $ PmResult {                    pmresultProvenance   = prov@@ -401,38 +419,35 @@      hsLMatchToLPats :: LMatch id body -> Located [LPat id]     hsLMatchToLPats (L l (Match { m_pats = pats })) = L l pats+    hsLMatchToLPats (L _ (XMatch _)) = 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_css <- map toComplex . bagToList <$> liftD getTmCsDs-  case tmOracle initialTmState tm_css of-    Just tm_state -> do-      ty_css        <- liftD getDictsDs-      fam_insts     <- liftD dsGetFamInstEnvs-      mb_candidates <- inhabitationCandidates fam_insts (idType var)-      case mb_candidates of-        -- Inhabitation checking failed / the type is trivially inhabited-        Left ty -> return (uncoveredWithTy ty)+  (tm_css, ty_css) <- pmInitialTmTyCs+  fam_insts        <- liftD dsGetFamInstEnvs+  mb_candidates    <- inhabitationCandidates fam_insts (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 concatMapM candidates $ \(va,tm_ct,ty_cs) -> do-            let all_ty_cs = unionBags ty_cs ty_css-            sat_ty <- tyOracle all_ty_cs-            return $ case (sat_ty, tmOracle tm_state (tm_ct:tm_css)) of-              (True, Just tm_state') -> [(va, all_ty_cs, tm_state')]-              _non_sat               -> []-          let mkValVec (va,all_ty_cs,tm_state')-                = ValVec [va] (MkDelta all_ty_cs tm_state')-              uncovered = UncoveredPatterns (map mkValVec missing_m)-          return $ if null missing_m-            then emptyPmResult-            else PmResult FromBuiltin [] uncovered []-    Nothing -> return emptyPmResult+    -- 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 concatMapM candidates $ \(va,tm_ct,ty_cs) -> do+        mb_sat <- pmIsSatisfiable tm_ct tm_css ty_cs ty_css+        pure $ case mb_sat of+                Just (tm_state', all_ty_cs)+                        -> [(va, all_ty_cs, tm_state')]+                Nothing -> []+      let mkValVec (va,all_ty_cs,tm_state')+            = ValVec [va] (MkDelta all_ty_cs tm_state')+          uncovered = UncoveredPatterns (map mkValVec missing_m)+      return $ if null missing_m+        then emptyPmResult+        else PmResult FromBuiltin [] uncovered []  -- | Returns 'True' if the argument 'Type' is a fully saturated application of -- a closed type constructor.@@ -524,6 +539,73 @@           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 (TmState, Bag EvVar)+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 (initTmState, 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 some term and type constraints, 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).+pmIsSatisfiable+  :: ComplexEq -- ^ The new term constraint.+  -> TmState   -- ^ The ambient term constraints (known to be satisfiable).+  -> Bag EvVar -- ^ The new type constraints.+  -> Bag EvVar -- ^ The ambient type constraints (known to be satisfiable).+  -> PmM (Maybe (TmState, Bag EvVar))+               -- ^ @'Just' (term_cs, ty_cs)@ if the constraints are+               -- satisfiable, where @term_cs@ and @ty_cs@ are the new sets of+               -- term and type constraints, respectively. 'Nothing' otherwise.+pmIsSatisfiable new_term_c amb_term_cs new_ty_cs amb_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_term_cs new_term_c) of+           (True, Just term_cs) -> Just (term_cs, ty_cs)+           _unsat               -> Nothing+ {- Note [Type normalisation for EmptyCase] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EmptyCase is an exception for pattern matching, since it is strict. This means@@ -605,12 +687,12 @@       Just (tc, _)         | tc `elem` trivially_inhabited -> case dcs of             []    -> return (Left src_ty)-            (_:_) -> do var <- liftD $ mkPmId (toTcType core_ty)+            (_:_) -> do var <- liftD $ mkPmId core_ty                         let va = build_tm (PmVar var) dcs                         return $ Right [(va, mkIdEq var, emptyBag)]          | pmIsClosedType core_ty -> liftD $ do-            var  <- mkPmId (toTcType core_ty) -- it would be wrong to unify x+            var  <- mkPmId core_ty -- it would be wrong to unify x             alts <- mapM (mkOneConFull var . RealDataCon) (tyConDataCons tc)             return $ Right [(build_tm va dcs, eq, cs) | (va, eq, cs) <- alts]       -- For other types conservatively assume that they are inhabited.@@ -675,12 +757,12 @@ -- | 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 }+                 , 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)+isFakeGuard [PmCon { pm_con_con = RealDataCon c }] (PmExprOther (EWildPat _))   | c == trueDataCon = True   | otherwise        = False isFakeGuard _pats _e = False@@ -723,25 +805,25 @@  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+  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)+  BangPat _ p  -> translatePat fam_insts (unLoc p) -  AsPat lid p -> do+  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]) -  SigPatOut p _ty -> translatePat fam_insts (unLoc p)+  SigPat _ty p -> translatePat fam_insts (unLoc p)    -- See Note [Translate CoPats]-  CoPat wrapper p ty+  CoPat _ wrapper p ty     | isIdHsWrapper wrapper                   -> translatePat fam_insts p     | WpCast co <-  wrapper, isReflexiveCo co -> translatePat fam_insts p     | otherwise -> do@@ -751,37 +833,50 @@         return [xp,g]    -- (n + k)  ===>   x (True <- x >= k) (n <- x-k)-  NPlusKPat (L _ _n) _k1 _k2 _ge _minus ty -> mkCanFailPmPat ty+  NPlusKPat ty (L _ _n) _k1 _k2 _ge _minus -> mkCanFailPmPat ty    -- (fun -> pat)   ===>   x (pat <- fun x)-  ViewPat lexpr lpat arg_ty -> do+  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 lexpr xe)+        let g = mkGuard ps (HsApp noExt lexpr xe)         return [xp,g]       False -> mkCanFailPmPat arg_ty    -- list-  ListPat ps ty Nothing -> do+  ListPat (ListPatTc ty Nothing) ps -> do     foldr (mkListPatVec ty) [nilPattern ty]       <$> translatePatVec fam_insts (map unLoc ps)    -- overloaded list-  ListPat lpats elem_ty (Just (pat_ty, _to_list))-    | Just e_ty <- splitListTyConApp_maybe pat_ty-    , (_, norm_elem_ty) <- normaliseType fam_insts Nominal elem_ty-         -- elem_ty is frequently something like-         -- `Item [Int]`, but we prefer `Int`-    , norm_elem_ty `eqType` e_ty ->-        -- We have to ensure that the element types are exactly the same.-        -- Otherwise, one may give an instance IsList [Int] (more specific than-        -- the default IsList [a]) with a different implementation for `toList'-        translatePat fam_insts (ListPat lpats e_ty Nothing)-      -- See Note [Guards and Approximation]-    | otherwise -> mkCanFailPmPat pat_ty+  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     = L _ con             , pat_arg_tys = arg_tys@@ -799,26 +894,29 @@                       , pm_con_dicts   = dicts                       , pm_con_args    = args }] -  NPat (L _ ol) mb_neg _eq ty -> translateNPat fam_insts ol mb_neg ty+  -- See Note [Translate Overloaded Literal for Exhaustiveness Checking]+  NPat _ (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 }] -  LitPat lit-      -- If it is a string then convert it to a list of characters+  -- See Note [Translate Overloaded Literal for Exhaustiveness Checking]+  LitPat _ lit     | HsString src s <- lit ->         foldr (mkListPatVec charTy) [nilPattern charTy] <$>-          translatePatVec fam_insts (map (LitPat . HsChar src) (unpackFS s))+          translatePatVec fam_insts+            (map (LitPat noExt . HsChar src) (unpackFS s))     | otherwise -> return [mkLitPattern lit] -  PArrPat ps ty -> do-    tidy_ps <- translatePatVec fam_insts (map unLoc ps)-    let fake_con = RealDataCon (parrFakeCon (length ps))-    return [vanillaConPattern fake_con [ty] (concat tidy_ps)]--  TuplePat ps boxity tys -> do+  TuplePat tys ps boxity -> do     tidy_ps <- translatePatVec fam_insts (map unLoc ps)     let tuple_con = RealDataCon (tupleDataCon boxity (length ps))     return [vanillaConPattern tuple_con tys (concat tidy_ps)] -  SumPat p alt arity ty -> do+  SumPat ty p alt arity -> do     tidy_p <- translatePat fam_insts (unLoc p)     let sum_con = RealDataCon (sumDataCon alt arity)     return [vanillaConPattern sum_con ty tidy_p]@@ -827,32 +925,93 @@   -- Not supposed to happen   ConPatIn  {} -> panic "Check.translatePat: ConPatIn"   SplicePat {} -> panic "Check.translatePat: SplicePat"-  SigPatIn  {} -> panic "Check.translatePat: SigPatIn"+  XPat      {} -> panic "Check.translatePat: XPat" --- | Translate an overloaded literal (see `tidyNPat' in deSugar/MatchLit.hs)-translateNPat :: FamInstEnvs-              -> HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> Type-              -> DsM PatVec-translateNPat fam_insts (OverLit val False _ ty) mb_neg outer_ty-  | not type_change, isStringTy ty, HsIsString src s <- val, Nothing <- mb_neg-  = translatePat fam_insts (LitPat (HsString src s))-  | not type_change, isIntTy    ty, HsIntegral i <- val-  = translatePat fam_insts-                 (LitPat $ case mb_neg of-                             Nothing -> HsInt def i-                             Just _  -> HsInt def (negateIntegralLit i))-  | not type_change, isWordTy   ty, HsIntegral i <- val-  = translatePat fam_insts-                 (LitPat $ case mb_neg of-                             Nothing -> HsWordPrim (il_text i) (il_value i)-                             Just _  -> let ni = negateIntegralLit i in-                                        HsWordPrim (il_text ni) (il_value ni))-  where-    type_change = not (outer_ty `eqType` ty)+{- Note [Translate Overloaded Literal for Exhaustiveness Checking]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The translation of @NPat@ in exhaustiveness checker is a bit different+from translation in pattern matcher. -translateNPat _ ol mb_neg _-  = return [PmLit { pm_lit_lit = PmOLit (isJust mb_neg) ol }]+  * 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]@@ -923,10 +1082,12 @@   return (pats', guards')   where     extractGuards :: LGRHS GhcTc (LHsExpr GhcTc) -> [GuardStmt GhcTc]-    extractGuards (L _ (GRHS gs _)) = map unLoc gs+    extractGuards (L _ (GRHS _ gs _)) = map unLoc gs+    extractGuards (L _ (XGRHS _)) = panic "translateMatch"      pats   = map unLoc lpats     guards = map extractGuards (grhssGRHSs grhss)+translateMatch _ (L _ (XMatch _)) = panic "translateMatch"  -- ----------------------------------------------------------------------- -- * Transform source guards (GuardStmt Id) to PmPats (Pattern)@@ -974,14 +1135,15 @@ -- | 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+  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@@ -1051,7 +1213,7 @@ problem is exactly like above, as its solution. For future reference, the code below is the *right thing to do*: -   ListPat lpats elem_ty (Just (pat_ty, to_list))+   ListPat (ListPatTc elem_ty (Just (pat_ty, _to_list))) lpats      otherwise -> do        (xp, xe) <- mkPmId2Forms pat_ty        ps       <- translatePatVec (map unLoc lpats)@@ -1064,7 +1226,7 @@ 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 on Overloaded Literals]+They are mainly covered in Note [Undecidable Equality for Overloaded Literals] in PmExpr.  4. N+K Patterns & Pattern Synonyms@@ -1216,7 +1378,7 @@ mkPmId2Forms :: Type -> DsM (Pattern, LHsExpr GhcTc) mkPmId2Forms ty = do   x <- mkPmId ty-  return (PmVar x, noLoc (HsVar (noLoc x)))+  return (PmVar x, noLoc (HsVar noExt (noLoc x)))  -- ---------------------------------------------------------------------------- -- * Converting between Value Abstractions, Patterns and PmExpr@@ -1282,19 +1444,75 @@   let final_groups = fam ++ from_pragma   return final_groups     where-      -- Check that all the pattern types in a `COMPLETE`-      -- pragma subsume the type we're matching. See #14135.+      -- 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 =-        isJust . mapM (flip tcMatchTy ty . resTy . conLikeFullSig)+      isValidCompleteMatch ty = all go         where-          resTy (_, _, _, _, _, _, res_ty) = res_ty+          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 (toTcType ty)+newEvVar name ty = mkLocalId name ty  nameType :: String -> Type -> DsM EvVar nameType name ty = do@@ -1389,14 +1607,8 @@ -- delta with all term and type constraints in scope. mkInitialUncovered :: [Id] -> PmM Uncovered mkInitialUncovered vars = 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)-      patterns  = map PmVar vars-    -- If any of the term/type constraints are non-    -- satisfiable then return with the initialTmState. See #12957+  (initTmState, initTyCs) <- pmInitialTmTyCs+  let patterns = map PmVar vars   return [ValVec patterns (MkDelta initTyCs initTmState)]  -- | Increase the counter for elapsed algorithm iterations, check that the@@ -1487,12 +1699,28 @@   | otherwise = return mempty  -- ConCon-pmcheckHd ( p@(PmCon {pm_con_con = c1, pm_con_args = args1})) ps guards-          (va@(PmCon {pm_con_con = c2, pm_con_args = args2})) (ValVec vva delta)+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 = kcon c1 (pm_con_arg_tys p) (pm_con_tvs p) (pm_con_dicts p)-                <$> pmcheckI (args1 ++ ps) guards (ValVec (args2 ++ 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 =@@ -1509,12 +1737,12 @@   cons_cs <- mapM (liftD . mkOneConFull x) complete_match    inst_vsa <- flip concatMapM cons_cs $ \(va, tm_ct, ty_cs) -> do-    let ty_state = ty_cs `unionBags` delta_ty_cs delta -- not actually a state-    sat_ty <- if isEmptyBag ty_cs then return True-                                  else tyOracle ty_state-    return $ case (sat_ty, solveOneEq (delta_tm_cs delta) tm_ct) of-      (True, Just tm_state) -> [ValVec (va:vva) (MkDelta ty_state tm_state)]-      _ty_or_tm_failed      -> []+    mb_sat <- pmIsSatisfiable tm_ct (delta_tm_cs delta)+                              ty_cs (delta_ty_cs delta)+    pure $ case mb_sat of+             Just (tm_state, ty_state)+                     -> [ValVec (va:vva) (MkDelta ty_state tm_state)]+             Nothing -> []    set_provenance prov .     force_if (canDiverge (idName x) (delta_tm_cs delta)) <$>@@ -1583,6 +1811,121 @@ -- 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 pattern variable (pv :: T PV_1 ... PV_p), where PV_1, ..., PV_p+are some types that instantiate u_1, ... u_p. The idea is that we should+substitute PV_1 for u_1, ..., and PV_p for u_p when forming a PmCon (the+mkOneConFull function accomplishes this) and then hand this PmCon off to the+ConCon case.++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 @@ -1893,9 +2236,10 @@ exhaustiveWarningFlag :: HsMatchContext id -> Maybe WarningFlag exhaustiveWarningFlag (FunRhs {})   = Just Opt_WarnIncompletePatterns exhaustiveWarningFlag CaseAlt       = Just Opt_WarnIncompletePatterns-exhaustiveWarningFlag IfAlt         = Nothing+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
deSugar/Coverage.hs view
@@ -27,6 +27,7 @@ import Name import Bag import CostCentre+import CostCentreState import CoreSyn import Id import VarSet@@ -34,7 +35,6 @@ import FastString import HscTypes import TyCon-import UniqSupply import BasicTypes import MonadUtils import Maybes@@ -75,7 +75,6 @@     Just orig_file <- ml_hs_file mod_loc,     not ("boot" `isSuffixOf` orig_file) = do -     us <- mkSplitUniqSupply 'C' -- for cost centres      let  orig_file2 = guessSourceFile binds orig_file            tickPass tickish (binds,st) =@@ -98,7 +97,7 @@            initState = TT { tickBoxCount = 0                          , mixEntries   = []-                         , uniqSupply   = us+                         , ccIndices    = newCostCentreState                          }            (binds1,st) = foldr tickPass (binds, initState) passes@@ -293,11 +292,15 @@   tickish <- tickishType `liftM` getEnv   if inline && tickish == ProfNotes then return (L pos funBind) else do -  (fvs, mg@(MG { mg_alts = matches' })) <-+  (fvs, mg) <-         getFreeVars $         addPathEntry name $         addTickMatchGroup False (fun_matches funBind) +  case mg of+    MG {} -> return ()+    _     -> panic "addTickLHsBind"+   blackListed <- isBlackListed pos   exported_names <- liftM exports getEnv @@ -316,7 +319,7 @@                 return Nothing    let mbCons = maybe Prelude.id (:)-  return $ L pos $ funBind { fun_matches = mg { mg_alts = matches' }+  return $ L pos $ funBind { fun_matches = mg                            , fun_tick = tick `mbCons` fun_tick funBind }     where@@ -352,6 +355,7 @@ -- Only internal stuff, not from source, uses VarBind, so we ignore it. addTickLHsBind var_bind@(L _ (VarBind {})) = return var_bind addTickLHsBind patsyn_bind@(L _ (PatSynBind {})) = return patsyn_bind+addTickLHsBind bind@(L _ (XHsBindsLR {})) = return bind   bindTick@@ -452,15 +456,15 @@ -- general heuristic: expressions which do not denote values are good -- break points isGoodBreakExpr :: HsExpr GhcTc -> Bool-isGoodBreakExpr (HsApp {})        = True-isGoodBreakExpr (HsAppTypeOut {}) = True-isGoodBreakExpr (OpApp {})        = True-isGoodBreakExpr _other            = False+isGoodBreakExpr (HsApp {})     = True+isGoodBreakExpr (HsAppType {}) = True+isGoodBreakExpr (OpApp {})     = True+isGoodBreakExpr _other         = False  isCallSite :: HsExpr GhcTc -> Bool-isCallSite HsApp{}        = True-isCallSite HsAppTypeOut{} = True-isCallSite OpApp{}        = True+isCallSite HsApp{}     = True+isCallSite HsAppType{} = True+isCallSite OpApp{}     = True isCallSite _ = False  addTickLHsExprOptAlt :: Bool -> LHsExpr GhcTc -> TM (LHsExpr GhcTc)@@ -482,55 +486,58 @@ -- in the addTickLHsExpr family of functions.)  addTickHsExpr :: HsExpr GhcTc -> TM (HsExpr GhcTc)-addTickHsExpr e@(HsVar (L _ id)) = do freeVar id; return e-addTickHsExpr (HsUnboundVar {})  = panic "addTickHsExpr.HsUnboundVar"-addTickHsExpr e@(HsConLikeOut con)+addTickHsExpr e@(HsVar _ (L _ id)) = do freeVar id; return e+addTickHsExpr (HsUnboundVar {})    = panic "addTickHsExpr.HsUnboundVar"+addTickHsExpr e@(HsConLikeOut _ con)   | Just id <- conLikeWrapId_maybe con = do freeVar id; return e-addTickHsExpr e@(HsIPVar _)      = return e-addTickHsExpr e@(HsOverLit _)    = return e-addTickHsExpr e@(HsOverLabel{})  = return e-addTickHsExpr e@(HsLit _)        = return e-addTickHsExpr (HsLam matchgroup) = liftM HsLam (addTickMatchGroup True matchgroup)-addTickHsExpr (HsLamCase mgs)    = liftM HsLamCase (addTickMatchGroup True mgs)-addTickHsExpr (HsApp e1 e2)      = liftM2 HsApp (addTickLHsExprNever e1)-                                                (addTickLHsExpr      e2)-addTickHsExpr (HsAppTypeOut e ty) = liftM2 HsAppTypeOut (addTickLHsExprNever e)-                                                        (return ty)+addTickHsExpr e@(HsIPVar {})       = return e+addTickHsExpr e@(HsOverLit {})     = return e+addTickHsExpr e@(HsOverLabel{})    = return e+addTickHsExpr e@(HsLit {})         = return e+addTickHsExpr (HsLam x matchgroup) = liftM (HsLam x)+                                           (addTickMatchGroup True matchgroup)+addTickHsExpr (HsLamCase x mgs)    = liftM (HsLamCase x)+                                           (addTickMatchGroup True mgs)+addTickHsExpr (HsApp x e1 e2)      = liftM2 (HsApp x) (addTickLHsExprNever e1)+                                                      (addTickLHsExpr      e2)+addTickHsExpr (HsAppType ty e)   = liftM2 HsAppType (return ty)+                                                    (addTickLHsExprNever e) -addTickHsExpr (OpApp e1 e2 fix e3) =++addTickHsExpr (OpApp fix e1 e2 e3) =         liftM4 OpApp+                (return fix)                 (addTickLHsExpr e1)                 (addTickLHsExprNever e2)-                (return fix)                 (addTickLHsExpr e3)-addTickHsExpr (NegApp e neg) =-        liftM2 NegApp+addTickHsExpr (NegApp x e neg) =+        liftM2 (NegApp x)                 (addTickLHsExpr e)                 (addTickSyntaxExpr hpcSrcSpan neg)-addTickHsExpr (HsPar e) =-        liftM HsPar (addTickLHsExprEvalInner e)-addTickHsExpr (SectionL e1 e2) =-        liftM2 SectionL+addTickHsExpr (HsPar x e) =+        liftM (HsPar x) (addTickLHsExprEvalInner e)+addTickHsExpr (SectionL x e1 e2) =+        liftM2 (SectionL x)                 (addTickLHsExpr e1)                 (addTickLHsExprNever e2)-addTickHsExpr (SectionR e1 e2) =-        liftM2 SectionR+addTickHsExpr (SectionR x e1 e2) =+        liftM2 (SectionR x)                 (addTickLHsExprNever e1)                 (addTickLHsExpr e2)-addTickHsExpr (ExplicitTuple es boxity) =-        liftM2 ExplicitTuple+addTickHsExpr (ExplicitTuple x es boxity) =+        liftM2 (ExplicitTuple x)                 (mapM addTickTupArg es)                 (return boxity)-addTickHsExpr (ExplicitSum tag arity e ty) = do+addTickHsExpr (ExplicitSum ty tag arity e) = do         e' <- addTickLHsExpr e-        return (ExplicitSum tag arity e' ty)-addTickHsExpr (HsCase e mgs) =-        liftM2 HsCase+        return (ExplicitSum ty tag arity e')+addTickHsExpr (HsCase x e mgs) =+        liftM2 (HsCase x)                 (addTickLHsExpr e) -- not an EvalInner; e might not necessarily                                    -- be evaluated.                 (addTickMatchGroup False mgs)-addTickHsExpr (HsIf cnd e1 e2 e3) =-        liftM3 (HsIf cnd)+addTickHsExpr (HsIf x cnd e1 e2 e3) =+        liftM3 (HsIf x cnd)                 (addBinTickLHsExpr (BinBox CondBinBox) e1)                 (addTickLHsExprOptAlt True e2)                 (addTickLHsExprOptAlt True e3)@@ -538,14 +545,14 @@   = do { let isOneOfMany = case alts of [_] -> False; _ -> True        ; alts' <- mapM (liftL $ addTickGRHS isOneOfMany False) alts        ; return $ HsMultiIf ty alts' }-addTickHsExpr (HsLet (L l binds) e) =+addTickHsExpr (HsLet x (L l binds) e) =         bindLocals (collectLocalBinders binds) $-          liftM2 (HsLet . L l)+          liftM2 (HsLet x . L l)                   (addTickHsLocalBinds binds) -- to think about: !patterns.                   (addTickLHsExprLetBody e)-addTickHsExpr (HsDo cxt (L l stmts) srcloc)+addTickHsExpr (HsDo srcloc cxt (L l stmts))   = do { (stmts', _) <- addTickLStmts' forQual stmts (return ())-       ; return (HsDo cxt (L l stmts') srcloc) }+       ; return (HsDo srcloc cxt (L l stmts')) }   where         forQual = case cxt of                     ListComp -> Just $ BinBox QualBinBox@@ -559,10 +566,6 @@                    addTickWit (Just fln)                      = do fln' <- addTickSyntaxExpr hpcSrcSpan fln                           return (Just fln')-addTickHsExpr (ExplicitPArr ty es) =-        liftM2 ExplicitPArr-                (return ty)-                (mapM (addTickLHsExpr) es)  addTickHsExpr (HsStatic fvs e) = HsStatic fvs <$> addTickLHsExpr e @@ -575,12 +578,12 @@        ; flds' <- mapM addTickHsRecField flds        ; return (expr { rupd_expr = e', rupd_flds = flds' }) } -addTickHsExpr (ExprWithTySig e ty) =+addTickHsExpr (ExprWithTySig ty e) =         liftM2 ExprWithTySig-                (addTickLHsExprNever e) -- No need to tick the inner expression-                                    -- for expressions with signatures                 (return ty)-addTickHsExpr (ArithSeq  ty wit arith_seq) =+                (addTickLHsExprNever e) -- No need to tick the inner expression+                                        -- for expressions with signatures+addTickHsExpr (ArithSeq ty wit arith_seq) =         liftM3 ArithSeq                 (return ty)                 (addTickWit wit)@@ -590,26 +593,22 @@                                              return (Just fl')  -- We might encounter existing ticks (multiple Coverage passes)-addTickHsExpr (HsTick t e) =-        liftM (HsTick t) (addTickLHsExprNever e)-addTickHsExpr (HsBinTick t0 t1 e) =-        liftM (HsBinTick t0 t1) (addTickLHsExprNever e)+addTickHsExpr (HsTick x t e) =+        liftM (HsTick x t) (addTickLHsExprNever e)+addTickHsExpr (HsBinTick x t0 t1 e) =+        liftM (HsBinTick x t0 t1) (addTickLHsExprNever e) -addTickHsExpr (HsTickPragma _ _ _ (L pos e0)) = do+addTickHsExpr (HsTickPragma _ _ _ _ (L pos e0)) = do     e2 <- allocTickBox (ExpBox False) False False pos $                 addTickHsExpr e0     return $ unLoc e2-addTickHsExpr (PArrSeq   ty arith_seq) =-        liftM2 PArrSeq-                (return ty)-                (addTickArithSeqInfo arith_seq)-addTickHsExpr (HsSCC src nm e) =-        liftM3 HsSCC+addTickHsExpr (HsSCC x src nm e) =+        liftM3 (HsSCC x)                 (return src)                 (return nm)                 (addTickLHsExpr e)-addTickHsExpr (HsCoreAnn src nm e) =-        liftM3 HsCoreAnn+addTickHsExpr (HsCoreAnn x src nm e) =+        liftM3 (HsCoreAnn x)                 (return src)                 (return nm)                 (addTickLHsExpr e)@@ -617,27 +616,23 @@ addTickHsExpr e@(HsTcBracketOut  {}) = return e addTickHsExpr e@(HsRnBracketOut  {}) = return e addTickHsExpr e@(HsSpliceE  {})      = return e-addTickHsExpr (HsProc pat cmdtop) =-        liftM2 HsProc+addTickHsExpr (HsProc x pat cmdtop) =+        liftM2 (HsProc x)                 (addTickLPat pat)                 (liftL (addTickHsCmdTop) cmdtop)-addTickHsExpr (HsWrap w e) =-        liftM2 HsWrap+addTickHsExpr (HsWrap x w e) =+        liftM2 (HsWrap x)                 (return w)                 (addTickHsExpr e)       -- Explicitly no tick on inside -addTickHsExpr (ExprWithTySigOut e ty) =-        liftM2 ExprWithTySigOut-               (addTickLHsExprNever e) -- No need to tick the inner expression-               (return ty)             -- for expressions with signatures- -- Others should never happen in expression content. addTickHsExpr e  = pprPanic "addTickHsExpr" (ppr e)  addTickTupArg :: LHsTupArg GhcTc -> TM (LHsTupArg GhcTc)-addTickTupArg (L l (Present e))  = do { e' <- addTickLHsExpr e-                                      ; return (L l (Present e')) }+addTickTupArg (L l (Present x e))  = do { e' <- addTickLHsExpr e+                                      ; return (L l (Present x e')) } addTickTupArg (L l (Missing ty)) = return (L l (Missing ty))+addTickTupArg (L _ (XTupArg _)) = panic "addTickTupArg"  addTickMatchGroup :: Bool{-is lambda-} -> MatchGroup GhcTc (LHsExpr GhcTc)                   -> TM (MatchGroup GhcTc (LHsExpr GhcTc))@@ -645,6 +640,7 @@   let isOneOfMany = matchesOneOfMany matches   matches' <- mapM (liftL (addTickMatch isOneOfMany is_lam)) matches   return $ mg { mg_alts = L l matches' }+addTickMatchGroup _ (XMatchGroup _) = panic "addTickMatchGroup"  addTickMatch :: Bool -> Bool -> Match GhcTc (LHsExpr GhcTc)              -> TM (Match GhcTc (LHsExpr GhcTc))@@ -652,23 +648,26 @@   bindLocals (collectPatsBinders pats) $ do     gRHSs' <- addTickGRHSs isOneOfMany isLambda gRHSs     return $ match { m_grhss = gRHSs' }+addTickMatch _ _ (XMatch _) = panic "addTickMatch"  addTickGRHSs :: Bool -> Bool -> GRHSs GhcTc (LHsExpr GhcTc)              -> TM (GRHSs GhcTc (LHsExpr GhcTc))-addTickGRHSs isOneOfMany isLambda (GRHSs guarded (L l local_binds)) = do+addTickGRHSs isOneOfMany isLambda (GRHSs x guarded (L l local_binds)) = do   bindLocals binders $ do     local_binds' <- addTickHsLocalBinds local_binds     guarded' <- mapM (liftL (addTickGRHS isOneOfMany isLambda)) guarded-    return $ GRHSs guarded' (L l local_binds')+    return $ GRHSs x guarded' (L l local_binds')   where     binders = collectLocalBinders local_binds+addTickGRHSs _ _ (XGRHSs _) = panic "addTickGRHSs"  addTickGRHS :: Bool -> Bool -> GRHS GhcTc (LHsExpr GhcTc)             -> TM (GRHS GhcTc (LHsExpr GhcTc))-addTickGRHS isOneOfMany isLambda (GRHS stmts expr) = do+addTickGRHS isOneOfMany isLambda (GRHS x stmts expr) = do   (stmts',expr') <- addTickLStmts' (Just $ BinBox $ GuardBinBox) stmts                         (addTickGRHSBody isOneOfMany isLambda expr)-  return $ GRHS stmts' expr'+  return $ GRHS x stmts' expr'+addTickGRHS _ _ (XGRHS _) = panic "addTickGRHS"  addTickGRHSBody :: Bool -> Bool -> LHsExpr GhcTc -> TM (LHsExpr GhcTc) addTickGRHSBody isOneOfMany isLambda expr@(L pos e0) = do@@ -698,36 +697,33 @@  addTickStmt :: (Maybe (Bool -> BoxLabel)) -> Stmt GhcTc (LHsExpr GhcTc)             -> TM (Stmt GhcTc (LHsExpr GhcTc))-addTickStmt _isGuard (LastStmt e noret ret) = do-        liftM3 LastStmt+addTickStmt _isGuard (LastStmt x e noret ret) = do+        liftM3 (LastStmt x)                 (addTickLHsExpr e)                 (pure noret)                 (addTickSyntaxExpr hpcSrcSpan ret)-addTickStmt _isGuard (BindStmt pat e bind fail ty) = do-        liftM5 BindStmt+addTickStmt _isGuard (BindStmt x pat e bind fail) = do+        liftM4 (BindStmt x)                 (addTickLPat pat)                 (addTickLHsExprRHS e)                 (addTickSyntaxExpr hpcSrcSpan bind)                 (addTickSyntaxExpr hpcSrcSpan fail)-                (return ty)-addTickStmt isGuard (BodyStmt e bind' guard' ty) = do-        liftM4 BodyStmt+addTickStmt isGuard (BodyStmt x e bind' guard') = do+        liftM3 (BodyStmt x)                 (addTick isGuard e)                 (addTickSyntaxExpr hpcSrcSpan bind')                 (addTickSyntaxExpr hpcSrcSpan guard')-                (return ty)-addTickStmt _isGuard (LetStmt (L l binds)) = do-        liftM (LetStmt . L l)+addTickStmt _isGuard (LetStmt x (L l binds)) = do+        liftM (LetStmt x . L l)                 (addTickHsLocalBinds binds)-addTickStmt isGuard (ParStmt pairs mzipExpr bindExpr ty) = do-    liftM4 ParStmt+addTickStmt isGuard (ParStmt x pairs mzipExpr bindExpr) = do+    liftM3 (ParStmt x)         (mapM (addTickStmtAndBinders isGuard) pairs)         (unLoc <$> addTickLHsExpr (L hpcSrcSpan mzipExpr))         (addTickSyntaxExpr hpcSrcSpan bindExpr)-        (return ty)-addTickStmt isGuard (ApplicativeStmt args mb_join body_ty) = do+addTickStmt isGuard (ApplicativeStmt body_ty args mb_join) = do     args' <- mapM (addTickApplicativeArg isGuard) args-    return (ApplicativeStmt args' mb_join body_ty)+    return (ApplicativeStmt body_ty args' mb_join)  addTickStmt isGuard stmt@(TransStmt { trS_stmts = stmts                                     , trS_by = by, trS_using = using@@ -750,66 +746,75 @@        ; return (stmt { recS_stmts = stmts', recS_ret_fn = ret'                       , recS_mfix_fn = mfix', recS_bind_fn = bind' }) } +addTickStmt _ (XStmtLR _) = panic "addTickStmt"+ addTick :: Maybe (Bool -> BoxLabel) -> LHsExpr GhcTc -> TM (LHsExpr GhcTc) addTick isGuard e | Just fn <- isGuard = addBinTickLHsExpr fn e                   | otherwise          = addTickLHsExprRHS e  addTickApplicativeArg-  :: Maybe (Bool -> BoxLabel) -> (SyntaxExpr GhcTc, ApplicativeArg GhcTc GhcTc)-  -> TM (SyntaxExpr GhcTc, ApplicativeArg GhcTc GhcTc)+  :: Maybe (Bool -> BoxLabel) -> (SyntaxExpr GhcTc, ApplicativeArg GhcTc)+  -> TM (SyntaxExpr GhcTc, ApplicativeArg GhcTc) addTickApplicativeArg isGuard (op, arg) =   liftM2 (,) (addTickSyntaxExpr hpcSrcSpan op) (addTickArg arg)  where-  addTickArg (ApplicativeArgOne pat expr isBody) =-    ApplicativeArgOne+  addTickArg (ApplicativeArgOne x pat expr isBody) =+    (ApplicativeArgOne x)       <$> addTickLPat pat       <*> addTickLHsExpr expr       <*> pure isBody-  addTickArg (ApplicativeArgMany stmts ret pat) =-    ApplicativeArgMany+  addTickArg (ApplicativeArgMany x stmts ret pat) =+    (ApplicativeArgMany x)       <$> addTickLStmts isGuard stmts       <*> (unLoc <$> addTickLHsExpr (L hpcSrcSpan ret))       <*> addTickLPat pat+  addTickArg (XApplicativeArg _) = panic "addTickApplicativeArg"  addTickStmtAndBinders :: Maybe (Bool -> BoxLabel) -> ParStmtBlock GhcTc GhcTc                       -> TM (ParStmtBlock GhcTc GhcTc)-addTickStmtAndBinders isGuard (ParStmtBlock stmts ids returnExpr) =-    liftM3 ParStmtBlock+addTickStmtAndBinders isGuard (ParStmtBlock x stmts ids returnExpr) =+    liftM3 (ParStmtBlock x)         (addTickLStmts isGuard stmts)         (return ids)         (addTickSyntaxExpr hpcSrcSpan returnExpr)+addTickStmtAndBinders _ (XParStmtBlock{}) = panic "addTickStmtAndBinders"  addTickHsLocalBinds :: HsLocalBinds GhcTc -> TM (HsLocalBinds GhcTc)-addTickHsLocalBinds (HsValBinds binds) =-        liftM HsValBinds+addTickHsLocalBinds (HsValBinds x binds) =+        liftM (HsValBinds x)                 (addTickHsValBinds binds)-addTickHsLocalBinds (HsIPBinds binds)  =-        liftM HsIPBinds+addTickHsLocalBinds (HsIPBinds x binds)  =+        liftM (HsIPBinds x)                 (addTickHsIPBinds binds)-addTickHsLocalBinds (EmptyLocalBinds)  = return EmptyLocalBinds+addTickHsLocalBinds (EmptyLocalBinds x)  = return (EmptyLocalBinds x)+addTickHsLocalBinds (XHsLocalBindsLR x)  = return (XHsLocalBindsLR x) -addTickHsValBinds :: HsValBindsLR GhcTc a -> TM (HsValBindsLR GhcTc b)-addTickHsValBinds (ValBindsOut binds sigs) =-        liftM2 ValBindsOut+addTickHsValBinds :: HsValBindsLR GhcTc (GhcPass a)+                  -> TM (HsValBindsLR GhcTc (GhcPass b))+addTickHsValBinds (XValBindsLR (NValBinds binds sigs)) = do+        b <- liftM2 NValBinds                 (mapM (\ (rec,binds') ->                                 liftM2 (,)                                         (return rec)                                         (addTickLHsBinds binds'))                         binds)                 (return sigs)+        return $ XValBindsLR b addTickHsValBinds _ = panic "addTickHsValBinds"  addTickHsIPBinds :: HsIPBinds GhcTc -> TM (HsIPBinds GhcTc)-addTickHsIPBinds (IPBinds ipbinds dictbinds) =+addTickHsIPBinds (IPBinds dictbinds ipbinds) =         liftM2 IPBinds-                (mapM (liftL (addTickIPBind)) ipbinds)                 (return dictbinds)+                (mapM (liftL (addTickIPBind)) ipbinds)+addTickHsIPBinds (XHsIPBinds x) = return (XHsIPBinds x)  addTickIPBind :: IPBind GhcTc -> TM (IPBind GhcTc)-addTickIPBind (IPBind nm e) =-        liftM2 IPBind+addTickIPBind (IPBind x nm e) =+        liftM2 (IPBind x)                 (return nm)                 (addTickLHsExpr e)+addTickIPBind (XIPBind x) = return (XIPBind x)  -- There is no location here, so we might need to use a context location?? addTickSyntaxExpr :: SrcSpan -> SyntaxExpr GhcTc -> TM (SyntaxExpr GhcTc)@@ -821,12 +826,11 @@ addTickLPat pat = return pat  addTickHsCmdTop :: HsCmdTop GhcTc -> TM (HsCmdTop GhcTc)-addTickHsCmdTop (HsCmdTop cmd tys ty syntaxtable) =-        liftM4 HsCmdTop+addTickHsCmdTop (HsCmdTop x cmd) =+        liftM2 HsCmdTop+                (return x)                 (addTickLHsCmd cmd)-                (return tys)-                (return ty)-                (return syntaxtable)+addTickHsCmdTop (XCmdTop{}) = panic "addTickHsCmdTop"  addTickLHsCmd ::  LHsCmd GhcTc -> TM (LHsCmd GhcTc) addTickLHsCmd (L pos c0) = do@@ -834,10 +838,10 @@         return $ L pos c1  addTickHsCmd :: HsCmd GhcTc -> TM (HsCmd GhcTc)-addTickHsCmd (HsCmdLam matchgroup) =-        liftM HsCmdLam (addTickCmdMatchGroup matchgroup)-addTickHsCmd (HsCmdApp c e) =-        liftM2 HsCmdApp (addTickLHsCmd c) (addTickLHsExpr e)+addTickHsCmd (HsCmdLam x matchgroup) =+        liftM (HsCmdLam x) (addTickCmdMatchGroup matchgroup)+addTickHsCmd (HsCmdApp x c e) =+        liftM2 (HsCmdApp x) (addTickLHsCmd c) (addTickLHsExpr e) {- addTickHsCmd (OpApp e1 c2 fix c3) =         liftM4 OpApp@@ -846,42 +850,44 @@                 (return fix)                 (addTickLHsCmd c3) -}-addTickHsCmd (HsCmdPar e) = liftM HsCmdPar (addTickLHsCmd e)-addTickHsCmd (HsCmdCase e mgs) =-        liftM2 HsCmdCase+addTickHsCmd (HsCmdPar x e) = liftM (HsCmdPar x) (addTickLHsCmd e)+addTickHsCmd (HsCmdCase x e mgs) =+        liftM2 (HsCmdCase x)                 (addTickLHsExpr e)                 (addTickCmdMatchGroup mgs)-addTickHsCmd (HsCmdIf cnd e1 c2 c3) =-        liftM3 (HsCmdIf cnd)+addTickHsCmd (HsCmdIf x cnd e1 c2 c3) =+        liftM3 (HsCmdIf x cnd)                 (addBinTickLHsExpr (BinBox CondBinBox) e1)                 (addTickLHsCmd c2)                 (addTickLHsCmd c3)-addTickHsCmd (HsCmdLet (L l binds) c) =+addTickHsCmd (HsCmdLet x (L l binds) c) =         bindLocals (collectLocalBinders binds) $-          liftM2 (HsCmdLet . L l)+          liftM2 (HsCmdLet x . L l)                    (addTickHsLocalBinds binds) -- to think about: !patterns.                    (addTickLHsCmd c)-addTickHsCmd (HsCmdDo (L l stmts) srcloc)+addTickHsCmd (HsCmdDo srcloc (L l stmts))   = do { (stmts', _) <- addTickLCmdStmts' stmts (return ())-       ; return (HsCmdDo (L l stmts') srcloc) }+       ; return (HsCmdDo srcloc (L l stmts')) } -addTickHsCmd (HsCmdArrApp   e1 e2 ty1 arr_ty lr) =+addTickHsCmd (HsCmdArrApp  arr_ty e1 e2 ty1 lr) =         liftM5 HsCmdArrApp+               (return arr_ty)                (addTickLHsExpr e1)                (addTickLHsExpr e2)                (return ty1)-               (return arr_ty)                (return lr)-addTickHsCmd (HsCmdArrForm e f fix cmdtop) =-        liftM4 HsCmdArrForm+addTickHsCmd (HsCmdArrForm x e f fix cmdtop) =+        liftM4 (HsCmdArrForm x)                (addTickLHsExpr e)                (return f)                (return fix)                (mapM (liftL (addTickHsCmdTop)) cmdtop) -addTickHsCmd (HsCmdWrap w cmd)-  = liftM2 HsCmdWrap (return w) (addTickHsCmd cmd)+addTickHsCmd (HsCmdWrap x w cmd)+  = liftM2 (HsCmdWrap x) (return w) (addTickHsCmd cmd) +addTickHsCmd e@(XCmd {})  = pprPanic "addTickHsCmd" (ppr e)+ -- Others should never happen in a command context. --addTickHsCmd e  = pprPanic "addTickHsCmd" (ppr e) @@ -890,29 +896,33 @@ addTickCmdMatchGroup mg@(MG { mg_alts = L l matches }) = do   matches' <- mapM (liftL addTickCmdMatch) matches   return $ mg { mg_alts = L l matches' }+addTickCmdMatchGroup (XMatchGroup _) = panic "addTickCmdMatchGroup"  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"  addTickCmdGRHSs :: GRHSs GhcTc (LHsCmd GhcTc) -> TM (GRHSs GhcTc (LHsCmd GhcTc))-addTickCmdGRHSs (GRHSs guarded (L l local_binds)) = do+addTickCmdGRHSs (GRHSs x guarded (L l local_binds)) = do   bindLocals binders $ do     local_binds' <- addTickHsLocalBinds local_binds     guarded' <- mapM (liftL addTickCmdGRHS) guarded-    return $ GRHSs guarded' (L l local_binds')+    return $ GRHSs x guarded' (L l local_binds')   where     binders = collectLocalBinders local_binds+addTickCmdGRHSs (XGRHSs _) = panic "addTickCmdGRHSs"  addTickCmdGRHS :: GRHS GhcTc (LHsCmd GhcTc) -> TM (GRHS GhcTc (LHsCmd GhcTc)) -- The *guards* are *not* Cmds, although the body is -- C.f. addTickGRHS for the BinBox stuff-addTickCmdGRHS (GRHS stmts cmd)+addTickCmdGRHS (GRHS x stmts cmd)   = do { (stmts',expr') <- addTickLStmts' (Just $ BinBox $ GuardBinBox)                                    stmts (addTickLHsCmd cmd)-       ; return $ GRHS stmts' expr' }+       ; return $ GRHS x stmts' expr' }+addTickCmdGRHS (XGRHS _) = panic "addTickCmdGRHS"  addTickLCmdStmts :: [LStmt GhcTc (LHsCmd GhcTc)]                  -> TM [LStmt GhcTc (LHsCmd GhcTc)]@@ -931,26 +941,24 @@         binders = collectLStmtsBinders lstmts  addTickCmdStmt :: Stmt GhcTc (LHsCmd GhcTc) -> TM (Stmt GhcTc (LHsCmd GhcTc))-addTickCmdStmt (BindStmt pat c bind fail ty) = do-        liftM5 BindStmt+addTickCmdStmt (BindStmt x pat c bind fail) = do+        liftM4 (BindStmt x)                 (addTickLPat pat)                 (addTickLHsCmd c)                 (return bind)                 (return fail)-                (return ty)-addTickCmdStmt (LastStmt c noret ret) = do-        liftM3 LastStmt+addTickCmdStmt (LastStmt x c noret ret) = do+        liftM3 (LastStmt x)                 (addTickLHsCmd c)                 (pure noret)                 (addTickSyntaxExpr hpcSrcSpan ret)-addTickCmdStmt (BodyStmt c bind' guard' ty) = do-        liftM4 BodyStmt+addTickCmdStmt (BodyStmt x c bind' guard') = do+        liftM3 (BodyStmt x)                 (addTickLHsCmd c)                 (addTickSyntaxExpr hpcSrcSpan bind')                 (addTickSyntaxExpr hpcSrcSpan guard')-                (return ty)-addTickCmdStmt (LetStmt (L l binds)) = do-        liftM (LetStmt . L l)+addTickCmdStmt (LetStmt x (L l binds)) = do+        liftM (LetStmt x . L l)                 (addTickHsLocalBinds binds) addTickCmdStmt stmt@(RecStmt {})   = do { stmts' <- addTickLCmdStmts (recS_stmts stmt)@@ -961,6 +969,8 @@                       , recS_mfix_fn = mfix', recS_bind_fn = bind' }) } addTickCmdStmt ApplicativeStmt{} =   panic "ToDo: addTickCmdStmt ApplicativeLastStmt"+addTickCmdStmt XStmtLR{} =+  panic "addTickCmdStmt XStmtLR"  -- Others should never happen in a command context. addTickCmdStmt stmt  = pprPanic "addTickHsCmd" (ppr stmt)@@ -1002,7 +1012,7 @@  data TickTransState = TT { tickBoxCount:: Int                          , mixEntries  :: [MixEntry_]-                         , uniqSupply  :: UniqSupply+                         , ccIndices   :: CostCentreState                          }  data TickTransEnv = TTE { fileName     :: FastString@@ -1077,10 +1087,11 @@ instance HasDynFlags TM where   getDynFlags = TM $ \ env st -> (tte_dflags env, noFVs, st) -instance MonadUnique TM where-  getUniqueSupplyM = TM $ \_ st -> (uniqSupply st, noFVs, st)-  getUniqueM = TM $ \_ st -> let (u, us') = takeUniqFromSupply (uniqSupply st)-                             in (u, noFVs, st { uniqSupply = us' })+-- | Get the next HPC cost centre index for a given centre name+getCCIndexM :: FastString -> TM CostCentreIndex+getCCIndexM n = TM $ \_ st -> let (idx, is') = getCCIndex n $+                                                 ccIndices st+                              in (idx, noFVs, st { ccIndices = is' })  getState :: TM TickTransState getState = TM $ \ _ st -> (st, noFVs, st)@@ -1160,7 +1171,7 @@     (fvs, e) <- getFreeVars m     env <- getEnv     tickish <- mkTickish boxLabel countEntries topOnly pos fvs (declPath env)-    return (L pos (HsTick tickish (L pos e)))+    return (L pos (HsTick noExt tickish (L pos e)))   ) (do     e <- m     return (L pos e)@@ -1208,8 +1219,9 @@       return $ HpcTick (this_mod env) c      ProfNotes -> do-      ccUnique <- getUniqueM-      let cc = mkUserCC (mkFastString cc_name) (this_mod env) pos ccUnique+      let nm = mkFastString cc_name+      flavour <- HpcCC <$> getCCIndexM nm+      let cc = mkUserCC nm (this_mod env) pos flavour           count = countEntries && gopt Opt_ProfCountEntries dflags       return $ ProfNote cc count True{-scopes-} @@ -1246,13 +1258,14 @@       c = tickBoxCount st       mes = mixEntries st   in-             ( L pos $ HsTick (HpcTick (this_mod env) c) $ L pos $ HsBinTick (c+1) (c+2) e-           -- notice that F and T are reversed,-           -- because we are building the list in-           -- reverse...-             , noFVs-             , st {tickBoxCount=c+3 , mixEntries=meF:meT:meE:mes}-             )+     ( L pos $ HsTick noExt (HpcTick (this_mod env) c)+          $ L pos $ HsBinTick noExt (c+1) (c+2) e+   -- notice that F and T are reversed,+   -- because we are building the list in+   -- reverse...+     , noFVs+     , st {tickBoxCount=c+3 , mixEntries=meF:meT:meE:mes}+     )  mkHpcPos :: SrcSpan -> HpcPos mkHpcPos pos@(RealSrcSpan s)@@ -1273,7 +1286,10 @@ matchesOneOfMany :: [LMatch GhcTc body] -> Bool matchesOneOfMany lmatches = sum (map matchCount lmatches) > 1   where-        matchCount (L _ (Match { m_grhss = GRHSs grhss _binds })) = length grhss+        matchCount (L _ (Match { m_grhss = GRHSs _ grhss _ })) = length grhss+        matchCount (L _ (Match { m_grhss = XGRHSs _ }))+          = panic "matchesOneOfMany"+        matchCount (L _ (XMatch _)) = panic "matchesOneOfMany"  type MixEntry_ = (SrcSpan, [String], [OccName], BoxLabel) 
deSugar/Desugar.hs view
@@ -28,8 +28,6 @@ import Id import Name import Type-import InstEnv-import Class import Avail import CoreSyn import CoreFVs     ( exprsSomeFreeVarsList )@@ -62,10 +60,12 @@ import Util import MonadUtils import OrdList+import ExtractDocs  import Data.List import Data.IORef import Control.Monad( when )+import Plugins ( LoadedPlugin(..) )  {- ************************************************************************@@ -103,7 +103,6 @@                             tcg_th_foreign_files = th_foreign_files_var,                             tcg_fords        = fords,                             tcg_rules        = rules,-                            tcg_vects        = vects,                             tcg_patsyns      = patsyns,                             tcg_tcs          = tcs,                             tcg_insts        = insts,@@ -133,18 +132,17 @@                           ; (spec_prs, spec_rules) <- dsImpSpecs imp_specs                           ; (ds_fords, foreign_prs) <- dsForeigns fords                           ; ds_rules <- mapMaybeM dsRule rules-                          ; ds_vects <- mapM dsVect vects                           ; let hpc_init                                   | gopt Opt_Hpc dflags = hpcInitCode mod ds_hpc_info                                   | otherwise = empty                           ; return ( ds_ev_binds                                    , foreign_prs `appOL` core_prs `appOL` spec_prs-                                   , spec_rules ++ ds_rules, ds_vects+                                   , spec_rules ++ ds_rules                                    , ds_fords `appendStubC` hpc_init) }          ; case mb_res of {            Nothing -> return (msgs, Nothing) ;-           Just (ds_ev_binds, all_prs, all_rules, vects0, ds_fords) ->+           Just (ds_ev_binds, all_prs, all_rules, ds_fords) ->       do {       -- Add export flags to bindings           keep_alive <- readIORef keep_var@@ -160,24 +158,25 @@         -- You might think it doesn't matter, but the simplifier brings all top-level         -- things into the in-scope set before simplifying; so we get no unfolding for F#! -#if defined(DEBUG)-          -- Debug only as pre-simple-optimisation program may be really big         ; endPassIO hsc_env print_unqual CoreDesugar final_pgm rules_for_imps-#endif-        ; (ds_binds, ds_rules_for_imps, ds_vects)-            <- simpleOptPgm dflags mod final_pgm rules_for_imps vects0+        ; (ds_binds, ds_rules_for_imps)+            <- simpleOptPgm dflags mod final_pgm rules_for_imps                          -- The simpleOptPgm gets rid of type                          -- bindings plus any stupid dead code          ; endPassIO hsc_env print_unqual CoreDesugarOpt ds_binds ds_rules_for_imps          ; let used_names = mkUsedNames tcg_env-        ; deps <- mkDependencies tcg_env+              pluginModules =+                map lpModule (plugins (hsc_dflags hsc_env))+        ; deps <- mkDependencies (thisInstalledUnitId (hsc_dflags hsc_env))+                                 (map mi_module pluginModules) tcg_env          ; used_th <- readIORef tc_splice_used         ; dep_files <- readIORef dependent_files         ; safe_mode <- finalSafeMode dflags tcg_env-        ; usages <- mkUsageInfo hsc_env mod (imp_mods imports) used_names dep_files merged+        ; usages <- mkUsageInfo hsc_env mod (imp_mods imports) used_names+                      dep_files merged pluginModules         -- id_mod /= mod when we are processing an hsig, but hsigs         -- never desugared and compiled (there's no code!)         -- Consequently, this should hold for any ModGuts that make@@ -186,6 +185,8 @@          ; foreign_files <- readIORef th_foreign_files_var +        ; let (doc_hdr, decl_docs, arg_docs) = extractDocs tcg_env+         ; let mod_guts = ModGuts {                 mg_module       = mod,                 mg_hsc_src      = hsc_src,@@ -210,11 +211,12 @@                 mg_foreign_files = foreign_files,                 mg_hpc_info     = ds_hpc_info,                 mg_modBreaks    = modBreaks,-                mg_vect_decls   = ds_vects,-                mg_vect_info    = noVectInfo,                 mg_safe_haskell = safe_mode,                 mg_trust_pkg    = imp_trust_own_pkg imports,-                mg_complete_sigs = complete_matches+                mg_complete_sigs = complete_matches,+                mg_doc_hdr      = doc_hdr,+                mg_decl_docs    = decl_docs,+                mg_arg_docs     = arg_docs               }         ; return (msgs, Just mod_guts)         }}}}@@ -247,7 +249,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ Top-level evidence bindings may be mutually recursive with the top-level value bindings, so we must put those in a Rec.  But we can't put them *all* in a Rec-because the occurrence analyser doesn't teke account of type/coercion variables+because the occurrence analyser doesn't take account of type/coercion variables when computing dependencies.  So we pull out the type/coercion variables (which are in dependency order),@@ -377,9 +379,9 @@ -}  dsRule :: LRuleDecl GhcTc -> DsM (Maybe CoreRule)-dsRule (L loc (HsRule name rule_act vars lhs _tv_lhs rhs _fv_rhs))+dsRule (L loc (HsRule _ name rule_act vars lhs rhs))   = putSrcSpanDs loc $-    do  { let bndrs' = [var | L _ (RuleBndr (L _ var)) <- vars]+    do  { let bndrs' = [var | L _ (RuleBndr _ (L _ var)) <- vars]          ; lhs' <- unsetGOptM Opt_EnableRewriteRules $                   unsetWOptM Opt_WarnIdentities $@@ -392,7 +394,8 @@          -- Substitute the dict bindings eagerly,         -- and take the body apart into a (f args) form-        ; case decomposeRuleLhs bndrs'' lhs'' of {+        ; dflags <- getDynFlags+        ; case decomposeRuleLhs dflags bndrs'' lhs'' of {                 Left msg -> do { warnDs NoReason msg; return Nothing } ;                 Right (final_bndrs, fn_id, args) -> do @@ -401,13 +404,12 @@                 -- we don't want to attach rules to the bindings of implicit Ids,                 -- because they don't show up in the bindings until just before code gen               fn_name   = idName fn_id-              final_rhs = simpleOptExpr rhs''    -- De-crap it+              final_rhs = simpleOptExpr dflags rhs''    -- De-crap it               rule_name = snd (unLoc name)               final_bndrs_set = mkVarSet final_bndrs               arg_ids = filterOut (`elemVarSet` final_bndrs_set) $                         exprsSomeFreeVarsList isId args -        ; dflags <- getDynFlags         ; rule <- dsMkUserRule this_mod is_local                          rule_name rule_act fn_name final_bndrs args                          final_rhs@@ -416,6 +418,7 @@          ; return (Just rule)         } } }+dsRule (L _ (XRuleDecl _)) = panic "dsRule"   warnRuleShadowing :: RuleName -> Activation -> Id -> [Id] -> DsM ()@@ -544,38 +547,6 @@  and similar, which will elicit exactly these warnings, and risk never firing.  But it's not clear what to do instead.  We could make the-class methocd rules inactive in phase 2, but that would delay when+class method rules inactive in phase 2, but that would delay when subsequent transformations could fire.---************************************************************************-*                                                                      *-*              Desugaring vectorisation declarations-*                                                                      *-************************************************************************ -}--dsVect :: LVectDecl GhcTc -> DsM CoreVect-dsVect (L loc (HsVect _ (L _ v) rhs))-  = putSrcSpanDs loc $-    do { rhs' <- dsLExpr rhs-       ; return $ Vect v rhs'-       }-dsVect (L _loc (HsNoVect _ (L _ v)))-  = return $ NoVect v-dsVect (L _loc (HsVectTypeOut isScalar tycon rhs_tycon))-  = return $ VectType isScalar tycon' rhs_tycon-  where-    tycon' | Just ty <- coreView $ mkTyConTy tycon-           , (tycon', []) <- splitTyConApp ty      = tycon'-           | otherwise                             = tycon-dsVect vd@(L _ (HsVectTypeIn _ _ _ _))-  = pprPanic "Desugar.dsVect: unexpected 'HsVectTypeIn'" (ppr vd)-dsVect (L _loc (HsVectClassOut cls))-  = return $ VectClass (classTyCon cls)-dsVect vc@(L _ (HsVectClassIn _ _))-  = pprPanic "Desugar.dsVect: unexpected 'HsVectClassIn'" (ppr vc)-dsVect (L _loc (HsVectInstOut inst))-  = return $ VectInst (instanceDFunId inst)-dsVect vi@(L _ (HsVectInstIn _))-  = pprPanic "Desugar.dsVect: unexpected 'HsVectInstIn'" (ppr vi)
deSugar/DsArrows.hs view
@@ -313,7 +313,7 @@         :: LPat GhcTc         -> LHsCmdTop GhcTc         -> DsM CoreExpr-dsProcExpr pat (L _ (HsCmdTop cmd _unitTy cmd_ty ids)) = do+dsProcExpr pat (L _ (HsCmdTop (CmdTopTc _unitTy cmd_ty ids) cmd)) = do     (meth_binds, meth_ids) <- mkCmdEnv ids     let locals = mkVarSet (collectPatBinders pat)     (core_cmd, _free_vars, env_ids) <- dsfixCmd meth_ids locals unitTy cmd_ty cmd@@ -328,6 +328,7 @@                     (Lam var match_code)                     core_cmd     return (mkLets meth_binds proc_code)+dsProcExpr _ (L _ XCmdTop{}) = panic "dsProcExpr"  {- Translation of a command judgement of the form@@ -363,7 +364,7 @@ --              ---> premap (\ ((xs), _stk) -> arg) fun  dsCmd ids local_vars stack_ty res_ty-        (HsCmdArrApp arrow arg arrow_ty HsFirstOrderApp _)+        (HsCmdArrApp arrow_ty arrow arg HsFirstOrderApp _)         env_ids = do     let         (a_arg_ty, _res_ty') = tcSplitAppTy arrow_ty@@ -388,7 +389,7 @@ --              ---> premap (\ ((xs), _stk) -> (fun, arg)) app  dsCmd ids local_vars stack_ty res_ty-        (HsCmdArrApp arrow arg arrow_ty HsHigherOrderApp _)+        (HsCmdArrApp arrow_ty arrow arg HsHigherOrderApp _)         env_ids = do     let         (a_arg_ty, _res_ty') = tcSplitAppTy arrow_ty@@ -416,7 +417,7 @@ -- --              ---> premap (\ ((xs),stk) -> ((ys),(e,stk))) cmd -dsCmd ids local_vars stack_ty res_ty (HsCmdApp cmd arg) env_ids = do+dsCmd ids local_vars stack_ty res_ty (HsCmdApp _ cmd arg) env_ids = do     core_arg <- dsLExpr arg     let         arg_ty = exprType core_arg@@ -449,8 +450,9 @@ --              ---> premap (\ ((xs), (p1, ... (pk,stk)...)) -> ((ys),stk)) cmd  dsCmd ids local_vars stack_ty res_ty-        (HsCmdLam (MG { mg_alts = L _ [L _ (Match { m_pats  = pats-                                                  , m_grhss = GRHSs [L _ (GRHS [] body)] _ })] }))+        (HsCmdLam _ (MG { mg_alts+          = L _ [L _ (Match { m_pats  = pats+                            , m_grhss = GRHSs _ [L _ (GRHS _ [] body)] _ })] }))         env_ids = do     let pat_vars = mkVarSet (collectPatsBinders pats)     let@@ -479,7 +481,7 @@     return (do_premap ids in_ty in_ty' res_ty select_code core_body,             free_vars `udfmMinusUFM` getUniqSet pat_vars) -dsCmd ids local_vars stack_ty res_ty (HsCmdPar cmd) env_ids+dsCmd ids local_vars stack_ty res_ty (HsCmdPar _ cmd) env_ids   = dsLCmd ids local_vars stack_ty res_ty cmd env_ids  -- D, xs |- e :: Bool@@ -492,7 +494,7 @@ --                       if e then Left ((xs1),stk) else Right ((xs2),stk)) --                     (c1 ||| c2) -dsCmd ids local_vars stack_ty res_ty (HsCmdIf mb_fun cond then_cmd else_cmd)+dsCmd ids local_vars stack_ty res_ty (HsCmdIf _ mb_fun cond then_cmd else_cmd)         env_ids = do     core_cond <- dsLExpr cond     (core_then, fvs_then, then_ids) <- dsfixCmd ids local_vars stack_ty res_ty then_cmd@@ -553,8 +555,9 @@ -}  dsCmd ids local_vars stack_ty res_ty-      (HsCmdCase exp (MG { mg_alts = L l matches, mg_arg_tys = arg_tys-                         , mg_origin = origin }))+      (HsCmdCase _ exp (MG { mg_alts = L l matches+                           , mg_ext = MatchGroupTc arg_tys _+                           , mg_origin = origin }))       env_ids = do     stack_id <- newSysLocalDs stack_ty @@ -575,10 +578,12 @@     left_con <- dsLookupDataCon leftDataConName     right_con <- dsLookupDataCon rightDataConName     let-        left_id  = HsConLikeOut (RealDataCon left_con)-        right_id = HsConLikeOut (RealDataCon right_con)-        left_expr  ty1 ty2 e = noLoc $ HsApp (noLoc $ mkHsWrap (mkWpTyApps [ty1, ty2]) left_id ) e-        right_expr ty1 ty2 e = noLoc $ HsApp (noLoc $ mkHsWrap (mkWpTyApps [ty1, ty2]) right_id) e+        left_id  = HsConLikeOut noExt (RealDataCon left_con)+        right_id = HsConLikeOut noExt (RealDataCon right_con)+        left_expr  ty1 ty2 e = noLoc $ HsApp noExt+                           (noLoc $ mkHsWrap (mkWpTyApps [ty1, ty2]) left_id ) e+        right_expr ty1 ty2 e = noLoc $ HsApp noExt+                           (noLoc $ mkHsWrap (mkWpTyApps [ty1, ty2]) right_id) e          -- Prefix each tuple with a distinct series of Left's and Right's,         -- in a balanced way, keeping track of the types.@@ -597,9 +602,10 @@         (_, matches') = mapAccumL (replaceLeavesMatch res_ty) leaves' matches         in_ty = envStackType env_ids stack_ty -    core_body <- dsExpr (HsCase exp (MG { mg_alts = L l matches'-                                        , mg_arg_tys = arg_tys-                                        , mg_res_ty = sum_ty, mg_origin = origin }))+    core_body <- dsExpr (HsCase noExt exp+                         (MG { mg_alts = L l matches'+                             , mg_ext = MatchGroupTc arg_tys sum_ty+                             , mg_origin = origin }))         -- Note that we replace the HsCase result type by sum_ty,         -- which is the type of matches' @@ -613,7 +619,8 @@ -- --              ---> premap (\ ((xs),stk) -> let binds in ((ys),stk)) c -dsCmd ids local_vars stack_ty res_ty (HsCmdLet lbinds@(L _ binds) body) env_ids = do+dsCmd ids local_vars stack_ty res_ty (HsCmdLet _ lbinds@(L _ binds) body)+                                                                    env_ids = do     let         defined_vars = mkVarSet (collectLocalBinders binds)         local_vars' = defined_vars `unionVarSet` local_vars@@ -638,7 +645,8 @@ -- --              ---> premap (\ (env,stk) -> env) c -dsCmd ids local_vars stack_ty res_ty do_block@(HsCmdDo (L loc stmts) stmts_ty) env_ids = do+dsCmd ids local_vars stack_ty res_ty do_block@(HsCmdDo stmts_ty (L loc stmts))+                                                                   env_ids = do     putSrcSpanDs loc $       dsNoLevPoly stmts_ty         (text "In the do-command:" <+> ppr do_block)@@ -658,14 +666,14 @@ -- ----------------------------------- -- D; xs |-a (|e c1 ... cn|) :: stk --> t       ---> e [t_xs] c1 ... cn -dsCmd _ids local_vars _stack_ty _res_ty (HsCmdArrForm op _ _ args) env_ids = do+dsCmd _ local_vars _stack_ty _res_ty (HsCmdArrForm _ op _ _ args) env_ids = do     let env_ty = mkBigCoreVarTupTy env_ids     core_op <- dsLExpr op     (core_args, fv_sets) <- mapAndUnzipM (dsTrimCmdArg local_vars env_ids) args     return (mkApps (App core_op (Type env_ty)) core_args,             unionDVarSets fv_sets) -dsCmd ids local_vars stack_ty res_ty (HsCmdWrap wrap cmd) env_ids = do+dsCmd ids local_vars stack_ty res_ty (HsCmdWrap _ wrap cmd) env_ids = do     (core_cmd, env_ids') <- dsCmd ids local_vars stack_ty res_ty cmd env_ids     core_wrap <- dsHsWrapper wrap     return (core_wrap core_cmd, env_ids')@@ -682,7 +690,8 @@         -> LHsCmdTop GhcTc       -- command argument to desugar         -> DsM (CoreExpr,       -- desugared expression                 DIdSet)         -- subset of local vars that occur free-dsTrimCmdArg local_vars env_ids (L _ (HsCmdTop cmd stack_ty cmd_ty ids)) = do+dsTrimCmdArg local_vars env_ids+                       (L _ (HsCmdTop (CmdTopTc stack_ty cmd_ty ids) cmd )) = do     (meth_binds, meth_ids) <- mkCmdEnv ids     (core_cmd, free_vars, env_ids') <- dsfixCmd meth_ids local_vars stack_ty cmd_ty cmd     stack_id <- newSysLocalDs stack_ty@@ -693,6 +702,7 @@         arg_code = if env_ids' == env_ids then core_cmd else                 do_premap meth_ids in_ty in_ty' cmd_ty trim_code core_cmd     return (mkLets meth_binds arg_code, free_vars)+dsTrimCmdArg _ _ (L _ XCmdTop{}) = panic "dsTrimCmdArg"  -- Given D; xs |-a c : stk --> t, builds c with xs fed back. -- Typically needs to be prefixed with arr (\(p, stk) -> ((xs),stk))@@ -750,7 +760,7 @@ -- --              ---> premap (\ (xs) -> ((xs), ())) c -dsCmdDo ids local_vars res_ty [L loc (LastStmt body _ _)] env_ids = do+dsCmdDo ids local_vars res_ty [L loc (LastStmt _ body _ _)] env_ids = do     putSrcSpanDs loc $ dsNoLevPoly res_ty                          (text "In the command:" <+> ppr body)     (core_body, env_ids') <- dsLCmd ids local_vars unitTy res_ty body env_ids@@ -808,7 +818,7 @@ --              ---> premap (\ ((xs)) -> (((xs1),()),(xs'))) --                      (first c >>> arr snd) >>> ss -dsCmdStmt ids local_vars out_ids (BodyStmt cmd _ _ c_ty) env_ids = do+dsCmdStmt ids local_vars out_ids (BodyStmt c_ty cmd _ _) env_ids = do     (core_cmd, fv_cmd, env_ids1) <- dsfixCmd ids local_vars unitTy c_ty cmd     core_mux <- matchEnv env_ids         (mkCorePairExpr@@ -839,7 +849,7 @@ -- It would be simpler and more consistent to do this using second, -- but that's likely to be defined in terms of first. -dsCmdStmt ids local_vars out_ids (BindStmt pat cmd _ _ _) env_ids = do+dsCmdStmt ids local_vars out_ids (BindStmt _ pat cmd _ _) env_ids = do     let pat_ty = hsLPatType pat     (core_cmd, fv_cmd, env_ids1) <- dsfixCmd ids local_vars unitTy pat_ty cmd     let pat_vars = mkVarSet (collectPatBinders pat)@@ -890,7 +900,7 @@ -- --              ---> arr (\ (xs) -> let binds in (xs')) >>> ss -dsCmdStmt ids local_vars out_ids (LetStmt binds) env_ids = do+dsCmdStmt ids local_vars out_ids (LetStmt _ binds) env_ids = do     -- build a new environment using the let bindings     core_binds <- dsLocalBinds binds (mkBigCoreVarTup out_ids)     -- match the old environment against the input@@ -918,7 +928,8 @@ dsCmdStmt ids local_vars out_ids         (RecStmt { recS_stmts = stmts                  , recS_later_ids = later_ids, recS_rec_ids = rec_ids-                 , recS_later_rets = later_rets, recS_rec_rets = rec_rets })+                 , recS_ext = RecStmtTc { recS_later_rets = later_rets+                                        , recS_rec_rets = rec_rets } })         env_ids = do     let         later_ids_set = mkVarSet later_ids@@ -1108,7 +1119,7 @@  leavesMatch :: LMatch GhcTc (Located (body GhcTc))             -> [(Located (body GhcTc), IdSet)]-leavesMatch (L _ (Match { m_pats = pats, m_grhss = GRHSs grhss (L _ binds) }))+leavesMatch (L _ (Match { m_pats = pats, m_grhss = GRHSs _ grhss (L _ binds) }))   = let         defined_vars = mkVarSet (collectPatsBinders pats)                         `unionVarSet`@@ -1117,7 +1128,9 @@     [(body,       mkVarSet (collectLStmtsBinders stmts)         `unionVarSet` defined_vars)-    | L _ (GRHS stmts body) <- grhss]+    | L _ (GRHS _ stmts body) <- grhss]+leavesMatch (L _ (Match _ _ _ (XGRHSs _))) = panic "leavesMatch"+leavesMatch (L _ (XMatch _)) = panic "leavesMatch"  -- Replace the leaf commands in a match @@ -1127,19 +1140,24 @@         -> LMatch GhcTc (Located (body GhcTc))  -- the matches of a case command         -> ([Located (body' GhcTc)],            -- remaining leaf expressions             LMatch GhcTc (Located (body' GhcTc))) -- updated match-replaceLeavesMatch _res_ty leaves (L loc match@(Match { m_grhss = GRHSs grhss binds }))+replaceLeavesMatch _res_ty leaves+                        (L loc match@(Match { m_grhss = GRHSs x grhss binds }))   = let         (leaves', grhss') = mapAccumL replaceLeavesGRHS leaves grhss     in-    (leaves', L loc (match { m_grhss = GRHSs grhss' binds }))+    (leaves', L loc (match { m_ext = noExt, m_grhss = GRHSs x grhss' binds }))+replaceLeavesMatch _ _ (L _ (Match _ _ _ (XGRHSs _)))+  = panic "replaceLeavesMatch"+replaceLeavesMatch _ _ (L _ (XMatch _)) = panic "replaceLeavesMatch"  replaceLeavesGRHS         :: [Located (body' GhcTc)]  -- replacement leaf expressions of that type         -> LGRHS GhcTc (Located (body GhcTc))     -- rhss of a case command         -> ([Located (body' GhcTc)],              -- remaining leaf expressions             LGRHS GhcTc (Located (body' GhcTc)))  -- updated GRHS-replaceLeavesGRHS (leaf:leaves) (L loc (GRHS stmts _))-  = (leaves, L loc (GRHS stmts leaf))+replaceLeavesGRHS (leaf:leaves) (L loc (GRHS x stmts _))+  = (leaves, L loc (GRHS x stmts leaf))+replaceLeavesGRHS _ (L _ (XGRHS _)) = panic "replaceLeavesGRHS" replaceLeavesGRHS [] _ = panic "replaceLeavesGRHS []"  -- Balanced fold of a non-empty list.@@ -1187,31 +1205,30 @@ collectl (L _ pat) bndrs   = go pat   where-    go (VarPat (L _ var))         = var : bndrs+    go (VarPat _ (L _ var))       = var : bndrs     go (WildPat _)                = bndrs-    go (LazyPat pat)              = collectl pat bndrs-    go (BangPat pat)              = collectl pat bndrs-    go (AsPat (L _ a) pat)        = a : collectl pat bndrs-    go (ParPat  pat)              = collectl pat bndrs+    go (LazyPat _ pat)            = collectl pat bndrs+    go (BangPat _ pat)            = collectl pat bndrs+    go (AsPat _ (L _ a) pat)      = a : collectl pat bndrs+    go (ParPat _ pat)             = collectl pat bndrs -    go (ListPat pats _ _)         = foldr collectl bndrs pats-    go (PArrPat pats _)           = foldr collectl bndrs pats-    go (TuplePat pats _ _)        = foldr collectl bndrs pats-    go (SumPat pat _ _ _)         = collectl pat bndrs+    go (ListPat _ pats)           = foldr collectl bndrs pats+    go (TuplePat _ pats _)        = foldr collectl bndrs pats+    go (SumPat _ pat _ _)         = collectl pat bndrs      go (ConPatIn _ ps)            = foldr collectl bndrs (hsConPatArgs ps)     go (ConPatOut {pat_args=ps, pat_binds=ds}) =                                     collectEvBinders ds                                     ++ foldr collectl bndrs (hsConPatArgs ps)-    go (LitPat _)                 = bndrs+    go (LitPat _ _)               = bndrs     go (NPat {})                  = bndrs-    go (NPlusKPat (L _ n) _ _ _ _ _) = n : bndrs+    go (NPlusKPat _ (L _ n) _ _ _ _) = n : bndrs -    go (SigPatIn pat _)           = collectl pat bndrs-    go (SigPatOut pat _)          = collectl pat bndrs-    go (CoPat _ pat _)            = collectl (noLoc pat) bndrs-    go (ViewPat _ pat _)          = collectl pat bndrs+    go (SigPat _ pat)             = collectl pat bndrs+    go (CoPat _ _ pat _)          = collectl (noLoc pat) bndrs+    go (ViewPat _ _ pat)          = collectl pat bndrs     go p@(SplicePat {})           = pprPanic "collectl/go" (ppr p)+    go p@(XPat {})                = pprPanic "collectl/go" (ppr p)  collectEvBinders :: TcEvBinds -> [Id] collectEvBinders (EvBinds bs)   = foldrBag add_ev_bndr [] bs
deSugar/DsBinds.hs view
@@ -27,10 +27,10 @@ import DsMonad import DsGRHSs import DsUtils+import Check ( checkGuardMatches )  import HsSyn            -- lots of things import CoreSyn          -- lots of things-import Literal          ( Literal(MachStr) ) import CoreOpt          ( simpleOptExpr ) import OccurAnal        ( occurAnalyseExpr ) import MkCore@@ -49,12 +49,11 @@ import TysWiredIn ( typeNatKind, typeSymbolKind ) import Id import MkId(proxyHashId)-import Class import Name import VarSet import Rules import VarEnv-import Var( EvVar )+import Var( EvVar, varType ) import Outputable import Module import SrcLoc@@ -65,6 +64,7 @@ import DynFlags import FastString import Util+import UniqSet( nonDetEltsUniqSet ) import MonadUtils import qualified GHC.LanguageExtensions as LangExt import Control.Monad@@ -164,9 +164,10 @@           return (force_var, [core_binds]) }  dsHsBind dflags (PatBind { pat_lhs = pat, pat_rhs = grhss-                         , pat_rhs_ty = ty+                         , pat_ext = NPatBindTc _ ty                          , pat_ticks = (rhs_tick, var_ticks) })   = do  { body_expr <- dsGuarded grhss ty+        ; checkGuardMatches PatBindGuards grhss         ; let body' = mkOptTickBox rhs_tick body_expr               pat'  = decideBangHood dflags pat         ; (force_var,sel_binds) <- mkSelectorBinds var_ticks pat body'@@ -181,7 +182,7 @@                           , abs_exports = exports                           , abs_ev_binds = ev_binds                           , abs_binds = binds, abs_sig = has_sig })-  = do { ds_binds <- addDictsDs (toTcTypeBag (listToBag dicts)) $+  = do { ds_binds <- addDictsDs (listToBag dicts) $                      dsLHsBinds binds                                    -- addDictsDs: push type constraints deeper                                    --             for inner pattern match check@@ -192,6 +193,7 @@        ; dsAbsBinds dflags tyvars dicts exports ds_ev_binds ds_binds has_sig }  dsHsBind _ (PatSynBind{}) = panic "dsHsBind: PatSynBind"+dsHsBind _ (XHsBindsLR{}) = panic "dsHsBind: XHsBindsLR"   -----------------------@@ -251,6 +253,7 @@                    ; return (makeCorePair dflags global                                           (isDefaultMethod prags)                                           0 (core_wrap (Var local))) }+             mk_bind (XABExport _) = panic "dsAbsBinds"        ; main_binds <- mapM mk_bind exports         ; return (force_vars, flattenBinds ds_ev_binds ++ bind_prs ++ main_binds) }@@ -295,6 +298,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"         ; export_binds_s <- mapM mk_bind (exports ++ extra_exports) @@ -342,7 +346,8 @@     mk_export local =       do global <- newSysLocalDs                      (exprType (mkLams tyvars (mkLams dicts (Var local))))-         return (ABE { abe_poly  = global+         return (ABE { abe_ext   = noExt+                     , abe_poly  = global                      , abe_mono  = local                      , abe_wrap  = WpHole                      , abe_prags = SpecPrags [] })@@ -677,14 +682,14 @@        ; -- pprTrace "dsRule" (vcat [ text "Id:" <+> ppr poly_id          --                         , text "spec_co:" <+> ppr spec_co          --                         , text "ds_rhs:" <+> ppr ds_lhs ]) $-         case decomposeRuleLhs spec_bndrs ds_lhs of {+         dflags <- getDynFlags+       ; case decomposeRuleLhs dflags spec_bndrs ds_lhs of {            Left msg -> do { warnDs NoReason msg; return Nothing } ;            Right (rule_bndrs, _fn, args) -> do -       { dflags <- getDynFlags-       ; this_mod <- getModule+       { this_mod <- getModule        ; let fn_unf    = realIdUnfolding poly_id-             spec_unf  = specUnfolding spec_bndrs core_app arity_decrease fn_unf+             spec_unf  = specUnfolding dflags spec_bndrs core_app arity_decrease fn_unf              spec_id   = mkLocalId spec_name spec_ty                             `setInlinePragma` inl_prag                             `setIdUnfolding`  spec_unf@@ -816,14 +821,15 @@ ************************************************************************ -} -decomposeRuleLhs :: [Var] -> CoreExpr -> Either SDoc ([Var], Id, [CoreExpr])+decomposeRuleLhs :: DynFlags -> [Var] -> CoreExpr+                 -> Either SDoc ([Var], Id, [CoreExpr]) -- (decomposeRuleLhs bndrs lhs) takes apart the LHS of a RULE, -- The 'bndrs' are the quantified binders of the rules, but decomposeRuleLhs -- may add some extra dictionary binders (see Note [Free dictionaries]) -- -- Returns an error message if the LHS isn't of the expected shape -- Note [Decomposing the left-hand side of a RULE]-decomposeRuleLhs orig_bndrs orig_lhs+decomposeRuleLhs dflags orig_bndrs orig_lhs   | not (null unbound)    -- Check for things unbound on LHS                           -- See Note [Unused spec binders]   = Left (vcat (map dead_msg unbound))@@ -844,7 +850,7 @@   = Left bad_shape_msg  where    lhs1         = drop_dicts orig_lhs-   lhs2         = simpleOptExpr lhs1  -- See Note [Simplify rule LHS]+   lhs2         = simpleOptExpr dflags lhs1  -- See Note [Simplify rule LHS]    (fun2,args2) = collectArgs lhs2     lhs_fvs    = exprFreeVars lhs2@@ -1140,15 +1146,39 @@ dsTcEvBinds (EvBinds bs)   = dsEvBinds bs  dsEvBinds :: Bag EvBind -> DsM [CoreBind]-dsEvBinds bs = mapM ds_scc (sccEvBinds bs)+dsEvBinds bs+  = do { ds_bs <- mapBagM dsEvBind bs+       ; return (mk_ev_binds ds_bs) }++mk_ev_binds :: Bag (Id,CoreExpr) -> [CoreBind]+-- We do SCC analysis of the evidence bindings, /after/ desugaring+-- them. This is convenient: it means we can use the CoreSyn+-- free-variable functions rather than having to do accurate free vars+-- for EvTerm.+mk_ev_binds ds_binds+  = map ds_scc (stronglyConnCompFromEdgedVerticesUniq edges)   where-    ds_scc (AcyclicSCC (EvBind { eb_lhs = v, eb_rhs = r}))-                          = liftM (NonRec v) (dsEvTerm r)-    ds_scc (CyclicSCC bs) = liftM Rec (mapM dsEvBind bs)+    edges :: [ Node EvVar (EvVar,CoreExpr) ]+    edges = foldrBag ((:) . mk_node) [] ds_binds +    mk_node :: (Id, CoreExpr) -> Node EvVar (EvVar,CoreExpr)+    mk_node b@(var, rhs)+      = DigraphNode { node_payload = b+                    , node_key = var+                    , node_dependencies = nonDetEltsUniqSet $+                                          exprFreeVars rhs `unionVarSet`+                                          coVarsOfType (varType var) }+      -- It's OK to use nonDetEltsUniqSet here as stronglyConnCompFromEdgedVertices+      -- is still deterministic even if the edges are in nondeterministic order+      -- as explained in Note [Deterministic SCC] in Digraph.++    ds_scc (AcyclicSCC (v,r)) = NonRec v r+    ds_scc (CyclicSCC prs)    = Rec prs+ dsEvBind :: EvBind -> DsM (Id, CoreExpr) dsEvBind (EvBind { eb_lhs = v, eb_rhs = r}) = liftM ((,) v) (dsEvTerm r) + {-********************************************************************** *                                                                      *            Desugaring EvTerms@@ -1156,42 +1186,16 @@ **********************************************************************-}  dsEvTerm :: EvTerm -> DsM CoreExpr-dsEvTerm (EvId v)           = return (Var v)-dsEvTerm (EvCallStack cs)   = dsEvCallStack cs-dsEvTerm (EvTypeable ty ev) = dsEvTypeable ty ev-dsEvTerm (EvLit (EvNum n))  = mkNaturalExpr n-dsEvTerm (EvLit (EvStr s))  = mkStringExprFS s+dsEvTerm (EvExpr e)          = return e+dsEvTerm (EvTypeable ty ev)  = dsEvTypeable ty ev+dsEvTerm (EvFun { et_tvs = tvs, et_given = given+                , et_binds = ev_binds, et_body = wanted_id })+  = do { ds_ev_binds <- dsTcEvBinds ev_binds+       ; return $ (mkLams (tvs ++ given) $+                   mkCoreLets ds_ev_binds $+                   Var wanted_id) } -dsEvTerm (EvCast tm co)-  = do { tm' <- dsEvTerm tm-       ; return $ mkCastDs tm' co } -dsEvTerm (EvDFunApp df tys tms)-  = do { tms' <- mapM dsEvTerm tms-       ; return $ Var df `mkTyApps` tys `mkApps` tms' }-  -- The use of mkApps here is OK vis-a-vis levity polymorphism because-  -- the terms are always evidence variables with types of kind Constraint--dsEvTerm (EvCoercion co) = return (Coercion co)-dsEvTerm (EvSuperClass d n)-  = do { d' <- dsEvTerm d-       ; let (cls, tys) = getClassPredTys (exprType d')-             sc_sel_id  = classSCSelId cls n    -- Zero-indexed-       ; return $ Var sc_sel_id `mkTyApps` tys `App` d' }--dsEvTerm (EvSelector sel_id tys tms)-  = do { tms' <- mapM dsEvTerm tms-       ; return $ Var sel_id `mkTyApps` tys `mkApps` tms' }--dsEvTerm (EvDelayedError ty msg) = return $ dsEvDelayedError ty msg--dsEvDelayedError :: Type -> FastString -> CoreExpr-dsEvDelayedError ty msg-  = Var errorId `mkTyApps` [getRuntimeRep ty, ty] `mkApps` [litMsg]-  where-    errorId = tYPE_ERROR_ID-    litMsg  = Lit (MachStr (fastStringToByteString msg))- {-********************************************************************** *                                                                      *            Desugaring Typeable dictionaries@@ -1312,58 +1316,3 @@        ; return (Var tc_rep_id) }   | otherwise   = pprPanic "tyConRep" (ppr tc)--{- Note [Memoising typeOf]-~~~~~~~~~~~~~~~~~~~~~~~~~~-See #3245, #9203--IMPORTANT: we don't want to recalculate the TypeRep once per call with-the proxy argument.  This is what went wrong in #3245 and #9203. So we-help GHC by manually keeping the 'rep' *outside* the lambda.--}---{-**********************************************************************-*                                                                      *-           Desugaring EvCallStack evidence-*                                                                      *-**********************************************************************-}--dsEvCallStack :: EvCallStack -> DsM CoreExpr--- See Note [Overview of implicit CallStacks] in TcEvidence.hs-dsEvCallStack cs = do-  df            <- getDynFlags-  m             <- getModule-  srcLocDataCon <- dsLookupDataCon srcLocDataConName-  let mkSrcLoc l =-        liftM (mkCoreConApps srcLocDataCon)-              (sequence [ mkStringExprFS (unitIdFS $ moduleUnitId m)-                        , mkStringExprFS (moduleNameFS $ moduleName m)-                        , mkStringExprFS (srcSpanFile l)-                        , return $ mkIntExprInt df (srcSpanStartLine l)-                        , return $ mkIntExprInt df (srcSpanStartCol l)-                        , return $ mkIntExprInt df (srcSpanEndLine l)-                        , return $ mkIntExprInt df (srcSpanEndCol l)-                        ])--  emptyCS <- Var <$> dsLookupGlobalId emptyCallStackName--  pushCSVar <- dsLookupGlobalId pushCallStackName-  let pushCS name loc rest =-        mkCoreApps (Var pushCSVar) [mkCoreTup [name, loc], rest]--  let mkPush name loc tm = do-        nameExpr <- mkStringExprFS name-        locExpr <- mkSrcLoc loc-        case tm of-          EvCallStack EvCsEmpty -> return (pushCS nameExpr locExpr emptyCS)-          _ -> do tmExpr  <- dsEvTerm tm-                  -- at this point tmExpr :: IP sym CallStack-                  -- but we need the actual CallStack to pass to pushCS,-                  -- so we use unwrapIP to strip the dictionary wrapper-                  -- See Note [Overview of implicit CallStacks]-                  let ip_co = unwrapIP (exprType tmExpr)-                  return (pushCS nameExpr locExpr (mkCastDs tmExpr ip_co))-  case cs of-    EvCsPushCall name loc tm -> mkPush (occNameFS $ getOccName name) loc tm-    EvCsEmpty -> return emptyCS
deSugar/DsExpr.hs view
@@ -24,6 +24,7 @@ import DsUtils import DsArrows import DsMonad+import Check ( checkGuardMatches ) import Name import NameEnv import FamInstEnv( topNormaliseType )@@ -70,29 +71,33 @@ -}  dsLocalBinds :: LHsLocalBinds GhcTc -> CoreExpr -> DsM CoreExpr-dsLocalBinds (L _   EmptyLocalBinds)    body = return body-dsLocalBinds (L loc (HsValBinds binds)) body = putSrcSpanDs loc $-                                               dsValBinds binds body-dsLocalBinds (L _ (HsIPBinds binds))    body = dsIPBinds  binds body+dsLocalBinds (L _   (EmptyLocalBinds _))  body = return body+dsLocalBinds (L loc (HsValBinds _ binds)) body = putSrcSpanDs loc $+                                                   dsValBinds binds body+dsLocalBinds (L _ (HsIPBinds _ binds))    body = dsIPBinds  binds body+dsLocalBinds (L _ (XHsLocalBindsLR _))    _    = panic "dsLocalBinds"  ------------------------- -- caller sets location dsValBinds :: HsValBinds GhcTc -> CoreExpr -> DsM CoreExpr-dsValBinds (ValBindsOut binds _) body = foldrM ds_val_bind body binds-dsValBinds (ValBindsIn {})       _    = panic "dsValBinds ValBindsIn"+dsValBinds (XValBindsLR (NValBinds binds _)) body+  = foldrM ds_val_bind body binds+dsValBinds (ValBinds {})       _    = panic "dsValBinds ValBindsIn"  ------------------------- dsIPBinds :: HsIPBinds GhcTc -> CoreExpr -> DsM CoreExpr-dsIPBinds (IPBinds ip_binds ev_binds) body+dsIPBinds (IPBinds ev_binds ip_binds) body   = do  { ds_binds <- dsTcEvBinds ev_binds         ; let inner = mkCoreLets ds_binds body                 -- The dict bindings may not be in                 -- dependency order; hence Rec         ; foldrM ds_ip_bind inner ip_binds }   where-    ds_ip_bind (L _ (IPBind ~(Right n) e)) body+    ds_ip_bind (L _ (IPBind _ ~(Right n) e)) body       = do e' <- dsLExpr e            return (Let (NonRec n e') body)+    ds_ip_bind (L _ (XIPBind _)) _ = panic "dsIPBinds"+dsIPBinds (XHsIPBinds _) _ = panic "dsIPBinds"  ------------------------- -- caller sets location@@ -199,10 +204,12 @@        ; let rhs' = mkOptTickBox tick rhs        ; return (bindNonRec fun rhs' body) } -dsUnliftedBind (PatBind {pat_lhs = pat, pat_rhs = grhss, pat_rhs_ty = ty }) body+dsUnliftedBind (PatBind {pat_lhs = pat, pat_rhs = grhss+                        , pat_ext = NPatBindTc _ ty }) body   =     -- let C x# y# = rhs in body         -- ==> case rhs of C x# y# -> body     do { rhs <- dsGuarded grhss ty+       ; checkGuardMatches PatBindGuards grhss        ; let upat = unLoc pat              eqn = EqnInfo { eqn_pats = [upat],                              eqn_rhs = cantFailMatchResult body }@@ -249,18 +256,19 @@ ds_expr :: Bool   -- are we directly inside an HsWrap?                   -- See Wrinkle in Note [Detecting forced eta expansion]         -> HsExpr GhcTc -> DsM CoreExpr-ds_expr _ (HsPar e)              = dsLExpr e-ds_expr _ (ExprWithTySigOut e _) = dsLExpr e-ds_expr w (HsVar (L _ var))      = dsHsVar w var+ds_expr _ (HsPar _ e)            = dsLExpr e+ds_expr _ (ExprWithTySig _ e)    = dsLExpr e+ds_expr w (HsVar _ (L _ var))    = dsHsVar w var ds_expr _ (HsUnboundVar {})      = panic "dsExpr: HsUnboundVar" -- Typechecker eliminates them-ds_expr w (HsConLikeOut con)     = dsConLike w con-ds_expr _ (HsIPVar _)            = panic "dsExpr: HsIPVar"+ds_expr w (HsConLikeOut _ con)   = dsConLike w con+ds_expr _ (HsIPVar {})           = panic "dsExpr: HsIPVar" ds_expr _ (HsOverLabel{})        = panic "dsExpr: HsOverLabel"-ds_expr _ (HsLit lit)            = dsLit (convertLit lit)-ds_expr _ (HsOverLit lit)        = dsOverLit lit+ds_expr _ (HsLit _ lit)          = dsLit (convertLit lit)+ds_expr _ (HsOverLit _ lit)      = dsOverLit lit -ds_expr _ (HsWrap co_fn e)-  = do { e' <- ds_expr True e+ds_expr _ (HsWrap _ co_fn e)+  = do { e' <- ds_expr True e    -- This is the one place where we recurse to+                                 -- ds_expr (passing True), rather than dsExpr        ; wrap' <- dsHsWrapper co_fn        ; dflags <- getDynFlags        ; let wrapped_e = wrap' e'@@ -269,7 +277,7 @@        ; warnAboutIdentities dflags e' wrapped_ty        ; return wrapped_e } -ds_expr _ (NegApp (L loc (HsOverLit lit@(OverLit { ol_val = HsIntegral i })))+ds_expr _ (NegApp _ (L loc (HsOverLit _ lit@(OverLit { ol_val = HsIntegral i})))                   neg_expr)   = do { expr' <- putSrcSpanDs loc $ do           { dflags <- getDynFlags@@ -278,27 +286,26 @@           ; dsOverLit' dflags lit }        ; dsSyntaxExpr neg_expr [expr'] } -ds_expr _ (NegApp expr neg_expr)+ds_expr _ (NegApp _ expr neg_expr)   = do { expr' <- dsLExpr expr        ; dsSyntaxExpr neg_expr [expr'] } -ds_expr _ (HsLam a_Match)+ds_expr _ (HsLam _ a_Match)   = uncurry mkLams <$> matchWrapper LambdaExpr Nothing a_Match -ds_expr _ (HsLamCase matches)+ds_expr _ (HsLamCase _ matches)   = do { ([discrim_var], matching_code) <- matchWrapper CaseAlt Nothing matches        ; return $ Lam discrim_var matching_code } -ds_expr _ e@(HsApp fun arg)+ds_expr _ e@(HsApp _ fun arg)   = do { fun' <- dsLExpr fun        ; dsWhenNoErrs (dsLExprNoLP arg)                       (\arg' -> mkCoreAppDs (text "HsApp" <+> ppr e) fun' arg') } -ds_expr _ (HsAppTypeOut e _)+ds_expr _ (HsAppType _ e)     -- ignore type arguments here; they're in the wrappers instead at this point   = dsLExpr e - {- Note [Desugaring vars] ~~~~~~~~~~~~~~~~~~~~~~@@ -338,19 +345,19 @@ will sort it out. -} -ds_expr _ e@(OpApp e1 op _ e2)+ds_expr _ e@(OpApp _ e1 op e2)   = -- for the type of y, we need the type of op's 2nd argument     do { op' <- dsLExpr op        ; dsWhenNoErrs (mapM dsLExprNoLP [e1, e2])                       (\exprs' -> mkCoreAppsDs (text "opapp" <+> ppr e) op' exprs') } -ds_expr _ (SectionL expr op)       -- Desugar (e !) to ((!) e)+ds_expr _ (SectionL _ expr op)       -- Desugar (e !) to ((!) e)   = do { op' <- dsLExpr op        ; dsWhenNoErrs (dsLExprNoLP expr)                       (\expr' -> mkCoreAppDs (text "sectionl" <+> ppr expr) op' expr') }  -- dsLExpr (SectionR op expr)   -- \ x -> op x expr-ds_expr _ e@(SectionR op expr) = do+ds_expr _ e@(SectionR _ op expr) = do     core_op <- dsLExpr op     -- for the type of x, we need the type of op's 2nd argument     let (x_ty:y_ty:_, _) = splitFunTys (exprType core_op)@@ -361,66 +368,67 @@                                    Lam x_id (mkCoreAppsDs (text "sectionr" <+> ppr e)                                                           core_op [Var x_id, Var y_id])) -ds_expr _ (ExplicitTuple tup_args boxity)+ds_expr _ (ExplicitTuple _ tup_args boxity)   = do { let go (lam_vars, args) (L _ (Missing ty))                     -- For every missing expression, we need                     -- another lambda in the desugaring.                = do { lam_var <- newSysLocalDsNoLP ty                     ; return (lam_var : lam_vars, Var lam_var : args) }-             go (lam_vars, args) (L _ (Present expr))+             go (lam_vars, args) (L _ (Present _ expr))                     -- Expressions that are present don't generate                     -- lambdas, just arguments.                = do { core_expr <- dsLExprNoLP expr                     ; return (lam_vars, core_expr : args) }+             go _ (L _ (XTupArg {})) = panic "ds_expr"         ; dsWhenNoErrs (foldM go ([], []) (reverse tup_args))                 -- The reverse is because foldM goes left-to-right                       (\(lam_vars, args) -> mkCoreLams lam_vars $                                             mkCoreTupBoxity boxity args) } -ds_expr _ (ExplicitSum alt arity expr types)+ds_expr _ (ExplicitSum types alt arity expr)   = do { dsWhenNoErrs (dsLExprNoLP expr)                       (\core_expr -> mkCoreConApps (sumDataCon alt arity)                                      (map (Type . getRuntimeRep) types ++                                       map Type types ++                                       [core_expr]) ) } -ds_expr _ (HsSCC _ cc expr@(L loc _)) = do+ds_expr _ (HsSCC _ _ cc expr@(L loc _)) = do     dflags <- getDynFlags     if gopt Opt_SccProfilingOn dflags       then do         mod_name <- getModule         count <- goptM Opt_ProfCountEntries-        uniq <- newUnique-        Tick (ProfNote (mkUserCC (sl_fs cc) mod_name loc uniq) count True)+        let nm = sl_fs cc+        flavour <- ExprCC <$> getCCIndexM nm+        Tick (ProfNote (mkUserCC nm mod_name loc flavour) count True)                <$> dsLExpr expr       else dsLExpr expr -ds_expr _ (HsCoreAnn _ _ expr)+ds_expr _ (HsCoreAnn _ _ _ expr)   = dsLExpr expr -ds_expr _ (HsCase discrim matches)+ds_expr _ (HsCase _ discrim matches)   = do { core_discrim <- dsLExpr discrim        ; ([discrim_var], matching_code) <- matchWrapper CaseAlt (Just discrim) matches        ; return (bindNonRec discrim_var core_discrim matching_code) }  -- Pepe: The binds are in scope in the body but NOT in the binding group --       This is to avoid silliness in breakpoints-ds_expr _ (HsLet binds body) = do+ds_expr _ (HsLet _ binds body) = do     body' <- dsLExpr body     dsLocalBinds binds body'  -- We need the `ListComp' form to use `deListComp' (rather than the "do" form) -- because the interpretation of `stmts' depends on what sort of thing it is. ---ds_expr _ (HsDo ListComp     (L _ stmts) res_ty) = dsListComp stmts res_ty-ds_expr _ (HsDo PArrComp     (L _ stmts) _)      = dsPArrComp (map unLoc stmts)-ds_expr _ (HsDo DoExpr       (L _ stmts) _)      = dsDo stmts-ds_expr _ (HsDo GhciStmtCtxt (L _ stmts) _)      = dsDo stmts-ds_expr _ (HsDo MDoExpr      (L _ stmts) _)      = dsDo stmts-ds_expr _ (HsDo MonadComp    (L _ stmts) _)      = dsMonadComp stmts+ds_expr _ (HsDo res_ty ListComp (L _ stmts)) = dsListComp stmts res_ty+ds_expr _ (HsDo _ DoExpr        (L _ stmts)) = dsDo stmts+ds_expr _ (HsDo _ GhciStmtCtxt  (L _ stmts)) = dsDo stmts+ds_expr _ (HsDo _ MDoExpr       (L _ stmts)) = dsDo stmts+ds_expr _ (HsDo _ MonadComp     (L _ stmts)) = dsMonadComp stmts -ds_expr _ (HsIf mb_fun guard_expr then_expr else_expr)+ds_expr _ (HsIf _ mb_fun guard_expr then_expr else_expr)   = do { pred <- dsLExpr guard_expr        ; b1 <- dsLExpr then_expr        ; b2 <- dsLExpr else_expr@@ -435,6 +443,7 @@   | otherwise   = do { match_result <- liftM (foldr1 combineMatchResults)                                (mapM (dsGRHS IfAlt res_ty) alts)+       ; checkGuardMatches IfAlt (GRHSs noExt alts (noLoc emptyLocalBinds))        ; error_expr   <- mkErrorExpr        ; extractMatchResult match_result error_expr }   where@@ -450,38 +459,12 @@ ds_expr _ (ExplicitList elt_ty wit xs)   = dsExplicitList elt_ty wit xs --- We desugar [:x1, ..., xn:] as---   singletonP x1 +:+ ... +:+ singletonP xn----ds_expr _ (ExplicitPArr ty []) = do-    emptyP <- dsDPHBuiltin emptyPVar-    return (Var emptyP `App` Type ty)-ds_expr _ (ExplicitPArr ty xs) = do-    singletonP <- dsDPHBuiltin singletonPVar-    appP       <- dsDPHBuiltin appPVar-    xs'        <- mapM dsLExprNoLP xs-    let unary  fn x   = mkApps (Var fn) [Type ty, x]-        binary fn x y = mkApps (Var fn) [Type ty, x, y]--    return . foldr1 (binary appP) $ map (unary singletonP) xs'- ds_expr _ (ArithSeq expr witness seq)   = case witness of      Nothing -> dsArithSeq expr seq      Just fl -> do { newArithSeq <- dsArithSeq expr seq                    ; dsSyntaxExpr fl [newArithSeq] } -ds_expr _ (PArrSeq expr (FromTo from to))-  = mkApps <$> dsExpr expr <*> mapM dsLExprNoLP [from, to]--ds_expr _ (PArrSeq expr (FromThenTo from thn to))-  = mkApps <$> dsExpr expr <*> mapM dsLExprNoLP [from, thn, to]--ds_expr _ (PArrSeq _ _)-  = panic "DsExpr.dsExpr: Infinite parallel array!"-    -- the parser shouldn't have generated it and the renamer and typechecker-    -- shouldn't have let it through- {- Static Pointers ~~~~~~~~~~~~~~~@@ -535,8 +518,9 @@ constructor @C@, setting all of @C@'s fields to bottom. -} -ds_expr _ (RecordCon { rcon_con_expr = con_expr, rcon_flds = rbinds-                     , rcon_con_like = con_like })+ds_expr _ (RecordCon { rcon_flds = rbinds+                     , rcon_ext = RecordConTc { rcon_con_expr = con_expr+                                              , rcon_con_like = con_like }})   = do { con_expr' <- dsExpr con_expr        ; let              (arg_tys, _) = tcSplitFunTys (exprType con_expr')@@ -595,9 +579,11 @@ -}  ds_expr _ expr@(RecordUpd { rupd_expr = record_expr, rupd_flds = fields-                          , rupd_cons = cons_to_upd-                          , rupd_in_tys = in_inst_tys, rupd_out_tys = out_inst_tys-                          , rupd_wrap = dict_req_wrap } )+                          , rupd_ext = RecordUpdTc+                              { rupd_cons = cons_to_upd+                              , rupd_in_tys = in_inst_tys+                              , rupd_out_tys = out_inst_tys+                              , rupd_wrap = dict_req_wrap }} )   | null fields   = dsLExpr record_expr   | otherwise@@ -614,11 +600,12 @@         -- constructor arguments.         ; alts <- mapM (mk_alt upd_fld_env) cons_to_upd         ; ([discrim_var], matching_code)-                <- matchWrapper RecUpd Nothing (MG { mg_alts = noLoc alts-                                                   , mg_arg_tys = [in_ty]-                                                   , mg_res_ty = out_ty, mg_origin = FromSource })-                                                   -- FromSource is not strictly right, but we-                                                   -- want incomplete pattern-match warnings+                <- matchWrapper RecUpd Nothing+                                      (MG { mg_alts = noLoc alts+                                          , mg_ext = MatchGroupTc [in_ty] out_ty+                                          , mg_origin = FromSource })+                                     -- FromSource is not strictly right, but we+                                     -- want incomplete pattern-match warnings          ; return (add_field_binds field_binds' $                   bindNonRec discrim_var record_expr' matching_code) }@@ -667,7 +654,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 con)+                 inst_con = noLoc $ mkHsWrap wrap (HsConLikeOut noExt con)                         -- Reconstruct with the WrapId so that unpacking happens                  wrap = mkWpEvVarApps theta_vars                                <.>                         dict_req_wrap                                           <.>@@ -722,16 +709,16 @@  -- Template Haskell stuff -ds_expr _ (HsRnBracketOut _ _) = panic "dsExpr HsRnBracketOut"-ds_expr _ (HsTcBracketOut x ps) = dsBracket x ps-ds_expr _ (HsSpliceE s)  = pprPanic "dsExpr:splice" (ppr s)+ds_expr _ (HsRnBracketOut _ _ _)  = panic "dsExpr HsRnBracketOut"+ds_expr _ (HsTcBracketOut _ x ps) = dsBracket x ps+ds_expr _ (HsSpliceE _ s)         = pprPanic "dsExpr:splice" (ppr s)  -- Arrow notation extension-ds_expr _ (HsProc pat cmd) = dsProcExpr pat cmd+ds_expr _ (HsProc _ pat cmd) = dsProcExpr pat cmd  -- Hpc Support -ds_expr _ (HsTick tickish e) = do+ds_expr _ (HsTick _ tickish e) = do   e' <- dsLExpr e   return (Tick tickish e') @@ -742,20 +729,19 @@ -- (did you go here: YES or NO), but will effect accurate -- tick counting. -ds_expr _ (HsBinTick ixT ixF e) = do+ds_expr _ (HsBinTick _ ixT ixF e) = do   e2 <- dsLExpr e   do { ASSERT(exprType e2 `eqType` boolTy)        mkBinaryTickBox ixT ixF e2      } -ds_expr _ (HsTickPragma _ _ _ expr) = do+ds_expr _ (HsTickPragma _ _ _ _ expr) = do   dflags <- getDynFlags   if gopt Opt_Hpc dflags     then panic "dsExpr:HsTickPragma"     else dsLExpr expr  -- HsSyn constructs that just shouldn't be here:-ds_expr _ (ExprWithTySig {})  = panic "dsExpr:ExprWithTySig" ds_expr _ (HsBracket     {})  = panic "dsExpr:HsBracket" ds_expr _ (HsArrApp      {})  = panic "dsExpr:HsArrApp" ds_expr _ (HsArrForm     {})  = panic "dsExpr:HsArrForm"@@ -763,10 +749,11 @@ ds_expr _ (EAsPat        {})  = panic "dsExpr:EAsPat" ds_expr _ (EViewPat      {})  = panic "dsExpr:EViewPat" ds_expr _ (ELazyPat      {})  = panic "dsExpr:ELazyPat"-ds_expr _ (HsAppType     {})  = panic "dsExpr:HsAppType" -- removed by typechecker ds_expr _ (HsDo          {})  = panic "dsExpr:HsDo" ds_expr _ (HsRecFld      {})  = panic "dsExpr:HsRecFld"+ds_expr _ (XExpr         {})  = panic "dsExpr: XExpr" + ------------------------------ dsSyntaxExpr :: SyntaxExpr GhcTc -> [CoreExpr] -> DsM CoreExpr dsSyntaxExpr (SyntaxExpr { syn_expr      = expr@@ -905,50 +892,50 @@     goL [] = panic "dsDo"     goL (L loc stmt:lstmts) = putSrcSpanDs loc (go loc stmt lstmts) -    go _ (LastStmt body _ _) stmts+    go _ (LastStmt _ body _ _) stmts       = ASSERT( null stmts ) dsLExpr body         -- The 'return' op isn't used for 'do' expressions -    go _ (BodyStmt rhs then_expr _ _) stmts+    go _ (BodyStmt _ rhs then_expr _) stmts       = do { rhs2 <- dsLExpr rhs            ; warnDiscardedDoBindings rhs (exprType rhs2)            ; rest <- goL stmts            ; dsSyntaxExpr then_expr [rhs2, rest] } -    go _ (LetStmt binds) stmts+    go _ (LetStmt _ binds) stmts       = do { rest <- goL stmts            ; dsLocalBinds binds rest } -    go _ (BindStmt pat rhs bind_op fail_op res1_ty) stmts+    go _ (BindStmt res1_ty pat rhs bind_op fail_op) stmts       = do  { body     <- goL stmts             ; rhs'     <- dsLExpr rhs             ; var   <- selectSimpleMatchVarL pat-            ; match <- matchSinglePat (Var var) (StmtCtxt DoExpr) pat+            ; match <- matchSinglePatVar var (StmtCtxt DoExpr) pat                                       res1_ty (cantFailMatchResult body)             ; match_code <- handle_failure pat match fail_op             ; dsSyntaxExpr bind_op [rhs', Lam var match_code] } -    go _ (ApplicativeStmt args mb_join body_ty) stmts+    go _ (ApplicativeStmt body_ty args mb_join) stmts       = do {              let                (pats, rhss) = unzip (map (do_arg . snd) args) -               do_arg (ApplicativeArgOne pat expr _) =+               do_arg (ApplicativeArgOne _ pat expr _) =                  (pat, dsLExpr expr)-               do_arg (ApplicativeArgMany stmts ret pat) =+               do_arg (ApplicativeArgMany _ stmts ret pat) =                  (pat, dsDo (stmts ++ [noLoc $ mkLastStmt (noLoc ret)]))+               do_arg (XApplicativeArg _) = panic "dsDo"                 arg_tys = map hsLPatType pats             ; rhss' <- sequence rhss -           ; let body' = noLoc $ HsDo DoExpr (noLoc stmts) body_ty+           ; let body' = noLoc $ HsDo body_ty DoExpr (noLoc stmts) -           ; let fun = L noSrcSpan $ HsLam $+           ; let fun = L noSrcSpan $ HsLam noExt $                    MG { mg_alts = noLoc [mkSimpleMatch LambdaExpr pats                                                        body']-                      , mg_arg_tys = arg_tys-                      , mg_res_ty = body_ty+                      , mg_ext = MatchGroupTc arg_tys body_ty                       , mg_origin = Generated }             ; fun' <- dsLExpr fun@@ -961,14 +948,15 @@     go loc (RecStmt { recS_stmts = rec_stmts, recS_later_ids = later_ids                     , recS_rec_ids = rec_ids, recS_ret_fn = return_op                     , recS_mfix_fn = mfix_op, recS_bind_fn = bind_op-                    , recS_bind_ty = bind_ty-                    , recS_rec_rets = rec_rets, recS_ret_ty = body_ty }) stmts+                    , recS_ext = RecStmtTc+                        { recS_bind_ty = bind_ty+                        , recS_rec_rets = rec_rets+                        , recS_ret_ty = body_ty} }) stmts       = goL (new_bind_stmt : stmts)  -- rec_ids can be empty; eg  rec { print 'x' }       where-        new_bind_stmt = L loc $ BindStmt (mkBigLHsPatTupId later_pats)+        new_bind_stmt = L loc $ BindStmt bind_ty (mkBigLHsPatTupId later_pats)                                          mfix_app bind_op                                          noSyntaxExpr  -- Tuple cannot fail-                                         bind_ty          tup_ids      = rec_ids ++ filterOut (`elem` rec_ids) later_ids         tup_ty       = mkBigCoreTupTy (map idType tup_ids) -- Deals with singleton case@@ -976,15 +964,15 @@         later_pats   = rec_tup_pats         rets         = map noLoc rec_rets         mfix_app     = nlHsSyntaxApps mfix_op [mfix_arg]-        mfix_arg     = noLoc $ HsLam+        mfix_arg     = noLoc $ HsLam noExt                            (MG { mg_alts = noLoc [mkSimpleMatch                                                     LambdaExpr                                                     [mfix_pat] body]-                               , mg_arg_tys = [tup_ty], mg_res_ty = body_ty+                               , mg_ext = MatchGroupTc [tup_ty] body_ty                                , mg_origin = Generated })-        mfix_pat     = noLoc $ LazyPat $ mkBigLHsPatTupId rec_tup_pats-        body         = noLoc $ HsDo-                                DoExpr (noLoc (rec_stmts ++ [ret_stmt])) body_ty+        mfix_pat     = noLoc $ LazyPat noExt $ mkBigLHsPatTupId rec_tup_pats+        body         = noLoc $ HsDo body_ty+                                DoExpr (noLoc (rec_stmts ++ [ret_stmt]))         ret_app      = nlHsSyntaxApps return_op [mkBigLHsTupId rets]         ret_stmt     = noLoc $ mkLastStmt ret_app                      -- This LastStmt will be desugared with dsDo,@@ -993,6 +981,7 @@      go _ (ParStmt   {}) _ = panic "dsDo ParStmt"     go _ (TransStmt {}) _ = panic "dsDo TransStmt"+    go _ (XStmtLR   {}) _ = panic "dsDo XStmtLR"  handle_failure :: LPat GhcTc -> MatchResult -> SyntaxExpr GhcTc -> DsM CoreExpr     -- In a do expression, pattern-match failure just calls@@ -1146,9 +1135,9 @@ checkForcedEtaExpansion :: HsExpr GhcTc -> Type -> DsM () checkForcedEtaExpansion expr ty   | Just var <- case expr of-                  HsVar (L _ var)               -> Just var-                  HsConLikeOut (RealDataCon dc) -> Just (dataConWrapId dc)-                  _                             -> Nothing+                  HsVar _ (L _ var)               -> Just var+                  HsConLikeOut _ (RealDataCon dc) -> Just (dataConWrapId dc)+                  _                               -> Nothing   , let bad_tys = badUseOfLevPolyPrimop var ty   , not (null bad_tys)   = levPolyPrimopErr var ty bad_tys@@ -1171,6 +1160,6 @@ 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 <+> ppr ty)+                      2 (ppr primop <+> dcolon <+> pprWithTYPE ty)                  , hang (text "Levity-polymorphic arguments:")-                      2 (vcat (map (\t -> ppr t <+> dcolon <+> ppr (typeKind t)) bad_tys)) ]+                      2 (vcat (map (\t -> pprWithTYPE t <+> dcolon <+> pprWithTYPE (typeKind t)) bad_tys)) ]
deSugar/DsForeign.hs view
@@ -99,17 +99,18 @@   where    do_ldecl (L loc decl) = putSrcSpanDs loc (do_decl decl) -   do_decl (ForeignImport { fd_name = id, fd_co = co, fd_fi = spec }) = do+   do_decl (ForeignImport { fd_name = id, fd_i_ext = co, fd_fi = spec }) = do       traceIf (text "fi start" <+> ppr id)       let id' = unLoc id       (bs, h, c) <- dsFImport id' co spec       traceIf (text "fi end" <+> ppr id)       return (h, c, [], bs) -   do_decl (ForeignExport { fd_name = L _ id, fd_co = co+   do_decl (ForeignExport { fd_name = L _ id, fd_e_ext = co                           , fd_fe = CExport (L _ (CExportStatic _ ext_nm cconv)) _ }) = do       (h, c, _, _) <- dsFExport id co ext_nm cconv False       return (h, c, [id], [])+   do_decl (XForeignDecl _) = panic "dsForeigns'"  {- ************************************************************************@@ -229,7 +230,8 @@                                       CApiConv safety)                       c = includes                        $$ fun_proto <+> braces (cRet <> semi)-                      includes = vcat [ text "#include <" <> ftext h <> text ">"+                      includes = vcat [ text "#include \"" <> ftext h+                                        <> text "\""                                       | Header _ h <- nub headers ]                       fun_proto = cResType <+> pprCconv <+> ppr wrapperName <> parens argTypes                       cRet
deSugar/DsGRHSs.hs view
@@ -15,25 +15,24 @@ import GhcPrelude  import {-# SOURCE #-} DsExpr  ( dsLExpr, dsLocalBinds )-import {-# SOURCE #-} Match   ( matchSinglePat )+import {-# SOURCE #-} Match   ( matchSinglePatVar )  import HsSyn import MkCore import CoreSyn+import CoreUtils (bindNonRec) +import Check (genCaseTmCs2) import DsMonad import DsUtils-import TysWiredIn-import PrelNames import Type   ( Type )-import Module import Name import Util import SrcLoc import Outputable  {--@dsGuarded@ is used for both @case@ expressions and pattern bindings.+@dsGuarded@ is used for pattern bindings. It desugars: \begin{verbatim}         | g1 -> e1@@ -46,7 +45,6 @@ -}  dsGuarded :: GRHSs GhcTc (LHsExpr GhcTc) -> Type -> DsM CoreExpr- dsGuarded grhss rhs_ty = do     match_result <- dsGRHSs PatBindRhs grhss rhs_ty     error_expr <- mkErrorAppDs nON_EXHAUSTIVE_GUARDS_ERROR_ID rhs_ty empty@@ -58,18 +56,20 @@         -> GRHSs GhcTc (LHsExpr GhcTc)          -- Guarded RHSs         -> Type                                 -- Type of RHS         -> DsM MatchResult-dsGRHSs hs_ctx (GRHSs grhss binds) rhs_ty+dsGRHSs hs_ctx (GRHSs _ grhss binds) rhs_ty   = ASSERT( notNull grhss )     do { match_results <- mapM (dsGRHS hs_ctx rhs_ty) grhss        ; let match_result1 = foldr1 combineMatchResults match_results              match_result2 = adjustMatchResultDs (dsLocalBinds binds) match_result1                              -- NB: nested dsLet inside matchResult        ; return match_result2 }+dsGRHSs _ (XGRHSs _) _ = panic "dsGRHSs"  dsGRHS :: HsMatchContext Name -> Type -> LGRHS GhcTc (LHsExpr GhcTc)        -> DsM MatchResult-dsGRHS hs_ctx rhs_ty (L _ (GRHS guards rhs))+dsGRHS hs_ctx rhs_ty (L _ (GRHS _ guards rhs))   = matchGuards (map unLoc guards) (PatGuard hs_ctx) rhs rhs_ty+dsGRHS _ _ (L _ (XGRHS _)) = panic "dsGRHS"  {- ************************************************************************@@ -99,16 +99,16 @@         -- NB:  The success of this clause depends on the typechecker not         --      wrapping the 'otherwise' in empty HsTyApp or HsWrap constructors         --      If it does, you'll get bogus overlap warnings-matchGuards (BodyStmt e _ _ _ : stmts) ctx rhs rhs_ty+matchGuards (BodyStmt _ e _ _ : stmts) ctx rhs rhs_ty   | Just addTicks <- isTrueLHsExpr e = do     match_result <- matchGuards stmts ctx rhs rhs_ty     return (adjustMatchResultDs addTicks match_result)-matchGuards (BodyStmt expr _ _ _ : stmts) ctx rhs rhs_ty = do+matchGuards (BodyStmt _ expr _ _ : stmts) ctx rhs rhs_ty = do     match_result <- matchGuards stmts ctx rhs rhs_ty     pred_expr <- dsLExpr expr     return (mkGuardedMatchResult pred_expr match_result) -matchGuards (LetStmt binds : stmts) ctx rhs rhs_ty = do+matchGuards (LetStmt _ binds : stmts) ctx rhs rhs_ty = do     match_result <- matchGuards stmts ctx rhs rhs_ty     return (adjustMatchResultDs (dsLocalBinds binds) match_result)         -- NB the dsLet occurs inside the match_result@@ -116,10 +116,19 @@         --         so we can't desugar the bindings without the         --         body expression in hand -matchGuards (BindStmt pat bind_rhs _ _ _ : stmts) ctx rhs rhs_ty = do-    match_result <- matchGuards stmts ctx rhs rhs_ty+matchGuards (BindStmt _ pat bind_rhs _ _ : stmts) ctx rhs rhs_ty = do+    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     core_rhs <- dsLExpr bind_rhs-    matchSinglePat core_rhs (StmtCtxt ctx) pat rhs_ty match_result+    match_result' <- matchSinglePatVar match_var (StmtCtxt ctx) pat rhs_ty+                                       match_result+    pure $ adjustMatchResult (bindNonRec match_var core_rhs) match_result'  matchGuards (LastStmt  {} : _) _ _ _ = panic "matchGuards LastStmt" matchGuards (ParStmt   {} : _) _ _ _ = panic "matchGuards ParStmt"@@ -127,34 +136,8 @@ matchGuards (RecStmt   {} : _) _ _ _ = panic "matchGuards RecStmt" matchGuards (ApplicativeStmt {} : _) _ _ _ =   panic "matchGuards ApplicativeLastStmt"--isTrueLHsExpr :: LHsExpr GhcTc -> Maybe (CoreExpr -> DsM CoreExpr)---- Returns Just {..} if we're sure that the expression is True--- I.e.   * 'True' datacon---        * 'otherwise' Id---        * Trivial wappings of these--- The arguments to Just are any HsTicks that we have found,--- because we still want to tick then, even it they are always evaluated.-isTrueLHsExpr (L _ (HsVar (L _ v))) |  v `hasKey` otherwiseIdKey-                                    || v `hasKey` getUnique trueDataConId-                                            = Just return-        -- trueDataConId doesn't have the same unique as trueDataCon-isTrueLHsExpr (L _ (HsConLikeOut con)) | con `hasKey` getUnique trueDataCon = Just return-isTrueLHsExpr (L _ (HsTick tickish e))-    | Just ticks <- isTrueLHsExpr e-    = Just (\x -> do wrapped <- ticks x-                     return (Tick tickish wrapped))-   -- This encodes that the result is constant True for Hpc tick purposes;-   -- which is specifically what isTrueLHsExpr is trying to find out.-isTrueLHsExpr (L _ (HsBinTick ixT _ e))-    | Just ticks <- isTrueLHsExpr e-    = Just (\x -> do e <- ticks x-                     this_mod <- getModule-                     return (Tick (HpcTick this_mod ixT) e))--isTrueLHsExpr (L _ (HsPar e))         = isTrueLHsExpr e-isTrueLHsExpr _                       = Nothing+matchGuards (XStmtLR {} : _) _ _ _ =+  panic "matchGuards XStmtLR"  {- Should {\em fail} if @e@ returns @D@
deSugar/DsListComp.hs view
@@ -9,7 +9,7 @@ {-# LANGUAGE CPP, NamedFieldPuns #-} {-# LANGUAGE TypeFamilies #-} -module DsListComp ( dsListComp, dsPArrComp, dsMonadComp ) where+module DsListComp ( dsListComp, dsMonadComp ) where  #include "HsVersions.h" @@ -82,7 +82,7 @@ -- of that comprehension that we need in the outer comprehension into such an expression -- and the type of the elements that it outputs (tuples of binders) dsInnerListComp :: (ParStmtBlock GhcTc GhcTc) -> DsM (CoreExpr, Type)-dsInnerListComp (ParStmtBlock stmts bndrs _)+dsInnerListComp (ParStmtBlock _ stmts bndrs _)   = do { let bndrs_tuple_type = mkBigCoreVarTupTy bndrs              list_ty          = mkListTy bndrs_tuple_type @@ -90,6 +90,7 @@        ; expr <- dsListComp (stmts ++ [noLoc $ mkLastStmt (mkBigLHsVarTupId bndrs)]) list_ty         ; return (expr, bndrs_tuple_type) }+dsInnerListComp (XParStmtBlock{}) = panic "dsInnerListComp"  -- 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@@ -105,7 +106,8 @@         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 stmts from_bndrs noSyntaxExpr)+    (expr', from_tup_ty) <- dsInnerListComp (ParStmtBlock noExt stmts+                                                        from_bndrs noSyntaxExpr)      -- Work out what arguments should be supplied to that expression: i.e. is an extraction     -- function required? If so, create that desugared function and add to arguments@@ -206,7 +208,7 @@ In the translation below, the ParStmt branch translates each parallel branch into a sub-comprehension, and desugars each independently.  The resulting lists are fed to a zip function, we create a binding for all the variables bound in all-the comprehensions, and then we hand things off the the desugarer for bindings.+the comprehensions, and then we hand things off the desugarer for bindings. The zip function is generated here a) because it's small, and b) because then we don't have to deal with arbitrary limits on the number of zip functions in the prelude, nor which library the zip function came from.@@ -218,20 +220,20 @@  deListComp [] _ = panic "deListComp" -deListComp (LastStmt body _ _ : quals) list+deListComp (LastStmt _ body _ _ : quals) list   =     -- Figure 7.4, SLPJ, p 135, rule C above     ASSERT( null quals )     do { core_body <- dsLExpr body        ; return (mkConsExpr (exprType core_body) core_body list) }          -- Non-last: must be a guard-deListComp (BodyStmt guard _ _ _ : quals) list = do  -- rule B above+deListComp (BodyStmt _ guard _ _ : quals) list = do  -- rule B above     core_guard <- dsLExpr guard     core_rest <- deListComp quals list     return (mkIfThenElse core_guard core_rest list)  -- [e | let B, qs] = let B in [e | qs]-deListComp (LetStmt binds : quals) list = do+deListComp (LetStmt _ binds : quals) list = do     core_rest <- deListComp quals list     dsLocalBinds binds core_rest @@ -239,11 +241,11 @@     (inner_list_expr, pat) <- dsTransStmt stmt     deBindComp pat inner_list_expr quals list -deListComp (BindStmt pat list1 _ _ _ : quals) core_list2 = do -- rule A' above+deListComp (BindStmt _ pat list1 _ _ : quals) core_list2 = do -- rule A' above     core_list1 <- dsLExprNoLP list1     deBindComp pat core_list1 quals core_list2 -deListComp (ParStmt stmtss_w_bndrs _ _ _ : quals) list+deListComp (ParStmt _ stmtss_w_bndrs _ _ : quals) list   = do { exps_and_qual_tys <- mapM dsInnerListComp stmtss_w_bndrs        ; let (exps, qual_tys) = unzip exps_and_qual_tys @@ -253,7 +255,7 @@        ; deBindComp pat (Let (Rec [(zip_fn, zip_rhs)]) (mkApps (Var zip_fn) exps))                     quals list }   where-        bndrs_s = [bs | ParStmtBlock _ bs _ <- stmtss_w_bndrs]+        bndrs_s = [bs | ParStmtBlock _ _ bs _ <- stmtss_w_bndrs]          -- pat is the pattern ((x1,..,xn), (y1,..,ym)) in the example above         pat  = mkBigLHsPatTupId pats@@ -264,6 +266,9 @@ deListComp (ApplicativeStmt {} : _) _ =   panic "deListComp ApplicativeStmt" +deListComp (XStmtLR {} : _) _ =+  panic "deListComp XStmtLR"+ deBindComp :: OutPat GhcTc            -> CoreExpr            -> [ExprStmt GhcTc]@@ -326,18 +331,18 @@  dfListComp _ _ [] = panic "dfListComp" -dfListComp c_id n_id (LastStmt body _ _ : quals)+dfListComp c_id n_id (LastStmt _ body _ _ : quals)   = ASSERT( null quals )     do { core_body <- dsLExprNoLP body        ; return (mkApps (Var c_id) [core_body, Var n_id]) }          -- Non-last: must be a guard-dfListComp c_id n_id (BodyStmt guard _ _ _  : quals) = do+dfListComp c_id n_id (BodyStmt _ guard _ _  : quals) = do     core_guard <- dsLExpr guard     core_rest <- dfListComp c_id n_id quals     return (mkIfThenElse core_guard core_rest (Var n_id)) -dfListComp c_id n_id (LetStmt binds : quals) = do+dfListComp c_id n_id (LetStmt _ binds : quals) = do     -- new in 1.3, local bindings     core_rest <- dfListComp c_id n_id quals     dsLocalBinds binds core_rest@@ -347,7 +352,7 @@     -- Anyway, we bind the newly grouped list via the generic binding function     dfBindComp c_id n_id (pat, inner_list_expr) quals -dfListComp c_id n_id (BindStmt pat list1 _ _ _ : quals) = do+dfListComp c_id n_id (BindStmt _ pat list1 _ _ : quals) = do     -- evaluate the two lists     core_list1 <- dsLExpr list1 @@ -358,6 +363,8 @@ dfListComp _ _ (RecStmt {} : _) = panic "dfListComp RecStmt" dfListComp _ _ (ApplicativeStmt {} : _) =   panic "dfListComp ApplicativeStmt"+dfListComp _ _ (XStmtLR {} : _) =+  panic "dfListComp XStmtLR"  dfBindComp :: Id -> Id             -- 'c' and 'n'            -> (LPat GhcTc, CoreExpr)@@ -469,209 +476,6 @@      mkConcatExpression (list_element_ty, head, tail) = mkConsExpr list_element_ty head tail -{--************************************************************************-*                                                                      *-\subsection[DsPArrComp]{Desugaring of array comprehensions}-*                                                                      *-************************************************************************--}---- entry point for desugaring a parallel array comprehension------   [:e | qss:] = <<[:e | qss:]>> () [:():]----dsPArrComp :: [ExprStmt GhcTc]-            -> DsM CoreExpr---- Special case for parallel comprehension-dsPArrComp (ParStmt qss _ _ _ : quals) = dePArrParComp qss quals---- Special case for simple generators:------  <<[:e' | p <- e, qs:]>> = <<[: e' | qs :]>> p e------ if matching again p cannot fail, or else------  <<[:e' | p <- e, qs:]>> =---    <<[:e' | qs:]>> p (filterP (\x -> case x of {p -> True; _ -> False}) e)----dsPArrComp (BindStmt p e _ _ _ : qs) = do-    filterP <- dsDPHBuiltin filterPVar-    ce <- dsLExprNoLP e-    let ety'ce  = parrElemType ce-        false   = Var falseDataConId-        true    = Var trueDataConId-    v <- newSysLocalDs ety'ce-    pred <- matchSimply (Var v) (StmtCtxt PArrComp) p true false-    let gen | isIrrefutableHsPat p = ce-            | otherwise            = mkApps (Var filterP) [Type ety'ce, mkLams [v] pred, ce]-    dePArrComp qs p gen--dsPArrComp qs = do -- no ParStmt in `qs'-    sglP <- dsDPHBuiltin singletonPVar-    let unitArray = mkApps (Var sglP) [Type unitTy, mkCoreTup []]-    dePArrComp qs (noLoc $ WildPat unitTy) unitArray------ the work horse----dePArrComp :: [ExprStmt GhcTc]-           -> LPat GhcTc        -- the current generator pattern-           -> CoreExpr          -- the current generator expression-           -> DsM CoreExpr--dePArrComp [] _ _ = panic "dePArrComp"-------  <<[:e' | :]>> pa ea = mapP (\pa -> e') ea----dePArrComp (LastStmt e' _ _ : quals) pa cea-  = ASSERT( null quals )-    do { mapP <- dsDPHBuiltin mapPVar-       ; let ty = parrElemType cea-       ; (clam, ty'e') <- deLambda ty pa e'-       ; return $ mkApps (Var mapP) [Type ty, Type ty'e', clam, cea] }------  <<[:e' | b, qs:]>> pa ea = <<[:e' | qs:]>> pa (filterP (\pa -> b) ea)----dePArrComp (BodyStmt b _ _ _ : qs) pa cea = do-    filterP <- dsDPHBuiltin filterPVar-    let ty = parrElemType cea-    (clam,_) <- deLambda ty pa b-    dePArrComp qs pa (mkApps (Var filterP) [Type ty, clam, cea])-------  <<[:e' | p <- e, qs:]>> pa ea =---    let ef = \pa -> e---    in---    <<[:e' | qs:]>> (pa, p) (crossMap ea ef)------ if matching again p cannot fail, or else------  <<[:e' | p <- e, qs:]>> pa ea =---    let ef = \pa -> filterP (\x -> case x of {p -> True; _ -> False}) e---    in---    <<[:e' | qs:]>> (pa, p) (crossMapP ea ef)----dePArrComp (BindStmt p e _ _ _ : qs) pa cea = do-    filterP <- dsDPHBuiltin filterPVar-    crossMapP <- dsDPHBuiltin crossMapPVar-    ce <- dsLExpr e-    let ety'cea = parrElemType cea-        ety'ce  = parrElemType ce-        false   = Var falseDataConId-        true    = Var trueDataConId-    v <- newSysLocalDs ety'ce-    pred <- matchSimply (Var v) (StmtCtxt PArrComp) p true false-    let cef | isIrrefutableHsPat p = ce-            | otherwise            = mkApps (Var filterP) [Type ety'ce, mkLams [v] pred, ce]-    (clam, _) <- mkLambda ety'cea pa cef-    let ety'cef = ety'ce                    -- filter doesn't change the element type-        pa'     = mkLHsPatTup [pa, p]--    dePArrComp qs pa' (mkApps (Var crossMapP)-                                 [Type ety'cea, Type ety'cef, cea, clam])------  <<[:e' | let ds, qs:]>> pa ea =---    <<[:e' | qs:]>> (pa, (x_1, ..., x_n))---                    (mapP (\v@pa -> let ds in (v, (x_1, ..., x_n))) ea)---  where---    {x_1, ..., x_n} = DV (ds)         -- Defined Variables----dePArrComp (LetStmt lds@(L _ ds) : qs) pa cea = do-    mapP <- dsDPHBuiltin mapPVar-    let xs = collectLocalBinders ds-        ty'cea = parrElemType cea-    v <- newSysLocalDs ty'cea-    clet <- dsLocalBinds lds (mkCoreTup (map Var xs))-    let'v <- newSysLocalDs (exprType clet)-    let projBody = mkCoreLet (NonRec let'v clet) $-                   mkCoreTup [Var v, Var let'v]-        errTy    = exprType projBody-        errMsg   = text "DsListComp.dePArrComp: internal error!"-    cerr <- mkErrorAppDs pAT_ERROR_ID errTy errMsg-    ccase <- matchSimply (Var v) (StmtCtxt PArrComp) pa projBody cerr-    let pa'    = mkLHsPatTup [pa, mkLHsPatTup (map nlVarPat xs)]-        proj   = mkLams [v] ccase-    dePArrComp qs pa' (mkApps (Var mapP)-                                   [Type ty'cea, Type errTy, proj, cea])------ The parser guarantees that parallel comprehensions can only appear as--- singleton qualifier lists, which we already special case in the caller.--- So, encountering one here is a bug.----dePArrComp (ParStmt {} : _) _ _ =-  panic "DsListComp.dePArrComp: malformed comprehension AST: ParStmt"-dePArrComp (TransStmt {} : _) _ _ = panic "DsListComp.dePArrComp: TransStmt"-dePArrComp (RecStmt   {} : _) _ _ = panic "DsListComp.dePArrComp: RecStmt"-dePArrComp (ApplicativeStmt   {} : _) _ _ =-  panic "DsListComp.dePArrComp: ApplicativeStmt"----  <<[:e' | qs | qss:]>> pa ea =---    <<[:e' | qss:]>> (pa, (x_1, ..., x_n))---                     (zipP ea <<[:(x_1, ..., x_n) | qs:]>>)---    where---      {x_1, ..., x_n} = DV (qs)----dePArrParComp :: [ParStmtBlock GhcTc GhcTc] -> [ExprStmt GhcTc] -> DsM CoreExpr-dePArrParComp qss quals = do-    (pQss, ceQss) <- deParStmt qss-    dePArrComp quals pQss ceQss-  where-    deParStmt []             =-      -- empty parallel statement lists have no source representation-      panic "DsListComp.dePArrComp: Empty parallel list comprehension"-    deParStmt (ParStmtBlock qs xs _:qss) = do        -- first statement-      let res_expr = mkLHsVarTuple xs-      cqs <- dsPArrComp (map unLoc qs ++ [mkLastStmt res_expr])-      parStmts qss (mkLHsVarPatTup xs) cqs-    ----    parStmts []             pa cea = return (pa, cea)-    parStmts (ParStmtBlock qs xs _:qss) pa cea = do  -- subsequent statements (zip'ed)-      zipP <- dsDPHBuiltin zipPVar-      let pa'      = mkLHsPatTup [pa, mkLHsVarPatTup xs]-          ty'cea   = parrElemType cea-          res_expr = mkLHsVarTuple xs-      cqs <- dsPArrComp (map unLoc qs ++ [mkLastStmt res_expr])-      let ty'cqs = parrElemType cqs-          cea'   = mkApps (Var zipP) [Type ty'cea, Type ty'cqs, cea, cqs]-      parStmts qss pa' cea'---- generate Core corresponding to `\p -> e'----deLambda :: Type                       -- type of the argument (not levity-polymorphic)-         -> LPat GhcTc                 -- argument pattern-         -> LHsExpr GhcTc              -- body-         -> DsM (CoreExpr, Type)-deLambda ty p e =-    mkLambda ty p =<< dsLExpr e---- generate Core for a lambda pattern match, where the body is already in Core----mkLambda :: Type                        -- type of the argument (not levity-polymorphic)-         -> LPat GhcTc                  -- argument pattern-         -> CoreExpr                    -- desugared body-         -> DsM (CoreExpr, Type)-mkLambda ty p ce = do-    v <- newSysLocalDs ty-    let errMsg = text "DsListComp.deLambda: internal error!"-        ce'ty  = exprType ce-    cerr <- mkErrorAppDs pAT_ERROR_ID ce'ty errMsg-    res <- matchSimply (Var v) (StmtCtxt PArrComp) p ce cerr-    return (mkLams [v] res, ce'ty)---- obtain the element type of the parallel array produced by the given Core--- expression----parrElemType   :: CoreExpr -> Type-parrElemType e  =-  case splitTyConApp_maybe (exprType e) of-    Just (tycon, [ty]) | tycon == parrTyCon -> ty-    _                                                     -> panic-      "DsListComp.parrElemType: not a parallel array type"- -- Translation for monad comprehensions  -- Entry point for monad comprehension desugaring@@ -685,18 +489,18 @@ --------------- dsMcStmt :: ExprStmt GhcTc -> [ExprLStmt GhcTc] -> DsM CoreExpr -dsMcStmt (LastStmt body _ ret_op) stmts+dsMcStmt (LastStmt _ body _ ret_op) stmts   = ASSERT( null stmts )     do { body' <- dsLExpr body        ; dsSyntaxExpr ret_op [body'] }  --   [ .. | let binds, stmts ]-dsMcStmt (LetStmt binds) stmts+dsMcStmt (LetStmt _ binds) stmts   = do { rest <- dsMcStmts stmts        ; dsLocalBinds binds rest }  --   [ .. | a <- m, stmts ]-dsMcStmt (BindStmt pat rhs bind_op fail_op bind_ty) stmts+dsMcStmt (BindStmt bind_ty pat rhs bind_op fail_op) stmts   = do { rhs' <- dsLExpr rhs        ; dsMcBindStmt pat rhs' bind_op fail_op bind_ty stmts } @@ -704,7 +508,7 @@ -- --   [ .. | exp, stmts ] ---dsMcStmt (BodyStmt exp then_exp guard_exp _) stmts+dsMcStmt (BodyStmt _ exp then_exp guard_exp) stmts   = do { exp'       <- dsLExpr exp        ; rest       <- dsMcStmts stmts        ; guard_exp' <- dsSyntaxExpr guard_exp [exp']@@ -727,7 +531,7 @@ dsMcStmt (TransStmt { trS_stmts = stmts, trS_bndrs = bndrs                     , trS_by = by, trS_using = using                     , trS_ret = return_op, trS_bind = bind_op-                    , trS_bind_arg_ty = n_tup_ty'  -- n (a,b,c)+                    , trS_ext = n_tup_ty'  -- n (a,b,c)                     , trS_fmap = fmap_op, trS_form = form }) stmts_rest   = do { let (from_bndrs, to_bndrs) = unzip bndrs @@ -772,12 +576,12 @@ --   mzip :: forall a b. m a -> m b -> m (a,b) -- NB: we need a polymorphic mzip because we call it several times -dsMcStmt (ParStmt blocks mzip_op bind_op bind_ty) stmts_rest+dsMcStmt (ParStmt bind_ty blocks mzip_op bind_op) stmts_rest  = do  { exps_w_tys  <- mapM ds_inner blocks   -- Pairs (exp :: m ty, ty)        ; mzip_op'    <- dsExpr mzip_op         ; let -- The pattern variables-             pats = [ mkBigLHsVarPatTupId bs | ParStmtBlock _ bs _ <- blocks]+             pats = [ mkBigLHsVarPatTupId bs | ParStmtBlock _ _ bs _ <- blocks]              -- Pattern with tuples of variables              -- [v1,v2,v3]  =>  (v1, (v2, v3))              pat = foldr1 (\p1 p2 -> mkLHsPatTup [p1, p2]) pats@@ -788,9 +592,10 @@         ; dsMcBindStmt pat rhs bind_op noSyntaxExpr bind_ty stmts_rest }   where-    ds_inner (ParStmtBlock stmts bndrs return_op)+    ds_inner (ParStmtBlock _ stmts bndrs return_op)        = do { exp <- dsInnerMonadComp stmts bndrs return_op             ; return (exp, mkBigCoreVarTupTy bndrs) }+    ds_inner (XParStmtBlock{}) = panic "dsMcStmt"  dsMcStmt stmt _ = pprPanic "dsMcStmt: unexpected stmt" (ppr stmt) @@ -816,7 +621,7 @@ dsMcBindStmt pat rhs' bind_op fail_op res1_ty stmts   = do  { body     <- dsMcStmts stmts         ; var      <- selectSimpleMatchVarL pat-        ; match <- matchSinglePat (Var var) (StmtCtxt DoExpr) pat+        ; match <- matchSinglePatVar var (StmtCtxt DoExpr) pat                                   res1_ty (cantFailMatchResult body)         ; match_code <- handle_failure pat match fail_op         ; dsSyntaxExpr bind_op [rhs', Lam var match_code] }@@ -848,7 +653,8 @@                  -> SyntaxExpr GhcTc   -- The monomorphic "return" operator                  -> DsM CoreExpr dsInnerMonadComp stmts bndrs ret_op-  = dsMcStmts (stmts ++ [noLoc (LastStmt (mkBigLHsVarTupId bndrs) False ret_op)])+  = dsMcStmts (stmts +++                 [noLoc (LastStmt noExt (mkBigLHsVarTupId bndrs) False ret_op)])   -- The `unzip` function for `GroupStmt` in a monad comprehensions
deSugar/DsMeta.hs view
@@ -77,13 +77,14 @@   where     new_bit = mkNameEnv [(n, DsSplice (unLoc e)) | PendingTcSplice n e <- splices] -    do_brack (VarBr _ n) = do { MkC e1  <- lookupOcc n ; return e1 }-    do_brack (ExpBr e)   = do { MkC e1  <- repLE e     ; return e1 }-    do_brack (PatBr p)   = do { MkC p1  <- repTopP p   ; return p1 }-    do_brack (TypBr t)   = do { MkC t1  <- repLTy t    ; return t1 }-    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 (VarBr _ _ n) = do { MkC e1  <- lookupOcc n ; return e1 }+    do_brack (ExpBr _ e)   = do { MkC e1  <- repLE e     ; return e1 }+    do_brack (PatBr _ p)   = do { MkC p1  <- repTopP p   ; return p1 }+    do_brack (TypBr _ t)   = do { MkC t1  <- repLTy t    ; return t1 }+    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"  {- -------------- Examples -------------------- @@ -120,7 +121,6 @@                         , hs_warnds  = warnds                         , hs_annds   = annds                         , hs_ruleds  = ruleds-                        , hs_vects   = vects                         , hs_docs    = docs })  = do { let { bndrs  = hsSigTvBinders valds                        ++ hsGroupBinders group@@ -150,7 +150,6 @@                      ; ann_ds   <- mapM repAnnD annds                      ; rule_ds  <- mapM repRuleD (concatMap (rds_rules . unLoc)                                                             ruleds)-                     ; _        <- mapM no_vect vects                      ; _        <- mapM no_doc docs                          -- more needed@@ -173,34 +172,45 @@       = notHandledL loc "Splices within declaration brackets" empty     no_default_decl (L loc decl)       = notHandledL loc "Default declarations" (ppr decl)-    no_warn (L loc (Warning thing _))+    no_warn (L loc (Warning _ thing _))       = notHandledL loc "WARNING and DEPRECATION pragmas" $                     text "Pragma for declaration of" <+> ppr thing-    no_vect (L loc decl)-      = notHandledL loc "Vectorisation pragmas" (ppr decl)+    no_warn (L _ (XWarnDecl _)) = panic "repTopDs"     no_doc (L loc _)       = notHandledL loc "Haddock documentation" empty+repTopDs (XHsGroup _) = panic "repTopDs"  hsSigTvBinders :: HsValBinds GhcRn -> [Name] -- See Note [Scoped type variables in bindings] hsSigTvBinders binds   = concatMap get_scoped_tvs sigs   where-    get_scoped_tvs :: LSig GhcRn -> [Name]-    -- Both implicit and explicit quantified variables-    -- We need the implicit ones for   f :: forall (a::k). blah-    --    here 'k' scopes too-    get_scoped_tvs (L _ (TypeSig _ sig))-       | HsIB { hsib_vars = implicit_vars-              , hsib_body = hs_ty } <- hswc_body sig-       , (explicit_vars, _) <- splitLHsForAllTy hs_ty-       = implicit_vars ++ map hsLTyVarName explicit_vars-    get_scoped_tvs _ = []-     sigs = case binds of-             ValBindsIn  _ sigs -> sigs-             ValBindsOut _ sigs -> sigs+             ValBinds           _ _ sigs  -> sigs+             XValBindsLR (NValBinds _ sigs) -> sigs +get_scoped_tvs :: LSig GhcRn -> [Name]+get_scoped_tvs (L _ signature)+  | TypeSig _ _ sig <- signature+  = get_scoped_tvs_from_sig (hswc_body sig)+  | ClassOpSig _ _ _ sig <- signature+  = get_scoped_tvs_from_sig sig+  | PatSynSig _ _ sig <- signature+  = get_scoped_tvs_from_sig sig+  | otherwise+  = []+  where+    get_scoped_tvs_from_sig sig+      -- Both implicit and explicit quantified variables+      -- We need the implicit ones for   f :: forall (a::k). blah+      --    here 'k' scopes too+      | HsIB { hsib_ext = HsIBRn { hsib_vars = 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"+ {- Notes  Note [Scoped type variables in bindings]@@ -218,6 +228,31 @@  The relevant places are signposted with references to this Note +Note [Scoped type variables in class and instance declarations]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Scoped type variables may occur in default methods and default+signatures. We need to bring the type variables in 'foralls'+into the scope of the method bindings.++Consider+   class Foo a where+     foo :: forall (b :: k). a -> Proxy b -> Proxy b+     foo _ x = (x :: Proxy b)++We want to ensure that the 'b' in the type signature and the default+implementation are the same, so we do the following:++  a) Before desugaring the signature and binding of 'foo', use+     get_scoped_tvs to collect type variables in 'forall' and+     create symbols for them.+  b) Use 'addBinds' to bring these symbols into the scope of the type+     signatures and bindings.+  c) Use these symbols to generate Core for the class/instance declaration.++Note that when desugaring the signatures, we lookup the type variables+from the scope rather than recreate symbols for them. See more details+in "rep_ty_sig" and in Trac#14885.+ Note [Binders and occurrences] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we desugar [d| data T = MkT |]@@ -253,10 +288,8 @@   idProxy :: forall k proxy (b :: k). proxy b -> proxy b   idProxy x = x -Notice that we explicitly quantified the variable `k`! This is quite bad, as the-latter declaration requires -XTypeInType, while the former does not. Not to-mention that the latter declaration isn't even what the user wrote in the-first place.+Notice that we explicitly quantified the variable `k`! The latter declaration+isn't what the user wrote in the first place.  Usually, the culprit behind these bugs is taking implicitly quantified type variables (often from the hsib_vars field of HsImplicitBinders) and putting@@ -288,25 +321,28 @@   = do { cls1 <- lookupLOcc cls         -- See note [Binders and occurrences]        ; dec  <- addTyVarBinds tvs $ \bndrs ->            do { cxt1   <- repLContext cxt-              ; sigs1  <- rep_sigs sigs-              ; binds1 <- rep_binds meth_binds+              -- See Note [Scoped type variables in class and instance declarations]+              ; (ss, sigs_binds) <- rep_sigs_binds sigs meth_binds               ; fds1   <- repLFunDeps fds               ; ats1   <- repFamilyDecls ats               ; atds1  <- repAssocTyFamDefaults atds-              ; decls1 <- coreList decQTyConName (ats1 ++ atds1 ++ sigs1 ++ binds1)-              ; repClass cxt1 cls1 bndrs fds1 decls1-              }+              ; decls1 <- coreList decQTyConName (ats1 ++ atds1 ++ sigs_binds)+              ; decls2 <- repClass cxt1 cls1 bndrs fds1 decls1+              ; wrapGenSyms ss decls2 }        ; return $ Just (loc, dec)        } +repTyClD (L _ (XTyClDecl _)) = panic "repTyClD"+ ------------------------- repRoleD :: LRoleAnnotDecl GhcRn -> DsM (SrcSpan, Core TH.DecQ)-repRoleD (L loc (RoleAnnotDecl tycon roles))+repRoleD (L loc (RoleAnnotDecl _ tycon roles))   = do { tycon1 <- lookupLOcc tycon        ; roles1 <- mapM repRole roles        ; roles2 <- coreList roleTyConName roles1        ; dec <- repRoleAnnotD tycon1 roles2        ; return (loc, dec) }+repRoleD (L _ (XRoleAnnotDecl _)) = panic "repRoleD"  ------------------------- repDataDefn :: Core TH.Name -> Core [TH.TyVarBndrQ]@@ -332,6 +368,7 @@                                ; repData cxt1 tc bndrs opt_tys ksig' cons1                                          derivs1 }        }+repDataDefn _ _ _ (XHsDataDefn _) = panic "repDataDefn"  repSynDecl :: Core TH.Name -> Core [TH.TyVarBndrQ]            -> LHsType GhcRn@@ -348,11 +385,13 @@                                         fdInjectivityAnn = injectivity }))   = do { tc1 <- lookupLOcc tc           -- See note [Binders and occurrences]        ; let mkHsQTvs :: [LHsTyVarBndr GhcRn] -> LHsQTyVars GhcRn-             mkHsQTvs tvs = HsQTvs { hsq_implicit = [], hsq_explicit = tvs-                                   , hsq_dependent = emptyNameSet }+             mkHsQTvs tvs = HsQTvs { hsq_ext = HsQTvsRn+                                                { hsq_implicit = []+                                                , hsq_dependent = emptyNameSet }+                                   , hsq_explicit = tvs }              resTyVar = case resultSig of-                     TyVarSig bndr -> mkHsQTvs [bndr]-                     _             -> mkHsQTvs []+                     TyVarSig _ bndr -> mkHsQTvs [bndr]+                     _               -> mkHsQTvs []        ; dec <- addTyClTyVarBinds tvs $ \bndrs ->                 addTyClTyVarBinds resTyVar $ \_ ->            case info of@@ -373,23 +412,25 @@                   ; repDataFamilyD tc1 bndrs kind }        ; return (loc, dec)        }+repFamilyDecl (L _ (XFamilyDecl _)) = panic "repFamilyDecl"  -- | Represent result signature of a type family repFamilyResultSig :: FamilyResultSig GhcRn -> DsM (Core TH.FamilyResultSigQ)-repFamilyResultSig  NoSig          = repNoSig-repFamilyResultSig (KindSig ki)    = do { ki' <- repLTy ki-                                        ; repKindSig ki' }-repFamilyResultSig (TyVarSig bndr) = do { bndr' <- repTyVarBndr bndr-                                        ; repTyVarSig bndr' }+repFamilyResultSig (NoSig _)         = repNoSig+repFamilyResultSig (KindSig _ ki)    = do { ki' <- repLTy ki+                                          ; repKindSig ki' }+repFamilyResultSig (TyVarSig _ bndr) = do { bndr' <- repTyVarBndr bndr+                                          ; repTyVarSig bndr' }+repFamilyResultSig (XFamilyResultSig _) = panic "repFamilyResultSig"  -- | 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 -- result variable. repFamilyResultSigToMaybeKind :: FamilyResultSig GhcRn                               -> DsM (Core (Maybe TH.KindQ))-repFamilyResultSigToMaybeKind NoSig =+repFamilyResultSigToMaybeKind (NoSig _) =     do { coreNothing kindQTyConName }-repFamilyResultSigToMaybeKind (KindSig ki) =+repFamilyResultSigToMaybeKind (KindSig _ ki) =     do { ki' <- repLTy ki        ; coreJust kindQTyConName ki' } repFamilyResultSigToMaybeKind _ = panic "repFamilyResultSigToMaybeKind"@@ -424,6 +465,7 @@            ; rhs1 <- repLTy rhs            ; eqn1 <- repTySynEqn tys2 rhs1            ; repTySynInst tc1 eqn1 }+    rep_deflt (L _ (XFamEqn _)) = panic "repAssocTyFamDefaults"  ------------------------- -- represent fundeps@@ -449,10 +491,11 @@ repInstD (L loc (ClsInstD { cid_inst = cls_decl }))   = do { dec <- repClsInstD cls_decl        ; return (loc, dec) }+repInstD (L _ (XInstDecl _)) = panic "repInstD"  repClsInstD :: ClsInstDecl GhcRn -> DsM (Core TH.DecQ) repClsInstD (ClsInstDecl { cid_poly_ty = ty, cid_binds = binds-                         , cid_sigs = prags, cid_tyfam_insts = ats+                         , cid_sigs = sigs, cid_tyfam_insts = ats                          , cid_datafam_insts = adts                          , cid_overlap_mode = overlap                          })@@ -466,17 +509,19 @@             -- For example, the method names should be bound to             -- the selector Ids, not to fresh names (Trac #5410)             ---            do { cxt1 <- repLContext cxt+            do { cxt1     <- repLContext cxt                ; inst_ty1 <- repLTy inst_ty-               ; binds1 <- rep_binds binds-               ; prags1 <- rep_sigs prags-               ; ats1 <- mapM (repTyFamInstD . unLoc) ats-               ; adts1 <- mapM (repDataFamInstD . unLoc) adts-               ; decls <- coreList decQTyConName (ats1 ++ adts1 ++ binds1 ++ prags1)-               ; rOver <- repOverlap (fmap unLoc overlap)-               ; repInst rOver cxt1 inst_ty1 decls }+               -- See Note [Scoped type variables in class and instance declarations]+               ; (ss, sigs_binds) <- rep_sigs_binds sigs binds+               ; ats1   <- mapM (repTyFamInstD . unLoc) ats+               ; adts1  <- mapM (repDataFamInstD . unLoc) adts+               ; decls1 <- coreList decQTyConName (ats1 ++ adts1 ++ sigs_binds)+               ; rOver  <- repOverlap (fmap unLoc overlap)+               ; decls2 <- repInst rOver cxt1 inst_ty1 decls1+               ; wrapGenSyms ss decls2 }  where    (tvs, cxt, inst_ty) = splitLHsInstDeclTy ty+repClsInstD (XClsInstDecl _) = panic "repClsInstD"  repStandaloneDerivD :: LDerivDecl GhcRn -> DsM (SrcSpan, Core TH.DecQ) repStandaloneDerivD (L loc (DerivDecl { deriv_strategy = strat@@ -488,7 +533,8 @@                    ; repDeriv strat' cxt' inst_ty' }        ; return (loc, dec) }   where-    (tvs, cxt, inst_ty) = splitLHsInstDeclTy ty+    (tvs, cxt, inst_ty) = splitLHsInstDeclTy (dropWildCards ty)+repStandaloneDerivD (L _ (XDerivDecl _)) = panic "repStandaloneDerivD"  repTyFamInstD :: TyFamInstDecl GhcRn -> DsM (Core TH.DecQ) repTyFamInstD decl@(TyFamInstDecl { tfid_eqn = eqn })@@ -498,31 +544,39 @@        ; repTySynInst tc eqn1 }  repTyFamEqn :: TyFamInstEqn GhcRn -> DsM (Core TH.TySynEqnQ)-repTyFamEqn (HsIB { hsib_vars = var_names+repTyFamEqn (HsIB { hsib_ext = HsIBRn { hsib_vars = var_names }                   , hsib_body = FamEqn { feqn_pats = tys                                        , feqn_rhs  = rhs }})-  = do { let hs_tvs = HsQTvs { hsq_implicit = var_names-                             , hsq_explicit = []-                             , hsq_dependent = emptyNameSet }   -- Yuk+  = do { let hs_tvs = HsQTvs { hsq_ext = HsQTvsRn+                               { hsq_implicit = var_names+                               , hsq_dependent = emptyNameSet }   -- Yuk+                             , hsq_explicit = [] }        ; addTyClTyVarBinds hs_tvs $ \ _ ->          do { tys1 <- repLTys tys             ; tys2 <- coreList typeQTyConName tys1             ; rhs1 <- repLTy rhs             ; repTySynEqn tys2 rhs1 } }+repTyFamEqn (XHsImplicitBndrs _) = panic "repTyFamEqn"+repTyFamEqn (HsIB _ (XFamEqn _)) = panic "repTyFamEqn"  repDataFamInstD :: DataFamInstDecl GhcRn -> DsM (Core TH.DecQ) repDataFamInstD (DataFamInstDecl { dfid_eqn =-                  (HsIB { hsib_vars = var_names+                  (HsIB { hsib_ext = HsIBRn { hsib_vars = var_names }                         , hsib_body = FamEqn { feqn_tycon = tc_name                                              , feqn_pats  = tys                                              , feqn_rhs   = defn }})})   = do { tc <- lookupLOcc tc_name               -- See note [Binders and occurrences]-       ; let hs_tvs = HsQTvs { hsq_implicit = var_names-                             , hsq_explicit = []-                             , hsq_dependent = emptyNameSet }   -- Yuk+       ; let hs_tvs = HsQTvs { hsq_ext = HsQTvsRn+                                 { hsq_implicit = var_names+                                 , hsq_dependent = emptyNameSet }   -- Yuk+                             , hsq_explicit = [] }        ; addTyClTyVarBinds hs_tvs $ \ bndrs ->          do { tys1 <- repList typeQTyConName repLTy tys             ; repDataDefn tc bndrs (Just tys1) defn } }+repDataFamInstD (DataFamInstDecl (XHsImplicitBndrs _))+  = panic "repDataFamInstD"+repDataFamInstD (DataFamInstDecl (HsIB _ (XFamEqn _)))+  = panic "repDataFamInstD"  repForD :: Located (ForeignDecl GhcRn) -> DsM (SrcSpan, Core TH.DecQ) repForD (L loc (ForeignImport { fd_name = name, fd_sig_ty = typ@@ -566,7 +620,7 @@ repSafety PlaySafe = rep2 safeName []  repFixD :: LFixitySig GhcRn -> DsM [(SrcSpan, Core TH.DecQ)]-repFixD (L loc (FixitySig names (Fixity _ prec dir)))+repFixD (L loc (FixitySig _ names (Fixity _ prec dir)))   = do { MkC prec' <- coreIntLit prec        ; let rep_fn = case dir of                         InfixL -> infixLDName@@ -577,9 +631,10 @@                    ; dec <- rep2 rep_fn [prec', name']                    ; return (loc,dec) }        ; mapM do_one names }+repFixD (L _ (XFixitySig _)) = panic "repFixD"  repRuleD :: LRuleDecl GhcRn -> DsM (SrcSpan, Core TH.DecQ)-repRuleD (L loc (HsRule n act bndrs lhs _ rhs _))+repRuleD (L loc (HsRule _ n act bndrs lhs rhs))   = do { let bndr_names = concatMap ruleBndrNames bndrs        ; ss <- mkGenSyms bndr_names        ; rule1 <- addBinds ss $@@ -591,28 +646,36 @@                      ; repPragRule n' bndrs' lhs' rhs' act' }        ; rule2 <- wrapGenSyms ss rule1        ; return (loc, rule2) }+repRuleD (L _ (XRuleDecl _)) = panic "repRuleD"  ruleBndrNames :: LRuleBndr GhcRn -> [Name]-ruleBndrNames (L _ (RuleBndr n))      = [unLoc n]-ruleBndrNames (L _ (RuleBndrSig n sig))-  | HsWC { hswc_body = HsIB { hsib_vars = vars }} <- sig+ruleBndrNames (L _ (RuleBndr _ n))      = [unLoc n]+ruleBndrNames (L _ (RuleBndrSig _ n sig))+  | HsWC { hswc_body = HsIB { hsib_ext = HsIBRn { hsib_vars = vars } }} <- sig   = unLoc n : vars+ruleBndrNames (L _ (RuleBndrSig _ _ (HsWC _ (XHsImplicitBndrs _))))+  = panic "ruleBndrNames"+ruleBndrNames (L _ (RuleBndrSig _ _ (XHsWildCardBndrs _)))+  = panic "ruleBndrNames"+ruleBndrNames (L _ (XRuleBndr _)) = panic "ruleBndrNames"  repRuleBndr :: LRuleBndr GhcRn -> DsM (Core TH.RuleBndrQ)-repRuleBndr (L _ (RuleBndr n))+repRuleBndr (L _ (RuleBndr _ n))   = do { MkC n' <- lookupLBinder n        ; rep2 ruleVarName [n'] }-repRuleBndr (L _ (RuleBndrSig n sig))+repRuleBndr (L _ (RuleBndrSig _ n sig))   = do { MkC n'  <- lookupLBinder n        ; MkC ty' <- repLTy (hsSigWcType sig)        ; rep2 typedRuleVarName [n', ty'] }+repRuleBndr (L _ (XRuleBndr _)) = panic "repRuleBndr"  repAnnD :: LAnnDecl GhcRn -> DsM (SrcSpan, Core TH.DecQ)-repAnnD (L loc (HsAnnotation _ ann_prov (L _ exp)))+repAnnD (L loc (HsAnnotation _ _ ann_prov (L _ exp)))   = do { target <- repAnnProv ann_prov        ; exp'   <- repE exp        ; dec    <- repPragAnn target exp'        ; return (loc, dec) }+repAnnD (L _ (XAnnDecl _)) = panic "repAnnD"  repAnnProv :: AnnProvenance Name -> DsM (Core TH.AnnTarget) repAnnProv (ValueAnnProvenance (L _ n))@@ -630,52 +693,49 @@  repC :: LConDecl GhcRn -> DsM (Core TH.ConQ) repC (L _ (ConDeclH98 { con_name = con-                      , con_qvars = Nothing, con_cxt = Nothing-                      , con_details = details }))-  = repDataCon con details+                      , con_forall = L _ False+                      , con_mb_cxt = Nothing+                      , con_args = args }))+  = repDataCon con args  repC (L _ (ConDeclH98 { con_name = con-                      , con_qvars = mcon_tvs, con_cxt = mcxt-                      , con_details = details }))-  = do { let con_tvs = fromMaybe emptyLHsQTvs mcon_tvs-             ctxt    = unLoc $ fromMaybe (noLoc []) mcxt-       ; addTyVarBinds con_tvs $ \ ex_bndrs ->-         do { c'    <- repDataCon con details-            ; ctxt' <- repContext ctxt-            ; if isEmptyLHsQTvs con_tvs && null ctxt+                      , con_forall = L _ is_existential+                      , con_ex_tvs = con_tvs+                      , con_mb_cxt = mcxt+                      , con_args = args }))+  = do { addHsTyVarBinds con_tvs $ \ ex_bndrs ->+         do { c'    <- repDataCon con args+            ; ctxt' <- repMbContext mcxt+            ; if not is_existential && isNothing mcxt               then return c'               else rep2 forallCName ([unC ex_bndrs, unC ctxt', unC c'])             }        }  repC (L _ (ConDeclGADT { con_names = cons-                       , con_type = res_ty@(HsIB { hsib_vars = imp_tvs })}))-  | (details, res_ty', L _ [] , []) <- gadtDetails-  , [] <- imp_tvs-    -- no implicit or explicit variables, no context = no need for a forall-  = do { let doc = text "In the constructor for " <+> ppr (head cons)-       ; (hs_details, gadt_res_ty) <--           updateGadtResult failWithDs doc details res_ty'-       ; repGadtDataCons cons hs_details gadt_res_ty }+                       , con_qvars = qtvs, con_mb_cxt = mcxt+                       , con_args = args, con_res_ty = res_ty }))+  | isEmptyLHsQTvs qtvs  -- No implicit or explicit variables+  , Nothing <- mcxt      -- No context+                         -- ==> no need for a forall+  = repGadtDataCons cons args res_ty -  | (details,res_ty',ctxt, exp_tvs) <- gadtDetails-  = do { let doc = text "In the constructor for " <+> ppr (head cons)-             con_tvs = HsQTvs { hsq_implicit  = imp_tvs-                              , hsq_explicit  = exp_tvs-                              , hsq_dependent = emptyNameSet }-             -- NB: Don't put imp_tvs into the hsq_explicit field above+  | otherwise+  = addTyVarBinds qtvs $ \ ex_bndrs ->              -- See Note [Don't quantify implicit type variables in quotes]-       ; addTyVarBinds con_tvs $ \ ex_bndrs -> do-       { (hs_details, gadt_res_ty) <--           updateGadtResult failWithDs doc details res_ty'-       ; c'    <- repGadtDataCons cons hs_details gadt_res_ty-       ; ctxt' <- repContext (unLoc ctxt)-       ; if null exp_tvs && null (unLoc ctxt)+    do { c'    <- repGadtDataCons cons args res_ty+       ; ctxt' <- repMbContext mcxt+       ; if null (hsQTvExplicit qtvs) && isNothing mcxt          then return c'-         else rep2 forallCName ([unC ex_bndrs, unC ctxt', unC c']) } }-  where-     gadtDetails = gadtDeclDetails res_ty+         else rep2 forallCName ([unC ex_bndrs, unC ctxt', unC c']) } +repC (L _ (XConDecl _)) = panic "repC"+++repMbContext :: Maybe (LHsContext GhcRn) -> DsM (Core TH.CxtQ)+repMbContext Nothing          = repContext []+repMbContext (Just (L _ cxt)) = repContext cxt+ repSrcUnpackedness :: SrcUnpackedness -> DsM (Core TH.SourceUnpackednessQ) repSrcUnpackedness SrcUnpack   = rep2 sourceUnpackName         [] repSrcUnpackedness SrcNoUnpack = rep2 sourceNoUnpackName       []@@ -695,7 +755,7 @@   rep2 bangTypeName [b, t]   where     (su', ss', ty') = case ty of-            L _ (HsBangTy (HsSrcBang _ su ss) ty) -> (su, ss, ty)+            L _ (HsBangTy _ (HsSrcBang _ su ss) ty) -> (su, ss, ty)             _ -> (NoSrcUnpack, NoSrcStrict, ty)  -------------------------------------------------------@@ -715,77 +775,109 @@   where     rep_deriv_ty :: LHsType GhcRn -> DsM (Core TH.TypeQ)     rep_deriv_ty (L _ ty) = repTy ty+repDerivClause (L _ (XHsDerivingClause _)) = panic "repDerivClause" +rep_sigs_binds :: [LSig GhcRn] -> LHsBinds GhcRn+               -> DsM ([GenSymBind], [Core TH.DecQ])+-- Represent signatures and methods in class/instance declarations.+-- See Note [Scoped type variables in class and instance declarations]+--+-- Why not use 'repBinds': we have already created symbols for methods in+-- 'repTopDs' via 'hsGroupBinders'. However in 'repBinds', we recreate+-- these fun_id via 'collectHsValBinders decs', which would lead to the+-- instance declarations failing in TH.+rep_sigs_binds sigs binds+  = do { let tvs = concatMap get_scoped_tvs sigs+       ; ss <- mkGenSyms tvs+       ; sigs1 <- addBinds ss $ rep_sigs sigs+       ; binds1 <- addBinds ss $ rep_binds binds+       ; return (ss, de_loc (sort_by_loc (sigs1 ++ binds1))) }+ ------------------------------------------------------- --   Signatures in a class decl, or a group of bindings ------------------------------------------------------- -rep_sigs :: [LSig GhcRn] -> DsM [Core TH.DecQ]-rep_sigs sigs = do locs_cores <- rep_sigs' sigs-                   return $ de_loc $ sort_by_loc locs_cores--rep_sigs' :: [LSig GhcRn] -> DsM [(SrcSpan, Core TH.DecQ)]+rep_sigs :: [LSig GhcRn] -> DsM [(SrcSpan, Core TH.DecQ)]         -- We silently ignore ones we don't recognise-rep_sigs' = concatMapM rep_sig+rep_sigs = concatMapM rep_sig  rep_sig :: LSig GhcRn -> DsM [(SrcSpan, Core TH.DecQ)]-rep_sig (L loc (TypeSig nms ty))      = mapM (rep_wc_ty_sig sigDName loc ty) nms-rep_sig (L loc (PatSynSig nms ty))    = mapM (rep_patsyn_ty_sig loc ty) nms-rep_sig (L loc (ClassOpSig is_deflt nms ty))+rep_sig (L loc (TypeSig _ nms ty))    = mapM (rep_wc_ty_sig sigDName loc ty) nms+rep_sig (L loc (PatSynSig _ nms ty))  = mapM (rep_patsyn_ty_sig loc ty) nms+rep_sig (L loc (ClassOpSig _ is_deflt nms ty))   | is_deflt                          = mapM (rep_ty_sig defaultSigDName loc ty) nms   | otherwise                         = mapM (rep_ty_sig sigDName loc ty) nms rep_sig d@(L _ (IdSig {}))            = pprPanic "rep_sig IdSig" (ppr d) rep_sig (L _   (FixSig {}))           = return [] -- fixity sigs at top level-rep_sig (L loc (InlineSig nm ispec))  = rep_inline nm ispec loc-rep_sig (L loc (SpecSig nm tys ispec))+rep_sig (L loc (InlineSig _ nm ispec))= rep_inline nm ispec loc+rep_sig (L loc (SpecSig _ nm tys ispec))   = concatMapM (\t -> rep_specialise nm t ispec loc) tys-rep_sig (L loc (SpecInstSig _ ty))    = rep_specialiseInst ty loc+rep_sig (L loc (SpecInstSig _ _ ty))  = rep_specialiseInst ty loc rep_sig (L _   (MinimalSig {}))       = notHandled "MINIMAL pragmas" empty rep_sig (L _   (SCCFunSig {}))        = notHandled "SCC pragmas" empty-rep_sig (L loc (CompleteMatchSig _st cls mty)) = rep_complete_sig cls mty loc-+rep_sig (L loc (CompleteMatchSig _ _st cls mty)) = rep_complete_sig cls mty loc+rep_sig (L _ (XSig _)) = panic "rep_sig"  rep_ty_sig :: Name -> SrcSpan -> LHsSigType GhcRn -> Located Name            -> DsM (SrcSpan, Core TH.DecQ)+-- Don't create the implicit and explicit variables when desugaring signatures,+-- see Note [Scoped type variables in class and instance declarations].+-- 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   = do { nm1 <- lookupLOcc nm-       ; ty1 <- repHsSigType sig_ty-       ; sig <- repProto mk_sig nm1 ty1+       ; let rep_in_scope_tv tv = do { name <- lookupBinder (hsLTyVarName tv)+                                     ; repTyVarBndrWithKind tv name }+       ; th_explicit_tvs <- repList tyVarBndrQTyConName rep_in_scope_tv+                                    explicit_tvs++         -- NB: Don't pass any implicit type variables to repList above+         -- See Note [Don't quantify implicit type variables in quotes]++       ; th_ctxt <- repLContext ctxt+       ; th_ty   <- repLTy ty+       ; ty1     <- if null explicit_tvs && null (unLoc ctxt)+                       then return th_ty+                       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_patsyn_ty_sig :: SrcSpan -> LHsSigType GhcRn -> Located Name                   -> DsM (SrcSpan, Core TH.DecQ) -- represents a pattern synonym type signature; -- see Note [Pattern synonym type signatures and Template Haskell] in Convert+--+-- Don't create the implicit and explicit variables when desugaring signatures,+-- see Note [Scoped type variables in class and instance declarations]+-- and Note [Don't quantify implicit type variables in quotes] rep_patsyn_ty_sig loc sig_ty nm-  = do { nm1 <- lookupLOcc nm-       ; ty1 <- repHsPatSynSigType sig_ty-       ; sig <- repProto patSynSigDName nm1 ty1-       ; return (loc, sig) }--rep_wc_ty_sig :: Name -> SrcSpan -> LHsSigWcType GhcRn -> Located Name-              -> DsM (SrcSpan, Core TH.DecQ)-    -- We must special-case the top-level explicit for-all of a TypeSig-    -- See Note [Scoped type variables in bindings]-rep_wc_ty_sig mk_sig loc sig_ty nm-  | HsIB { hsib_body = hs_ty } <- hswc_body sig_ty-  , (explicit_tvs, ctxt, ty) <- splitLHsSigmaTy hs_ty+  | HsIB { hsib_body = hs_ty } <- sig_ty+  , (univs, reqs, exis, provs, ty) <- splitLHsPatSynTy hs_ty   = do { nm1 <- lookupLOcc nm        ; let rep_in_scope_tv tv = do { name <- lookupBinder (hsLTyVarName tv)                                      ; repTyVarBndrWithKind tv name }-       ; th_explicit_tvs <- repList tyVarBndrQTyConName rep_in_scope_tv-                                    explicit_tvs+       ; th_univs <- repList tyVarBndrQTyConName rep_in_scope_tv univs+       ; th_exis  <- repList tyVarBndrQTyConName rep_in_scope_tv exis+          -- NB: Don't pass any implicit type variables to repList above          -- See Note [Don't quantify implicit type variables in quotes] -       ; th_ctxt <- repLContext ctxt-       ; th_ty   <- repLTy ty-       ; ty1 <- if null explicit_tvs && null (unLoc ctxt)-                then return th_ty-                else repTForall th_explicit_tvs th_ctxt th_ty-       ; sig <- repProto mk_sig nm1 ty1+       ; th_reqs  <- repLContext reqs+       ; th_provs <- repLContext provs+       ; th_ty    <- repLTy ty+       ; ty1      <- repTForall th_univs th_reqs =<<+                       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_wc_ty_sig :: Name -> SrcSpan -> LHsSigWcType GhcRn -> Located Name+              -> DsM (SrcSpan, Core TH.DecQ)+rep_wc_ty_sig mk_sig loc sig_ty nm+  = rep_ty_sig mk_sig loc (hswc_body sig_ty) nm+ rep_inline :: Located Name            -> InlinePragma      -- Never defaultInlinePragma            -> SrcSpan@@ -867,24 +959,32 @@        ; term <- addBinds fresh_names thing_inside        ; wrapGenSyms fresh_names term } +addHsTyVarBinds :: [LHsTyVarBndr GhcRn]  -- the binders to be added+                -> (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)+       ; term <- addBinds fresh_exp_names $+                 do { kbs <- repList tyVarBndrQTyConName mk_tv_bndr+                                     (exp_tvs `zip` fresh_exp_names)+                    ; thing_inside kbs }+       ; wrapGenSyms fresh_exp_names term }+  where+    mk_tv_bndr (tv, (_,v)) = repTyVarBndrWithKind tv (coreVar v)+ addTyVarBinds :: LHsQTyVars GhcRn                    -- the binders to be added               -> (Core [TH.TyVarBndrQ] -> DsM (Core (TH.Q a)))  -- action in the ext env               -> DsM (Core (TH.Q a)) -- 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_implicit = imp_tvs, hsq_explicit = exp_tvs }) m-  = do { fresh_imp_names <- mkGenSyms imp_tvs-       ; fresh_exp_names <- mkGenSyms (map hsLTyVarName exp_tvs)-       ; let fresh_names = fresh_imp_names ++ fresh_exp_names-       ; term <- addBinds fresh_names $-                 do { kbs <- repList tyVarBndrQTyConName mk_tv_bndr-                                     (exp_tvs `zip` fresh_exp_names)-                    ; m kbs }-       ; wrapGenSyms fresh_names term }-  where-    mk_tv_bndr (tv, (_,v)) = repTyVarBndrWithKind tv (coreVar v)+addTyVarBinds (HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = imp_tvs}+                      , hsq_explicit = exp_tvs })+              thing_inside+  = addSimpleTyVarBinds imp_tvs $+    addHsTyVarBinds exp_tvs $+    thing_inside+addTyVarBinds (XLHsQTyVars _) _ = panic "addTyVarBinds"  addTyClTyVarBinds :: LHsQTyVars GhcRn                   -> (Core [TH.TyVarBndrQ] -> DsM (Core (TH.Q a)))@@ -917,18 +1017,20 @@ -- repTyVarBndrWithKind :: LHsTyVarBndr GhcRn                      -> Core TH.Name -> DsM (Core TH.TyVarBndrQ)-repTyVarBndrWithKind (L _ (UserTyVar _)) nm+repTyVarBndrWithKind (L _ (UserTyVar _ _)) nm   = repPlainTV nm-repTyVarBndrWithKind (L _ (KindedTyVar _ ki)) nm+repTyVarBndrWithKind (L _ (KindedTyVar _ _ ki)) nm   = repLTy ki >>= repKindedTV nm+repTyVarBndrWithKind (L _ (XTyVarBndr{})) _ = panic "repTyVarBndrWithKind"  -- | Represent a type variable binder repTyVarBndr :: LHsTyVarBndr GhcRn -> DsM (Core TH.TyVarBndrQ)-repTyVarBndr (L _ (UserTyVar (L _ nm)) )= do { nm' <- lookupBinder nm-                                             ; repPlainTV nm' }-repTyVarBndr (L _ (KindedTyVar (L _ nm) ki)) = do { nm' <- lookupBinder nm-                                                  ; ki' <- repLTy ki-                                                  ; repKindedTV nm' ki' }+repTyVarBndr (L _ (UserTyVar _ (L _ nm)) )= do { nm' <- lookupBinder nm+                                               ; repPlainTV nm' }+repTyVarBndr (L _ (KindedTyVar _ (L _ nm) ki)) = do { nm' <- lookupBinder nm+                                                    ; ki' <- repLTy ki+                                                    ; repKindedTV nm' ki' }+repTyVarBndr (L _ (XTyVarBndr{})) = panic "repTyVarBndr"  -- represent a type context --@@ -940,43 +1042,23 @@                      repCtxt preds  repHsSigType :: LHsSigType GhcRn -> DsM (Core TH.TypeQ)-repHsSigType (HsIB { hsib_vars = implicit_tvs+repHsSigType (HsIB { hsib_ext = HsIBRn { hsib_vars = implicit_tvs }                    , hsib_body = body })   | (explicit_tvs, ctxt, ty) <- splitLHsSigmaTy body-  = addTyVarBinds (HsQTvs { hsq_implicit = implicit_tvs-                          , hsq_explicit = explicit_tvs-                          , hsq_dependent = emptyNameSet })-    -- NB: Don't pass implicit_tvs to the hsq_explicit field above-    -- See Note [Don't quantify implicit type variables in quotes]-                  $ \ th_explicit_tvs ->+  = addSimpleTyVarBinds implicit_tvs $+      -- See Note [Don't quantify implicit type variables in quotes]+    addHsTyVarBinds explicit_tvs $ \ th_explicit_tvs ->     do { th_ctxt <- repLContext ctxt        ; th_ty   <- repLTy ty        ; if null explicit_tvs && null (unLoc ctxt)          then return th_ty          else repTForall th_explicit_tvs th_ctxt th_ty }--repHsPatSynSigType :: LHsSigType GhcRn -> DsM (Core TH.TypeQ)-repHsPatSynSigType (HsIB { hsib_vars = implicit_tvs-                         , hsib_body = body })-  = addTyVarBinds (newTvs implicit_tvs univs) $ \th_univs ->-      addTyVarBinds (newTvs [] exis) $ \th_exis ->-    do { th_reqs  <- repLContext reqs-       ; th_provs <- repLContext provs-       ; th_ty    <- repLTy ty-       ; repTForall th_univs th_reqs =<< (repTForall th_exis th_provs th_ty) }-  where-    newTvs impl_tvs expl_tvs = HsQTvs-      { hsq_implicit  = impl_tvs-      , hsq_explicit  = expl_tvs-      , hsq_dependent = emptyNameSet }-    -- NB: Don't pass impl_tvs to the hsq_explicit field above-    -- See Note [Don't quantify implicit type variables in quotes]--    (univs, reqs, exis, provs, ty) = splitLHsPatSynTy body+repHsSigType (XHsImplicitBndrs _) = panic "repHsSigType"  repHsSigWcType :: LHsSigWcType GhcRn -> DsM (Core TH.TypeQ) repHsSigWcType (HsWC { hswc_body = sig1 })   = repHsSigType sig1+repHsSigWcType (XHsWildCardBndrs _) = panic "repHsSigWcType"  -- yield the representation of a list of types repLTys :: [LHsType GhcRn] -> DsM [Core TH.TypeQ]@@ -990,8 +1072,7 @@ -- Arg of repForall is always HsForAllTy or HsQualTy repForall ty  | (tvs, ctxt, tau) <- splitLHsSigmaTy (noLoc ty)- = addTyVarBinds (HsQTvs { hsq_implicit = [], hsq_explicit = tvs-                         , hsq_dependent = emptyNameSet }) $ \bndrs ->+ = addHsTyVarBinds tvs $ \bndrs ->    do { ctxt1  <- repLContext ctxt       ; ty1    <- repLTy tau       ; repTForall bndrs ctxt1 ty1 }@@ -1000,9 +1081,10 @@ repTy ty@(HsForAllTy {}) = repForall ty repTy ty@(HsQualTy {})   = repForall ty -repTy (HsTyVar _ (L _ n))+repTy (HsTyVar _ _ (L _ n))   | isLiftedTypeKindTyConName n       = repTStar   | n `hasKey` constraintKindTyConKey = repTConstraint+  | n `hasKey` funTyConKey            = repArrowTyCon   | isTvOcc occ   = do tv1 <- lookupOcc n                        repTvar tv1   | isDataOcc occ = do tc1 <- lookupOcc n@@ -1013,47 +1095,38 @@   where     occ = nameOccName n -repTy (HsAppTy f a)         = do+repTy (HsAppTy _ f a)       = do                                 f1 <- repLTy f                                 a1 <- repLTy a                                 repTapp f1 a1-repTy (HsFunTy f a)         = do+repTy (HsFunTy _ f a)       = do                                 f1   <- repLTy f                                 a1   <- repLTy a                                 tcon <- repArrowTyCon                                 repTapps tcon [f1, a1]-repTy (HsListTy t)          = do+repTy (HsListTy _ t)        = do                                 t1   <- repLTy t                                 tcon <- repListTyCon                                 repTapp tcon t1-repTy (HsPArrTy t)     = do-                           t1   <- repLTy t-                           tcon <- repTy (HsTyVar NotPromoted-                                                  (noLoc (tyConName parrTyCon)))-                           repTapp tcon t1-repTy (HsTupleTy HsUnboxedTuple tys) = do+repTy (HsTupleTy _ HsUnboxedTuple tys) = do                                 tys1 <- repLTys tys                                 tcon <- repUnboxedTupleTyCon (length tys)                                 repTapps tcon tys1-repTy (HsTupleTy _ tys)     = do tys1 <- repLTys tys+repTy (HsTupleTy _ _ tys)   = do tys1 <- repLTys tys                                  tcon <- repTupleTyCon (length tys)                                  repTapps tcon tys1-repTy (HsSumTy tys)         = do tys1 <- repLTys tys+repTy (HsSumTy _ tys)       = do tys1 <- repLTys tys                                  tcon <- repUnboxedSumTyCon (length tys)                                  repTapps tcon tys1-repTy (HsOpTy ty1 n ty2)    = repLTy ((nlHsTyVar (unLoc n) `nlHsAppTy` ty1)+repTy (HsOpTy _ ty1 n ty2)  = repLTy ((nlHsTyVar (unLoc n) `nlHsAppTy` ty1)                                    `nlHsAppTy` ty2)-repTy (HsParTy t)           = repLTy t-repTy (HsEqTy t1 t2) = do-                         t1' <- repLTy t1-                         t2' <- repLTy t2-                         eq  <- repTequality-                         repTapps eq [t1', t2']-repTy (HsKindSig t k)       = do+repTy (HsParTy _ t)         = repLTy t+repTy (HsStarTy _ _) =  repTStar+repTy (HsKindSig _ t k)     = do                                 t1 <- repLTy t                                 k1 <- repLTy k                                 repTSig t1 k1-repTy (HsSpliceTy splice _)     = repSplice splice+repTy (HsSpliceTy _ splice)      = repSplice splice repTy (HsExplicitListTy _ _ tys) = do                                     tys1 <- repLTys tys                                     repTPromotedList tys1@@ -1061,9 +1134,9 @@                                     tys1 <- repLTys tys                                     tcon <- repPromotedTupleTyCon (length tys)                                     repTapps tcon tys1-repTy (HsTyLit lit) = do-                        lit' <- repTyLit lit-                        repTLit lit'+repTy (HsTyLit _ lit) = do+                          lit' <- repTyLit lit+                          repTLit lit' repTy (HsWildCardTy (AnonWildCard _)) = repTWildCard  repTy ty                      = notHandled "Exotic form of type" (ppr ty)@@ -1097,10 +1170,11 @@ repSplice :: HsSplice GhcRn -> DsM (Core a) -- See Note [How brackets and nested splices are handled] in TcSplice -- We return a CoreExpr of any old type; the context should know-repSplice (HsTypedSplice   _ n _) = rep_splice n-repSplice (HsUntypedSplice _ n _) = rep_splice n-repSplice (HsQuasiQuote n _ _ _)  = rep_splice n-repSplice e@(HsSpliced _ _)       = pprPanic "repSplice" (ppr e)+repSplice (HsTypedSplice   _ _ n _) = rep_splice n+repSplice (HsUntypedSplice _ _ n _) = rep_splice n+repSplice (HsQuasiQuote _ n _ _ _)  = rep_splice n+repSplice e@(HsSpliced {})          = pprPanic "repSplice" (ppr e)+repSplice e@(XSplice {})            = pprPanic "repSplice" (ppr e)  rep_splice :: Name -> DsM (Core a) rep_splice splice_name@@ -1125,7 +1199,7 @@ repLE (L loc e) = putSrcSpanDs loc (repE e)  repE :: HsExpr GhcRn -> DsM (Core TH.ExpQ)-repE (HsVar (L _ x))            =+repE (HsVar _ (L _ x))            =   do { mb_val <- dsLookupMetaEnv x      ; case mb_val of         Nothing            -> do { str <- globalVar x@@ -1133,45 +1207,46 @@         Just (DsBound y)   -> repVarOrCon x (coreVar y)         Just (DsSplice e)  -> do { e' <- dsExpr e                                  ; return (MkC e') } }-repE e@(HsIPVar _) = notHandled "Implicit parameters" (ppr e)-repE (HsOverLabel _ s) = repOverLabel s+repE e@(HsIPVar {}) = notHandled "Implicit parameters" (ppr e)+repE (HsOverLabel _ _ s) = repOverLabel s -repE e@(HsRecFld f) = case f of-  Unambiguous _ x -> repE (HsVar (noLoc x))+repE e@(HsRecFld _ f) = case f of+  Unambiguous x _ -> repE (HsVar noExt (noLoc x))   Ambiguous{}     -> notHandled "Ambiguous record selectors" (ppr e)+  XAmbiguousFieldOcc{} -> notHandled "XAmbiguous record selectors" (ppr e)          -- Remember, we're desugaring renamer output here, so         -- HsOverlit can definitely occur-repE (HsOverLit l) = do { a <- repOverloadedLiteral l; repLit a }-repE (HsLit l)     = do { a <- repLiteral l;           repLit a }-repE (HsLam (MG { mg_alts = L _ [m] })) = repLambda m-repE (HsLamCase (MG { mg_alts = L _ ms }))+repE (HsOverLit _ l) = do { a <- repOverloadedLiteral l; repLit a }+repE (HsLit _ l)     = do { a <- repLiteral l;           repLit a }+repE (HsLam _ (MG { mg_alts = L _ [m] })) = repLambda m+repE (HsLamCase _ (MG { mg_alts = L _ ms }))                    = do { ms' <- mapM repMatchTup ms                         ; core_ms <- coreList matchQTyConName ms'                         ; repLamCase core_ms }-repE (HsApp x y)   = do {a <- repLE x; b <- repLE y; repApp a b}-repE (HsAppType e t) = do { a <- repLE e+repE (HsApp _ x y)   = do {a <- repLE x; b <- repLE y; repApp a b}+repE (HsAppType t e) = do { a <- repLE e                           ; s <- repLTy (hswc_body t)                           ; repAppType a s } -repE (OpApp e1 op _ e2) =+repE (OpApp _ e1 op e2) =   do { arg1 <- repLE e1;        arg2 <- repLE e2;        the_op <- repLE op ;        repInfixApp arg1 the_op arg2 }-repE (NegApp x _)        = do+repE (NegApp _ x _)      = do                               a         <- repLE x                               negateVar <- lookupOcc negateName >>= repVar                               negateVar `repApp` a-repE (HsPar x)            = repLE x-repE (SectionL x y)       = do { a <- repLE x; b <- repLE y; repSectionL a b }-repE (SectionR x y)       = do { a <- repLE x; b <- repLE y; repSectionR a b }-repE (HsCase e (MG { mg_alts = L _ ms }))+repE (HsPar _ x)            = repLE x+repE (SectionL _ x y)       = do { a <- repLE x; b <- repLE y; repSectionL a b }+repE (SectionR _ x y)       = do { a <- repLE x; b <- repLE y; repSectionR a b }+repE (HsCase _ e (MG { mg_alts = L _ ms }))                           = do { arg <- repLE e                                ; ms2 <- mapM repMatchTup ms                                ; core_ms2 <- coreList matchQTyConName ms2                                ; repCaseE arg core_ms2 }-repE (HsIf _ x y z)         = do+repE (HsIf _ _ x y z)       = do                               a <- repLE x                               b <- repLE y                               c <- repLE z@@ -1180,13 +1255,13 @@   = do { (binds, alts') <- liftM unzip $ mapM repLGRHS alts        ; expr' <- repMultiIf (nonEmptyCoreList alts')        ; wrapGenSyms (concat binds) expr' }-repE (HsLet (L _ bs) e)         = do { (ss,ds) <- repBinds bs+repE (HsLet _ (L _ bs) e)       = do { (ss,ds) <- repBinds bs                                      ; e2 <- addBinds ss (repLE e)                                      ; z <- repLetE ds e2                                      ; wrapGenSyms ss z }  -- FIXME: I haven't got the types here right yet-repE e@(HsDo ctxt (L _ sts) _)+repE e@(HsDo _ ctxt (L _ sts))  | case ctxt of { DoExpr -> True; GhciStmtCtxt -> True; _ -> False }  = do { (ss,zs) <- repLSts sts;         e'      <- repDoE (nonEmptyCoreList zs);@@ -1201,14 +1276,13 @@   = notHandled "mdo, monad comprehension and [: :]" (ppr e)  repE (ExplicitList _ _ es) = do { xs <- repLEs es; repListExp xs }-repE e@(ExplicitPArr _ _) = notHandled "Parallel arrays" (ppr e)-repE e@(ExplicitTuple es boxed)+repE e@(ExplicitTuple _ es boxed)   | not (all tupArgPresent es) = notHandled "Tuple sections" (ppr e)-  | isBoxed boxed  = do { xs <- repLEs [e | L _ (Present e) <- es]; repTup xs }-  | otherwise      = do { xs <- repLEs [e | L _ (Present e) <- es]-                        ; repUnboxedTup xs }+  | isBoxed boxed = do { xs <- repLEs [e | L _ (Present _ e) <- es]; repTup xs }+  | otherwise     = do { xs <- repLEs [e | L _ (Present _ e) <- es]+                       ; repUnboxedTup xs } -repE (ExplicitSum alt arity e _)+repE (ExplicitSum _ alt arity e)  = do { e1 <- repLE e       ; repUnboxedSum e1 alt arity } @@ -1221,7 +1295,7 @@         fs <- repUpdFields flds;         repRecUpd x fs } -repE (ExprWithTySig e ty)+repE (ExprWithTySig ty e)   = do { e1 <- repLE e        ; t1 <- repHsSigWcType ty        ; repSigExp e1 t1 }@@ -1243,25 +1317,24 @@                              ds3 <- repLE e3                              repFromThenTo ds1 ds2 ds3 -repE (HsSpliceE splice)    = repSplice splice+repE (HsSpliceE _ splice)  = repSplice splice repE (HsStatic _ e)        = repLE e >>= rep2 staticEName . (:[]) . unC-repE (HsUnboundVar uv)     = do+repE (HsUnboundVar _ uv)   = do                                occ   <- occNameLit (unboundVarOcc uv)                                sname <- repNameS occ                                repUnboundVar sname -repE e@(PArrSeq {})        = notHandled "Parallel arrays" (ppr e) repE e@(HsCoreAnn {})      = notHandled "Core annotations" (ppr e) repE e@(HsSCC {})          = notHandled "Cost centres" (ppr e) repE e@(HsTickPragma {})   = notHandled "Tick Pragma" (ppr e)-repE e@(HsTcBracketOut {}) = notHandled "TH brackets" (ppr e) repE e                     = notHandled "Expression form" (ppr e)  ----------------------------------------------------------------------------- -- Building representations of auxillary structures like Match, Clause, Stmt,  repMatchTup ::  LMatch GhcRn (LHsExpr GhcRn) -> DsM (Core TH.MatchQ)-repMatchTup (L _ (Match { m_pats = [p], m_grhss = GRHSs guards (L _ wheres) })) =+repMatchTup (L _ (Match { m_pats = [p]+                        , m_grhss = GRHSs _ guards (L _ wheres) })) =   do { ss1 <- mkGenSyms (collectPatBinders p)      ; addBinds ss1 $ do {      ; p1 <- repLP p@@ -1273,7 +1346,8 @@ repMatchTup _ = panic "repMatchTup: case alt with more than one arg"  repClauseTup ::  LMatch GhcRn (LHsExpr GhcRn) -> DsM (Core TH.ClauseQ)-repClauseTup (L _ (Match { m_pats = ps, m_grhss = GRHSs guards (L _ wheres) })) =+repClauseTup (L _ (Match { m_pats = ps+                         , m_grhss = GRHSs _ guards (L _ wheres) })) =   do { ss1 <- mkGenSyms (collectPatsBinders ps)      ; addBinds ss1 $ do {        ps1 <- repLPs ps@@ -1282,9 +1356,11 @@        gs <- repGuards guards      ; clause <- repClause ps1 gs ds      ; wrapGenSyms (ss1++ss2) clause }}}+repClauseTup (L _ (Match _ _ _ (XGRHSs _))) = panic "repClauseTup"+repClauseTup (L _ (XMatch _)) = panic "repClauseTup"  repGuards ::  [LGRHS GhcRn (LHsExpr GhcRn)] ->  DsM (Core TH.BodyQ)-repGuards [L _ (GRHS [] e)]+repGuards [L _ (GRHS _ [] e)]   = do {a <- repLE e; repNormal a } repGuards other   = do { zs <- mapM repLGRHS other@@ -1294,14 +1370,15 @@  repLGRHS :: LGRHS GhcRn (LHsExpr GhcRn)          -> DsM ([GenSymBind], (Core (TH.Q (TH.Guard, TH.Exp))))-repLGRHS (L _ (GRHS [L _ (BodyStmt e1 _ _ _)] e2))+repLGRHS (L _ (GRHS _ [L _ (BodyStmt _ e1 _ _)] e2))   = do { guarded <- repLNormalGE e1 e2        ; return ([], guarded) }-repLGRHS (L _ (GRHS ss rhs))+repLGRHS (L _ (GRHS _ ss rhs))   = do { (gs, ss') <- repLSts ss        ; rhs' <- addBinds gs $ repLE rhs        ; guarded <- repPatGE (nonEmptyCoreList ss') rhs'        ; return (gs, guarded) }+repLGRHS (L _ (XGRHS _)) = panic "repLGRHS"  repFields :: HsRecordBinds GhcRn -> DsM (Core [TH.Q TH.FieldExp]) repFields (HsRecFields { rec_flds = flds })@@ -1318,7 +1395,7 @@   where     rep_fld :: LHsRecUpdField GhcRn -> DsM (Core (TH.Q TH.FieldExp))     rep_fld (L l fld) = case unLoc (hsRecFieldLbl fld) of-      Unambiguous _ sel_name -> do { fn <- lookupLOcc (L l sel_name)+      Unambiguous sel_name _ -> do { fn <- lookupLOcc (L l sel_name)                                    ; e  <- repLE (hsRecFieldArg fld)                                    ; repFieldExp fn e }       _                      -> notHandled "Ambiguous record updates" (ppr fld)@@ -1354,7 +1431,7 @@ repLSts stmts = repSts (map unLoc stmts)  repSts :: [Stmt GhcRn (LHsExpr GhcRn)] -> DsM ([GenSymBind], [Core TH.StmtQ])-repSts (BindStmt p e _ _ _ : ss) =+repSts (BindStmt _ p e _ _ : ss) =    do { e2 <- repLE e       ; ss1 <- mkGenSyms (collectPatBinders p)       ; addBinds ss1 $ do {@@ -1362,17 +1439,17 @@       ; (ss2,zs) <- repSts ss       ; z <- repBindSt p1 e2       ; return (ss1++ss2, z : zs) }}-repSts (LetStmt (L _ bs) : ss) =+repSts (LetStmt _ (L _ bs) : ss) =    do { (ss1,ds) <- repBinds bs       ; z <- repLetSt ds       ; (ss2,zs) <- addBinds ss1 (repSts ss)       ; return (ss1++ss2, z : zs) }-repSts (BodyStmt e _ _ _ : ss) =+repSts (BodyStmt _ e _ _ : ss) =    do { e2 <- repLE e       ; z <- repNoBindSt e2       ; (ss2,zs) <- repSts ss       ; return (ss2, z : zs) }-repSts (ParStmt stmt_blocks _ _ _ : ss) =+repSts (ParStmt _ stmt_blocks _ _ : ss) =    do { (ss_s, stmt_blocks1) <- mapAndUnzipM rep_stmt_block stmt_blocks       ; let stmt_blocks2 = nonEmptyCoreList stmt_blocks1             ss1 = concat ss_s@@ -1382,11 +1459,12 @@    where      rep_stmt_block :: ParStmtBlock GhcRn GhcRn                     -> DsM ([GenSymBind], Core [TH.StmtQ])-     rep_stmt_block (ParStmtBlock stmts _ _) =+     rep_stmt_block (ParStmtBlock _ stmts _ _) =        do { (ss1, zs) <- repSts (map unLoc stmts)           ; zs1 <- coreList stmtQTyConName zs           ; return (ss1, zs1) }-repSts [LastStmt e _ _]+     rep_stmt_block (XParStmtBlock{}) = panic "repSts"+repSts [LastStmt _ e _ _]   = do { e2 <- repLE e        ; z <- repNoBindSt e2        ; return ([], [z]) }@@ -1399,13 +1477,13 @@ -----------------------------------------------------------  repBinds :: HsLocalBinds GhcRn -> DsM ([GenSymBind], Core [TH.DecQ])-repBinds EmptyLocalBinds+repBinds (EmptyLocalBinds _)   = do  { core_list <- coreList decQTyConName []         ; return ([], core_list) } -repBinds b@(HsIPBinds _) = notHandled "Implicit parameters" (ppr b)+repBinds b@(HsIPBinds {}) = notHandled "Implicit parameters" (ppr b) -repBinds (HsValBinds decs)+repBinds (HsValBinds _ decs)  = do   { let { bndrs = hsSigTvBinders decs ++ collectHsValBinders decs }                 -- No need to worry about detailed scopes within                 -- the binding group, because we are talking Names@@ -1417,22 +1495,19 @@         ; core_list <- coreList decQTyConName                                 (de_loc (sort_by_loc prs))         ; return (ss, core_list) }+repBinds b@(XHsLocalBindsLR {}) = notHandled "Local binds extensions" (ppr b)  rep_val_binds :: HsValBinds GhcRn -> DsM [(SrcSpan, Core TH.DecQ)] -- Assumes: all the binders of the binding are already in the meta-env-rep_val_binds (ValBindsOut binds sigs)- = do { core1 <- rep_binds' (unionManyBags (map snd binds))-      ; core2 <- rep_sigs' sigs+rep_val_binds (XValBindsLR (NValBinds binds sigs))+ = do { core1 <- rep_binds (unionManyBags (map snd binds))+      ; core2 <- rep_sigs sigs       ; return (core1 ++ core2) }-rep_val_binds (ValBindsIn _ _)- = panic "rep_val_binds: ValBindsIn"--rep_binds :: LHsBinds GhcRn -> DsM [Core TH.DecQ]-rep_binds binds = do { binds_w_locs <- rep_binds' binds-                     ; return (de_loc (sort_by_loc binds_w_locs)) }+rep_val_binds (ValBinds _ _ _)+ = panic "rep_val_binds: ValBinds" -rep_binds' :: LHsBinds GhcRn -> DsM [(SrcSpan, Core TH.DecQ)]-rep_binds' = mapM rep_bind . bagToList+rep_binds :: LHsBinds GhcRn -> DsM [(SrcSpan, Core TH.DecQ)]+rep_binds = mapM rep_bind . bagToList  rep_bind :: LHsBind GhcRn -> DsM (SrcSpan, Core TH.DecQ) -- Assumes: all the binders of the binding are already in the meta-env@@ -1443,8 +1518,10 @@ rep_bind (L loc (FunBind                  { fun_id = fn,                    fun_matches = MG { mg_alts-                           = L _ [L _ (Match { m_pats = []-                                             , m_grhss = GRHSs guards (L _ wheres) })] } }))+                           = L _ [L _ (Match+                                       { m_pats = []+                                       , m_grhss = GRHSs _ guards (L _ wheres) }+                                      )] } }))  = do { (ss,wherecore) <- repBinds wheres         ; guardcore <- addBinds ss (repGuards guards)         ; fn'  <- lookupLBinder fn@@ -1460,14 +1537,17 @@         ; ans <- repFun fn' (nonEmptyCoreList ms1)         ; return (loc, ans) } +rep_bind (L _ (FunBind { fun_matches = XMatchGroup _ })) = panic "rep_bind"+ rep_bind (L loc (PatBind { pat_lhs = pat-                         , pat_rhs = GRHSs guards (L _ wheres) }))+                         , pat_rhs = GRHSs _ guards (L _ wheres) }))  =   do { patcore <- repLP pat         ; (ss,wherecore) <- repBinds wheres         ; guardcore <- addBinds ss (repGuards guards)         ; ans  <- repVal patcore guardcore wherecore         ; ans' <- wrapGenSyms ss ans         ; return (loc, ans') }+rep_bind (L _ (PatBind _ _ (XGRHSs _) _)) = panic "rep_bind"  rep_bind (L _ (VarBind { var_id = v, var_rhs = e}))  =   do { v' <- lookupBinder v@@ -1479,11 +1559,10 @@         ; return (srcLocSpan (getSrcLoc v), ans) }  rep_bind (L _ (AbsBinds {}))  = panic "rep_bind: AbsBinds"-rep_bind (L loc (PatSynBind (PSB { psb_id   = syn-                                 , psb_fvs  = _fvs-                                 , psb_args = args-                                 , psb_def  = pat-                                 , psb_dir  = dir })))+rep_bind (L loc (PatSynBind _ (PSB { psb_id   = syn+                                   , psb_args = args+                                   , psb_def  = pat+                                   , psb_dir  = dir })))   = do { syn'      <- lookupLBinder syn        ; dir'      <- repPatSynDir dir        ; ss        <- mkGenArgSyms args@@ -1518,6 +1597,9 @@     wrapGenArgSyms (RecCon _) _  dec = return dec     wrapGenArgSyms _          ss dec = wrapGenSyms ss dec +rep_bind (L _ (PatSynBind _ (XPatSynBind _))) = panic "rep_bind: XPatSynBind"+rep_bind (L _ (XHsBindsLR {}))  = panic "rep_bind: XHsBindsLR"+ repPatSynD :: Core TH.Name            -> Core TH.PatSynArgsQ            -> Core TH.PatSynDirQ@@ -1555,6 +1637,7 @@ repPatSynDir (ExplicitBidirectional (MG { mg_alts = L _ clauses }))   = do { clauses' <- mapM repClauseTup clauses        ; repExplBidirPatSynDir (nonEmptyCoreList clauses') }+repPatSynDir (ExplicitBidirectional (XMatchGroup _)) = panic "repPatSynDir"  repExplBidirPatSynDir :: Core [TH.ClauseQ] -> DsM (Core TH.PatSynDirQ) repExplBidirPatSynDir (MkC cls) = rep2 explBidirPatSynName [cls]@@ -1586,7 +1669,8 @@  repLambda :: LMatch GhcRn (LHsExpr GhcRn) -> DsM (Core TH.ExpQ) repLambda (L _ (Match { m_pats = ps-                      , m_grhss = GRHSs [L _ (GRHS [] e)] (L _ EmptyLocalBinds) } ))+                      , m_grhss = GRHSs _ [L _ (GRHS _ [] e)]+                                          (L _ (EmptyLocalBinds _)) } ))  = do { let bndrs = collectPatsBinders ps ;       ; ss  <- mkGenSyms bndrs       ; lam <- addBinds ss (@@ -1611,19 +1695,23 @@ repLP (L _ p) = repP p  repP :: Pat GhcRn -> DsM (Core TH.PatQ)-repP (WildPat _)       = repPwild-repP (LitPat l)        = do { l2 <- repLiteral l; repPlit l2 }-repP (VarPat (L _ x))  = do { x' <- lookupBinder x; repPvar x' }-repP (LazyPat p)       = do { p1 <- repLP p; repPtilde p1 }-repP (BangPat p)       = do { p1 <- repLP p; repPbang p1 }-repP (AsPat x p)       = do { x' <- lookupLBinder x; p1 <- repLP p; repPaspat x' p1 }-repP (ParPat p)        = repLP p-repP (ListPat ps _ Nothing)    = do { qs <- repLPs ps; repPlist qs }-repP (ListPat ps ty1 (Just (_,e))) = do { p <- repP (ListPat ps ty1 Nothing); e' <- repE (syn_expr e); repPview e' p}-repP (TuplePat ps boxed _)+repP (WildPat _)        = repPwild+repP (LitPat _ l)       = do { l2 <- repLiteral l; repPlit l2 }+repP (VarPat _ (L _ x)) = do { x' <- lookupBinder x; repPvar x' }+repP (LazyPat _ p)      = do { p1 <- repLP p; repPtilde p1 }+repP (BangPat _ p)      = do { p1 <- repLP p; repPbang p1 }+repP (AsPat _ x p)      = do { x' <- lookupLBinder x; p1 <- repLP p+                             ; repPaspat x' p1 }+repP (ParPat _ p)       = repLP p+repP (ListPat Nothing ps)  = do { qs <- repLPs ps; repPlist qs }+repP (ListPat (Just e) ps) = do { p <- repP (ListPat Nothing ps)+                                ; e' <- repE (syn_expr e)+                                ; repPview e' p}+repP (TuplePat _ ps boxed)   | isBoxed boxed       = do { qs <- repLPs ps; repPtup qs }   | otherwise           = do { qs <- repLPs ps; repPunboxedTup qs }-repP (SumPat p alt arity _) = do { p1 <- repLP p; repPunboxedSum p1 alt arity }+repP (SumPat _ p alt arity) = do { p1 <- repLP p+                                 ; repPunboxedSum p1 alt arity } repP (ConPatIn dc details)  = do { con_str <- lookupLOcc dc       ; case details of@@ -1640,13 +1728,13 @@                           ; MkC p <- repLP (hsRecFieldArg fld)                           ; rep2 fieldPatName [v,p] } -repP (NPat (L _ l) Nothing _ _) = do { a <- repOverloadedLiteral l; repPlit a }-repP (ViewPat e p _) = do { e' <- repLE e; p' <- repLP p; repPview e' p' }-repP p@(NPat _ (Just _) _ _) = notHandled "Negative overloaded patterns" (ppr p)-repP (SigPatIn p t) = do { p' <- repLP p-                         ; t' <- repLTy (hsSigWcType t)-                         ; repPsig p' t' }-repP (SplicePat splice) = repSplice splice+repP (NPat _ (L _ l) Nothing _) = do { a <- repOverloadedLiteral l; repPlit a }+repP (ViewPat _ e p) = do { e' <- repLE e; p' <- repLP p; repPview e' p' }+repP p@(NPat _ _ (Just _) _) = notHandled "Negative overloaded patterns" (ppr p)+repP (SigPat t p) = do { p' <- repLP p+                       ; t' <- repLTy (hsSigWcType t)+                       ; repPsig p' t' }+repP (SplicePat _ splice) = repSplice splice  repP other = notHandled "Exotic pattern" (ppr other) @@ -2037,20 +2125,35 @@ repInst (MkC o) (MkC cxt) (MkC ty) (MkC ds) = rep2 instanceWithOverlapDName                                                               [o, cxt, ty, ds] -repDerivStrategy :: Maybe (Located DerivStrategy)-                 -> DsM (Core (Maybe TH.DerivStrategy))+repDerivStrategy :: Maybe (LDerivStrategy GhcRn)+                 -> DsM (Core (Maybe TH.DerivStrategyQ)) repDerivStrategy mds =   case mds of     Nothing -> nothing     Just (L _ ds) ->       case ds of-        StockStrategy    -> just =<< dataCon stockStrategyDataConName-        AnyclassStrategy -> just =<< dataCon anyclassStrategyDataConName-        NewtypeStrategy  -> just =<< dataCon newtypeStrategyDataConName+        StockStrategy    -> just =<< repStockStrategy+        AnyclassStrategy -> just =<< repAnyclassStrategy+        NewtypeStrategy  -> just =<< repNewtypeStrategy+        ViaStrategy ty   -> do ty' <- repLTy (hsSigType ty)+                               via_strat <- repViaStrategy ty'+                               just via_strat   where-  nothing = coreNothing derivStrategyTyConName-  just    = coreJust    derivStrategyTyConName+  nothing = coreNothing derivStrategyQTyConName+  just    = coreJust    derivStrategyQTyConName +repStockStrategy :: DsM (Core TH.DerivStrategyQ)+repStockStrategy = rep2 stockStrategyName []++repAnyclassStrategy :: DsM (Core TH.DerivStrategyQ)+repAnyclassStrategy = rep2 anyclassStrategyName []++repNewtypeStrategy :: DsM (Core TH.DerivStrategyQ)+repNewtypeStrategy = rep2 newtypeStrategyName []++repViaStrategy :: Core TH.TypeQ -> DsM (Core TH.DerivStrategyQ)+repViaStrategy (MkC t) = rep2 viaStrategyName [t]+ repOverlap :: Maybe OverlapMode -> DsM (Core (Maybe TH.Overlap)) repOverlap mb =   case mb of@@ -2073,7 +2176,7 @@ repClass (MkC cxt) (MkC cls) (MkC tvs) (MkC fds) (MkC ds)   = rep2 classDName [cxt, cls, tvs, fds, ds] -repDeriv :: Core (Maybe TH.DerivStrategy)+repDeriv :: Core (Maybe TH.DerivStrategyQ)          -> Core TH.CxtQ -> Core TH.TypeQ          -> DsM (Core TH.DecQ) repDeriv (MkC ds) (MkC cxt) (MkC ty)@@ -2197,7 +2300,7 @@       rep_ip (L _ ip) = mapM (rep_one_ip (cd_fld_type ip)) (cd_fld_names ip)        rep_one_ip :: LBangType GhcRn -> LFieldOcc GhcRn -> DsM (Core a)-      rep_one_ip t n = do { MkC v  <- lookupOcc (selectorFieldOcc $ unLoc n)+      rep_one_ip t n = do { MkC v  <- lookupOcc (extFieldOcc $ unLoc n)                           ; MkC ty <- repBangTy  t                           ; rep2 varBangTypeName [v,ty] } @@ -2353,16 +2456,16 @@  mk_integer :: Integer -> DsM (HsLit GhcRn) mk_integer  i = do integer_ty <- lookupType integerTyConName-                   return $ HsInteger noSourceText i integer_ty+                   return $ HsInteger NoSourceText i integer_ty  mk_rational :: FractionalLit -> DsM (HsLit GhcRn) mk_rational r = do rat_ty <- lookupType rationalTyConName-                   return $ HsRat def r rat_ty+                   return $ HsRat noExt r rat_ty mk_string :: FastString -> DsM (HsLit GhcRn)-mk_string s = return $ HsString noSourceText s+mk_string s = return $ HsString NoSourceText s  mk_char :: Char -> DsM (HsLit GhcRn)-mk_char c = return $ HsChar noSourceText c+mk_char c = return $ HsChar NoSourceText c  repOverloadedLiteral :: HsOverLit GhcRn -> DsM (Core TH.Lit) repOverloadedLiteral (OverLit { ol_val = val})@@ -2370,6 +2473,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"  mk_lit :: OverLitVal -> DsM (HsLit GhcRn) mk_lit (HsIntegral i)     = mk_integer  (il_value i)
deSugar/DsMonad.hs view
@@ -23,13 +23,9 @@         newUnique,         UniqSupply, newUniqueSupply,         getGhcModeDs, dsGetFamInstEnvs,-        dsLookupGlobal, dsLookupGlobalId, dsDPHBuiltin, dsLookupTyCon,+        dsLookupGlobal, dsLookupGlobalId, dsLookupTyCon,         dsLookupDataCon, dsLookupConLike, -        PArrBuiltin(..),-        dsLookupDPHRdrEnv, dsLookupDPHRdrEnv_maybe,-        dsInitPArrBuiltin,-         DsMetaEnv, DsMetaVal(..), dsGetMetaEnv, dsLookupMetaEnv, dsExtendMetaEnv,          -- Getting and setting EvVars and term constraints in local environment@@ -65,8 +61,6 @@ import HsSyn import TcIface import TcMType ( checkForLevPolyX, formatLevPolyErr )-import LoadIface-import Finder import PrelNames import RdrName import HscTypes@@ -86,14 +80,12 @@ import DynFlags import ErrUtils import FastString-import Maybes import Var (EvVar)-import qualified GHC.LanguageExtensions as LangExt import UniqFM ( lookupWithDefaultUFM ) import Literal ( mkMachString )+import CostCentreState  import Data.IORef-import Control.Monad  {- ************************************************************************@@ -112,6 +104,9 @@  data EquationInfo   = EqnInfo { eqn_pats :: [Pat GhcTc],  -- The patterns for an eqn+                -- NB: We have /already/ applied decideBangHood to+                -- these patterns.  See Note [decideBangHood] in DsUtils+               eqn_rhs  :: MatchResult } -- What to do after match  instance Outputable EquationInfo where@@ -165,7 +160,7 @@        ; msg_var  <- getErrsVar        ; hsc_env  <- getTopEnv        ; envs     <- mkDsEnvsFromTcGbl hsc_env msg_var tcg_env-       ; setEnvs envs $ initDPH thing_inside+       ; setEnvs envs thing_inside        }  -- | Run a 'DsM' action inside the 'IO' monad.@@ -182,6 +177,7 @@                   -> m (DsGblEnv, DsLclEnv) mkDsEnvsFromTcGbl hsc_env msg_var tcg_env   = do { pm_iter_var <- liftIO $ newIORef 0+       ; 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@@ -190,13 +186,13 @@              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 complete_matches+                           msg_var pm_iter_var cc_st_var complete_matches        }  runDs :: HscEnv -> (DsGblEnv, DsLclEnv) -> DsM a -> IO (Messages, Maybe a) runDs hsc_env (ds_gbl, ds_lcl) thing_inside   = do { res    <- initTcRnIf 'd' hsc_env ds_gbl ds_lcl-                              (initDPH $ tryM thing_inside)+                              (tryM thing_inside)        ; msgs   <- readIORef (ds_msgs ds_gbl)        ; let final_res                | errorsFound dflags msgs = Nothing@@ -210,6 +206,7 @@ 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        ; msg_var <- newIORef emptyMessages        ; let dflags   = hsc_dflags hsc_env              type_env = typeEnvFromEntities ids (mg_tcs guts) (mg_fam_insts guts)@@ -225,7 +222,7 @@               envs  = mkDsEnvs dflags this_mod rdr_env type_env                               fam_inst_env msg_var pm_iter_var-                              complete_matches+                              cc_st_var complete_matches        ; runDs hsc_env envs thing_inside        } @@ -253,9 +250,9 @@          thing_inside }  mkDsEnvs :: DynFlags -> Module -> GlobalRdrEnv -> TypeEnv -> FamInstEnv-         -> IORef Messages -> IORef Int -> [CompleteMatch]-         -> (DsGblEnv, DsLclEnv)-mkDsEnvs dflags mod rdr_env type_env fam_inst_env msg_var pmvar+         -> 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          complete_matches   = let if_genv = IfGblEnv { if_doc       = text "mkDsEnvs",                              if_rec_types = Just (mod, return type_env) }@@ -268,9 +265,8 @@                            , ds_if_env  = (if_genv, if_lenv)                            , ds_unqual  = mkPrintUnqualified dflags rdr_env                            , ds_msgs    = msg_var-                           , ds_dph_env = emptyGlobalRdrEnv-                           , ds_parr_bi = panic "DsMonad: uninitialised ds_parr_bi"                            , ds_complete_matches = completeMatchMap+                           , ds_cc_st   = cc_st_var                            }         lcl_env = DsLclEnv { dsl_meta    = emptyNameEnv                            , dsl_loc     = real_span@@ -496,23 +492,6 @@ instance MonadThings (IOEnv (Env DsGblEnv DsLclEnv)) where     lookupThing = dsLookupGlobal --- | Attempt to load the given module and return its exported entities if--- successful.-dsLoadModule :: SDoc -> Module -> DsM GlobalRdrEnv-dsLoadModule doc mod-  = do { env    <- getGblEnv-       ; setEnvs (ds_if_env env) $ do-       { iface <- loadInterface doc mod ImportBySystem-       ; case iface of-           Failed err      -> pprPanic "DsMonad.dsLoadModule: failed to load" (err $$ doc)-           Succeeded iface -> return $ mkGlobalRdrEnv . gresFromAvails prov . mi_exports $ iface-       } }-  where-    prov     = Just (ImpSpec { is_decl = imp_spec, is_item = ImpAll })-    imp_spec = ImpDeclSpec { is_mod = name, is_qual = True,-                             is_dloc = wiredInSrcSpan, is_as = name }-    name = moduleName mod- dsLookupGlobal :: Name -> DsM TyThing -- Very like TcEnv.tcLookupGlobal dsLookupGlobal name@@ -604,138 +583,6 @@        ; return $ if no_errs                   then mk_expr result                   else unitExpr }-------------------------------------------------------------------------------                  Data Parallel Haskell------------------------------------------------------------------------------- | Run a 'DsM' with DPH things in scope if necessary.-initDPH :: DsM a -> DsM a-initDPH = loadDAP . initDPHBuiltins---- | Extend the global environment with a 'GlobalRdrEnv' containing the exported--- entities of,------   * 'Data.Array.Parallel'      iff '-XParallelArrays' specified (see also 'checkLoadDAP').---   * 'Data.Array.Parallel.Prim' iff '-fvectorise' specified.-loadDAP :: DsM a -> DsM a-loadDAP thing_inside-  = do { dapEnv  <- loadOneModule dATA_ARRAY_PARALLEL_NAME      checkLoadDAP          paErr-       ; dappEnv <- loadOneModule dATA_ARRAY_PARALLEL_PRIM_NAME (goptM Opt_Vectorise) veErr-       ; updGblEnv (\env -> env {ds_dph_env = dapEnv `plusOccEnv` dappEnv }) thing_inside-       }-  where-    loadOneModule :: ModuleName           -- the module to load-                  -> DsM Bool             -- under which condition-                  -> MsgDoc               -- error message if module not found-                  -> DsM GlobalRdrEnv     -- empty if condition 'False'-    loadOneModule modname check err-      = do { doLoad <- check-           ; if not doLoad-             then return emptyGlobalRdrEnv-             else do {-           ; hsc_env <- getTopEnv-           ; result <- liftIO $ findImportedModule hsc_env modname Nothing-           ; case result of-               Found _ mod -> dsLoadModule err mod-               _           -> pprPgmError "Unable to use Data Parallel Haskell (DPH):" err-           } }--    paErr       = text "To use ParallelArrays," <+> specBackend $$ hint1 $$ hint2-    veErr       = text "To use -fvectorise," <+> specBackend $$ hint1 $$ hint2-    specBackend = text "you must specify a DPH backend package"-    hint1       = text "Look for packages named 'dph-lifted-*' with 'ghc-pkg'"-    hint2       = text "You may need to install them with 'cabal install dph-examples'"---- | If '-XParallelArrays' given, we populate the builtin table for desugaring--- those.-initDPHBuiltins :: DsM a -> DsM a-initDPHBuiltins thing_inside-  = do { doInitBuiltins <- checkLoadDAP-       ; if doInitBuiltins-         then dsInitPArrBuiltin thing_inside-         else thing_inside-       }--checkLoadDAP :: DsM Bool-checkLoadDAP-  = do { paEnabled <- xoptM LangExt.ParallelArrays-       ; mod <- getModule-         -- do not load 'Data.Array.Parallel' iff compiling 'base:GHC.PArr' or a-         -- module called 'dATA_ARRAY_PARALLEL_NAME'; see also the comments at the top-         -- of 'base:GHC.PArr' and 'Data.Array.Parallel' in the DPH libraries-       ; return $ paEnabled &&-                  mod /= gHC_PARR' &&-                  moduleName mod /= dATA_ARRAY_PARALLEL_NAME-       }---- | Populate 'ds_parr_bi' from 'ds_dph_env'.----dsInitPArrBuiltin :: DsM a -> DsM a-dsInitPArrBuiltin thing_inside-  = do { lengthPVar         <- externalVar (fsLit "lengthP")-       ; replicatePVar      <- externalVar (fsLit "replicateP")-       ; singletonPVar      <- externalVar (fsLit "singletonP")-       ; mapPVar            <- externalVar (fsLit "mapP")-       ; filterPVar         <- externalVar (fsLit "filterP")-       ; zipPVar            <- externalVar (fsLit "zipP")-       ; crossMapPVar       <- externalVar (fsLit "crossMapP")-       ; indexPVar          <- externalVar (fsLit "!:")-       ; emptyPVar          <- externalVar (fsLit "emptyP")-       ; appPVar            <- externalVar (fsLit "+:+")-       -- ; enumFromToPVar     <- externalVar (fsLit "enumFromToP")-       -- ; enumFromThenToPVar <- externalVar (fsLit "enumFromThenToP")-       ; enumFromToPVar     <- return arithErr-       ; enumFromThenToPVar <- return arithErr--       ; updGblEnv (\env -> env {ds_parr_bi = PArrBuiltin-                                              { lengthPVar         = lengthPVar-                                              , replicatePVar      = replicatePVar-                                              , singletonPVar      = singletonPVar-                                              , mapPVar            = mapPVar-                                              , filterPVar         = filterPVar-                                              , zipPVar            = zipPVar-                                              , crossMapPVar       = crossMapPVar-                                              , indexPVar          = indexPVar-                                              , emptyPVar          = emptyPVar-                                              , appPVar            = appPVar-                                              , enumFromToPVar     = enumFromToPVar-                                              , enumFromThenToPVar = enumFromThenToPVar-                                              } })-                   thing_inside-       }-  where-    externalVar :: FastString -> DsM Var-    externalVar fs = dsLookupDPHRdrEnv (mkVarOccFS fs) >>= dsLookupGlobalId--    arithErr = panic "Arithmetic sequences have to wait until we support type classes"---- |Get a name from "Data.Array.Parallel" for the desugarer, from the--- 'ds_parr_bi' component of the global desugerar environment.----dsDPHBuiltin :: (PArrBuiltin -> a) -> DsM a-dsDPHBuiltin sel = (sel . ds_parr_bi) <$> getGblEnv---- |Lookup a name exported by 'Data.Array.Parallel.Prim' or 'Data.Array.Parallel.Prim'.---  Panic if there isn't one, or if it is defined multiple times.-dsLookupDPHRdrEnv :: OccName -> DsM Name-dsLookupDPHRdrEnv occ-  = liftM (fromMaybe (pprPanic nameNotFound (ppr occ)))-  $ dsLookupDPHRdrEnv_maybe occ-  where nameNotFound  = "Name not found in 'Data.Array.Parallel' or 'Data.Array.Parallel.Prim':"---- |Lookup a name exported by 'Data.Array.Parallel.Prim' or 'Data.Array.Parallel.Prim',---  returning `Nothing` if it's not defined. Panic if it's defined multiple times.-dsLookupDPHRdrEnv_maybe :: OccName -> DsM (Maybe Name)-dsLookupDPHRdrEnv_maybe occ-  = do { env <- ds_dph_env <$> getGblEnv-       ; let gres = lookupGlobalRdrEnv env occ-       ; case gres of-           []    -> return $ Nothing-           [gre] -> return $ Just $ gre_name gre-           _     -> pprPanic multipleNames (ppr occ)-       }-  where multipleNames = "Multiple definitions in 'Data.Array.Parallel' and 'Data.Array.Parallel.Prim':"  -- | Inject a trace message into the compiled program. Whereas -- pprTrace prints out information *while compiling*, pprRuntimeTrace
deSugar/DsUsage.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE CPP #-}+{-# LANGUAGE TupleSections #-}  module DsUsage (     -- * Dependency/fingerprinting code (used by MkIface)@@ -21,12 +22,17 @@ import UniqFM import Fingerprint import Maybes+import Packages+import Finder +import Control.Monad (filterM) import Data.List import Data.IORef import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Set as Set+import System.Directory+import System.FilePath  {- Note [Module self-dependency]    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -49,14 +55,18 @@  -- | Extract information from the rename and typecheck phases to produce -- a dependencies information for the module being compiled.-mkDependencies :: TcGblEnv -> IO Dependencies-mkDependencies-          TcGblEnv{ tcg_mod = mod,+--+-- The first argument is additional dependencies from plugins+mkDependencies :: InstalledUnitId -> [Module] -> TcGblEnv -> IO Dependencies+mkDependencies iuid pluginModules+          (TcGblEnv{ tcg_mod = mod,                     tcg_imports = imports,                     tcg_th_used = th_var-                  }+                  })  = do       -- Template Haskell used?+      let (dep_plgins, ms) = unzip [ (moduleName mn, mn) | mn <- pluginModules ]+          plugin_dep_pkgs = filter (/= iuid) (map (toInstalledUnitId . moduleUnitId) ms)       th_used <- readIORef th_var       let dep_mods = modDepsElts (delFromUFM (imp_dep_mods imports)                                              (moduleName mod))@@ -71,9 +81,11 @@                 -- We must also remove self-references from imp_orphs. See                 -- Note [Module self-dependency] -          pkgs | th_used   = Set.insert (toInstalledUnitId thUnitId) (imp_dep_pkgs imports)-               | otherwise = imp_dep_pkgs imports+          raw_pkgs = foldr Set.insert (imp_dep_pkgs imports) plugin_dep_pkgs +          pkgs | th_used   = Set.insert (toInstalledUnitId thUnitId) raw_pkgs+               | otherwise = raw_pkgs+           -- Set the packages required to be Safe according to Safe Haskell.           -- See Note [RnNames . Tracking Trust Transitively]           sorted_pkgs = sort (Set.toList pkgs)@@ -83,6 +95,7 @@       return Deps { dep_mods   = dep_mods,                     dep_pkgs   = dep_pkgs',                     dep_orphs  = dep_orphs,+                    dep_plgins = dep_plgins,                     dep_finsts = sortBy stableModuleCmp (imp_finsts imports) }                     -- sort to get into canonical order                     -- NB. remember to use lexicographic ordering@@ -90,11 +103,14 @@ mkUsedNames :: TcGblEnv -> NameSet mkUsedNames TcGblEnv{ tcg_dus = dus } = allUses dus -mkUsageInfo :: HscEnv -> Module -> ImportedMods -> NameSet -> [FilePath] -> [(Module, Fingerprint)] -> IO [Usage]+mkUsageInfo :: HscEnv -> Module -> ImportedMods -> NameSet -> [FilePath]+            -> [(Module, Fingerprint)] -> [ModIface] -> IO [Usage] mkUsageInfo hsc_env this_mod dir_imp_mods used_names dependent_files merged+  pluginModules   = do     eps <- hscEPS hsc_env     hashes <- mapM getFileHash dependent_files+    plugin_usages <- mapM (mkPluginUsage hsc_env) pluginModules     let mod_usages = mk_mod_usage_info (eps_PIT eps) hsc_env this_mod                                        dir_imp_mods used_names         usages = mod_usages ++ [ UsageFile { usg_file_path = f@@ -105,10 +121,119 @@                                       usg_mod_hash = hash                                     }                                | (mod, hash) <- merged ]+                            ++ concat plugin_usages     usages `seqList` return usages     -- seq the list of Usages returned: occasionally these     -- don't get evaluated for a while and we can end up hanging on to     -- the entire collection of Ifaces.++{- Note [Plugin dependencies]+Modules for which plugins were used in the compilation process, should be+recompiled whenever one of those plugins changes. But how do we know if a+plugin changed from the previous time a module was compiled?++We could try storing the fingerprints of the interface files of plugins in+the interface file of the module. And see if there are changes between+compilation runs. However, this is pretty much a non-option because interface+fingerprints of plugin modules are fairly stable, unless you compile plugins+with optimisations turned on, and give basically all binders an INLINE pragma.++So instead:++  * For plugins that were build locally: we store the filepath and hash of the+    object files of the module with the `plugin` binder, and the object files of+    modules that are dependencies of the plugin module and belong to the same+    `UnitId` as the plugin+  * For plugins in an external package: we store the filepath and hash of+    the dynamic library containing the plugin module.++During recompilation we then compare the hashes of those files again to see+if anything has changed.++One issue with this approach is that object files are currently (GHC 8.6.1)+not created fully deterministicly, which could sometimes induce accidental+recompilation of a module for which plugins were used in the compile process.++One way to improve this is to either:++  * Have deterministic object file creation+  * Create and store implementation hashes, which would be based on the Core+    of the module and the implementation hashes of its dependencies, and then+    compare implementation hashes for recompilation. Creation of implementation+    hashes is however potentially expensive.+-}+mkPluginUsage :: HscEnv -> ModIface -> IO [Usage]+mkPluginUsage hsc_env pluginModule+  = case lookupPluginModuleWithSuggestions dflags pNm Nothing of+    -- The plug is from an external package, we just look up the dylib that+    -- contains the plugin+    LookupFound _ pkg -> do+      let searchPaths = collectLibraryPaths dflags [pkg]+          libs        = packageHsLibs dflags pkg+          dynlibLocs  = [ searchPath </> mkHsSOName platform lib+                        | searchPath <- searchPaths+                        , lib <- libs+                        ]+      dynlibs <- filterM doesFileExist dynlibLocs+      case dynlibs of+        [] -> pprPanic+                ("mkPluginUsage: no dylibs, tried:\n" ++ unlines dynlibLocs)+                (ppr pNm)+        _  -> mapM hashFile (nub dynlibs)+    _ -> do+      foundM <- findPluginModule hsc_env pNm+      case foundM of+        -- The plugin was built locally, look up the object file containing+        -- the `plugin` binder, and all object files belong to modules that are+        -- transitive dependencies of the plugin that belong to the same package+        Found ml _ -> do+          pluginObject <- hashFile  (ml_obj_file ml)+          depObjects   <- catMaybes <$> mapM lookupObjectFile deps+          return (nub (pluginObject : depObjects))+        _ -> pprPanic "mkPluginUsage: no object or dylib" (ppr pNm)+  where+    -- plugins are shared libraries, so WayDyn should be part of the dflags in+    -- order to get the correct filenames and library paths.+    --+    -- We can distinguish two scenarios:+    --+    -- 1. The dflags do not contain WayDyn, in this case we need to remove+    --    all other ways and only add WayDyn. Why? Because other ways change+    --    the library tags, i.e. WayProf adds `_p`, and we would end up looking+    --    for a profiled plugin which might not be installed. See #15492+    --+    -- 2. The dflags do contain WayDyn, in this case we can leave the ways as+    --    is, because the plugin must be compiled with the same ways as the+    --    module that is currently being build, e.g., if the module is+    --    build with WayDyn and WayProf, then the plugin that was used+    --    would've also had to been build with WayProf (and WayDyn).+    dflags1  = hsc_dflags hsc_env+    dflags   = if WayDyn `elem` ways dflags1+                 then dflags1+                 else updateWays (addWay' WayDyn (dflags1 {ways = []}))+    platform = targetPlatform dflags+    pNm      = moduleName (mi_module pluginModule)+    pPkg     = moduleUnitId (mi_module pluginModule)+    deps     = map fst (dep_mods (mi_deps pluginModule))++    -- loopup object file for a plugin dependencies from the same package as the+    -- the plugin+    lookupObjectFile nm = do+      foundM <- findImportedModule hsc_env nm Nothing+      case foundM of+        Found ml m+          | moduleUnitId m == pPkg -> Just <$> hashFile (ml_obj_file ml)+          | otherwise              -> return Nothing+        _ -> pprPanic "mkPluginUsage: no object for dependency"+                      (ppr pNm <+> ppr nm)++    hashFile f = do+      fExist <- doesFileExist f+      if fExist+         then do+            h <- getFileHash f+            return (UsageFile f h)+         else pprPanic "mkPluginUsage: file not found" (ppr pNm <+> text f)  mk_mod_usage_info :: PackageIfaceTable               -> HscEnv
deSugar/DsUtils.hs view
@@ -9,6 +9,8 @@ -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}  -- | Utility functions for constructing Core syntax, principally for desugaring module DsUtils (@@ -35,7 +37,8 @@         mkSelectorBinds,          selectSimpleMatchVarL, selectMatchVars, selectMatchVar,-        mkOptTickBox, mkBinaryTickBox, decideBangHood, addBang+        mkOptTickBox, mkBinaryTickBox, decideBangHood, addBang,+        isTrueLHsExpr     ) where  #include "HsVersions.h"@@ -95,6 +98,7 @@ -}  selectSimpleMatchVarL :: LPat GhcTc -> DsM Id+-- Postcondition: the returned Id has an Internal Name selectSimpleMatchVarL pat = selectMatchVar (unLoc pat)  -- (selectMatchVars ps tys) chooses variables of type tys@@ -114,21 +118,22 @@ -- And nowadays we won't, because the (x::Int) will be wrapped in a CoPat  selectMatchVars :: [Pat GhcTc] -> DsM [Id]+-- Postcondition: the returned Ids have Internal Names selectMatchVars ps = mapM selectMatchVar ps  selectMatchVar :: Pat GhcTc -> DsM Id-selectMatchVar (BangPat pat) = selectMatchVar (unLoc pat)-selectMatchVar (LazyPat pat) = selectMatchVar (unLoc pat)-selectMatchVar (ParPat pat)  = selectMatchVar (unLoc pat)-selectMatchVar (VarPat var)  = return (localiseId (unLoc var))+-- Postcondition: the returned Id has an Internal Name+selectMatchVar (BangPat _ pat) = selectMatchVar (unLoc pat)+selectMatchVar (LazyPat _ pat) = selectMatchVar (unLoc pat)+selectMatchVar (ParPat _ pat)  = selectMatchVar (unLoc pat)+selectMatchVar (VarPat _ var)  = return (localiseId (unLoc var))                                   -- Note [Localise pattern binders]-selectMatchVar (AsPat var _) = return (unLoc var)-selectMatchVar other_pat     = newSysLocalDsNoLP (hsPatType other_pat)+selectMatchVar (AsPat _ var _) = return (unLoc var)+selectMatchVar other_pat       = newSysLocalDsNoLP (hsPatType other_pat)                                   -- OK, better make up one... -{--Note [Localise pattern binders]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Localise pattern binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider     module M where                [Just a] = e After renaming it looks like@@ -164,6 +169,7 @@ runs on the output of the desugarer, so all is well by the end of the desugaring pass. +See also Note [MatchIds] in Match.hs  ************************************************************************ *                                                                      *@@ -280,18 +286,15 @@                             alt_result :: MatchResult }  mkCoAlgCaseMatchResult-  :: DynFlags-  -> Id                 -- Scrutinee+  :: Id                 -- Scrutinee   -> Type               -- Type of exp   -> [CaseAlt DataCon]  -- Alternatives (bndrs *include* tyvars, dicts)   -> MatchResult-mkCoAlgCaseMatchResult dflags var ty match_alts+mkCoAlgCaseMatchResult var ty match_alts   | isNewtype  -- Newtype case; use a let   = ASSERT( null (tail match_alts) && null (tail arg_ids1) )     mkCoLetMatchResult (NonRec arg_id1 newtype_rhs) match_result1 -  | isPArrFakeAlts match_alts-  = MatchResult CanFail $ mkPArrCase dflags var ty (sort_alts match_alts)   | otherwise   = mkDataConCase var ty match_alts   where@@ -309,34 +312,6 @@                                                 -- (not that splitTyConApp does, these days)     newtype_rhs = unwrapNewTypeBody tc ty_args (Var var) -        --- Stuff for parallel arrays-        ---        -- Concerning `isPArrFakeAlts':-        ---        --  * it is *not* sufficient to just check the type of the type-        --   constructor, as we have to be careful not to confuse the real-        --   representation of parallel arrays with the fake constructors;-        --   moreover, a list of alternatives must not mix fake and real-        --   constructors (this is checked earlier on)-        ---        -- FIXME: We actually go through the whole list and make sure that-        --        either all or none of the constructors are fake parallel-        --        array constructors.  This is to spot equations that mix fake-        --        constructors with the real representation defined in-        --        `PrelPArr'.  It would be nicer to spot this situation-        --        earlier and raise a proper error message, but it can really-        --        only happen in `PrelPArr' anyway.-        ----    isPArrFakeAlts :: [CaseAlt DataCon] -> Bool-    isPArrFakeAlts [alt] = isPArrFakeCon (alt_pat alt)-    isPArrFakeAlts (alt:alts) =-      case (isPArrFakeCon (alt_pat alt), isPArrFakeAlts alts) of-        (True , True ) -> True-        (False, False) -> False-        _              -> panic "DsUtils: you may not mix `[:...:]' with `PArr' patterns"-    isPArrFakeAlts [] = panic "DsUtils: unexpectedly found an empty list of PArr fake alternatives"- mkCoSynCaseMatchResult :: Id -> Type -> CaseAlt PatSyn -> MatchResult mkCoSynCaseMatchResult var ty alt = MatchResult CanFail $ mkPatSynCase var ty alt @@ -410,49 +385,6 @@         = mkUniqSet data_cons `minusUniqSet` mentioned_constructors     exhaustive_case = isEmptyUniqSet un_mentioned_constructors ---- Stuff for parallel arrays------  * the following is to desugar cases over fake constructors for---   parallel arrays, which are introduced by `tidy1' in the `PArrPat'---   case----mkPArrCase :: DynFlags -> Id -> Type -> [CaseAlt DataCon] -> CoreExpr-           -> DsM CoreExpr-mkPArrCase dflags var ty sorted_alts fail = do-    lengthP <- dsDPHBuiltin lengthPVar-    alt <- unboxAlt-    return (mkWildCase (len lengthP) intTy ty [alt])-  where-    elemTy      = case splitTyConApp (idType var) of-        (_, [elemTy]) -> elemTy-        _             -> panic panicMsg-    panicMsg    = "DsUtils.mkCoAlgCaseMatchResult: not a parallel array?"-    len lengthP = mkApps (Var lengthP) [Type elemTy, Var var]-    ---    unboxAlt = do-        l      <- newSysLocalDs intPrimTy-        indexP <- dsDPHBuiltin indexPVar-        alts   <- mapM (mkAlt indexP) sorted_alts-        return (DataAlt intDataCon, [l], mkWildCase (Var l) intPrimTy ty (dft : alts))-      where-        dft  = (DEFAULT, [], fail)--    ---    -- each alternative matches one array length (corresponding to one-    -- fake array constructor), so the match is on a literal; each-    -- alternative's body is extended by a local binding for each-    -- constructor argument, which are bound to array elements starting-    -- with the first-    ---    mkAlt indexP alt@MkCaseAlt{alt_result = MatchResult _ bodyFun} = do-        body <- bodyFun fail-        return (LitAlt lit, [], mkCoreLets binds body)-      where-        lit   = MachInt $ toInteger (dataConSourceArity (alt_pat alt))-        binds = [NonRec arg (indexExpr i) | (i, arg) <- zip [1..] (alt_bndrs alt)]-        ---        indexExpr i = mkApps (Var indexP) [Type elemTy, Var var, mkIntExpr dflags i]- {- ************************************************************************ *                                                                      *@@ -736,7 +668,7 @@                 -- and all the desugared binds  mkSelectorBinds ticks pat val_expr-  | L _ (VarPat (L _ v)) <- pat'     -- Special case (A)+  | L _ (VarPat _ (L _ v)) <- pat'     -- Special case (A)   = return (v, [(v, val_expr)])    | is_flat_prod_lpat pat'           -- Special case (B)@@ -760,7 +692,7 @@    | otherwise                          -- General case (C)   = do { tuple_var  <- newSysLocalDs tuple_ty-       ; error_expr <- mkErrorAppDs iRREFUT_PAT_ERROR_ID tuple_ty (ppr pat')+       ; error_expr <- mkErrorAppDs pAT_ERROR_ID tuple_ty (ppr pat')        ; tuple_expr <- matchSimply val_expr PatBindRhs pat                                    local_tuple error_expr        ; let mk_tup_bind tick binder@@ -783,17 +715,17 @@  strip_bangs :: LPat a -> LPat a -- Remove outermost bangs and parens-strip_bangs (L _ (ParPat p))  = strip_bangs p-strip_bangs (L _ (BangPat p)) = strip_bangs p-strip_bangs lp                = lp+strip_bangs (L _ (ParPat _ p))  = strip_bangs p+strip_bangs (L _ (BangPat _ p)) = strip_bangs p+strip_bangs lp                  = lp  is_flat_prod_lpat :: LPat a -> Bool is_flat_prod_lpat p = is_flat_prod_pat (unLoc p)  is_flat_prod_pat :: Pat a -> Bool-is_flat_prod_pat (ParPat p)            = is_flat_prod_lpat p-is_flat_prod_pat (TuplePat ps Boxed _) = all is_triv_lpat ps-is_flat_prod_pat (ConPatOut { pat_con = L _ pcon, pat_args = ps})+is_flat_prod_pat (ParPat _ p)          = is_flat_prod_lpat p+is_flat_prod_pat (TuplePat _ ps Boxed) = all is_triv_lpat ps+is_flat_prod_pat (ConPatOut { pat_con  = L _ pcon, pat_args = ps})   | RealDataCon con <- pcon   , isProductTyCon (dataConTyCon con)   = all is_triv_lpat (hsConPatArgs ps)@@ -803,10 +735,10 @@ is_triv_lpat p = is_triv_pat (unLoc p)  is_triv_pat :: Pat a -> Bool-is_triv_pat (VarPat _)  = True-is_triv_pat (WildPat _) = True-is_triv_pat (ParPat p)  = is_triv_lpat p-is_triv_pat _           = False+is_triv_pat (VarPat {})  = True+is_triv_pat (WildPat{})  = True+is_triv_pat (ParPat _ p) = is_triv_lpat p+is_triv_pat _            = False   {- *********************************************************************@@ -828,7 +760,7 @@  mkVanillaTuplePat :: [OutPat GhcTc] -> Boxity -> Pat GhcTc -- A vanilla tuple pattern simply gets its type from its sub-patterns-mkVanillaTuplePat pats box = TuplePat pats box (map hsLPatType pats)+mkVanillaTuplePat pats box = TuplePat (map hsLPatType pats) pats box  -- The Big equivalents for the source tuple expressions mkBigLHsVarTupId :: [Id] -> LHsExpr GhcTc@@ -975,16 +907,41 @@  -- ******************************************************************* +{- Note [decideBangHood]+~~~~~~~~~~~~~~~~~~~~~~~~+With -XStrict we may make /outermost/ patterns more strict.+E.g.+       let (Just x) = e in ...+          ==>+       let !(Just x) = e in ...+and+       f x = e+          ==>+       f !x = e++This adjustment is done by decideBangHood,++  * Just before constructing an EqnInfo, in Match+      (matchWrapper and matchSinglePat)++  * When desugaring a pattern-binding in DsBinds.dsHsBind++Note that it is /not/ done recursively.  See the -XStrict+spec in the user manual.++Specifically:+   ~pat    => pat    -- when -XStrict (even if pat = ~pat')+   !pat    => !pat   -- always+   pat     => !pat   -- when -XStrict+   pat     => pat    -- otherwise+-}++ -- | Use -XStrict to add a ! or remove a ~------ Examples:--- ~pat    => pat    -- when -XStrict (even if pat = ~pat')--- !pat    => !pat   -- always--- pat     => !pat   -- when -XStrict--- pat     => pat    -- otherwise+-- See Note [decideBangHood] decideBangHood :: DynFlags-               -> LPat id  -- ^ Original pattern-               -> LPat id  -- Pattern with bang if necessary+               -> LPat GhcTc  -- ^ Original pattern+               -> LPat GhcTc  -- Pattern with bang if necessary decideBangHood dflags lpat   | not (xopt LangExt.Strict dflags)   = lpat@@ -993,19 +950,49 @@   where     go lp@(L l p)       = case p of-           ParPat p    -> L l (ParPat (go p))-           LazyPat lp' -> lp'-           BangPat _   -> lp-           _           -> L l (BangPat lp)+           ParPat x p    -> L l (ParPat x (go p))+           LazyPat _ lp' -> lp'+           BangPat _ _   -> lp+           _             -> L l (BangPat noExt lp)  -- | Unconditionally make a 'Pat' strict.-addBang :: LPat id -- ^ Original pattern-        -> LPat id -- ^ Banged pattern+addBang :: LPat GhcTc -- ^ Original pattern+        -> LPat GhcTc -- ^ Banged pattern addBang = go   where     go lp@(L l p)       = case p of-           ParPat p    -> L l (ParPat (go p))-           LazyPat lp' -> L l (BangPat lp')-           BangPat _   -> lp-           _           -> L l (BangPat lp)+           ParPat x p    -> L l (ParPat x (go p))+           LazyPat _ lp' -> L l (BangPat noExt lp')+                                  -- Should we bring the extension value over?+           BangPat _ _   -> lp+           _             -> L l (BangPat noExt lp)++isTrueLHsExpr :: LHsExpr GhcTc -> Maybe (CoreExpr -> DsM CoreExpr)++-- Returns Just {..} if we're sure that the expression is True+-- I.e.   * 'True' datacon+--        * 'otherwise' Id+--        * Trivial wappings of these+-- The arguments to Just are any HsTicks that we have found,+-- because we still want to tick then, even it they are always evaluated.+isTrueLHsExpr (L _ (HsVar _ (L _ v))) |  v `hasKey` otherwiseIdKey+                                      || v `hasKey` getUnique trueDataConId+                                              = Just return+        -- trueDataConId doesn't have the same unique as trueDataCon+isTrueLHsExpr (L _ (HsConLikeOut _ con))+  | con `hasKey` getUnique trueDataCon = Just return+isTrueLHsExpr (L _ (HsTick _ tickish e))+    | Just ticks <- isTrueLHsExpr e+    = Just (\x -> do wrapped <- ticks x+                     return (Tick tickish wrapped))+   -- This encodes that the result is constant True for Hpc tick purposes;+   -- which is specifically what isTrueLHsExpr is trying to find out.+isTrueLHsExpr (L _ (HsBinTick _ ixT _ e))+    | Just ticks <- isTrueLHsExpr e+    = Just (\x -> do e <- ticks x+                     this_mod <- getModule+                     return (Tick (HpcTick this_mod ixT) e))++isTrueLHsExpr (L _ (HsPar _ e))         = isTrueLHsExpr e+isTrueLHsExpr _                       = Nothing
+ deSugar/ExtractDocs.hs view
@@ -0,0 +1,344 @@+-- | Extract docs from the renamer output so they can be be serialized.+{-# language LambdaCase #-}+{-# language TypeFamilies #-}+module ExtractDocs (extractDocs) where++import GhcPrelude+import Bag+import HsBinds+import HsDoc+import HsDecls+import HsExtension+import HsTypes+import HsUtils+import Name+import NameSet+import SrcLoc+import TcRnTypes++import Control.Applicative+import Data.List+import Data.Map (Map)+import qualified Data.Map as M+import Data.Maybe+import Data.Semigroup++-- | Extract docs from renamer output.+extractDocs :: TcGblEnv+            -> (Maybe HsDocString, DeclDocMap, ArgDocMap)+            -- ^+            -- 1. Module header+            -- 2. Docs on top level declarations+            -- 3. Docs on arguments+extractDocs TcGblEnv { tcg_semantic_mod = mod+                     , tcg_rn_decls = mb_rn_decls+                     , tcg_insts = insts+                     , tcg_fam_insts = fam_insts+                     , tcg_doc_hdr = mb_doc_hdr+                     } =+    (unLoc <$> mb_doc_hdr, DeclDocMap doc_map, ArgDocMap arg_map)+  where+    (doc_map, arg_map) = maybe (M.empty, M.empty)+                               (mkMaps local_insts)+                               mb_decls_with_docs+    mb_decls_with_docs = topDecls <$> mb_rn_decls+    local_insts = filter (nameIsLocalOrFrom mod)+                         $ map getName insts ++ map getName fam_insts++-- | Create decl and arg doc-maps by looping through the declarations.+-- For each declaration, find its names, its subordinates, and its doc strings.+mkMaps :: [Name]+       -> [(LHsDecl GhcRn, [HsDocString])]+       -> (Map Name (HsDocString), Map Name (Map Int (HsDocString)))+mkMaps instances decls =+    ( f' (map (nubByName fst) decls')+    , f  (filterMapping (not . M.null) args)+    )+  where+    (decls', args) = unzip (map mappings decls)++    f :: (Ord a, Semigroup b) => [[(a, b)]] -> Map a b+    f = M.fromListWith (<>) . concat++    f' :: Ord a => [[(a, HsDocString)]] -> Map a HsDocString+    f' = M.fromListWith appendDocs . concat++    filterMapping :: (b -> Bool) ->  [[(a, b)]] -> [[(a, b)]]+    filterMapping p = map (filter (p . snd))++    mappings :: (LHsDecl GhcRn, [HsDocString])+             -> ( [(Name, HsDocString)]+                , [(Name, Map Int (HsDocString))]+                )+    mappings (L l decl, docStrs) =+           (dm, am)+      where+        doc = concatDocs docStrs+        args = declTypeDocs decl++        subs :: [(Name, [(HsDocString)], Map Int (HsDocString))]+        subs = subordinates instanceMap decl++        (subDocs, subArgs) =+          unzip (map (\(_, strs, m) -> (concatDocs strs, m)) subs)++        ns = names l decl+        subNs = [ n | (n, _, _) <- subs ]+        dm = [(n, d) | (n, Just d) <- zip ns (repeat doc) ++ zip subNs subDocs]+        am = [(n, args) | n <- ns] ++ zip subNs subArgs++    instanceMap :: Map SrcSpan Name+    instanceMap = M.fromList [(getSrcSpan n, n) | n <- instances]++    names :: SrcSpan -> HsDecl GhcRn -> [Name]+    names l (InstD _ d) = maybeToList (M.lookup loc instanceMap) -- See+                                                                 -- Note [1].+      where loc = case d of+              TyFamInstD _ _ -> l -- The CoAx's loc is the whole line, but only+                                  -- for TFs+              _ -> getInstLoc d+    names l (DerivD {}) = maybeToList (M.lookup l instanceMap) -- See Note [1].+    names _ decl = getMainDeclBinder decl++{-+Note [1]:+---------+We relate ClsInsts to InstDecls and DerivDecls using the SrcSpans buried+inside them. That should work for normal user-written instances (from+looking at GHC sources). We can assume that commented instances are+user-written. This lets us relate Names (from ClsInsts) to comments+(associated with InstDecls and DerivDecls).+-}++getMainDeclBinder :: HsDecl pass -> [IdP pass]+getMainDeclBinder (TyClD _ d) = [tcdName d]+getMainDeclBinder (ValD _ d) =+  case collectHsBindBinders d of+    []       -> []+    (name:_) -> [name]+getMainDeclBinder (SigD _ d) = sigNameNoLoc d+getMainDeclBinder (ForD _ (ForeignImport _ name _ _)) = [unLoc name]+getMainDeclBinder (ForD _ (ForeignExport _ _ _ _)) = []+getMainDeclBinder _ = []++sigNameNoLoc :: Sig pass -> [IdP pass]+sigNameNoLoc (TypeSig    _   ns _)         = map unLoc ns+sigNameNoLoc (ClassOpSig _ _ ns _)         = map unLoc ns+sigNameNoLoc (PatSynSig  _   ns _)         = map unLoc ns+sigNameNoLoc (SpecSig    _   n _ _)        = [unLoc n]+sigNameNoLoc (InlineSig  _   n _)          = [unLoc n]+sigNameNoLoc (FixSig _ (FixitySig _ ns _)) = map unLoc ns+sigNameNoLoc _                             = []++-- 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 = \case+  ClsInstD _ (ClsInstDecl { cid_poly_ty = ty }) -> getLoc (hsSigType ty)+  DataFamInstD _ (DataFamInstDecl+    { dfid_eqn = HsIB { hsib_body = FamEqn { feqn_tycon = L l _ }}}) -> l+  TyFamInstD _ (TyFamInstDecl+    -- Since CoAxioms' Names refer to the whole line for type family instances+    -- in particular, we need to dig a bit deeper to pull out the entire+    -- equation. This does not happen for data family instances, for some+    -- reason.+    { tfid_eqn = HsIB { hsib_body = FamEqn { feqn_rhs = L l _ }}}) -> l+  ClsInstD _ (XClsInstDecl _) -> error "getInstLoc"+  DataFamInstD _ (DataFamInstDecl (HsIB _ (XFamEqn _))) -> error "getInstLoc"+  TyFamInstD _ (TyFamInstDecl (HsIB _ (XFamEqn _))) -> error "getInstLoc"+  XInstDecl _ -> error "getInstLoc"+  DataFamInstD _ (DataFamInstDecl (XHsImplicitBndrs _)) -> error "getInstLoc"+  TyFamInstD _ (TyFamInstDecl (XHsImplicitBndrs _)) -> error "getInstLoc"++-- | Get all subordinate declarations inside a declaration, and their docs.+-- A subordinate declaration is something like the associate type or data+-- family of a type class.+subordinates :: Map SrcSpan Name+             -> HsDecl GhcRn+             -> [(Name, [(HsDocString)], Map Int (HsDocString))]+subordinates instMap decl = case decl of+  InstD _ (ClsInstD _ d) -> do+    DataFamInstDecl { dfid_eqn = HsIB { hsib_body =+      FamEqn { feqn_tycon = L l _+             , feqn_rhs   = defn }}} <- unLoc <$> cid_datafam_insts d+    [ (n, [], M.empty) | Just n <- [M.lookup l instMap] ] ++ dataSubs defn++  InstD _ (DataFamInstD _ (DataFamInstDecl (HsIB { hsib_body = d })))+    -> dataSubs (feqn_rhs d)+  TyClD _ d | isClassDecl d -> classSubs d+            | isDataDecl  d -> dataSubs (tcdDataDefn d)+  _ -> []+  where+    classSubs dd = [ (name, doc, declTypeDocs d) | (L _ d, doc) <- classDecls dd+                   , name <- getMainDeclBinder d, not (isValD d)+                   ]+    dataSubs :: HsDataDefn GhcRn+             -> [(Name, [HsDocString], Map Int (HsDocString))]+    dataSubs dd = constrs ++ fields ++ derivs+      where+        cons = map unLoc $ (dd_cons dd)+        constrs = [ ( unLoc cname+                    , maybeToList $ fmap unLoc $ con_doc c+                    , conArgDocs c)+                  | c <- cons, cname <- getConNames c ]+        fields  = [ (extFieldOcc n, maybeToList $ fmap unLoc doc, M.empty)+                  | RecCon flds <- map getConArgs cons+                  , L _ (ConDeclField _ ns _ doc) <- (unLoc flds)+                  , L _ n <- ns ]+        derivs  = [ (instName, [unLoc doc], M.empty)+                  | HsIB { hsib_body = L l (HsDocTy _ _ doc) }+                      <- concatMap (unLoc . deriv_clause_tys . unLoc) $+                           unLoc $ dd_derivs dd+                  , Just instName <- [M.lookup l instMap] ]++-- | Extract constructor argument docs from inside constructor decls.+conArgDocs :: ConDecl GhcRn -> Map Int (HsDocString)+conArgDocs con = case getConArgs con of+                   PrefixCon args -> go 0 (map unLoc args ++ ret)+                   InfixCon arg1 arg2 -> go 0 ([unLoc arg1, unLoc arg2] ++ ret)+                   RecCon _ -> go 1 ret+  where+    go n (HsDocTy _ _ (L _ ds) : tys) = M.insert n ds $ go (n+1) tys+    go n (_ : tys) = go (n+1) tys+    go _ [] = M.empty++    ret = case con of+            ConDeclGADT { con_res_ty = res_ty } -> [ unLoc res_ty ]+            _ -> []++isValD :: HsDecl a -> Bool+isValD (ValD _ _) = True+isValD _ = False++-- | All the sub declarations of a class (that we handle), ordered by+-- source location, with documentation attached if it exists.+classDecls :: TyClDecl GhcRn -> [(LHsDecl GhcRn, [HsDocString])]+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_++-- | Extract function argument docs from inside top-level decls.+declTypeDocs :: HsDecl GhcRn -> Map Int (HsDocString)+declTypeDocs = \case+  SigD  _ (TypeSig _ _ ty)          -> typeDocs (unLoc (hsSigWcType ty))+  SigD  _ (ClassOpSig _ _ _ ty)     -> typeDocs (unLoc (hsSigType ty))+  SigD  _ (PatSynSig _ _ ty)        -> typeDocs (unLoc (hsSigType ty))+  ForD  _ (ForeignImport _ _ ty _)  -> typeDocs (unLoc (hsSigType ty))+  TyClD _ (SynDecl { tcdRhs = ty }) -> typeDocs (unLoc ty)+  _                                 -> M.empty++nubByName :: (a -> Name) -> [a] -> [a]+nubByName f ns = go emptyNameSet ns+  where+    go _ [] = []+    go s (x:xs)+      | y `elemNameSet` s = go s xs+      | otherwise         = let s' = extendNameSet s y+                            in x : go s' xs+      where+        y = f x++-- | Extract function argument docs from inside types.+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 _ (L _ (HsDocTy _ _ (L _ x))) (L _ ty)) =+       M.insert n x $ go (n+1) ty+    go n (HsFunTy _ _ ty) = go (n+1) (unLoc ty)+    go n (HsDocTy _ _ (L _ doc)) = M.singleton n doc+    go _ _ = M.empty++-- | The top-level declarations of a module that we care about,+-- ordered by source location, with documentation attached if it exists.+topDecls :: HsGroup GhcRn -> [(LHsDecl GhcRn, [HsDocString])]+topDecls = filterClasses . filterDecls . collectDocs . sortByLoc . ungroup++-- | 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_+  where+    typesigs (XValBindsLR (NValBinds _ sigs)) = filter (isUserSig . unLoc) sigs+    typesigs _ = error "expected ValBindsOut"++    valbinds (XValBindsLR (NValBinds binds _)) =+      concatMap bagToList . snd . unzip $ binds+    valbinds _ = error "expected ValBindsOut"++-- | Sort by source location+sortByLoc :: [Located a] -> [Located a]+sortByLoc = sortOn getLoc++-- | Collect docs and attach them to the right declarations.+--+-- A declaration may have multiple doc strings attached to it.+collectDocs :: [LHsDecl pass] -> [(LHsDecl pass, [HsDocString])]+-- ^ This is an example.+collectDocs = go Nothing []+  where+    go Nothing _ [] = []+    go (Just prev) docs [] = finished prev docs []+    go prev docs (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 (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)++    finished decl docs rest = (decl, reverse docs) : rest++-- | Filter out declarations that we don't handle in Haddock+filterDecls :: [(LHsDecl a, doc)] -> [(LHsDecl a, doc)]+filterDecls = filter (isHandled . unLoc . fst)+  where+    isHandled (ForD _ (ForeignImport {})) = True+    isHandled (TyClD {})  = True+    isHandled (InstD {})  = True+    isHandled (DerivD {}) = True+    isHandled (SigD _ d)  = isUserSig d+    isHandled (ValD {})   = True+    -- we keep doc declarations to be able to get at named docs+    isHandled (DocD {})   = True+    isHandled _ = False+++-- | Go through all class declarations and filter their sub-declarations+filterClasses :: [(LHsDecl a, doc)] -> [(LHsDecl a, doc)]+filterClasses decls = [ if isClassD d then (L loc (filterClass d), doc) else x+                      | x@(L loc d, doc) <- decls ]+  where+    filterClass (TyClD x c) =+      TyClD x $ c { tcdSigs =+        filter (liftA2 (||) (isUserSig . unLoc) isMinimalLSig) (tcdSigs c) }+    filterClass _ = error "expected TyClD"++-- | Was this signature given by the user?+isUserSig :: Sig name -> Bool+isUserSig TypeSig {}    = True+isUserSig ClassOpSig {} = True+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 = [ L loc (con decl) | L loc decl <- field struct ]
deSugar/Match.hs view
@@ -9,7 +9,8 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE TypeFamilies #-} -module Match ( match, matchEquations, matchWrapper, matchSimply, matchSinglePat ) where+module Match ( match, matchEquations, matchWrapper, matchSimply+             , matchSinglePat, matchSinglePatVar ) where  #include "HsVersions.h" @@ -39,7 +40,6 @@ import MatchLit import Type import Coercion ( eqCoercion )-import TcType ( toTcTypeBag ) import TyCon( isNewTyCon ) import TysWiredIn import SrcLoc@@ -153,6 +153,8 @@ 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).++See also Note [Localise pattern binders] in DsUtils -}  type MatchId = Id   -- See Note [Match Ids]@@ -251,7 +253,7 @@ matchCoercion :: [MatchId] -> Type -> [EquationInfo] -> DsM MatchResult -- Apply the coercion to the match variable and then match that matchCoercion (var:vars) ty (eqns@(eqn1:_))-  = do  { let CoPat co pat _ = firstPat eqn1+  = do  { let CoPat _ co pat _ = firstPat eqn1         ; let pat_ty' = hsPatType pat         ; var' <- newUniqueId var pat_ty'         ; match_result <- match (var':vars) ty $@@ -267,7 +269,7 @@   = do  { -- we could pass in the expr from the PgView,          -- but this needs to extract the pat anyway          -- to figure out the type of the fresh variable-         let ViewPat viewExpr (L _ pat) _ = firstPat eqn1+         let ViewPat _ viewExpr (L _ pat) = firstPat eqn1          -- do the rest of the compilation         ; let pat_ty' = hsPatType pat         ; var' <- newUniqueId var pat_ty'@@ -284,7 +286,7 @@ matchOverloadedList (var:vars) ty (eqns@(eqn1:_)) -- Since overloaded list patterns are treated as view patterns, -- the code is roughly the same as for matchView-  = do { let ListPat _ elt_ty (Just (_,e)) = firstPat eqn1+  = do { let ListPat (ListPatTc elt_ty (Just (_,e))) _ = firstPat eqn1        ; var' <- newUniqueId var (mkListTy elt_ty)  -- we construct the overall type by hand        ; match_result <- match (var':vars) ty $                             map (decomposeFirstPat getOLPat) eqns -- getOLPat builds the pattern inside as a non-overloaded version of the overloaded list pattern@@ -299,13 +301,14 @@ decomposeFirstPat _ _ = panic "decomposeFirstPat"  getCoPat, getBangPat, getViewPat, getOLPat :: Pat GhcTc -> Pat GhcTc-getCoPat (CoPat _ pat _)     = pat+getCoPat (CoPat _ _ pat _)   = pat getCoPat _                   = panic "getCoPat"-getBangPat (BangPat pat  )   = unLoc pat+getBangPat (BangPat _ pat  ) = unLoc pat getBangPat _                 = panic "getBangPat"-getViewPat (ViewPat _ pat _) = unLoc pat+getViewPat (ViewPat _ _ pat) = unLoc pat getViewPat _                 = panic "getViewPat"-getOLPat (ListPat pats ty (Just _)) = ListPat pats ty Nothing+getOLPat (ListPat (ListPatTc ty (Just _)) pats)+        = ListPat (ListPatTc ty Nothing)  pats getOLPat _                   = panic "getOLPat"  {-@@ -398,19 +401,19 @@ -- It eliminates many pattern forms (as-patterns, variable patterns, -- list patterns, etc) and returns any created bindings in the wrapper. -tidy1 v (ParPat pat)      = tidy1 v (unLoc pat)-tidy1 v (SigPatOut pat _) = tidy1 v (unLoc pat)-tidy1 _ (WildPat ty)      = return (idDsWrapper, WildPat ty)-tidy1 v (BangPat (L l p)) = tidy_bang_pat v l p+tidy1 v (ParPat _ pat)      = tidy1 v (unLoc pat)+tidy1 v (SigPat _ pat)      = tidy1 v (unLoc pat)+tidy1 _ (WildPat ty)        = return (idDsWrapper, WildPat ty)+tidy1 v (BangPat _ (L l p)) = tidy_bang_pat v l p          -- case v of { x -> mr[] }         -- = case v of { _ -> let x=v in mr[] }-tidy1 v (VarPat (L _ var))+tidy1 v (VarPat _ (L _ var))   = return (wrapBind var v, WildPat (idType var))          -- case v of { x@p -> mr[] }         -- = case v of { p -> let x=v in mr[] }-tidy1 v (AsPat (L _ var) pat)+tidy1 v (AsPat _ (L _ var) pat)   = do  { (wrap, pat') <- tidy1 v (unLoc pat)         ; return (wrapBind var v . wrap, pat') } @@ -425,7 +428,7 @@     The case expr for v_i is just: match [v] [(p, [], \ x -> Var v_i)] any_expr -} -tidy1 v (LazyPat pat)+tidy1 v (LazyPat _ pat)     -- This is a convenient place to check for unlifted types under a lazy pattern.     -- Doing this check during type-checking is unsatisfactory because we may     -- not fully know the zonked types yet. We sure do here.@@ -441,39 +444,31 @@         ; let sel_binds =  [NonRec b rhs | (b,rhs) <- sel_prs]         ; return (mkCoreLets sel_binds, WildPat (idType v)) } -tidy1 _ (ListPat pats ty Nothing)+tidy1 _ (ListPat (ListPatTc ty Nothing) pats )   = return (idDsWrapper, unLoc list_ConPat)   where     list_ConPat = foldr (\ x y -> mkPrefixConPat consDataCon [x, y] [ty])                         (mkNilPat ty)                         pats --- Introduce fake parallel array constructors to be able to handle parallel--- arrays with the existing machinery for constructor pattern-tidy1 _ (PArrPat pats ty)-  = return (idDsWrapper, unLoc parrConPat)-  where-    arity      = length pats-    parrConPat = mkPrefixConPat (parrFakeCon arity) pats [ty]--tidy1 _ (TuplePat pats boxity tys)+tidy1 _ (TuplePat tys pats boxity)   = return (idDsWrapper, unLoc tuple_ConPat)   where     arity = length pats     tuple_ConPat = mkPrefixConPat (tupleDataCon boxity arity) pats tys -tidy1 _ (SumPat pat alt arity tys)+tidy1 _ (SumPat tys pat alt arity)   = return (idDsWrapper, unLoc sum_ConPat)   where     sum_ConPat = mkPrefixConPat (sumDataCon alt arity) [pat] tys  -- LitPats: we *might* be able to replace these w/ a simpler form-tidy1 _ (LitPat lit)+tidy1 _ (LitPat _ lit)   = return (idDsWrapper, tidyLitPat lit)  -- NPats: we *might* be able to replace these w/ a simpler form-tidy1 _ (NPat (L _ lit) mb_neg eq ty)-  = return (idDsWrapper, tidyNPat tidyLitPat lit mb_neg eq ty)+tidy1 _ (NPat ty (L _ lit) mb_neg eq)+  = return (idDsWrapper, tidyNPat lit mb_neg eq ty)  -- Everything else goes through unchanged... @@ -484,20 +479,20 @@ tidy_bang_pat :: Id -> SrcSpan -> Pat GhcTc -> DsM (DsWrapper, Pat GhcTc)  -- Discard par/sig under a bang-tidy_bang_pat v _ (ParPat (L l p))      = tidy_bang_pat v l p-tidy_bang_pat v _ (SigPatOut (L l p) _) = tidy_bang_pat v l p+tidy_bang_pat v _ (ParPat _ (L l p)) = tidy_bang_pat v l p+tidy_bang_pat v _ (SigPat _ (L l p)) = tidy_bang_pat v l p  -- Push the bang-pattern inwards, in the hope that -- it may disappear next time-tidy_bang_pat v l (AsPat v' p)  = tidy1 v (AsPat v' (L l (BangPat p)))-tidy_bang_pat v l (CoPat w p t) = tidy1 v (CoPat w (BangPat (L l p)) t)+tidy_bang_pat v l (AsPat x v' p) = tidy1 v (AsPat x v' (L l (BangPat noExt p)))+tidy_bang_pat v l (CoPat x w p t)+  = tidy1 v (CoPat x w (BangPat noExt (L l p)) t)  -- Discard bang around strict pattern tidy_bang_pat v _ p@(LitPat {})    = tidy1 v p tidy_bang_pat v _ p@(ListPat {})   = tidy1 v p tidy_bang_pat v _ p@(TuplePat {})  = tidy1 v p tidy_bang_pat v _ p@(SumPat {})    = tidy1 v p-tidy_bang_pat v _ p@(PArrPat {})   = tidy1 v p  -- Data/newtype constructors tidy_bang_pat v l p@(ConPatOut { pat_con = L _ (RealDataCon dc)@@ -526,7 +521,7 @@ -- -- NB: SigPatIn, ConPatIn should not happen -tidy_bang_pat _ l p = return (idDsWrapper, BangPat (L l p))+tidy_bang_pat _ l p = return (idDsWrapper, BangPat noExt (L l p))  ------------------- push_bang_into_newtype_arg :: SrcSpan@@ -537,15 +532,16 @@ -- We are transforming   !(N p)   into   (N !p) push_bang_into_newtype_arg l _ty (PrefixCon (arg:args))   = ASSERT( null args)-    PrefixCon [L l (BangPat arg)]+    PrefixCon [L l (BangPat noExt arg)] push_bang_into_newtype_arg l _ty (RecCon rf)   | HsRecFields { rec_flds = L lf fld : flds } <- rf   , HsRecField { hsRecFieldArg = arg } <- fld   = ASSERT( null flds)-    RecCon (rf { rec_flds = [L lf (fld { hsRecFieldArg = L l (BangPat arg) })] })+    RecCon (rf { rec_flds = [L lf (fld { hsRecFieldArg+                                           = L l (BangPat noExt arg) })] }) push_bang_into_newtype_arg l ty (RecCon rf) -- If a user writes !(T {})   | HsRecFields { rec_flds = [] } <- rf-  = PrefixCon [L l (BangPat (noLoc (WildPat ty)))]+  = PrefixCon [L l (BangPat noExt (noLoc (WildPat ty)))] push_bang_into_newtype_arg _ _ cd   = pprPanic "push_bang_into_newtype_arg" (pprConArgs cd) @@ -705,8 +701,7 @@ -}  matchWrapper ctxt mb_scr (MG { mg_alts = L _ matches-                             , mg_arg_tys = arg_tys-                             , mg_res_ty = rhs_ty+                             , mg_ext = MatchGroupTc arg_tys rhs_ty                              , mg_origin = origin })   = do  { dflags <- getDynFlags         ; locn   <- getSrcSpanDs@@ -731,17 +726,18 @@     mk_eqn_info vars (L _ (Match { m_pats = pats, m_grhss = grhss }))       = do { dflags <- getDynFlags            ; let upats = map (unLoc . decideBangHood dflags) pats-                 dicts = toTcTypeBag (collectEvVarsPats upats) -- Only TcTyVars+                 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-           ; return (EqnInfo { eqn_pats = upats, eqn_rhs  = match_result}) }+           ; return (EqnInfo { eqn_pats = upats, eqn_rhs = match_result}) }+    mk_eqn_info _ (L _ (XMatch _)) = panic "matchWrapper"      handleWarnings = if isGenerated origin                      then discardWarningsDs                      else id-+matchWrapper _ _ (XMatchGroup _) = panic "matchWrapper"  matchEquations  :: HsMatchContext Name                 -> [MatchId] -> [EquationInfo] -> Type@@ -784,7 +780,7 @@ matchSinglePat :: CoreExpr -> HsMatchContext Name -> LPat GhcTc                -> Type -> MatchResult -> DsM MatchResult -- matchSinglePat ensures that the scrutinee is a variable--- and then calls match_single_pat_var+-- and then calls matchSinglePatVar -- -- matchSinglePat does not warn about incomplete patterns -- Used for things like [ e | pat <- stuff ], where@@ -792,17 +788,17 @@  matchSinglePat (Var var) ctx pat ty match_result   | not (isExternalName (idName var))-  = match_single_pat_var var ctx pat ty match_result+  = matchSinglePatVar var ctx pat ty match_result  matchSinglePat scrut hs_ctx pat ty match_result   = do { var           <- selectSimpleMatchVarL pat-       ; match_result' <- match_single_pat_var var hs_ctx pat ty match_result+       ; match_result' <- matchSinglePatVar var hs_ctx pat ty match_result        ; return (adjustMatchResult (bindNonRec var scrut) match_result') } -match_single_pat_var :: Id   -- See Note [Match Ids]-                     -> HsMatchContext Name -> LPat GhcTc-                     -> Type -> MatchResult -> DsM MatchResult-match_single_pat_var var ctx pat ty match_result+matchSinglePatVar :: Id   -- See Note [Match Ids]+                  -> HsMatchContext Name -> LPat GhcTc+                  -> Type -> MatchResult -> DsM MatchResult+matchSinglePatVar var ctx pat ty match_result   = ASSERT2( isInternalName (idName var), ppr var )     do { dflags <- getDynFlags        ; locn   <- getSrcSpanDs@@ -975,18 +971,18 @@     exp :: HsExpr GhcTc -> HsExpr GhcTc -> Bool     -- real comparison is on HsExpr's     -- strip parens-    exp (HsPar (L _ e)) e'   = exp e e'-    exp e (HsPar (L _ e'))   = exp e e'+    exp (HsPar _ (L _ e)) e'   = exp e e'+    exp e (HsPar _ (L _ e'))   = exp e e'     -- because the expressions do not necessarily have the same type,     -- we have to compare the wrappers-    exp (HsWrap h e) (HsWrap h' e') = wrap h h' && exp e e'-    exp (HsVar i) (HsVar i') =  i == i'-    exp (HsConLikeOut c) (HsConLikeOut c') = c == c'+    exp (HsWrap _ h e) (HsWrap _ h' e') = wrap h h' && exp e e'+    exp (HsVar _ i) (HsVar _ i') =  i == i'+    exp (HsConLikeOut _ c) (HsConLikeOut _ c') = c == c'     -- the instance for IPName derives using the id, so this works if the     -- above does-    exp (HsIPVar i) (HsIPVar i') = i == i'-    exp (HsOverLabel l x) (HsOverLabel l' x') = l == l' && x == x'-    exp (HsOverLit l) (HsOverLit l') =+    exp (HsIPVar _ i) (HsIPVar _ i') = i == i'+    exp (HsOverLabel _ l x) (HsOverLabel _ l' x') = l == l' && x == x'+    exp (HsOverLit _ l) (HsOverLit _ l') =         -- Overloaded lits are equal if they have the same type         -- and the data is the same.         -- this is coarser than comparing the SyntaxExpr's in l and l',@@ -994,20 +990,20 @@         -- because these expressions get written as a bunch of different variables         -- (presumably to improve sharing)         eqType (overLitType l) (overLitType l') && l == l'-    exp (HsApp e1 e2) (HsApp e1' e2') = lexp e1 e1' && lexp e2 e2'+    exp (HsApp _ e1 e2) (HsApp _ e1' e2') = lexp e1 e1' && lexp e2 e2'     -- the fixities have been straightened out by now, so it's safe     -- to ignore them?-    exp (OpApp l o _ ri) (OpApp l' o' _ ri') =+    exp (OpApp _ l o ri) (OpApp _ l' o' ri') =         lexp l l' && lexp o o' && lexp ri ri'-    exp (NegApp e n) (NegApp e' n') = lexp e e' && syn_exp n n'-    exp (SectionL e1 e2) (SectionL e1' e2') =+    exp (NegApp _ e n) (NegApp _ e' n') = lexp e e' && syn_exp n n'+    exp (SectionL _ e1 e2) (SectionL _ e1' e2') =         lexp e1 e1' && lexp e2 e2'-    exp (SectionR e1 e2) (SectionR e1' e2') =+    exp (SectionR _ e1 e2) (SectionR _ e1' e2') =         lexp e1 e1' && lexp e2 e2'-    exp (ExplicitTuple es1 _) (ExplicitTuple es2 _) =+    exp (ExplicitTuple _ es1 _) (ExplicitTuple _ es2 _) =         eq_list tup_arg es1 es2-    exp (ExplicitSum _ _ e _) (ExplicitSum _ _ e' _) = lexp e e'-    exp (HsIf _ e e1 e2) (HsIf _ e' e1' e2') =+    exp (ExplicitSum _ _ _ e) (ExplicitSum _ _ _ e') = lexp e e'+    exp (HsIf _ _ e e1 e2) (HsIf _ _ e' e1' e2') =         lexp e e' && lexp e1 e1' && lexp e2 e2'      -- Enhancement: could implement equality for more expressions@@ -1029,8 +1025,8 @@         wrap res_wrap1 res_wrap2      ----------    tup_arg (L _ (Present e1)) (L _ (Present e2)) = lexp e1 e2-    tup_arg (L _ (Missing t1)) (L _ (Missing t2)) = eqType t1 t2+    tup_arg (L _ (Present _ e1)) (L _ (Present _ e2)) = lexp e1 e2+    tup_arg (L _ (Missing t1))   (L _ (Missing t2))   = eqType t1 t2     tup_arg _ _ = False      ---------@@ -1053,8 +1049,8 @@      ---------     ev_term :: EvTerm -> EvTerm -> Bool-    ev_term (EvId a)       (EvId b)       = a==b-    ev_term (EvCoercion a) (EvCoercion b) = a `eqCoercion` b+    ev_term (EvExpr (Var a)) (EvExpr  (Var b)) = a==b+    ev_term (EvExpr (Coercion a)) (EvExpr (Coercion b)) = a `eqCoercion` b     ev_term _ _ = False      ---------@@ -1071,7 +1067,7 @@  | PatSynCon psyn <- con                = PgSyn psyn tys patGroup _ (WildPat {})                 = PgAny patGroup _ (BangPat {})                 = PgBang-patGroup _ (NPat (L _ OverLit {ol_val=oval}) mb_neg _ _) =+patGroup _ (NPat _ (L _ OverLit {ol_val=oval}) mb_neg _) =   case (oval, isJust mb_neg) of    (HsIntegral   i, False) -> PgN (fromInteger (il_value i))    (HsIntegral   i, True ) -> PgN (-fromInteger (il_value i))@@ -1079,14 +1075,15 @@    (HsFractional r, True ) -> PgN (-fl_value r)    (HsIsString _ s, _) -> ASSERT(isNothing mb_neg)                           PgOverS s-patGroup _ (NPlusKPat _ (L _ OverLit {ol_val=oval}) _ _ _ _) =+patGroup _ (NPlusKPat _ _ (L _ OverLit {ol_val=oval}) _ _ _) =   case oval of    HsIntegral i -> PgNpK (il_value i)    _ -> pprPanic "patGroup NPlusKPat" (ppr oval)-patGroup _ (CoPat _ p _)                = PgCo  (hsPatType p) -- Type of innelexp pattern-patGroup _ (ViewPat expr p _)           = PgView expr (hsPatType (unLoc p))-patGroup _ (ListPat _ _ (Just _))       = PgOverloadedList-patGroup dflags (LitPat lit)            = PgLit (hsLitKey dflags lit)+patGroup _ (CoPat _ _ p _)              = PgCo  (hsPatType p)+                                                    -- Type of innelexp pattern+patGroup _ (ViewPat _ expr p)           = PgView expr (hsPatType (unLoc p))+patGroup _ (ListPat (ListPatTc _ (Just _)) _) = PgOverloadedList+patGroup dflags (LitPat _ lit)          = PgLit (hsLitKey dflags lit) patGroup _ pat                          = pprPanic "patGroup" (ppr pat)  {-
deSugar/Match.hs-boot view
@@ -28,8 +28,8 @@         -> CoreExpr         -> DsM CoreExpr -matchSinglePat-        :: CoreExpr+matchSinglePatVar+        :: Id         -> HsMatchContext Name         -> LPat GhcTc         -> Type
deSugar/MatchCon.hs view
@@ -29,7 +29,6 @@ import NameEnv import FieldLabel ( flSelector ) import SrcLoc-import DynFlags import Outputable import Control.Monad(liftM) import Data.List (groupBy)@@ -93,9 +92,8 @@                -> DsM MatchResult -- Each group of eqns is for a single constructor matchConFamily (var:vars) ty groups-  = do dflags <- getDynFlags-       alts <- mapM (fmap toRealAlt . matchOneConLike vars ty) groups-       return (mkCoAlgCaseMatchResult dflags var ty alts)+  = do alts <- mapM (fmap toRealAlt . matchOneConLike vars ty) groups+       return (mkCoAlgCaseMatchResult var ty alts)   where     toRealAlt alt = case alt_pat alt of         RealDataCon dcon -> alt{ alt_pat = dcon }
deSugar/MatchLit.hs view
@@ -77,30 +77,32 @@ -}  dsLit :: HsLit GhcRn -> DsM CoreExpr-dsLit (HsStringPrim _ s) = return (Lit (MachStr s))-dsLit (HsCharPrim   _ c) = return (Lit (MachChar c))-dsLit (HsIntPrim    _ i) = return (Lit (MachInt i))-dsLit (HsWordPrim   _ w) = return (Lit (MachWord w))-dsLit (HsInt64Prim  _ i) = return (Lit (MachInt64 i))-dsLit (HsWord64Prim _ w) = return (Lit (MachWord64 w))-dsLit (HsFloatPrim  _ f) = return (Lit (MachFloat (fl_value f)))-dsLit (HsDoublePrim _ d) = return (Lit (MachDouble (fl_value d)))-dsLit (HsChar _ c)       = return (mkCharExpr c)-dsLit (HsString _ str)   = mkStringExprFS str-dsLit (HsInteger _ i _)  = mkIntegerExpr i-dsLit (HsInt _ i)        = do dflags <- getDynFlags-                              return (mkIntExpr dflags (il_value i))--dsLit (HsRat _ (FL _ _ val) ty) = do-  num   <- mkIntegerExpr (numerator val)-  denom <- mkIntegerExpr (denominator val)-  return (mkCoreConApps ratio_data_con [Type integer_ty, num, denom])-  where-    (ratio_data_con, integer_ty)-        = case tcSplitTyConApp ty of-                (tycon, [i_ty]) -> ASSERT(isIntegerTy i_ty && tycon `hasKey` ratioTyConKey)-                                   (head (tyConDataCons tycon), i_ty)-                x -> pprPanic "dsLit" (ppr x)+dsLit l = do+  dflags <- getDynFlags+  case l of+    HsStringPrim _ s -> return (Lit (MachStr s))+    HsCharPrim   _ c -> return (Lit (MachChar c))+    HsIntPrim    _ i -> return (Lit (mkMachIntWrap dflags i))+    HsWordPrim   _ w -> return (Lit (mkMachWordWrap dflags w))+    HsInt64Prim  _ i -> return (Lit (mkMachInt64Wrap dflags i))+    HsWord64Prim _ w -> return (Lit (mkMachWord64Wrap dflags w))+    HsFloatPrim  _ f -> return (Lit (MachFloat (fl_value f)))+    HsDoublePrim _ d -> return (Lit (MachDouble (fl_value d)))+    HsChar _ c       -> return (mkCharExpr c)+    HsString _ str   -> mkStringExprFS str+    HsInteger _ i _  -> mkIntegerExpr i+    HsInt _ i        -> return (mkIntExpr dflags (il_value i))+    XLit x           -> pprPanic "dsLit" (ppr x)+    HsRat _ (FL _ _ val) ty -> do+      num   <- mkIntegerExpr (numerator val)+      denom <- mkIntegerExpr (denominator val)+      return (mkCoreConApps ratio_data_con [Type integer_ty, num, denom])+      where+        (ratio_data_con, integer_ty)+            = case tcSplitTyConApp ty of+                    (tycon, [i_ty]) -> ASSERT(isIntegerTy i_ty && tycon `hasKey` ratioTyConKey)+                                       (head (tyConDataCons tycon), i_ty)+                    x -> pprPanic "dsLit" (ppr x)  dsOverLit :: HsOverLit GhcTc -> DsM CoreExpr dsOverLit lit = do { dflags <- getDynFlags@@ -110,12 +112,12 @@ dsOverLit' :: DynFlags -> HsOverLit GhcTc -> DsM CoreExpr -- Post-typechecker, the HsExpr field of an OverLit contains -- (an expression for) the literal value itself-dsOverLit' dflags (OverLit { ol_val = val, ol_rebindable = rebindable-                           , ol_witness = witness, ol_type = ty })+dsOverLit' dflags (OverLit { ol_val = val, ol_ext = OverLitTc rebindable ty+                           , ol_witness = witness })   | not rebindable   , Just expr <- shortCutLit dflags val ty = dsExpr expr        -- Note [Literal short cut]   | otherwise                              = dsExpr witness-+dsOverLit' _ XOverLit{} = panic "dsOverLit'" {- Note [Literal short cut] ~~~~~~~~~~~~~~~~~~~~~~~~@@ -159,20 +161,30 @@ warnAboutOverflowedLiterals dflags lit  | wopt Opt_WarnOverflowedLiterals dflags  , Just (i, tc) <- getIntegralLit lit-  = if      tc == intTyConName    then check i tc (Proxy :: Proxy Int)-    else if tc == int8TyConName   then check i tc (Proxy :: Proxy Int8)-    else if tc == int16TyConName  then check i tc (Proxy :: Proxy Int16)-    else if tc == int32TyConName  then check i tc (Proxy :: Proxy Int32)-    else if tc == int64TyConName  then check i tc (Proxy :: Proxy Int64)-    else if tc == wordTyConName   then check i tc (Proxy :: Proxy Word)-    else if tc == word8TyConName  then check i tc (Proxy :: Proxy Word8)-    else if tc == word16TyConName then check i tc (Proxy :: Proxy Word16)-    else if tc == word32TyConName then check i tc (Proxy :: Proxy Word32)-    else if tc == word64TyConName then check i tc (Proxy :: Proxy Word64)+  = if      tc == intTyConName     then check i tc (Proxy :: Proxy Int)+    else if tc == int8TyConName    then check i tc (Proxy :: Proxy Int8)+    else if tc == int16TyConName   then check i tc (Proxy :: Proxy Int16)+    else if tc == int32TyConName   then check i tc (Proxy :: Proxy Int32)+    else if tc == int64TyConName   then check i tc (Proxy :: Proxy Int64)+    else if tc == wordTyConName    then check i tc (Proxy :: Proxy Word)+    else if tc == word8TyConName   then check i tc (Proxy :: Proxy Word8)+    else if tc == word16TyConName  then check i tc (Proxy :: Proxy Word16)+    else if tc == word32TyConName  then check i tc (Proxy :: Proxy Word32)+    else if tc == word64TyConName  then check i tc (Proxy :: Proxy Word64)+    else if tc == naturalTyConName then checkPositive i tc     else return ()    | otherwise = return ()   where+    checkPositive :: Integer -> Name -> DsM ()+    checkPositive i tc+      = when (i < 0) $ do+        warnDs (Reason Opt_WarnOverflowedLiterals)+               (vcat [ text "Literal" <+> integer i+                       <+> text "is negative but" <+> ppr tc+                       <+> ptext (sLit "only supports positive numbers")+                     ])+     check :: forall a. (Bounded a, Integral a) => Integer -> Name -> Proxy a -> DsM ()     check i tc _proxy       = when (i < minB || i > maxB) $ do@@ -239,14 +251,14 @@ getLHsIntegralLit :: LHsExpr GhcTc -> Maybe (Integer, Name) -- See if the expression is an Integral literal -- Remember to look through automatically-added tick-boxes! (Trac #8384)-getLHsIntegralLit (L _ (HsPar e))            = getLHsIntegralLit e-getLHsIntegralLit (L _ (HsTick _ e))         = getLHsIntegralLit e-getLHsIntegralLit (L _ (HsBinTick _ _ e))    = getLHsIntegralLit e-getLHsIntegralLit (L _ (HsOverLit over_lit)) = getIntegralLit over_lit+getLHsIntegralLit (L _ (HsPar _ e))            = getLHsIntegralLit e+getLHsIntegralLit (L _ (HsTick _ _ e))         = getLHsIntegralLit e+getLHsIntegralLit (L _ (HsBinTick _ _ _ e))    = getLHsIntegralLit e+getLHsIntegralLit (L _ (HsOverLit _ over_lit)) = getIntegralLit over_lit getLHsIntegralLit _ = Nothing  getIntegralLit :: HsOverLit GhcTc -> Maybe (Integer, Name)-getIntegralLit (OverLit { ol_val = HsIntegral i, ol_type = ty })+getIntegralLit (OverLit { ol_val = HsIntegral i, ol_ext = OverLitTc _ ty })   | Just tc <- tyConAppTyCon_maybe ty   = Just (il_value i, tyConName tc) getIntegralLit _ = Nothing@@ -273,18 +285,13 @@                   (mkNilPat charTy) (unpackFS s)         -- The stringTy is the type of the whole pattern, not         -- the type to instantiate (:) or [] with!-tidyLitPat lit = LitPat lit+tidyLitPat lit = LitPat noExt lit  -----------------tidyNPat :: (HsLit GhcTc -> Pat GhcTc)   -- How to tidy a LitPat-                 -- We need this argument because tidyNPat is called-                 -- both by Match and by Check, but they tidy LitPats-                 -- slightly differently; and we must desugar-                 -- literals consistently (see Trac #5117)-         -> HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> SyntaxExpr GhcTc+tidyNPat :: HsOverLit GhcTc -> Maybe (SyntaxExpr GhcTc) -> SyntaxExpr GhcTc          -> Type          -> Pat GhcTc-tidyNPat tidy_lit_pat (OverLit val False _ ty) mb_neg _eq outer_ty+tidyNPat (OverLit (OverLitTc False ty) val _) mb_neg _eq outer_ty         -- False: Take short cuts only if the literal is not using rebindable syntax         --         -- Once that is settled, look for cases where the type of the@@ -300,7 +307,7 @@   | not type_change, isWordTy ty,   Just int_lit <- mb_int_lit                  = mk_con_pat wordDataCon   (HsWordPrim   NoSourceText int_lit)   | not type_change, isStringTy ty, Just str_lit <- mb_str_lit-                 = tidy_lit_pat (HsString NoSourceText str_lit)+                 = tidyLitPat (HsString NoSourceText str_lit)      -- 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@@ -313,7 +320,8 @@     type_change = not (outer_ty `eqType` ty)      mk_con_pat :: DataCon -> HsLit GhcTc -> Pat GhcTc-    mk_con_pat con lit = unLoc (mkPrefixConPat con [noLoc $ LitPat lit] [])+    mk_con_pat con lit+      = unLoc (mkPrefixConPat con [noLoc $ LitPat noExt lit] [])      mb_int_lit :: Maybe Integer     mb_int_lit = case (mb_neg, val) of@@ -326,8 +334,8 @@                    (Nothing, HsIsString _ s) -> Just s                    _ -> Nothing -tidyNPat _ over_lit mb_neg eq outer_ty-  = NPat (noLoc over_lit) mb_neg eq outer_ty+tidyNPat over_lit mb_neg eq outer_ty+  = NPat outer_ty (noLoc over_lit) mb_neg eq  {- ************************************************************************@@ -361,7 +369,7 @@     match_group :: [EquationInfo] -> DsM (Literal, MatchResult)     match_group eqns         = do dflags <- getDynFlags-             let LitPat hs_lit = firstPat (head eqns)+             let LitPat _ hs_lit = firstPat (head eqns)              match_result <- match vars ty (shiftEqns eqns)              return (hsLitKey dflags hs_lit, match_result) @@ -391,8 +399,8 @@ -- HsLit does not. hsLitKey dflags (HsIntPrim    _ i) = mkMachIntWrap  dflags i hsLitKey dflags (HsWordPrim   _ w) = mkMachWordWrap dflags w-hsLitKey _      (HsInt64Prim  _ i) = mkMachInt64Wrap       i-hsLitKey _      (HsWord64Prim _ w) = mkMachWord64Wrap      w+hsLitKey dflags (HsInt64Prim  _ i) = mkMachInt64Wrap  dflags i+hsLitKey dflags (HsWord64Prim _ w) = mkMachWord64Wrap dflags w hsLitKey _      (HsCharPrim   _ c) = mkMachChar            c hsLitKey _      (HsFloatPrim  _ f) = mkMachFloat           (fl_value f) hsLitKey _      (HsDoublePrim _ d) = mkMachDouble          (fl_value d)@@ -409,7 +417,7 @@  matchNPats :: [Id] -> Type -> [EquationInfo] -> DsM MatchResult matchNPats (var:vars) ty (eqn1:eqns)    -- All for the same literal-  = do  { let NPat (L _ lit) mb_neg eq_chk _ = firstPat eqn1+  = do  { let NPat _ (L _ lit) mb_neg eq_chk = firstPat eqn1         ; lit_expr <- dsOverLit lit         ; neg_lit <- case mb_neg of                             Nothing  -> return lit_expr@@ -440,7 +448,7 @@ matchNPlusKPats :: [Id] -> Type -> [EquationInfo] -> DsM MatchResult -- All NPlusKPats, for the *same* literal k matchNPlusKPats (var:vars) ty (eqn1:eqns)-  = do  { let NPlusKPat (L _ n1) (L _ lit1) lit2 ge minus _ = firstPat eqn1+  = do  { let NPlusKPat _ (L _ n1) (L _ lit1) lit2 ge minus = firstPat eqn1         ; lit1_expr   <- dsOverLit lit1         ; lit2_expr   <- dsOverLit lit2         ; pred_expr   <- dsSyntaxExpr ge    [Var var, lit1_expr]@@ -452,7 +460,7 @@                    adjustMatchResult (foldr1 (.) wraps)         $                    match_result) }   where-    shift n1 eqn@(EqnInfo { eqn_pats = NPlusKPat (L _ n) _ _ _ _ _ : pats })+    shift n1 eqn@(EqnInfo { eqn_pats = NPlusKPat _ (L _ n) _ _ _ _ : pats })         = (wrapBind n n1, eqn { eqn_pats = pats })         -- The wrapBind is a no-op for the first equation     shift _ e = pprPanic "matchNPlusKPats/shift" (ppr e)
deSugar/PmExpr.hs view
@@ -17,12 +17,15 @@  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@@ -236,35 +239,45 @@  hsExprToPmExpr :: HsExpr GhcTc -> PmExpr -hsExprToPmExpr (HsVar         x) = PmExprVar (idName (unLoc x))-hsExprToPmExpr (HsConLikeOut  c) = PmExprVar (conLikeName c)-hsExprToPmExpr (HsOverLit  olit) = PmExprLit (PmOLit False olit)-hsExprToPmExpr (HsLit       lit) = PmExprLit (PmSLit lit)+hsExprToPmExpr (HsVar        _ x) = PmExprVar (idName (unLoc x))+hsExprToPmExpr (HsConLikeOut _ c) = PmExprVar (conLikeName c) -hsExprToPmExpr e@(NegApp _ neg_e)-  | PmExprLit (PmOLit False ol) <- synExprToPmExpr neg_e-  = PmExprLit (PmOLit True ol)+-- 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 _ (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 (L _ e)) = hsExprToPmExpr e -hsExprToPmExpr e@(ExplicitTuple ps boxity)+hsExprToPmExpr (HsPar _ (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 | L _ (Present e) <- ps ]+    tuple_args = [ lhsExprToPmExpr e | L _ (Present _ e) <- ps ] -hsExprToPmExpr e@(ExplicitList _elem_ty mb_ol elems)+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  [] -hsExprToPmExpr (ExplicitPArr _elem_ty elems)-  = mkPmExprData (parrFakeCon (length elems)) (map lhsExprToPmExpr elems)-- -- we want this but we would have to make everything monadic :/ -- ./compiler/deSugar/DsMonad.hs:397:dsLookupDataCon :: Name -> DsM DataCon --@@ -272,20 +285,23 @@ --   con  <- dsLookupDataCon (unLoc c) --   args <- mapM lhsExprToPmExpr (hsRecFieldsArgs binds) --   return (PmExprCon con args)-hsExprToPmExpr e@(RecordCon   _ _ _ _) = PmExprOther e+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 (ExprWithTySigOut  e _) = lhsExprToPmExpr e-hsExprToPmExpr (HsWrap            _ e) =  hsExprToPmExpr 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 -synExprToPmExpr :: SyntaxExpr GhcTc -> PmExpr-synExprToPmExpr = hsExprToPmExpr . syn_expr  -- ignore the wrappers+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))  {- %************************************************************************@@ -396,7 +412,7 @@ needsParens (PmExprEq    {}) = False -- will become a wildcard needsParens (PmExprOther {}) = False -- will become a wildcard needsParens (PmExprCon (RealDataCon c) es)-  | isTupleDataCon c || isPArrFakeCon c+  | isTupleDataCon c   || isConsDataCon c || null es = False   | otherwise                   = True needsParens (PmExprCon (PatSynCon _) es) = not (null es)@@ -409,12 +425,10 @@ pprPmExprCon :: ConLike -> [PmExpr] -> PmPprM SDoc pprPmExprCon (RealDataCon con) args   | isTupleDataCon con = mkTuple <$> mapM pprPmExpr args-  |  isPArrFakeCon con = mkPArr  <$> mapM pprPmExpr args-  |  isConsDataCon con = pretty_list+  | isConsDataCon con  = pretty_list   where-    mkTuple, mkPArr :: [SDoc] -> SDoc+    mkTuple :: [SDoc] -> SDoc     mkTuple = parens     . fsep . punctuate comma-    mkPArr  = paBrackets . fsep . punctuate comma      -- lazily, to be used in the list case only     pretty_list :: PmPprM SDoc
deSugar/TmOracle.hs view
@@ -100,6 +100,10 @@   $ 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
ghc.cabal view
@@ -1,6 +1,6 @@ Cabal-Version: 2.0 Name: ghc-Version: 8.4.4+Version: 8.6.1  License: BSD3 License-File: LICENSE@@ -55,7 +55,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.4.4))+    if !(os(linux) && arch(x86_64) && impl(ghc == 8.6.1))       build-depends: base<0      -- ...while this package may in theory allow to reinstall lib:ghc@@ -70,22 +70,23 @@     Default-Language: Haskell2010     Exposed: False -    Build-Depends: base       == 4.11.*,+    Build-Depends: base       == 4.12.*,                    deepseq    >= 1.4 && < 1.5,                    directory  >= 1   && < 1.4,                    process    >= 1   && < 1.7,                    bytestring >= 0.9 && < 0.11,                    binary     == 0.8.*,                    time       >= 1.4 && < 1.9,-                   containers >= 0.5 && < 0.6,+                   containers >= 0.5 && < 0.7,                    array      >= 0.1 && < 0.6,                    filepath   >= 1   && < 1.5,-                   template-haskell == 2.13.*,+                   template-haskell == 2.14.*,                    hpc        == 0.6.*,                    transformers == 0.5.*,-                   ghc-boot   == 8.4.4,-                   ghc-boot-th == 8.4.4,-                   ghci == 8.4.4+                   ghc-boot   == 8.6.1,+                   ghc-boot-th == 8.6.1,+                   ghc-heap   == 8.6.1,+                   ghci == 8.6.1      if os(windows)         Build-Depends: Win32  >= 2.3 && < 2.7@@ -94,7 +95,7 @@             Build-Depends: terminfo == 0.4.*         Build-Depends: unix   == 2.7.* -    -- build-tools: alex ^>= 3.2.1, happy ^>= 1.19.5+    build-tools: alex ^>= 3.2.1, happy ^>= 1.19.5      GHC-Options: -Wall                  -Wno-name-shadowing@@ -181,7 +182,6 @@         typecheck         types         utils-        vectorise      -- we use an explicit Prelude     Default-Extensions:@@ -312,6 +312,7 @@         CoreTidy         CoreUnfold         CoreUtils+        CoreMap         CoreSeq         CoreStats         MkCore@@ -331,6 +332,7 @@         DsMonad         DsUsage         DsUtils+        ExtractDocs         Match         MatchCon         MatchLit@@ -342,6 +344,7 @@         HsLit         PlaceHolder         HsExtension+        HsInstances         HsPat         HsSyn         HsTypes@@ -412,6 +415,7 @@         TysPrim         TysWiredIn         CostCentre+        CostCentreState         ProfInit         RnBinds         RnEnv@@ -486,12 +490,14 @@         TcRnTypes         TcRules         TcSimplify+        TcHoleErrors         TcErrors         TcTyClsDecls         TcTyDecls         TcTypeable         TcType         TcEvidence+        TcEvTerm         TcUnify         TcInteract         TcCanonical@@ -550,41 +556,11 @@         UniqMap         UniqSet         Util-        Vectorise.Builtins.Base-        Vectorise.Builtins.Initialise-        Vectorise.Builtins-        Vectorise.Monad.Base-        Vectorise.Monad.Naming-        Vectorise.Monad.Local-        Vectorise.Monad.Global-        Vectorise.Monad.InstEnv-        Vectorise.Monad-        Vectorise.Utils.Base-        Vectorise.Utils.Closure-        Vectorise.Utils.Hoisting-        Vectorise.Utils.PADict-        Vectorise.Utils.Poly-        Vectorise.Utils-        Vectorise.Generic.Description-        Vectorise.Generic.PAMethods-        Vectorise.Generic.PADict-        Vectorise.Generic.PData-        Vectorise.Type.Env-        Vectorise.Type.Type-        Vectorise.Type.TyConDecl-        Vectorise.Type.Classify-        Vectorise.Convert-        Vectorise.Vect-        Vectorise.Var-        Vectorise.Env-        Vectorise.Exp-        Vectorise         Hoopl.Block         Hoopl.Collections         Hoopl.Dataflow         Hoopl.Graph         Hoopl.Label-        Hoopl.Unique --        CgInfoTbls used in ghci/DebuggerUtils --        CgHeapery  mkVirtHeapOffsets used in ghci @@ -662,5 +638,4 @@             Debugger             Linker             RtClosureInspect-            DebuggerUtils             GHCi
ghci/ByteCodeAsm.hs view
@@ -125,9 +125,12 @@     return bco { unlinkedBCOLits = lits, unlinkedBCOPtrs = ptrs }    spliceLit (BCONPtrStr _) = do-    (RemotePtr p : rest) <- get-    put rest-    return (BCONPtrWord (fromIntegral p))+    rptrs <- get+    case rptrs of+      (RemotePtr p : rest) -> do+        put rest+        return (BCONPtrWord (fromIntegral p))+      _ -> panic "mallocStrings:spliceLit"   spliceLit other = return other    splicePtr (BCOPtrBCO bco) = BCOPtrBCO <$> splice bco@@ -444,17 +447,19 @@      -- On Windows, stdcall labels have a suffix indicating the no. of      -- arg words, e.g. foo@8.  testcase: ffi012(ghci)     literal (MachLabel fs _ _) = litlabel fs-    literal (MachWord w)       = int (fromIntegral w)-    literal (MachInt j)        = int (fromIntegral j)     literal MachNullAddr       = int 0     literal (MachFloat r)      = float (fromRational r)     literal (MachDouble r)     = double (fromRational r)     literal (MachChar c)       = int (ord c)-    literal (MachInt64 ii)     = int64 (fromIntegral ii)-    literal (MachWord64 ii)    = int64 (fromIntegral ii)     literal (MachStr bs)       = lit [BCONPtrStr bs]        -- MachStr requires a zero-terminator when emitted-    literal LitInteger{}       = panic "ByteCodeAsm.literal: LitInteger"+    literal (LitNumber nt i _) = case nt of+      LitNumInt     -> int (fromIntegral i)+      LitNumWord    -> int (fromIntegral i)+      LitNumInt64   -> int64 (fromIntegral i)+      LitNumWord64  -> int64 (fromIntegral i)+      LitNumInteger -> panic "ByteCodeAsm.literal: LitNumInteger"+      LitNumNatural -> panic "ByteCodeAsm.literal: LitNumNatural"      litlabel fs = lit [BCONPtrLbl fs]     addr (RemotePtr a) = words [fromIntegral a]
ghci/ByteCodeGen.hs view
@@ -73,6 +73,7 @@ import qualified FiniteMap as Map import Data.Ord import GHC.Stack.CCS+import Data.Either ( partitionEithers )  -- ----------------------------------------------------------------------------- -- Generating byte code for a complete module@@ -89,7 +90,7 @@                 (const ()) $ do         -- Split top-level binds into strings and others.         -- See Note [generating code for top-level string literal bindings].-        let (strings, flatBinds) = splitEithers $ do+        let (strings, flatBinds) = partitionEithers $ do                 (bndr, rhs) <- flattenBinds binds                 return $ case exprIsTickedString_maybe rhs of                     Just str -> Left (bndr, str)@@ -995,8 +996,8 @@            | otherwise            = DiscrP (fromIntegral (dataConTag dc - fIRST_TAG))         my_discr (LitAlt l, _, _)-           = case l of MachInt i     -> DiscrI (fromInteger i)-                       MachWord w    -> DiscrW (fromInteger w)+           = case l of LitNumber LitNumInt i  _  -> DiscrI (fromInteger i)+                       LitNumber LitNumWord w _  -> DiscrW (fromInteger w)                        MachFloat r   -> DiscrF (fromRational r)                        MachDouble r  -> DiscrD (fromRational r)                        MachChar i    -> DiscrI (ord i)@@ -1232,7 +1233,7 @@          push_r =              if returns_void                 then nilOL-                else unitOL (PUSH_UBX (mkDummyLiteral r_rep) (trunc16W r_sizeW))+                else unitOL (PUSH_UBX (mkDummyLiteral dflags r_rep) (trunc16W r_sizeW))           -- generate the marshalling code we're going to call @@ -1296,16 +1297,16 @@  -- Make a dummy literal, to be used as a placeholder for FFI return -- values on the stack.-mkDummyLiteral :: PrimRep -> Literal-mkDummyLiteral pr+mkDummyLiteral :: DynFlags -> PrimRep -> Literal+mkDummyLiteral dflags pr    = case pr of-        IntRep    -> MachInt 0-        WordRep   -> MachWord 0+        IntRep    -> mkMachInt dflags 0+        WordRep   -> mkMachWord dflags 0+        Int64Rep  -> mkMachInt64 0+        Word64Rep -> mkMachWord64 0         AddrRep   -> MachNullAddr         DoubleRep -> MachDouble 0         FloatRep  -> MachFloat 0-        Int64Rep  -> MachInt64 0-        Word64Rep -> MachWord64 0         _         -> pprPanic "mkDummyLiteral" (ppr pr)  @@ -1504,11 +1505,11 @@     | otherwise  -- var must be a global variable    = do topStrings <- getTopStrings+        dflags <- getDynFlags         case lookupVarEnv topStrings var of-            Just ptr -> pushAtom d p $ AnnLit $ MachWord $ fromIntegral $-              ptrToWordPtr $ fromRemotePtr ptr+            Just ptr -> pushAtom d p $ AnnLit $ mkMachWord dflags $+              fromIntegral $ ptrToWordPtr $ fromRemotePtr ptr             Nothing -> do-                dflags <- getDynFlags                 let sz = idSizeCon dflags var                 MASSERT( sz == wordSize dflags )                 return (unitOL (PUSH_G (getName var)), sz)@@ -1523,19 +1524,21 @@       case lit of         MachLabel _ _ _ -> code N-        MachWord _    -> code N-        MachInt _     -> code N-        MachWord64 _  -> code L-        MachInt64 _   -> code L         MachFloat _   -> code F         MachDouble _  -> code D         MachChar _    -> code N         MachNullAddr  -> code N         MachStr _     -> code N-        -- No LitInteger's should be left by the time this is called.-        -- CorePrep should have converted them all to a real core-        -- representation.-        LitInteger {} -> panic "pushAtom: LitInteger"+        LitNumber nt _ _ -> case nt of+          LitNumInt     -> code N+          LitNumWord    -> code N+          LitNumInt64   -> code L+          LitNumWord64  -> code L+          -- No LitInteger's or LitNatural's should be left by the time this is+          -- called. CorePrep should have converted them all to a real core+          -- representation.+          LitNumInteger -> panic "pushAtom: LitInteger"+          LitNumNatural -> panic "pushAtom: LitNatural"  pushAtom _ _ expr    = pprPanic "ByteCodeGen.pushAtom"
ghci/ByteCodeLink.hs view
@@ -23,7 +23,6 @@  import GHCi.RemoteTypes import GHCi.ResolvedBCO-import GHCi.InfoTable import GHCi.BreakArray import SizedSeq @@ -99,7 +98,7 @@ lookupIE :: HscEnv -> ItblEnv -> Name -> IO (Ptr ()) lookupIE hsc_env ie con_nm =   case lookupNameEnv ie con_nm of-    Just (_, ItblPtr a) -> return (conInfoPtr (fromRemotePtr (castRemotePtr a)))+    Just (_, ItblPtr a) -> return (fromRemotePtr (castRemotePtr a))     Nothing -> do -- try looking up in the object files.        let sym_to_find1 = nameToCLabel con_nm "con_info"        m <- lookupSymbol hsc_env sym_to_find1
ghci/ByteCodeTypes.hs view
@@ -27,7 +27,6 @@ import GHCi.BreakArray import GHCi.RemoteTypes import GHCi.FFI-import GHCi.InfoTable import Control.DeepSeq  import Foreign@@ -36,6 +35,7 @@ import Data.ByteString (ByteString) import Data.IntMap (IntMap) import qualified Data.IntMap as IntMap+import GHC.Exts.Heap import GHC.Stack.CCS  -- -----------------------------------------------------------------------------
− ghci/DebuggerUtils.hs
@@ -1,134 +0,0 @@-{-# LANGUAGE CPP #-}--module DebuggerUtils (-       dataConInfoPtrToName,-  ) where--import GhcPrelude--import GHCi.InfoTable-import CmmInfo ( stdInfoTableSizeB )-import DynFlags-import FastString-import TcRnTypes-import TcRnMonad-import IfaceEnv-import Module-import OccName-import Name-import Outputable-import Util--import Data.Char-import Foreign-import Data.List--#include "HsVersions.h"---- | Given a data constructor in the heap, find its Name.---   The info tables for data constructors have a field which records---   the source name of the constructor as a Ptr Word8 (UTF-8 encoded---   string). The format is:------   > Package:Module.Name------   We use this string to lookup the interpreter's internal representation of the name---   using the lookupOrig.----dataConInfoPtrToName :: Ptr () -> TcM (Either String Name)-dataConInfoPtrToName x = do-   dflags <- getDynFlags-   theString <- liftIO $ do-      let ptr = castPtr x :: Ptr StgInfoTable-      conDescAddress <- getConDescAddress dflags ptr-      peekArray0 0 conDescAddress-   let (pkg, mod, occ) = parse theString-       pkgFS = mkFastStringByteList pkg-       modFS = mkFastStringByteList mod-       occFS = mkFastStringByteList occ-       occName = mkOccNameFS OccName.dataName occFS-       modName = mkModule (fsToUnitId pkgFS) (mkModuleNameFS modFS)-   return (Left $ showSDoc dflags $ ppr modName <> dot <> ppr occName)-    `recoverM` (Right `fmap` lookupOrig modName occName)--   where--   {- To find the string in the constructor's info table we need to consider-      the layout of info tables relative to the entry code for a closure.--      An info table can be next to the entry code for the closure, or it can-      be separate. The former (faster) is used in registerised versions of ghc,-      and the latter (portable) is for non-registerised versions.--      The diagrams below show where the string is to be found relative to-      the normal info table of the closure.--      1) Code next to table:--         ---------------         |            |   <- pointer to the start of the string-         ---------------         |            |   <- the (start of the) info table structure-         |            |-         |            |-         ---------------         | entry code |-         |    ....    |--         In this case the pointer to the start of the string can be found in-         the memory location _one word before_ the first entry in the normal info-         table.--      2) Code NOT next to table:--                                 ---------------         info table structure -> |     *------------------> ---------------                                 |            |             | entry code |-                                 |            |             |    ....    |-                                 ---------------         ptr to start of str ->  |            |-                                 ----------------         In this case the pointer to the start of the string can be found-         in the memory location: info_table_ptr + info_table_size-   -}--   getConDescAddress :: DynFlags -> Ptr StgInfoTable -> IO (Ptr Word8)-   getConDescAddress dflags ptr-    | ghciTablesNextToCode = do-       let ptr' = ptr `plusPtr` (- wORD_SIZE dflags)-       -- NB. the offset must be read as an Int32 not a Word32, so-       -- that the sign is preserved when converting to an Int.-       offsetToString <- fromIntegral <$> (peek ptr' :: IO Int32)-       return $ (ptr `plusPtr` stdInfoTableSizeB dflags) `plusPtr` offsetToString-    | otherwise =-       peek $ intPtrToPtr $ ptrToIntPtr ptr + fromIntegral (stdInfoTableSizeB dflags)-   -- parsing names is a little bit fiddly because we have a string in the form:-   -- pkg:A.B.C.foo, and we want to split it into three parts: ("pkg", "A.B.C", "foo").-   -- Thus we split at the leftmost colon and the rightmost occurrence of the dot.-   -- It would be easier if the string was in the form pkg:A.B.C:foo, but alas-   -- this is not the conventional way of writing Haskell names. We stick with-   -- convention, even though it makes the parsing code more troublesome.-   -- Warning: this code assumes that the string is well formed.-   parse :: [Word8] -> ([Word8], [Word8], [Word8])-   parse input-      = ASSERT(all (`lengthExceeds` 0) ([pkg, mod, occ])) (pkg, mod, occ)-      where-      dot = fromIntegral (ord '.')-      (pkg, rest1) = break (== fromIntegral (ord ':')) input-      (mod, occ)-         = (concat $ intersperse [dot] $ reverse modWords, occWord)-         where-         (modWords, occWord) = ASSERT(rest1 `lengthExceeds` 0) (parseModOcc [] (tail rest1))-      parseModOcc :: [[Word8]] -> [Word8] -> ([[Word8]], [Word8])-      -- We only look for dots if str could start with a module name,-      -- i.e. if it starts with an upper case character.-      -- Otherwise we might think that "X.:->" is the module name in-      -- "X.:->.+", whereas actually "X" is the module name and-      -- ":->.+" is a constructor name.-      parseModOcc acc str@(c : _)-       | isUpper $ chr $ fromIntegral c-         = case break (== dot) str of-              (top, []) -> (acc, top)-              (top, _ : bot) -> parseModOcc (top : acc) bot-      parseModOcc acc str = (acc, str)
ghci/Linker.hs view
@@ -63,6 +63,7 @@ import System.FilePath import System.Directory import System.IO.Unsafe+import System.Environment (lookupEnv)  #if defined(mingw32_HOST_OS) import System.Win32.Info (getSystemDirectory)@@ -339,8 +340,15 @@       -- See Note [Fork/Exec Windows]       gcc_paths <- getGCCPaths dflags os +      lib_paths_env <- addEnvPaths "LIBRARY_PATH" lib_paths_base++      maybePutStrLn dflags "Search directories (user):"+      maybePutStr dflags (unlines $ map ("  "++) lib_paths_env)+      maybePutStrLn dflags "Search directories (gcc):"+      maybePutStr dflags (unlines $ map ("  "++) gcc_paths)+       libspecs-        <- mapM (locateLib hsc_env False lib_paths_base gcc_paths) minus_ls+        <- mapM (locateLib hsc_env False lib_paths_env gcc_paths) minus_ls        -- (d) Link .o files from the command-line       classified_ld_inputs <- mapM (classifyLdInput dflags)@@ -368,7 +376,8 @@                                ++ [ takeDirectory dll | DLLPath dll <- libspecs ]                       in nub $ map normalise paths       let lib_paths = nub $ lib_paths_base ++ gcc_paths-      pathCache <- mapM (addLibrarySearchPath hsc_env) all_paths+      all_paths_env <- addEnvPaths "LD_LIBRARY_PATH" all_paths+      pathCache <- mapM (addLibrarySearchPath hsc_env) all_paths_env        pls1 <- foldM (preloadLib hsc_env lib_paths framework_paths) pls                     cmdline_lib_specs@@ -909,16 +918,14 @@                       -- can resolve dependencies when it loads this                       -- library.                       ldInputs =-                        concatMap-                            (\(lp, l) ->-                                 [ Option ("-L" ++ lp)-                                 , Option "-Xlinker"-                                 , Option "-rpath"-                                 , Option "-Xlinker"-                                 , Option lp-                                 , Option ("-l" ++  l)-                                 ])-                            (temp_sos pls)+                           concatMap (\l -> [ Option ("-l" ++ l) ])+                                     (nub $ snd <$> temp_sos pls)+                        ++ concatMap (\lp -> [ Option ("-L" ++ lp)+                                                    , Option "-Xlinker"+                                                    , Option "-rpath"+                                                    , Option "-Xlinker"+                                                    , Option lp ])+                                     (nub $ fst <$> temp_sos pls)                         ++ concatMap                              (\lp ->                                  [ Option ("-L" ++ lp)@@ -1266,11 +1273,12 @@                       ++ [ lib | '-':'l':lib <- Packages.ldOptions pkg ]         -- See Note [Fork/Exec Windows]         gcc_paths <- getGCCPaths dflags (platformOS platform)+        dirs_env <- addEnvPaths "LIBRARY_PATH" dirs          hs_classifieds-           <- mapM (locateLib hsc_env True  dirs gcc_paths) hs_libs'+           <- mapM (locateLib hsc_env True  dirs_env gcc_paths) hs_libs'         extra_classifieds-           <- mapM (locateLib hsc_env False dirs gcc_paths) extra_libs+           <- mapM (locateLib hsc_env False dirs_env gcc_paths) extra_libs         let classifieds = hs_classifieds ++ extra_classifieds          -- Complication: all the .so's must be loaded before any of the .o's.@@ -1282,7 +1290,8 @@         -- Add directories to library search paths         let dll_paths  = map takeDirectory known_dlls             all_paths  = nub $ map normalise $ dll_paths ++ dirs-        pathCache <- mapM (addLibrarySearchPath hsc_env) all_paths+        all_paths_env <- addEnvPaths "LD_LIBRARY_PATH" all_paths+        pathCache <- mapM (addLibrarySearchPath hsc_env) all_paths_env          maybePutStr dflags             ("Loading package " ++ sourcePackageIdString pkg ++ " ... ")@@ -1351,21 +1360,35 @@ locateLib hsc_env is_hs lib_dirs gcc_dirs lib   | not is_hs     -- For non-Haskell libraries (e.g. gmp, iconv):-    --   first look in library-dirs for a dynamic library (libfoo.so)+    --   first look in library-dirs for a dynamic library (on User paths only)+    --   (libfoo.so)+    --   then  try looking for import libraries on Windows (on User paths only)+    --   (.dll.a, .lib)+    --   first look in library-dirs for a dynamic library (on GCC paths only)+    --   (libfoo.so)+    --   then  check for system dynamic libraries (e.g. kernel32.dll on windows)+    --   then  try looking for import libraries on Windows (on GCC paths only)+    --   (.dll.a, .lib)     --   then  look in library-dirs for a static library (libfoo.a)     --   then look in library-dirs and inplace GCC for a dynamic library (libfoo.so)-    --   then  check for system dynamic libraries (e.g. kernel32.dll on windows)     --   then  try looking for import libraries on Windows (.dll.a, .lib)     --   then  look in library-dirs and inplace GCC for a static library (libfoo.a)     --   then  try "gcc --print-file-name" to search gcc's search path     --       for a dynamic library (#5289)     --   otherwise, assume loadDLL can find it     ---  = findDll     `orElse`-    findSysDll  `orElse`-    tryImpLib   `orElse`-    findArchive `orElse`-    tryGcc      `orElse`+    --   The logic is a bit complicated, but the rationale behind it is that+    --   loading a shared library for us is O(1) while loading an archive is+    --   O(n). Loading an import library is also O(n) so in general we prefer+    --   shared libraries because they are simpler and faster.+    --+  = findDll   user `orElse`+    tryImpLib user `orElse`+    findDll   gcc  `orElse`+    findSysDll     `orElse`+    tryImpLib gcc  `orElse`+    findArchive    `orElse`+    tryGcc         `orElse`     assumeDll    | loading_dynamic_hs_libs -- search for .so libraries first.@@ -1386,12 +1409,15 @@     where      dflags = hsc_dflags hsc_env-     dirs = lib_dirs ++ gcc_dirs+     dirs   = lib_dirs ++ gcc_dirs+     gcc    = False+     user   = True       obj_file     = lib <.> "o"      dyn_obj_file = lib <.> "dyn_o"      arch_files = [ "lib" ++ lib ++ lib_tag <.> "a"                   , lib <.> "a" -- native code has no lib_tag+                  , "lib" ++ lib, lib                   ]      lib_tag = if is_hs && loading_profiled_hs_libs then "_p" else "" @@ -1416,7 +1442,8 @@      findArchive   = let local name = liftM (fmap Archive) $ findFile dirs name                      in  apply (map local arch_files)      findHSDll     = liftM (fmap DLLPath) $ findFile dirs hs_dyn_lib_file-     findDll       = liftM (fmap DLLPath) $ findFile dirs dyn_lib_file+     findDll    re = let dirs' = if re == user then lib_dirs else gcc_dirs+                     in liftM (fmap DLLPath) $ findFile dirs' dyn_lib_file      findSysDll    = fmap (fmap $ DLL . dropExtension . takeFileName) $                         findSystemLibrary hsc_env so_name      tryGcc        = let search   = searchForLibUsingGcc dflags@@ -1426,10 +1453,11 @@                          gcc name = liftM (fmap Archive) $ search name lib_dirs                          files    = import_libs ++ arch_files                      in apply $ short : full : map gcc files-     tryImpLib     = case os of+     tryImpLib re = case os of                        OSMinGW32 ->-                        let implib name = liftM (fmap Archive) $-                                            findFile dirs name+                        let dirs' = if re == user then lib_dirs else gcc_dirs+                            implib name = liftM (fmap Archive) $+                                            findFile dirs' name                         in apply (map implib import_libs)                        _         -> return Nothing @@ -1522,6 +1550,32 @@ getSystemDirectories = fmap (:[]) getSystemDirectory #else getSystemDirectories = return []+#endif++-- | Merge the given list of paths with those in the environment variable+--   given. If the variable does not exist then just return the identity.+addEnvPaths :: String -> [String] -> IO [String]+addEnvPaths name list+  = do -- According to POSIX (chapter 8.3) a zero-length prefix means current+       -- working directory. Replace empty strings in the env variable with+       -- `working_dir` (see also #14695).+       working_dir <- getCurrentDirectory+       values <- lookupEnv name+       case values of+         Nothing  -> return list+         Just arr -> return $ list ++ splitEnv working_dir arr+    where+      splitEnv :: FilePath -> String -> [String]+      splitEnv working_dir value =+        case break (== envListSep) value of+          (x, []    ) ->+            [if null x then working_dir else x]+          (x, (_:xs)) ->+            (if null x then working_dir else x) : splitEnv working_dir xs+#if defined(mingw32_HOST_OS)+      envListSep = ';'+#else+      envListSep = ':' #endif  -- ----------------------------------------------------------------------------
ghci/RtClosureInspect.hs view
@@ -21,17 +21,14 @@  --     unsafeDeepSeq, -     Closure(..), getClosureData, ClosureType(..), isConstr, isIndirection+     constrClosToName, isConstr, isIndirection  ) where  #include "HsVersions.h"  import GhcPrelude -import DebuggerUtils-import GHCi.RemoteTypes ( HValue )-import qualified GHCi.InfoTable as InfoTable-import GHCi.InfoTable (StgInfoTable, peekItbl)+import GHCi.RemoteTypes import HscTypes  import DataCon@@ -48,6 +45,9 @@  import TyCon import Name+import OccName+import Module+import IfaceEnv import Util import VarSet import BasicTypes       ( Boxity(..) )@@ -56,16 +56,14 @@ import TysWiredIn import DynFlags import Outputable as Ppr-import GHC.Arr          ( Array(..) ) import GHC.Char import GHC.Exts+import GHC.Exts.Heap import GHC.IO ( IO(..) ) import SMRep ( roundUpTo )  import Control.Monad import Data.Maybe-import Data.Array.Base-import Data.Ix import Data.List import qualified Data.Sequence as Seq import Data.Sequence (viewl, ViewL(..))@@ -86,7 +84,7 @@                  , subTerms  :: [Term] }            | Prim { ty        :: RttiType-                 , value     :: [Word] }+                 , valRaw    :: [Word] }            | Suspension { ctype    :: ClosureType                        , ty       :: RttiType@@ -114,7 +112,13 @@ isNewtypeWrap NewtypeWrap{} = True isNewtypeWrap _             = False -isFun Suspension{ctype=Fun} = True+isFun Suspension{ctype=FUN} = True+isFun Suspension{ctype=FUN_1_0} = True+isFun Suspension{ctype=FUN_0_1} = True+isFun Suspension{ctype=FUN_2_0} = True+isFun Suspension{ctype=FUN_1_1} = True+isFun Suspension{ctype=FUN_0_2} = True+isFun Suspension{ctype=FUN_STATIC} = True isFun _ = False  isFunLike s@Suspension{ty=ty} = isFun s || isFunTy ty@@ -134,101 +138,30 @@  ppr t | Just doc <- cPprTerm cPprTermBase t = doc        | otherwise = panic "Outputable Term instance" ----------------------------------------------------------------------------- Runtime Closure Datatype and functions for retrieving closure related stuff---------------------------------------------------------------------------data ClosureType = Constr-                 | Fun-                 | Thunk Int-                 | ThunkSelector-                 | Blackhole-                 | AP-                 | PAP-                 | Indirection Int-                 | MutVar Int-                 | MVar   Int-                 | Other  Int- deriving (Show, Eq)--data ClosureNonPtrs = ClosureNonPtrs ByteArray#--data Closure = Closure { tipe         :: ClosureType-                       , infoPtr      :: Ptr ()-                       , infoTable    :: StgInfoTable-                       , ptrs         :: Array Int HValue-                       , nonPtrs      :: ClosureNonPtrs-                       }--instance Outputable ClosureType where-  ppr = text . show--#include "rts/storage/ClosureTypes.h"--aP_CODE, pAP_CODE :: Int-aP_CODE = AP-pAP_CODE = PAP-#undef AP-#undef PAP--getClosureData :: DynFlags -> a -> IO Closure-getClosureData dflags a =-   case unpackClosure# a of-     (# iptr, ptrs, nptrs #) -> do-           let iptr0 = Ptr iptr-           let iptr1-                | ghciTablesNextToCode = iptr0-                | otherwise =-                   -- the info pointer we get back from unpackClosure#-                   -- is to the beginning of the standard info table,-                   -- but the Storable instance for info tables takes-                   -- into account the extra entry pointer when-                   -- !ghciTablesNextToCode, so we must adjust here:-                   iptr0 `plusPtr` negate (wORD_SIZE dflags)-           itbl <- peekItbl iptr1-           let tipe = readCType (InfoTable.tipe itbl)-               elems = fromIntegral (InfoTable.ptrs itbl)-               ptrsList = Array 0 (elems - 1) elems ptrs-               nptrs_data = ClosureNonPtrs nptrs-           ASSERT(elems >= 0) return ()-           ptrsList `seq`-            return (Closure tipe iptr0 itbl ptrsList nptrs_data)--readCType :: Integral a => a -> ClosureType-readCType i- | i >= CONSTR && i <= CONSTR_NOCAF        = Constr- | i >= FUN    && i <= FUN_STATIC          = Fun- | i >= THUNK  && i < THUNK_SELECTOR       = Thunk i'- | i == THUNK_SELECTOR                     = ThunkSelector- | i == BLACKHOLE                          = Blackhole- | i >= IND    && i <= IND_STATIC          = Indirection i'- | i' == aP_CODE                           = AP- | i == AP_STACK                           = AP- | i' == pAP_CODE                          = PAP- | i == MUT_VAR_CLEAN || i == MUT_VAR_DIRTY= MutVar i'- | i == MVAR_CLEAN    || i == MVAR_DIRTY   = MVar i'- | otherwise                               = Other  i'-  where i' = fromIntegral i+----------------------------------------+-- Runtime Closure information functions+---------------------------------------- -isConstr, isIndirection, isThunk :: ClosureType -> Bool-isConstr Constr = True+isConstr, isIndirection, isThunk :: GenClosure a -> Bool+isConstr ConstrClosure{} = True isConstr    _   = False -isIndirection (Indirection _) = True+isIndirection IndClosure{} = True isIndirection _ = False -isThunk (Thunk _)     = True-isThunk ThunkSelector = True-isThunk AP            = True+isThunk ThunkClosure{} = True+isThunk APClosure{} = True+isThunk APStackClosure{} = True isThunk _             = False -isFullyEvaluated :: DynFlags -> a -> IO Bool-isFullyEvaluated dflags a = do-  closure <- getClosureData dflags a-  case tipe closure of-    Constr -> do are_subs_evaluated <- amapM (isFullyEvaluated dflags) (ptrs closure)-                 return$ and are_subs_evaluated-    _      -> return False-  where amapM f = sequence . amap' f+isFullyEvaluated :: a -> IO Bool+isFullyEvaluated a = do+  closure <- getClosureData a+  if isConstr closure+    then do are_subs_evaluated <- amapM isFullyEvaluated (ptrArgs closure)+            return$ and are_subs_evaluated+    else return False+  where amapM f = sequence . map (\(Box x) -> f x)  -- TODO: Fix it. Probably the otherwise case is failing, trace/debug it {-@@ -243,6 +176,15 @@         where tipe = unsafePerformIO (getClosureType a) -} +-- Lookup the name in a constructor closure+constrClosToName :: HscEnv -> Closure -> IO (Either String Name)+constrClosToName hsc_env ConstrClosure{pkg=pkg,modl=mod,name=occ} = do+   let occName = mkOccName OccName.dataName occ+       modName = mkModule (stringToUnitId pkg) (mkModuleName mod)+   Right `fmap` lookupOrigIO hsc_env modName occName+constrClosToName _hsc_env clos =+   return (Left ("conClosToName: Expected ConstrClosure, got " ++ show clos))+ ----------------------------------- -- * Traversals for Terms -----------------------------------@@ -374,7 +316,7 @@   ppr_termM1 :: Monad m => Term -> m SDoc-ppr_termM1 Prim{value=words, ty=ty} =+ppr_termM1 Prim{valRaw=words, ty=ty} =     return $ repPrim (tyConAppTyCon ty) words ppr_termM1 Suspension{ty=ty, bound_to=Nothing} =     return (char '_' <+> whenPprDebug (text "::" <> ppr ty))@@ -417,8 +359,10 @@   go prec t = do     let default_ = Just `liftM` pprTermM go prec t         mb_customDocs = [pp prec t | pp <- printers] ++ [default_]-    Just doc <- firstJustM mb_customDocs-    return$ cparen (prec>app_prec+1) doc+    mdoc <- firstJustM mb_customDocs+    case mdoc of+      Nothing -> panic "cPprTerm"+      Just doc -> return $ cparen (prec>app_prec+1) doc    firstJustM (mb:mbs) = mb >>= maybe (firstJustM mbs) (return . Just)   firstJustM [] = return Nothing@@ -696,8 +640,6 @@             text "Type obtained: " <> ppr (termType term))    return term     where-  dflags = hsc_dflags hsc_env-   go :: Int -> Type -> Type -> HValue -> TcM Term    -- I believe that my_ty should not have any enclosing    -- foralls, nor any free RuntimeUnk skolems;@@ -708,27 +650,30 @@   go 0 my_ty _old_ty a = do     traceTR (text "Gave up reconstructing a term after" <>                   int max_depth <> text " steps")-    clos <- trIO $ getClosureData dflags a-    return (Suspension (tipe clos) my_ty a Nothing)+    clos <- trIO $ getClosureData a+    return (Suspension (tipe (info clos)) my_ty a Nothing)   go !max_depth my_ty old_ty a = do     let monomorphic = not(isTyVarTy my_ty)     -- This ^^^ is a convention. The ancestor tests for     -- monomorphism and passes a type instead of a tv-    clos <- trIO $ getClosureData dflags a-    case tipe clos of+    clos <- trIO $ getClosureData a+    case clos of -- Thunks we may want to force       t | isThunk t && force -> traceTR (text "Forcing a " <> text (show t)) >>                                 seq a (go (pred max_depth) my_ty old_ty a) -- Blackholes are indirections iff the payload is not TSO or BLOCKING_QUEUE.  So we -- treat them like indirections; if the payload is TSO or BLOCKING_QUEUE, we'll end up -- showing '_' which is what we want.-      Blackhole -> do traceTR (text "Following a BLACKHOLE")-                      appArr (go max_depth my_ty old_ty) (ptrs clos) 0+      BlackholeClosure{indirectee=ind} -> do+         traceTR (text "Following a BLACKHOLE")+         (\(Box x) -> go max_depth my_ty old_ty (HValue x)) ind -- We always follow indirections-      Indirection i -> do traceTR (text "Following an indirection" <> parens (int i) )-                          go max_depth my_ty old_ty $! (ptrs clos ! 0)+      IndClosure{indirectee=ind} -> do+         traceTR (text "Following an indirection" )+         (\(Box x) -> go max_depth my_ty old_ty (HValue x)) ind -- We also follow references-      MutVar _ | Just (tycon,[world,contents_ty]) <- tcSplitTyConApp_maybe old_ty+      MutVarClosure{}+         | Just (tycon,[world,contents_ty]) <- tcSplitTyConApp_maybe old_ty              -> do                   -- Deal with the MutVar# primitive                   -- It does not have a constructor at all,@@ -745,12 +690,12 @@          return (RefWrap my_ty x)   -- The interesting case-      Constr -> do+      ConstrClosure{ptrArgs=pArgs} -> do         traceTR (text "entering a constructor " <>                       if monomorphic                         then parens (text "already monomorphic: " <> ppr my_ty)                         else Ppr.empty)-        Right dcname <- dataConInfoPtrToName (infoPtr clos)+        Right dcname <- liftIO $ constrClosToName hsc_env clos         (_,mb_dc)    <- tryTc (tcLookupDataCon dcname)         case mb_dc of           Nothing -> do -- This can happen for private constructors compiled -O0@@ -761,10 +706,10 @@                        traceTR (text "Not constructor" <+> ppr dcname)                        let dflags = hsc_dflags hsc_env                            tag = showPpr dflags dcname-                       vars     <- replicateM (length$ elems$ ptrs clos)+                       vars     <- replicateM (length pArgs)                                               (newVar liftedTypeKind)-                       subTerms <- sequence [appArr (go (pred max_depth) tv tv) (ptrs clos) i-                                              | (i, tv) <- zip [0..] vars]+                       subTerms <- sequence $ zipWith (\(Box x) tv ->+                           go (pred max_depth) tv tv (HValue x)) pArgs vars                        return (Term my_ty (Left ('<' : tag ++ ">")) a subTerms)           Just dc -> do             traceTR (text "Is constructor" <+> (ppr dc $$ ppr my_ty))@@ -773,9 +718,9 @@             return (Term my_ty (Right dc) a subTerms)  -- The otherwise case: can be a Thunk,AP,PAP,etc.-      tipe_clos -> do-         traceTR (text "Unknown closure:" <+> ppr tipe_clos)-         return (Suspension tipe_clos my_ty a Nothing)+      _ -> do+         traceTR (text "Unknown closure:" <+> text (show clos))+         return (Suspension (tipe (info clos)) my_ty a Nothing)    -- insert NewtypeWraps around newtypes   expandNewtypes = foldTerm idTermFold { fTerm = worker } where@@ -798,7 +743,7 @@                 -> Closure -> [Type] -> TcM [Term] extractSubTerms recurse clos = liftM thdOf3 . go 0 0   where-    !(ClosureNonPtrs array) = nonPtrs clos+    array = dataArgs clos      go ptr_i arr_i [] = return (ptr_i, arr_i, [])     go ptr_i arr_i (ty:tys)@@ -829,7 +774,7 @@      go_rep ptr_i arr_i ty rep       | isGcPtrRep rep = do-          t <- appArr (recurse ty) (ptrs clos) ptr_i+          t <- (\(Box x) -> recurse ty (HValue x)) $ (ptrArgs clos)!!ptr_i           return (ptr_i + 1, arr_i, t)       | otherwise = do           -- This is a bit involved since we allow packing multiple fields@@ -837,33 +782,44 @@           -- StgCmmLayout.mkVirtHeapOffsetsWithPadding           dflags <- getDynFlags           let word_size = wORD_SIZE dflags+              big_endian = wORDS_BIGENDIAN dflags               size_b = primRepSizeB dflags rep-              -- Fields are always aligned.-              !aligned_idx = roundUpTo arr_i size_b+              -- 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.+              !aligned_idx = roundUpTo arr_i (min word_size size_b)               !new_arr_i = aligned_idx + size_b-              ws-                  | size_b < word_size = [index size_b array aligned_idx]-                  | otherwise =-                      let (q, r) = size_b `quotRem` word_size-                      in ASSERT( r == 0 )-                         [ W# (indexWordArray# array i)-                         | o <- [0.. q - 1]-                         , let !(I# i) = (aligned_idx + o) `quot` word_size-                         ]+              ws | size_b < word_size =+                     [index size_b aligned_idx word_size big_endian]+                 | otherwise =+                     let (q, r) = size_b `quotRem` word_size+                     in ASSERT( r == 0 )+                        [ array!!i+                        | o <- [0.. q - 1]+                        , let i = (aligned_idx `quot` word_size) + o+                        ]           return (ptr_i, new_arr_i, Prim ty ws)      unboxedTupleTerm ty terms       = Term ty (Right (tupleDataCon Unboxed (length terms)))                 (error "unboxedTupleTerm: no HValue for unboxed tuple") terms -    index item_size_b  array (I# index_b) =-        case item_size_b of-            -- indexWord*Array# functions take offsets dependent not in bytes,-            -- but in multiples of an element's size.-            1 -> W# (indexWord8Array# array index_b)-            2 -> W# (indexWord16Array# array (index_b `quotInt#` 2#))-            4 -> W# (indexWord32Array# array (index_b `quotInt#` 4#))-            _ -> panic ("Weird byte-index: " ++ show (I# index_b))+    -- Extract a sub-word sized field from a word+    index item_size_b index_b word_size big_endian =+        (word .&. (mask `shiftL` moveBytes)) `shiftR` moveBytes+      where+        mask :: Word+        mask = case item_size_b of+            1 -> 0xFF+            2 -> 0xFFFF+            4 -> 0xFFFFFFFF+            _ -> panic ("Weird byte-index: " ++ show index_b)+        (q,r) = index_b `quotRem` word_size+        word = array!!q+        moveBytes = if big_endian+                    then word_size - (r + item_size_b) * 8+                    else r * 8   -- Fast, breadth-first Type reconstruction@@ -896,8 +852,6 @@    traceTR (text "RTTI completed. Type obtained:" <+> ppr new_ty)    return new_ty     where-  dflags = hsc_dflags hsc_env- --  search :: m Bool -> ([a] -> [a] -> [a]) -> [a] -> m ()   search _ _ _ 0 = traceTR (text "Failed to reconstruct a type after " <>                                 int max_depth <> text " steps")@@ -912,32 +866,31 @@   go :: Type -> HValue -> TR [(Type, HValue)]   go my_ty a = do     traceTR (text "go" <+> ppr my_ty)-    clos <- trIO $ getClosureData dflags a-    case tipe clos of-      Blackhole -> appArr (go my_ty) (ptrs clos) 0 -- carefully, don't eval the TSO-      Indirection _ -> go my_ty $! (ptrs clos ! 0)-      MutVar _ -> do+    clos <- trIO $ getClosureData a+    case clos of+      BlackholeClosure{indirectee=ind} -> (\(Box x) -> go my_ty (HValue x)) ind+      IndClosure{indirectee=ind} -> (\(Box x) -> go my_ty (HValue x)) ind+      MutVarClosure{} -> do          contents <- trIO$ IO$ \w -> readMutVar# (unsafeCoerce# a) w          tv'   <- newVar liftedTypeKind          world <- newVar liftedTypeKind          addConstraint my_ty (mkTyConApp mutVarPrimTyCon [world,tv'])          return [(tv', contents)]-      Constr -> do-        Right dcname <- dataConInfoPtrToName (infoPtr clos)+      ConstrClosure{ptrArgs=pArgs} -> do+        Right dcname <- liftIO $ constrClosToName hsc_env clos         traceTR (text "Constr1" <+> ppr dcname)-        (_,mb_dc)    <- tryTc (tcLookupDataCon dcname)+        (_,mb_dc) <- tryTc (tcLookupDataCon dcname)         case mb_dc of           Nothing-> do-            forM (elems $ ptrs clos) $ \a -> do+            forM pArgs $ \(Box x) -> do               tv <- newVar liftedTypeKind-              return (tv, a)+              return (tv, HValue x)            Just dc -> do             arg_tys <- getDataConArgTys dc my_ty             (_, itys) <- findPtrTyss 0 arg_tys             traceTR (text "Constr2" <+> ppr dcname <+> ppr arg_tys)-            return $ [ appArr (\e-> (ty,e)) (ptrs clos) i-                     | (i,ty) <- itys]+            return $ zipWith (\(_,ty) (Box x) -> (ty, HValue x)) itys pArgs       _ -> return []  findPtrTys :: Int  -- Current pointer index@@ -1303,15 +1256,3 @@                   , rho)   where     (_tvs, rho) = tcSplitForAllTys ty---- Strict application of f at index i-appArr :: Ix i => (e -> a) -> Array i e -> Int -> a-appArr f a@(Array _ _ _ ptrs#) i@(I# i#)- = ASSERT2(i < length(elems a), ppr(length$ elems a, i))-   case indexArray# ptrs# i# of-       (# e #) -> f e--amap' :: (t -> b) -> Array Int t -> [b]-amap' f (Array i0 i _ arr#) = map g [0 .. i - i0]-    where g (I# i#) = case indexArray# arr# i# of-                          (# e #) -> f e
hsSyn/Convert.hs view
@@ -8,6 +8,7 @@  {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-}+{-# LANGUAGE TypeFamilies #-}  module Convert( convertToHsExpr, convertToPat, convertToHsDecls,                 convertToHsType,@@ -17,6 +18,7 @@  import HsSyn as Hs import qualified Class+import PrelNames import RdrName import qualified Name import Module@@ -27,7 +29,6 @@ import Type import qualified Coercion ( Role(..) ) import TysWiredIn-import TysPrim (eqPrimTyCon) import BasicTypes as Hs import ForeignCall import Unique@@ -42,7 +43,7 @@ import qualified Data.ByteString as BS import Control.Monad( unless, liftM, ap, (<=<) ) -import Data.Maybe( catMaybes, fromMaybe, isNothing )+import Data.Maybe( catMaybes, isNothing ) import Language.Haskell.TH as TH hiding (sigP) import Language.Haskell.TH.Syntax as TH @@ -144,15 +145,15 @@   | TH.VarP s <- pat   = do  { s' <- vNameL s         ; cl' <- cvtClause (mkPrefixFunRhs s') (Clause [] body ds)-        ; returnJustL $ Hs.ValD $ mkFunBind s' [cl'] }+        ; 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 $-          PatBind { pat_lhs = pat', pat_rhs = GRHSs body' (noLoc ds')-                  , pat_rhs_ty = placeHolderType, bind_fvs = placeHolderNames+        ; 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)@@ -163,12 +164,13 @@   | otherwise   = do  { nm' <- vNameL nm         ; cls' <- mapM (cvtClause (mkPrefixFunRhs nm')) cls-        ; returnJustL $ Hs.ValD $ mkFunBind nm' cls' }+        ; returnJustL $ Hs.ValD noExt $ mkFunBind nm' cls' }  cvtDec (TH.SigD nm typ)   = do  { nm' <- vNameL nm         ; ty' <- cvtType typ-        ; returnJustL $ Hs.SigD (TypeSig [nm'] (mkLHsSigWcType ty')) }+        ; returnJustL $ Hs.SigD noExt+                                    (TypeSig noExt [nm'] (mkLHsSigWcType ty')) }  cvtDec (TH.InfixD fx nm)   -- Fixity signatures are allowed for variables, constructors, and types@@ -176,7 +178,8 @@   -- 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 (FixSig (FixitySig [nm'] (cvtFixity fx)))) }+       ; returnJustL (Hs.SigD noExt (FixSig noExt+                                      (FixitySig noExt [nm'] (cvtFixity fx)))) }  cvtDec (PragmaD prag)   = cvtPragmaD prag@@ -184,10 +187,9 @@ cvtDec (TySynD tc tvs rhs)   = do  { (_, tc', tvs') <- cvt_tycl_hdr [] tc tvs         ; rhs' <- cvtType rhs-        ; returnJustL $ TyClD $-          SynDecl { tcdLName = tc', tcdTyVars = tvs'+        ; returnJustL $ TyClD noExt $+          SynDecl { tcdSExt = noExt, tcdLName = tc', tcdTyVars = tvs'                   , tcdFixity = Prefix-                  , tcdFVs = placeHolderNames                   , tcdRhs = rhs' } }  cvtDec (DataD ctxt tc tvs ksig constrs derivs)@@ -206,31 +208,33 @@         ; ksig' <- cvtKind `traverse` ksig         ; cons' <- mapM cvtConstr constrs         ; derivs' <- cvtDerivs derivs-        ; let defn = HsDataDefn { dd_ND = DataType, dd_cType = Nothing+        ; 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 (DataDecl { tcdLName = tc', tcdTyVars = tvs'+        ; returnJustL $ TyClD noExt (DataDecl+                                        { tcdDExt = noExt+                                        , tcdLName = tc', tcdTyVars = tvs'                                         , tcdFixity = Prefix-                                        , tcdDataDefn = defn-                                        , tcdDataCusk = PlaceHolder-                                        , tcdFVs = placeHolderNames }) }+                                        , 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_ND = NewType, dd_cType = Nothing+        ; 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 (DataDecl { tcdLName = tc', tcdTyVars = tvs'+        ; returnJustL $ TyClD noExt (DataDecl+                                    { tcdDExt = noExt+                                    , tcdLName = tc', tcdTyVars = tvs'                                     , tcdFixity = Prefix-                                    , tcdDataDefn = defn-                                    , tcdDataCusk = PlaceHolder-                                    , tcdFVs = placeHolderNames }) }+                                    , tcdDataDefn = defn }) }  cvtDec (ClassD ctxt cl tvs fds decs)   = do  { (cxt', tc', tvs') <- cvt_tycl_hdr ctxt cl tvs@@ -241,13 +245,13 @@                      <+> text "are not allowed:")                    $$ (Outputable.ppr adts'))         ; at_defs <- mapM cvt_at_def ats'-        ; returnJustL $ TyClD $-          ClassDecl { tcdCtxt = cxt', tcdLName = tc', tcdTyVars = tvs'+        ; 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 = []-                    , tcdFVs = placeHolderNames }+                    , tcdATs = fams', tcdATDefs = at_defs, tcdDocs = [] }                               -- no docs in TH ^^         }   where@@ -264,8 +268,8 @@         ; ctxt' <- cvtContext ctxt         ; L loc ty' <- cvtType ty         ; let inst_ty' = mkHsQualTy ctxt loc ctxt' $ L loc ty'-        ; returnJustL $ InstD $ ClsInstD $-          ClsInstDecl { cid_poly_ty = mkLHsSigType inst_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'@@ -283,27 +287,30 @@  cvtDec (ForeignD ford)   = do { ford' <- cvtForD ford-       ; returnJustL $ ForD ford' }+       ; returnJustL $ ForD noExt ford' }  cvtDec (DataFamilyD tc tvs kind)   = do { (_, tc', tvs') <- cvt_tycl_hdr [] tc tvs        ; result <- cvtMaybeKindToFamilyResultSig kind-       ; returnJustL $ TyClD $ FamDecl $-         FamilyDecl DataFamily tc' tvs' Prefix result Nothing }+       ; returnJustL $ TyClD noExt $ FamDecl noExt $+         FamilyDecl noExt DataFamily tc' tvs' Prefix result Nothing }  cvtDec (DataInstD ctxt tc tys ksig constrs derivs)   = do { (ctxt', tc', typats') <- cvt_tyinst_hdr ctxt tc tys        ; ksig' <- cvtKind `traverse` ksig        ; cons' <- mapM cvtConstr constrs        ; derivs' <- cvtDerivs derivs-       ; let defn = HsDataDefn { dd_ND = DataType, dd_cType = Nothing+       ; 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 $ DataFamInstD-           { dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $-                           FamEqn { feqn_tycon = tc', feqn_pats = typats'+       ; returnJustL $ InstD noExt $ DataFamInstD+           { dfid_ext = noExt+           , dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $+                           FamEqn { feqn_ext = noExt+                                  , feqn_tycon = tc', feqn_pats = typats'                                   , feqn_rhs = defn                                   , feqn_fixity = Prefix } }}} @@ -312,60 +319,68 @@        ; ksig' <- cvtKind `traverse` ksig        ; con' <- cvtConstr constr        ; derivs' <- cvtDerivs derivs-       ; let defn = HsDataDefn { dd_ND = NewType, dd_cType = Nothing+       ; 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 $ DataFamInstD-           { dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $-                           FamEqn { feqn_tycon = tc', feqn_pats = typats'+       ; returnJustL $ InstD noExt $ DataFamInstD+           { dfid_ext = noExt+           , dfid_inst = DataFamInstDecl { dfid_eqn = mkHsImplicitBndrs $+                           FamEqn { feqn_ext = noExt+                                  , feqn_tycon = tc', feqn_pats = typats'                                   , feqn_rhs = defn                                   , feqn_fixity = Prefix } }}}  cvtDec (TySynInstD tc eqn)   = do  { tc' <- tconNameL tc         ; L _ eqn' <- cvtTySynEqn tc' eqn-        ; returnJustL $ InstD $ TyFamInstD-            { tfid_inst = TyFamInstDecl { tfid_eqn = 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 $ FamDecl $-         FamilyDecl OpenTypeFamily tc' tyvars' Prefix result' injectivity' }+       ; 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 tc') eqns-       ; returnJustL $ TyClD $ FamDecl $-         FamilyDecl (ClosedTypeFamily (Just eqns')) tc' tyvars' Prefix result'-                                      injectivity' }+       ; 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 (RoleAnnotDecl tc' roles') }+       ; returnJustL $ Hs.RoleAnnotD noExt (RoleAnnotDecl noExt tc' roles') }  cvtDec (TH.StandaloneDerivD ds cxt ty)   = do { cxt' <- cvtContext cxt+       ; ds'  <- traverse cvtDerivStrategy ds        ; L loc ty'  <- cvtType ty        ; let inst_ty' = mkHsQualTy cxt loc cxt' $ L loc ty'-       ; returnJustL $ DerivD $-         DerivDecl { deriv_strategy = fmap (L loc . cvtDerivStrategy) ds-                   , deriv_type = mkLHsSigType inst_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 $ ClassOpSig True [nm'] (mkLHsSigType ty') }+       ; 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 $ PatSynBind $-           PSB nm' placeHolderType args' pat' dir' }+       ; 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@@ -383,7 +398,7 @@ cvtDec (TH.PatSynSigD nm ty)   = do { nm' <- cNameL nm        ; ty' <- cvtPatSynSigTy ty-       ; returnJustL $ Hs.SigD $ PatSynSig [nm'] (mkLHsSigType ty') }+       ; returnJustL $ Hs.SigD noExt $ PatSynSig noExt [nm'] (mkLHsSigType ty')}  ---------------- cvtTySynEqn :: Located RdrName -> TySynEqn -> CvtM (LTyFamInstEqn GhcPs)@@ -391,7 +406,8 @@   = do  { lhs' <- mapM (wrap_apps <=< cvtType) lhs         ; rhs' <- cvtType rhs         ; returnL $ mkHsImplicitBndrs-                  $ FamEqn { feqn_tycon  = tc+                  $ FamEqn { feqn_ext    = noExt+                           , feqn_tycon  = tc                            , feqn_pats   = lhs'                            , feqn_fixity = Prefix                            , feqn_rhs    = rhs' } }@@ -457,25 +473,29 @@ -------------------------------------------------------------------  is_fam_decl :: LHsDecl GhcPs -> Either (LFamilyDecl GhcPs) (LHsDecl GhcPs)-is_fam_decl (L loc (TyClD (FamDecl { tcdFam = d }))) = Left (L loc d)+is_fam_decl (L loc (TyClD _ (FamDecl { tcdFam = d }))) = Left (L loc d) is_fam_decl decl = Right decl  is_tyfam_inst :: LHsDecl GhcPs -> Either (LTyFamInstDecl GhcPs) (LHsDecl GhcPs)-is_tyfam_inst (L loc (Hs.InstD (TyFamInstD { tfid_inst = d }))) = Left (L loc d)-is_tyfam_inst decl                                              = Right decl+is_tyfam_inst (L loc (Hs.InstD _ (TyFamInstD { tfid_inst = d })))+  = Left (L loc d)+is_tyfam_inst decl+  = Right decl  is_datafam_inst :: LHsDecl GhcPs                 -> Either (LDataFamInstDecl GhcPs) (LHsDecl GhcPs)-is_datafam_inst (L loc (Hs.InstD (DataFamInstD { dfid_inst = d }))) = Left (L loc d)-is_datafam_inst decl                                                = Right decl+is_datafam_inst (L loc (Hs.InstD  _ (DataFamInstD { dfid_inst = d })))+  = Left (L loc d)+is_datafam_inst decl+  = Right decl  is_sig :: LHsDecl GhcPs -> Either (LSig GhcPs) (LHsDecl GhcPs)-is_sig (L loc (Hs.SigD sig)) = Left (L loc sig)-is_sig decl                  = Right decl+is_sig (L loc (Hs.SigD _ sig)) = Left (L loc sig)+is_sig decl                    = Right decl  is_bind :: LHsDecl GhcPs -> Either (LHsBind GhcPs) (LHsDecl GhcPs)-is_bind (L loc (Hs.ValD bind)) = Left (L loc bind)-is_bind decl                   = Right decl+is_bind (L loc (Hs.ValD _ bind)) = Left (L loc bind)+is_bind decl                     = Right decl  mkBadDecMsg :: Outputable a => MsgDoc -> [a] -> MsgDoc mkBadDecMsg doc bads@@ -490,59 +510,60 @@  cvtConstr (NormalC c strtys)   = do  { c'   <- cNameL c-        ; cxt' <- returnL []         ; tys' <- mapM cvt_arg strtys-        ; returnL $ mkConDeclH98 c' Nothing cxt' (PrefixCon tys') }+        ; returnL $ mkConDeclH98 c' Nothing Nothing (PrefixCon tys') }  cvtConstr (RecC c varstrtys)   = do  { c'    <- cNameL c-        ; cxt'  <- returnL []         ; args' <- mapM cvt_id_arg varstrtys-        ; returnL $ mkConDeclH98 c' Nothing cxt'+        ; returnL $ mkConDeclH98 c' Nothing Nothing                                    (RecCon (noLoc args')) }  cvtConstr (InfixC st1 c st2)   = do  { c'   <- cNameL c-        ; cxt' <- returnL []         ; st1' <- cvt_arg st1         ; st2' <- cvt_arg st2-        ; returnL $ mkConDeclH98 c' Nothing cxt' (InfixCon st1' st2') }+        ; returnL $ mkConDeclH98 c' Nothing Nothing (InfixCon st1' st2') }  cvtConstr (ForallC tvs ctxt con)-  = do  { tvs'        <- cvtTvs tvs-        ; L loc ctxt' <- cvtContext ctxt-        ; L _ con'    <- cvtConstr con-        ; returnL $ case con' of-                ConDeclGADT { con_type = conT } ->-                  let hs_ty  = mkHsForAllTy tvs noSrcSpan tvs' rho_ty-                      rho_ty = mkHsQualTy ctxt noSrcSpan (L loc ctxt')-                                                         (hsib_body conT)-                  in con' { con_type = mkHsImplicitBndrs hs_ty }-                ConDeclH98  {} ->-                  let qvars = case (tvs, con_qvars con') of-                        ([], Nothing) -> Nothing-                        (_ , m_qvs  ) -> Just $-                          mkHsQTvs (hsQTvExplicit tvs' ++-                                    maybe [] hsQTvExplicit m_qvs)-                  in con' { con_qvars = qvars-                          , con_cxt = Just $-                            L loc (ctxt' ++-                                   unLoc (fromMaybe (noLoc [])-                                          (con_cxt con'))) } }+  = do  { tvs'      <- cvtTvs tvs+        ; ctxt'     <- cvtContext ctxt+        ; L _ con'  <- cvtConstr con+        ; returnL $ add_forall tvs' ctxt' con' }+  where+    add_cxt lcxt         Nothing           = Just lcxt+    add_cxt (L loc cxt1) (Just (L _ cxt2)) = Just (L 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         ; L _ ty' <- cvtType ty         ; c_ty    <- mk_arr_apps args ty'-        ; returnL $ mkGadtDecl c' (mkLHsSigType c_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 (noLoc $ HsRecTy rec_flds) ty')-        ; returnL $ mkGadtDecl c' (mkLHsSigType rec_ty) }+        ; 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@@ -560,15 +581,16 @@        ; ty' <- wrap_apps ty''        ; let su' = cvtSrcUnpackedness su        ; let ss' = cvtSrcStrictness ss-       ; returnL $ HsBangTy (HsSrcBang NoSourceText su' ss') ty' }+       ; 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  { L li i' <- vNameL i         ; ty' <- cvt_arg (str,ty)         ; return $ noLoc (ConDeclField-                          { cd_fld_names-                              = [L li $ FieldOcc (L li i') PlaceHolder]+                          { cd_fld_ext = noExt+                          , cd_fld_names+                              = [L li $ FieldOcc noExt (L li i')]                           , cd_fld_type =  ty'                           , cd_fld_doc = Nothing}) } @@ -606,9 +628,9 @@     mk_imp impspec       = do { nm' <- vNameL nm            ; ty' <- cvtType ty-           ; return (ForeignImport { fd_name = nm'+           ; return (ForeignImport { fd_i_ext = noExt+                                   , fd_name = nm'                                    , fd_sig_ty = mkLHsSigType ty'-                                   , fd_co = noForeignImportCoercionYet                                    , fd_fi = impspec })            }     safety' = case safety of@@ -623,9 +645,9 @@                                                 (mkFastString as)                                                 (cvt_conv callconv)))                                                 (noLoc (SourceText as))-        ; return $ ForeignExport { fd_name = nm'+        ; return $ ForeignExport { fd_e_ext = noExt+                                 , fd_name = nm'                                  , fd_sig_ty = mkLHsSigType ty'-                                 , fd_co = noForeignExportCoercionYet                                  , fd_fe = e } }  cvt_conv :: TH.Callconv -> CCallConv@@ -651,7 +673,7 @@                                  , inl_rule   = cvtRuleMatch rm                                  , inl_act    = cvtPhases phases dflt                                  , inl_sat    = Nothing }-       ; returnJustL $ Hs.SigD $ InlineSig nm' ip }+       ; returnJustL $ Hs.SigD noExt $ InlineSig noExt nm' ip }  cvtPragmaD (SpecialiseP nm ty inline phases)   = do { nm' <- vNameL nm@@ -669,12 +691,12 @@                                , inl_rule   = Hs.FunLike                                , inl_act    = cvtPhases phases dflt                                , inl_sat    = Nothing }-       ; returnJustL $ Hs.SigD $ SpecSig nm' [mkLHsSigType ty'] ip }+       ; returnJustL $ Hs.SigD noExt $ SpecSig noExt nm' [mkLHsSigType ty'] ip }  cvtPragmaD (SpecialiseInstP ty)   = do { ty' <- cvtType ty-       ; returnJustL $ Hs.SigD $-         SpecInstSig (SourceText "{-# SPECIALISE") (mkLHsSigType ty') }+       ; returnJustL $ Hs.SigD noExt $+         SpecInstSig noExt (SourceText "{-# SPECIALISE") (mkLHsSigType ty') }  cvtPragmaD (RuleP nm bndrs lhs rhs phases)   = do { let nm' = mkFastString nm@@ -682,11 +704,10 @@        ; bndrs' <- mapM cvtRuleBndr bndrs        ; lhs'   <- cvtl lhs        ; rhs'   <- cvtl rhs-       ; returnJustL $ Hs.RuleD-            $ HsRules (SourceText "{-# RULES")-                      [noLoc $ HsRule (noLoc (SourceText nm,nm')) act bndrs'-                                                  lhs' placeHolderNames-                                                  rhs' placeHolderNames]+       ; returnJustL $ Hs.RuleD noExt+            $ HsRules noExt (SourceText "{-# RULES")+                      [noLoc $ HsRule noExt (noLoc (quotedSourceText nm,nm'))+                                                  act bndrs' lhs' rhs']        }  cvtPragmaD (AnnP target exp)@@ -699,8 +720,8 @@          ValueAnnotation n -> do            n' <- vcName n            return (ValueAnnProvenance (noLoc n'))-       ; returnJustL $ Hs.AnnD $ HsAnnotation (SourceText "{-# ANN") target'-                                               exp'+       ; returnJustL $ Hs.AnnD noExt+                     $ HsAnnotation noExt (SourceText "{-# ANN") target' exp'        }  cvtPragmaD (LineP line file)@@ -710,8 +731,8 @@ cvtPragmaD (CompleteP cls mty)   = do { cls' <- noLoc <$> mapM cNameL cls        ; mty'  <- traverse tconNameL mty-       ; returnJustL $ Hs.SigD-                   $ CompleteMatchSig NoSourceText cls' mty' }+       ; returnJustL $ Hs.SigD noExt+                   $ CompleteMatchSig noExt NoSourceText cls' mty' }  dfltActivation :: TH.Inline -> Activation dfltActivation TH.NoInline = NeverActive@@ -734,11 +755,11 @@ cvtRuleBndr :: TH.RuleBndr -> CvtM (Hs.LRuleBndr GhcPs) cvtRuleBndr (RuleVar n)   = do { n' <- vNameL n-       ; return $ noLoc $ Hs.RuleBndr n' }+       ; return $ noLoc $ Hs.RuleBndr noExt n' } cvtRuleBndr (TypedRuleVar n ty)   = do { n'  <- vNameL n        ; ty' <- cvtType ty-       ; return $ noLoc $ Hs.RuleBndrSig n' $ mkLHsSigWcType ty' }+       ; return $ noLoc $ Hs.RuleBndrSig noExt n' $ mkLHsSigWcType ty' }  --------------------------------------------------- --              Declarations@@ -747,22 +768,22 @@ cvtLocalDecs :: MsgDoc -> [TH.Dec] -> CvtM (HsLocalBinds GhcPs) cvtLocalDecs doc ds   | null ds-  = return EmptyLocalBinds+  = return (EmptyLocalBinds noExt)   | otherwise   = 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 (ValBindsIn (listToBag binds) sigs)) }+       ; return (HsValBinds noExt (ValBinds noExt (listToBag binds) sigs)) }  cvtClause :: HsMatchContext RdrName           -> TH.Clause -> CvtM (Hs.LMatch GhcPs (LHsExpr GhcPs)) cvtClause ctxt (Clause ps body wheres)   = do  { ps' <- cvtPats ps-        ; pps <- mapM wrap_conpat ps'+        ; let pps = map (parenthesizePat appPrec) ps'         ; g'  <- cvtGuard body         ; ds' <- cvtLocalDecs (text "a where clause") wheres-        ; returnL $ Hs.Match ctxt pps (GRHSs g' (noLoc ds')) }+        ; returnL $ Hs.Match noExt ctxt pps (GRHSs noExt g' (noLoc ds')) }   -------------------------------------------------------------------@@ -772,11 +793,13 @@ cvtl :: TH.Exp -> CvtM (LHsExpr GhcPs) cvtl e = wrapL (cvt e)   where-    cvt (VarE s)        = do { s' <- vName s; return $ HsVar (noLoc s') }-    cvt (ConE s)        = do { s' <- cName s; return $ HsVar (noLoc s') }+    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 isCompoundHsOverLit-      | otherwise       = go cvtLit     HsLit     isCompoundHsLit+      | 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)@@ -785,75 +808,89 @@         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 (noLoc e') else e'+          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 (mkLHsPar x') (mkLHsPar y')}+                                   ; return $ HsApp noExt (mkLHsPar x')+                                                          (mkLHsPar y')}     cvt (AppE x y)            = do { x' <- cvtl x; y' <- cvtl y-                                   ; return $ HsApp (mkLHsPar x') (mkLHsPar y')}+                                   ; return $ HsApp noExt (mkLHsPar x')+                                                          (mkLHsPar y')}     cvt (AppTypeE e t) = do { e' <- cvtl e                             ; t' <- cvtType t                             ; tp <- wrap_apps t'-                            ; return $ HsAppType e' $ mkHsWildCardBndrs tp }+                            ; let tp' = parenthesizeHsType appPrec tp+                            ; return $ HsAppType (mkHsWildCardBndrs tp') e' }     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 parenthesizeCompoundPat ps'-                            ; return $ HsLam (mkMatchGroup FromSource+                            ; let pats = map (parenthesizePat appPrec) ps'+                            ; return $ HsLam noExt (mkMatchGroup FromSource                                              [mkSimpleMatch LambdaExpr                                              pats e'])}-    cvt (LamCaseE ms)  = do { ms' <- mapM (cvtMatch LambdaExpr) ms-                            ; return $ HsLamCase (mkMatchGroup FromSource ms')+    cvt (LamCaseE ms)  = do { ms' <- mapM (cvtMatch CaseAlt) ms+                            ; return $ HsLamCase noExt+                                                   (mkMatchGroup FromSource ms')                             }-    cvt (TupE [e])     = do { e' <- cvtl e; return $ HsPar e' }+    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 (map (noLoc . Present) es')-                                                      Boxed }+                            ; return $ ExplicitTuple noExt+                                             (map (noLoc . (Present noExt)) es')+                                                                         Boxed }     cvt (UnboxedTupE es)      = do { es' <- mapM cvtl es-                                   ; return $ ExplicitTuple-                                           (map (noLoc . Present) es') Unboxed }+                                   ; return $ ExplicitTuple noExt+                                           (map (noLoc . (Present noExt)) es')+                                                                       Unboxed }     cvt (UnboxedSumE e alt arity) = do { e' <- cvtl e                                        ; unboxedSumChecks alt arity-                                       ; return $ ExplicitSum-                                             alt arity e' placeHolderType }+                                       ; return $ ExplicitSum noExt+                                                                   alt arity e'}     cvt (CondE x y z)  = do { x' <- cvtl x; y' <- cvtl y; z' <- cvtl z;-                            ; return $ HsIf (Just noSyntaxExpr) x' y' 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 placeHolderType alts' }+                            ; return $ HsMultiIf noExt alts' }     cvt (LetE ds e)    = do { ds' <- cvtLocalDecs (text "a let expression") ds-                            ; e' <- cvtl e; return $ HsLet (noLoc ds') e' }+                            ; e' <- cvtl e; return $ HsLet noExt (noLoc ds') e'}     cvt (CaseE e ms)   = do { e' <- cvtl e; ms' <- mapM (cvtMatch CaseAlt) ms-                            ; return $ HsCase e' (mkMatchGroup FromSource ms') }+                            ; return $ HsCase noExt e'+                                                 (mkMatchGroup FromSource ms') }     cvt (DoE ss)       = cvtHsDo DoExpr ss     cvt (CompE ss)     = cvtHsDo ListComp ss-    cvt (ArithSeqE dd) = do { dd' <- cvtDD dd; return $ ArithSeq noPostTcExpr Nothing dd' }+    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 l') }+      | Just s <- allCharLs xs       = do { l' <- cvtLit (StringL s)+                                          ; return (HsLit noExt l') }              -- Note [Converting strings]       | otherwise       = do { xs' <- mapM cvtl xs-                             ; return $ ExplicitList placeHolderType Nothing 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-                                          ; wrapParL HsPar $-                                            OpApp (mkLHsPar x') s' undefined (mkLHsPar 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 $ SectionR s' 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 $ SectionL x' s' }+                                          ; wrapParL (HsPar noExt) $+                                                          SectionL noExt x' s' } -    cvt (InfixE Nothing  s Nothing ) = do { s' <- cvtl s; return $ HsPar 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] @@ -863,9 +900,10 @@                                             _ -> mkLHsPar x'                               ; cvtOpApp x'' s y } --  Note [Converting UInfix] -    cvt (ParensE e)      = do { e' <- cvtl e; return $ HsPar e' }+    cvt (ParensE e)      = do { e' <- cvtl e; return $ HsPar noExt e' }     cvt (SigE e t)       = do { e' <- cvtl e; t' <- cvtType t-                              ; return $ ExprWithTySig e' (mkLHsSigWcType t') }+                              ; let pe = parenthesizeHsExpr sigPrec e'+                              ; return $ ExprWithTySig (mkLHsSigWcType t') pe }     cvt (RecConE c flds) = do { c' <- cNameL c                               ; flds' <- mapM (cvtFld (mkFieldOcc . noLoc)) flds                               ; return $ mkRdrRecordCon c' (HsRecFields flds' Nothing) }@@ -874,9 +912,9 @@                                   <- mapM (cvtFld (mkAmbiguousFieldOcc . noLoc))                                            flds                               ; return $ mkRdrRecordUpd e' flds' }-    cvt (StaticE e)      = fmap (HsStatic placeHolderNames) $ cvtl e-    cvt (UnboundVarE s)  = do { s' <- vName s; return $ HsVar (noLoc s') }-    cvt (LabelE s)       = do { return $ HsOverLabel Nothing (fsLit s) }+    cvt (StaticE e)      = fmap (HsStatic noExt) $ cvtl e+    cvt (UnboundVarE s)  = do { s' <- vName s; return $ HsVar noExt (noLoc s') }+    cvt (LabelE s)       = do { return $ HsOverLabel noExt Nothing (fsLit s) }  {- Note [Dropping constructors] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -926,7 +964,7 @@ 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 use HsAppsTy for UInfixT.+trees of @UInfixP@ and @UInfixE@ and right-bias the trees of @UInfixT@.  Sample input: @@ -967,7 +1005,7 @@ cvtOpApp x op y   = do { op' <- cvtl op        ; y' <- cvtl y-       ; return (OpApp x op' undefined y') }+       ; return (OpApp noExt x op' y') }  ------------------------------------- --      Do notation and statements@@ -981,10 +1019,11 @@         ; let Just (stmts'', last') = snocView stmts'          ; last'' <- case last' of-                    L loc (BodyStmt body _ _ _) -> return (L loc (mkLastStmt body))+                    L loc (BodyStmt _ body _ _)+                      -> return (L loc (mkLastStmt body))                     _ -> failWith (bad_last last') -        ; return $ HsDo do_or_lc (noLoc (stmts'' ++ [last''])) placeHolderType }+        ; 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@@ -997,42 +1036,45 @@ 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 (noLoc ds') }-cvtStmt (TH.ParS dss)  = do { dss' <- mapM cvt_one dss; returnL $ ParStmt dss' noExpr noSyntaxExpr placeHolderType }-                       where-                         cvt_one ds = do { ds' <- cvtStmts ds; return (ParStmtBlock ds' undefined noSyntaxExpr) }+                            ; 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) }  cvtMatch :: HsMatchContext RdrName          -> TH.Match -> CvtM (Hs.LMatch GhcPs (LHsExpr GhcPs)) cvtMatch ctxt (TH.Match p body decs)   = do  { p' <- cvtPat p-        ; lp <- case ctxt of-            CaseAlt -> return p'-            _       -> wrap_conpat p'+        ; let lp = case p' of+                     L loc SigPat{} -> L loc (ParPat NoExt p') -- #14875+                     _              -> p'         ; g' <- cvtGuard body         ; decs' <- cvtLocalDecs (text "a where clause") decs-        ; returnL $ Hs.Match ctxt [lp] (GRHSs g' (noLoc 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 [] e'; return [g'] }+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 [g'] rhs' }+                              ; returnL $ GRHS noExt [g'] rhs' } cvtpair (PatG gs,rhs)    = do { gs' <- cvtStmts gs; rhs' <- cvtl rhs-                              ; returnL $ GRHS gs' rhs' }+                              ; returnL $ GRHS noExt gs' rhs' }  cvtOverLit :: Lit -> CvtM (HsOverLit GhcPs) cvtOverLit (IntegerL i)-  = do { force i; return $ mkHsIntegral   (mkIntegralLit i)   placeHolderType}+  = do { force i; return $ mkHsIntegral   (mkIntegralLit i) } cvtOverLit (RationalL r)-  = do { force r; return $ mkHsFractional (mkFractionalLit r) placeHolderType}+  = do { force r; return $ mkHsFractional (mkFractionalLit r) } cvtOverLit (StringL s)   = do { let { s' = mkFastString s }        ; force s'-       ; return $ mkHsIsString (quotedSourceText s) s' placeHolderType+       ; return $ mkHsIsString (quotedSourceText s) s'        } cvtOverLit _ = panic "Convert.cvtOverLit: Unexpected overloaded literal" -- An Integer is like an (overloaded) '3' in a Haskell source program@@ -1063,9 +1105,9 @@ 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 def (mkFractionalLit f) }+  = do { force f; return $ HsFloatPrim noExt (mkFractionalLit f) } cvtLit (DoublePrimL f)-  = do { force f; return $ HsDoublePrim def (mkFractionalLit 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 }@@ -1094,40 +1136,48 @@                             ; return (mkNPat (noLoc l') Nothing) }                                   -- Not right for negative patterns;                                   -- need to think about that!-  | otherwise          = do { l' <- cvtLit l; return $ Hs.LitPat l' }-cvtp (TH.VarP s)       = do { s' <- vName s; return $ Hs.VarPat (noLoc s') }-cvtp (TupP [p])        = do { p' <- cvtPat p; return $ ParPat p' } -- Note [Dropping constructors]-cvtp (TupP ps)         = do { ps' <- cvtPats ps; return $ TuplePat ps' Boxed   [] }-cvtp (UnboxedTupP ps)  = do { ps' <- cvtPats ps; return $ TuplePat ps' Unboxed [] }+  | 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 p' alt arity placeHolderType }+                            ; return $ SumPat noExt p' alt arity } cvtp (ConP s ps)       = do { s' <- cNameL s; ps' <- cvtPats ps-                            ; pps <- mapM wrap_conpat 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 $-                              ConPatIn s' (InfixCon (mkParPat p1') (mkParPat 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 p' of  -- may be wrapped ConPatIn                                 (L _ (ParPat {})) -> return $ unLoc p'-                                _                 -> return $ ParPat p' }-cvtp (TildeP p)        = do { p' <- cvtPat p; return $ LazyPat p' }-cvtp (BangP p)         = do { p' <- cvtPat p; return $ BangPat p' }-cvtp (TH.AsP s p)      = do { s' <- vNameL s; p' <- cvtPat p; return $ AsPat s' p' }-cvtp TH.WildP          = return $ WildPat placeHolderType+                                _                 -> 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 ps' placeHolderType Nothing }+                            ; return+                                   $ ListPat noExt ps'} cvtp (SigP p t)        = do { p' <- cvtPat p; t' <- cvtType t-                            ; return $ SigPatIn p' (mkLHsSigWcType t') }+                            ; return $ SigPat (mkLHsSigWcType t') p' } cvtp (ViewP e p)       = do { e' <- cvtl e; p' <- cvtPat p-                            ; return $ ViewPat e' p' placeHolderType }+                            ; return $ ViewPat noExt e' p'}  cvtPatFld :: (TH.Name, TH.Pat) -> CvtM (LHsRecField GhcPs (LPat GhcPs)) cvtPatFld (s,p)@@ -1137,12 +1187,6 @@                                      , hsRecFieldArg = p'                                      , hsRecPun      = False}) } -wrap_conpat :: Hs.LPat GhcPs -> CvtM (Hs.LPat GhcPs)-wrap_conpat p@(L _ (ConPatIn _ (InfixCon{})))   = returnL $ ParPat p-wrap_conpat p@(L _ (ConPatIn _ (PrefixCon []))) = return p-wrap_conpat p@(L _ (ConPatIn _ (PrefixCon _)))  = returnL $ ParPat p-wrap_conpat p                                   = return p- {- | @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. @@ -1166,11 +1210,11 @@ cvt_tv :: TH.TyVarBndr -> CvtM (LHsTyVarBndr GhcPs) cvt_tv (TH.PlainTV nm)   = do { nm' <- tNameL nm-       ; returnL $ UserTyVar nm' }+       ; returnL $ UserTyVar noExt nm' } cvt_tv (TH.KindedTV nm ki)   = do { nm' <- tNameL nm        ; ki' <- cvtKind ki-       ; returnL $ KindedTyVar nm' ki' }+       ; returnL $ KindedTyVar noExt nm' ki' }  cvtRole :: TH.Role -> Maybe Coercion.Role cvtRole TH.NominalR          = Just Coercion.Nominal@@ -1187,14 +1231,17 @@ cvtDerivClause :: TH.DerivClause                -> CvtM (LHsDerivingClause GhcPs) cvtDerivClause (TH.DerivClause ds ctxt)-  = do { ctxt'@(L loc _) <- fmap (map mkLHsSigType) <$> cvtContext ctxt-       ; let ds' = fmap (L loc . cvtDerivStrategy) ds-       ; returnL $ HsDerivingClause ds' ctxt' }+  = do { ctxt' <- fmap (map mkLHsSigType) <$> cvtContext ctxt+       ; ds'   <- traverse cvtDerivStrategy ds+       ; returnL $ HsDerivingClause noExt ds' ctxt' } -cvtDerivStrategy :: TH.DerivStrategy -> Hs.DerivStrategy-cvtDerivStrategy TH.StockStrategy    = Hs.StockStrategy-cvtDerivStrategy TH.AnyclassStrategy = Hs.AnyclassStrategy-cvtDerivStrategy TH.NewtypeStrategy  = Hs.NewtypeStrategy+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"@@ -1207,17 +1254,18 @@              | tys' `lengthIs` n         -- Saturated              -> if n==1 then return (head tys') -- Singleton tuples treated                                                 -- like nothing (ie just parens)-                        else returnL (HsTupleTy HsBoxedOrConstraintTuple tys')+                        else returnL (HsTupleTy noExt+                                                  HsBoxedOrConstraintTuple tys')              | n == 1              -> failWith (ptext (sLit ("Illegal 1-tuple " ++ ty_str ++ " constructor")))              | otherwise-             -> mk_apps (HsTyVar NotPromoted+             -> mk_apps (HsTyVar noExt NotPromoted                                (noLoc (getRdrName (tupleTyCon Boxed n)))) tys'            UnboxedTupleT n              | tys' `lengthIs` n         -- Saturated-             -> returnL (HsTupleTy HsUnboxedTuple tys')+             -> returnL (HsTupleTy noExt HsUnboxedTuple tys')              | otherwise-             -> mk_apps (HsTyVar NotPromoted+             -> mk_apps (HsTyVar noExt NotPromoted                              (noLoc (getRdrName (tupleTyCon Unboxed n)))) tys'            UnboxedSumT n              | n < 2@@ -1226,29 +1274,42 @@                         , nest 2 $                             text "Sums must have an arity of at least 2" ]              | tys' `lengthIs` n -- Saturated-             -> returnL (HsSumTy tys')+             -> returnL (HsSumTy noExt tys')              | otherwise-             -> mk_apps (HsTyVar NotPromoted (noLoc (getRdrName (sumTyCon n))))+             -> mk_apps (HsTyVar noExt NotPromoted+                                              (noLoc (getRdrName (sumTyCon n))))                         tys'            ArrowT              | [x',y'] <- tys' -> do                  x'' <- case x' of-                          L _ HsFunTy{}    -> returnL (HsParTy x')-                          L _ HsForAllTy{} -> returnL (HsParTy x') -- #14646+                          L _ HsFunTy{}    -> returnL (HsParTy noExt x')+                          L _ HsForAllTy{} -> returnL (HsParTy noExt x')+                                                               -- #14646+                          L _ HsQualTy{}   -> returnL (HsParTy noExt x')+                                                               -- #15324                           _                -> return x'-                 returnL (HsFunTy x'' y')+                 returnL (HsFunTy noExt x'' y')              | otherwise ->-                  mk_apps (HsTyVar NotPromoted (noLoc (getRdrName funTyCon)))+                  mk_apps (HsTyVar noExt NotPromoted+                           (noLoc (getRdrName funTyCon)))                           tys'            ListT-             | [x']    <- tys' -> returnL (HsListTy x')+             | [x']    <- tys' -> returnL (HsListTy noExt x')              | otherwise ->-                  mk_apps (HsTyVar NotPromoted (noLoc (getRdrName listTyCon)))+                  mk_apps (HsTyVar noExt NotPromoted+                           (noLoc (getRdrName listTyCon)))                            tys'            VarT nm -> do { nm' <- tNameL nm-                         ; mk_apps (HsTyVar NotPromoted nm') tys' }+                         ; mk_apps (HsTyVar noExt NotPromoted nm') tys' }            ConT nm -> do { nm' <- tconName nm-                         ; mk_apps (HsTyVar NotPromoted (noLoc nm')) tys' }+                         ; -- 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 Promoted+                                      else NotPromoted+                         ; mk_apps (HsTyVar noExt prom (noLoc nm')) tys'}             ForallT tvs cxt ty              | null tys'@@ -1264,11 +1325,11 @@            SigT ty ki              -> do { ty' <- cvtType ty                    ; ki' <- cvtKind ki-                   ; mk_apps (HsKindSig ty' ki') tys'+                   ; mk_apps (HsKindSig noExt ty' ki') tys'                    }             LitT lit-             -> returnL (HsTyLit (cvtTyLit lit))+             -> returnL (HsTyLit noExt (cvtTyLit lit))             WildCardT              -> mk_apps mkAnonWildCardTy tys'@@ -1277,59 +1338,61 @@              -> do { s'  <- tconName s                    ; t1' <- cvtType t1                    ; t2' <- cvtType t2-                   ; mk_apps (HsTyVar NotPromoted (noLoc s')) [t1', t2']+                   ; mk_apps (HsTyVar noExt NotPromoted (noLoc s')) [t1', t2']                    }             UInfixT t1 s t2-             -> do { t1' <- cvtType t1-                   ; t2' <- cvtType t2-                   ; s'  <- tconName s-                   ; return $ cvtOpAppT t1' s' t2'+             -> do { t2' <- cvtType t2+                   ; cvtOpAppT t1 s t2'                    } -- Note [Converting UInfix]             ParensT t              -> do { t' <- cvtType t-                   ; returnL $ HsParTy t'+                   ; returnL $ HsParTy noExt t'                    }             PromotedT nm -> do { nm' <- cName nm-                              ; mk_apps (HsTyVar NotPromoted (noLoc nm')) tys' }+                              ; mk_apps (HsTyVar noExt Promoted+                                                             (noLoc nm')) tys' }                  -- Promoted data constructor; hence cName             PromotedTupleT n              | n == 1              -> failWith (ptext (sLit ("Illegal promoted 1-tuple " ++ ty_str)))              | m == n   -- Saturated-             -> do  { let kis = replicate m placeHolderKind-                    ; returnL (HsExplicitTupleTy kis tys')-                    }+             -> returnL (HsExplicitTupleTy noExt tys')+             | otherwise+             -> mk_apps (HsTyVar noExt Promoted+                               (noLoc (getRdrName (tupleDataCon Boxed n)))) tys'              where                m = length tys'             PromotedNilT-             -> returnL (HsExplicitListTy Promoted placeHolderKind [])+             -> returnL (HsExplicitListTy noExt Promoted [])             PromotedConsT  -- See Note [Representing concrete syntax in types]                           -- in Language.Haskell.TH.Syntax-             | [ty1, L _ (HsExplicitListTy ip _ tys2)] <- tys'-             -> returnL (HsExplicitListTy ip placeHolderKind (ty1:tys2))+             | [ty1, L _ (HsExplicitListTy _ ip tys2)] <- tys'+             -> returnL (HsExplicitListTy noExt ip (ty1:tys2))              | otherwise-             -> mk_apps (HsTyVar NotPromoted (noLoc (getRdrName consDataCon)))+             -> mk_apps (HsTyVar noExt Promoted+                         (noLoc (getRdrName consDataCon)))                         tys'             StarT-             -> returnL (HsTyVar NotPromoted (noLoc+             -> returnL (HsTyVar noExt NotPromoted (noLoc                                               (getRdrName liftedTypeKindTyCon)))             ConstraintT-             -> returnL (HsTyVar NotPromoted+             -> returnL (HsTyVar noExt NotPromoted                               (noLoc (getRdrName constraintKindTyCon)))             EqualityT-             | [x',y'] <- tys' -> returnL (HsEqTy x' y')+             | [x',y'] <- tys' ->+                   returnL (HsOpTy noExt x' (noLoc eqTyCon_RDR) y')              | otherwise ->-                   mk_apps (HsTyVar NotPromoted-                            (noLoc (getRdrName eqPrimTyCon))) tys'+                   mk_apps (HsTyVar noExt NotPromoted+                            (noLoc eqTyCon_RDR)) tys'             _ -> failWith (ptext (sLit ("Malformed " ++ ty_str)) <+> text (show ty))     }@@ -1340,15 +1403,15 @@ mk_apps head_ty (ty:tys) =   do { head_ty' <- returnL head_ty      ; p_ty      <- add_parens ty-     ; mk_apps (HsAppTy head_ty' p_ty) tys }+     ; mk_apps (HsAppTy noExt head_ty' p_ty) tys }   where     -- See Note [Adding parens for splices]-    add_parens t-      | isCompoundHsType t = returnL (HsParTy t)-      | otherwise          = return t+    add_parens lt@(L _ t)+      | hsTypeNeedsParens appPrec t = returnL (HsParTy noExt lt)+      | otherwise                   = return lt  wrap_apps  :: LHsType GhcPs -> CvtM (LHsType GhcPs)-wrap_apps t@(L _ HsAppTy {}) = returnL (HsParTy t)+wrap_apps t@(L _ HsAppTy {}) = returnL (HsParTy noExt t) wrap_apps t                  = return t  -- ---------------------------------------------------------------------@@ -1379,7 +1442,7 @@ 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 arg ret_ty_l) }+                             ; return (HsFunTy noExt arg ret_ty_l) }  split_ty_app :: TH.Type -> CvtM (TH.Type, [LHsType GhcPs]) split_ty_app ty = go ty []@@ -1391,23 +1454,20 @@ cvtTyLit (TH.NumTyLit i) = HsNumTy NoSourceText i cvtTyLit (TH.StrTyLit s) = HsStrTy NoSourceText (fsLit s) -{- | @cvtOpAppT x op y@ takes converted arguments and flattens any HsAppsTy-   structure in them.--}-cvtOpAppT :: LHsType GhcPs -> RdrName -> LHsType GhcPs -> LHsType GhcPs-cvtOpAppT t1@(L loc1 _) op t2@(L loc2 _)-  = L (combineSrcSpans loc1 loc2) $-    HsAppsTy (t1' ++ [noLoc $ HsAppInfix (noLoc op)] ++ t2')-  where-    t1' | L _ (HsAppsTy t1s) <- t1-        = t1s-        | otherwise-        = [noLoc $ HsAppPrefix t1]+{- | @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. -    t2' | L _ (HsAppsTy t2s) <- t2-        = t2s-        | otherwise-        = [noLoc $ HsAppPrefix t2]+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"@@ -1417,18 +1477,18 @@ -- signature is possible). cvtMaybeKindToFamilyResultSig :: Maybe TH.Kind                               -> CvtM (LFamilyResultSig GhcPs)-cvtMaybeKindToFamilyResultSig Nothing   = returnL Hs.NoSig+cvtMaybeKindToFamilyResultSig Nothing   = returnL (Hs.NoSig noExt) cvtMaybeKindToFamilyResultSig (Just ki) = do { ki' <- cvtKind ki-                                             ; returnL (Hs.KindSig 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+cvtFamilyResultSig TH.NoSig           = returnL (Hs.NoSig noExt) cvtFamilyResultSig (TH.KindSig ki)    = do { ki' <- cvtKind ki-                                           ; returnL (Hs.KindSig ki') }+                                           ; returnL (Hs.KindSig noExt  ki') } cvtFamilyResultSig (TH.TyVarSig bndr) = do { tv <- cvt_tv bndr-                                           ; returnL (Hs.TyVarSig tv) }+                                           ; returnL (Hs.TyVarSig noExt tv) }  -- | Convert injectivity annotation of a type family. cvtInjectivityAnnotation :: TH.InjectivityAnn@@ -1447,13 +1507,16 @@   | null univs, null reqs = do { l   <- getL                                ; ty' <- cvtType (ForallT exis provs ty)                                ; return $ L l (HsQualTy { hst_ctxt = L 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 = L l cxtTy }                                      cxtTy = HsQualTy { hst_ctxt = L l []+                                                      , hst_xqual = noExt                                                       , hst_body = ty' }                                ; return $ L l forTy }   | otherwise             = cvtType (ForallT univs reqs (ForallT exis provs ty))@@ -1503,15 +1566,16 @@              -> SrcSpan              -- ^ The location of the returned 'LHsType' if it needs an              --   explicit forall-             -> LHsQTyVars name+             -> LHsQTyVars GhcPs              -- ^ The converted type variable binders-             -> LHsType name+             -> LHsType GhcPs              -- ^ The converted rho type-             -> LHsType name+             -> LHsType GhcPs              -- ^ The complete type, quantified with a forall if necessary mkHsForAllTy tvs loc tvs' rho_ty   | null tvs  = rho_ty   | otherwise = L 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@@ -1526,15 +1590,16 @@            -> SrcSpan            -- ^ The location of the returned 'LHsType' if it needs an            --   explicit context-           -> LHsContext name+           -> LHsContext GhcPs            -- ^ The converted context-           -> LHsType name+           -> LHsType GhcPs            -- ^ The converted tau type-           -> LHsType name+           -> LHsType GhcPs            -- ^ The complete type, qualified with a context if necessary mkHsQualTy ctxt loc ctxt' ty   | null ctxt = ty-  | otherwise = L loc $ HsQualTy { hst_ctxt = ctxt', hst_body = ty }+  | otherwise = L loc $ HsQualTy { hst_xqual = noExt, hst_ctxt = ctxt'+                                 , hst_body = ty }  -------------------------------------------------------------------- --      Turning Name back into RdrName@@ -1624,8 +1689,14 @@     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 = (mkOrig $! (mkModule (mk_pkg pkg) (mk_mod mod))) $! (mk_occ (mk_ghc_ns th_ns) occ)+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)
hsSyn/HsBinds.hs view
@@ -14,6 +14,7 @@                                       -- in module PlaceHolder {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE TypeFamilies #-}  module HsBinds where @@ -56,7 +57,7 @@ -}  -- During renaming, we need bindings where the left-hand sides--- have been renamed but the the right-hand sides have not.+-- 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.@@ -72,23 +73,34 @@ -- Bindings in a 'let' expression -- or a 'where' clause data HsLocalBindsLR idL idR-  = HsValBinds (HsValBindsLR 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 the+         -- The parser accepts them, however, leaving the          -- renamer to report them -  | HsIPBinds  (HsIPBinds idR)+  | HsIPBinds+        (XHsIPBinds idL idR)+        (HsIPBinds idR)       -- ^ Haskell Implicit Parameter Bindings -  | EmptyLocalBinds+  | 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) -deriving instance (DataId idL, DataId idR) => Data (HsLocalBindsLR idL idR)  -- | Haskell Value Bindings type HsValBinds id = HsValBindsLR id id@@ -103,19 +115,32 @@     -- Before renaming RHS; idR is always RdrName     -- Not dependency analysed     -- Recursive by default-    ValBindsIn+    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.-  | ValBindsOut-        [(RecFlag, LHsBinds idL)]-        [LSig GhcRn] -- AZ: how to do this?+  | XValBindsLR+      (XXValBindsLR idL idR) -deriving instance (DataId idL, DataId idR) => Data (HsValBindsLR 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 @@ -194,6 +219,11 @@     -- 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@@ -212,12 +242,6 @@                                 -- type         Int -> forall a'. a' -> a'                                 -- Notice that the coercion captures the free a'. -        bind_fvs :: PostRn idL NameSet, -- ^ After the renamer, this contains-                                --  the locally-bound-                                -- free variables of this defn.-                                -- See Note [Bind free vars]--         fun_tick :: [Tickish Id] -- ^ Ticks to put on the rhs, if any     } @@ -235,10 +259,9 @@    -- 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_rhs_ty :: PostTc idR Type,      -- ^ Type of the GRHSs-        bind_fvs   :: PostRn idL NameSet, -- ^ See Note [Bind free vars]         pat_ticks  :: ([Tickish Id], [[Tickish Id]])                -- ^ Ticks to put on the rhs, if any, and ticks to put on                -- the bound variables.@@ -249,6 +272,7 @@   -- 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@@ -257,6 +281,7 @@    -- | Abstraction Bindings   | AbsBinds {                      -- Binds abstraction; TRANSLATION+        abs_ext     :: XAbsBinds idL idR,         abs_tvs     :: [TyVar],         abs_ev_vars :: [EvVar],  -- ^ Includes equality constraints @@ -277,7 +302,9 @@     }    -- | Patterns Synonym Binding-  | PatSynBind (PatSynBind idL idR)+  | PatSynBind+        (XPatSynBind idL idR)+        (PatSynBind idL idR)         -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnPattern',         --          'ApiAnnotation.AnnLarrow','ApiAnnotation.AnnEqual',         --          'ApiAnnotation.AnnWhere'@@ -285,8 +312,27 @@          -- For details on above see note [Api annotations] in ApiAnnotation -deriving instance (DataId idL, DataId idR) => Data (HsBindLR idL idR)+  | 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@@ -301,14 +347,19 @@  -- | Abtraction Bindings Export data ABExport p-  = ABE { abe_poly      :: IdP p -- ^ Any INLINE pragma is attached to this Id+  = 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-  }-deriving instance (DataId p) => Data (ABExport p)+        }+   | 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' @'{'@,@@ -318,15 +369,22 @@  -- | Pattern Synonym binding data PatSynBind idL idR-  = PSB { psb_id   :: Located (IdP idL),       -- ^ Name of the pattern synonym-          psb_fvs  :: PostRn idR NameSet,      -- ^ See Note [Bind free vars]+  = 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-  }-deriving instance (DataId idL, DataId idR) => Data (PatSynBind idL idR)+     }+   | 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] ~~~~~~~~~~~~~~~@@ -560,20 +618,21 @@     it's just an error thunk -} -instance (SourceTextX idL, SourceTextX idR,+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 (HsValBinds _ bs)   = ppr bs+  ppr (HsIPBinds _ bs)    = ppr bs+  ppr (EmptyLocalBinds _) = empty+  ppr (XHsLocalBindsLR x) = ppr x -instance (SourceTextX idL, SourceTextX idR,+instance (idL ~ GhcPass pl, idR ~ GhcPass pr,           OutputableBndrId idL, OutputableBndrId idR)         => Outputable (HsValBindsLR idL idR) where-  ppr (ValBindsIn binds sigs)+  ppr (ValBinds _ binds sigs)    = pprDeclList (pprLHsBindsForUser binds sigs) -  ppr (ValBindsOut sccs 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)@@ -584,17 +643,16 @@      pp_rec Recursive    = text "rec"      pp_rec NonRecursive = text "nonrec" -pprLHsBinds :: (SourceTextX idL, SourceTextX idR,-                OutputableBndrId idL, OutputableBndrId idR)-            => LHsBindsLR idL idR -> SDoc+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 :: (SourceTextX idL, SourceTextX idR,-                       OutputableBndrId idL, OutputableBndrId idR,-                       SourceTextX id2, OutputableBndrId id2)-                   => LHsBindsLR idL idR -> [LSig id2] -> [SDoc]+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@@ -623,25 +681,33 @@ pprDeclList ds = pprDeeperList vcat ds  -------------emptyLocalBinds :: HsLocalBindsLR a b-emptyLocalBinds = EmptyLocalBinds+emptyLocalBinds :: HsLocalBindsLR (GhcPass a) (GhcPass b)+emptyLocalBinds = EmptyLocalBinds noExt -isEmptyLocalBinds :: HsLocalBindsLR a b -> Bool-isEmptyLocalBinds (HsValBinds ds) = isEmptyValBinds ds-isEmptyLocalBinds (HsIPBinds ds)  = isEmptyIPBinds ds-isEmptyLocalBinds EmptyLocalBinds = True+-- 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+eqEmptyLocalBinds (EmptyLocalBinds _) = True+eqEmptyLocalBinds _                   = False -isEmptyValBinds :: HsValBindsLR a b -> Bool-isEmptyValBinds (ValBindsIn ds sigs)  = isEmptyLHsBinds ds && null sigs-isEmptyValBinds (ValBindsOut ds sigs) = null ds && null sigs+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 a b-emptyValBindsIn  = ValBindsIn emptyBag []-emptyValBindsOut = ValBindsOut []      []+emptyValBindsIn, emptyValBindsOut :: HsValBindsLR (GhcPass a) (GhcPass b)+emptyValBindsIn  = ValBinds noExt emptyBag []+emptyValBindsOut = XValBindsLR (NValBinds [] [])  emptyLHsBinds :: LHsBindsLR idL idR emptyLHsBinds = emptyBag@@ -650,22 +716,23 @@ isEmptyLHsBinds = isEmptyBag  -------------plusHsValBinds :: HsValBinds a -> HsValBinds a -> HsValBinds a-plusHsValBinds (ValBindsIn ds1 sigs1) (ValBindsIn ds2 sigs2)-  = ValBindsIn (ds1 `unionBags` ds2) (sigs1 ++ sigs2)-plusHsValBinds (ValBindsOut ds1 sigs1) (ValBindsOut ds2 sigs2)-  = ValBindsOut (ds1 ++ ds2) (sigs1 ++ sigs2)+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 (SourceTextX idL, SourceTextX idR,+instance (idL ~ GhcPass pl, idR ~ GhcPass pr,           OutputableBndrId idL, OutputableBndrId idR)          => Outputable (HsBindLR idL idR) where     ppr mbind = ppr_monobind mbind -ppr_monobind :: (SourceTextX idL, SourceTextX idR,-                 OutputableBndrId idL, OutputableBndrId idR)-             => HsBindLR idL idR -> SDoc+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@@ -680,7 +747,7 @@     $$  whenPprDebug (pprBndr LetBind (unLoc fun))     $$  pprFunBind  matches     $$  whenPprDebug (ppr wrap)-ppr_monobind (PatSynBind psb) = ppr psb+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 })@@ -698,15 +765,17 @@       , text "Evidence:" <+> ppr ev_binds ]     else       pprLHsBinds val_binds+ppr_monobind (XHsBindsLR x) = ppr x -instance (OutputableBndrId p) => Outputable (ABExport p) where+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 (SourceTextX idR,-          OutputableBndrId idL, OutputableBndrId idR)+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 })@@ -726,6 +795,7 @@           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@@ -748,14 +818,28 @@ -- | Haskell Implicit Parameter Bindings data HsIPBinds id   = IPBinds+        (XIPBinds id)         [LIPBind id]-        TcEvBinds       -- Only in typechecker output; binds-                        -- uses of the implicit parameters-deriving instance (DataId id) => Data (HsIPBinds id)+        -- TcEvBinds       -- Only in typechecker output; binds+        --                 -- uses of the implicit parameters+  | XHsIPBinds (XXHsIPBinds id) -isEmptyIPBinds :: HsIPBinds id -> Bool-isEmptyIPBinds (IPBinds is ds) = null is && isEmptyTcEvBinds ds+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@@ -774,18 +858,27 @@  -- For details on above see note [Api annotations] in ApiAnnotation data IPBind id-  = IPBind (Either (Located HsIPName) (IdP id)) (LHsExpr id)-deriving instance (DataId name) => Data (IPBind name)+  = IPBind+        (XCIPBind id)+        (Either (Located HsIPName) (IdP id))+        (LHsExpr id)+  | XIPBind (XXIPBind id) -instance (SourceTextX p, OutputableBndrId p) => Outputable (HsIPBinds p) where-  ppr (IPBinds bs ds) = pprDeeperList vcat (map ppr bs)+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 (SourceTextX p, OutputableBndrId p ) => Outputable (IPBind p) where-  ppr (IPBind lr rhs) = name <+> equals <+> pprExpr (unLoc rhs)+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  {- ************************************************************************@@ -822,6 +915,7 @@        -- 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 @@ -834,7 +928,7 @@       --           'ApiAnnotation.AnnDot','ApiAnnotation.AnnDarrow'        -- For details on above see note [Api annotations] in ApiAnnotation-  | PatSynSig [Located (IdP pass)] (LHsSigType pass)+  | PatSynSig (XPatSynSig pass) [Located (IdP pass)] (LHsSigType pass)       -- P :: forall a b. Req => Prov => ty        -- | A signature for a class method@@ -847,14 +941,14 @@       --       --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDefault',       --           'ApiAnnotation.AnnDcolon'-  | ClassOpSig Bool [Located (IdP pass)] (LHsSigType pass)+  | 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 Id+  | IdSig (XIdSig pass) Id          -- | An ordinary fixity declaration         --@@ -865,7 +959,7 @@         --           'ApiAnnotation.AnnVal'          -- For details on above see note [Api annotations] in ApiAnnotation-  | FixSig (FixitySig pass)+  | FixSig (XFixSig pass) (FixitySig pass)          -- | An inline pragma         --@@ -878,7 +972,8 @@         --       'ApiAnnotation.AnnClose'          -- For details on above see note [Api annotations] in ApiAnnotation-  | InlineSig   (Located (IdP pass)) -- Function name+  | InlineSig   (XInlineSig pass)+                (Located (IdP pass)) -- Function name                 InlinePragma         -- Never defaultInlinePragma          -- | A specialisation pragma@@ -893,7 +988,8 @@         --      'ApiAnnotation.AnnDcolon'          -- For details on above see note [Api annotations] in ApiAnnotation-  | SpecSig     (Located (IdP pass)) -- Specialise a function or datatype  ...+  | 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@@ -910,7 +1006,7 @@         --      'ApiAnnotation.AnnInstance','ApiAnnotation.AnnClose'          -- For details on above see note [Api annotations] in ApiAnnotation-  | SpecInstSig SourceText (LHsSigType pass)+  | SpecInstSig (XSpecInstSig pass) SourceText (LHsSigType pass)                   -- Note [Pragma source text] in BasicTypes          -- | A minimal complete definition pragma@@ -922,7 +1018,8 @@         --      'ApiAnnotation.AnnClose'          -- For details on above see note [Api annotations] in ApiAnnotation-  | MinimalSig SourceText (LBooleanFormula (Located (IdP pass)))+  | MinimalSig (XMinimalSig pass)+               SourceText (LBooleanFormula (Located (IdP pass)))                -- Note [Pragma source text] in BasicTypes          -- | A "set cost centre" pragma for declarations@@ -933,7 +1030,8 @@         --         -- > {-# SCC funName "cost_centre_name" #-} -  | SCCFunSig  SourceText      -- Note [Pragma source text] in BasicTypes+  | SCCFunSig  (XSCCFunSig pass)+               SourceText      -- Note [Pragma source text] in BasicTypes                (Located (IdP pass))  -- Function name                (Maybe (Located StringLiteral))        -- | A complete match pragma@@ -943,19 +1041,35 @@        -- Used to inform the pattern match checker about additional        -- complete matchings which, for example, arise from pattern        -- synonym definitions.-  | CompleteMatchSig SourceText+  | CompleteMatchSig (XCompleteMatchSig pass)+                     SourceText                      (Located [Located (IdP pass)])                      (Maybe (Located (IdP pass)))+  | XSig (XXSig pass) -deriving instance (DataId pass) => Data (Sig 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 [Located (IdP pass)] Fixity-deriving instance (DataId pass) => Data (FixitySig pass)+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@@ -1036,17 +1150,18 @@ hsSigDoc :: Sig name -> SDoc hsSigDoc (TypeSig {})           = text "type signature" hsSigDoc (PatSynSig {})         = text "pattern synonym signature"-hsSigDoc (ClassOpSig is_deflt _ _)+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 (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@@ -1054,46 +1169,48 @@ equality is not enough -- we have to check if they overlap. -} -instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (Sig pass) where+instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (Sig p) where     ppr sig = ppr_sig sig -ppr_sig :: (SourceTextX pass, OutputableBndrId pass ) => Sig pass -> SDoc-ppr_sig (TypeSig vars ty)    = pprVarSig (map unLoc vars) (ppr ty)-ppr_sig (ClassOpSig is_deflt vars ty)+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 }))+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)+ppr_sig (InlineSig _ var inl)   = pragSrcBrackets (inl_src inl) "{-# INLINE"  (pprInline inl                                    <+> pprPrefixOcc (unLoc var))-ppr_sig (SpecInstSig src ty)+ppr_sig (SpecInstSig _ src ty)   = pragSrcBrackets src "{-# SPECIALISE" (text "instance" <+> ppr ty)-ppr_sig (MinimalSig src bf)+ppr_sig (MinimalSig _ src bf)   = pragSrcBrackets src "{-# MINIMAL" (pprMinimalSig bf)-ppr_sig (PatSynSig names sig_ty)+ppr_sig (PatSynSig _ names sig_ty)   = text "pattern" <+> pprVarSig (map unLoc names) (ppr sig_ty)-ppr_sig (SCCFunSig src fn mlabel)+ppr_sig (SCCFunSig _ src fn mlabel)   = pragSrcBrackets src "{-# SCC" (ppr fn <+> maybe empty ppr mlabel )-ppr_sig (CompleteMatchSig src cs mty)+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 pass => Outputable (FixitySig pass) where-  ppr (FixitySig names fixity) = sep [ppr fixity, pprops]+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 "#-}"@@ -1198,4 +1315,3 @@   = Unidirectional   | ImplicitBidirectional   | ExplicitBidirectional (MatchGroup id (LHsExpr id))-deriving instance (DataId id) => Data (HsPatSynDir id)
hsSyn/HsDecls.hs view
@@ -10,2158 +10,2328 @@ {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]                                       -- in module PlaceHolder {-# LANGUAGE ConstraintKinds #-}-{-# LANGUAGE FlexibleInstances #-}---- | Abstract syntax of global declarations.------ Definitions for: @SynDecl@ and @ConDecl@, @ClassDecl@,--- @InstDecl@, @DefaultDecl@ and @ForeignDecl@.-module HsDecls (-  -- * Toplevel declarations-  HsDecl(..), LHsDecl, HsDataDefn(..), HsDeriving,-  HsDerivingClause(..), LHsDerivingClause,--  -- ** Class or type declarations-  TyClDecl(..), LTyClDecl,-  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, NewOrData(..), FamilyInfo(..),-  TyFamInstDecl(..), LTyFamInstDecl, instDeclDataFamInsts,-  DataFamInstDecl(..), LDataFamInstDecl, pprDataFamInstFlavour, pprFamInstLHS,-  FamInstEqn, LFamInstEqn, FamEqn(..),-  TyFamInstEqn, LTyFamInstEqn, TyFamDefltEqn, LTyFamDefltEqn,-  HsTyPats,-  LClsInstDecl, ClsInstDecl(..),--  -- ** Standalone deriving declarations-  DerivDecl(..), LDerivDecl,-  -- ** @RULE@ declarations-  LRuleDecls,RuleDecls(..),RuleDecl(..), LRuleDecl, RuleBndr(..),LRuleBndr,-  collectRuleBndrSigTys,-  flattenRuleDecls, pprFullRuleName,-  -- ** @VECTORISE@ declarations-  VectDecl(..), LVectDecl,-  lvectDeclName, lvectInstDecl,-  -- ** @default@ declarations-  DefaultDecl(..), LDefaultDecl,-  -- ** Template haskell declaration splice-  SpliceExplicitFlag(..),-  SpliceDecl(..), LSpliceDecl,-  -- ** Foreign function interface declarations-  ForeignDecl(..), LForeignDecl, ForeignImport(..), ForeignExport(..),-  noForeignImportCoercionYet, noForeignExportCoercionYet,-  CImportSpec(..),-  -- ** Data-constructor declarations-  ConDecl(..), LConDecl,-  HsConDeclDetails, hsConDeclArgTys,-  getConNames,-  getConDetails,-  gadtDeclDetails,-  -- ** 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( LHsExpr, HsExpr, HsSplice, pprExpr,-                                pprSpliceDecl )-        -- Because Expr imports Decls via HsBracket--import HsBinds-import HsTypes-import HsDoc-import TyCon-import Name-import BasicTypes-import Coercion-import ForeignCall-import PlaceHolder ( PlaceHolder(..) )-import HsExtension-import NameSet---- others:-import InstEnv-import Class-import Outputable-import Util-import SrcLoc--import Bag-import Maybes-import Data.Data        hiding (TyCon,Fixity, Infix)--{--************************************************************************-*                                                                      *-\subsection[HsDecl]{Declarations}-*                                                                      *-************************************************************************--}--type LHsDecl id = Located (HsDecl id)-        -- ^ 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 id-  = TyClD       (TyClDecl id)      -- ^ Type or Class Declaration-  | InstD       (InstDecl  id)     -- ^ Instance declaration-  | DerivD      (DerivDecl id)     -- ^ Deriving declaration-  | ValD        (HsBind id)        -- ^ Value declaration-  | SigD        (Sig id)           -- ^ Signature declaration-  | DefD        (DefaultDecl id)   -- ^ 'default' declaration-  | ForD        (ForeignDecl id)   -- ^ Foreign declaration-  | WarningD    (WarnDecls id)     -- ^ Warning declaration-  | AnnD        (AnnDecl id)       -- ^ Annotation declaration-  | RuleD       (RuleDecls id)     -- ^ Rule declaration-  | VectD       (VectDecl id)      -- ^ Vectorise declaration-  | SpliceD     (SpliceDecl id)    -- ^ Splice declaration-                                   -- (Includes quasi-quotes)-  | DocD        (DocDecl)          -- ^ Documentation comment declaration-  | RoleAnnotD  (RoleAnnotDecl id) -- ^ Role annotation declaration-deriving instance (DataId id) => Data (HsDecl id)----- 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 id-  = HsGroup {-        hs_valds  :: HsValBinds id,-        hs_splcds :: [LSpliceDecl id],--        hs_tyclds :: [TyClGroup id],-                -- A list of mutually-recursive groups;-                -- This includes `InstDecl`s as well;-                -- Parser generates a singleton list;-                -- renamer does dependency analysis--        hs_derivds :: [LDerivDecl id],--        hs_fixds  :: [LFixitySig id],-                -- Snaffled out of both top-level fixity signatures,-                -- and those in class declarations--        hs_defds  :: [LDefaultDecl id],-        hs_fords  :: [LForeignDecl id],-        hs_warnds :: [LWarnDecls id],-        hs_annds  :: [LAnnDecl id],-        hs_ruleds :: [LRuleDecls id],-        hs_vects  :: [LVectDecl id],--        hs_docs   :: [LDocDecl]-  }-deriving instance (DataId id) => Data (HsGroup id)--emptyGroup, emptyRdrGroup, emptyRnGroup :: HsGroup a-emptyRdrGroup = emptyGroup { hs_valds = emptyValBindsIn }-emptyRnGroup  = emptyGroup { hs_valds = emptyValBindsOut }--hsGroupInstDecls :: HsGroup id -> [LInstDecl id]-hsGroupInstDecls = (=<<) group_instds . hs_tyclds--emptyGroup = HsGroup { hs_tyclds = [],-                       hs_derivds = [],-                       hs_fixds = [], hs_defds = [], hs_annds = [],-                       hs_fords = [], hs_warnds = [], hs_ruleds = [], hs_vects = [],-                       hs_valds = error "emptyGroup hs_valds: Can't happen",-                       hs_splcds = [],-                       hs_docs = [] }--appendGroups :: HsGroup a -> HsGroup a -> HsGroup a-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_vects = vects1,-  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_vects  = vects2,-        hs_docs   = docs2 }-  =-    HsGroup {-        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_vects  = vects1 ++ vects2,-        hs_docs   = docs1  ++ docs2 }--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (HsDecl pass) 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 (VectD vect)            = ppr vect-    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--instance (SourceTextX pass, OutputableBndrId pass)-      => Outputable (HsGroup pass) 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,-                   hs_vects  = vect_decls })-        = vcat_mb empty-            [ppr_ds fix_decls, ppr_ds default_decls,-             ppr_ds deprec_decls, ppr_ds ann_decls,-             ppr_ds rule_decls,-             ppr_ds vect_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---- | Located Splice Declaration-type LSpliceDecl pass = Located (SpliceDecl pass)---- | Splice Declaration-data SpliceDecl id-  = SpliceDecl                  -- Top level splice-        (Located (HsSplice id))-        SpliceExplicitFlag-deriving instance (DataId id) => Data (SpliceDecl id)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (SpliceDecl pass) where-   ppr (SpliceDecl (L _ e) f) = pprSpliceDecl e f--{--************************************************************************-*                                                                      *-            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 { tcdFam :: FamilyDecl pass }--  | -- | @type@ declaration-    ---    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnType',-    --             'ApiAnnotation.AnnEqual',--    -- For details on above see note [Api annotations] in ApiAnnotation-    SynDecl { 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-            , tcdFVs    :: PostRn pass NameSet }--  | -- | @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 { tcdLName    :: Located (IdP pass) -- ^ Type constructor-             , tcdTyVars   :: LHsQTyVars pass  -- ^ Type variables; for an-                                               -- associated type-                                               --   these include outer binders-                                               -- Eg  class T a where-                                               --       type F a :: *-                                               --       type F a = a -> a-                                               -- Here the type decl for 'f'-                                               -- includes 'a' in its tcdTyVars-             , tcdFixity  :: LexicalFixity -- ^ Fixity used in the declaration-             , tcdDataDefn :: HsDataDefn pass-             , tcdDataCusk :: PostRn pass Bool    -- ^ does this have a CUSK?-             , tcdFVs      :: PostRn pass NameSet }--  | ClassDecl { 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     :: [Located (FunDep (Located (IdP 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-                tcdFVs     :: PostRn pass NameSet-    }-        -- ^ - '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--deriving instance (DataId id) => Data (TyClDecl id)----- 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--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 [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 { tcdDataCusk = cusk }) = cusk-hsDeclHasCusk (ClassDecl { tcdTyVars = tyvars }) = hsTvbAllKinded tyvars---- Pretty-printing TyClDecl--- ~~~~~~~~~~~~~~~~~~~~~~~~--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (TyClDecl pass) 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 [] <+> 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 (unLoc context)-                    <+> pprFundeps (map unLoc fds)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (TyClGroup pass) where-  ppr (TyClGroup { group_tyclds = tyclds-                 , group_roles = roles-                 , group_instds = instds-                 }-      )-    = ppr tyclds $$-      ppr roles $$-      ppr instds--pp_vanilla_decl_head :: (SourceTextX pass, OutputableBndrId pass)-   => Located (IdP pass)-   -> LHsQTyVars pass-   -> LexicalFixity-   -> HsContext pass-   -> SDoc-pp_vanilla_decl_head thing (HsQTvs { hsq_explicit = tyvars }) fixity context- = hsep [pprHsContext 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 [] = ppr thing--pprTyClDeclFlavour :: TyClDecl a -> SDoc-pprTyClDeclFlavour (ClassDecl {})   = text "class"-pprTyClDeclFlavour (SynDecl {})     = text "type"-pprTyClDeclFlavour (FamDecl { tcdFam = FamilyDecl { fdInfo = info }})-  = pprFlavour info <+> text "family"-pprTyClDeclFlavour (DataDecl { tcdDataDefn = HsDataDefn { dd_ND = nd } })-  = ppr nd---{- Note [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.--A declaration has a CUSK if we can know its complete kind without doing any-inference, at all. Here are the rules:-- - A class or datatype is said to have a CUSK if and only if all of its type-variables are annotated. Its result kind is, by construction, Constraint or *-respectively.-- - A type synonym has a CUSK if and only if all of its type variables and its-RHS are annotated with kinds.-- - A closed type family is said to have a CUSK if and only if all of its type-variables and its return type are annotated.-- - An open type family always has a CUSK -- unannotated type variables (and-return type) default to *.-- - Additionally, if -XTypeInType is on, then 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.)--}---{- *********************************************************************-*                                                                      *-                         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_tyclds :: [LTyClDecl pass]-              , group_roles  :: [LRoleAnnotDecl pass]-              , group_instds :: [LInstDecl pass] }-deriving instance (DataId id) => Data (TyClGroup id)--emptyTyClGroup :: TyClGroup pass-emptyTyClGroup = TyClGroup [] [] []--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 pass] -> [LInstDecl pass] -> TyClGroup pass-mkTyClGroup decls instds = TyClGroup-  { 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-  -- ^ - 'ApiAnnotation.AnnKeywordId' :--  -- For details on above see note [Api annotations] in ApiAnnotation--  | KindSig  (LHsKind pass)-  -- ^ - 'ApiAnnotation.AnnKeywordId' :-  --             'ApiAnnotation.AnnOpenP','ApiAnnotation.AnnDcolon',-  --             'ApiAnnotation.AnnCloseP'--  -- For details on above see note [Api annotations] in ApiAnnotation--  | TyVarSig (LHsTyVarBndr pass)-  -- ^ - 'ApiAnnotation.AnnKeywordId' :-  --             'ApiAnnotation.AnnOpenP','ApiAnnotation.AnnDcolon',-  --             'ApiAnnotation.AnnCloseP', 'ApiAnnotation.AnnEqual'--  -- For details on above see note [Api annotations] in ApiAnnotation--deriving instance (DataId pass) => Data (FamilyResultSig pass)---- | Located type Family Declaration-type LFamilyDecl pass = Located (FamilyDecl pass)---- | type Family Declaration-data FamilyDecl pass = FamilyDecl-  { fdInfo           :: FamilyInfo pass              -- type/data, closed/open-  , fdLName          :: Located (IdP pass)           -- type constructor-  , fdTyVars         :: LHsQTyVars pass              -- type variables-  , fdFixity         :: LexicalFixity         -- Fixity used in the declaration-  , fdResultSig      :: LFamilyResultSig pass        -- result signature-  , fdInjectivityAnn :: Maybe (LInjectivityAnn pass) -- optional injectivity ann-  }-  -- ^ - '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--deriving instance (DataId id) => Data (FamilyDecl id)---- | 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-deriving instance (DataId pass) => Data (InjectivityAnn pass)--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])-deriving instance (DataId pass) => Data (FamilyInfo pass)---- | Does this family declaration have a complete, user-supplied kind signature?-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 (SourceTextX pass, OutputableBndrId pass)-       => Outputable (FamilyDecl pass) where-  ppr = pprFamilyDecl TopLevel--pprFamilyDecl :: (SourceTextX pass, OutputableBndrId pass)-              => TopLevelFlag -> FamilyDecl pass -> 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 [] <+>-           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-    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)--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_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-   }-deriving instance (DataId id) => Data (HsDataDefn id)---- | 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_strategy :: Maybe (Located DerivStrategy)-      -- ^ 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)@.-    }-deriving instance (DataId id) => Data (HsDerivingClause id)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (HsDerivingClause pass) where-  ppr (HsDerivingClause { deriv_clause_strategy = dcs-                        , deriv_clause_tys      = L _ dct })-    = hsep [ text "deriving"-           , ppDerivStrategy dcs-           , pp_dct dct ]-      where-        -- This complexity is to distinguish between-        --    deriving Show-        --    deriving (Show)-        pp_dct [a@(HsIB { hsib_body = ty })]-          | isCompoundHsType ty = parens (ppr a)-          | otherwise           = ppr a-        pp_dct _   = parens (interpp'SP dct)--data NewOrData-  = NewType                     -- ^ @newtype Blah ...@-  | DataType                    -- ^ @data Blah ...@-  deriving( Eq, Data )                -- Needed because Demand derives Eq---- | 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_names   :: [Located (IdP pass)]-      , con_type    :: LHsSigType pass-        -- ^ The type after the ‘::’-      , con_doc     :: Maybe LHsDocString-          -- ^ A possible Haddock comment.-      }--  | ConDeclH98-      { con_name    :: Located (IdP pass)--      , con_qvars     :: Maybe (LHsQTyVars pass)-        -- User-written forall (if any), and its implicit-        -- kind variables-        -- Non-Nothing means an explicit user-written forall-        --     e.g. data T a = forall b. MkT b (b->a)-        --     con_qvars = {b}--      , con_cxt       :: Maybe (LHsContext pass)-        -- ^ User-written context (if any)--      , con_details   :: HsConDeclDetails pass-          -- ^ Arguments--      , con_doc       :: Maybe LHsDocString-          -- ^ A possible Haddock comment.-      }-deriving instance (DataId pass) => Data (ConDecl pass)---- | 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---- don't call with RdrNames, because it can't deal with HsAppsTy-getConDetails :: ConDecl pass -> HsConDeclDetails pass-getConDetails ConDeclH98  {con_details  = details} = details-getConDetails ConDeclGADT {con_type     = ty     } = details-  where-    (details,_,_,_) = gadtDeclDetails ty---- don't call with RdrNames, because it can't deal with HsAppsTy-gadtDeclDetails :: LHsSigType pass-                -> ( HsConDeclDetails pass-                   , LHsType pass-                   , LHsContext pass-                   , [LHsTyVarBndr pass] )-gadtDeclDetails HsIB {hsib_body = lbody_ty} = (details,res_ty,cxt,tvs)-  where-    (tvs, cxt, tau) = splitLHsSigmaTy lbody_ty-    (details, res_ty)           -- See Note [Sorting out the result type]-      = case tau of-          L _ (HsFunTy (L l (HsRecTy flds)) res_ty')-                  -> (RecCon (L l flds), res_ty')-          _other  -> (PrefixCon [], tau)--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)--pp_data_defn :: (SourceTextX pass, OutputableBndrId pass)-                  => (HsContext pass -> SDoc)   -- Printing the header-                  -> HsDataDefn pass-                  -> SDoc-pp_data_defn pp_hdr (HsDataDefn { dd_ND = new_or_data, dd_ctxt = L _ 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)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (HsDataDefn pass) where-   ppr d = pp_data_defn (\_ -> text "Naked HsDataDefn") d--instance Outputable NewOrData where-  ppr NewType  = text "newtype"-  ppr DataType = text "data"--pp_condecls :: (SourceTextX pass, OutputableBndrId pass)-            => [LConDecl pass] -> 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 (SourceTextX pass, OutputableBndrId pass)-       => Outputable (ConDecl pass) where-    ppr = pprConDecl--pprConDecl :: (SourceTextX pass, OutputableBndrId pass) => ConDecl pass -> SDoc-pprConDecl (ConDeclH98 { con_name = L _ con-                       , con_qvars = mtvs-                       , con_cxt = mcxt-                       , con_details = details-                       , con_doc = doc })-  = sep [ppr_mbDoc doc, pprHsForAll tvs cxt,         ppr_details details]-  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)-    tvs = case mtvs of-      Nothing -> []-      Just (HsQTvs { hsq_explicit = tvs }) -> tvs--    cxt = fromMaybe (noLoc []) mcxt--pprConDecl (ConDeclGADT { con_names = cons, con_type = res_ty, con_doc = doc })-  = sep [ppr_mbDoc doc <+> ppr_con_names cons <+> dcolon-         <+> ppr res_ty]--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 = [LHsType 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. These type patterns can of course contain-type (and kind) variables, which are bound in the hsib_vars field of the-HsImplicitBndrs in FamInstEqn. Note 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.--}---- | 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-deriving instance DataId pass => Data (TyFamInstDecl pass)------------------- 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-deriving instance DataId pass => Data (DataFamInstDecl pass)------------------- 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_tycon  :: Located (IdP pass)-       , feqn_pats   :: pats-       , feqn_fixity :: LexicalFixity -- ^ Fixity used in the declaration-       , feqn_rhs    :: rhs-       }-    -- ^-    --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnEqual'--    -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId pass, Data pats, Data rhs)-                => Data (FamEqn pass pats rhs)------------------- Class instances ----------------- | Located Class Instance Declaration-type LClsInstDecl pass = Located (ClsInstDecl pass)---- | Class Instance Declaration-data ClsInstDecl pass-  = ClsInstDecl-      { 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-deriving instance (DataId id) => Data (ClsInstDecl id)-------------------- 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_inst  :: ClsInstDecl pass }-  | DataFamInstD              -- data family instance-      { dfid_inst :: DataFamInstDecl pass }-  | TyFamInstD              -- type family instance-      { tfid_inst :: TyFamInstDecl pass }-deriving instance (DataId id) => Data (InstDecl id)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (TyFamInstDecl pass) where-  ppr = pprTyFamInstDecl TopLevel--pprTyFamInstDecl :: (SourceTextX pass, OutputableBndrId pass)-                 => TopLevelFlag -> TyFamInstDecl pass -> 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 :: (SourceTextX pass, OutputableBndrId pass)-                 => TyFamInstEqn pass -> SDoc-ppr_fam_inst_eqn (HsIB { hsib_body = FamEqn { feqn_tycon  = tycon-                                            , feqn_pats   = pats-                                            , feqn_fixity = fixity-                                            , feqn_rhs    = rhs }})-    = pprFamInstLHS tycon pats fixity [] Nothing <+> equals <+> ppr rhs--ppr_fam_deflt_eqn :: (SourceTextX pass, OutputableBndrId pass)-                  => LTyFamDefltEqn pass -> 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 []-                  <+> equals <+> ppr rhs--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (DataFamInstDecl pass) where-  ppr = pprDataFamInstDecl TopLevel--pprDataFamInstDecl :: (SourceTextX pass, OutputableBndrId pass)-                   => TopLevelFlag -> DataFamInstDecl pass -> SDoc-pprDataFamInstDecl top_lvl (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                             FamEqn { feqn_tycon  = tycon-                                    , feqn_pats   = pats-                                    , feqn_fixity = fixity-                                    , feqn_rhs    = defn }}})-  = pp_data_defn pp_hdr defn-  where-    pp_hdr ctxt = ppr_instance_keyword top_lvl-              <+> pprFamInstLHS tycon pats fixity ctxt (dd_kindSig defn)--pprDataFamInstFlavour :: DataFamInstDecl pass -> SDoc-pprDataFamInstFlavour (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-                        FamEqn { feqn_rhs = HsDataDefn { dd_ND = nd }}}})-  = ppr nd--pprFamInstLHS :: (SourceTextX pass, OutputableBndrId pass)-   => Located (IdP pass)-   -> HsTyPats pass-   -> LexicalFixity-   -> HsContext pass-   -> Maybe (LHsKind pass)-   -> SDoc-pprFamInstLHS thing typats fixity context mb_kind_sig-                                              -- explicit type patterns-   = hsep [ pprHsContext context, pp_pats typats, pp_kind_sig ]-   where-     pp_pats (patl:patsr)-       | fixity == Infix-          = hsep [pprHsType (unLoc patl), pprInfixOcc (unLoc thing)-          , hsep (map (pprHsType.unLoc) patsr)]-       | otherwise = hsep [ pprPrefixOcc (unLoc thing)-                   , hsep (map (pprHsType.unLoc) (patl:patsr))]-     pp_pats [] = pprPrefixOcc (unLoc thing)--     pp_kind_sig-       | Just k <- mb_kind_sig-       = dcolon <+> ppr k-       | otherwise-       = empty--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (ClsInstDecl pass) 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--ppDerivStrategy :: Maybe (Located DerivStrategy) -> 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 (SourceTextX pass, OutputableBndrId pass)-       => Outputable (InstDecl pass) where-    ppr (ClsInstD     { cid_inst  = decl }) = ppr decl-    ppr (TyFamInstD   { tfid_inst = decl }) = ppr decl-    ppr (DataFamInstD { dfid_inst = decl }) = ppr decl---- 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 {}))                              = []--{--************************************************************************-*                                                                      *-\subsection[DerivDecl]{A stand-alone instance deriving declaration}-*                                                                      *-************************************************************************--}---- | Located Deriving Declaration-type LDerivDecl pass = Located (DerivDecl pass)---- | Deriving Declaration-data DerivDecl pass = DerivDecl-        { deriv_type         :: LHsSigType pass-        , deriv_strategy     :: Maybe (Located DerivStrategy)-        , 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-        }-deriving instance (DataId pass) => Data (DerivDecl pass)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (DerivDecl pass) where-    ppr (DerivDecl { deriv_type = ty-                   , deriv_strategy = ds-                   , deriv_overlap_mode = o })-        = hsep [ text "deriving"-               , ppDerivStrategy ds-               , text "instance"-               , ppOverlapPragma o-               , ppr ty ]--{--************************************************************************-*                                                                      *-\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 [LHsType pass]-        -- ^ - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnDefault',-        --          'ApiAnnotation.AnnOpen','ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId pass) => Data (DefaultDecl pass)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (DefaultDecl pass) where--    ppr (DefaultDecl tys)-      = text "default" <+> parens (interpp'SP tys)--{--************************************************************************-*                                                                      *-\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_name   :: Located (IdP pass)    -- defines this name-      , fd_sig_ty :: LHsSigType pass       -- sig_ty-      , fd_co     :: PostTc pass Coercion  -- rep_ty ~ sig_ty-      , fd_fi     :: ForeignImport }--  | ForeignExport-      { fd_name   :: Located (IdP pass)    -- uses this name-      , fd_sig_ty :: LHsSigType pass       -- sig_ty-      , fd_co     :: PostTc pass Coercion  -- rep_ty ~ 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--deriving instance (DataId pass) => Data (ForeignDecl 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.--}--noForeignImportCoercionYet :: PlaceHolder-noForeignImportCoercionYet = PlaceHolder--noForeignExportCoercionYet :: PlaceHolder-noForeignExportCoercionYet = PlaceHolder---- 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 (SourceTextX pass, OutputableBndrId pass)-       => Outputable (ForeignDecl pass) 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)--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_src   :: SourceText-                              , rds_rules :: [LRuleDecl pass] }-deriving instance (DataId pass) => Data (RuleDecls pass)---- | Located Rule Declaration-type LRuleDecl pass = Located (RuleDecl pass)---- | Rule Declaration-data RuleDecl pass-  = HsRule                             -- Source rule-        (Located (SourceText,RuleName)) -- Rule name-               -- Note [Pragma source text] in BasicTypes-        Activation-        [LRuleBndr pass]        -- Forall'd vars; after typechecking this-                                --   includes tyvars-        (Located (HsExpr pass)) -- LHS-        (PostRn pass NameSet)   -- Free-vars from the LHS-        (Located (HsExpr pass)) -- RHS-        (PostRn pass NameSet)   -- Free-vars from the RHS-        -- ^-        --  - 'ApiAnnotation.AnnKeywordId' :-        --           'ApiAnnotation.AnnOpen','ApiAnnotation.AnnTilde',-        --           'ApiAnnotation.AnnVal',-        --           'ApiAnnotation.AnnClose',-        --           'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot',-        --           'ApiAnnotation.AnnEqual',--        -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId pass) => Data (RuleDecl pass)--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 (Located (IdP pass))-  | RuleBndrSig (Located (IdP pass)) (LHsSigWcType pass)-        -- ^-        --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --     'ApiAnnotation.AnnDcolon','ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId pass) => Data (RuleBndr pass)--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 (SourceTextX pass, OutputableBndrId pass)-       => Outputable (RuleDecls pass) where-  ppr (HsRules st rules)-    = pprWithSourceText st (text "{-# RULES")-          <+> vcat (punctuate semi (map ppr rules)) <+> text "#-}"--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (RuleDecl pass) where-  ppr (HsRule name act ns lhs _fv_lhs rhs _fv_rhs)-        = sep [pprFullRuleName name <+> ppr act,-               nest 4 (pp_forall <+> pprExpr (unLoc lhs)),-               nest 6 (equals <+> pprExpr (unLoc rhs)) ]-        where-          pp_forall | null ns   = empty-                    | otherwise = forAllLit <+> fsep (map ppr ns) <> dot--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (RuleBndr pass) where-   ppr (RuleBndr name) = ppr name-   ppr (RuleBndrSig name ty) = parens (ppr name <> dcolon <> ppr ty)--{--************************************************************************-*                                                                      *-\subsection{Vectorisation declarations}-*                                                                      *-************************************************************************--A vectorisation pragma, one of--  {-# VECTORISE f = closure1 g (scalar_map g) #-}-  {-# VECTORISE SCALAR f #-}-  {-# NOVECTORISE f #-}--  {-# VECTORISE type T = ty #-}-  {-# VECTORISE SCALAR type T #-}--}---- | Located Vectorise Declaration-type LVectDecl pass = Located (VectDecl pass)---- | Vectorise Declaration-data VectDecl pass-  = HsVect-      SourceText   -- Note [Pragma source text] in BasicTypes-      (Located (IdP pass))-      (LHsExpr pass)-        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --           'ApiAnnotation.AnnEqual','ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | HsNoVect-      SourceText   -- Note [Pragma source text] in BasicTypes-      (Located (IdP pass))-        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --                                    'ApiAnnotation.AnnClose'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | HsVectTypeIn                -- pre type-checking-      SourceText                -- Note [Pragma source text] in BasicTypes-      Bool                      -- 'TRUE' => SCALAR declaration-      (Located (IdP pass))-      (Maybe (Located (IdP pass))) -- 'Nothing' => no right-hand side-        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --           'ApiAnnotation.AnnType','ApiAnnotation.AnnClose',-        --           'ApiAnnotation.AnnEqual'--        -- For details on above see note [Api annotations] in ApiAnnotation-  | HsVectTypeOut               -- post type-checking-      Bool                      -- 'TRUE' => SCALAR declaration-      TyCon-      (Maybe TyCon)             -- 'Nothing' => no right-hand side-  | HsVectClassIn               -- pre type-checking-      SourceText                -- Note [Pragma source text] in BasicTypes-      (Located (IdP pass))-        -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen',-        --           'ApiAnnotation.AnnClass','ApiAnnotation.AnnClose',--       -- For details on above see note [Api annotations] in ApiAnnotation-  | HsVectClassOut              -- post type-checking-      Class-  | HsVectInstIn                -- pre type-checking (always SCALAR)  !!!FIXME: should be superfluous now-      (LHsSigType pass)-  | HsVectInstOut               -- post type-checking (always SCALAR) !!!FIXME: should be superfluous now-      ClsInst-deriving instance (DataId pass) => Data (VectDecl pass)--lvectDeclName :: NamedThing (IdP pass) => LVectDecl pass -> Name-lvectDeclName (L _ (HsVect _       (L _ name) _))    = getName name-lvectDeclName (L _ (HsNoVect _     (L _ name)))      = getName name-lvectDeclName (L _ (HsVectTypeIn _  _ (L _ name) _)) = getName name-lvectDeclName (L _ (HsVectTypeOut  _ tycon _))       = getName tycon-lvectDeclName (L _ (HsVectClassIn _ (L _ name)))     = getName name-lvectDeclName (L _ (HsVectClassOut cls))             = getName cls-lvectDeclName (L _ (HsVectInstIn _))-  = panic "HsDecls.lvectDeclName: HsVectInstIn"-lvectDeclName (L _ (HsVectInstOut  _))-  = panic "HsDecls.lvectDeclName: HsVectInstOut"--lvectInstDecl :: LVectDecl pass -> Bool-lvectInstDecl (L _ (HsVectInstIn _))  = True-lvectInstDecl (L _ (HsVectInstOut _)) = True-lvectInstDecl _                       = False--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (VectDecl pass) where-  ppr (HsVect _ v rhs)-    = sep [text "{-# VECTORISE" <+> ppr v,-           nest 4 $-             pprExpr (unLoc rhs) <+> text "#-}" ]-  ppr (HsNoVect _ v)-    = sep [text "{-# NOVECTORISE" <+> ppr v <+> text "#-}" ]-  ppr (HsVectTypeIn _ False t Nothing)-    = sep [text "{-# VECTORISE type" <+> ppr t <+> text "#-}" ]-  ppr (HsVectTypeIn _ False t (Just t'))-    = sep [text "{-# VECTORISE type" <+> ppr t, text "=", ppr t', text "#-}" ]-  ppr (HsVectTypeIn _ True t Nothing)-    = sep [text "{-# VECTORISE SCALAR type" <+> ppr t <+> text "#-}" ]-  ppr (HsVectTypeIn _ True t (Just t'))-    = sep [text "{-# VECTORISE SCALAR type" <+> ppr t, text "=", ppr t', text "#-}" ]-  ppr (HsVectTypeOut False t Nothing)-    = sep [text "{-# VECTORISE type" <+> ppr t <+> text "#-}" ]-  ppr (HsVectTypeOut False t (Just t'))-    = sep [text "{-# VECTORISE type" <+> ppr t, text "=", ppr t', text "#-}" ]-  ppr (HsVectTypeOut True t Nothing)-    = sep [text "{-# VECTORISE SCALAR type" <+> ppr t <+> text "#-}" ]-  ppr (HsVectTypeOut True t (Just t'))-    = sep [text "{-# VECTORISE SCALAR type" <+> ppr t, text "=", ppr t', text "#-}" ]-  ppr (HsVectClassIn _ c)-    = sep [text "{-# VECTORISE class" <+> ppr c <+> text "#-}" ]-  ppr (HsVectClassOut c)-    = sep [text "{-# VECTORISE class" <+> ppr c <+> text "#-}" ]-  ppr (HsVectInstIn ty)-    = sep [text "{-# VECTORISE SCALAR instance" <+> ppr ty <+> text "#-}" ]-  ppr (HsVectInstOut i)-    = sep [text "{-# VECTORISE SCALAR instance" <+> ppr i <+> text "#-}" ]--{--************************************************************************-*                                                                      *-\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_src :: SourceText-                               , wd_warnings :: [LWarnDecl pass]-                               }-deriving instance (DataId pass) => Data (WarnDecls pass)---- | Located Warning pragma Declaration-type LWarnDecl pass = Located (WarnDecl pass)---- | Warning pragma Declaration-data WarnDecl pass = Warning [Located (IdP pass)] WarningTxt-deriving instance (DataId pass) => Data (WarnDecl pass)--instance OutputableBndr (IdP pass) => Outputable (WarnDecls pass) where-    ppr (Warnings (SourceText src) decls)-      = text src <+> vcat (punctuate comma (map ppr decls)) <+> text "#-}"-    ppr (Warnings NoSourceText _decls) = panic "WarnDecls"--instance OutputableBndr (IdP pass) => Outputable (WarnDecl pass) where-    ppr (Warning thing txt)-      = hsep ( punctuate comma (map ppr thing))-              <+> ppr txt--{--************************************************************************-*                                                                      *-\subsection[AnnDecl]{Annotations}-*                                                                      *-************************************************************************--}---- | Located Annotation Declaration-type LAnnDecl pass = Located (AnnDecl pass)---- | Annotation Declaration-data AnnDecl pass = HsAnnotation-                      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-deriving instance (DataId pass) => Data (AnnDecl pass)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (AnnDecl pass) where-    ppr (HsAnnotation _ provenance expr)-      = hsep [text "{-#", pprAnnProvenance provenance, pprExpr (unLoc expr), text "#-}"]---- | 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 (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-deriving instance (DataId pass) => Data (RoleAnnotDecl pass)--instance OutputableBndr (IdP pass) => Outputable (RoleAnnotDecl pass) where-  ppr (RoleAnnotDecl ltycon roles)-    = text "type role" <+> ppr ltycon <+>-      hsep (map (pp_role . unLoc) roles)-    where-      pp_role Nothing  = underscore-      pp_role (Just r) = ppr r--roleAnnotDeclName :: RoleAnnotDecl pass -> (IdP pass)-roleAnnotDeclName (RoleAnnotDecl (L _ name) _) = name+{-# 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,+  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, pprFamInstLHS,+  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     :: [Located (FunDep (Located (IdP 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)++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 [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 [] <+> 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 (unLoc 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+   -> HsContext (GhcPass p)+   -> SDoc+pp_vanilla_decl_head thing (HsQTvs { hsq_explicit = tyvars }) fixity context+ = hsep [pprHsContext 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 [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.++A declaration has a CUSK if we can know its complete kind without doing any+inference, at all. Here are the rules:++ - A class or datatype is said to have a CUSK if and only if all of its type+variables are annotated. Its result kind is, by construction, Constraint or *+respectively.++ - A type synonym has a CUSK if and only if all of its type variables and its+RHS are annotated with kinds.++ - A closed type family is said to have a CUSK if and only if all of its type+variables and its return type are annotated.++ - An open type family always has a CUSK -- unannotated type variables (and+return type) default to *.++ - 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.)+-}+++{- *********************************************************************+*                                                                      *+                         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?+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 [] <+>+           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))+                  => (HsContext (GhcPass p) -> SDoc)   -- Printing the header+                  -> HsDataDefn (GhcPass p)+                  -> SDoc+pp_data_defn pp_hdr (HsDataDefn { dd_ND = new_or_data, dd_ctxt = L _ 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 (noLoc []) 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 (noLoc []) 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 = [LHsType 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. These type patterns can of course contain+type (and kind) variables, which are bound in the hsib_vars field of the+HsImplicitBndrs in FamInstEqn. Note 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_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  = tycon+                                            , feqn_pats   = pats+                                            , feqn_fixity = fixity+                                            , feqn_rhs    = rhs }})+    = pprFamInstLHS tycon pats fixity [] Nothing <+> 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 []+                  <+> 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  = tycon+                                    , feqn_pats   = pats+                                    , feqn_fixity = fixity+                                    , feqn_rhs    = defn }}})+  = pp_data_defn pp_hdr defn+  where+    pp_hdr ctxt = ppr_instance_keyword top_lvl+              <+> pprFamInstLHS tycon pats fixity ctxt Nothing+                    -- No need to pass an explicit kind signature to+                    -- pprFamInstLHS here, since pp_data_defn already+                    -- pretty-prints that. 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++pprFamInstLHS :: (OutputableBndrId (GhcPass p))+   => Located (IdP (GhcPass p))+   -> HsTyPats (GhcPass p)+   -> LexicalFixity+   -> HsContext (GhcPass p)+   -> Maybe (LHsKind (GhcPass p))+   -> SDoc+pprFamInstLHS thing typats fixity context mb_kind_sig+                                              -- explicit type patterns+   = hsep [ pprHsContext context, pp_pats typats, pp_kind_sig ]+   where+     pp_pats (patl:patsr)+       | fixity == Infix+          = hsep [pprHsType (unLoc patl), pprInfixOcc (unLoc thing)+          , hsep (map (pprHsType.unLoc) patsr)]+       | otherwise = hsep [ pprPrefixOcc (unLoc thing)+                   , hsep (map (pprHsType.unLoc) (patl:patsr))]+     pp_pats [] = pprPrefixOcc (unLoc thing)++     pp_kind_sig+       | Just k <- mb_kind_sig+       = dcolon <+> ppr k+       | otherwise+       = empty++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 Deriving Declaration+type LDerivDecl pass = Located (DerivDecl pass)++-- | Deriving 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+        (XHsRule pass)         -- After renamer, free-vars from the LHS and RHS+        (Located (SourceText,RuleName)) -- Rule name+               -- Note [Pragma source text] in BasicTypes+        Activation+        [LRuleBndr pass]        -- Forall'd vars; after typechecking this+                                --   includes tyvars+        (Located (HsExpr pass)) -- LHS+        (Located (HsExpr pass)) -- RHS+        -- ^+        --  - 'ApiAnnotation.AnnKeywordId' :+        --           'ApiAnnotation.AnnOpen','ApiAnnotation.AnnTilde',+        --           'ApiAnnotation.AnnVal',+        --           'ApiAnnotation.AnnClose',+        --           'ApiAnnotation.AnnForall','ApiAnnotation.AnnDot',+        --           'ApiAnnotation.AnnEqual',++        -- For details on above see note [Api annotations] in ApiAnnotation+  | 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 _ st 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 _ name act ns lhs rhs)+        = sep [pprFullRuleName name <+> ppr act,+               nest 4 (pp_forall <+> pprExpr (unLoc lhs)),+               nest 6 (equals <+> pprExpr (unLoc rhs)) ]+        where+          pp_forall | null ns   = empty+                    | otherwise = forAllLit <+> fsep (map ppr ns) <> 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 view
@@ -1,32 +1,152 @@-{-# LANGUAGE CPP, DeriveDataTypeable #-}+{-# LANGUAGE CPP #-}+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} -module HsDoc (-  HsDocString(..),-  LHsDocString,-  ppr_mbDoc+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 FastString +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-newtype HsDocString = HsDocString FastString+--+-- 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 (HsDocString fs) = ftext fs+  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/HsExpr.hs view
@@ -11,2600 +11,2881 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE ExistentialQuantification #-} {-# LANGUAGE DeriveFunctor #-}---- | 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---- 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)]--noPostTcExpr :: PostTcExpr-noPostTcExpr = HsLit (HsString noSourceText (fsLit "noPostTcExpr"))--noPostTcTable :: PostTcTable-noPostTcTable = []------------------------------ | 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 @PostRn@ and @PostTc@ 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 }-deriving instance (DataId p) => Data (SyntaxExpr p)---- | This is used for rebindable-syntax pieces that are too polymorphic--- for tcSyntaxOp (trS_fmap and the mzip in ParStmt)-noExpr :: SourceTextX p => HsExpr p-noExpr = HsLit (HsString (sourceText  "noExpr") (fsLit "noExpr"))--noSyntaxExpr :: SourceTextX p => SyntaxExpr p-                              -- Before renaming, and sometimes after,-                              -- (if the syntax slot makes no sense)-noSyntaxExpr = SyntaxExpr { syn_expr      = HsLit (HsString noSourceText-                                                        (fsLit "noSyntaxExpr"))-                          , 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 = SyntaxExpr { syn_expr      = HsVar $ noLoc name-                                 , syn_arg_wraps = []-                                 , syn_res_wrap  = WpHole }-  -- don't care about filling in syn_arg_wraps because we're clearly-  -- not past the typechecker--instance (SourceTextX p, 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-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     (Located (IdP p)) -- ^ Variable--                             -- See Note [Located RdrNames]--  | HsUnboundVar 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 ConLike     -- ^ After typechecker only; must be different-                             -- HsVar for pretty printing--  | HsRecFld (AmbiguousFieldOcc p) -- ^ Variable pointing to record selector-                                    -- Not in use after typechecking--  | HsOverLabel (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   HsIPName       -- ^ Implicit parameter (not in use after typechecking)-  | HsOverLit (HsOverLit p)  -- ^ Overloaded literals--  | HsLit     (HsLit p)      -- ^ Simple (non-overloaded) literals--  | HsLam     (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 (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     (LHsExpr p) (LHsExpr p) -- ^ Application--  | HsAppType (LHsExpr p) (LHsWcType p) -- ^ Visible type application-       ---       -- Explicit type argument; e.g  f @Int x y-       -- NB: Has wildcards, but no implicit quantification-       ---       -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt',--  -- TODO:AZ: Sort out Name-  | HsAppTypeOut (LHsExpr p) (LHsWcType GhcRn) -- just for pretty-printing---  -- | 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       (LHsExpr p)       -- left operand-                (LHsExpr p)       -- operator-                (PostRn p Fixity) -- Renamer adds fixity; bottom until then-                (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      (LHsExpr p)-                (SyntaxExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-  --             'ApiAnnotation.AnnClose' @')'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsPar       (LHsExpr p)  -- ^ Parenthesised expr; see Note [Parens in HsSyn]--  | SectionL    (LHsExpr p)    -- operand; see Note [Sections in HsSyn]-                (LHsExpr p)    -- operator-  | SectionR    (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-        [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-          ConTag --  Alternative (one-based)-          Arity  --  Sum arity-          (LHsExpr p)-          (PostTc p [Type])   -- the type arguments--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnCase',-  --       'ApiAnnotation.AnnOf','ApiAnnotation.AnnOpen' @'{'@,-  --       'ApiAnnotation.AnnClose' @'}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsCase      (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        (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   (PostTc p Type) [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       (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        (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-                (PostTc p Type)         -- Type of the whole expression--  -- | Syntactic list: [a,b,c,...]-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,-  --              'ApiAnnotation.AnnClose' @']'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ExplicitList-                (PostTc p Type)        -- Gives type of components of list-                (Maybe (SyntaxExpr p))-                                   -- For OverloadedLists, the fromListN witness-                [LHsExpr p]--  -- | Syntactic parallel array: [:e1, ..., en:]-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'[:'@,-  --              'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnComma',-  --              'ApiAnnotation.AnnVbar'-  --              'ApiAnnotation.AnnClose' @':]'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ExplicitPArr-                (PostTc p Type)   -- type of elements of the parallel array-                [LHsExpr p]--  -- | Record construction-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{'@,-  --         'ApiAnnotation.AnnDotdot','ApiAnnotation.AnnClose' @'}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | RecordCon-      { rcon_con_name :: Located (IdP p)    -- The constructor name;-                                            --  not used after type checking-      , rcon_con_like :: PostTc p ConLike-                                      -- The data constructor or pattern synonym-      , rcon_con_expr :: PostTcExpr         -- Instantiated constructor function-      , 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_expr :: LHsExpr p-      , rupd_flds :: [LHsRecUpdField p]-      , rupd_cons :: PostTc p [ConLike]-                -- Filled in by the type checker to the-                -- _non-empty_ list of DataCons that have-                -- all the upd'd fields--      , rupd_in_tys  :: PostTc p [Type] -- Argument types of *input* record type-      , rupd_out_tys :: PostTc p [Type] --             and  *output* record type-                                       -- The original type can be reconstructed-                                       -- with conLikeResTy-      , rupd_wrap :: PostTc p HsWrapper  -- See note [Record Update HsWrapper]-      }-  -- 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-                (LHsExpr p)-                (LHsSigWcType p)--  | ExprWithTySigOut              -- Post typechecking-                (LHsExpr p)-                (LHsSigWcType GhcRn)  -- Retain the signature,-                                     -- as HsSigType Name, for-                                     -- round-tripping purposes--  -- | Arithmetic sequence-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,-  --              'ApiAnnotation.AnnComma','ApiAnnotation.AnnDotdot',-  --              'ApiAnnotation.AnnClose' @']'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ArithSeq-                PostTcExpr-                (Maybe (SyntaxExpr p))-                                  -- For OverloadedLists, the fromList witness-                (ArithSeqInfo p)--  -- | Arithmetic sequence for parallel array-  ---  -- > [:e1..e2:] or [:e1, e2..e3:]-  ---  --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'[:'@,-  --              'ApiAnnotation.AnnComma','ApiAnnotation.AnnDotdot',-  --              'ApiAnnotation.AnnVbar',-  --              'ApiAnnotation.AnnClose' @':]'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | PArrSeq-                PostTcExpr-                (ArithSeqInfo p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'{-\# SCC'@,-  --             'ApiAnnotation.AnnVal' or 'ApiAnnotation.AnnValStr',-  --              'ApiAnnotation.AnnClose' @'\#-}'@--  -- For details on above see note [Api annotations] in ApiAnnotation-  | HsSCC       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   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    (HsBracket p)--    -- See Note [Pending Splices]-  | HsRnBracketOut-      (HsBracket GhcRn)    -- Output of the renamer is the *original* renamed-                           -- expression, plus-      [PendingRnSplice]    -- _renamed_ splices to be type checked--  | HsTcBracketOut-      (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  (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      (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 (PostRn p NameSet) -- 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)-        (LHsExpr p)     -- arrow expression, f-        (LHsExpr p)     -- input expression, arg-        (PostTc p Type) -- type of the arrow expressions f,-                        -- of the form a t t', where arg :: t-        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 |)-        (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-     (Tickish (IdP p))-     (LHsExpr p)                       -- sub-expression--  | HsBinTick-     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-     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                 -- wildcard--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnAt'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | EAsPat      (Located (IdP p)) -- as pattern-                (LHsExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | EViewPat    (LHsExpr p) -- view pattern-                (LHsExpr p)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'--  -- For details on above see note [Api annotations] in ApiAnnotation-  | ELazyPat    (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     HsWrapper    -- TRANSLATION-                (HsExpr p)--deriving instance (DataId p) => Data (HsExpr p)---- | 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 (LHsExpr id)     -- ^ The argument-  | Missing (PostTc id Type) -- ^ The argument is missing, but this is its type-deriving instance (DataId id) => Data (HsTupArg id)--tupArgPresent :: LHsTupArg id -> Bool-tupArgPresent (L _ (Present {})) = True-tupArgPresent (L _ (Missing {})) = 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 (SourceTextX p, OutputableBndrId p) => Outputable (HsExpr p) where-    ppr expr = pprExpr expr---------------------------- pprExpr, pprLExpr, pprBinds call pprDeeper;--- the underscore versions do not-pprLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc-pprLExpr (L _ e) = pprExpr e--pprExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr 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 (HsAppTypeOut _ _) = True-isQuietHsExpr (OpApp _ _ _ _)    = True-isQuietHsExpr _ = False--pprBinds :: (SourceTextX idL, SourceTextX idR,-             OutputableBndrId idL, OutputableBndrId idR)-         => HsLocalBindsLR idL idR -> SDoc-pprBinds b = pprDeeper (ppr b)--------------------------ppr_lexpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc-ppr_lexpr e = ppr_expr (unLoc e)--ppr_expr :: forall p. (SourceTextX p, OutputableBndrId p) => HsExpr 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 e@(HsAppTypeOut {}) = 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 e1   -- In debug mode, add parens-    pp_e2 = pprDebugParendExpr 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 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 expr--    pp_prefixly = hang (hsep [text " \\ x_ ->", ppr op])-                       4 (hsep [pp_expr, text "x_ )"])-    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 expr--    pp_prefixly = hang (hsep [text "( \\ x_ ->", ppr op, text "x_"])-                       4 (pp_expr <> rparen)-    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--    punc (Present {} : _) = comma <> space-    punc (Missing {} : _) = comma-    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) ]---- 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 (ExplicitPArr _ exprs)-  = paBrackets (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 (ExprWithTySigOut expr sig)-  = hang (nest 2 (ppr_lexpr expr) <+> dcolon)-         4 (ppr sig)--ppr_expr (ArithSeq _ _ info) = brackets (ppr info)-ppr_expr (PArrSeq  _ info) = paBrackets (ppr info)--ppr_expr EWildPat       = char '_'-ppr_expr (ELazyPat e)   = char '~' <> ppr e-ppr_expr (EAsPat v e)   = ppr 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 (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---- We must tiresomely make the "id" parameter to the LHsWcType existential--- because it's different in the HsAppType case and the HsAppTypeOut case--- | Located Haskell Wildcard Type Expression-data LHsWcTypeX = forall p. (SourceTextX p, OutputableBndrId p)-                       => LHsWcTypeX (LHsWcType p)--ppr_apps :: (SourceTextX p, OutputableBndrId p) => HsExpr p-         -> [Either (LHsExpr p) LHsWcTypeX]-         -> 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 (LHsWcTypeX arg) : args)-ppr_apps (HsAppTypeOut (L _ fun) arg) args-  = ppr_apps fun (Right (LHsWcTypeX 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--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 :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc-pprDebugParendExpr expr-  = getPprStyle (\sty ->-    if debugStyle sty then pprParendLExpr expr-                      else pprLExpr      expr)--pprParendLExpr :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc-pprParendLExpr (L _ e) = pprParendExpr e--pprParendExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc-pprParendExpr expr-  | hsExprNeedsParens expr = parens (pprExpr expr)-  | otherwise              = pprExpr expr-        -- Using pprLExpr makes sure that we go 'deeper'-        -- I think that is usually (always?) right--hsExprNeedsParens :: HsExpr id -> Bool--- True of expressions for which '(e)' and 'e'--- mean the same thing-hsExprNeedsParens (ArithSeq {})       = False-hsExprNeedsParens (PArrSeq {})        = False-hsExprNeedsParens (HsLit {})          = False-hsExprNeedsParens (HsOverLit {})      = False-hsExprNeedsParens (HsVar {})          = False-hsExprNeedsParens (HsUnboundVar {})   = False-hsExprNeedsParens (HsConLikeOut {})   = False-hsExprNeedsParens (HsIPVar {})        = False-hsExprNeedsParens (HsOverLabel {})    = False-hsExprNeedsParens (ExplicitTuple {})  = False-hsExprNeedsParens (ExplicitList {})   = False-hsExprNeedsParens (ExplicitPArr {})   = False-hsExprNeedsParens (HsPar {})          = False-hsExprNeedsParens (HsBracket {})      = False-hsExprNeedsParens (HsRnBracketOut {}) = False-hsExprNeedsParens (HsTcBracketOut {}) = False-hsExprNeedsParens (HsDo sc _ _)-       | isListCompExpr sc            = False-hsExprNeedsParens (HsRecFld{})        = False-hsExprNeedsParens (RecordCon{})       = False-hsExprNeedsParens (HsSpliceE{})       = False-hsExprNeedsParens (RecordUpd{})       = False-hsExprNeedsParens (HsWrap _ e)        = hsExprNeedsParens e-hsExprNeedsParens _ = True---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)-        (LHsExpr id)     -- arrow expression, f-        (LHsExpr id)     -- input expression, arg-        (PostTc id Type) -- type of the arrow expressions f,-                         -- of the form a t t', where arg :: t-        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 |)-        (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    (LHsCmd id)-                (LHsExpr id)--  | HsCmdLam    (MatchGroup id (LHsCmd id))     -- kappa-       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLam',-       --       'ApiAnnotation.AnnRarrow',--       -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdPar    (LHsCmd id)                     -- parenthesised command-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'('@,-    --             'ApiAnnotation.AnnClose' @')'@--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdCase   (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     (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    (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     (Located [CmdLStmt id])-                (PostTc id Type)                -- Type of the whole expression-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDo',-    --             'ApiAnnotation.AnnOpen', 'ApiAnnotation.AnnSemi',-    --             'ApiAnnotation.AnnVbar',-    --             'ApiAnnotation.AnnClose'--    -- For details on above see note [Api annotations] in ApiAnnotation--  | HsCmdWrap   HsWrapper-                (HsCmd id)     -- If   cmd :: arg1 --> res-                               --      wrap :: arg1 "->" arg2-                               -- Then (HsCmdWrap wrap cmd) :: arg2 --> res-deriving instance (DataId id) => Data (HsCmd id)---- | 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 (LHsCmd p)-             (PostTc p Type)    -- Nested tuple of inputs on the command's stack-             (PostTc p Type)    -- return type of the command-             (CmdSyntaxTable p) -- See Note [CmdSyntaxTable]-deriving instance (DataId p) => Data (HsCmdTop p)--instance (SourceTextX p, OutputableBndrId p) => Outputable (HsCmd p) where-    ppr cmd = pprCmd cmd---------------------------- pprCmd and pprLCmd call pprDeeper;--- the underscore versions do not-pprLCmd :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc-pprLCmd (L _ c) = pprCmd c--pprCmd :: (SourceTextX p, OutputableBndrId p) => HsCmd 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 :: (SourceTextX p, OutputableBndrId p) => LHsCmd p -> SDoc-ppr_lcmd c = ppr_cmd (unLoc c)--ppr_cmd :: forall p. (SourceTextX p, OutputableBndrId p) => HsCmd 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 "|)")--pprCmdArg :: (SourceTextX p, OutputableBndrId p) => HsCmdTop p -> SDoc-pprCmdArg (HsCmdTop cmd _ _ _)-  = ppr_lcmd cmd--instance (SourceTextX p, 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_alts    :: Located [LMatch p body]  -- The alternatives-       , mg_arg_tys :: [PostTc p Type]  -- Types of the arguments, t1..tn-       , mg_res_ty  :: PostTc p Type    -- Type of the result, tr-       , mg_origin  :: Origin }-     -- The type is the type of the entire group-     --      t1 -> ... -> tn -> tr-     -- where there are n patterns-deriving instance (Data body,DataId p) => Data (MatchGroup p body)---- | 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_ctxt :: HsMatchContext (NameOrRdrName (IdP p)),-          -- See note [m_ctxt in Match]-        m_pats :: [LPat p], -- The patterns-        m_grhss :: (GRHSs p body)-  }-deriving instance (Data body,DataId p) => Data (Match p body)--instance (SourceTextX idR, 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---- | 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"--hsLMatchPats :: LMatch id body -> [LPat id]-hsLMatchPats (L _ (Match { m_pats = pats })) = pats---- | 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 {-      grhssGRHSs :: [LGRHS p body],      -- ^ Guarded RHSs-      grhssLocalBinds :: LHsLocalBinds p -- ^ The where clause-    }-deriving instance (Data body,DataId p) => Data (GRHSs p body)---- | Located Guarded Right-Hand Side-type LGRHS id body = Located (GRHS id body)---- | Guarded Right Hand Side.-data GRHS id body = GRHS [GuardLStmt id] -- Guards-                         body            -- Right hand side-deriving instance (Data body,DataId id) => Data (GRHS id body)---- We know the list must have at least one @Match@ in it.--pprMatches :: (SourceTextX idR, OutputableBndrId idR, Outputable body)-           => MatchGroup 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---- Exported to HsBinds, which can't see the defn of HsMatchContext-pprFunBind :: (SourceTextX idR, OutputableBndrId idR, Outputable body)-           => MatchGroup idR body -> SDoc-pprFunBind matches = pprMatches matches---- Exported to HsBinds, which can't see the defn of HsMatchContext-pprPatBind :: forall bndr p body. (SourceTextX p, SourceTextX bndr,-                                   OutputableBndrId bndr,-                                   OutputableBndrId p,-                                   Outputable body)-           => LPat bndr -> GRHSs p body -> SDoc-pprPatBind pat (grhss)- = sep [ppr pat, nest 2 (pprGRHSs (PatBindRhs :: HsMatchContext (IdP p)) grhss)]--pprMatch :: (SourceTextX idR, OutputableBndrId idR, Outputable body)-         => Match idR body -> SDoc-pprMatch match-  = sep [ sep (herald : map (nest 2 . pprParendLPat) 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 pat1 <+> pprInfixOcc fun <+> pprParendLPat pat2--            LambdaExpr -> (char '\\', m_pats match)--            _  -> 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 :: (SourceTextX idR, OutputableBndrId idR, Outputable body)-         => HsMatchContext idL -> GRHSs 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))--pprGRHS :: (SourceTextX idR, OutputableBndrId idR, Outputable body)-        => HsMatchContext idL -> GRHS 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]--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, PArrComp,-              -- and (after the renamer) DoExpr, MDoExpr-              -- Not used for GhciStmtCtxt, PatGuard, which scope over other stuff-          body-          Bool               -- True <=> return was stripped by ApplicativeDo-          (SyntaxExpr idR)   -- The return operator, used only for-                             -- MonadComp For ListComp, PArrComp, 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 (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--             (PostTc idR Type)  -- result type of the function passed to bind;-                                -- that is, S in (>>=) :: Q -> (R -> S) -> T--  -- | '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-             [ ( SyntaxExpr idR-               , ApplicativeArg idL idR) ]-                      -- [(<$>, e1), (<*>, e2), ..., (<*>, en)]-             (Maybe (SyntaxExpr idR))  -- 'join', if necessary-             (PostTc idR Type)     -- Type of the body--  | BodyStmt body              -- See Note [BodyStmt]-             (SyntaxExpr idR)  -- The (>>) operator-             (SyntaxExpr idR)  -- The `guard` operator; used only in MonadComp-                               -- See notes [Monad Comprehensions]-             (PostTc idR Type) -- Element type of the RHS (used for arrows)--  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnLet'-  --          'ApiAnnotation.AnnOpen' @'{'@,'ApiAnnotation.AnnClose' @'}'@,--  -- For details on above see note [Api annotations] in ApiAnnotation-  | LetStmt  (LHsLocalBindsLR idL idR)--  -- ParStmts only occur in a list/monad comprehension-  | ParStmt  [ParStmtBlock idL idR]-             (HsExpr idR)               -- Polymorphic `mzip` for monad comprehensions-             (SyntaxExpr idR)           -- The `>>=` operator-                                        -- See notes [Monad Comprehensions]-             (PostTc idR Type)          -- S in (>>=) :: Q -> (R -> S) -> T-            -- After renaming, the ids are the binders-            -- bound by the stmts and used after themp--  | TransStmt {-      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_bind_arg_ty :: PostTc idR Type,  -- R in (>>=) :: Q -> (R -> S) -> T-      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_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-     , recS_bind_ty :: PostTc idR Type  -- S in (>>=) :: Q -> (R -> S) -> T--        -- These fields are only valid after typechecking-     , 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 :: PostTc idR 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)).-      }-deriving instance (Data body, DataId idL, DataId idR)-  => Data (StmtLR idL idR body)--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-        [ExprLStmt idL]-        [IdP idR]          -- The variables to be returned-        (SyntaxExpr idR)   -- The return operator-deriving instance (DataId idL, DataId idR) => Data (ParStmtBlock idL idR)---- | Applicative Argument-data ApplicativeArg idL idR-  = ApplicativeArgOne      -- A single statement (BindStmt or BodyStmt)-      (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 }-      [ExprLStmt idL]      -- stmts-      (HsExpr idL)         -- return (v1,..,vn), or just (v1,..,vn)-      (LPat idL)           -- (v1,...,vn)--deriving instance (DataId idL, DataId idR) => Data (ApplicativeArg idL idR)--{--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 (SourceTextX idL, OutputableBndrId idL)-       => Outputable (ParStmtBlock idL idR) where-  ppr (ParStmtBlock stmts _ _) = interpp'SP stmts--instance (SourceTextX idL, SourceTextX idR,-          OutputableBndrId idL, OutputableBndrId idR, Outputable body)-         => Outputable (StmtLR idL idR body) where-    ppr stmt = pprStmt stmt--pprStmt :: forall idL idR body . (SourceTextX idL, SourceTextX idR,-                                  OutputableBndrId idL, OutputableBndrId idR,-                                  Outputable body)-        => (StmtLR idL 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 idL -> [SDoc]-   flattenStmt (L _ (ApplicativeStmt args _ _)) = concatMap flattenArg args-   flattenStmt stmt = [ppr stmt]--   flattenArg (_, ApplicativeArgOne pat expr isBody)-     | isBody =  -- See Note [Applicative BodyStmt]-     [ppr (BodyStmt expr noSyntaxExpr noSyntaxExpr (panic "pprStmt")-             :: ExprStmt idL)]-     | otherwise =-     [ppr (BindStmt pat expr noSyntaxExpr noSyntaxExpr (panic "pprStmt")-             :: ExprStmt idL)]-   flattenArg (_, ApplicativeArgMany stmts _ _) =-     concatMap flattenStmt stmts--   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 (_, ApplicativeArgOne pat expr isBody)-     | isBody =  -- See Note [Applicative BodyStmt]-     ppr (BodyStmt expr noSyntaxExpr noSyntaxExpr (panic "pprStmt")-            :: ExprStmt idL)-     | otherwise =-     ppr (BindStmt pat expr noSyntaxExpr noSyntaxExpr (panic "pprStmt")-            :: ExprStmt idL)-   pp_arg (_, ApplicativeArgMany stmts return pat) =-     ppr pat <+>-     text "<-" <+>-     ppr (HsDo DoExpr (noLoc-                (stmts ++ [noLoc (LastStmt (noLoc return) False noSyntaxExpr)]))-           (error "pprStmt"))--pprTransformStmt :: (SourceTextX p, OutputableBndrId p)-                 => [IdP p] -> LHsExpr p -> Maybe (LHsExpr 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 :: (SourceTextX p, OutputableBndrId p, Outputable body)-      => HsStmtContext any -> [LStmt 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 PArrComp      stmts = paBrackets  $ pprComp stmts-pprDo MonadComp     stmts = brackets    $ pprComp stmts-pprDo _             _     = panic "pprDo" -- PatGuard, ParStmtCxt--ppr_do_stmts :: (SourceTextX idL, SourceTextX idR,-                 OutputableBndrId idL, OutputableBndrId idR, Outputable body)-             => [LStmtLR idL idR body] -> SDoc--- Print a bunch of do stmts-ppr_do_stmts stmts = pprDeeperList vcat (map ppr stmts)--pprComp :: (SourceTextX p, OutputableBndrId p, Outputable body)-        => [LStmt 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 :: (SourceTextX p, OutputableBndrId p, Outputable body)-         => [LStmt 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)-        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)-        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-        (IdP id)         -- Splice point-        (IdP id)         -- Quoter-        SrcSpan          -- The span of the enclosed string-        FastString       -- The enclosed string--   | 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.-        ThModFinalizers     -- TH finalizers produced by the splice.-        (HsSplicedThing id) -- The result of splicing-  deriving Typeable-deriving instance (DataId id) => Data (HsSplice id)---- | 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]---- | 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-  deriving Typeable--deriving instance (DataId id) => Data (HsSplicedThing id)---- See Note [Pending Splices]-type SplicePointName = Name---- | Pending Renamer Splice-data PendingRnSplice-  -- AZ:TODO: The hard-coded GhcRn feels wrong. How to force the PostRn?-  = PendingRnSplice UntypedSpliceFlavour SplicePointName (LHsExpr GhcRn)-  deriving Data--data UntypedSpliceFlavour-  = UntypedExpSplice-  | UntypedPatSplice-  | UntypedTypeSplice-  | UntypedDeclSplice-  deriving Data---- | Pending Type-checker Splice-data PendingTcSplice-  -- AZ:TODO: The hard-coded GhcTc feels wrong. How to force the PostTc?-  = PendingTcSplice SplicePointName (LHsExpr GhcTc)-  deriving Data---{--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 (SourceTextX p, OutputableBndrId p)-       => Outputable (HsSplicedThing p) where-  ppr (HsSplicedExpr e) = ppr_expr e-  ppr (HsSplicedTy   t) = ppr t-  ppr (HsSplicedPat  p) = ppr p--instance (SourceTextX p, OutputableBndrId p) => Outputable (HsSplice p) where-  ppr s = pprSplice s--pprPendingSplice :: (SourceTextX p, OutputableBndrId p)-                 => SplicePointName -> LHsExpr p -> SDoc-pprPendingSplice n e = angleBrackets (ppr n <> comma <+> ppr e)--pprSpliceDecl ::  (SourceTextX p, OutputableBndrId p)-          => HsSplice 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 :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc-ppr_splice_decl (HsUntypedSplice _ n e) = ppr_splice empty n e empty-ppr_splice_decl e = pprSplice e--pprSplice :: (SourceTextX p, OutputableBndrId p) => HsSplice 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--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 :: (SourceTextX p, OutputableBndrId p)-           => SDoc -> (IdP p) -> LHsExpr p -> SDoc -> SDoc-ppr_splice herald n e trail-    = herald <> whenPprDebug (brackets (ppr n)) <> ppr e <> trail---- | Haskell Bracket-data HsBracket p = ExpBr (LHsExpr p)    -- [|  expr  |]-                  | PatBr (LPat p)      -- [p| pat   |]-                  | DecBrL [LHsDecl p]  -- [d| decls |]; result of parser-                  | DecBrG (HsGroup p)  -- [d| decls |]; result of renamer-                  | TypBr (LHsType p)   -- [t| type  |]-                  | VarBr Bool (IdP p)  -- True: 'x, False: ''T-                                 -- (The Bool flag is used only in pprHsBracket)-                  | TExpBr (LHsExpr p)  -- [||  expr  ||]-deriving instance (DataId p) => Data (HsBracket p)--isTypedBracket :: HsBracket id -> Bool-isTypedBracket (TExpBr {}) = True-isTypedBracket _           = False--instance (SourceTextX p, OutputableBndrId p) => Outputable (HsBracket p) where-  ppr = pprHsBracket---pprHsBracket :: (SourceTextX p, OutputableBndrId p) => HsBracket 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)--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)-deriving instance (DataId id) => Data (ArithSeqInfo id)--instance (SourceTextX p, 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--  | 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 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-  | PArrComp                         -- ^Parallel array comprehension--  | 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)--isListCompExpr :: HsStmtContext id -> Bool--- Uses syntax [ e | quals ]-isListCompExpr ListComp          = True-isListCompExpr PArrComp          = True-isListCompExpr MonadComp         = True-isListCompExpr (ParStmtCtxt c)   = isListCompExpr c-isListCompExpr (TransStmtCtxt c) = isListCompExpr c-isListCompExpr _                 = False--isMonadCompExpr :: HsStmtContext id -> Bool-isMonadCompExpr MonadComp            = True-isMonadCompExpr (ParStmtCtxt ctxt)   = isMonadCompExpr ctxt-isMonadCompExpr (TransStmtCtxt ctxt) = isMonadCompExpr ctxt-isMonadCompExpr _                    = 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 _            = False--matchSeparator :: HsMatchContext id -> SDoc-matchSeparator (FunRhs {})  = text "="-matchSeparator CaseAlt      = text "->"-matchSeparator IfAlt        = text "->"-matchSeparator LambdaExpr   = text "->"-matchSeparator ProcExpr     = text "->"-matchSeparator PatBindRhs   = 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 LambdaExpr      = text "lambda abstraction"-pprMatchContextNoun ProcExpr        = text "arrow abstraction"-pprMatchContextNoun (StmtCtxt ctxt) = text "pattern binding in"-                                      $$ pprStmtContext 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-                  PArrComp      -> 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 PArrComp        = text "array 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 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"-matchContextErrString (StmtCtxt PArrComp)          = text "array comprehension"--pprMatchInCtxt :: (SourceTextX idR, OutputableBndrId idR,-                   -- TODO:AZ these constraints do not make sense-                   Outputable (NameOrRdrName (NameOrRdrName (IdP idR))),-                   Outputable body)-               => Match idR body -> SDoc-pprMatchInCtxt match  = hang (text "In" <+> pprMatchContext (m_ctxt match)-                                        <> colon)-                             4 (pprMatch match)--pprStmtInCtxt :: (SourceTextX idL, SourceTextX idR,-                  OutputableBndrId idL, OutputableBndrId idR,-                  Outputable body)-               => HsStmtContext (IdP idL) -> StmtLR idL idR body -> SDoc-pprStmtInCtxt ctxt (LastStmt e _ _)+{-# 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++-- 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 Name' (the "rn" is because this is used in the+-- renamer), missing its HsWrappers.+mkRnSyntaxExpr :: Name -> SyntaxExpr GhcRn+mkRnSyntaxExpr name = SyntaxExpr { syn_expr      = HsVar noExt $ noLoc name+                                 , syn_arg_wraps = []+                                 , syn_res_wrap  = WpHole }+  -- 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+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)  -- ^ 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)   -- Retain the signature,+                                     -- as HsSigType Name, for+                                     -- round-tripping purposes+                (LHsExpr 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      GhcPs = LHsWcType GhcPs+type instance XAppTypeE      GhcRn = LHsWcType GhcRn+type instance XAppTypeE      GhcTc = LHsWcType GhcRn++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 GhcPs = (LHsSigWcType GhcPs)+type instance XExprWithTySig GhcRn = (LHsSigWcType GhcRn)+type instance XExprWithTySig GhcTc = (LHsSigWcType GhcRn)++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 sig expr)+  = 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)) (XAppTypeE (GhcPass p))]+         -> SDoc+ppr_apps (HsApp _ (L _ fun) arg)        args+  = ppr_apps fun (Left arg : args)+ppr_apps (HsAppType arg (L _ fun))    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 _)+      | isListCompExpr sc             = False+      | otherwise                     = p > topPrec+    go (ExplicitList{})               = False+    go (RecordUpd{})                  = False+    go (ExprWithTySig{})              = p > topPrec+    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) 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, 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+   | 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]++-- | 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+  -- AZ:TODO: The hard-coded GhcTc feels wrong.+  = 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 (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)++isListCompExpr :: HsStmtContext id -> Bool+-- Uses syntax [ e | quals ]+isListCompExpr ListComp          = True+isListCompExpr MonadComp         = True+isListCompExpr (ParStmtCtxt c)   = isListCompExpr c+isListCompExpr (TransStmtCtxt c) = isListCompExpr c+isListCompExpr _ = 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++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 _ _)   | isListCompExpr ctxt      -- For [ e | .. ], do not mutter about "stmts"   = hang (text "In the expression:") 2 (ppr e) 
hsSyn/HsExpr.hs-boot view
@@ -5,6 +5,7 @@ {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RoleAnnotations #-} {-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE TypeFamilies #-}  module HsExpr where @@ -12,13 +13,12 @@ import Outputable ( SDoc, Outputable ) import {-# SOURCE #-} HsPat  ( LPat ) import BasicTypes ( SpliceExplicitFlag(..))-import HsExtension ( OutputableBndrId, DataId, SourceTextX )-import Data.Data hiding ( Fixity )+import HsExtension ( OutputableBndrId, GhcPass )  type role HsExpr nominal type role HsCmd nominal-type role MatchGroup nominal representational-type role GRHSs nominal representational+type role MatchGroup nominal nominal+type role GRHSs nominal nominal type role HsSplice nominal type role SyntaxExpr nominal data HsExpr (i :: *)@@ -28,32 +28,24 @@ data GRHSs (a :: *) (body :: *) data SyntaxExpr (i :: *) -instance (DataId p) => Data (HsSplice p)-instance (DataId p) => Data (HsExpr p)-instance (DataId p) => Data (HsCmd p)-instance (Data body,DataId p) => Data (MatchGroup p body)-instance (Data body,DataId p) => Data (GRHSs p body)-instance (DataId p) => Data (SyntaxExpr p)--instance (SourceTextX p, OutputableBndrId p) => Outputable (HsExpr p)-instance (SourceTextX p, OutputableBndrId p) => Outputable (HsCmd p)+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 :: (SourceTextX p, OutputableBndrId p) => LHsExpr p -> SDoc+pprLExpr :: (OutputableBndrId (GhcPass p)) => LHsExpr (GhcPass p) -> SDoc -pprExpr :: (SourceTextX p, OutputableBndrId p) => HsExpr p -> SDoc+pprExpr :: (OutputableBndrId (GhcPass p)) => HsExpr (GhcPass p) -> SDoc -pprSplice :: (SourceTextX p, OutputableBndrId p) => HsSplice p -> SDoc+pprSplice :: (OutputableBndrId (GhcPass p)) => HsSplice (GhcPass p) -> SDoc -pprSpliceDecl ::  (SourceTextX p, OutputableBndrId p)-          => HsSplice p -> SpliceExplicitFlag -> SDoc+pprSpliceDecl ::  (OutputableBndrId (GhcPass p))+          => HsSplice (GhcPass p) -> SpliceExplicitFlag -> SDoc -pprPatBind :: forall bndr p body. (SourceTextX p, SourceTextX bndr,-                                   OutputableBndrId bndr,-                                   OutputableBndrId p,+pprPatBind :: forall bndr p body. (OutputableBndrId (GhcPass bndr),+                                   OutputableBndrId (GhcPass p),                                    Outputable body)-           => LPat bndr -> GRHSs p body -> SDoc+           => LPat (GhcPass bndr) -> GRHSs (GhcPass p) body -> SDoc -pprFunBind :: (SourceTextX idR, OutputableBndrId idR, Outputable body)-           => MatchGroup idR body -> SDoc+pprFunBind :: (OutputableBndrId (GhcPass idR), Outputable body)+           => MatchGroup (GhcPass idR) body -> SDoc
hsSyn/HsExtension.hs view
@@ -7,285 +7,1102 @@ {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE StandaloneDeriving #-}--module HsExtension where---- This module captures the type families to precisely identify the extension--- points for HsSyn--import GhcPrelude--import GHC.Exts (Constraint)-import Data.Data hiding ( Fixity )-import PlaceHolder-import BasicTypes-import ConLike-import NameSet-import Name-import RdrName-import Var-import Type       ( Type )-import Outputable-import SrcLoc (Located)-import Coercion-import TcEvidence--{--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 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----- | Types that are not defined until after type checking-type family PostTc x ty -- Note [Pass sensitive types] in PlaceHolder-type instance PostTc GhcPs ty = PlaceHolder-type instance PostTc GhcRn ty = PlaceHolder-type instance PostTc GhcTc ty = ty---- | Types that are not defined until after renaming-type family PostRn x ty  -- Note [Pass sensitive types] in PlaceHolder-type instance PostRn GhcPs ty = PlaceHolder-type instance PostRn GhcRn ty = ty-type instance PostRn GhcTc ty = ty---- | 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----- 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---- | Helper to apply a constraint to all extension points. It has one--- entry per extension point type family.-type ForallX (c :: * -> Constraint) (x :: *) =-  ( c (XHsChar x)-  , c (XHsCharPrim x)-  , c (XHsString x)-  , c (XHsStringPrim x)-  , c (XHsInt x)-  , c (XHsIntPrim x)-  , c (XHsWordPrim x)-  , c (XHsInt64Prim x)-  , c (XHsWord64Prim x)-  , c (XHsInteger x)-  , c (XHsRat x)-  , c (XHsFloatPrim x)-  , c (XHsDoublePrim x)-  )----- Provide the specific extension types for the parser phase.-type instance XHsChar       GhcPs = SourceText-type instance XHsCharPrim   GhcPs = SourceText-type instance XHsString     GhcPs = SourceText-type instance XHsStringPrim GhcPs = SourceText-type instance XHsInt        GhcPs = ()-type instance XHsIntPrim    GhcPs = SourceText-type instance XHsWordPrim   GhcPs = SourceText-type instance XHsInt64Prim  GhcPs = SourceText-type instance XHsWord64Prim GhcPs = SourceText-type instance XHsInteger    GhcPs = SourceText-type instance XHsRat        GhcPs = ()-type instance XHsFloatPrim  GhcPs = ()-type instance XHsDoublePrim GhcPs = ()---- Provide the specific extension types for the renamer phase.-type instance XHsChar       GhcRn = SourceText-type instance XHsCharPrim   GhcRn = SourceText-type instance XHsString     GhcRn = SourceText-type instance XHsStringPrim GhcRn = SourceText-type instance XHsInt        GhcRn = ()-type instance XHsIntPrim    GhcRn = SourceText-type instance XHsWordPrim   GhcRn = SourceText-type instance XHsInt64Prim  GhcRn = SourceText-type instance XHsWord64Prim GhcRn = SourceText-type instance XHsInteger    GhcRn = SourceText-type instance XHsRat        GhcRn = ()-type instance XHsFloatPrim  GhcRn = ()-type instance XHsDoublePrim GhcRn = ()---- Provide the specific extension types for the typechecker phase.-type instance XHsChar       GhcTc = SourceText-type instance XHsCharPrim   GhcTc = SourceText-type instance XHsString     GhcTc = SourceText-type instance XHsStringPrim GhcTc = SourceText-type instance XHsInt        GhcTc = ()-type instance XHsIntPrim    GhcTc = SourceText-type instance XHsWordPrim   GhcTc = SourceText-type instance XHsInt64Prim  GhcTc = SourceText-type instance XHsWord64Prim GhcTc = SourceText-type instance XHsInteger    GhcTc = SourceText-type instance XHsRat        GhcTc = ()-type instance XHsFloatPrim  GhcTc = ()-type instance XHsDoublePrim GhcTc = ()----- ------------------------------------------------------------------------- | The 'SourceText' fields have been moved into the extension fields, thus--- placing a requirement in the extension field to contain a 'SourceText' so--- that the pretty printing and round tripping of source can continue to--- operate.------ The 'HasSourceText' class captures this requirement for the relevant fields.-class HasSourceText a where-  -- Provide setters to mimic existing constructors-  noSourceText  :: a-  sourceText    :: String -> a--  setSourceText :: SourceText -> a-  getSourceText :: a -> SourceText---- | Provide a summary constraint that lists all the extension points requiring--- the 'HasSourceText' class, so that it can be changed in one place as the--- named extensions change throughout the AST.-type SourceTextX x =-  ( HasSourceText (XHsChar x)-  , HasSourceText (XHsCharPrim x)-  , HasSourceText (XHsString x)-  , HasSourceText (XHsStringPrim x)-  , HasSourceText (XHsIntPrim x)-  , HasSourceText (XHsWordPrim x)-  , HasSourceText (XHsInt64Prim x)-  , HasSourceText (XHsWord64Prim x)-  , HasSourceText (XHsInteger x)-  )----- |  'SourceText' trivially implements 'HasSourceText'-instance HasSourceText SourceText where-  noSourceText    = NoSourceText-  sourceText s    = SourceText s--  setSourceText s = s-  getSourceText a = a----- ------------------------------------------------------------------------- | Defaults for each annotation, used to simplify creation in arbitrary--- contexts-class HasDefault a where-  def :: a--instance HasDefault () where-  def = ()--instance HasDefault SourceText where-  def = NoSourceText---- | Provide a single constraint that captures the requirement for a default--- across all the extension points.-type HasDefaultX x = ForallX HasDefault x---- ------------------------------------------------------------------------- | 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)----- ---------------------------------------------------------------------------type DataId p =-  ( Data p-  , ForallX Data p-  , Data (NameOrRdrName (IdP p))--  , Data (IdP p)-  , Data (PostRn p (IdP p))-  , Data (PostRn p (Located Name))-  , Data (PostRn p Bool)-  , Data (PostRn p Fixity)-  , Data (PostRn p NameSet)-  , Data (PostRn p [Name])--  , Data (PostTc p (IdP p))-  , Data (PostTc p Coercion)-  , Data (PostTc p ConLike)-  , Data (PostTc p HsWrapper)-  , Data (PostTc p Type)-  , Data (PostTc p [ConLike])-  , Data (PostTc p [Type])-  )----- |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)+{-# 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 GHC.Exts (Constraint)+import Data.Data hiding ( Fixity )+import PlaceHolder+import Name+import RdrName+import Var+import Outputable+import SrcLoc (Located)++{-+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)++-- =====================================================================+-- 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 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 (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 (XSigPat p)+  , Outputable (XSigPat GhcRn)++  , Outputable (XIPBinds    p)++  , Outputable (XExprWithTySig p)+  , Outputable (XExprWithTySig GhcRn)++  , Outputable (XAppTypeE p)+  , Outputable (XAppTypeE GhcRn)++  , 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)+  , OutputableX id   )
hsSyn/HsImpExp.hs view
@@ -9,6 +9,7 @@ {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]                                       -- in module PlaceHolder @@ -40,7 +41,7 @@ -}  -- | Located Import Declaration-type LImportDecl name = Located (ImportDecl name)+type LImportDecl pass = Located (ImportDecl pass)         -- ^ When in a list this may have         --         --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSemi'@@ -50,8 +51,9 @@ -- | Import Declaration -- -- A single Haskell @import@ declaration.-data ImportDecl name+data ImportDecl pass   = ImportDecl {+      ideclExt       :: XCImportDecl pass,       ideclSourceSrc :: SourceText,                                  -- Note [Pragma source text] in BasicTypes       ideclName      :: Located ModuleName, -- ^ Module name.@@ -61,9 +63,10 @@       ideclQualified :: Bool,          -- ^ True => qualified       ideclImplicit  :: Bool,          -- ^ True => implicit import (of Prelude)       ideclAs        :: Maybe (Located ModuleName),  -- ^ as Module-      ideclHiding    :: Maybe (Bool, Located [LIE name])+      ideclHiding    :: Maybe (Bool, Located [LIE pass])                                        -- ^ (True => hiding, names)     }+  | XImportDecl (XXImportDecl pass)      -- ^      --  'ApiAnnotation.AnnKeywordId's      --@@ -80,10 +83,13 @@      --     to location in ideclHiding       -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId name) => Data (ImportDecl name) -simpleImportDecl :: ModuleName -> ImportDecl name+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,@@ -95,7 +101,8 @@       ideclHiding    = Nothing     } -instance (OutputableBndrId pass) => Outputable (ImportDecl pass) where+instance (p ~ GhcPass pass,OutputableBndrId p)+       => Outputable (ImportDecl p) where     ppr (ImportDecl { ideclSourceSrc = mSrcText, ideclName = mod'                     , ideclPkgQual = pkg                     , ideclSource = from, ideclSafe = safe@@ -132,6 +139,7 @@          ppr_ies []  = text "()"         ppr_ies ies = char '(' <+> interpp'SP ies <+> char ')'+    ppr (XImportDecl x) = ppr x  {- ************************************************************************@@ -158,7 +166,7 @@   -- | Located Import or Export-type LIE name = Located (IE name)+type LIE pass = Located (IE pass)         -- ^ When in a list this may have         --         --  - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnComma'@@ -166,11 +174,11 @@         -- For details on above see note [Api annotations] in ApiAnnotation  -- | Imported or exported entity.-data IE name-  = IEVar       (LIEWrappedName (IdP name))+data IE pass+  = IEVar       (XIEVar pass) (LIEWrappedName (IdP pass))         -- ^ Imported or Exported Variable -  | IEThingAbs  (LIEWrappedName (IdP name))+  | IEThingAbs  (XIEThingAbs pass) (LIEWrappedName (IdP pass))         -- ^ Imported or exported Thing with Absent list         --         -- The thing is a Class/Type (can't tell)@@ -179,7 +187,7 @@          -- For details on above see note [Api annotations] in ApiAnnotation         -- See Note [Located RdrNames] in HsExpr-  | IEThingAll  (LIEWrappedName (IdP name))+  | 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@@ -191,10 +199,11 @@         -- For details on above see note [Api annotations] in ApiAnnotation         -- See Note [Located RdrNames] in HsExpr -  | IEThingWith (LIEWrappedName (IdP name))+  | IEThingWith (XIEThingWith pass)+                (LIEWrappedName (IdP pass))                 IEWildcard-                [LIEWrappedName (IdP name)]-                [Located (FieldLbl (IdP name))]+                [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@@ -205,7 +214,7 @@         --                                   'ApiAnnotation.AnnType'          -- For details on above see note [Api annotations] in ApiAnnotation-  | IEModuleContents  (Located ModuleName)+  | IEModuleContents  (XIEModuleContents pass) (Located ModuleName)         -- ^ Imported or exported module contents         --         -- (Export Only)@@ -213,13 +222,21 @@         -- - 'ApiAnnotation.AnnKeywordId's : 'ApiAnnotation.AnnModule'          -- For details on above see note [Api annotations] in ApiAnnotation-  | IEGroup             Int HsDocString  -- ^ Doc section heading-  | IEDoc               HsDocString      -- ^ Some documentation-  | IEDocNamed          String           -- ^ Reference to named doc-  -- deriving (Eq, Data)-deriving instance (Eq name, Eq (IdP name)) => Eq (IE name)-deriving instance (DataId name)             => Data (IE name)+  | 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) @@ -241,22 +258,23 @@ -}  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 (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+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 (IEModuleContents {})     = []+ieNames (IEGroup          {})     = []+ieNames (IEDoc            {})     = []+ieNames (IEDocNamed       {})     = []+ieNames (XIE {}) = panic "ieNames"  ieWrappedName :: IEWrappedName name -> name ieWrappedName (IEName    (L _ n)) = n@@ -274,11 +292,11 @@ replaceLWrappedName :: LIEWrappedName name1 -> name2 -> LIEWrappedName name2 replaceLWrappedName (L l n) n' = L l (replaceWrappedName n n') -instance (OutputableBndrId pass) => Outputable (IE pass) 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)+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)))@@ -290,11 +308,12 @@               IEWildcard pos ->                 let (bs, as) = splitAt pos (map (ppr . unLoc) withs)                 in bs ++ [text ".."] ++ as-    ppr (IEModuleContents mod')+    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 (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)
+ hsSyn/HsInstances.hs view
@@ -0,0 +1,416 @@+{-# 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 (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 view
@@ -8,7 +8,6 @@ {-# LANGUAGE CPP, DeriveDataTypeable #-} {-# LANGUAGE TypeSynonymInstances #-} {-# LANGUAGE StandaloneDeriving #-}-{-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]                                       -- in module PlaceHolder@@ -24,7 +23,7 @@ import {-# SOURCE #-} HsExpr( HsExpr, pprExpr ) import BasicTypes ( IntegralLit(..),FractionalLit(..),negateIntegralLit,                     negateFractionalLit,SourceText(..),pprWithSourceText )-import Type       ( Type )+import Type import Outputable import FastString import HsExtension@@ -77,8 +76,22 @@   | HsDoublePrim (XHsDoublePrim x) FractionalLit       -- ^ Unboxed Double -deriving instance (DataId x) => Data (HsLit x)+  | 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@@ -99,12 +112,25 @@ -- | Haskell Overloaded Literal data HsOverLit p   = OverLit {-        ol_val :: OverLitVal,-        ol_rebindable :: PostRn p Bool, -- Note [ol_rebindable]-        ol_witness :: HsExpr p,         -- Note [Overloaded literal witnesses]-        ol_type :: PostTc p Type }-deriving instance (DataId p) => Data (HsOverLit p)+      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@@ -119,8 +145,9 @@ negateOverLitVal (HsFractional f) = HsFractional (negateFractionalLit f) negateOverLitVal _ = panic "negateOverLitVal: argument is not a number" -overLitType :: HsOverLit p -> PostTc p Type-overLitType = ol_type+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@@ -138,6 +165,7 @@ 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]@@ -171,8 +199,10 @@  -- Comparison operations are needed when grouping literals -- for compiling pattern-matching (module MatchLit)-instance Eq (HsOverLit p) where-  (OverLit {ol_val = val1}) == (OverLit {ol_val=val2}) = val1 == val2+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@@ -180,8 +210,10 @@   (HsIsString _ s1)   == (HsIsString _ s2)   = s1 == s2   _                   == _                   = False -instance Ord (HsOverLit p) where-  compare (OverLit {ol_val=val1}) (OverLit {ol_val=val2}) = val1 `compare` val2+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@@ -195,38 +227,33 @@   compare (HsIsString _ _)    (HsFractional _)    = GT  -- Instance specific to GhcPs, need the SourceText-instance (SourceTextX x) => Outputable (HsLit x) where-    ppr (HsChar st c)       = pprWithSourceText (getSourceText st) (pprHsChar c)-    ppr (HsCharPrim st c)-     = pp_st_suffix (getSourceText st) primCharSuffix (pprPrimChar c)-    ppr (HsString st s)-      = pprWithSourceText (getSourceText st) (pprHsString s)-    ppr (HsStringPrim st s)-      = pprWithSourceText (getSourceText st) (pprHsBytes s)+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 (getSourceText st) (integer 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 (getSourceText st) (pprPrimInt i)-    ppr (HsWordPrim st w)-      = pprWithSourceText (getSourceText st) (pprPrimWord w)-    ppr (HsInt64Prim st i)-      = pp_st_suffix (getSourceText st) primInt64Suffix  (pprPrimInt64 i)-    ppr (HsWord64Prim st w)-      = pp_st_suffix (getSourceText st) primWord64Suffix (pprPrimWord64 w)+    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 (SourceTextX p, OutputableBndrId p)+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))@@ -239,11 +266,10 @@ -- mainly for too reasons: --  * We do not want to expose their internal representation --  * The warnings become too messy-pmPprHsLit :: (SourceTextX x) => HsLit x -> SDoc+pmPprHsLit :: HsLit (GhcPass x) -> SDoc pmPprHsLit (HsChar _ c)       = pprHsChar c pmPprHsLit (HsCharPrim _ c)   = pprHsChar c-pmPprHsLit (HsString st s)    = pprWithSourceText (getSourceText st)-                                                  (pprHsString s)+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@@ -254,29 +280,35 @@ pmPprHsLit (HsRat _ f _)      = ppr f pmPprHsLit (HsFloatPrim _ f)  = ppr f pmPprHsLit (HsDoublePrim _ d) = ppr d+pmPprHsLit (XLit x)           = ppr x --- | Returns 'True' for compound literals that will need parentheses.-isCompoundHsLit :: HsLit x -> Bool-isCompoundHsLit (HsChar {})        = False-isCompoundHsLit (HsCharPrim {})    = False-isCompoundHsLit (HsString {})      = False-isCompoundHsLit (HsStringPrim {})  = False-isCompoundHsLit (HsInt _ x)        = il_neg x-isCompoundHsLit (HsIntPrim _ x)    = x < 0-isCompoundHsLit (HsWordPrim _ x)   = x < 0-isCompoundHsLit (HsInt64Prim _ x)  = x < 0-isCompoundHsLit (HsWord64Prim _ x) = x < 0-isCompoundHsLit (HsInteger _ x _)  = x < 0-isCompoundHsLit (HsRat _ x _)      = fl_neg x-isCompoundHsLit (HsFloatPrim _ x)  = fl_neg x-isCompoundHsLit (HsDoublePrim _ x) = fl_neg 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 --- | Returns 'True' for compound overloaded literals that will need--- parentheses when used in an argument position.-isCompoundHsOverLit :: HsOverLit x -> Bool-isCompoundHsOverLit (OverLit { ol_val = olv }) = compound_ol_val olv+-- | @'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-    compound_ol_val :: OverLitVal -> Bool-    compound_ol_val (HsIntegral x)   = il_neg x-    compound_ol_val (HsFractional x) = fl_neg x-    compound_ol_val (HsIsString {})  = False+    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 view
@@ -18,6 +18,7 @@  module HsPat (         Pat(..), InPat, OutPat, LPat,+        ListPatTc(..),          HsConPatDetails, hsConPatArgs,         HsRecFields(..), HsRecField'(..), LHsRecField',@@ -30,11 +31,10 @@          looksLazyPatBind,         isBangedLPat,-        hsPatNeedsParens,-        isCompoundPat, parenthesizeCompoundPat,+        patNeedsParens, parenthesizePat,         isIrrefutableHsPat, -        collectEvVarsPats,+        collectEvVarsPat, collectEvVarsPats,          pprParendLPat, pprConArgs     ) where@@ -79,42 +79,47 @@ -- For details on above see note [Api annotations] in ApiAnnotation data Pat p   =     ------------ Simple patterns ----------------    WildPat     (PostTc p Type)        -- ^ Wildcard Pattern+    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      (Located (IdP p))  -- ^ Variable Pattern+  | VarPat      (XVarPat p)+                (Located (IdP p))  -- ^ Variable Pattern                               -- See Note [Located RdrNames] in HsExpr-  | LazyPat     (LPat p)                -- ^ Lazy Pattern+  | LazyPat     (XLazyPat p)+                (LPat p)                -- ^ Lazy Pattern     -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'      -- For details on above see note [Api annotations] in ApiAnnotation -  | AsPat       (Located (IdP p)) (LPat p)    -- ^ As pattern+  | 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      (LPat p)                -- ^ Parenthesised pattern+  | 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     (LPat p)                -- ^ Bang pattern+  | 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     [LPat p]-                (PostTc p Type)                      -- The type of the elements-                (Maybe (PostTc p Type, SyntaxExpr p)) -- For rebindable syntax+  | 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+-- function to convert the scrutinee to a list value+     -- ^ Syntactic List     --     -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,@@ -122,12 +127,13 @@      -- For details on above see note [Api annotations] in ApiAnnotation -  | TuplePat    [LPat p]         -- Tuple sub-patterns+  | TuplePat    (XTuplePat p)+                  -- after typechecking, holds the types of the tuple components+                [LPat p]         -- Tuple sub-patterns                 Boxity           -- UnitPat is TuplePat []-                [PostTc p Type]  -- [] before typechecker, filled in afterwards-                                 -- with the types of the tuple components-        -- You might think that the PostTc p Type was redundant, because we can-        -- get the pattern type by getting the types of the sub-patterns.+        -- 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@@ -147,12 +153,12 @@     --            'ApiAnnotation.AnnOpen' @'('@ or @'(#'@,     --            'ApiAnnotation.AnnClose' @')'@ or  @'#)'@ -  | SumPat      (LPat p)           -- Sum sub-pattern-                ConTag             -- Alternative (one-based)-                Arity              -- Arity (INVARIANT: ≥ 2)-                (PostTc p [Type])  -- PlaceHolder before typechecker, filled in+  | 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' :@@ -160,12 +166,7 @@     --            'ApiAnnotation.AnnClose' @'#)'@      -- For details on above see note [Api annotations] in ApiAnnotation-  | PArrPat     [LPat p]                -- Syntactic parallel array-                (PostTc p Type)         -- The type of the elements-    -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'[:'@,-    --                                    'ApiAnnotation.AnnClose' @':]'@ -    -- For details on above see note [Api annotations] in ApiAnnotation         ------------ Constructor patterns ---------------   | ConPatIn    (Located (IdP p))                 (HsConPatDetails p)@@ -196,11 +197,11 @@   -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow'    -- For details on above see note [Api annotations] in ApiAnnotation-  | ViewPat       (LHsExpr p)+  | ViewPat       (XViewPat p)     -- The overall type of the pattern+                                   -- (= the argument type of the view function)+                                   -- for hsPatType.+                  (LHsExpr p)                   (LPat p)-                  (PostTc p Type)   -- The overall type of the pattern-                                    -- (= the argument type of the view function)-                                    -- for hsPatType.     -- ^ View Pattern          ------------ Pattern splices ---------------@@ -208,31 +209,34 @@   --        'ApiAnnotation.AnnClose' @')'@    -- For details on above see note [Api annotations] in ApiAnnotation-  | SplicePat       (HsSplice p)    -- ^ Splice Pattern (Includes quasi-quotes)+  | SplicePat       (XSplicePat p)+                    (HsSplice p)    -- ^ Splice Pattern (Includes quasi-quotes)          ------------ Literal and n+k patterns ----------------  | LitPat          (HsLit p)           -- ^ Literal Pattern+  | 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-                    (PostTc p Type)      -- Overall type of pattern. Might be-                                         -- different than the literal's type-                                         -- if (==) or negate changes the type    -- ^ Natural Pattern   --   -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnVal' @'+'@    -- For details on above see note [Api annotations] in ApiAnnotation-  | NPlusKPat       (Located (IdP p))        -- n+k pattern+  | 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@@ -240,24 +244,22 @@                      (SyntaxExpr p)   -- (>=) function, of type t1->t2->Bool                     (SyntaxExpr p)   -- Name of '-' (see RnEnv.lookupSyntaxName)-                    (PostTc p Type)  -- Type of overall pattern   -- ^ n+k pattern          ------------ Pattern type signatures ---------------   -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnDcolon'    -- For details on above see note [Api annotations] in ApiAnnotation-  | SigPatIn        (LPat p)                  -- Pattern with a type signature-                    (LHsSigWcType p)          -- Signature can bind both-                                              -- kind and type vars-    -- ^ Pattern with a type signature--  | SigPatOut       (LPat p)-                    Type+  | SigPat          (XSigPat p)          -- Before typechecker+                                         --  Signature can bind both+                                         --  kind and type vars+                                         -- After typechecker: Type+                    (LPat p)                -- Pattern with a type signature     -- ^ Pattern with a type signature          ------------ Pattern coercions (translation only) ----------------  | CoPat       HsWrapper           -- Coercion Pattern+  | 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@@ -265,8 +267,68 @@         -- During desugaring a (CoPat co pat) turns into a cast with 'co' on         -- the scrutinee, followed by a match on 'pat'     -- ^ Coercion Pattern-deriving instance (DataId p) => Data (Pat p) +  -- | 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 = (LHsSigWcType GhcPs)+type instance XSigPat GhcRn = (LHsSigWcType GhcRn)+type instance XSigPat GhcTc = Type++type instance XCoPat  (GhcPass _) = NoExt+type instance XXPat   (GhcPass _) = NoExt++-- ---------------------------------------------------------------------++ -- | Haskell Constructor Pattern Details type HsConPatDetails p = HsConDetails (LPat p) (HsRecFields p (LPat p)) @@ -285,7 +347,6 @@   = HsRecFields { rec_flds   :: [LHsRecField p arg],                   rec_dotdot :: Maybe Int }  -- Note [DotDot fields]   deriving (Functor, Foldable, Traversable)-deriving instance (DataId p, Data arg) => Data (HsRecFields p arg)   -- Note [DotDot fields]@@ -370,11 +431,11 @@ -- -- The parsed HsRecUpdField corresponding to the record update will have: -----     hsRecFieldLbl = Unambiguous "x" PlaceHolder :: AmbiguousFieldOcc RdrName+--     hsRecFieldLbl = Unambiguous "x" NoExt :: AmbiguousFieldOcc RdrName -- -- After the renamer, this will become: -----     hsRecFieldLbl = Ambiguous   "x" PlaceHolder :: AmbiguousFieldOcc Name+--     hsRecFieldLbl = Ambiguous   "x" NoExt :: AmbiguousFieldOcc Name -- -- (note that the Unambiguous constructor is not type-correct here). -- The typechecker will determine the particular selector:@@ -383,24 +444,24 @@ -- -- See also Note [Disambiguating record fields] in TcExpr. -hsRecFields :: HsRecFields p arg -> [PostRn p (IdP p)]+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 (PostRn pass (IdP pass))-hsRecFieldSel = fmap selectorFieldOcc . hsRecFieldLbl+hsRecFieldSel :: HsRecField pass arg -> Located (XCFieldOcc pass)+hsRecFieldSel = fmap extFieldOcc . hsRecFieldLbl  hsRecFieldId :: HsRecField GhcTc arg -> Located Id hsRecFieldId = hsRecFieldSel -hsRecUpdFieldRdr :: HsRecUpdField p -> Located RdrName+hsRecUpdFieldRdr :: HsRecUpdField (GhcPass p) -> Located RdrName hsRecUpdFieldRdr = fmap rdrNameAmbiguousFieldOcc . hsRecFieldLbl  hsRecUpdFieldId :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> Located Id-hsRecUpdFieldId = fmap selectorFieldOcc . hsRecUpdFieldOcc+hsRecUpdFieldId = fmap extFieldOcc . hsRecUpdFieldOcc  hsRecUpdFieldOcc :: HsRecField' (AmbiguousFieldOcc GhcTc) arg -> LFieldOcc GhcTc hsRecUpdFieldOcc = fmap unambiguousFieldOcc . hsRecFieldLbl@@ -414,8 +475,7 @@ ************************************************************************ -} -instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (Pat pass) where+instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (Pat p) where     ppr = pprPat  pprPatBndr :: OutputableBndr name => name -> SDoc@@ -427,46 +487,49 @@     else         pprPrefixOcc var -pprParendLPat :: (SourceTextX pass, OutputableBndrId pass) => LPat pass -> SDoc-pprParendLPat (L _ p) = pprParendPat p+pprParendLPat :: (OutputableBndrId (GhcPass p))+              => PprPrec -> LPat (GhcPass p) -> SDoc+pprParendLPat p (L _ pat) = pprParendPat p pat -pprParendPat :: (SourceTextX pass, OutputableBndrId pass) => Pat pass -> SDoc-pprParendPat p = sdocWithDynFlags $ \ dflags ->-                 if need_parens dflags p-                 then parens (pprPat p)-                 else  pprPat p+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 p-      | CoPat {} <- p = gopt Opt_PrintTypecheckerElaboration dflags-      | otherwise     = hsPatNeedsParens p+    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 :: (SourceTextX pass, OutputableBndrId pass) => Pat pass -> SDoc-pprPat (VarPat (L _ var))     = pprPatBndr var-pprPat (WildPat _)            = char '_'-pprPat (LazyPat pat)          = char '~' <> pprParendLPat pat-pprPat (BangPat pat)          = char '!' <> pprParendLPat pat-pprPat (AsPat name pat)       = hcat [pprPrefixOcc (unLoc name), char '@', pprParendLPat 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 pat-                                                            else pprPat pat)-pprPat (SigPatIn pat ty)      = ppr pat <+> dcolon <+> ppr ty-pprPat (SigPatOut pat ty)     = ppr pat <+> dcolon <+> ppr ty-pprPat (ListPat pats _ _)     = brackets (interpp'SP pats)-pprPat (PArrPat pats _)       = paBrackets (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 :: (OutputableBndrId (GhcPass p)) => Pat (GhcPass p) -> SDoc+pprPat (VarPat _ (L _ var))     = pprPatBndr var+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 ty pat)          = 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 ->@@ -479,16 +542,19 @@                          , ppr binds])           <+> pprConArgs details     else pprUserCon (unLoc con) details+pprPat (XPat x)               = ppr x  -pprUserCon :: (SourceTextX p, OutputableBndr con, OutputableBndrId p)-           => con -> HsConPatDetails p -> SDoc+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 :: (SourceTextX p, OutputableBndrId p) => HsConPatDetails p -> SDoc-pprConArgs (PrefixCon pats) = sep (map pprParendLPat pats)-pprConArgs (InfixCon p1 p2) = sep [pprParendLPat p1, pprParendLPat p2]+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)@@ -525,9 +591,9 @@ mkNilPat :: Type -> OutPat p mkNilPat ty = mkPrefixConPat nilDataCon [] [ty] -mkCharLitPat :: (SourceTextX p) => SourceText -> Char -> OutPat p+mkCharLitPat :: SourceText -> Char -> OutPat (GhcPass p) mkCharLitPat src c = mkPrefixConPat charDataCon-                          [noLoc $ LitPat (HsCharPrim (setSourceText src) c)] []+                          [noLoc $ LitPat NoExt (HsCharPrim src c)] []  {- ************************************************************************@@ -562,7 +628,7 @@ -}  isBangedLPat :: LPat p -> Bool-isBangedLPat (L _ (ParPat p))   = isBangedLPat p+isBangedLPat (L _ (ParPat _ p)) = isBangedLPat p isBangedLPat (L _ (BangPat {})) = True isBangedLPat _                  = False @@ -580,14 +646,14 @@   = False  looksLazyLPat :: LPat p -> Bool-looksLazyLPat (L _ (ParPat p))             = looksLazyLPat p-looksLazyLPat (L _ (AsPat _ p))            = looksLazyLPat p+looksLazyLPat (L _ (ParPat _ p))           = looksLazyLPat p+looksLazyLPat (L _ (AsPat _ _ p))          = looksLazyLPat p looksLazyLPat (L _ (BangPat {}))           = False looksLazyLPat (L _ (VarPat {}))            = False looksLazyLPat (L _ (WildPat {}))           = False looksLazyLPat _                            = True -isIrrefutableHsPat :: (SourceTextX p, OutputableBndrId p) => LPat p -> Bool+isIrrefutableHsPat :: (OutputableBndrId p) => LPat 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@@ -608,18 +674,16 @@     go1 (WildPat {})        = True     go1 (VarPat {})         = True     go1 (LazyPat {})        = True-    go1 (BangPat pat)       = go pat-    go1 (CoPat _ pat _)     = go1 pat-    go1 (ParPat pat)        = go pat-    go1 (AsPat _ pat)       = go pat-    go1 (ViewPat _ pat _)   = go pat-    go1 (SigPatIn pat _)    = go pat-    go1 (SigPatOut pat _)   = go pat-    go1 (TuplePat pats _ _) = all go pats-    go1 (SumPat _ _ _ _)    = False+    go1 (BangPat _ pat)     = go pat+    go1 (CoPat _ _ pat _)   = go1 pat+    go1 (ParPat _ pat)      = go pat+    go1 (AsPat _ _ pat)     = go pat+    go1 (ViewPat _ _ pat)   = go pat+    go1 (SigPat _ pat)      = go pat+    go1 (TuplePat _ pats _) = all go pats+    go1 (SumPat {})         = False                     -- See Note [Unboxed sum patterns aren't irrefutable]     go1 (ListPat {})        = False-    go1 (PArrPat {})        = False     -- ?      go1 (ConPatIn {})       = False     -- Conservative     go1 (ConPatOut{ pat_con = L _ (RealDataCon con), pat_args = details })@@ -638,6 +702,8 @@     -- since we cannot know until the splice is evaluated.     go1 (SplicePat {})      = False +    go1 (XPat {})           = False+ {- Note [Unboxed sum patterns aren't irrefutable] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unlike unboxed tuples, unboxed sums are *not* irrefutable when used as@@ -660,116 +726,74 @@ is the only thing that could possibly be matched! -} --- | Returns 'True' if a pattern must be parenthesized in order to parse--- (e.g., the @(x :: Int)@ in @f (x :: Int) = x@).-hsPatNeedsParens :: Pat a -> Bool-hsPatNeedsParens (NPlusKPat {})      = True-hsPatNeedsParens (SplicePat {})      = False-hsPatNeedsParens (ConPatIn _ ds)     = conPatNeedsParens ds-hsPatNeedsParens p@(ConPatOut {})    = conPatNeedsParens (pat_args p)-hsPatNeedsParens (SigPatIn {})       = True-hsPatNeedsParens (SigPatOut {})      = True-hsPatNeedsParens (ViewPat {})        = True-hsPatNeedsParens (CoPat _ p _)       = hsPatNeedsParens p-hsPatNeedsParens (WildPat {})        = False-hsPatNeedsParens (VarPat {})         = False-hsPatNeedsParens (LazyPat {})        = False-hsPatNeedsParens (BangPat {})        = False-hsPatNeedsParens (ParPat {})         = False-hsPatNeedsParens (AsPat {})          = False-hsPatNeedsParens (TuplePat {})       = False-hsPatNeedsParens (SumPat {})         = False-hsPatNeedsParens (ListPat {})        = False-hsPatNeedsParens (PArrPat {})        = False-hsPatNeedsParens (LitPat {})         = False-hsPatNeedsParens (NPat {})           = False---- | Returns 'True' if a constructor pattern must be parenthesized in order--- to parse.-conPatNeedsParens :: HsConDetails a b -> Bool-conPatNeedsParens (PrefixCon {}) = False-conPatNeedsParens (InfixCon {})  = True-conPatNeedsParens (RecCon {})    = False---- | Returns 'True' for compound patterns that need parentheses when used in--- an argument position.------ Note that this is different from 'hsPatNeedsParens', which only says if--- a pattern needs to be parenthesized to parse in /any/ position, whereas--- 'isCompountPat' says if a pattern needs to be parenthesized in an /argument/--- position. In other words, @'hsPatNeedsParens' x@ implies--- @'isCompoundPat' x@, but not necessarily the other way around.-isCompoundPat :: Pat a -> Bool-isCompoundPat (NPlusKPat {})       = True-isCompoundPat (SplicePat {})       = False-isCompoundPat (ConPatIn _ ds)      = isCompoundConPat ds-isCompoundPat p@(ConPatOut {})     = isCompoundConPat (pat_args p)-isCompoundPat (SigPatIn {})        = True-isCompoundPat (SigPatOut {})       = True-isCompoundPat (ViewPat {})         = True-isCompoundPat (CoPat _ p _)        = isCompoundPat p-isCompoundPat (WildPat {})         = False-isCompoundPat (VarPat {})          = False-isCompoundPat (LazyPat {})         = False-isCompoundPat (BangPat {})         = False-isCompoundPat (ParPat {})          = False-isCompoundPat (AsPat {})           = False-isCompoundPat (TuplePat {})        = False-isCompoundPat (SumPat {})          = False-isCompoundPat (ListPat {})         = False-isCompoundPat (PArrPat {})         = False-isCompoundPat (LitPat p)           = isCompoundHsLit p-isCompoundPat (NPat (L _ p) _ _ _) = isCompoundHsOverLit p+-- | @'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 > topPrec+    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 _ (L _ ol) _ _)  = hsOverLitNeedsParens p ol+    go (XPat {})              = True -- conservative default --- | Returns 'True' for compound constructor patterns that need parentheses--- when used in an argument position.------ Note that this is different from 'conPatNeedsParens', which only says if--- a constructor pattern needs to be parenthesized to parse in /any/ position,--- whereas 'isCompountConPat' says if a pattern needs to be parenthesized in an--- /argument/ position. In other words, @'conPatNeedsParens' x@ implies--- @'isCompoundConPat' x@, but not necessarily the other way around.-isCompoundConPat :: HsConDetails a b -> Bool-isCompoundConPat (PrefixCon args) = not (null args)-isCompoundConPat (InfixCon {})    = True-isCompoundConPat (RecCon {})      = False+-- | @'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 --- | @'parenthesizeCompoundPat' p@ checks if @'isCompoundPat' p@ is true, and--- if so, surrounds @p@ with a 'ParPat'. Otherwise, it simply returns @p@.-parenthesizeCompoundPat :: LPat p -> LPat p-parenthesizeCompoundPat lp@(L loc p)-  | isCompoundPat p = L loc (ParPat lp)-  | otherwise       = lp+-- | @'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@(L loc pat)+  | patNeedsParens p pat = L loc (ParPat NoExt lpat)+  | otherwise            = lpat  {- % Collect all EvVars from all constructor patterns -}  -- May need to add more cases-collectEvVarsPats :: [Pat p] -> Bag EvVar+collectEvVarsPats :: [Pat GhcTc] -> Bag EvVar collectEvVarsPats = unionManyBags . map collectEvVarsPat -collectEvVarsLPat :: LPat p -> Bag EvVar+collectEvVarsLPat :: LPat GhcTc -> Bag EvVar collectEvVarsLPat (L _ pat) = collectEvVarsPat pat -collectEvVarsPat :: Pat p -> Bag EvVar+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-    PArrPat  ps _     -> unionManyBags $ map collectEvVarsLPat ps+    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)+                     -> unionBags (listToBag dicts)                                    $ unionManyBags                                    $ map collectEvVarsLPat                                    $ hsConPatArgs args-    SigPatOut p _     -> collectEvVarsLPat p-    CoPat _ p _       -> collectEvVarsPat  p-    ConPatIn _  _     -> panic "foldMapPatBag: ConPatIn"-    SigPatIn _ _      -> panic "foldMapPatBag: SigPatIn"-    _other_pat        -> emptyBag+    SigPat  _ p      -> collectEvVarsLPat p+    CoPat _ _ p _    -> collectEvVarsPat  p+    ConPatIn _  _    -> panic "foldMapPatBag: ConPatIn"+    _other_pat       -> emptyBag
hsSyn/HsPat.hs-boot view
@@ -4,17 +4,16 @@                                       -- in module PlaceHolder {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RoleAnnotations #-}+{-# LANGUAGE TypeFamilies #-}  module HsPat where import SrcLoc( Located ) -import Data.Data hiding (Fixity) import Outputable-import HsExtension      ( SourceTextX, DataId, OutputableBndrId )+import HsExtension      ( OutputableBndrId, GhcPass )  type role Pat nominal data Pat (i :: *) type LPat i = Located (Pat i) -instance (DataId p) => Data (Pat p)-instance (SourceTextX pass, OutputableBndrId pass) => Outputable (Pat pass)+instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (Pat p)
hsSyn/HsSyn.hs view
@@ -15,6 +15,8 @@ {-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]                                       -- in module PlaceHolder {-# LANGUAGE ConstraintKinds #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleInstances #-} -- For deriving instance Data  module HsSyn (         module HsBinds,@@ -30,7 +32,7 @@         module HsExtension,         Fixity, -        HsModule(..)+        HsModule(..), ) where  -- friends:@@ -48,6 +50,7 @@ import BasicTypes       ( Fixity, WarningTxt ) import HsUtils import HsDoc+import HsInstances ()  -- others: import Outputable@@ -60,12 +63,12 @@ -- | Haskell Module -- -- All we actually declare here is the top-level structure for a module.-data HsModule name+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 name]),+      hsmodExports :: Maybe (Located [LIE pass]),         -- ^ Export list         --         --  - @Nothing@: export list omitted, so export everything@@ -79,11 +82,11 @@         --                                   ,'ApiAnnotation.AnnClose'          -- For details on above see note [Api annotations] in ApiAnnotation-      hsmodImports :: [LImportDecl name],+      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 name],+      hsmodDecls :: [LHsDecl pass],         -- ^ Type, class, value, and interface signature decls       hsmodDeprecMessage :: Maybe (Located WarningTxt),         -- ^ reason\/explanation for warning/deprecation of this module@@ -110,10 +113,12 @@      --    hsmodImports,hsmodDecls if this style is used.       -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId name) => Data (HsModule name)+-- deriving instance (DataIdLR name name) => Data (HsModule name)+deriving instance Data (HsModule GhcPs)+deriving instance Data (HsModule GhcRn)+deriving instance Data (HsModule GhcTc) -instance (SourceTextX pass, OutputableBndrId pass)-  => Outputable (HsModule pass) where+instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsModule p) where      ppr (HsModule Nothing _ imports decls _ mbDoc)       = pp_mb mbDoc $$ pp_nonnull imports
hsSyn/HsTypes.hs view
@@ -8,19 +8,19 @@  {-# 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(..), LHsType, HsKind, LHsKind,+        HsType(..), NewHsTypeX(..), LHsType, HsKind, LHsKind,         HsTyVarBndr(..), LHsTyVarBndr,-        LHsQTyVars(..),-        HsImplicitBndrs(..),+        LHsQTyVars(..), HsQTvsRn(..),+        HsImplicitBndrs(..), HsIBRn(..),         HsWildCardBndrs(..),         LHsSigType, LHsSigWcType, LHsWcType,         HsTupleSort(..),@@ -28,14 +28,13 @@         HsContext, LHsContext,         HsTyLit(..),         HsIPName(..), hsIPNameFS,-        HsAppType(..),LHsAppType,          LBangType, BangType,         HsSrcBang(..), HsImplBang(..),         SrcStrictness(..), SrcUnpackedness(..),         getBangType, getBangStrictness, -        ConDeclField(..), LConDeclField, pprConDeclFields, updateGadtResult,+        ConDeclField(..), LConDeclField, pprConDeclFields,          HsConDetails(..), @@ -44,21 +43,21 @@         rdrNameAmbiguousFieldOcc, selectorAmbiguousFieldOcc,         unambiguousFieldOcc, ambiguousFieldOcc, -        HsWildCardInfo(..), mkAnonWildCardTy,+        HsWildCardInfo(..), mkAnonWildCardTy, pprAnonWildCard,         wildCardName, sameWildCard,          mkHsImplicitBndrs, mkHsWildCardBndrs, hsImplicitBody,         mkEmptyImplicitBndrs, mkEmptyWildCardBndrs,         mkHsQTvs, hsQTvExplicit, emptyLHsQTvs, isEmptyLHsQTvs,-        isHsKindedTyVar, hsTvbAllKinded,+        isHsKindedTyVar, hsTvbAllKinded, isLHsForAllTy,         hsScopedTvs, hsWcScopedTvs, dropWildCards,         hsTyVarName, hsAllLTyVarNames, hsLTyVarLocNames,         hsLTyVarName, hsLTyVarLocName, hsExplicitLTyVarNames,         splitLHsInstDeclTy, getLHsInstDeclHead, getLHsInstDeclClass_maybe,         splitLHsPatSynTy,         splitLHsForAllTy, splitLHsQualTy, splitLHsSigmaTy,-        splitHsFunType, splitHsAppsTy,-        splitHsAppTys, getAppsTyHead_maybe, hsTyGetAppHead_maybe,+        splitHsFunType,+        splitHsAppTys, hsTyGetAppHead_maybe,         mkHsOpTy, mkHsAppTy, mkHsAppTys,         ignoreParens, hsSigType, hsSigWcType,         hsLTyVarBndrToType, hsLTyVarBndrsToTypes,@@ -66,15 +65,15 @@         -- Printing         pprHsType, pprHsForAll, pprHsForAllTvs, pprHsForAllExtra,         pprHsContext, pprHsContextNoArrow, pprHsContextMaybe,-        isCompoundHsType, parenthesizeCompoundHsType+        hsTypeNeedsParens, parenthesizeHsType     ) where  import GhcPrelude  import {-# SOURCE #-} HsExpr ( HsSplice, pprSplice ) -import PlaceHolder ( PlaceHolder(..) ) import HsExtension+import HsLit () -- for instances  import Id ( Id ) import Name( Name )@@ -93,7 +92,6 @@  import Data.Data hiding ( Fixity, Prefix, Infix ) import Data.Maybe ( fromMaybe )-import Control.Monad ( unless )  {- ************************************************************************@@ -110,11 +108,11 @@ 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+getBangType (L _ (HsBangTy _ _ ty)) = ty+getBangType ty                      = ty  getBangStrictness :: LHsType a -> HsSrcBang-getBangStrictness (L _ (HsBangTy s _)) = s+getBangStrictness (L _ (HsBangTy _ s _)) = s getBangStrictness _ = (HsSrcBang NoSourceText NoSrcUnpack NoSrcStrict)  {-@@ -256,34 +254,43 @@  -- | Located Haskell Quantified Type Variables data LHsQTyVars pass   -- See Note [HsType binders]-  = HsQTvs { hsq_implicit :: PostRn pass [Name]-                -- Implicit (dependent) variables+  = HsQTvs { hsq_ext :: XHsQTvs pass             , hsq_explicit :: [LHsTyVarBndr pass]                 -- Explicit variables, written by the user                 -- See Note [HsForAllTy tyvar binders]+    }+  | XLHsQTyVars (XXLHsQTyVars pass) -           , hsq_dependent :: PostRn pass NameSet+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 -deriving instance (DataId pass) => Data (LHsQTyVars pass)+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_implicit = PlaceHolder, hsq_explicit = tvs-                      , hsq_dependent = PlaceHolder }+mkHsQTvs tvs = HsQTvs { hsq_ext = noExt, hsq_explicit = tvs }  hsQTvExplicit :: LHsQTyVars pass -> [LHsTyVarBndr pass] hsQTvExplicit = hsq_explicit  emptyLHsQTvs :: LHsQTyVars GhcRn-emptyLHsQTvs = HsQTvs [] [] emptyNameSet+emptyLHsQTvs = HsQTvs (HsQTvsRn [] emptyNameSet) []  isEmptyLHsQTvs :: LHsQTyVars GhcRn -> Bool-isEmptyLHsQTvs (HsQTvs [] [] _) = True+isEmptyLHsQTvs (HsQTvs (HsQTvsRn [] _) []) = True isEmptyLHsQTvs _                = False  ------------------------------------------------@@ -294,30 +301,45 @@  -- | Haskell Implicit Binders data HsImplicitBndrs pass thing   -- See Note [HsType binders]-  = HsIB { hsib_vars :: PostRn pass [Name] -- Implicitly-bound kind & type vars-         , hsib_body :: thing              -- Main payload (type or list of types)-         , hsib_closed :: PostRn pass Bool -- Taking the hsib_vars into account,-                                           -- is the payload closed? Used in-                                           -- TcHsType.decideKindGeneralisationPlan+  = HsIB { hsib_ext  :: XHsIB pass thing+         , hsib_body :: thing            -- Main payload (type or list of types)     }-deriving instance (DataId pass, Data thing) => Data (HsImplicitBndrs pass thing)+  | XHsImplicitBndrs (XXHsImplicitBndrs pass thing) +data HsIBRn+  = HsIBRn { hsib_vars :: [Name] -- Implicitly-bound kind & type vars+           , hsib_closed :: Bool -- Taking the hsib_vars into account,+                                 -- is the payload closed? Used in+                                 -- TcHsType.decideKindGeneralisationPlan+    } deriving Data++type instance XHsIB              GhcPs _ = NoExt+type instance XHsIB              GhcRn _ = HsIBRn+type instance XHsIB              GhcTc _ = HsIBRn++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_wcs :: PostRn pass [Name]-                -- Wild cards, both named and anonymous+  = HsWC { hswc_ext :: XHsWC pass thing                 -- after the renamer+                -- Wild cards, both named and anonymous           , 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) -deriving instance (DataId pass, Data thing) => Data (HsWildCardBndrs 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 @@ -331,6 +353,7 @@  hsImplicitBody :: HsImplicitBndrs pass thing -> thing hsImplicitBody (HsIB { hsib_body = body }) = body+hsImplicitBody (XHsImplicitBndrs _) = panic "hsImplicitBody"  hsSigType :: LHsSigType pass -> LHsType pass hsSigType = hsImplicitBody@@ -363,24 +386,24 @@ -}  mkHsImplicitBndrs :: thing -> HsImplicitBndrs GhcPs thing-mkHsImplicitBndrs x = HsIB { hsib_body   = x-                           , hsib_vars   = PlaceHolder-                           , hsib_closed = PlaceHolder }+mkHsImplicitBndrs x = HsIB { hsib_ext  = noExt+                           , hsib_body = x }  mkHsWildCardBndrs :: thing -> HsWildCardBndrs GhcPs thing mkHsWildCardBndrs x = HsWC { hswc_body = x-                           , hswc_wcs  = PlaceHolder }+                           , 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_body   = x-                              , hsib_vars   = []-                              , hsib_closed = False }+mkEmptyImplicitBndrs x = HsIB { hsib_ext = HsIBRn+                                  { hsib_vars   = []+                                  , hsib_closed = False }+                              , hsib_body = x }  mkEmptyWildCardBndrs :: thing -> HsWildCardBndrs GhcRn thing mkEmptyWildCardBndrs x = HsWC { hswc_body = x-                              , hswc_wcs  = [] }+                              , hswc_ext  = [] }   --------------------------------------------------@@ -405,9 +428,11 @@ -- | 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         -- ^@@ -415,12 +440,19 @@         --          'ApiAnnotation.AnnDcolon', 'ApiAnnotation.AnnClose'          -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId pass) => Data (HsTyVarBndr pass) +  | 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@@ -429,19 +461,22 @@ -- | Haskell Type data HsType pass   = HsForAllTy   -- See Note [HsType binders]-      { hst_bndrs :: [LHsTyVarBndr pass]+      { hst_xforall :: XForAllTy pass,+        hst_bndrs   :: [LHsTyVarBndr pass]                                        -- Explicit, user-supplied 'forall a b c'-      , hst_body  :: LHsType pass      -- body type+      , 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_ctxt :: LHsContext pass       -- Context C => blah-      , hst_body :: LHsType pass }+      { hst_xqual :: XQualTy pass+      , hst_ctxt  :: LHsContext pass       -- Context C => blah+      , hst_body  :: LHsType pass } -  | HsTyVar             Promoted -- whether explicitly promoted, for the pretty+  | HsTyVar             (XTyVar pass)+                        Promoted -- whether explicitly promoted, for the pretty                                  -- printer                         (Located (IdP pass))                   -- Type variable, type constructor, or data constructor@@ -451,53 +486,50 @@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsAppsTy            [LHsAppType pass] -- Used only before renaming,-                                          -- Note [HsAppsTy]-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None--  | HsAppTy             (LHsType pass)+  | HsAppTy             (XAppTy pass)                         (LHsType pass)+                        (LHsType pass)       -- ^ - 'ApiAnnotation.AnnKeywordId' : None        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsFunTy             (LHsType pass)   -- function type+  | HsFunTy             (XFunTy pass)+                        (LHsType pass)   -- function type                         (LHsType pass)       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnRarrow',        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsListTy            (LHsType pass)  -- Element type+  | HsListTy            (XListTy pass)+                        (LHsType pass)  -- Element type       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'['@,       --         'ApiAnnotation.AnnClose' @']'@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsPArrTy            (LHsType pass)  -- Elem. type of parallel array: [:t:]-      -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @'[:'@,-      --         'ApiAnnotation.AnnClose' @':]'@--      -- For details on above see note [Api annotations] in ApiAnnotation--  | HsTupleTy           HsTupleSort+  | 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             [LHsType pass]  -- Element types (length gives arity)+  | 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              (LHsType pass) (Located (IdP pass)) (LHsType pass)+  | HsOpTy              (XOpTy pass)+                        (LHsType pass) (Located (IdP pass)) (LHsType pass)       -- ^ - 'ApiAnnotation.AnnKeywordId' : None        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsParTy             (LHsType pass)   -- See Note [Parens in HsSyn] in HsExpr+  | 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' @'('@,@@ -505,7 +537,8 @@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsIParamTy          (Located HsIPName) -- (?x :: ty)+  | HsIParamTy          (XIParamTy pass)+                        (Located HsIPName) -- (?x :: ty)                         (LHsType pass)   -- Implicit parameters as they occur in                                          -- contexts       -- ^@@ -515,18 +548,13 @@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsEqTy              (LHsType pass)   -- ty1 ~ ty2-                        (LHsType pass)   -- Always allowed even without-                                         -- TypeOperators, and has special-                                         -- kinding rule-      -- ^-      -- > ty1 ~ ty2-      ---      -- - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnTilde'--      -- 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           (LHsType pass)  -- (ty :: kind)+  | HsKindSig           (XKindSig pass)+                        (LHsType pass)  -- (ty :: kind)                         (LHsKind pass)  -- A type with a kind signature       -- ^       -- > (ty :: kind)@@ -536,19 +564,21 @@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsSpliceTy          (HsSplice pass)   -- Includes quasi-quotes-                        (PostTc pass Kind)+  | 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             (LHsType pass) LHsDocString -- A documented type+  | HsDocTy             (XDocTy pass)+                        (LHsType pass) LHsDocString -- A documented type       -- ^ - 'ApiAnnotation.AnnKeywordId' : None        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsBangTy    HsSrcBang (LHsType pass)   -- Bang-style type annotations+  | HsBangTy    (XBangTy pass)+                HsSrcBang (LHsType pass)   -- Bang-style type annotations       -- ^ - 'ApiAnnotation.AnnKeywordId' :       --         'ApiAnnotation.AnnOpen' @'{-\# UNPACK' or '{-\# NOUNPACK'@,       --         'ApiAnnotation.AnnClose' @'#-}'@@@ -556,21 +586,22 @@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsRecTy     [LConDeclField pass]    -- Only in data type declarations+  | 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 Type       -- An escape hatch for tunnelling a *closed*-                        -- Core Type through HsSyn.-      -- ^ - 'ApiAnnotation.AnnKeywordId' : None+  -- | 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)         Promoted           -- whether explcitly promoted, for pretty printer-        (PostTc pass Kind) -- See Note [Promoted lists and tuples]         [LHsType pass]       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'["@,       --         'ApiAnnotation.AnnClose' @']'@@@ -578,25 +609,78 @@       -- For details on above see note [Api annotations] in ApiAnnotation    | HsExplicitTupleTy      -- A promoted explicit tuple-        [PostTc pass Kind] -- See Note [Promoted lists and tuples]+        (XExplicitTupleTy pass)         [LHsType pass]       -- ^ - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen' @"'("@,       --         'ApiAnnotation.AnnClose' @')'@        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsTyLit HsTyLit      -- A promoted numeric literal.+  | HsTyLit (XTyLit pass) HsTyLit      -- A promoted numeric literal.       -- ^ - 'ApiAnnotation.AnnKeywordId' : None        -- For details on above see note [Api annotations] in ApiAnnotation -  | HsWildCardTy (HsWildCardInfo pass)  -- A type wildcard+  | HsWildCardTy (XWildCardTy pass)  -- A type wildcard       -- See Note [The wildcard story for types]+      -- A anonymous wild card ('_'). A fresh Name is generated for+      -- each individual anonymous wildcard during renaming       -- ^ - 'ApiAnnotation.AnnKeywordId' : None        -- For details on above see note [Api annotations] in ApiAnnotation-deriving instance (DataId pass) => Data (HsType pass) +  -- 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 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      GhcPs = NoExt+type instance XWildCardTy      GhcRn = HsWildCardInfo+type instance XWildCardTy      GhcTc = HsWildCardInfo++type instance XXType         (GhcPass _) = NewHsTypeX++ -- Note [Literal source text] in BasicTypes for SourceText fields in -- the following -- | Haskell Type Literal@@ -605,26 +689,12 @@   | HsStrTy SourceText FastString     deriving Data -newtype HsWildCardInfo pass      -- See Note [The wildcard story for types]-    = AnonWildCard (PostRn pass (Located Name))+newtype HsWildCardInfo        -- See Note [The wildcard story for types]+    = AnonWildCard (Located Name)+      deriving Data       -- A anonymous wild card ('_'). A fresh Name is generated for       -- each individual anonymous wildcard during renaming-deriving instance (DataId pass) => Data (HsWildCardInfo pass) --- | Located Haskell Application Type-type LHsAppType pass = Located (HsAppType pass)-      -- ^ 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnSimpleQuote'---- | Haskell Application Type-data HsAppType pass-  = HsAppInfix (Located (IdP pass)) -- either a symbol or an id in backticks-  | HsAppPrefix (LHsType pass)      -- anything else, including things like (+)-deriving instance (DataId pass) => Data (HsAppType pass)--instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (HsAppType pass) where-  ppr = ppr_app_ty- {- Note [HsForAllTy tyvar binders] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -680,16 +750,18 @@   The 'Promoted' field in an HsTyVar captures whether the type was promoted in   the source code by prefixing an apostrophe. -Note [HsAppsTy]+Note [HsStarTy] ~~~~~~~~~~~~~~~-How to parse+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. -  Foo * Int+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. -? Is it `(*) Foo Int` or `Foo GHC.Types.* Int`? There's no way to know until renaming.-So we just take type expressions like this and put each component in a list, so be-sorted out in the renamer. The sorting out is done by RnTypes.mkHsOpTyRn. This means-that the parser should never produce HsAppTy or HsOpTy.  Note [Promoted lists and tuples] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -757,19 +829,24 @@  -- | Constructor Declaration Field data ConDeclField pass  -- Record fields have Haddoc docs on them-  = ConDeclField { cd_fld_names :: [LFieldOcc pass],+  = 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-deriving instance (DataId pass) => Data (ConDeclField pass)+  | XConDeclField (XXConDeclField pass) -instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (ConDeclField pass) where-  ppr (ConDeclField fld_n fld_ty _) = ppr fld_n <+> dcolon <+> ppr fld_ty+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@@ -785,30 +862,6 @@   ppr (RecCon rec)     = text "RecCon:" <+> ppr rec   ppr (InfixCon l r)   = text "InfixCon:" <+> ppr [l, r] --- Takes details and result type of a GADT data constructor as created by the--- parser and rejigs them using information about fixities from the renamer.--- See Note [Sorting out the result type] in RdrHsSyn-updateGadtResult-  :: (Monad m)-     => (SDoc -> m ())-     -> SDoc-     -> HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn])-                     -- ^ Original details-     -> LHsType GhcRn -- ^ Original result type-     -> m (HsConDetails (LHsType GhcRn) (Located [LConDeclField GhcRn]),-           LHsType GhcRn)-updateGadtResult failWith doc details ty-  = do { let (arg_tys, res_ty) = splitHsFunType ty-             badConSig         = text "Malformed constructor signature"-       ; case details of-           InfixCon {}  -> pprPanic "updateGadtResult" (ppr ty)--           RecCon {}    -> do { unless (null arg_tys)-                                       (failWith (doc <+> badConSig))-                              ; return (details, res_ty) }--           PrefixCon {} -> return (PrefixCon arg_tys, res_ty)}- {- Note [ConDeclField passs] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -841,19 +894,23 @@ --  - the named wildcars; see Note [Scoping of named wildcards] -- because they scope in the same way hsWcScopedTvs sig_ty-  | HsWC { hswc_wcs = nwcs, hswc_body = sig_ty1 }  <- sig_ty-  , HsIB { hsib_vars = vars, hsib_body = sig_ty2 } <- sig_ty1+  | HsWC { hswc_ext = nwcs, hswc_body = sig_ty1 }  <- sig_ty+  , HsIB { hsib_ext = HsIBRn { hsib_vars = 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_vars = vars,  hsib_body = sig_ty2 } <- sig_ty+  | HsIB { hsib_ext = HsIBRn { hsib_vars = vars }+         , hsib_body = sig_ty2 } <- sig_ty   , L _ (HsForAllTy { hst_bndrs = tvs }) <- sig_ty2   = vars ++ map hsLTyVarName tvs   | otherwise@@ -874,8 +931,9 @@  --------------------- hsTyVarName :: HsTyVarBndr pass -> IdP pass-hsTyVarName (UserTyVar (L _ n))     = n-hsTyVarName (KindedTyVar (L _ n) _) = n+hsTyVarName (UserTyVar _ (L _ n))     = n+hsTyVarName (KindedTyVar _ (L _ n) _) = n+hsTyVarName (XTyVarBndr{}) = panic "hsTyVarName"  hsLTyVarName :: LHsTyVarBndr pass -> IdP pass hsLTyVarName = hsTyVarName . unLoc@@ -886,8 +944,10 @@  hsAllLTyVarNames :: LHsQTyVars GhcRn -> [Name] -- All variables-hsAllLTyVarNames (HsQTvs { hsq_implicit = kvs, hsq_explicit = tvs })+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 = fmap hsTyVarName@@ -896,31 +956,36 @@ hsLTyVarLocNames qtvs = map hsLTyVarLocName (hsQTvExplicit qtvs)  -- | Convert a LHsTyVarBndr to an equivalent LHsType.-hsLTyVarBndrToType :: LHsTyVarBndr pass -> LHsType pass+hsLTyVarBndrToType :: LHsTyVarBndr (GhcPass p) -> LHsType (GhcPass p) hsLTyVarBndrToType = fmap cvt-  where cvt (UserTyVar n) = HsTyVar NotPromoted n-        cvt (KindedTyVar (L name_loc n) kind)-          = HsKindSig (L name_loc (HsTyVar NotPromoted (L name_loc n))) kind+  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 pass -> [LHsType pass]+hsLTyVarBndrsToTypes :: LHsQTyVars (GhcPass p) -> [LHsType (GhcPass p)] hsLTyVarBndrsToTypes (HsQTvs { hsq_explicit = tvbs }) = map hsLTyVarBndrToType tvbs+hsLTyVarBndrsToTypes (XLHsQTyVars _) = panic "hsLTyVarBndrsToTypes"  ----------------------wildCardName :: HsWildCardInfo GhcRn -> Name+wildCardName :: HsWildCardInfo -> Name wildCardName (AnonWildCard  (L _ n)) = n  -- Two wild cards are the same when they have the same location-sameWildCard :: Located (HsWildCardInfo pass)-             -> Located (HsWildCardInfo pass) -> Bool+sameWildCard :: Located HsWildCardInfo -> Located HsWildCardInfo -> Bool sameWildCard (L l1 (AnonWildCard _))   (L l2 (AnonWildCard _))   = l1 == l2  ignoreParens :: LHsType pass -> LHsType pass-ignoreParens (L _ (HsParTy ty))                      = ignoreParens ty-ignoreParens (L _ (HsAppsTy [L _ (HsAppPrefix ty)])) = ignoreParens ty-ignoreParens ty                                      = ty+ignoreParens (L _ (HsParTy _ ty)) = ignoreParens ty+ignoreParens ty                   = ty +isLHsForAllTy :: LHsType p -> Bool+isLHsForAllTy (L _ (HsForAllTy {})) = True+isLHsForAllTy _                     = False+ {- ************************************************************************ *                                                                      *@@ -930,18 +995,20 @@ -}  mkAnonWildCardTy :: HsType GhcPs-mkAnonWildCardTy = HsWildCardTy (AnonWildCard PlaceHolder)+mkAnonWildCardTy = HsWildCardTy noExt -mkHsOpTy :: LHsType pass -> Located (IdP pass) -> LHsType pass -> HsType pass-mkHsOpTy ty1 op ty2 = HsOpTy ty1 op ty2+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 pass -> LHsType pass -> LHsType pass-mkHsAppTy t1 t2 = addCLoc t1 t2 (HsAppTy t1 (parenthesizeCompoundHsType t2))+mkHsAppTy :: LHsType (GhcPass p) -> LHsType (GhcPass p) -> LHsType (GhcPass p)+mkHsAppTy t1 t2+  = addCLoc t1 t2 (HsAppTy noExt t1 (parenthesizeHsType appPrec t2)) -mkHsAppTys :: LHsType pass -> [LHsType pass] -> LHsType pass+mkHsAppTys :: LHsType (GhcPass p) -> [LHsType (GhcPass p)]+           -> LHsType (GhcPass p) mkHsAppTys = foldl mkHsAppTy - {- ************************************************************************ *                                                                      *@@ -957,79 +1024,46 @@ -- 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 (L _ (HsParTy _ ty))   = splitHsFunType ty -splitHsFunType (L _ (HsFunTy x y))+splitHsFunType (L _ (HsFunTy _ x y))   | (args, res) <- splitHsFunType y   = (x:args, res) -splitHsFunType orig_ty@(L _ (HsAppTy t1 t2))+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+    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+    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) ------------------------------------ | Retrieves the head of an HsAppsTy, if this can be done unambiguously,--- without consulting fixities.-getAppsTyHead_maybe :: [LHsAppType pass]-                    -> Maybe (LHsType pass, [LHsType pass], LexicalFixity)-getAppsTyHead_maybe tys = case splitHsAppsTy tys of-  ([app1:apps], []) ->  -- no symbols, some normal types-    Just (mkHsAppTys app1 apps, [], Prefix)-  ([app1l:appsl, app1r:appsr], [L loc op]) ->  -- one operator-    Just ( L loc (HsTyVar NotPromoted (L loc op))-         , [mkHsAppTys app1l appsl, mkHsAppTys app1r appsr], Infix)-  _ -> -- can't figure it out-    Nothing---- | Splits a [HsAppType pass] (the payload of an HsAppsTy) into regions of--- prefix types (normal types) and infix operators.--- If @splitHsAppsTy tys = (non_syms, syms)@, then @tys@ starts with the first--- element of @non_syms@ followed by the first element of @syms@ followed by--- the next element of @non_syms@, etc. It is guaranteed that the non_syms list--- has one more element than the syms list.-splitHsAppsTy :: [LHsAppType pass] -> ([[LHsType pass]], [Located (IdP pass)])-splitHsAppsTy = go [] [] []-  where-    go acc acc_non acc_sym [] = (reverse (reverse acc : acc_non), reverse acc_sym)-    go acc acc_non acc_sym (L _ (HsAppPrefix ty) : rest)-      = go (ty : acc) acc_non acc_sym rest-    go acc acc_non acc_sym (L _ (HsAppInfix op) : rest)-      = go [] (reverse acc : acc_non) (op : acc_sym) rest---- Retrieve the name of the "head" of a nested type application+-- 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 pass-                     -> Maybe (Located (IdP pass), [LHsType pass])+hsTyGetAppHead_maybe :: LHsType (GhcPass p)+                     -> Maybe (Located (IdP (GhcPass p)), [LHsType (GhcPass p)]) hsTyGetAppHead_maybe = go []   where-    go tys (L _ (HsTyVar _ ln))          = Just (ln, tys)-    go tys (L _ (HsAppsTy apps))-      | Just (head, args, _) <- getAppsTyHead_maybe apps-                                         = go (args ++ tys) head-    go tys (L _ (HsAppTy l r))           = go (r : tys) l-    go tys (L _ (HsOpTy l (L loc n) r))  = Just (L loc n, l : r : tys)-    go tys (L _ (HsParTy t))             = go tys t-    go tys (L _ (HsKindSig t _))         = go tys t+    go tys (L _ (HsTyVar _ _ ln))          = Just (ln, tys)+    go tys (L _ (HsAppTy _ l r))           = go (r : tys) l+    go tys (L _ (HsOpTy _ l (L loc n) r))  = Just (L loc n, l : r : tys)+    go tys (L _ (HsParTy _ t))             = go tys t+    go tys (L _ (HsKindSig _ t _))         = go tys t     go _   _                             = Nothing  splitHsAppTys :: LHsType GhcRn -> [LHsType GhcRn]               -> (LHsType GhcRn, [LHsType GhcRn])-  -- no need to worry about HsAppsTy here-splitHsAppTys (L _ (HsAppTy f a)) as = splitHsAppTys f (a:as)-splitHsAppTys (L _ (HsParTy f))   as = splitHsAppTys f as-splitHsAppTys f                   as = (f,as)+splitHsAppTys (L _ (HsAppTy _ f a)) as = splitHsAppTys f (a:as)+splitHsAppTys (L _ (HsParTy _ f))   as = splitHsAppTys f as+splitHsAppTys f                     as = (f,as)  -------------------------------- splitLHsPatSynTy :: LHsType pass@@ -1053,31 +1087,33 @@   = (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 (L _ (HsParTy t)) = splitLHsForAllTy t 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 (L _ (HsParTy t)) = splitLHsQualTy t splitLHsQualTy body              = (noLoc [], body)  splitLHsInstDeclTy :: LHsSigType GhcRn                    -> ([Name], LHsContext GhcRn, LHsType GhcRn) -- Split up an instance decl type, returning the pieces-splitLHsInstDeclTy (HsIB { hsib_vars = itkvs+splitLHsInstDeclTy (HsIB { hsib_ext = HsIBRn { hsib_vars = 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 pass -> Maybe (Located (IdP pass))+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@@ -1100,19 +1136,27 @@ -- 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 { rdrNameFieldOcc  :: Located RdrName+data FieldOcc pass = FieldOcc { extFieldOcc     :: XCFieldOcc pass+                              , rdrNameFieldOcc :: Located RdrName                                  -- ^ See Note [Located RdrNames] in HsExpr-                              , selectorFieldOcc :: PostRn pass (IdP pass)                               }-deriving instance Eq (PostRn pass (IdP pass))  => Eq  (FieldOcc pass)-deriving instance Ord (PostRn pass (IdP pass)) => Ord (FieldOcc pass)-deriving instance (DataId pass) => Data (FieldOcc pass) +  | 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 rdr PlaceHolder+mkFieldOcc rdr = FieldOcc noExt rdr   -- | Ambiguous Field Occurrence@@ -1128,34 +1172,50 @@ -- Note [Disambiguating record fields] in TcExpr. -- See Note [Located RdrNames] in HsExpr data AmbiguousFieldOcc pass-  = Unambiguous (Located RdrName) (PostRn pass (IdP pass))-  | Ambiguous   (Located RdrName) (PostTc pass (IdP pass))-deriving instance DataId pass => Data (AmbiguousFieldOcc pass)+  = Unambiguous (XUnambiguous pass) (Located RdrName)+  | Ambiguous   (XAmbiguous pass)   (Located RdrName)+  | XAmbiguousFieldOcc (XXAmbiguousFieldOcc pass) -instance Outputable (AmbiguousFieldOcc pass) where+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 OutputableBndr (AmbiguousFieldOcc pass) where+instance p ~ GhcPass pass => OutputableBndr (AmbiguousFieldOcc p) where   pprInfixOcc  = pprInfixOcc . rdrNameAmbiguousFieldOcc   pprPrefixOcc = pprPrefixOcc . rdrNameAmbiguousFieldOcc  mkAmbiguousFieldOcc :: Located RdrName -> AmbiguousFieldOcc GhcPs-mkAmbiguousFieldOcc rdr = Unambiguous rdr PlaceHolder+mkAmbiguousFieldOcc rdr = Unambiguous noExt rdr -rdrNameAmbiguousFieldOcc :: AmbiguousFieldOcc pass -> RdrName-rdrNameAmbiguousFieldOcc (Unambiguous (L _ rdr) _) = rdr-rdrNameAmbiguousFieldOcc (Ambiguous   (L _ rdr) _) = 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 (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 pass -> AmbiguousFieldOcc pass-ambiguousFieldOcc (FieldOcc rdr sel) = Unambiguous rdr sel+ambiguousFieldOcc :: FieldOcc GhcTc -> AmbiguousFieldOcc GhcTc+ambiguousFieldOcc (FieldOcc sel rdr) = Unambiguous sel rdr+ambiguousFieldOcc (XFieldOcc _) = panic "ambiguousFieldOcc"  {- ************************************************************************@@ -1165,33 +1225,41 @@ ************************************************************************ -} -instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (HsType pass) where+instance (p ~ GhcPass pass, OutputableBndrId p) => Outputable (HsType p) where     ppr ty = pprHsType ty  instance Outputable HsTyLit where     ppr = ppr_tylit -instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (LHsQTyVars pass) where+instance (p ~ GhcPass pass, OutputableBndrId p)+       => Outputable (LHsQTyVars p) where     ppr (HsQTvs { hsq_explicit = tvs }) = interppSP tvs+    ppr (XLHsQTyVars x) = ppr x -instance (SourceTextX pass, OutputableBndrId pass)-       => Outputable (HsTyVarBndr pass) where-    ppr (UserTyVar n)     = ppr n-    ppr (KindedTyVar n k) = parens $ hsep [ppr n, dcolon, ppr k]+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 (Outputable thing) => Outputable (HsImplicitBndrs pass thing) where+instance (p ~ GhcPass pass,Outputable thing)+       => Outputable (HsImplicitBndrs p thing) where     ppr (HsIB { hsib_body = ty }) = ppr ty+    ppr (XHsImplicitBndrs x) = ppr x -instance (Outputable thing) => Outputable (HsWildCardBndrs pass thing) where+instance (p ~ GhcPass pass,Outputable thing)+       => Outputable (HsWildCardBndrs p thing) where     ppr (HsWC { hswc_body = ty }) = ppr ty+    ppr (XHsWildCardBndrs x) = ppr x -instance Outputable (HsWildCardInfo pass) where+instance Outputable HsWildCardInfo where     ppr (AnonWildCard _)  = char '_' -pprHsForAll :: (SourceTextX pass, OutputableBndrId pass)-            => [LHsTyVarBndr pass] -> LHsContext pass -> SDoc+pprAnonWildCard :: SDoc+pprAnonWildCard = char '_'++pprHsForAll :: (OutputableBndrId (GhcPass p))+            => [LHsTyVarBndr (GhcPass p)] -> LHsContext (GhcPass p) -> SDoc pprHsForAll = pprHsForAllExtra Nothing  -- | Version of 'pprHsForAll' that can also print an extra-constraints@@ -1201,44 +1269,43 @@ -- 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 :: (SourceTextX pass, OutputableBndrId pass)-                 => Maybe SrcSpan -> [LHsTyVarBndr pass] -> LHsContext pass-                 -> SDoc+pprHsForAllExtra :: (OutputableBndrId (GhcPass p))+                 => Maybe SrcSpan -> [LHsTyVarBndr (GhcPass p)]+                 -> LHsContext (GhcPass p) -> SDoc pprHsForAllExtra extra qtvs cxt   = pprHsForAllTvs qtvs <+> pprHsContextExtra show_extra (unLoc cxt)   where     show_extra = isJust extra -pprHsForAllTvs :: (SourceTextX pass, OutputableBndrId pass)-               => [LHsTyVarBndr pass] -> SDoc+pprHsForAllTvs :: (OutputableBndrId (GhcPass p))+               => [LHsTyVarBndr (GhcPass p)] -> SDoc pprHsForAllTvs qtvs   | null qtvs = whenPprDebug (forAllLit <+> dot)   | otherwise = forAllLit <+> interppSP qtvs <> dot -pprHsContext :: (SourceTextX pass, OutputableBndrId pass)-             => HsContext pass -> SDoc+pprHsContext :: (OutputableBndrId (GhcPass p)) => HsContext (GhcPass p) -> SDoc pprHsContext = maybe empty (<+> darrow) . pprHsContextMaybe -pprHsContextNoArrow :: (SourceTextX pass, OutputableBndrId pass)-                    => HsContext pass -> SDoc+pprHsContextNoArrow :: (OutputableBndrId (GhcPass p))+                    => HsContext (GhcPass p) -> SDoc pprHsContextNoArrow = fromMaybe empty . pprHsContextMaybe -pprHsContextMaybe :: (SourceTextX pass, OutputableBndrId pass)-                  => HsContext pass -> Maybe SDoc+pprHsContextMaybe :: (OutputableBndrId (GhcPass p))+                  => HsContext (GhcPass p) -> Maybe SDoc pprHsContextMaybe []         = Nothing pprHsContextMaybe [L _ pred] = Just $ ppr_mono_ty pred pprHsContextMaybe cxt        = Just $ parens (interpp'SP cxt)  -- For use in a HsQualTy, which always gets printed if it exists.-pprHsContextAlways :: (SourceTextX pass, OutputableBndrId pass)-                   => HsContext pass -> SDoc+pprHsContextAlways :: (OutputableBndrId (GhcPass p))+                   => HsContext (GhcPass p) -> SDoc pprHsContextAlways []  = parens empty <+> darrow pprHsContextAlways [L _ ty] = ppr_mono_ty ty <+> darrow pprHsContextAlways cxt = parens (interpp'SP cxt) <+> darrow  -- True <=> print an extra-constraints wildcard, e.g. @(Show a, _) =>@-pprHsContextExtra :: (SourceTextX pass, OutputableBndrId pass)-                  => Bool -> HsContext pass -> SDoc+pprHsContextExtra :: (OutputableBndrId (GhcPass p))+                  => Bool -> HsContext (GhcPass p) -> SDoc pprHsContextExtra show_extra ctxt   | not show_extra   = pprHsContext ctxt@@ -1249,13 +1316,14 @@   where     ctxt' = map ppr ctxt ++ [char '_'] -pprConDeclFields :: (SourceTextX pass, OutputableBndrId pass)-                 => [LConDeclField pass] -> SDoc+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)) @@ -1274,76 +1342,72 @@  -- Printing works more-or-less as for Types -pprHsType :: (SourceTextX pass, OutputableBndrId pass) => HsType pass -> SDoc+pprHsType :: (OutputableBndrId (GhcPass p)) => HsType (GhcPass p) -> SDoc pprHsType ty = ppr_mono_ty ty -ppr_mono_lty :: (SourceTextX pass, OutputableBndrId pass)-             => LHsType pass -> SDoc+ppr_mono_lty :: (OutputableBndrId (GhcPass p)) => LHsType (GhcPass p) -> SDoc ppr_mono_lty ty = ppr_mono_ty (unLoc ty) -ppr_mono_ty :: (SourceTextX pass, OutputableBndrId pass)-            => HsType pass -> SDoc+ppr_mono_ty :: (OutputableBndrId (GhcPass p)) => HsType (GhcPass p) -> SDoc ppr_mono_ty (HsForAllTy { hst_bndrs = tvs, hst_body = ty })   = sep [pprHsForAllTvs tvs, ppr_mono_lty ty]  ppr_mono_ty (HsQualTy { hst_ctxt = L _ ctxt, hst_body = ty })   = sep [pprHsContextAlways 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 NotPromoted (L _ name))= pprPrefixOcc name-ppr_mono_ty (HsTyVar Promoted (L _ name))+ppr_mono_ty (HsBangTy _ b ty)   = ppr b <> ppr_mono_lty ty+ppr_mono_ty (HsRecTy _ flds)      = pprConDeclFields flds+ppr_mono_ty (HsTyVar _ NotPromoted (L _ name))= pprPrefixOcc name+ppr_mono_ty (HsTyVar _ Promoted (L _ name))   = space <> quote (pprPrefixOcc name)                          -- We need a space before the ' above, so the parser                          -- does not attach it to the previous symbol-ppr_mono_ty (HsFunTy ty1 ty2)   = ppr_fun_ty ty1 ty2-ppr_mono_ty (HsTupleTy con tys) = tupleParens std_con (pprWithCommas ppr tys)+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) = parens (ppr_mono_lty ty <+> dcolon <+> ppr kind)-ppr_mono_ty (HsListTy ty)       = brackets (ppr_mono_lty ty)-ppr_mono_ty (HsPArrTy ty)       = paBrackets (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 (HsCoreTy ty)       = ppr ty-ppr_mono_ty (HsExplicitListTy Promoted _ tys)+ppr_mono_ty (HsSumTy _ tys)+  = tupleParens UnboxedTuple (pprWithBars ppr tys)+ppr_mono_ty (HsKindSig _ ty kind)+  = parens (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 _ Promoted tys)   = quote $ brackets (interpp'SP tys)-ppr_mono_ty (HsExplicitListTy NotPromoted _ tys)+ppr_mono_ty (HsExplicitListTy _ NotPromoted tys)   = brackets (interpp'SP tys) ppr_mono_ty (HsExplicitTupleTy _ tys) = quote $ parens (interpp'SP tys)-ppr_mono_ty (HsTyLit t)         = ppr_tylit t+ppr_mono_ty (HsTyLit _ t)       = ppr_tylit t ppr_mono_ty (HsWildCardTy {})   = char '_' -ppr_mono_ty (HsEqTy ty1 ty2)-  = ppr_mono_lty ty1 <+> char '~' <+> ppr_mono_lty ty2--ppr_mono_ty (HsAppsTy tys)-  = hsep (map (ppr_app_ty . unLoc) tys)+ppr_mono_ty (HsStarTy _ isUni)  = char (if isUni then '★' else '*') -ppr_mono_ty (HsAppTy fun_ty arg_ty)+ppr_mono_ty (HsAppTy _ fun_ty arg_ty)   = hsep [ppr_mono_lty fun_ty, ppr_mono_lty arg_ty] -ppr_mono_ty (HsOpTy ty1 (L _ op) ty2)+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)+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)+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 :: (SourceTextX pass, OutputableBndrId pass)-           => LHsType pass -> LHsType pass -> SDoc+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@@ -1351,37 +1415,43 @@     sep [p1, text "->" <+> p2]  ---------------------------ppr_app_ty :: (SourceTextX pass, OutputableBndrId pass)-           => HsAppType pass -> SDoc-ppr_app_ty (HsAppInfix (L _ n))                  = pprInfixOcc n-ppr_app_ty (HsAppPrefix (L _ (HsTyVar NotPromoted (L _ n))))-  = pprPrefixOcc n-ppr_app_ty (HsAppPrefix (L _ (HsTyVar Promoted  (L _ n))))-  = space <> quote (pprPrefixOcc n) -- We need a space before the ' above, so-                                    -- the parser does not attach it to the-                                    -- previous symbol-ppr_app_ty (HsAppPrefix ty) = ppr_mono_lty ty---------------------------- ppr_tylit :: HsTyLit -> SDoc ppr_tylit (HsNumTy _ i) = integer i ppr_tylit (HsStrTy _ s) = text (show s)  --- | Return 'True' for compound types that will need parentheses when used in--- an argument position.-isCompoundHsType :: LHsType pass -> Bool-isCompoundHsType (L _ HsAppTy{} ) = True-isCompoundHsType (L _ HsAppsTy{}) = True-isCompoundHsType (L _ HsEqTy{}  ) = True-isCompoundHsType (L _ HsFunTy{} ) = True-isCompoundHsType (L _ HsOpTy{}  ) = True-isCompoundHsType _                = False+-- | @'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{})         = False+    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 (HsOpTy{})            = p >= opPrec+    go (HsParTy{})           = False+    go (HsDocTy _ (L _ t) _) = go t+    go (XHsType{})           = False --- | @'parenthesizeCompoundHsType' ty@ checks if @'isCompoundHsType' ty@ is+-- | @'parenthesizeHsType' p ty@ checks if @'hsTypeNeedsParens' p ty@ is -- true, and if so, surrounds @ty@ with an 'HsParTy'. Otherwise, it simply -- returns @ty@.-parenthesizeCompoundHsType :: LHsType pass -> LHsType pass-parenthesizeCompoundHsType ty@(L loc _)-  | isCompoundHsType ty = L loc (HsParTy ty)-  | otherwise           = 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
hsSyn/HsUtils.hs view
@@ -20,7 +20,7 @@  module HsUtils(   -- Terms-  mkHsPar, mkHsApp, mkHsAppType, mkHsAppTypes, mkHsAppTypeOut, mkHsCaseAlt,+  mkHsPar, mkHsApp, mkHsAppType, mkHsAppTypes, mkHsCaseAlt,   mkSimpleMatch, unguardedGRHSs, unguardedRHS,   mkMatchGroup, mkMatch, mkPrefixFunRhs, mkHsLam, mkHsIf,   mkHsWrap, mkLHsWrap, mkHsWrapCo, mkHsWrapCoR, mkLHsWrapCo,@@ -50,7 +50,7 @@   -- Patterns   mkNPat, mkNPlusKPat, nlVarPat, nlLitPat, nlConVarPat, nlConVarPatName, nlConPat,   nlConPatName, nlInfixConPat, nlNullaryConPat, nlWildConPat, nlWildPat,-  nlWildPatName, nlWildPatId, nlTuplePat, mkParPat, nlParPat,+  nlWildPatName, nlTuplePat, mkParPat, nlParPat,   mkBigLHsVarTup, mkBigLHsTup, mkBigLHsVarPatTup, mkBigLHsPatTup,    -- Types@@ -63,14 +63,12 @@   mkLastStmt,   emptyTransStmt, mkGroupUsingStmt, mkGroupByUsingStmt,   emptyRecStmt, emptyRecStmtName, emptyRecStmtId, mkRecStmt,+  unitRecStmtTc,    -- Template Haskell   mkHsSpliceTy, mkHsSpliceE, mkHsSpliceTE, mkUntypedSplice,   mkHsQuasiQuote, unqualQuasiQuote, -  -- Flags-  noRebindableInfo,-   -- Collecting binders   isUnliftedHsBind, isBangedHsBind, @@ -84,7 +82,6 @@   hsLTyClDeclBinders, hsTyClForeignBinders,   hsPatSynSelectors, getPatSynBinds,   hsForeignDeclsBinders, hsGroupBinders, hsDataFamInstBinders,-  hsDataDefnBinders,    -- Collecting implicit binders   lStmtsImplicits, hsValBindsImplicits, lPatImplicits@@ -141,58 +138,60 @@ just attach noSrcSpan to everything. -} -mkHsPar :: LHsExpr id -> LHsExpr id-mkHsPar e = L (getLoc e) (HsPar e)+mkHsPar :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkHsPar e = L (getLoc e) (HsPar noExt e) -mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP id))-              -> [LPat id] -> Located (body id)-              -> LMatch id (Located (body id))+mkSimpleMatch :: HsMatchContext (NameOrRdrName (IdP (GhcPass p)))+              -> [LPat (GhcPass p)] -> Located (body (GhcPass p))+              -> LMatch (GhcPass p) (Located (body (GhcPass p))) mkSimpleMatch ctxt pats rhs   = L loc $-    Match { m_ctxt = ctxt, m_pats = pats+    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 id) -> GRHSs id (Located (body id))+unguardedGRHSs :: Located (body (GhcPass p))+               -> GRHSs (GhcPass p) (Located (body (GhcPass p))) unguardedGRHSs rhs@(L loc _)-  = GRHSs (unguardedRHS loc rhs) (noLoc emptyLocalBinds)+  = GRHSs noExt (unguardedRHS loc rhs) (noLoc emptyLocalBinds) -unguardedRHS :: SrcSpan -> Located (body id) -> [LGRHS id (Located (body id))]-unguardedRHS loc rhs = [L loc (GRHS [] rhs)]+unguardedRHS :: SrcSpan -> Located (body (GhcPass p))+             -> [LGRHS (GhcPass p) (Located (body (GhcPass p)))]+unguardedRHS loc rhs = [L loc (GRHS noExt [] rhs)] -mkMatchGroup :: (PostTc name Type ~ PlaceHolder)+mkMatchGroup :: (XMG name (Located (body name)) ~ NoExt)              => Origin -> [LMatch name (Located (body name))]              -> MatchGroup name (Located (body name))-mkMatchGroup origin matches = MG { mg_alts = mkLocatedList matches-                                 , mg_arg_tys = []-                                 , mg_res_ty = placeHolderType+mkMatchGroup origin matches = MG { mg_ext = noExt+                                 , mg_alts = mkLocatedList matches                                  , mg_origin = origin }  mkLocatedList ::  [Located a] -> Located [Located a] mkLocatedList [] = noLoc [] mkLocatedList ms = L (combineLocs (head ms) (last ms)) ms -mkHsApp :: LHsExpr name -> LHsExpr name -> LHsExpr name-mkHsApp e1 e2 = addCLoc e1 e2 (HsApp e1 e2)+mkHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+mkHsApp e1 e2 = addCLoc e1 e2 (HsApp noExt e1 e2) -mkHsAppType :: LHsExpr name -> LHsWcType name -> LHsExpr name-mkHsAppType e t = addCLoc e (hswc_body t) (HsAppType e t)+mkHsAppType :: (XAppTypeE (GhcPass id) ~ LHsWcType GhcRn)+            => LHsExpr (GhcPass id) -> LHsWcType GhcRn -> LHsExpr (GhcPass id)+mkHsAppType e t = addCLoc e t_body (HsAppType paren_wct e)+  where+    t_body    = hswc_body t+    paren_wct = t { hswc_body = parenthesizeHsType appPrec t_body } -mkHsAppTypes :: LHsExpr name -> [LHsWcType name] -> LHsExpr name+mkHsAppTypes :: LHsExpr GhcRn -> [LHsWcType GhcRn] -> LHsExpr GhcRn mkHsAppTypes = foldl mkHsAppType -mkHsAppTypeOut :: LHsExpr GhcTc -> LHsWcType GhcRn -> LHsExpr GhcTc-mkHsAppTypeOut e t = addCLoc e (hswc_body t) (HsAppTypeOut e t)- mkHsLam :: [LPat GhcPs] -> LHsExpr GhcPs -> LHsExpr GhcPs-mkHsLam pats body = mkHsPar (L (getLoc body) (HsLam matches))+mkHsLam pats body = mkHsPar (L (getLoc body) (HsLam noExt matches))   where     matches = mkMatchGroup Generated                            [mkSimpleMatch LambdaExpr pats' body]-    pats' = map parenthesizeCompoundPat pats+    pats' = map (parenthesizePat appPrec) pats  mkHsLams :: [TyVar] -> [EvVar] -> LHsExpr GhcTc -> LHsExpr GhcTc mkHsLams tyvars dicts expr = mkLHsWrap (mkWpTyLams tyvars@@ -200,39 +199,40 @@  -- |A simple case alternative with a single pattern, no binds, no guards; -- pre-typechecking-mkHsCaseAlt :: LPat id -> (Located (body id)) -> LMatch id (Located (body id))+mkHsCaseAlt :: LPat (GhcPass p) -> (Located (body (GhcPass p)))+            -> LMatch (GhcPass p) (Located (body (GhcPass p))) mkHsCaseAlt pat expr   = mkSimpleMatch CaseAlt [pat] expr -nlHsTyApp :: IdP name -> [Type] -> LHsExpr name-nlHsTyApp fun_id tys = noLoc (mkHsWrap (mkWpTyApps tys) (HsVar (noLoc fun_id)))+nlHsTyApp :: IdP (GhcPass id) -> [Type] -> LHsExpr (GhcPass id)+nlHsTyApp fun_id tys+  = noLoc (mkHsWrap (mkWpTyApps tys) (HsVar noExt (noLoc fun_id))) -nlHsTyApps :: IdP name -> [Type] -> [LHsExpr name] -> LHsExpr name+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 name -> LHsExpr name--- Wrap in parens if hsExprNeedsParens says it needs them+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@(L loc e) | hsExprNeedsParens e = L loc (HsPar le)-                      | otherwise           = le+mkLHsPar le@(L loc e) | hsExprNeedsParens appPrec e = L loc (HsPar noExt le)+                      | otherwise                   = le -mkParPat :: LPat name -> LPat name-mkParPat lp@(L loc p) | hsPatNeedsParens p = L loc (ParPat lp)-                      | otherwise          = lp+mkParPat :: LPat (GhcPass name) -> LPat (GhcPass name)+mkParPat lp@(L loc p) | patNeedsParens appPrec p = L loc (ParPat noExt lp)+                      | otherwise                = lp -nlParPat :: LPat name -> LPat name-nlParPat p = noLoc (ParPat p)+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 -> PostTc GhcPs Type-               -> HsOverLit GhcPs-mkHsFractional :: FractionalLit -> PostTc GhcPs Type -> HsOverLit GhcPs-mkHsIsString :: SourceText -> FastString -> PostTc GhcPs Type-             -> HsOverLit GhcPs+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@@ -241,135 +241,144 @@             -> Pat GhcPs mkNPlusKPat :: Located RdrName -> Located (HsOverLit GhcPs) -> Pat GhcPs -mkLastStmt :: SourceTextX idR-           => Located (bodyR idR) -> StmtLR idL idR (Located (bodyR idR))+mkLastStmt :: Located (bodyR (GhcPass idR))+           -> StmtLR (GhcPass idL) (GhcPass idR) (Located (bodyR (GhcPass idR))) mkBodyStmt :: Located (bodyR GhcPs)-           -> StmtLR idL GhcPs (Located (bodyR GhcPs))-mkBindStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder)-           => LPat idL -> Located (bodyR idR)-           -> StmtLR idL idR (Located (bodyR idR))+           -> 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 idL  GhcPs bodyR+emptyRecStmt     :: StmtLR (GhcPass idL) GhcPs bodyR emptyRecStmtName :: StmtLR GhcRn GhcRn bodyR emptyRecStmtId   :: StmtLR GhcTc GhcTc bodyR-mkRecStmt    :: [LStmtLR idL GhcPs bodyR] -> StmtLR idL GhcPs bodyR+mkRecStmt        :: [LStmtLR (GhcPass idL) GhcPs bodyR]+                 -> StmtLR (GhcPass idL) GhcPs bodyR  -mkHsIntegral     i  = OverLit (HsIntegral       i) noRebindableInfo noExpr-mkHsFractional   f  = OverLit (HsFractional     f) noRebindableInfo noExpr-mkHsIsString src s  = OverLit (HsIsString   src s) noRebindableInfo noExpr--noRebindableInfo :: PlaceHolder-noRebindableInfo = PlaceHolder -- Just another placeholder;+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 ctxt (mkLocatedList stmts) placeHolderType+mkHsDo ctxt stmts = HsDo noExt ctxt (mkLocatedList stmts) mkHsComp ctxt stmts expr = mkHsDo ctxt (stmts ++ [last_stmt])   where     last_stmt = L (getLoc expr) $ mkLastStmt expr -mkHsIf :: SourceTextX p => LHsExpr p -> LHsExpr p -> LHsExpr p -> HsExpr p-mkHsIf c a b = HsIf (Just noSyntaxExpr) c a b+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 lit neg noSyntaxExpr placeHolderType-mkNPlusKPat id lit = NPlusKPat id lit (unLoc lit) noSyntaxExpr noSyntaxExpr placeHolderType+mkNPat lit neg     = NPat noExt lit neg noSyntaxExpr+mkNPlusKPat id lit+  = NPlusKPat noExt id lit (unLoc lit) noSyntaxExpr noSyntaxExpr -mkTransformStmt    :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder)-                   => [ExprLStmt idL] -> LHsExpr idR-                   -> StmtLR idL idR (LHsExpr idL)-mkTransformByStmt  :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder)-                   => [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR-                   -> StmtLR idL idR (LHsExpr idL)-mkGroupUsingStmt   :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder)-                   => [ExprLStmt idL]                -> LHsExpr idR-                   -> StmtLR idL idR (LHsExpr idL)-mkGroupByUsingStmt :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder)-                   => [ExprLStmt idL] -> LHsExpr idR -> LHsExpr idR-                   -> StmtLR idL idR (LHsExpr idL)+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 :: (SourceTextX idR, PostTc idR Type ~ PlaceHolder)-               => StmtLR idL idR (LHsExpr idR)-emptyTransStmt = TransStmt { trS_form = panic "emptyTransStmt: form"+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_bind_arg_ty = PlaceHolder                            , 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 body False noSyntaxExpr-mkBodyStmt body     = BodyStmt body noSyntaxExpr noSyntaxExpr placeHolderType-mkBindStmt pat body = BindStmt pat body noSyntaxExpr noSyntaxExpr PlaceHolder-mkTcBindStmt pat body = BindStmt pat body noSyntaxExpr noSyntaxExpr unitTy+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. SourceTextX idR =>-                       PostTc idR Type -> StmtLR idL idR body+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_bind_ty = tyVal-     , recS_later_rets = []-     , recS_rec_rets = [], recS_ret_ty = tyVal }+     , recS_bind_fn = noSyntaxExpr+     , recS_ext = tyVal } -emptyRecStmt     = emptyRecStmt' placeHolderType-emptyRecStmtName = emptyRecStmt' placeHolderType-emptyRecStmtId   = emptyRecStmt' unitTy -- a panic might trigger during zonking+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 id -> IdP id -> LHsExpr id -> HsExpr id-mkHsOpApp e1 op e2 = OpApp e1 (noLoc (HsVar (noLoc op)))-                           (error "mkOpApp:fixity") e2+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 hasParen unqualSplice e+mkUntypedSplice hasParen e = HsUntypedSplice noExt hasParen unqualSplice e  mkHsSpliceE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs-mkHsSpliceE hasParen e = HsSpliceE (mkUntypedSplice hasParen e)+mkHsSpliceE hasParen e = HsSpliceE noExt (mkUntypedSplice hasParen e)  mkHsSpliceTE :: SpliceDecoration -> LHsExpr GhcPs -> HsExpr GhcPs-mkHsSpliceTE hasParen e = HsSpliceE (HsTypedSplice hasParen unqualSplice e)+mkHsSpliceTE hasParen e+  = HsSpliceE noExt (HsTypedSplice noExt hasParen unqualSplice e)  mkHsSpliceTy :: SpliceDecoration -> LHsExpr GhcPs -> HsType GhcPs-mkHsSpliceTy hasParen e-  = HsSpliceTy (HsUntypedSplice hasParen unqualSplice e) placeHolderKind+mkHsSpliceTy hasParen e = HsSpliceTy noExt+                      (HsUntypedSplice noExt hasParen unqualSplice e)  mkHsQuasiQuote :: RdrName -> SrcSpan -> FastString -> HsSplice GhcPs-mkHsQuasiQuote quoter span quote = HsQuasiQuote unqualSplice quoter span quote+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 :: SourceTextX p => String -> HsLit p-mkHsString s = HsString noSourceText (mkFastString s)+mkHsString :: String -> HsLit (GhcPass p)+mkHsString s = HsString NoSourceText (mkFastString s) -mkHsStringPrimLit :: SourceTextX p => FastString -> HsLit p+mkHsStringPrimLit :: FastString -> HsLit (GhcPass p) mkHsStringPrimLit fs-  = HsStringPrim noSourceText (fastStringToByteString fs)+  = HsStringPrim NoSourceText (fastStringToByteString fs)  --------------userHsLTyVarBndrs :: SrcSpan -> [Located (IdP name)] -> [LHsTyVarBndr name]+userHsLTyVarBndrs :: SrcSpan -> [Located (IdP (GhcPass p))]+                  -> [LHsTyVarBndr (GhcPass p)] -- Caller sets location-userHsLTyVarBndrs loc bndrs = [ L loc (UserTyVar v) | v <- bndrs ]+userHsLTyVarBndrs loc bndrs = [ L loc (UserTyVar noExt v) | v <- bndrs ] -userHsTyVarBndrs :: SrcSpan -> [IdP name] -> [LHsTyVarBndr name]+userHsTyVarBndrs :: SrcSpan -> [IdP (GhcPass p)] -> [LHsTyVarBndr (GhcPass p)] -- Caller sets location-userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar (L loc v)) | v <- bndrs ]+userHsTyVarBndrs loc bndrs = [ L loc (UserTyVar noExt (L loc v))+                             | v <- bndrs ]   {-@@ -380,29 +389,30 @@ ************************************************************************ -} -nlHsVar :: IdP id -> LHsExpr id-nlHsVar n = noLoc (HsVar (noLoc n))+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 (RealDataCon con))+nlHsDataCon con = noLoc (HsConLikeOut noExt (RealDataCon con)) -nlHsLit :: HsLit p -> LHsExpr p-nlHsLit n = noLoc (HsLit n)+nlHsLit :: HsLit (GhcPass p) -> LHsExpr (GhcPass p)+nlHsLit n = noLoc (HsLit noExt n) -nlHsIntLit :: HasDefaultX p => Integer -> LHsExpr p-nlHsIntLit n = noLoc (HsLit (HsInt def (mkIntegralLit n)))+nlHsIntLit :: Integer -> LHsExpr (GhcPass p)+nlHsIntLit n = noLoc (HsLit noExt (HsInt noExt (mkIntegralLit n))) -nlVarPat :: IdP id -> LPat id-nlVarPat n = noLoc (VarPat (noLoc n))+nlVarPat :: IdP (GhcPass id) -> LPat (GhcPass id)+nlVarPat n = noLoc (VarPat noExt (noLoc n)) -nlLitPat :: HsLit p -> LPat p-nlLitPat l = noLoc (LitPat l)+nlLitPat :: HsLit GhcPs -> LPat GhcPs+nlLitPat l = noLoc (LitPat noExt l) -nlHsApp :: LHsExpr id -> LHsExpr id -> LHsExpr id-nlHsApp f x = noLoc (HsApp f (mkLHsPar x))+nlHsApp :: LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id)+nlHsApp f x = noLoc (HsApp noExt f (mkLHsPar x)) -nlHsSyntaxApps :: SyntaxExpr id -> [LHsExpr id] -> LHsExpr id+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@@ -414,13 +424,14 @@   = mkLHsWrap res_wrap (foldl nlHsApp (noLoc fun) (zipWithEqual "nlHsSyntaxApps"                                                      mkLHsWrap arg_wraps args)) -nlHsApps :: IdP id -> [LHsExpr id] -> LHsExpr id+nlHsApps :: IdP (GhcPass id) -> [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) nlHsApps f xs = foldl nlHsApp (nlHsVar f) xs -nlHsVarApps :: IdP id -> [IdP id] -> LHsExpr id-nlHsVarApps f xs = noLoc (foldl mk (HsVar (noLoc f)) (map (HsVar . noLoc) 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 (noLoc f) (noLoc a)+                   mk f a = HsApp noExt (noLoc f) (noLoc a)  nlConVarPat :: RdrName -> [RdrName] -> LPat GhcPs nlConVarPat con vars = nlConPat con (map nlVarPat vars)@@ -428,16 +439,18 @@ nlConVarPatName :: Name -> [Name] -> LPat GhcRn nlConVarPatName con vars = nlConPatName con (map nlVarPat vars) -nlInfixConPat :: IdP id -> LPat id -> LPat id -> LPat id-nlInfixConPat con l r = noLoc (ConPatIn (noLoc con) (InfixCon l r))+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 parenthesizeCompoundPat 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 parenthesizeCompoundPat pats)))+  noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))  nlNullaryConPat :: IdP id -> LPat id nlNullaryConPat con = noLoc (ConPatIn (noLoc con) (PrefixCon []))@@ -448,50 +461,55 @@                                              nlWildPat)))  nlWildPat :: LPat GhcPs-nlWildPat  = noLoc (WildPat placeHolderType )  -- Pre-typechecking+nlWildPat  = noLoc (WildPat noExt )  -- Pre-typechecking  nlWildPatName :: LPat GhcRn-nlWildPatName  = noLoc (WildPat placeHolderType )  -- Pre-typechecking--nlWildPatId :: LPat GhcTc-nlWildPatId  = noLoc (WildPat placeHolderTypeTc )  -- Post-typechecking+nlWildPatName  = noLoc (WildPat noExt )  -- Pre-typechecking  nlHsDo :: HsStmtContext Name -> [LStmt GhcPs (LHsExpr GhcPs)]        -> LHsExpr GhcPs nlHsDo ctxt stmts = noLoc (mkHsDo ctxt stmts) -nlHsOpApp :: LHsExpr id -> IdP id -> LHsExpr id -> LHsExpr id+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 id -> LHsExpr id-nlHsIf   :: LHsExpr id -> LHsExpr id -> LHsExpr id -> LHsExpr id+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 (mkMatchGroup Generated [match]))-nlHsPar e              = noLoc (HsPar e)+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 Nothing cond true false)+nlHsIf cond true false = noLoc (HsIf noExt Nothing cond true false) -nlHsCase expr matches  = noLoc (HsCase expr (mkMatchGroup Generated matches))-nlList exprs           = noLoc (ExplicitList placeHolderType Nothing exprs)+nlHsCase expr matches+  = noLoc (HsCase noExt expr (mkMatchGroup Generated matches))+nlList exprs          = noLoc (ExplicitList noExt Nothing exprs) -nlHsAppTy :: LHsType name -> LHsType name -> LHsType name-nlHsTyVar :: IdP name                     -> LHsType name-nlHsFunTy :: LHsType name -> LHsType name -> LHsType name-nlHsParTy :: LHsType name                 -> LHsType name+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 f (parenthesizeCompoundHsType t))-nlHsTyVar x   = noLoc (HsTyVar NotPromoted (noLoc x))-nlHsFunTy a b = noLoc (HsFunTy a b)-nlHsParTy t   = noLoc (HsParTy t)+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)+                                     (parenthesize_fun_tail b))+  where+    parenthesize_fun_tail (L loc (HsFunTy ext ty1 ty2))+      = L loc (HsFunTy ext (parenthesizeHsType funPrec ty1)+                           (parenthesize_fun_tail ty2))+    parenthesize_fun_tail lty = lty+nlHsParTy t   = noLoc (HsParTy noExt t) -nlHsTyConApp :: IdP name -> [LHsType name] -> LHsType name+nlHsTyConApp :: IdP (GhcPass p) -> [LHsType (GhcPass p)] -> LHsType (GhcPass p) nlHsTyConApp tycon tys  = foldl nlHsAppTy (nlHsTyVar tycon) tys  {-@@ -499,37 +517,38 @@ types on the tuple. -} -mkLHsTupleExpr :: [LHsExpr a] -> LHsExpr a+mkLHsTupleExpr :: [LHsExpr (GhcPass a)] -> LHsExpr (GhcPass a) -- Makes a pre-typechecker boxed tuple, deals with 1 case mkLHsTupleExpr [e] = e-mkLHsTupleExpr es  = noLoc $ ExplicitTuple (map (noLoc . Present) es) Boxed+mkLHsTupleExpr es+  = noLoc $ ExplicitTuple noExt (map (noLoc . (Present noExt)) es) Boxed -mkLHsVarTuple :: [IdP a] -> LHsExpr a+mkLHsVarTuple :: [IdP (GhcPass a)] -> LHsExpr (GhcPass a) mkLHsVarTuple ids  = mkLHsTupleExpr (map nlHsVar ids) -nlTuplePat :: [LPat id] -> Boxity -> LPat id-nlTuplePat pats box = noLoc (TuplePat pats box [])+nlTuplePat :: [LPat GhcPs] -> Boxity -> LPat GhcPs+nlTuplePat pats box = noLoc (TuplePat noExt pats box)  missingTupArg :: HsTupArg GhcPs-missingTupArg = Missing placeHolderType+missingTupArg = Missing noExt -mkLHsPatTup :: [LPat id] -> LPat id-mkLHsPatTup []     = noLoc $ TuplePat [] Boxed []+mkLHsPatTup :: [LPat GhcRn] -> LPat GhcRn+mkLHsPatTup []     = noLoc $ TuplePat noExt [] Boxed mkLHsPatTup [lpat] = lpat-mkLHsPatTup lpats  = L (getLoc (head lpats)) $ TuplePat lpats Boxed []+mkLHsPatTup lpats  = L (getLoc (head lpats)) $ TuplePat noExt lpats Boxed  -- The Big equivalents for the source tuple expressions-mkBigLHsVarTup :: [IdP id] -> LHsExpr id+mkBigLHsVarTup :: [IdP (GhcPass id)] -> LHsExpr (GhcPass id) mkBigLHsVarTup ids = mkBigLHsTup (map nlHsVar ids) -mkBigLHsTup :: [LHsExpr id] -> LHsExpr id+mkBigLHsTup :: [LHsExpr (GhcPass id)] -> LHsExpr (GhcPass id) mkBigLHsTup = mkChunkified mkLHsTupleExpr  -- The Big equivalents for the source tuple patterns-mkBigLHsVarPatTup :: [IdP id] -> LPat id+mkBigLHsVarPatTup :: [IdP GhcRn] -> LPat GhcRn mkBigLHsVarPatTup bs = mkBigLHsPatTup (map nlVarPat bs) -mkBigLHsPatTup :: [LPat id] -> LPat id+mkBigLHsPatTup :: [LPat GhcRn] -> LPat GhcRn mkBigLHsPatTup = mkChunkified mkLHsPatTup  -- $big_tuples@@ -605,8 +624,8 @@    -- of which use this function   where     (gen_dm_sigs, ordinary_sigs) = partition is_gen_dm_sig sigs-    is_gen_dm_sig (L _ (ClassOpSig True _ _)) = True-    is_gen_dm_sig _                           = False+    is_gen_dm_sig (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@@ -619,8 +638,9 @@ mkClassOpSigs sigs   = map fiddle sigs   where-    fiddle (L loc (TypeSig nms ty)) = L loc (ClassOpSig False nms (dropWildCards ty))-    fiddle sig                      = sig+    fiddle (L loc (TypeSig _ nms ty))+      = L loc (ClassOpSig noExt False nms (dropWildCards ty))+    fiddle sig = sig  typeToLHsType :: Type -> LHsType GhcPs -- ^ Converting a Type to an HsType RdrName@@ -636,21 +656,25 @@       | 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 (HsNumTy noSourceText n)-    go (LitTy (StrTyLit s)) = noLoc $ HsTyLit (HsStrTy noSourceText s)+    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)       | any isInvisibleTyConBinder (tyConBinders tc)         -- We must produce an explicit kind signature here to make certain         -- programs kind-check. See Note [Kind signatures in typeToLHsType].-      = noLoc $ HsKindSig lhs_ty (go (typeKind ty))+      = noLoc $ HsKindSig NoExt lhs_ty (go (typeKind ty))       | otherwise = lhs_ty        where         lhs_ty = nlHsTyConApp (getRdrName tc) (map go args')@@ -662,7 +686,7 @@          -- so we must remove them here (Trac #8563)      go_tv :: TyVar -> LHsTyVarBndr GhcPs-    go_tv tv = noLoc $ KindedTyVar (noLoc (getRdrName tv))+    go_tv tv = noLoc $ KindedTyVar noExt (noLoc (getRdrName tv))                                    (go (tyVarKind tv))  {-@@ -679,7 +703,7 @@   instance Eq a => Eq (Glurp a) where     (==) = coerce @(Wat 'Proxy -> Wat 'Proxy -> Bool)                   @(Glurp a    -> Glurp a    -> Bool)-                  (==)+                  (==) :: Glurp a -> Glurp a -> Bool  (Where the visible type applications use types produced by typeToLHsType.) @@ -721,41 +745,41 @@ *                                                                      * ********************************************************************* -} -mkLHsWrap :: HsWrapper -> LHsExpr id -> LHsExpr id+mkLHsWrap :: HsWrapper -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) mkLHsWrap co_fn (L loc e) = L loc (mkHsWrap co_fn e)  -- Avoid (HsWrap co (HsWrap co' _)). -- See Note [Detecting forced eta expansion] in DsExpr-mkHsWrap :: HsWrapper -> HsExpr id -> HsExpr id+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 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 id -> HsExpr id+           -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) mkHsWrapCo co e = mkHsWrap (mkWpCastN co) e  mkHsWrapCoR :: TcCoercionR   -- A Representational coercion  a ~R b-            -> HsExpr id -> HsExpr id+            -> HsExpr (GhcPass id) -> HsExpr (GhcPass id) mkHsWrapCoR co e = mkHsWrap (mkWpCastR co) e -mkLHsWrapCo :: TcCoercionN -> LHsExpr id -> LHsExpr id+mkLHsWrapCo :: TcCoercionN -> LHsExpr (GhcPass id) -> LHsExpr (GhcPass id) mkLHsWrapCo co (L loc e) = L loc (mkHsWrapCo co e) -mkHsCmdWrap :: HsWrapper -> HsCmd id -> HsCmd id+mkHsCmdWrap :: HsWrapper -> HsCmd (GhcPass p) -> HsCmd (GhcPass p) mkHsCmdWrap w cmd | isIdHsWrapper w = cmd-                  | otherwise       = HsCmdWrap w cmd+                  | otherwise       = HsCmdWrap noExt w cmd -mkLHsCmdWrap :: HsWrapper -> LHsCmd id -> LHsCmd id+mkLHsCmdWrap :: HsWrapper -> LHsCmd (GhcPass p) -> LHsCmd (GhcPass p) mkLHsCmdWrap w (L loc c) = L loc (mkHsCmdWrap w c) -mkHsWrapPat :: HsWrapper -> Pat id -> Type -> Pat id+mkHsWrapPat :: HsWrapper -> Pat (GhcPass id) -> Type -> Pat (GhcPass id) mkHsWrapPat co_fn p ty | isIdHsWrapper co_fn = p-                       | otherwise           = CoPat co_fn p ty+                       | otherwise           = CoPat noExt co_fn p ty -mkHsWrapPatCo :: TcCoercionN -> Pat id -> Type -> Pat id+mkHsWrapPatCo :: TcCoercionN -> Pat (GhcPass id) -> Type -> Pat (GhcPass id) mkHsWrapPatCo co pat ty | isTcReflCo co = pat-                        | otherwise     = CoPat (mkWpCastN co) pat ty+                        | otherwise    = CoPat noExt (mkWpCastN co) pat ty  mkHsDictLet :: TcEvBinds -> LHsExpr GhcTc -> LHsExpr GhcTc mkHsDictLet ev_binds expr = mkLHsWrap (mkWpLet ev_binds) expr@@ -775,7 +799,7 @@ mkFunBind fn ms = FunBind { fun_id = fn                           , fun_matches = mkMatchGroup Generated ms                           , fun_co_fn = idHsWrapper-                          , bind_fvs = placeHolderNames+                          , fun_ext = noExt                           , fun_tick = [] }  mkTopFunBind :: Origin -> Located Name -> [LMatch GhcRn (LHsExpr GhcRn)]@@ -784,31 +808,32 @@ mkTopFunBind origin fn ms = FunBind { fun_id = fn                                     , fun_matches = mkMatchGroup origin ms                                     , fun_co_fn = idHsWrapper-                                    , bind_fvs = emptyNameSet -- NB: closed+                                    , 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 p -> LHsExpr p -> LHsBind p+mkVarBind :: IdP (GhcPass p) -> LHsExpr (GhcPass p) -> LHsBind (GhcPass p) mkVarBind var rhs = L (getLoc rhs) $-                    VarBind { var_id = var, var_rhs = rhs, var_inline = False }+                    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 psb+mkPatSynBind name details lpat dir = PatSynBind noExt psb   where-    psb = PSB{ psb_id = name+    psb = PSB{ psb_ext = noExt+             , psb_id = name              , psb_args = details              , psb_def = lpat-             , psb_dir = dir-             , psb_fvs = placeHolderNames }+             , 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 _ _ _) _ _ _)+isInfixFunBind (FunBind _ _ (MG _ matches _) _ _)   = any (isInfixMatch . unLoc) (unLoc matches) isInfixFunBind _ = False @@ -828,15 +853,18 @@                           , mc_strictness = NoSrcStrict }  -------------mkMatch :: HsMatchContext (NameOrRdrName (IdP p)) -> [LPat p] -> LHsExpr p-        -> Located (HsLocalBinds p) -> LMatch p (LHsExpr p)+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_ctxt  = ctxt+  = noLoc (Match { m_ext   = noExt+                 , m_ctxt  = ctxt                  , m_pats  = map paren pats-                 , m_grhss = GRHSs (unguardedRHS noSrcSpan expr) lbinds })+                 , m_grhss = GRHSs noExt (unguardedRHS noSrcSpan expr) lbinds })   where-    paren lp@(L l p) | hsPatNeedsParens p = L l (ParPat lp)-                     | otherwise          = lp+    paren lp@(L l p) | patNeedsParens appPrec p = L l (ParPat noExt lp)+                     | otherwise                = lp  {- ************************************************************************@@ -923,13 +951,16 @@ isBangedHsBind _   = False -collectLocalBinders :: HsLocalBindsLR idL idR -> [IdP idL]-collectLocalBinders (HsValBinds binds) = collectHsIdBinders binds+collectLocalBinders :: HsLocalBindsLR (GhcPass idL) (GhcPass idR)+                    -> [IdP (GhcPass idL)]+collectLocalBinders (HsValBinds _ binds) = collectHsIdBinders binds                                          -- No pattern synonyms here-collectLocalBinders (HsIPBinds _)      = []-collectLocalBinders EmptyLocalBinds    = []+collectLocalBinders (HsIPBinds {})      = []+collectLocalBinders (EmptyLocalBinds _) = []+collectLocalBinders (XHsLocalBindsLR _) = [] -collectHsIdBinders, collectHsValBinders :: HsValBindsLR idL idR -> [IdP idL]+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@@ -945,9 +976,11 @@ -- Same as collectHsBindsBinders, but works over a list of bindings collectHsBindListBinders = foldr (collect_bind False . unLoc) [] -collect_hs_val_binders :: Bool -> HsValBindsLR idL idR -> [IdP idL]-collect_hs_val_binders ps (ValBindsIn  binds _) = collect_binds     ps binds []-collect_hs_val_binders ps (ValBindsOut binds _) = collect_out_binds ps binds+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 p)] -> [IdP p] collect_out_binds ps = foldr (collect_binds ps . snd) []@@ -962,13 +995,15 @@ 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-        -- The only time we collect binders from a typechecked+         -- binding (hence see AbsBinds) is in zonking in TcHsSyn-collect_bind omitPatSyn (PatSynBind (PSB { psb_id = L _ ps })) acc+collect_bind omitPatSyn (PatSynBind _ (PSB { psb_id = L _ ps })) acc   | omitPatSyn                  = acc   | otherwise                   = ps : acc+collect_bind _ (PatSynBind _ (XPatSynBind _)) acc = acc+collect_bind _ (XHsBindsLR _) acc = acc -collectMethodBinders :: LHsBindsLR GhcPs idR -> [Located RdrName]+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@@ -977,26 +1012,35 @@        -- Someone else complains about non-FunBinds  ----------------- Statements ---------------------------collectLStmtsBinders :: [LStmtLR idL idR body] -> [IdP idL]+collectLStmtsBinders :: [LStmtLR (GhcPass idL) (GhcPass idR) body]+                     -> [IdP (GhcPass idL)] collectLStmtsBinders = concatMap collectLStmtBinders -collectStmtsBinders :: [StmtLR idL idR body] -> [IdP idL]+collectStmtsBinders :: [StmtLR (GhcPass idL) (GhcPass idR) body]+                    -> [IdP (GhcPass idL)] collectStmtsBinders = concatMap collectStmtBinders -collectLStmtBinders :: LStmtLR idL idR body -> [IdP idL]+collectLStmtBinders :: LStmtLR (GhcPass idL) (GhcPass idR) body+                    -> [IdP (GhcPass idL)] collectLStmtBinders = collectStmtBinders . unLoc -collectStmtBinders :: StmtLR idL idR body -> [IdP idL]+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 (L _ binds)) = collectLocalBinders binds-collectStmtBinders (BodyStmt {})         = []-collectStmtBinders (LastStmt {})         = []-collectStmtBinders (ParStmt xs _ _ _) = collectLStmtsBinders-                                      $ [s | ParStmtBlock ss _ _ <- xs, s <- ss]+collectStmtBinders (BindStmt _ pat _ _ _)  = collectPatBinders pat+collectStmtBinders (LetStmt _ (L _ binds)) = collectLocalBinders 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{} = []+collectStmtBinders (ApplicativeStmt _ args _) = concatMap collectArgBinders args+ where+  collectArgBinders (_, ApplicativeArgOne _ pat _ _) = collectPatBinders pat+  collectArgBinders (_, ApplicativeArgMany _ _ _ pat) = collectPatBinders pat+  collectArgBinders _ = []+collectStmtBinders XStmtLR{} = panic "collectStmtBinders"   ----------------- Patterns --------------------------@@ -1011,33 +1055,32 @@ collect_lpat (L _ pat) bndrs   = go pat   where-    go (VarPat (L _ var))         = var : bndrs+    go (VarPat _ (L _ var))       = var : bndrs     go (WildPat _)                = bndrs-    go (LazyPat pat)              = collect_lpat pat bndrs-    go (BangPat pat)              = collect_lpat pat bndrs-    go (AsPat (L _ a) pat)        = a : collect_lpat pat bndrs-    go (ViewPat _ pat _)          = collect_lpat pat bndrs-    go (ParPat  pat)              = collect_lpat pat bndrs+    go (LazyPat _ pat)            = collect_lpat pat bndrs+    go (BangPat _ pat)            = collect_lpat pat bndrs+    go (AsPat _ (L _ a) pat)      = 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 (PArrPat pats _)           = foldr collect_lpat bndrs pats-    go (TuplePat pats _ _)        = foldr collect_lpat bndrs pats-    go (SumPat 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 (L _ n) _ _ _ _ _)= n : bndrs+    go (LitPat _ _)                 = bndrs+    go (NPat {})                    = bndrs+    go (NPlusKPat _ (L _ n) _ _ _ _)= n : bndrs -    go (SigPatIn pat _)           = collect_lpat pat bndrs-    go (SigPatOut pat _)          = collect_lpat pat bndrs+    go (SigPat _ pat)               = collect_lpat pat bndrs -    go (SplicePat (HsSpliced _ (HsSplicedPat pat)))+    go (SplicePat _ (HsSpliced _ _ (HsSplicedPat pat)))                                   = go pat-    go (SplicePat _)              = bndrs-    go (CoPat _ 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@@ -1072,6 +1115,7 @@                           hs_fords = foreign_decls })   =  collectHsValBinders val_decls   ++ hsTyClForeignBinders tycl_decls foreign_decls+hsGroupBinders (XHsGroup {}) = panic "hsGroupBinders"  hsTyClForeignBinders :: [TyClGroup GhcRn]                      -> [LForeignDecl GhcRn]@@ -1086,7 +1130,7 @@          foldMap (foldMap hsLInstDeclBinders . group_instds) tycl_decls)   where     getSelectorNames :: ([Located Name], [LFieldOcc GhcRn]) -> [Name]-    getSelectorNames (ns, fs) = map unLoc ns ++ map (selectorFieldOcc.unLoc) fs+    getSelectorNames (ns, fs) = map unLoc ns ++ map (extFieldOcc . unLoc) fs  ------------------- hsLTyClDeclBinders :: Located (TyClDecl pass)@@ -1102,15 +1146,19 @@  hsLTyClDeclBinders (L loc (FamDecl { tcdFam = FamilyDecl { fdLName = L _ name } }))   = ([L loc name], [])+hsLTyClDeclBinders (L _ (FamDecl { tcdFam = XFamilyDecl _ }))+  = panic "hsLTyClDeclBinders" hsLTyClDeclBinders (L loc (SynDecl     { tcdLName = L _ name })) = ([L loc name], []) hsLTyClDeclBinders (L loc (ClassDecl   { tcdLName = L _ cls_name                                        , tcdSigs = sigs, tcdATs = ats }))   = (L loc cls_name :      [ L fam_loc fam_name | L fam_loc (FamilyDecl { fdLName = L _ fam_name }) <- ats ] ++-     [ L mem_loc mem_name | L mem_loc (ClassOpSig False ns _) <- sigs, L _ mem_name <- ns ]+     [ L mem_loc mem_name | L mem_loc (ClassOpSig _ False ns _) <- sigs+                          , L _ mem_name <- ns ]     , []) hsLTyClDeclBinders (L loc (DataDecl    { tcdLName = L _ name, tcdDataDefn = defn }))   = (\ (xs, ys) -> (L loc name : xs, ys)) $ hsDataDefnBinders defn+hsLTyClDeclBinders (L _ (XTyClDecl _)) = panic "hsLTyClDeclBinders"  ------------------- hsForeignDeclsBinders :: [LForeignDecl pass] -> [Located (IdP pass)]@@ -1121,32 +1169,36 @@   --------------------hsPatSynSelectors :: HsValBinds p -> [IdP p]+hsPatSynSelectors :: HsValBinds (GhcPass p) -> [IdP (GhcPass p)] -- Collects record pattern-synonym selectors only; the pattern synonym -- names are collected by collectHsValBinders.-hsPatSynSelectors (ValBindsIn _ _) = panic "hsPatSynSelectors"-hsPatSynSelectors (ValBindsOut binds _)+hsPatSynSelectors (ValBinds _ _ _) = panic "hsPatSynSelectors"+hsPatSynSelectors (XValBindsLR (NValBinds binds _))   = foldrBag addPatSynSelector [] . unionManyBags $ map snd binds  addPatSynSelector:: LHsBind p -> [IdP p] -> [IdP p] addPatSynSelector bind sels-  | L _ (PatSynBind (PSB { psb_args = RecCon as })) <- bind+  | L _ (PatSynBind _ (PSB { psb_args = RecCon as })) <- bind   = map (unLoc . recordPatSynSelectorId) as ++ sels   | otherwise = sels  getPatSynBinds :: [(RecFlag, LHsBinds id)] -> [PatSynBind id id] getPatSynBinds binds   = [ psb | (_, lbinds) <- binds-          , L _ (PatSynBind psb) <- bagToList lbinds ]+          , L _ (PatSynBind _ psb) <- bagToList lbinds ]  --------------------hsLInstDeclBinders :: LInstDecl pass-                   -> ([Located (IdP pass)], [LFieldOcc pass])+hsLInstDeclBinders :: LInstDecl (GhcPass p)+                   -> ([Located (IdP (GhcPass p))], [LFieldOcc (GhcPass p)]) hsLInstDeclBinders (L _ (ClsInstD { cid_inst = ClsInstDecl { cid_datafam_insts = dfis } }))   = foldMap (hsDataFamInstBinders . unLoc) dfis hsLInstDeclBinders (L _ (DataFamInstD { dfid_inst = fi }))   = hsDataFamInstBinders fi hsLInstDeclBinders (L _ (TyFamInstD {})) = mempty+hsLInstDeclBinders (L _ (ClsInstD _ (XClsInstDecl {})))+  = panic "hsLInstDeclBinders"+hsLInstDeclBinders (L _ (XInstDecl _))+  = panic "hsLInstDeclBinders"  ------------------- -- the SrcLoc returned are for the whole declarations, not just the names@@ -1156,6 +1208,11 @@                        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@@ -1163,58 +1220,54 @@ 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 :: ([LFieldOcc pass] -> [LFieldOcc 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-          case r of-             -- remove only the first occurrence of any seen field in order to-             -- avoid circumventing detection of duplicate fields (#9156)-             L loc (ConDeclGADT { con_names = names-                                , con_type = HsIB { hsib_body = res_ty}}) ->-               case tau of-                 L _ (HsFunTy-                      (L _ (HsAppsTy-                            [L _ (HsAppPrefix (L _ (HsRecTy flds)))])) _res_ty)-                         -> record_gadt flds-                 L _ (HsFunTy (L _ (HsRecTy flds)) _res_ty)-                         -> record_gadt flds+   -- 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+      = case r of+           -- remove only the first occurrence of any seen field in order to+           -- avoid circumventing detection of duplicate fields (#9156)+           L loc (ConDeclGADT { con_names = names, con_args = args })+             -> (map (L loc . unLoc) names ++ ns, flds ++ fs)+             where+                (remSeen', flds) = get_flds remSeen args+                (ns, fs) = go remSeen' rs -                 _other  -> (map (L loc . unLoc) names ++ ns, fs)-                            where (ns, fs) = go remSeen rs-               where-                 (_tvs, _cxt, tau) = splitLHsSigmaTy res_ty-                 record_gadt flds = (map (L loc . unLoc) names ++ ns, r' ++ fs)-                   where r' = remSeen (concatMap (cd_fld_names . unLoc) flds)-                         remSeen' = foldr (.) remSeen-                                        [deleteBy ((==) `on`-                                              unLoc . rdrNameFieldOcc . unLoc) v-                                        | v <- r']-                         (ns, fs) = go remSeen' rs+           L loc (ConDeclH98 { con_name = name, con_args = args })+             -> ([L loc (unLoc name)] ++ ns, flds ++ fs)+             where+                (remSeen', flds) = get_flds remSeen args+                (ns, fs) = go remSeen' rs -             L loc (ConDeclH98 { con_name = name-                               , con_details = RecCon flds }) ->-               ([L loc (unLoc name)] ++ ns, r' ++ fs)-                  where r' = remSeen (concatMap (cd_fld_names . unLoc)-                                                (unLoc flds))-                        remSeen'-                          = foldr (.) remSeen-                               [deleteBy ((==) `on`-                                   unLoc . rdrNameFieldOcc . unLoc) v | v <- r']-                        (ns, fs) = go remSeen' rs-             L loc (ConDeclH98 { con_name = name }) ->-                ([L loc (unLoc name)] ++ ns, fs)-                  where (ns, fs) = go remSeen rs+           L _ (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]@@ -1247,32 +1300,39 @@ warning the user when they don't use those names (#4404) -} -lStmtsImplicits :: [LStmtLR GhcRn idR (Located (body idR))] -> NameSet+lStmtsImplicits :: [LStmtLR GhcRn (GhcPass idR) (Located (body (GhcPass idR)))]+                -> NameSet lStmtsImplicits = hs_lstmts   where-    hs_lstmts :: [LStmtLR GhcRn idR (Located (body idR))] -> NameSet+    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 idR (Located (body 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-    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 :: 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 (HsValBinds _ val_binds) = hsValBindsImplicits val_binds+    hs_local_binds (HsIPBinds {})           = emptyNameSet+    hs_local_binds (EmptyLocalBinds _)      = emptyNameSet+    hs_local_binds (XHsLocalBindsLR _)      = emptyNameSet -hsValBindsImplicits :: HsValBindsLR GhcRn idR -> NameSet-hsValBindsImplicits (ValBindsOut binds _)+hsValBindsImplicits :: HsValBindsLR GhcRn (GhcPass idR) -> NameSet+hsValBindsImplicits (XValBindsLR (NValBinds binds _))   = foldr (unionNameSet . lhsBindsImplicits . snd) emptyNameSet binds-hsValBindsImplicits (ValBindsIn binds _)+hsValBindsImplicits (ValBinds _ binds _)   = lhsBindsImplicits binds  lhsBindsImplicits :: LHsBindsLR GhcRn idR -> NameSet@@ -1288,18 +1348,16 @@      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 (PArrPat pats _)    = hs_lpats pats-    hs_pat (TuplePat pats _ _) = hs_lpats pats+    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 (SigPatIn pat _)  = hs_lpat pat-    hs_pat (SigPatOut pat _) = hs_lpat pat-    hs_pat (CoPat _ pat _)   = hs_pat pat+    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
hsSyn/PlaceHolder.hs view
@@ -6,16 +6,11 @@  module PlaceHolder where -import GhcPrelude ()--import Type       ( Type )-import Outputable import Name import NameSet import RdrName import Var -import Data.Data hiding ( Fixity )   {-@@ -29,32 +24,11 @@ -- NB: These are intentionally open, allowing API consumers (like Haddock) -- to declare new instances --- | used as place holder in PostTc and PostRn values-data PlaceHolder = PlaceHolder-  deriving (Data)--placeHolderKind :: PlaceHolder-placeHolderKind = PlaceHolder--placeHolderFixity :: PlaceHolder-placeHolderFixity = PlaceHolder--placeHolderType :: PlaceHolder-placeHolderType = PlaceHolder--placeHolderTypeTc :: Type-placeHolderTypeTc = panic "Evaluated the place holder for a PostTcType"--placeHolderNames :: PlaceHolder-placeHolderNames = PlaceHolder- placeHolderNamesTc :: NameSet placeHolderNamesTc = emptyNameSet -placeHolderHsWrapper :: PlaceHolder-placeHolderHsWrapper = PlaceHolder- {-+TODO:AZ: remove this, and check if we still need all the UndecidableInstances  Note [Pass sensitive types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
iface/BinIface.hs view
@@ -15,7 +15,10 @@         getSymtabName,         getDictFastString,         CheckHiWay(..),-        TraceBinIFaceReading(..)+        TraceBinIFaceReading(..),+        getWithUserData,+        putWithUserData+     ) where  #include "HsVersions.h"@@ -134,7 +137,14 @@     wantedGot "Way" way_descr check_way     when (checkHiWay == CheckHiWay) $         errorOnMismatch "mismatched interface file ways" way_descr check_way+    getWithUserData ncu bh ++-- | This performs a get action after reading the dictionary and symbol+-- table. It is necessary to run this before trying to deserialise any+-- Names or FastStrings.+getWithUserData :: Binary a => NameCacheUpdater -> BinHandle -> IO a+getWithUserData ncu bh = do     -- Read the dictionary     -- The next word in the file is a pointer to where the dictionary is     -- (probably at the end of the file)@@ -179,6 +189,17 @@     let way_descr = getWayDescr dflags     put_  bh way_descr ++    putWithUserData (debugTraceMsg dflags 3) bh mod_iface+    -- And send the result to the file+    writeBinMem bh hi_path++-- | Put a piece of data with an initialised `UserData` field. This+-- is necessary if you want to serialise Names or FastStrings.+-- It also writes a symbol table and the dictionary.+-- This segment should be read using `getWithUserData`.+putWithUserData :: Binary a => (SDoc -> IO ()) -> BinHandle -> a -> IO ()+putWithUserData log_action bh payload = do     -- Remember where the dictionary pointer will go     dict_p_p <- tellBin bh     -- Placeholder for ptr to dictionary@@ -187,8 +208,7 @@     -- Remember where the symbol table pointer will go     symtab_p_p <- tellBin bh     put_ bh symtab_p_p--    -- Make some intial state+    -- Make some initial state     symtab_next <- newFastMutInt     writeFastMutInt symtab_next 0     symtab_map <- newIORef emptyUFM@@ -206,7 +226,7 @@     bh <- return $ setUserData bh $ newWriteState (putName bin_dict bin_symtab)                                                   (putName bin_dict bin_symtab)                                                   (putFastString bin_dict)-    put_ bh mod_iface+    put_ bh payload      -- Write the symtab pointer at the front of the file     symtab_p <- tellBin bh        -- This is where the symtab will start@@ -217,13 +237,13 @@     symtab_next <- readFastMutInt symtab_next     symtab_map  <- readIORef symtab_map     putSymbolTable bh symtab_next symtab_map-    debugTraceMsg dflags 3 (text "writeBinIface:" <+> int symtab_next+    log_action (text "writeBinIface:" <+> int symtab_next                                 <+> text "Names")      -- NB. write the dictionary after the symbol table, because     -- writing the symbol table may create more dictionary entries. -    -- Write the dictionary pointer at the fornt of the file+    -- Write the dictionary pointer at the front of the file     dict_p <- tellBin bh          -- This is where the dictionary will start     putAt bh dict_p_p dict_p      -- Fill in the placeholder     seekBin bh dict_p             -- Seek back to the end of the file@@ -232,11 +252,10 @@     dict_next <- readFastMutInt dict_next_ref     dict_map  <- readIORef dict_map_ref     putDictionary bh dict_next dict_map-    debugTraceMsg dflags 3 (text "writeBinIface:" <+> int dict_next+    log_action (text "writeBinIface:" <+> int dict_next                                 <+> text "dict entries") -    -- And send the result to the file-    writeBinMem bh hi_path+  -- | Initial ram buffer to allocate for writing interface files initBinMemSize :: Int
iface/BuildTyCl.hs view
@@ -8,8 +8,8 @@ module BuildTyCl (         buildDataCon,         buildPatSyn,-        TcMethInfo, buildClass,-        mkNewTyConRhs, mkDataTyConRhs,+        TcMethInfo, MethInfo, buildClass,+        mkNewTyConRhs,         newImplicitBinder, newTyConRepName     ) where @@ -27,6 +27,7 @@ import VarSet import BasicTypes import Name+import NameEnv import MkId import Class import TyCon@@ -41,20 +42,7 @@ import Util import Outputable -mkDataTyConRhs :: [DataCon] -> AlgTyConRhs-mkDataTyConRhs cons-  = DataTyCon {-        data_cons = cons,-        is_enum = not (null cons) && all is_enum_con cons-                  -- See Note [Enumeration types] in TyCon-    }-  where-    is_enum_con con-       | (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res)-           <- dataConFullSig con-       = null ex_tvs && null eq_spec && null theta && null arg_tys - mkNewTyConRhs :: Name -> TyCon -> DataCon -> TcRnIf m n AlgTyConRhs -- ^ Monadic because it makes a Name for the coercion TyCon --   We pass the Name of the parent TyCon, as well as the TyCon itself,@@ -116,17 +104,21 @@            -> [TyVar]                  -- Existentials            -> [TyVarBinder]            -- User-written 'TyVarBinder's            -> [EqSpec]                 -- Equality spec-           -> ThetaType                -- Does not include the "stupid theta"+           -> KnotTied ThetaType       -- Does not include the "stupid theta"                                        -- or the GADT equalities-           -> [Type] -> Type           -- Argument and result types-           -> TyCon                    -- Rep tycon+           -> [KnotTied Type]          -- Arguments+           -> KnotTied Type            -- Result types+           -> KnotTied TyCon           -- Rep tycon+           -> NameEnv ConTag           -- Maps the Name of each DataCon to its+                                       -- ConTag            -> TcRnIf m n DataCon -- A wrapper for DataCon.mkDataCon that --   a) makes the worker Id --   b) makes the wrapper Id if necessary, including --      allocating its unique (hence monadic)-buildDataCon fam_envs src_name declared_infix prom_info src_bangs impl_bangs field_lbls-             univ_tvs ex_tvs user_tvbs eq_spec ctxt arg_tys res_ty rep_tycon+buildDataCon fam_envs src_name declared_infix prom_info src_bangs impl_bangs+             field_lbls univ_tvs ex_tvs user_tvbs eq_spec ctxt arg_tys res_ty+             rep_tycon tag_map   = do  { wrap_name <- newImplicitBinder src_name mkDataConWrapperOcc         ; work_name <- newImplicitBinder src_name mkDataConWorkerOcc         -- This last one takes the name of the data constructor in the source@@ -137,10 +129,12 @@         ; us <- newUniqueSupply         ; dflags <- getDynFlags         ; let stupid_ctxt = mkDataConStupidTheta rep_tycon arg_tys univ_tvs+              tag = lookupNameEnv_NF tag_map src_name+              -- See Note [Constructor tag allocation], fixes #14657               data_con = mkDataCon src_name declared_infix prom_info                                    src_bangs field_lbls                                    univ_tvs ex_tvs user_tvbs eq_spec ctxt-                                   arg_tys res_ty NoRRI rep_tycon+                                   arg_tys res_ty NoRRI rep_tycon tag                                    stupid_ctxt dc_wrk dc_rep               dc_wrk = mkDataConWorkId work_name data_con               dc_rep = initUs_ us (mkDataConRep dflags fam_envs wrap_name@@ -220,7 +214,8 @@   -------------------------------------------------------type TcMethInfo     -- A temporary intermediate, to communicate+type TcMethInfo = MethInfo  -- this variant needs zonking+type MethInfo       -- A temporary intermediate, to communicate                     -- between tcClassSigs and buildClass.   = ( Name   -- Name of the class op     , Type   -- Type of the class op@@ -244,7 +239,7 @@            -> [FunDep TyVar]               -- Functional dependencies            -- Super classes, associated types, method info, minimal complete def.            -- This is Nothing if the class is abstract.-           -> Maybe (ThetaType, [ClassATItem], [TcMethInfo], ClassMinimalDef)+           -> Maybe (KnotTied ThetaType, [ClassATItem], [KnotTied MethInfo], ClassMinimalDef)            -> TcRnIf m n Class  buildClass tycon_name binders roles fds Nothing@@ -320,6 +315,7 @@                                    arg_tys                                    (mkTyConApp rec_tycon (mkTyVarTys univ_tvs))                                    rec_tycon+                                   (mkTyConTagMap rec_tycon)          ; rhs <- case () of                   _ | use_newtype
iface/FlagChecker.hs view
@@ -46,8 +46,11 @@                 map fromEnum $ EnumSet.toList extensionFlags)          -- -I, -D and -U flags affect CPP-        cpp = (map normalise includePaths, opt_P dflags ++ picPOpts dflags)+        cpp = ( map normalise $ flattenIncludes includePaths             -- normalise: eliminate spurious differences due to "./foo" vs "foo"+              , picPOpts dflags+              , opt_P_signature dflags)+            -- See Note [Repeated -optP hashing]          -- Note [path flags and recompilation]         paths = [ hcSuf ]@@ -142,4 +145,37 @@  The way we accomplish this is to leave the optimization and HPC options out of the flag hash, hashing them separately.+-}++{- Note [Repeated -optP hashing]+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++We invoke fingerprintDynFlags for each compiled module to include+the hash of relevant DynFlags in the resulting interface file.+-optP (preprocessor) flags are part of that hash.+-optP flags can come from multiple places:++  1. -optP flags directly passed on command line.+  2. -optP flags implied by other flags. Eg. -DPROFILING implied by -prof.+  3. -optP flags added with {-# OPTIONS -optP-D__F__ #-} in a file.++When compiling many modules at once with many -optP command line arguments+the work of hashing -optP flags would be repeated. This can get expensive+and as noted on #14697 it can take 7% of time and 14% of allocations on+a real codebase.++The obvious solution is to cache the hash of -optP flags per GHC invocation.+However, one has to be careful there, as the flags that were added in 3. way+have to be accounted for.++The current strategy is as follows:++  1. Lazily compute the hash of sOpt_p in sOpt_P_fingerprint whenever sOpt_p+     is modified. This serves dual purpose. It ensures correctness for when+     we add per file -optP flags and lets us save work for when we don't.+  2. When computing the fingerprint in fingerprintDynFlags use the cached+     value *and* fingerprint the additional implied (see 2. above) -optP flags.+     This is relatively cheap and saves the headache of fingerprinting all+     the -optP flags and tracking all the places that could invalidate the+     cache. -}
iface/IfaceEnv.hs view
@@ -6,7 +6,7 @@         newGlobalBinder, newInteractiveBinder,         externaliseName,         lookupIfaceTop,-        lookupOrig, lookupOrigNameCache, extendNameCache,+        lookupOrig, lookupOrigIO, lookupOrigNameCache, extendNameCache,         newIfaceName, newIfaceNames,         extendIfaceIdEnv, extendIfaceTyVarEnv,         tcIfaceLclId, tcIfaceTyVar, lookupIfaceVar,@@ -16,7 +16,7 @@         ifaceExportNames,          -- Name-cache stuff-        allocateGlobalBinder, updNameCache,+        allocateGlobalBinder, updNameCacheTc,         mkNameCacheUpdater, NameCacheUpdater(..),    ) where @@ -61,8 +61,7 @@ -- moment when we know its Module and SrcLoc in their full glory  newGlobalBinder mod occ loc-  = do { mod `seq` occ `seq` return ()    -- See notes with lookupOrig-       ; name <- updNameCache $ \name_cache ->+  = do { name <- updNameCacheTc mod occ $ \name_cache ->                  allocateGlobalBinder name_cache mod occ loc        ; traceIf (text "newGlobalBinder" <+>                   (vcat [ ppr mod <+> ppr occ <+> ppr loc, ppr name]))@@ -73,7 +72,7 @@ -- from the interactive context newInteractiveBinder hsc_env occ loc  = do { let mod = icInteractiveModule (hsc_IC hsc_env)-       ; updNameCacheIO hsc_env $ \name_cache ->+       ; updNameCacheIO hsc_env mod occ $ \name_cache ->          allocateGlobalBinder name_cache mod occ loc }  allocateGlobalBinder@@ -130,12 +129,31 @@  mkNameCacheUpdater :: TcRnIf a b NameCacheUpdater mkNameCacheUpdater = do { hsc_env <- getTopEnv-                        ; return (NCU (updNameCacheIO hsc_env)) }+                        ; return (NCU (updNameCache hsc_env)) } -updNameCache :: (NameCache -> (NameCache, c)) -> TcRnIf a b c-updNameCache upd_fn = do { hsc_env <- getTopEnv-                         ; liftIO $ updNameCacheIO hsc_env upd_fn }+updNameCacheTc :: Module -> OccName -> (NameCache -> (NameCache, c))+               -> TcRnIf a b c+updNameCacheTc mod occ upd_fn = do {+    hsc_env <- getTopEnv+  ; liftIO $ updNameCacheIO hsc_env mod occ upd_fn } ++updNameCacheIO ::  HscEnv -> Module -> OccName+               -> (NameCache -> (NameCache, c))+               -> IO c+updNameCacheIO hsc_env mod occ upd_fn = do {++    -- First ensure that mod and occ are evaluated+    -- If not, chaos can ensue:+    --      we read the name-cache+    --      then pull on mod (say)+    --      which does some stuff that modifies the name cache+    -- This did happen, with tycon_mod in TcIface.tcIfaceAlt (DataAlt..)++    mod `seq` occ `seq` return ()+  ; updNameCache hsc_env upd_fn }++ {- ************************************************************************ *                                                                      *@@ -149,27 +167,32 @@ -- and 'Module' is simply that of the 'ModIface' you are typechecking. lookupOrig :: Module -> OccName -> TcRnIf a b Name lookupOrig mod occ-  = do  {       -- First ensure that mod and occ are evaluated-                -- If not, chaos can ensue:-                --      we read the name-cache-                --      then pull on mod (say)-                --      which does some stuff that modifies the name cache-                -- This did happen, with tycon_mod in TcIface.tcIfaceAlt (DataAlt..)-          mod `seq` occ `seq` return ()-        ; traceIf (text "lookup_orig" <+> ppr mod <+> ppr occ)+  = do  { traceIf (text "lookup_orig" <+> ppr mod <+> ppr occ) -        ; updNameCache $ \name_cache ->-          case lookupOrigNameCache (nsNames name_cache) mod occ of {-              Just name -> (name_cache, name);-              Nothing   ->-              case takeUniqFromSupply (nsUniqs name_cache) of {-              (uniq, us) ->-                  let-                    name      = mkExternalName uniq mod occ noSrcSpan-                    new_cache = extendNameCache (nsNames name_cache) mod occ name-                  in (name_cache{ nsUniqs = us, nsNames = new_cache }, name)-    }}}+        ; updNameCacheTc mod occ $ lookupNameCache mod occ } +lookupOrigIO :: HscEnv -> Module -> OccName -> IO Name+lookupOrigIO hsc_env mod occ+  = updNameCacheIO hsc_env mod occ $ lookupNameCache mod occ++lookupNameCache :: Module -> OccName -> NameCache -> (NameCache, Name)+-- Lookup up the (Module,OccName) in the NameCache+-- If you find it, return it; if not, allocate a fresh original name and extend+-- the NameCache.+-- Reason: this may the first occurrence of (say) Foo.bar we have encountered.+-- If we need to explore its value we will load Foo.hi; but meanwhile all we+-- need is a Name for it.+lookupNameCache mod occ name_cache =+  case lookupOrigNameCache (nsNames name_cache) mod occ of {+    Just name -> (name_cache, name);+    Nothing   ->+        case takeUniqFromSupply (nsUniqs name_cache) of {+          (uniq, us) ->+              let+                name      = mkExternalName uniq mod occ noSrcSpan+                new_cache = extendNameCache (nsNames name_cache) mod occ name+              in (name_cache{ nsUniqs = us, nsNames = new_cache }, name) }}+ externaliseName :: Module -> Name -> TcRnIf m n Name -- Take an Internal Name and make it an External one, -- with the same unique@@ -178,7 +201,7 @@              loc = nameSrcSpan name              uniq = nameUnique name        ; occ `seq` return ()  -- c.f. seq in newGlobalBinder-       ; updNameCache $ \ ns ->+       ; updNameCacheTc mod occ $ \ ns ->          let name' = mkExternalName uniq mod occ loc              ns'   = ns { nsNames = extendNameCache (nsNames ns) mod occ name' }          in (ns', name') }
iface/IfaceSyn.hs view
@@ -862,11 +862,13 @@   = sdocWithDynFlags mk_msg   where     mk_msg dflags-      = hsep [ text "pattern", pprPrefixOcc name, dcolon-             , univ_msg, pprIfaceContextArr req_ctxt-             , ppWhen insert_empty_ctxt $ parens empty <+> darrow-             , ex_msg, pprIfaceContextArr prov_ctxt-             , pprIfaceType $ foldr IfaceFunTy pat_ty arg_tys]+      = hang (text "pattern" <+> pprPrefixOcc name)+           2 (dcolon <+> sep [univ_msg+                             , pprIfaceContextArr req_ctxt+                             , ppWhen insert_empty_ctxt $ parens empty <+> darrow+                             , ex_msg+                             , pprIfaceContextArr prov_ctxt+                             , pprIfaceType $ foldr IfaceFunTy pat_ty arg_tys ])       where         univ_msg = pprUserIfaceForAll univ_bndrs         ex_msg   = pprUserIfaceForAll ex_bndrs@@ -951,7 +953,7 @@ pprIfaceTyConParent (IfDataInstance _ tc tys)   = sdocWithDynFlags $ \dflags ->     let ftys = stripInvisArgs dflags tys-    in pprIfaceTypeApp TopPrec tc ftys+    in pprIfaceTypeApp topPrec tc ftys  pprIfaceDeclHead :: IfaceContext -> ShowSub -> Name                  -> [IfaceTyConBinder]   -- of the tycon, for invisible-suppression
iface/IfaceType.hs view
@@ -52,7 +52,9 @@  import GhcPrelude -import {-# SOURCE #-} TysWiredIn ( liftedRepDataConTyCon )+import {-# SOURCE #-} TysWiredIn ( coercibleTyCon, heqTyCon+                                 , liftedRepDataConTyCon )+import {-# SOURCE #-} TyCoRep    ( isRuntimeRepTy )  import DynFlags import TyCon hiding ( pprPromotionQuote )@@ -219,27 +221,56 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GHC has several varieties of type equality (see Note [The equality types story] in TysPrim for details).  In an effort to avoid confusing users, we suppress-the differences during "normal" pretty printing.  Specifically we display them-like this:+the differences during pretty printing unless certain flags are enabled.+Here is how each equality predicate* is printed in homogeneous and+heterogeneous contexts, depending on which combination of the+-fprint-explicit-kinds and -fprint-equality-relations flags is used: - Predicate                         Pretty-printed as-                          Homogeneous case        Heterogeneous case- ----------------        -----------------        -------------------- (~)    eqTyCon                 ~                  N/A- (~~)   heqTyCon                ~                  ~~- (~#)   eqPrimTyCon             ~#                 ~~- (~R#)  eqReprPrimTyCon         Coercible          Coercible+---------------------------------------------------------------------------------------+|         Predicate             |        Neither flag        | -fprint-explicit-kinds |+|-------------------------------|----------------------------|------------------------|+| a ~ b         (homogeneous)   |        a ~ b               | (a :: *) ~  (b :: *)   |+| a ~~ b,       homogeneously   |        a ~ b               | (a :: *) ~  (b :: *)   |+| a ~~ b,       heterogeneously |        a ~~ c              | (a :: *) ~~ (c :: k)   |+| a ~# b,       homogeneously   |        a ~ b               | (a :: *) ~  (b :: *)   |+| a ~# b,       heterogeneously |        a ~~ c              | (a :: *) ~~ (c :: k)   |+| Coercible a b (homogeneous)   |        Coercible a b       | Coercible * a b        |+| a ~R# b,      homogeneously   |        Coercible a b       | Coercible * a b        |+| a ~R# b,      heterogeneously |        a ~R# b             | (a :: *) ~R# (c :: k)  |+|-------------------------------|----------------------------|------------------------|+|         Predicate             | -fprint-equality-relations |      Both flags        |+|-------------------------------|----------------------------|------------------------|+| a ~ b         (homogeneous)   |        a ~  b              | (a :: *) ~  (b :: *)   |+| a ~~ b,       homogeneously   |        a ~~ b              | (a :: *) ~~ (b :: *)   |+| a ~~ b,       heterogeneously |        a ~~ c              | (a :: *) ~~ (c :: k)   |+| a ~# b,       homogeneously   |        a ~# b              | (a :: *) ~# (b :: *)   |+| a ~# b,       heterogeneously |        a ~# c              | (a :: *) ~# (c :: k)   |+| Coercible a b (homogeneous)   |        Coercible a b       | Coercible * a b        |+| a ~R# b,      homogeneously   |        a ~R# b             | (a :: *) ~R# (b :: *)  |+| a ~R# b,      heterogeneously |        a ~R# b             | (a :: *) ~R# (c :: k)  |+--------------------------------------------------------------------------------------- -By "homogeneeous case" we mean cases where a hetero-kinded equality-(all but the first above) is actually applied to two identical kinds.-Unfortunately, determining this from an IfaceType isn't possible since-we can't see through type synonyms. Consequently, we need to record-whether this particular application is homogeneous in IfaceTyConSort-for the purposes of pretty-printing.+(* There is no heterogeneous, representational, lifted equality counterpart+to (~~). There could be, but there seems to be no use for it.) -All this suppresses information. To get the ground truth, use -dppr-debug-(see 'print_eqs' in 'ppr_equality').+This table adheres to the following rules: +A. With -fprint-equality-relations, print the true equality relation.+B. Without -fprint-equality-relations:+     i. If the equality is representational and homogeneous, use Coercible.+    ii. Otherwise, if the equality is representational, use ~R#.+   iii. If the equality is nominal and homogeneous, use ~.+    iv. Otherwise, if the equality is nominal, use ~~.+C. With -fprint-explicit-kinds, print kinds on both sides of an infix operator,+   as above; or print the kind with Coercible.+D. Without -fprint-explicit-kinds, don't print kinds.++A hetero-kinded equality is used homogeneously when it is applied to two+identical kinds. Unfortunately, determining this from an IfaceType isn't+possible since we can't see through type synonyms. Consequently, we need to+record whether this particular application is homogeneous in IfaceTyConSort+for the purposes of pretty-printing.+ See Note [The equality types story] in TysPrim. -} @@ -257,6 +288,10 @@   | IfaceForAllCo     IfaceTvBndr IfaceCoercion IfaceCoercion   | IfaceCoVarCo      IfLclName   | IfaceAxiomInstCo  IfExtName BranchIndex [IfaceCoercion]+  | IfaceAxiomRuleCo  IfLclName [IfaceCoercion]+       -- There are only a fixed number of CoAxiomRules, so it suffices+       -- to use an IfaceLclName to distinguish them.+       -- See Note [Adding built-in type families] in TcTypeNats   | IfaceUnivCo       IfaceUnivCoProv Role IfaceType IfaceType   | IfaceSymCo        IfaceCoercion   | IfaceTransCo      IfaceCoercion IfaceCoercion@@ -266,7 +301,6 @@   | IfaceCoherenceCo  IfaceCoercion IfaceCoercion   | IfaceKindCo       IfaceCoercion   | IfaceSubCo        IfaceCoercion-  | IfaceAxiomRuleCo  IfLclName [IfaceCoercion]   | IfaceFreeCoVar    CoVar    -- See Note [Free tyvars in IfaceType]   | IfaceHoleCo       CoVar    -- ^ See Note [Holes in IfaceCoercion] @@ -308,8 +342,23 @@  splitIfaceSigmaTy :: IfaceType -> ([IfaceForAllBndr], [IfacePredType], IfaceType) -- Mainly for printing purposes+--+-- Here we split nested IfaceSigmaTy properly.+--+-- @+-- forall t. T t => forall m a b. M m => (a -> m b) -> t a -> m (t b)+-- @+--+-- If you called @splitIfaceSigmaTy@ on this type:+--+-- @+-- ([t, m, a, b], [T t, M m], (a -> m b) -> t a -> m (t b))+-- @ splitIfaceSigmaTy ty-  = (bndrs, theta, tau)+  = case (bndrs, theta) of+      ([], []) -> (bndrs, theta, tau)+      _        -> let (bndrs', theta', tau') = splitIfaceSigmaTy tau+                   in (bndrs ++ bndrs', theta ++ theta', tau')   where     (bndrs, rho)   = split_foralls ty     (theta, tau)   = split_rho rho@@ -464,8 +513,13 @@     where       suppress_invis c         = case c of+            ITC_Nil        -> ITC_Nil             ITC_Invis _ ts -> suppress_invis ts-            _ -> c+            ITC_Vis   t ts -> ITC_Vis t $ suppress_invis ts+              -- Keep recursing through the remainder of the arguments, as it's+              -- possible that there are remaining invisible ones.+              -- See the "In type declarations" section of Note [TyVarBndrs,+              -- TyVarBinders, TyConBinders, and visibility] in TyCoRep.  tcArgsIfaceTypes :: IfaceTcArgs -> [IfaceType] tcArgsIfaceTypes ITC_Nil = []@@ -512,15 +566,15 @@     then yes     else no -pprIfaceInfixApp :: TyPrec -> SDoc -> SDoc -> SDoc -> SDoc+pprIfaceInfixApp :: PprPrec -> SDoc -> SDoc -> SDoc -> SDoc pprIfaceInfixApp ctxt_prec pp_tc pp_ty1 pp_ty2-  = maybeParen ctxt_prec TyOpPrec $+  = maybeParen ctxt_prec opPrec $     sep [pp_ty1, pp_tc <+> pp_ty2] -pprIfacePrefixApp :: TyPrec -> SDoc -> [SDoc] -> SDoc+pprIfacePrefixApp :: PprPrec -> SDoc -> [SDoc] -> SDoc pprIfacePrefixApp ctxt_prec pp_fun pp_tys   | null pp_tys = pp_fun-  | otherwise   = maybeParen ctxt_prec TyConPrec $+  | otherwise   = maybeParen ctxt_prec appPrec $                   hang pp_fun 2 (sep pp_tys)  -- ----------------------------- Printing binders ------------------------------------@@ -585,26 +639,28 @@   ppr ty = pprIfaceType ty  pprIfaceType, pprParendIfaceType :: IfaceType -> SDoc-pprIfaceType       = pprPrecIfaceType TopPrec-pprParendIfaceType = pprPrecIfaceType TyConPrec+pprIfaceType       = pprPrecIfaceType topPrec+pprParendIfaceType = pprPrecIfaceType appPrec -pprPrecIfaceType :: TyPrec -> IfaceType -> SDoc+pprPrecIfaceType :: PprPrec -> IfaceType -> SDoc+-- We still need `eliminateRuntimeRep`, since the `pprPrecIfaceType` maybe+-- called from other places, besides `:type` and `:info`. pprPrecIfaceType prec ty = eliminateRuntimeRep (ppr_ty prec) ty -ppr_ty :: TyPrec -> IfaceType -> SDoc+ppr_ty :: PprPrec -> IfaceType -> SDoc ppr_ty _         (IfaceFreeTyVar tyvar) = ppr tyvar  -- This is the main reson 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 _         (IfaceTupleTy i p tys) = pprTuple i p 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)   = -- 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)]+    maybeParen ctxt_prec funPrec $+    sep [ppr_ty funPrec ty1, sep (ppr_fun_tail ty2)]   where     ppr_fun_tail (IfaceFunTy ty1 ty2)-      = (arrow <+> ppr_ty FunPrec ty1) : ppr_fun_tail ty2+      = (arrow <+> ppr_ty funPrec ty1) : ppr_fun_tail ty2     ppr_fun_tail other_ty       = [arrow <+> pprIfaceType other_ty] @@ -614,8 +670,8 @@       ppr_app_ty_no_casts   where     ppr_app_ty =-        maybeParen ctxt_prec TyConPrec-        $ ppr_ty FunPrec ty1 <+> ppr_ty TyConPrec ty2+        maybeParen ctxt_prec appPrec+        $ ppr_ty funPrec ty1 <+> ppr_ty appPrec ty2      -- Strip any casts from the head of the application     ppr_app_ty_no_casts =@@ -635,7 +691,7 @@  ppr_ty ctxt_prec (IfaceCastTy ty co)   = if_print_coercions-      (parens (ppr_ty TopPrec ty <+> text "|>" <+> ppr co))+      (parens (ppr_ty topPrec ty <+> text "|>" <+> ppr co))       (ppr_ty ctxt_prec ty)  ppr_ty ctxt_prec (IfaceCoercionTy co)@@ -644,7 +700,7 @@       (text "<>")  ppr_ty ctxt_prec ty-  = maybeParen ctxt_prec FunPrec (pprIfaceSigmaType ShowForAllMust ty)+  = maybeParen ctxt_prec funPrec (pprIfaceSigmaType ShowForAllMust ty)  {- Note [Defaulting RuntimeRep variables]@@ -668,7 +724,7 @@  For this reason it was decided that we would hide RuntimeRep variables for now (see #11549). We do this by defaulting all type variables of kind RuntimeRep to-PtrLiftedRep. This is done in a pass right before pretty-printing+LiftedRep. This is done in a pass right before pretty-printing (defaultRuntimeRepVars, controlled by -fprint-explicit-runtime-reps) -} @@ -687,8 +743,8 @@ -- syntactic overhead in otherwise simple type signatures (e.g. ($)). See -- Note [Defaulting RuntimeRep variables] and #11549 for further discussion. ---defaultRuntimeRepVars :: IfaceType -> IfaceType-defaultRuntimeRepVars = go emptyFsEnv+defaultRuntimeRepVars :: PprStyle -> IfaceType -> IfaceType+defaultRuntimeRepVars sty = go emptyFsEnv   where     go :: FastStringEnv () -> IfaceType -> IfaceType     go subs (IfaceForAllTy bndr ty)@@ -704,13 +760,28 @@         var :: IfLclName         (var, var_kind) = binderVar bndr -    go subs (IfaceTyVar tv)+    go subs ty@(IfaceTyVar tv)       | tv `elemFsEnv` subs       = IfaceTyConApp liftedRep ITC_Nil+      | otherwise+      = ty -    go subs (IfaceFunTy kind ty)-      = IfaceFunTy (go subs kind) (go subs ty)+    go _ ty@(IfaceFreeTyVar tv)+      | userStyle sty && TyCoRep.isRuntimeRepTy (tyVarKind tv)+         -- don't require -fprint-explicit-runtime-reps for good debugging output+      = IfaceTyConApp liftedRep ITC_Nil+      | otherwise+      = ty +    go subs (IfaceTyConApp tc tc_args)+      = IfaceTyConApp tc (go_args subs tc_args)++    go subs (IfaceTupleTy sort is_prom tc_args)+      = IfaceTupleTy sort is_prom (go_args subs tc_args)++    go subs (IfaceFunTy arg res)+      = IfaceFunTy (go subs arg) (go subs res)+     go subs (IfaceAppTy x y)       = IfaceAppTy (go subs x) (go subs y) @@ -720,8 +791,14 @@     go subs (IfaceCastTy x co)       = IfaceCastTy (go subs x) co -    go _ other = other+    go _ ty@(IfaceLitTy {}) = ty+    go _ ty@(IfaceCoercionTy {}) = ty +    go_args :: FastStringEnv () -> IfaceTcArgs -> IfaceTcArgs+    go_args _ ITC_Nil = ITC_Nil+    go_args subs (ITC_Vis ty args)   = ITC_Vis   (go subs ty) (go_args subs args)+    go_args subs (ITC_Invis ty args) = ITC_Invis (go subs ty) (go_args subs args)+     liftedRep :: IfaceTyCon     liftedRep =         IfaceTyCon dc_name (IfaceTyConInfo IsPromoted IfaceNormalTyCon)@@ -736,22 +813,26 @@ eliminateRuntimeRep f ty = sdocWithDynFlags $ \dflags ->     if gopt Opt_PrintExplicitRuntimeReps dflags       then f ty-      else f (defaultRuntimeRepVars ty)+      else getPprStyle $ \sty -> f (defaultRuntimeRepVars sty ty)  instance Outputable IfaceTcArgs where   ppr tca = pprIfaceTcArgs tca  pprIfaceTcArgs, pprParendIfaceTcArgs :: IfaceTcArgs -> SDoc-pprIfaceTcArgs  = ppr_tc_args TopPrec-pprParendIfaceTcArgs = ppr_tc_args TyConPrec+pprIfaceTcArgs  = ppr_tc_args topPrec+pprParendIfaceTcArgs = ppr_tc_args appPrec -ppr_tc_args :: TyPrec -> IfaceTcArgs -> SDoc+ppr_tc_args :: PprPrec -> IfaceTcArgs -> SDoc ppr_tc_args ctx_prec args- = let pprTys t ts = ppr_ty ctx_prec t <+> ppr_tc_args ctx_prec ts+ = let ppr_rest    = ppr_tc_args ctx_prec+       pprTys t ts = ppr_ty ctx_prec t <+> ppr_rest ts    in case args of         ITC_Nil        -> empty         ITC_Vis   t ts -> pprTys t ts-        ITC_Invis t ts -> pprTys t ts+        ITC_Invis t ts -> sdocWithDynFlags $ \dflags ->+                          if gopt Opt_PrintExplicitKinds dflags+                             then pprTys t ts+                             else ppr_rest ts  ------------------- pprIfaceForAllPart :: [IfaceForAllBndr] -> [IfacePredType] -> SDoc -> SDoc@@ -828,34 +909,80 @@  pprIfaceSigmaType :: ShowForAllFlag -> IfaceType -> SDoc pprIfaceSigmaType show_forall ty-  = ppr_iface_forall_part show_forall tvs theta (ppr tau)+  = eliminateRuntimeRep ppr_fn ty   where-    (tvs, theta, tau) = splitIfaceSigmaTy ty+    ppr_fn iface_ty =+      let (tvs, theta, tau) = splitIfaceSigmaTy iface_ty+       in ppr_iface_forall_part show_forall tvs theta (ppr tau)  pprUserIfaceForAll :: [IfaceForAllBndr] -> SDoc pprUserIfaceForAll tvs    = sdocWithDynFlags $ \dflags ->-     ppWhen (any tv_has_kind_var tvs || gopt Opt_PrintExplicitForalls dflags) $+     -- See Note [When to print foralls]+     ppWhen (any tv_has_kind_var tvs+             || any tv_is_required tvs+             || gopt Opt_PrintExplicitForalls dflags) $      pprIfaceForAll tvs    where      tv_has_kind_var (TvBndr (_,kind) _) = not (ifTypeIsVarFree kind)+     tv_is_required = isVisibleArgFlag . binderArgFlag +{-+Note [When to print foralls]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We opt to explicitly pretty-print `forall`s if any of the following+criteria are met: +1. -fprint-explicit-foralls is on.++2. A bound type variable has a polymorphic kind. E.g.,++     forall k (a::k). Proxy a -> Proxy a++   Since a's kind mentions a variable k, we print the foralls.++3. A bound type variable is a visible argument (#14238).+   Suppose we are printing the kind of:++     T :: forall k -> k -> Type++   The "forall k ->" notation means that this kind argument is required.+   That is, it must be supplied at uses of T. E.g.,++     f :: T (Type->Type)  Monad -> Int++   So we print an explicit "T :: forall k -> k -> Type",+   because omitting it and printing "T :: k -> Type" would be+   utterly misleading.++   See Note [TyVarBndrs, TyVarBinders, TyConBinders, and visibility]+   in TyCoRep.+-}+ ------------------- +-- | Prefix a space if the given 'IfaceType' is a promoted 'TyCon'.+pprSpaceIfPromotedTyCon :: IfaceType -> SDoc -> SDoc+pprSpaceIfPromotedTyCon (IfaceTyConApp tyCon _)+  = case ifaceTyConIsPromoted (ifaceTyConInfo tyCon) of+      IsPromoted -> (space <>)+      _ -> id+pprSpaceIfPromotedTyCon _+  = id+ -- See equivalent function in TyCoRep.hs-pprIfaceTyList :: TyPrec -> IfaceType -> IfaceType -> SDoc+pprIfaceTyList :: PprPrec -> IfaceType -> IfaceType -> SDoc -- Given a type-level list (t1 ': t2), see if we can print -- it in list notation [t1, ...]. -- Precondition: Opt_PrintExplicitKinds is off pprIfaceTyList ctxt_prec ty1 ty2   = case gather ty2 of       (arg_tys, Nothing)-        -> char '\'' <> brackets (fsep (punctuate comma-                        (map (ppr_ty TopPrec) (ty1:arg_tys))))+        -> char '\'' <> brackets (pprSpaceIfPromotedTyCon ty1 (fsep+                        (punctuate comma (map (ppr_ty topPrec) (ty1:arg_tys)))))       (arg_tys, Just tl)-        -> maybeParen ctxt_prec FunPrec $ hang (ppr_ty FunPrec ty1)-           2 (fsep [ colon <+> ppr_ty FunPrec ty | ty <- arg_tys ++ [tl]])+        -> maybeParen ctxt_prec funPrec $ hang (ppr_ty funPrec ty1)+           2 (fsep [ colon <+> ppr_ty funPrec ty | ty <- arg_tys ++ [tl]])   where     gather :: IfaceType -> ([IfaceType], Maybe IfaceType)      -- (gather ty) = (tys, Nothing) means ty is a list [t1, .., tn]@@ -869,27 +996,27 @@       = ([], Nothing)     gather ty = ([], Just ty) -pprIfaceTypeApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc+pprIfaceTypeApp :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc pprIfaceTypeApp prec tc args = pprTyTcApp prec tc args -pprTyTcApp :: TyPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc+pprTyTcApp :: PprPrec -> IfaceTyCon -> IfaceTcArgs -> SDoc pprTyTcApp ctxt_prec tc tys =     sdocWithDynFlags $ \dflags ->     getPprStyle $ \style ->     pprTyTcApp' ctxt_prec tc tys dflags style -pprTyTcApp' :: TyPrec -> IfaceTyCon -> IfaceTcArgs+pprTyTcApp' :: PprPrec -> IfaceTyCon -> IfaceTcArgs             -> DynFlags -> PprStyle -> SDoc pprTyTcApp' ctxt_prec tc tys dflags style   | ifaceTyConName tc `hasKey` ipClassKey   , ITC_Vis (IfaceLitTy (IfaceStrTyLit n)) (ITC_Vis ty ITC_Nil) <- tys-  = maybeParen ctxt_prec FunPrec-    $ char '?' <> ftext n <> text "::" <> ppr_ty TopPrec ty+  = maybeParen ctxt_prec funPrec+    $ char '?' <> ftext n <> text "::" <> ppr_ty topPrec ty    | IfaceTupleTyCon arity sort <- ifaceTyConSort info   , not (debugStyle style)   , arity == ifaceVisTcArgsLength tys-  = pprTuple sort (ifaceTyConIsPromoted info) tys+  = pprTuple ctxt_prec sort (ifaceTyConIsPromoted info) tys    | IfaceSumTyCon arity <- ifaceTyConSort info   = pprSum arity (ifaceTyConIsPromoted info) tys@@ -902,7 +1029,7 @@   | tc `ifaceTyConHasKey` tYPETyConKey   , ITC_Vis (IfaceTyConApp rep ITC_Nil) ITC_Nil <- tys   , rep `ifaceTyConHasKey` liftedRepDataConKey-  = kindStar+  = kindType    | otherwise   = getPprDebug $ \dbg ->@@ -928,7 +1055,7 @@ -- -- See Note [Equality predicates in IfaceType] -- and Note [The equality types story] in TysPrim-ppr_equality :: TyPrec -> IfaceTyCon -> [IfaceType] -> Maybe SDoc+ppr_equality :: PprPrec -> IfaceTyCon -> [IfaceType] -> Maybe SDoc ppr_equality ctxt_prec tc args   | hetero_eq_tc   , [k1, k2, t1, t2] <- args@@ -941,11 +1068,15 @@   | otherwise   = Nothing   where-    homogeneous = case ifaceTyConSort $ ifaceTyConInfo tc of-                    IfaceEqualityTyCon -> True-                    _other             -> False-       -- True <=> a heterogeneous equality whose arguments-       --          are (in this case) of the same kind+    homogeneous = tc_name `hasKey` eqTyConKey -- (~)+               || hetero_tc_used_homogeneously+      where+        hetero_tc_used_homogeneously+          = case ifaceTyConSort $ ifaceTyConInfo tc of+                          IfaceEqualityTyCon -> True+                          _other             -> False+             -- True <=> a heterogeneous equality whose arguments+             --          are (in this case) of the same kind      tc_name = ifaceTyConName tc     pp = ppr_ty@@ -953,60 +1084,74 @@     hetero_eq_tc = tc_name `hasKey` eqPrimTyConKey     -- (~#)                 || tc_name `hasKey` eqReprPrimTyConKey -- (~R#)                 || tc_name `hasKey` heqTyConKey        -- (~~)+    nominal_eq_tc = tc_name `hasKey` heqTyConKey       -- (~~)+                 || tc_name `hasKey` eqPrimTyConKey    -- (~#)     print_equality args =         sdocWithDynFlags $ \dflags ->         getPprStyle      $ \style  ->         print_equality' args style dflags      print_equality' (ki1, ki2, ty1, ty2) style dflags-      | print_eqs   -- No magic, just print the original TyCon+      | -- If -fprint-equality-relations is on, just print the original TyCon+        print_eqs       = ppr_infix_eq (ppr tc) -      | hetero_eq_tc-      , print_kinds || not homogeneous-      = ppr_infix_eq (text "~~")+      | -- Homogeneous use of heterogeneous equality (ty1 ~~ ty2)+        --                 or unlifted equality      (ty1 ~# ty2)+        nominal_eq_tc, homogeneous+      = ppr_infix_eq (text "~") +      | -- Heterogeneous use of unlifted equality (ty1 ~# ty2)+        not homogeneous+      = ppr_infix_eq (ppr heqTyCon)++      | -- Homogeneous use of representational unlifted equality (ty1 ~R# ty2)+        tc_name `hasKey` eqReprPrimTyConKey, homogeneous+      = let ki | print_kinds = [pp appPrec ki1]+               | otherwise   = []+        in pprIfacePrefixApp ctxt_prec (ppr coercibleTyCon)+                            (ki ++ [pp appPrec ty1, pp appPrec ty2])++        -- The other cases work as you'd expect       | otherwise-      = if tc_name `hasKey` eqReprPrimTyConKey-        then pprIfacePrefixApp ctxt_prec (text "Coercible")-                               [pp TyConPrec ty1, pp TyConPrec ty2]-        else pprIfaceInfixApp ctxt_prec (char '~')-                 (pp TyOpPrec ty1) (pp TyOpPrec ty2)+      = ppr_infix_eq (ppr tc)       where-        ppr_infix_eq eq_op-           = pprIfaceInfixApp ctxt_prec eq_op-                 (parens (pp TopPrec ty1 <+> dcolon <+> pp TyOpPrec ki1))-                 (parens (pp TopPrec ty2 <+> dcolon <+> pp TyOpPrec ki2))+        ppr_infix_eq :: SDoc -> SDoc+        ppr_infix_eq eq_op = pprIfaceInfixApp ctxt_prec eq_op+                               (pp_ty_ki ty1 ki1) (pp_ty_ki ty2 ki2)+          where+            pp_ty_ki ty ki+              | print_kinds+              = parens (pp topPrec ty <+> dcolon <+> pp opPrec ki)+              | otherwise+              = pp opPrec ty          print_kinds = gopt Opt_PrintExplicitKinds dflags         print_eqs   = gopt Opt_PrintEqualityRelations dflags ||                       dumpStyle style || debugStyle style  -pprIfaceCoTcApp :: TyPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc+pprIfaceCoTcApp :: PprPrec -> IfaceTyCon -> [IfaceCoercion] -> SDoc pprIfaceCoTcApp ctxt_prec tc tys = ppr_iface_tc_app ppr_co ctxt_prec tc tys -ppr_iface_tc_app :: (TyPrec -> a -> SDoc) -> TyPrec -> IfaceTyCon -> [a] -> SDoc+ppr_iface_tc_app :: (PprPrec -> a -> SDoc) -> PprPrec -> IfaceTyCon -> [a] -> SDoc ppr_iface_tc_app pp _ tc [ty]-  | tc `ifaceTyConHasKey` listTyConKey = pprPromotionQuote tc <> brackets (pp TopPrec ty)-  | tc `ifaceTyConHasKey` parrTyConKey = pprPromotionQuote tc <> paBrackets (pp TopPrec ty)+  | tc `ifaceTyConHasKey` listTyConKey = pprPromotionQuote tc <> brackets (pp topPrec ty)  ppr_iface_tc_app pp ctxt_prec tc tys-  |  tc `ifaceTyConHasKey` starKindTyConKey-  || tc `ifaceTyConHasKey` liftedTypeKindTyConKey-  || tc `ifaceTyConHasKey` unicodeStarKindTyConKey-  = kindStar   -- Handle unicode; do not wrap * in parens+  | tc `ifaceTyConHasKey` liftedTypeKindTyConKey+  = kindType    | not (isSymOcc (nameOccName (ifaceTyConName tc)))-  = pprIfacePrefixApp ctxt_prec (ppr tc) (map (pp TyConPrec) tys)+  = pprIfacePrefixApp ctxt_prec (ppr tc) (map (pp appPrec) tys)    | [ty1,ty2] <- tys  -- Infix, two arguments;                       -- we know nothing of precedence though   = pprIfaceInfixApp ctxt_prec (ppr tc)-                     (pp TyOpPrec ty1) (pp TyOpPrec ty2)+                     (pp opPrec ty1) (pp opPrec ty2)    | otherwise-  = pprIfacePrefixApp ctxt_prec (parens (ppr tc)) (map (pp TyConPrec) tys)+  = pprIfacePrefixApp ctxt_prec (parens (ppr tc)) (map (pp appPrec) tys)  pprSum :: Arity -> IsPromoted -> IfaceTcArgs -> SDoc pprSum _arity is_promoted args@@ -1015,20 +1160,24 @@     let tys   = tcArgsIfaceTypes args         args' = drop (length tys `div` 2) tys     in pprPromotionQuoteI is_promoted-       <> sumParens (pprWithBars (ppr_ty TopPrec) args')+       <> sumParens (pprWithBars (ppr_ty topPrec) args') -pprTuple :: TupleSort -> IsPromoted -> IfaceTcArgs -> SDoc-pprTuple ConstraintTuple IsNotPromoted ITC_Nil-  = text "() :: Constraint"+pprTuple :: PprPrec -> TupleSort -> IsPromoted -> IfaceTcArgs -> SDoc+pprTuple ctxt_prec ConstraintTuple IsNotPromoted ITC_Nil+  = maybeParen ctxt_prec appPrec $+    text "() :: Constraint"  -- All promoted constructors have kind arguments-pprTuple sort IsPromoted args+pprTuple _ sort IsPromoted args   = let tys = tcArgsIfaceTypes args         args' = drop (length tys `div` 2) tys+        spaceIfPromoted = case args' of+          arg0:_ -> pprSpaceIfPromotedTyCon arg0+          _ -> id     in pprPromotionQuoteI IsPromoted <>-       tupleParens sort (pprWithCommas pprIfaceType args')+       tupleParens sort (spaceIfPromoted (pprWithCommas pprIfaceType args')) -pprTuple sort promoted args+pprTuple _ sort promoted args   =   -- drop the RuntimeRep vars.       -- See Note [Unboxed tuple RuntimeRep vars] in TyCon     let tys   = tcArgsIfaceTypes args@@ -1044,27 +1193,27 @@ pprIfaceTyLit (IfaceStrTyLit n) = text (show n)  pprIfaceCoercion, pprParendIfaceCoercion :: IfaceCoercion -> SDoc-pprIfaceCoercion = ppr_co TopPrec-pprParendIfaceCoercion = ppr_co TyConPrec+pprIfaceCoercion = ppr_co topPrec+pprParendIfaceCoercion = ppr_co appPrec -ppr_co :: TyPrec -> IfaceCoercion -> SDoc+ppr_co :: PprPrec -> IfaceCoercion -> SDoc ppr_co _         (IfaceReflCo r ty) = angleBrackets (ppr ty) <> ppr_role r ppr_co ctxt_prec (IfaceFunCo r co1 co2)-  = maybeParen ctxt_prec FunPrec $-    sep (ppr_co FunPrec co1 : ppr_fun_tail co2)+  = maybeParen ctxt_prec funPrec $+    sep (ppr_co funPrec co1 : ppr_fun_tail co2)   where     ppr_fun_tail (IfaceFunCo r co1 co2)-      = (arrow <> ppr_role r <+> ppr_co FunPrec co1) : ppr_fun_tail co2+      = (arrow <> ppr_role r <+> ppr_co funPrec co1) : ppr_fun_tail co2     ppr_fun_tail other_co       = [arrow <> ppr_role r <+> pprIfaceCoercion other_co]  ppr_co _         (IfaceTyConAppCo r tc cos)-  = parens (pprIfaceCoTcApp TopPrec tc cos) <> ppr_role r+  = parens (pprIfaceCoTcApp topPrec tc cos) <> ppr_role r ppr_co ctxt_prec (IfaceAppCo co1 co2)-  = maybeParen ctxt_prec TyConPrec $-    ppr_co FunPrec co1 <+> pprParendIfaceCoercion co2+  = maybeParen ctxt_prec appPrec $+    ppr_co funPrec co1 <+> pprParendIfaceCoercion co2 ppr_co ctxt_prec co@(IfaceForAllCo {})-  = maybeParen ctxt_prec FunPrec $+  = maybeParen ctxt_prec funPrec $     pprIfaceForAllCoPart tvs (pprIfaceCoercion inner_co)   where     (tvs, inner_co) = split_co co@@ -1079,28 +1228,30 @@ ppr_co _ (IfaceHoleCo covar)    = braces (ppr covar)  ppr_co ctxt_prec (IfaceUnivCo IfaceUnsafeCoerceProv r ty1 ty2)-  = maybeParen ctxt_prec TyConPrec $+  = maybeParen ctxt_prec appPrec $     text "UnsafeCo" <+> ppr r <+>     pprParendIfaceType ty1 <+> pprParendIfaceType ty2 -ppr_co _ (IfaceUnivCo _ _ ty1 ty2)-  = angleBrackets ( ppr ty1 <> comma <+> ppr ty2 )+ppr_co _ (IfaceUnivCo prov role ty1 ty2)+  = text "Univ" <> (parens $+      sep [ ppr role <+> pprIfaceUnivCoProv prov+          , dcolon <+>  ppr ty1 <> comma <+> ppr ty2 ])  ppr_co ctxt_prec (IfaceInstCo co ty)-  = maybeParen ctxt_prec TyConPrec $+  = maybeParen ctxt_prec appPrec $     text "Inst" <+> pprParendIfaceCoercion co                         <+> pprParendIfaceCoercion ty  ppr_co ctxt_prec (IfaceAxiomRuleCo tc cos)-  = maybeParen ctxt_prec TyConPrec $ ppr tc <+> parens (interpp'SP cos)+  = maybeParen ctxt_prec appPrec $ ppr tc <+> parens (interpp'SP cos)  ppr_co ctxt_prec (IfaceAxiomInstCo n i cos)   = ppr_special_co ctxt_prec (ppr n <> brackets (ppr i)) cos ppr_co ctxt_prec (IfaceSymCo co)   = ppr_special_co ctxt_prec (text "Sym") [co] ppr_co ctxt_prec (IfaceTransCo co1 co2)-  = maybeParen ctxt_prec TyOpPrec $-    ppr_co TyOpPrec co1 <+> semi <+> ppr_co TyOpPrec co2+  = maybeParen ctxt_prec opPrec $+    ppr_co opPrec co1 <+> semi <+> ppr_co opPrec co2 ppr_co ctxt_prec (IfaceNthCo d co)   = ppr_special_co ctxt_prec (text "Nth:" <> int d) [co] ppr_co ctxt_prec (IfaceLRCo lr co)@@ -1112,9 +1263,9 @@ ppr_co ctxt_prec (IfaceKindCo co)   = ppr_special_co ctxt_prec (text "Kind") [co] -ppr_special_co :: TyPrec -> SDoc -> [IfaceCoercion] -> SDoc+ppr_special_co :: PprPrec -> SDoc -> [IfaceCoercion] -> SDoc ppr_special_co ctxt_prec doc cos-  = maybeParen ctxt_prec TyConPrec+  = maybeParen ctxt_prec appPrec                (sep [doc, nest 4 (sep (map pprParendIfaceCoercion cos))])  ppr_role :: Role -> SDoc@@ -1124,6 +1275,17 @@                     Representational -> char 'R'                     Phantom          -> char 'P' +------------------+pprIfaceUnivCoProv :: IfaceUnivCoProv -> SDoc+pprIfaceUnivCoProv IfaceUnsafeCoerceProv+  = text "unsafe"+pprIfaceUnivCoProv (IfacePhantomProv co)+  = text "phantom" <+> pprParendIfaceCoercion co+pprIfaceUnivCoProv (IfaceProofIrrelProv co)+  = text "irrel" <+> pprParendIfaceCoercion co+pprIfaceUnivCoProv (IfacePluginProv s)+  = text "plugin" <+> doubleQuotes (text s)+ ------------------- instance Outputable IfaceTyCon where   ppr tc = pprPromotionQuote tc <> ppr (ifaceTyConName tc)@@ -1219,7 +1381,7 @@ -- -- In the event that we are printing a singleton context (e.g. @Eq a@) we can -- omit parentheses. However, we must take care to set the precedence correctly--- to TyOpPrec, since something like @a :~: b@ must be parenthesized (see+-- to opPrec, since something like @a :~: b@ must be parenthesized (see -- #9658). -- -- When printing a larger context we use 'fsep' instead of 'sep' so that@@ -1248,16 +1410,16 @@  -- | Prints "(C a, D b) =>", including the arrow. -- Used when we want to print a context in a type, so we--- use FunPrec to decide whether to parenthesise a singleton+-- use 'funPrec' to decide whether to parenthesise a singleton -- predicate; e.g.   Num a => a -> a pprIfaceContextArr :: [IfacePredType] -> SDoc pprIfaceContextArr []     = empty-pprIfaceContextArr [pred] = ppr_ty FunPrec pred <+> darrow+pprIfaceContextArr [pred] = ppr_ty funPrec pred <+> darrow pprIfaceContextArr preds  = ppr_parend_preds preds <+> darrow  -- | Prints a context or @()@ if empty -- You give it the context precedence-pprIfaceContext :: TyPrec -> [IfacePredType] -> SDoc+pprIfaceContext :: PprPrec -> [IfacePredType] -> SDoc pprIfaceContext _    []     = text "()" pprIfaceContext prec [pred] = ppr_ty prec pred pprIfaceContext _    preds  = ppr_parend_preds preds
iface/LoadIface.hs view
@@ -6,7 +6,7 @@ Loading interface files -} -{-# LANGUAGE CPP #-}+{-# LANGUAGE CPP, BangPatterns, RecordWildCards, NondecreasingIndentation #-} {-# OPTIONS_GHC -fno-warn-orphans #-} module LoadIface (         -- Importing one thing@@ -25,6 +25,7 @@         loadDecls,      -- Should move to TcIface and be renamed         initExternalPackageState,         moduleFreeHolesPrecise,+        needWiredInHomeIface, loadWiredInHomeIface,          pprModIfaceSimple,         ifaceStats, pprModIface, showIface@@ -35,7 +36,7 @@ import GhcPrelude  import {-# SOURCE #-}   TcIface( tcIfaceDecl, tcIfaceRules, tcIfaceInst,-                                 tcIfaceFamInst, tcIfaceVectInfo,+                                 tcIfaceFamInst,                                  tcIfaceAnnotations, tcIfaceCompleteSigs )  import DynFlags@@ -76,6 +77,7 @@ import FieldLabel import RnModIface import UniqDSet+import Plugins  import Control.Monad import Control.Exception@@ -442,6 +444,8 @@         in         initIfaceLcl (mi_semantic_module iface) loc_doc (mi_boot iface) $ do +        dontLeakTheHPT $ do+         --      Load the new ModIface into the External Package State         -- Even home-package interfaces loaded by loadInterface         --      (which only happens in OneShot mode; in Batch/Interactive@@ -450,7 +454,7 @@         --         -- The main thing is to add the ModIface to the PIT, but         -- we also take the-        --      IfaceDecls, IfaceClsInst, IfaceFamInst, IfaceRules, IfaceVectInfo+        --      IfaceDecls, IfaceClsInst, IfaceFamInst, IfaceRules,         -- out of the ModIface and put them into the big EPS pools          -- NB: *first* we do loadDecl, so that the provenance of all the locally-defined@@ -464,7 +468,6 @@         ; new_eps_fam_insts <- mapM tcIfaceFamInst (mi_fam_insts iface)         ; new_eps_rules     <- tcIfaceRules ignore_prags (mi_rules iface)         ; new_eps_anns      <- tcIfaceAnnotations (mi_anns iface)-        ; new_eps_vect_info <- tcIfaceVectInfo mod (mkNameEnv new_eps_decls) (mi_vect_info iface)         ; new_eps_complete_sigs <- tcIfaceCompleteSigs (mi_complete_sigs iface)          ; let { final_iface = iface {@@ -492,8 +495,6 @@                                                        new_eps_insts,                   eps_fam_inst_env = extendFamInstEnvList (eps_fam_inst_env eps)                                                           new_eps_fam_insts,-                  eps_vect_info    = plusVectInfo (eps_vect_info eps)-                                                  new_eps_vect_info,                   eps_ann_env      = extendAnnEnvList (eps_ann_env eps)                                                       new_eps_anns,                   eps_mod_fam_inst_env@@ -510,9 +511,59 @@                                                    (length new_eps_insts)                                                    (length new_eps_rules) } -        ; return (Succeeded final_iface)+        ; -- invoke plugins+          res <- withPlugins dflags interfaceLoadAction final_iface+        ; return (Succeeded res)     }}}} +++-- Note [HPT space leak] (#15111)+--+-- In IfL, we defer some work until it is demanded using forkM, such+-- as building TyThings from IfaceDecls. These thunks are stored in+-- the ExternalPackageState, and they might never be poked.  If we're+-- not careful, these thunks will capture the state of the loaded+-- program when we read an interface file, and retain all that data+-- for ever.+--+-- Therefore, when loading a package interface file , we use a "clean"+-- version of the HscEnv with all the data about the currently loaded+-- program stripped out. Most of the fields can be panics because+-- we'll never read them, but hsc_HPT needs to be empty because this+-- interface will cause other interfaces to be loaded recursively, and+-- when looking up those interfaces we use the HPT in loadInterface.+-- We know that none of the interfaces below here can refer to+-- home-package modules however, so it's safe for the HPT to be empty.+--+dontLeakTheHPT :: IfL a -> IfL a+dontLeakTheHPT thing_inside = do+  let+    cleanTopEnv HscEnv{..} =+       let+         -- wrinkle: when we're typechecking in --backpack mode, the+         -- instantiation of a signature might reside in the HPT, so+         -- this case breaks the assumption that EPS interfaces only+         -- refer to other EPS interfaces. We can detect when we're in+         -- typechecking-only mode by using hscTarget==HscNothing, and+         -- in that case we don't empty the HPT.  (admittedly this is+         -- a bit of a hack, better suggestions welcome). A number of+         -- tests in testsuite/tests/backpack break without this+         -- tweak.+         !hpt | hscTarget hsc_dflags == HscNothing = hsc_HPT+              | otherwise = emptyHomePackageTable+       in+       HscEnv {  hsc_targets      = panic "cleanTopEnv: hsc_targets"+              ,  hsc_mod_graph    = panic "cleanTopEnv: hsc_mod_graph"+              ,  hsc_IC           = panic "cleanTopEnv: hsc_IC"+              ,  hsc_HPT          = hpt+              , .. }++  updTopEnv cleanTopEnv $ do+  !_ <- getTopEnv        -- force the updTopEnv+  thing_inside++ -- | Returns @True@ if a 'ModIface' comes from an external package. -- In this case, we should NOT load it into the EPS; the entities -- should instead come from the local merged signature interface.@@ -928,7 +979,6 @@         -- Initialise the EPS rule pool with the built-in rules       eps_mod_fam_inst_env                            = emptyModuleEnv,-      eps_vect_info        = noVectInfo,       eps_complete_matches = emptyUFM,       eps_ann_env          = emptyAnnEnv,       eps_stats = EpsStats { n_ifaces_in = 0, n_decls_in = 0, n_decls_out = 0@@ -988,6 +1038,15 @@                 Printing interfaces *                                                                      * ************************************************************************++Note [Name qualification with --show-iface]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++In order to disambiguate between identifiers from different modules, we qualify+all names that don't originate in the current module. In order to keep visual+noise as low as possible, we keep local names unqualified.++For some background on this choice see trac #15269. -}  -- | Read binary interface, and print it out@@ -998,8 +1057,15 @@    iface <- initTcRnIf 's' hsc_env () () $        readBinIface IgnoreHiWay TraceBinIFaceReading filename    let dflags = hsc_dflags hsc_env+       -- See Note [Name qualification with --show-iface]+       qualifyImportedNames mod _+           | mod == mi_module iface = NameUnqual+           | otherwise              = NameNotInScope1+       print_unqual = QueryQualify qualifyImportedNames+                                   neverQualifyModules+                                   neverQualifyPackages    putLogMsg dflags NoReason SevDump noSrcSpan-      (defaultDumpStyle dflags) (pprModIface iface)+      (mkDumpStyle dflags print_unqual) (pprModIface iface)  -- Show a ModIface but don't display details; suitable for ModIfaces stored in -- the EPT.@@ -1022,6 +1088,7 @@         , 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 "sig of:" <+> ppr (mi_sig_of iface))         , nest 2 (text "used TH splices:" <+> ppr (mi_used_th iface))         , nest 2 (text "where")@@ -1035,11 +1102,13 @@         , vcat (map ppr (mi_insts iface))         , vcat (map ppr (mi_fam_insts iface))         , vcat (map ppr (mi_rules iface))-        , pprVectInfo (mi_vect_info iface)         , ppr (mi_warns iface)         , pprTrustInfo (mi_trust iface)         , pprTrustPkg (mi_trust_pkg iface)         , vcat (map ppr (mi_complete_sigs iface))+        , text "module header:" $$ nest 2 (ppr (mi_doc_hdr iface))+        , text "declaration docs:" $$ nest 2 (ppr (mi_decl_docs iface))+        , text "arg docs:" $$ nest 2 (ppr (mi_arg_docs iface))         ]   where     pp_hsc_src HsBootFile = text "[boot]"@@ -1108,21 +1177,6 @@ pprFixities fixes = text "fixities" <+> pprWithCommas pprFix fixes                   where                     pprFix (occ,fix) = ppr fix <+> ppr occ--pprVectInfo :: IfaceVectInfo -> SDoc-pprVectInfo (IfaceVectInfo { ifaceVectInfoVar            = vars-                           , ifaceVectInfoTyCon          = tycons-                           , ifaceVectInfoTyConReuse     = tyconsReuse-                           , ifaceVectInfoParallelVars   = parallelVars-                           , ifaceVectInfoParallelTyCons = parallelTyCons-                           }) =-  vcat-  [ text "vectorised variables:" <+> hsep (map ppr vars)-  , text "vectorised tycons:" <+> hsep (map ppr tycons)-  , text "vectorised reused tycons:" <+> hsep (map ppr tyconsReuse)-  , text "parallel variables:" <+> hsep (map ppr parallelVars)-  , text "parallel tycons:" <+> hsep (map ppr parallelTyCons)-  ]  pprTrustInfo :: IfaceTrustInfo -> SDoc pprTrustInfo trust = text "trusted:" <+> ppr trust
iface/MkIface.hs view
@@ -86,7 +86,6 @@ import Finder import DynFlags import VarEnv-import VarSet import Var import Name import Avail@@ -109,6 +108,7 @@ import Exception import UniqSet import Packages+import ExtractDocs  import Control.Monad import Data.Function@@ -118,6 +118,12 @@ import Data.IORef import System.Directory import System.FilePath+import Plugins ( PluginRecompile(..), Plugin(..), LoadedPlugin(..))+#if __GLASGOW_HASKELL__ < 840+--Qualified import so we can define a Semigroup instance+-- but it doesn't clash with Outputable.<>+import qualified Data.Semigroup+#endif  {- ************************************************************************@@ -147,12 +153,17 @@                       mg_warns        = warns,                       mg_hpc_info     = hpc_info,                       mg_safe_haskell = safe_mode,-                      mg_trust_pkg    = self_trust+                      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 mod_details+                   safe_mode usages+                   doc_hdr decl_docs arg_docs+                   mod_details  -- | make an interface from the results of typechecking only.  Useful -- for non-optimising compilation, or where we aren't generating any@@ -177,7 +188,11 @@                     }   = do           let used_names = mkUsedNames tc_result-          deps <- mkDependencies tc_result+          let pluginModules =+                map lpModule (plugins (hsc_dflags hsc_env))+          deps <- mkDependencies+                    (thisInstalledUnitId (hsc_dflags hsc_env))+                    (map mi_module pluginModules) tc_result           let hpc_info = emptyHpcInfo other_hpc_info           used_th <- readIORef tc_splice_used           dep_files <- (readIORef dependent_files)@@ -188,30 +203,40 @@           -- but if you pass that in here, we'll decide it's the local           -- module and does not need to be recorded as a dependency.           -- See Note [Identity versus semantic module]-          usages <- mkUsageInfo hsc_env this_mod (imp_mods imports) used_names dep_files merged+          usages <- mkUsageInfo hsc_env this_mod (imp_mods imports) used_names+                      dep_files merged pluginModules++          let (doc_hdr', doc_map, arg_map) = extractDocs tc_result+           mkIface_ hsc_env maybe_old_fingerprint                    this_mod hsc_src                    used_th deps rdr_env                    fix_env warns hpc_info-                   (imp_trust_own_pkg imports) safe_mode usages mod_details+                   (imp_trust_own_pkg imports) safe_mode usages+                   doc_hdr' doc_map arg_map+                   mod_details  + mkIface_ :: HscEnv -> Maybe Fingerprint -> Module -> HscSource          -> Bool -> Dependencies -> GlobalRdrEnv          -> NameEnv FixItem -> Warnings -> HpcInfo          -> Bool          -> SafeHaskellMode          -> [Usage]+         -> Maybe HsDocString+         -> DeclDocMap+         -> ArgDocMap          -> ModDetails          -> IO (ModIface, Bool) mkIface_ hsc_env maybe_old_fingerprint          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          ModDetails{  md_insts     = insts,                       md_fam_insts = fam_insts,                       md_rules     = rules,                       md_anns      = anns,-                      md_vect_info = vect_info,                       md_types     = type_env,                       md_exports   = exports,                       md_complete_sigs = complete_sigs }@@ -246,7 +271,6 @@         iface_rules = map coreRuleToIfaceRule rules         iface_insts = map instanceToIfaceInst $ fixSafeInstances safe_mode insts         iface_fam_insts = map famInstToIfaceFamInst fam_insts-        iface_vect_info = flattenVectInfo vect_info         trust_info  = setSafeMode safe_mode         annotations = map mkIfaceAnnotation anns         icomplete_sigs = map mkIfaceCompleteSig complete_sigs@@ -269,8 +293,6 @@               mi_fam_insts   = sortBy cmp_fam_inst iface_fam_insts,               mi_rules       = sortBy cmp_rule     iface_rules, -              mi_vect_info   = iface_vect_info,-               mi_fixities    = fixities,               mi_warns       = warns,               mi_anns        = annotations,@@ -283,6 +305,7 @@               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@@ -297,7 +320,10 @@               -- And build the cached values               mi_warn_fn     = mkIfaceWarnCache warns,               mi_fix_fn      = mkIfaceFixCache fixities,-              mi_complete_sigs = icomplete_sigs }+              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" #-}@@ -340,19 +366,6 @@       ifFamInstTcName = ifFamInstFam -     flattenVectInfo (VectInfo { vectInfoVar            = vVar-                               , vectInfoTyCon          = vTyCon-                               , vectInfoParallelVars     = vParallelVars-                               , vectInfoParallelTyCons = vParallelTyCons-                               }) =-       IfaceVectInfo-       { ifaceVectInfoVar            = [Var.varName v | (v, _  ) <- dVarEnvElts vVar]-       , ifaceVectInfoTyCon          = [tyConName t   | (t, t_v) <- nameEnvElts vTyCon, t /= t_v]-       , ifaceVectInfoTyConReuse     = [tyConName t   | (t, t_v) <- nameEnvElts vTyCon, t == t_v]-       , ifaceVectInfoParallelVars   = [Var.varName v | v <- dVarSetElems vParallelVars]-       , ifaceVectInfoParallelTyCons = nameSetElemsStable vParallelTyCons-       }- ----------------------------- writeIfaceFile :: DynFlags -> FilePath -> ModIface -> IO () writeIfaceFile dflags hi_file_path new_iface@@ -667,18 +680,18 @@     hpc_hash <- fingerprintHpcFlags dflags putNameLiterally +   plugin_hash <- fingerprintPlugins hsc_env+    -- the ABI hash depends on:    --   - decls    --   - export list    --   - orphans    --   - deprecations-   --   - vect info    --   - flag abi hash    mod_hash <- computeFingerprint putNameLiterally                       (map fst sorted_decls,                        export_hash,  -- includes orphan_hash-                       mi_warns iface0,-                       mi_vect_info iface0)+                       mi_warns iface0)     -- The interface hash depends on:    --   - the ABI hash, plus@@ -704,11 +717,11 @@                 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-                                      && isNoIfaceVectInfo (mi_vect_info iface0)),+                                      && null orph_fis),                 mi_finsts      = not . null $ mi_fam_insts iface0,                 mi_decls       = sorted_decls,                 mi_hash_fn     = lookupOccEnv local_env }@@ -779,7 +792,8 @@  = Deps { dep_mods   = sortBy (compare `on` (moduleNameFS.fst)) (dep_mods d),           dep_pkgs   = sortBy (compare `on` fst) (dep_pkgs d),           dep_orphs  = sortBy stableModuleCmp (dep_orphs d),-          dep_finsts = sortBy stableModuleCmp (dep_finsts d) }+          dep_finsts = sortBy stableModuleCmp (dep_finsts d),+          dep_plgins = sortBy (compare `on` moduleNameFS) (dep_plgins d) }  -- | Creates cached lookup for the 'mi_anns' field of ModIface -- Hackily, we use "module" as the OccName for any module-level annotations@@ -1093,6 +1107,16 @@        -- to force recompilation; the String says what (one-line summary)    deriving Eq +instance Semigroup RecompileRequired where+  UpToDate <> r = r+  mc <> _       = mc++instance Monoid RecompileRequired where+  mempty = UpToDate+#if __GLASGOW_HASKELL__ < 840+  mappend = (Data.Semigroup.<>)+#endif+ recompileRequired :: RecompileRequired -> Bool recompileRequired UpToDate = False recompileRequired _ = True@@ -1219,7 +1243,10 @@        ; if recompileRequired recomp then return (recomp, Nothing) else do {        ; recomp <- checkDependencies hsc_env mod_summary iface        ; if recompileRequired recomp then return (recomp, Just iface) else do {+       ; recomp <- checkPlugins hsc_env iface+       ; if recompileRequired recomp then return (recomp, Nothing) else do { +        -- Source code unchanged and no errors yet... carry on        --        -- First put the dependent-module info, read from the old@@ -1236,13 +1263,51 @@        ; updateEps_ $ \eps  -> eps { eps_is_boot = mod_deps }        ; recomp <- checkList [checkModUsage this_pkg u | u <- mi_usages iface]        ; return (recomp, Just iface)-    }}}}}}}}+    }}}}}}}}}   where     this_pkg = thisPackage (hsc_dflags hsc_env)     -- This is a bit of a hack really     mod_deps :: ModuleNameEnv (ModuleName, IsBootInterface)     mod_deps = mkModDeps (dep_mods (mi_deps iface)) +-- | Check if any plugins are requesting recompilation+checkPlugins :: HscEnv -> ModIface -> IfG RecompileRequired+checkPlugins hsc iface = liftIO $ do+  -- [(ModuleName, Plugin, [Opts])]+  let old_fingerprint = mi_plugin_hash iface+      loaded_plugins = plugins (hsc_dflags hsc)+  res <- mconcat <$> mapM checkPlugin loaded_plugins+  return (pluginRecompileToRecompileRequired old_fingerprint res)++fingerprintPlugins :: HscEnv -> IO Fingerprint+fingerprintPlugins hsc_env = do+  fingerprintPlugins' (plugins (hsc_dflags hsc_env))++fingerprintPlugins' :: [LoadedPlugin] -> IO Fingerprint+fingerprintPlugins' plugins = do+  res <- mconcat <$> mapM checkPlugin plugins+  return $ case res of+      NoForceRecompile ->  fingerprintString "NoForceRecompile"+      ForceRecompile   -> fingerprintString "ForceRecompile"+      -- is the chance of collision worth worrying about?+      -- An alternative is to fingerprintFingerprints [fingerprintString+      -- "maybeRecompile", fp]+      (MaybeRecompile fp) -> fp++++checkPlugin :: LoadedPlugin -> IO PluginRecompile+checkPlugin (LoadedPlugin plugin _ opts) = pluginRecompile plugin opts++pluginRecompileToRecompileRequired :: Fingerprint -> PluginRecompile -> RecompileRequired+pluginRecompileToRecompileRequired old_fp pr =+  case pr of+    NoForceRecompile -> UpToDate+    ForceRecompile   -> RecompBecause "Plugin forced recompilation"+    MaybeRecompile fp  -> if fp == old_fp then UpToDate+                                          else RecompBecause "Plugin fingerprint changed"++ -- | Check if an hsig file needs recompilation because its -- implementing module has changed. checkHsig :: ModSummary -> ModIface -> IfG RecompileRequired@@ -1327,6 +1392,7 @@  = checkList (map dep_missing (ms_imps summary ++ ms_srcimps summary))   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)     this_pkg = thisPackage (hsc_dflags hsc_env)@@ -1337,7 +1403,7 @@      case find_res of         Found _ mod           | pkg == this_pkg-           -> if moduleName mod `notElem` map fst prev_dep_mods+           -> if moduleName mod `notElem` map fst prev_dep_mods ++ prev_dep_plgn                  then do traceHiDiffs $                            text "imported module " <> quotes (ppr mod) <>                            text " not among previous dependencies"
iface/TcIface.hs view
@@ -15,7 +15,7 @@         typecheckIfacesForMerging,         typecheckIfaceForInstantiate,         tcIfaceDecl, tcIfaceInst, tcIfaceFamInst, tcIfaceRules,-        tcIfaceVectInfo, tcIfaceAnnotations, tcIfaceCompleteSigs,+        tcIfaceAnnotations, tcIfaceCompleteSigs,         tcIfaceExpr,    -- Desired by HERMIT (Trac #7683)         tcIfaceGlobal  ) where@@ -55,7 +55,6 @@ import TysWiredIn import Literal import Var-import VarEnv import VarSet import Name import NameEnv@@ -173,9 +172,6 @@         ; rules     <- tcIfaceRules ignore_prags (mi_rules iface)         ; anns      <- tcIfaceAnnotations (mi_anns iface) -                -- Vectorisation information-        ; vect_info <- tcIfaceVectInfo (mi_semantic_module iface) type_env (mi_vect_info iface)-                 -- Exports         ; exports <- ifaceExportNames (mi_exports iface) @@ -193,7 +189,6 @@                               , md_fam_insts = fam_insts                               , md_rules     = rules                               , md_anns      = anns-                              , md_vect_info = vect_info                               , md_exports   = exports                               , md_complete_sigs = complete_sigs                               }@@ -393,7 +388,6 @@         fam_insts <- mapM tcIfaceFamInst (mi_fam_insts iface)         rules     <- tcIfaceRules ignore_prags (mi_rules iface)         anns      <- tcIfaceAnnotations (mi_anns iface)-        vect_info <- tcIfaceVectInfo (mi_semantic_module iface) type_env (mi_vect_info iface)         exports   <- ifaceExportNames (mi_exports iface)         complete_sigs <- tcIfaceCompleteSigs (mi_complete_sigs iface)         return $ ModDetails { md_types     = type_env@@ -401,7 +395,6 @@                             , md_fam_insts = fam_insts                             , md_rules     = rules                             , md_anns      = anns-                            , md_vect_info = vect_info                             , md_exports   = exports                             , md_complete_sigs = complete_sigs                             }@@ -434,7 +427,6 @@     fam_insts <- mapM tcIfaceFamInst (mi_fam_insts iface)     rules     <- tcIfaceRules ignore_prags (mi_rules iface)     anns      <- tcIfaceAnnotations (mi_anns iface)-    vect_info <- tcIfaceVectInfo (mi_semantic_module iface) type_env (mi_vect_info iface)     exports   <- ifaceExportNames (mi_exports iface)     complete_sigs <- tcIfaceCompleteSigs (mi_complete_sigs iface)     return $ ModDetails { md_types     = type_env@@ -442,7 +434,6 @@                         , md_fam_insts = fam_insts                         , md_rules     = rules                         , md_anns      = anns-                        , md_vect_info = vect_info                         , md_exports   = exports                         , md_complete_sigs = complete_sigs                         }@@ -897,6 +888,9 @@     univ_tvs :: [TyVar]     univ_tvs = binderVars (tyConTyVarBinders tc_tybinders) +    tag_map :: NameEnv ConTag+    tag_map = mkTyConTagMap tycon+     tc_con_decl (IfCon { ifConInfix = is_infix,                          ifConExTvs = ex_bndrs,                          ifConUserTvBinders = user_bndrs,@@ -960,7 +954,7 @@                        lbl_names                        univ_tvs ex_tvs user_tv_bndrs                        eq_spec theta-                       arg_tys orig_res_ty tycon+                       arg_tys orig_res_ty tycon tag_map         ; traceIf (text "Done interface-file tc_con_decl" <+> ppr dc_name)         ; return con }     mk_doc con_name = text "Constructor" <+> ppr con_name@@ -1128,134 +1122,6 @@ {- ************************************************************************ *                                                                      *-                Vectorisation information-*                                                                      *-************************************************************************--}---- We need access to the type environment as we need to look up information about type constructors--- (i.e., their data constructors and whether they are class type constructors).  If a vectorised--- type constructor or class is defined in the same module as where it is vectorised, we cannot--- look that information up from the type constructor that we obtained via a 'forkM'ed--- 'tcIfaceTyCon' without recursively loading the interface that we are already type checking again--- and again and again...----tcIfaceVectInfo :: Module -> TypeEnv -> IfaceVectInfo -> IfL VectInfo-tcIfaceVectInfo mod typeEnv (IfaceVectInfo-                             { ifaceVectInfoVar            = vars-                             , ifaceVectInfoTyCon          = tycons-                             , ifaceVectInfoTyConReuse     = tyconsReuse-                             , ifaceVectInfoParallelVars   = parallelVars-                             , ifaceVectInfoParallelTyCons = parallelTyCons-                             })-  = do { let parallelTyConsSet = mkNameSet parallelTyCons-       ; vVars         <- mapM vectVarMapping                  vars-       ; let varsSet = mkVarSet (map fst vVars)-       ; tyConRes1     <- mapM (vectTyConVectMapping varsSet)  tycons-       ; tyConRes2     <- mapM (vectTyConReuseMapping varsSet) tyconsReuse-       ; vParallelVars <- mapM vectVar                         parallelVars-       ; let (vTyCons, vDataCons, vScSels) = unzip3 (tyConRes1 ++ tyConRes2)-       ; return $ VectInfo-                  { vectInfoVar            = mkDVarEnv vVars `extendDVarEnvList` concat vScSels-                  , vectInfoTyCon          = mkNameEnv vTyCons-                  , vectInfoDataCon        = mkNameEnv (concat vDataCons)-                  , vectInfoParallelVars   = mkDVarSet vParallelVars-                  , vectInfoParallelTyCons = parallelTyConsSet-                  }-       }-  where-    vectVarMapping name-      = do { vName <- lookupIfaceTop (mkLocalisedOccName mod mkVectOcc name)-           ; var   <- forkM (text "vect var"  <+> ppr name)  $-                        tcIfaceExtId name-           ; vVar  <- forkM (text "vect vVar [mod =" <+>-                             ppr mod <> text "; nameModule =" <+>-                             ppr (nameModule name) <> text "]" <+> ppr vName) $-                       tcIfaceExtId vName-           ; return (var, (var, vVar))-           }-      -- where-      --   lookupLocalOrExternalId name-      --     = do { let mb_id = lookupTypeEnv typeEnv name-      --          ; case mb_id of-      --                -- id is local-      --              Just (AnId id) -> return id-      --                -- name is not an Id => internal inconsistency-      --              Just _         -> notAnIdErr-      --                -- Id is external-      --              Nothing        -> tcIfaceExtId name-      --          }-      ---      --   notAnIdErr = pprPanic "TcIface.tcIfaceVectInfo: not an id" (ppr name)--    vectVar name-      = forkM (text "vect scalar var"  <+> ppr name)  $-          tcIfaceExtId name--    vectTyConVectMapping vars name-      = do { vName  <- lookupIfaceTop (mkLocalisedOccName mod mkVectTyConOcc name)-           ; vectTyConMapping vars name vName-           }--    vectTyConReuseMapping vars name-      = vectTyConMapping vars name name--    vectTyConMapping vars name vName-      = do { tycon  <- lookupLocalOrExternalTyCon name-           ; vTycon <- forkM (text "vTycon of" <+> ppr vName) $-                         lookupLocalOrExternalTyCon vName--               -- Map the data constructors of the original type constructor to those of the-               -- vectorised type constructor /unless/ the type constructor was vectorised-               -- abstractly; if it was vectorised abstractly, the workers of its data constructors-               -- do not appear in the set of vectorised variables.-               ---               -- NB: This is lazy!  We don't pull at the type constructors before we actually use-               --     the data constructor mapping.-           ; let isAbstract | isClassTyCon tycon = False-                            | datacon:_ <- tyConDataCons tycon-                                                 = not $ dataConWrapId datacon `elemVarSet` vars-                            | otherwise          = True-                 vDataCons  | isAbstract = []-                            | otherwise  = [ (dataConName datacon, (datacon, vDatacon))-                                           | (datacon, vDatacon) <- zip (tyConDataCons tycon)-                                                                        (tyConDataCons vTycon)-                                           ]--                   -- Map the (implicit) superclass and methods selectors as they don't occur in-                   -- the var map.-                 vScSels    | Just cls  <- tyConClass_maybe tycon-                            , Just vCls <- tyConClass_maybe vTycon-                            = [ (sel, (sel, vSel))-                              | (sel, vSel) <- zip (classAllSelIds cls) (classAllSelIds vCls)-                              ]-                            | otherwise-                            = []--           ; return ( (name, (tycon, vTycon))          -- (T, T_v)-                    , vDataCons                        -- list of (Ci, Ci_v)-                    , vScSels                          -- list of (seli, seli_v)-                    )-           }-      where-          -- we need a fully defined version of the type constructor to be able to extract-          -- its data constructors etc.-        lookupLocalOrExternalTyCon name-          = do { let mb_tycon = lookupTypeEnv typeEnv name-               ; case mb_tycon of-                     -- tycon is local-                   Just (ATyCon tycon) -> return tycon-                     -- name is not a tycon => internal inconsistency-                   Just _              -> notATyConErr-                     -- tycon is external-                   Nothing             -> tcIfaceTyConByName name-               }--        notATyConErr = pprPanic "TcIface.tcIfaceVectInfo: not a tycon" (ppr name)--{--************************************************************************-*                                                                      *                         Types *                                                                      * ************************************************************************@@ -1350,13 +1216,14 @@                                             <*> go c2     go (IfaceInstCo c1 t2)       = InstCo   <$> go c1                                             <*> go t2-    go (IfaceNthCo d c)          = NthCo d  <$> go c+    go (IfaceNthCo d c)          = do { c' <- go c+                                      ; return $ mkNthCo (nthCoRole d c') d c' }     go (IfaceLRCo lr c)          = LRCo lr  <$> go c     go (IfaceCoherenceCo c1 c2)  = CoherenceCo <$> go c1                                                <*> go c2     go (IfaceKindCo c)           = KindCo   <$> go c     go (IfaceSubCo c)            = SubCo    <$> go c-    go (IfaceAxiomRuleCo ax cos) = AxiomRuleCo <$> go_axiom_rule ax+    go (IfaceAxiomRuleCo ax cos) = AxiomRuleCo <$> tcIfaceCoAxiomRule ax                                                <*> mapM go cos     go (IfaceFreeCoVar c)        = pprPanic "tcIfaceCo:IfaceFreeCoVar" (ppr c)     go (IfaceHoleCo c)           = pprPanic "tcIfaceCo:IfaceHoleCo"    (ppr c)@@ -1364,12 +1231,6 @@     go_var :: FastString -> IfL CoVar     go_var = tcIfaceLclId -    go_axiom_rule :: FastString -> IfL CoAxiomRule-    go_axiom_rule n =-      case Map.lookup n typeNatCoAxiomRules of-        Just ax -> return ax-        _  -> pprPanic "go_axiom_rule" (ppr n)- tcIfaceUnivCoProv :: IfaceUnivCoProv -> IfL UnivCoProvenance tcIfaceUnivCoProv IfaceUnsafeCoerceProv     = return UnsafeCoerceProv tcIfaceUnivCoProv (IfacePhantomProv kco)    = PhantomProv <$> tcIfaceCo kco@@ -1506,9 +1367,15 @@ -- Integer literals deserialise to (LitInteger i <error thunk>) -- so tcIfaceLit just fills in the type. -- See Note [Integer literals] in Literal-tcIfaceLit (LitInteger i _)+tcIfaceLit (LitNumber LitNumInteger i _)   = do t <- tcIfaceTyConByName integerTyConName        return (mkLitInteger i (mkTyConTy t))+-- Natural literals deserialise to (LitNatural i <error thunk>)+-- so tcIfaceLit just fills in the type.+-- See Note [Natural literals] in Literal+tcIfaceLit (LitNumber LitNumNatural i _)+  = do t <- tcIfaceTyConByName naturalTyConName+       return (mkLitNatural i (mkTyConTy t)) tcIfaceLit lit = return lit  -------------------------@@ -1804,6 +1671,16 @@ tcIfaceCoAxiom :: Name -> IfL (CoAxiom Branched) tcIfaceCoAxiom name = do { thing <- tcIfaceImplicit name                          ; return (tyThingCoAxiom thing) }+++tcIfaceCoAxiomRule :: IfLclName -> IfL CoAxiomRule+-- Unlike CoAxioms, which arise form user 'type instance' declarations,+-- there are a fixed set of CoAxiomRules,+-- currently enumerated in typeNatCoAxiomRules+tcIfaceCoAxiomRule n+  = case Map.lookup n typeNatCoAxiomRules of+        Just ax -> return ax+        _  -> pprPanic "tcIfaceCoAxiomRule" (ppr n)  tcIfaceDataCon :: Name -> IfL DataCon tcIfaceDataCon name = do { thing <- tcIfaceGlobal name
iface/TcIface.hs-boot view
@@ -8,13 +8,11 @@ import InstEnv     ( ClsInst ) import FamInstEnv  ( FamInst ) import CoreSyn     ( CoreRule )-import HscTypes    ( TypeEnv, VectInfo, IfaceVectInfo, CompleteMatch )-import Module      ( Module )+import HscTypes    ( CompleteMatch ) import Annotations ( Annotation )  tcIfaceDecl         :: Bool -> IfaceDecl -> IfL TyThing tcIfaceRules        :: Bool -> [IfaceRule] -> IfL [CoreRule]-tcIfaceVectInfo     :: Module -> TypeEnv -> IfaceVectInfo -> IfL VectInfo tcIfaceInst         :: IfaceClsInst -> IfL ClsInst tcIfaceFamInst      :: IfaceFamInst -> IfL FamInst tcIfaceAnnotations  :: [IfaceAnnotation] -> IfL [Annotation]
iface/ToIface.hs view
@@ -74,10 +74,14 @@  ---------------- toIfaceTvBndr :: TyVar -> IfaceTvBndr-toIfaceTvBndr tyvar   = ( occNameFS (getOccName tyvar)-                        , toIfaceKind (tyVarKind tyvar)-                        )+toIfaceTvBndr = toIfaceTvBndrX emptyVarSet +toIfaceTvBndrX :: VarSet -> TyVar -> IfaceTvBndr+toIfaceTvBndrX fr tyvar = ( occNameFS (getOccName tyvar)+                          , toIfaceTypeX fr (tyVarKind tyvar)+                          )++ toIfaceIdBndr :: Id -> (IfLclName, IfaceType) toIfaceIdBndr id      = (occNameFS (getOccName id),    toIfaceType (idType id)) @@ -120,7 +124,7 @@   | otherwise                  = IfaceTyVar (toIfaceTyVar tv) toIfaceTypeX fr (AppTy t1 t2)  = IfaceAppTy (toIfaceTypeX fr t1) (toIfaceTypeX fr t2) toIfaceTypeX _  (LitTy n)      = IfaceLitTy (toIfaceTyLit n)-toIfaceTypeX fr (ForAllTy b t) = IfaceForAllTy (toIfaceForAllBndr b)+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)@@ -160,8 +164,11 @@ toIfaceCoVar = occNameFS . getOccName  toIfaceForAllBndr :: TyVarBinder -> IfaceForAllBndr-toIfaceForAllBndr (TvBndr v vis) = TvBndr (toIfaceTvBndr v) vis+toIfaceForAllBndr = toIfaceForAllBndrX emptyVarSet +toIfaceForAllBndrX :: VarSet -> TyVarBinder -> IfaceForAllBndr+toIfaceForAllBndrX fr (TvBndr v vis) = TvBndr (toIfaceTvBndrX fr v) vis+ ---------------- toIfaceTyCon :: TyCon -> IfaceTyCon toIfaceTyCon tc@@ -224,7 +231,7 @@     go (AppCo co1 co2)      = IfaceAppCo  (go co1) (go co2)     go (SymCo co)           = IfaceSymCo (go co)     go (TransCo co1 co2)    = IfaceTransCo (go co1) (go co2)-    go (NthCo d co)         = IfaceNthCo d (go co)+    go (NthCo _r d co)      = IfaceNthCo d (go co)     go (LRCo lr co)         = IfaceLRCo lr (go co)     go (InstCo co arg)      = IfaceInstCo (go co) (go arg)     go (CoherenceCo c1 c2)  = IfaceCoherenceCo (go c1) (go c2)@@ -284,11 +291,20 @@     go env (FunTy _ res) (t:ts) -- No type-class args in tycon apps       = ITC_Vis (toIfaceTypeX fr t) (go env res ts) -    go env (TyVarTy tv) ts-      | Just ki <- lookupTyVar env tv = go env ki ts-    go env kind (t:ts) = WARN( True, ppr tc $$ ppr (tyConKind tc) $$ ppr ty_args )-                         ITC_Vis (toIfaceTypeX fr t) (go env kind ts) -- Ill-kinded+    go env ty ts@(t1:ts1)+      | not (isEmptyTCvSubst env)+      = go (zapTCvSubst env) (substTy env ty) ts+        -- See Note [Care with kind instantiation] in Type.hs +      | otherwise+      = -- There's a kind error in the type we are trying to print+        -- 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)+        WARN( True, ppr ty $$ ppr ts)+        ITC_Vis (toIfaceTypeX fr t1) (go env ty ts1)+ tidyToIfaceType :: TidyEnv -> Type -> IfaceType tidyToIfaceType env ty = toIfaceType (tidyType env ty) @@ -437,8 +453,15 @@       -- No need to serialise the data constructor;       -- we can recover it from the type of the dfun -toIfUnfolding _ _-  = Nothing+toIfUnfolding _ (OtherCon {}) = Nothing+  -- The binding site of an Id doesn't have OtherCon, except perhaps+  -- where we have called zapUnfolding; and that evald'ness info is+  -- not needed by importing modules++toIfUnfolding _ BootUnfolding = Nothing+  -- Can't happen; we only have BootUnfolding for imported binders++toIfUnfolding _ NoUnfolding = Nothing  {- ************************************************************************
llvmGen/Llvm/Types.hs view
@@ -154,6 +154,7 @@   -- static expressions, could split out but leave   -- for moment for ease of use. Not many of them. +  | LMTrunc LlvmStatic LlvmType        -- ^ Truncate   | LMBitc LlvmStatic LlvmType         -- ^ Pointer to Pointer conversion   | LMPtoI LlvmStatic LlvmType         -- ^ Pointer to Integer conversion   | LMAdd LlvmStatic LlvmStatic        -- ^ Constant addition operation@@ -167,6 +168,8 @@   ppr (LMStaticArray d t) = ppr t <> text " [" <> ppCommaJoin d <> char ']'   ppr (LMStaticStruc d t) = ppr t <> text "<{" <> ppCommaJoin d <> text "}>"   ppr (LMStaticPointer v) = ppr v+  ppr (LMTrunc v t)+      = ppr t <> text " trunc (" <> ppr v <> text " to " <> ppr t <> char ')'   ppr (LMBitc v t)       = ppr t <> text " bitcast (" <> ppr v <> text " to " <> ppr t <> char ')'   ppr (LMPtoI v t)@@ -277,6 +280,7 @@ getStatType (LMStaticArray _ t) = t getStatType (LMStaticStruc _ t) = t getStatType (LMStaticPointer v) = getVarType v+getStatType (LMTrunc       _ t) = t getStatType (LMBitc        _ t) = t getStatType (LMPtoI        _ t) = t getStatType (LMAdd         t _) = getStatType t@@ -560,7 +564,7 @@   ppr OptSize            = text "optsize"   ppr NoReturn           = text "noreturn"   ppr NoUnwind           = text "nounwind"-  ppr ReadNone           = text "readnone"+  ppr ReadNone           = text "readnon"   ppr ReadOnly           = text "readonly"   ppr Ssp                = text "ssp"   ppr SspReq             = text "ssqreq"
llvmGen/LlvmCodeGen/Base.hs view
@@ -26,7 +26,7 @@          cmmToLlvmType, widthToLlvmFloat, widthToLlvmInt, llvmFunTy,         llvmFunSig, llvmFunArgs, llvmStdFunAttrs, llvmFunAlign, llvmInfAlign,-        llvmPtrBits, tysToParams, llvmFunSection, padLiveArgs, isSSE,+        llvmPtrBits, tysToParams, llvmFunSection,          strCLabel_llvm, strDisplayName_llvm, strProcedureName_llvm,         getGlobalPtr, generateExternDecls,@@ -58,8 +58,6 @@ import qualified Stream  import Control.Monad (ap)-import Data.List (sort)-import Data.Maybe (mapMaybe)  -- ---------------------------------------------------------------------------- -- * Some Data Types@@ -149,58 +147,16 @@ -- | A Function's arguments llvmFunArgs :: DynFlags -> LiveGlobalRegs -> [LlvmVar] llvmFunArgs dflags live =-    map (lmGlobalRegArg dflags) (filter isPassed allRegs)+    map (lmGlobalRegArg dflags) (filter isPassed (activeStgRegs platform))     where platform = targetPlatform dflags-          allRegs = activeStgRegs platform-          paddedLive = map (\(_,r) -> r) $ padLiveArgs live-          isLive r = r `elem` alwaysLive || r `elem` paddedLive+          isLive r = not (isSSE r) || r `elem` alwaysLive || r `elem` live           isPassed r = not (isSSE r) || isLive r---isSSE :: GlobalReg -> Bool-isSSE (FloatReg _)  = True-isSSE (DoubleReg _) = True-isSSE (XmmReg _)    = True-isSSE (YmmReg _)    = True-isSSE (ZmmReg _)    = True-isSSE _             = False--sseRegNum :: GlobalReg -> Maybe Int-sseRegNum (FloatReg i)  = Just i-sseRegNum (DoubleReg i) = Just i-sseRegNum (XmmReg i)    = Just i-sseRegNum (YmmReg i)    = Just i-sseRegNum (ZmmReg i)    = Just i-sseRegNum _             = Nothing---- the bool indicates whether the global reg was added as padding.--- the returned list is not sorted in any particular order,--- but does indicate the set of live registers needed, with SSE padding.-padLiveArgs :: LiveGlobalRegs -> [(Bool, GlobalReg)]-padLiveArgs live = allRegs-    where-        sseRegNums = sort $ mapMaybe sseRegNum live-        (_, padding) = foldl assignSlots (1, []) $ sseRegNums-        allRegs = padding ++ map (\r -> (False, r)) live--        assignSlots (i, acc) regNum-            | i == regNum = -- don't need padding here-                  (i+1, acc)-            | i < regNum = let -- add padding for slots i .. regNum-1-                  numNeeded = regNum-i-                  acc' = genPad i numNeeded ++ acc-                in-                  (regNum+1, acc')-            | otherwise = error "padLiveArgs -- i > regNum ??"--        genPad start n =-            take n $ flip map (iterate (+1) start) (\i ->-                (True, FloatReg i))-                -- NOTE: Picking float should be fine for the following reasons:-                -- (1) Float aliases with all the other SSE register types on-                -- the given platform.-                -- (2) The argument is not live anyways.-+          isSSE (FloatReg _)  = True+          isSSE (DoubleReg _) = True+          isSSE (XmmReg _)    = True+          isSSE (YmmReg _)    = True+          isSSE (ZmmReg _)    = True+          isSSE _             = False  -- | Llvm standard fun attributes llvmStdFunAttrs :: [LlvmFuncAttr]
llvmGen/LlvmCodeGen/CodeGen.hs view
@@ -14,7 +14,7 @@ import LlvmCodeGen.Regs  import BlockId-import CodeGen.Platform ( activeStgRegs )+import CodeGen.Platform ( activeStgRegs, callerSaves ) import CLabel import Cmm import PprCmm@@ -211,6 +211,7 @@     fptr    <- liftExprData $ getFunPtr funTy t     argVars' <- castVarsW Signed $ zip argVars argTy +    doTrashStmts     let argSuffix = [mkIntLit i32 0, mkIntLit i32 localityInt, mkIntLit i32 1]     statement $ Expr $ Call StdCall fptr (argVars' ++ argSuffix) []   | otherwise = panic $ "prefetch locality level integer must be between 0 and 3, given: " ++ (show localityInt)@@ -293,6 +294,7 @@     fptr          <- getFunPtrW funTy t     argVars' <- castVarsW Signed $ zip argVars argTy +    doTrashStmts     let alignVal = mkIntLit i32 align         arguments = argVars' ++ (alignVal:isVolVal)     statement $ Expr $ Call StdCall fptr arguments []@@ -375,6 +377,9 @@ genCall t@(PrimTarget (MO_Add2 w)) [dstO, dstV] [lhs, rhs] =     genCallWithOverflow t w [dstV, dstO] [lhs, rhs] +genCall t@(PrimTarget (MO_AddWordC w)) [dstV, dstO] [lhs, rhs] =+    genCallWithOverflow t w [dstV, dstO] [lhs, rhs]+ genCall t@(PrimTarget (MO_SubWordC w)) [dstV, dstO] [lhs, rhs] =     genCallWithOverflow t w [dstV, dstO] [lhs, rhs] @@ -444,6 +449,7 @@                  | never_returns     = statement $ Unreachable                  | otherwise         = return () +    doTrashStmts      -- make the actual call     case retTy of@@ -487,6 +493,7 @@     let valid = op `elem`   [ MO_Add2 w                             , MO_AddIntC w                             , MO_SubIntC w+                            , MO_AddWordC w                             , MO_SubWordC w                             ]     MASSERT(valid)@@ -564,7 +571,8 @@     (argsV, stmts2, top2)       <- arg_vars args_hints ([], nilOL, [])     (argsV', stmts4)            <- castVars Signed $ zip argsV [width]     (retV, s1)                  <- doExpr width $ Call StdCall fptr argsV' []-    ([retV'], stmts5)           <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)]+    (retVs', stmts5)            <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)]+    let retV'                    = singletonPanic "genCallSimpleCast" retVs'     let s2                       = Store retV' dstV      let stmts = stmts2 `appOL` stmts4 `snocOL`@@ -595,7 +603,8 @@     (argsV, stmts2, top2)       <- arg_vars args_hints ([], nilOL, [])     (argsV', stmts4)            <- castVars Signed $ zip argsV (const width <$> argsV)     (retV, s1)                  <- doExpr width $ Call StdCall fptr argsV' []-    ([retV'], stmts5)           <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)]+    (retVs', stmts5)             <- castVars (cmmPrimOpRetValSignage op) [(retV,dstTy)]+    let retV'                    = singletonPanic "genCallSimpleCast2" retVs'     let s2                       = Store retV' dstV      let stmts = stmts2 `appOL` stmts4 `snocOL`@@ -797,6 +806,8 @@                              ++ showSDoc dflags (ppr $ widthToLlvmInt w)     MO_Add2 w       -> fsLit $ "llvm.uadd.with.overflow."                              ++ showSDoc dflags (ppr $ widthToLlvmInt w)+    MO_AddWordC w   -> fsLit $ "llvm.uadd.with.overflow."+                             ++ showSDoc dflags (ppr $ widthToLlvmInt w)     MO_SubWordC w   -> fsLit $ "llvm.usub.with.overflow."                              ++ showSDoc dflags (ppr $ widthToLlvmInt w) @@ -1266,7 +1277,8 @@          negateVec ty v2 negOp = do             (vx, stmts1, top) <- exprToVar x-            ([vx'], stmts2) <- castVars Signed [(vx, ty)]+            (vxs', stmts2) <- castVars Signed [(vx, ty)]+            let vx' = singletonPanic "genMachOp: negateVec" vxs'             (v1, s1) <- doExpr ty $ LlvmOp negOp v2 vx'             return (v1, stmts1 `appOL` stmts2 `snocOL` s1, top) @@ -1329,7 +1341,8 @@ genMachOp_slow _ (MO_V_Extract l w) [val, idx] = runExprData $ do     vval <- exprToVarW val     vidx <- exprToVarW idx-    [vval'] <- castVarsW Signed [(vval, LMVector l ty)]+    vval' <- singletonPanic "genMachOp_slow" <$>+             castVarsW Signed [(vval, LMVector l ty)]     doExprW ty $ Extract vval' vidx   where     ty = widthToLlvmInt w@@ -1337,7 +1350,8 @@ genMachOp_slow _ (MO_VF_Extract l w) [val, idx] = runExprData $ do     vval <- exprToVarW val     vidx <- exprToVarW idx-    [vval'] <- castVarsW Signed [(vval, LMVector l ty)]+    vval' <- singletonPanic "genMachOp_slow" <$>+             castVarsW Signed [(vval, LMVector l ty)]     doExprW ty $ Extract vval' vidx   where     ty = widthToLlvmFloat w@@ -1347,7 +1361,8 @@     vval <- exprToVarW val     velt <- exprToVarW elt     vidx <- exprToVarW idx-    [vval'] <- castVarsW Signed [(vval, ty)]+    vval' <- singletonPanic "genMachOp_slow" <$>+             castVarsW Signed [(vval, ty)]     doExprW ty $ Insert vval' velt vidx   where     ty = LMVector l (widthToLlvmInt w)@@ -1356,7 +1371,8 @@     vval <- exprToVarW val     velt <- exprToVarW elt     vidx <- exprToVarW idx-    [vval'] <- castVarsW Signed [(vval, ty)]+    vval' <- singletonPanic "genMachOp_slow" <$>+             castVarsW Signed [(vval, ty)]     doExprW ty $ Insert vval' velt vidx   where     ty = LMVector l (widthToLlvmFloat w)@@ -1468,8 +1484,10 @@         binCastLlvmOp ty binOp = runExprData $ do             vx <- exprToVarW x             vy <- exprToVarW y-            [vx', vy'] <- castVarsW Signed [(vx, ty), (vy, ty)]-            doExprW ty $ binOp vx' vy'+            vxy' <- castVarsW Signed [(vx, ty), (vy, ty)]+            case vxy' of+              [vx',vy'] -> doExprW ty $ binOp vx' vy'+              _         -> panic "genMachOp_slow: binCastLlvmOp"          -- | Need to use EOption here as Cmm expects word size results from         -- comparisons while LLVM return i1. Need to extend to llvmWord type@@ -1712,7 +1730,7 @@     (v1, s1) <- doExpr (getVarType vlbl) $ LlvmOp LM_MO_Add vlbl voff     return (v1, stmts `snocOL` s1, stat) -genLit opt (CmmLabelDiffOff l1 l2 off) = do+genLit opt (CmmLabelDiffOff l1 l2 off w) = do     dflags <- getDynFlags     (vl1, stmts1, stat1) <- genLit opt (CmmLabel l1)     (vl2, stmts2, stat2) <- genLit opt (CmmLabel l2)@@ -1721,13 +1739,17 @@     let ty2 = getVarType vl2     if (isInt ty1) && (isInt ty2)        && (llvmWidthInBits dflags ty1 == llvmWidthInBits dflags ty2)-        then do             (v1, s1) <- doExpr (getVarType vl1) $ LlvmOp LM_MO_Sub vl1 vl2             (v2, s2) <- doExpr (getVarType v1 ) $ LlvmOp LM_MO_Add v1 voff-            return (v2, stmts1 `appOL` stmts2 `snocOL` s1 `snocOL` s2,-                        stat1 ++ stat2)-+            let ty = widthToLlvmInt w+            let stmts = stmts1 `appOL` stmts2 `snocOL` s1 `snocOL` s2+            if w /= wordWidth dflags+              then do+                (v3, s3) <- doExpr ty $ Cast LM_Trunc v2 ty+                return (v3, stmts `snocOL` s3, stat1 ++ stat2)+              else+                return (v2, stmts, stat1 ++ stat2)         else             panic "genLit: CmmLabelDiffOff encountered with different label ty!" @@ -1756,9 +1778,12 @@ funPrologue :: LiveGlobalRegs -> [CmmBlock] -> LlvmM StmtData funPrologue live cmmBlocks = do +  trash <- getTrashRegs   let getAssignedRegs :: CmmNode O O -> [CmmReg]       getAssignedRegs (CmmAssign reg _)  = [reg]-      getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmLocal rs+      -- Calls will trash all registers. Unfortunately, this needs them to+      -- be stack-allocated in the first place.+      getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmGlobal trash ++ map CmmLocal rs       getAssignedRegs _                  = []       getRegsBlock (_, body, _)          = concatMap getAssignedRegs $ blockToList body       assignedRegs = nub $ concatMap (getRegsBlock . blockSplit) cmmBlocks@@ -1788,9 +1813,14 @@ funEpilogue :: LiveGlobalRegs -> LlvmM ([LlvmVar], LlvmStatements) funEpilogue live = do -    -- the bool indicates whether the register is padding.-    let alwaysNeeded = map (\r -> (False, r)) alwaysLive-        livePadded = alwaysNeeded ++ padLiveArgs live+    -- Have information and liveness optimisation is enabled?+    let liveRegs = alwaysLive ++ live+        isSSE (FloatReg _)  = True+        isSSE (DoubleReg _) = True+        isSSE (XmmReg _)    = True+        isSSE (YmmReg _)    = True+        isSSE (ZmmReg _)    = True+        isSSE _             = False      -- Set to value or "undef" depending on whether the register is     -- actually live@@ -1802,17 +1832,39 @@           let ty = (pLower . getVarType $ lmGlobalRegVar dflags r)           return (Just $ LMLitVar $ LMUndefLit ty, nilOL)     platform <- getDynFlag targetPlatform-    let allRegs = activeStgRegs platform-    loads <- flip mapM allRegs $ \r -> case () of-      _ | (False, r) `elem` livePadded-                             -> loadExpr r   -- if r is not padding, load it-        | not (isSSE r) || (True, r) `elem` livePadded-                             -> loadUndef r+    loads <- flip mapM (activeStgRegs platform) $ \r -> case () of+      _ | r `elem` liveRegs  -> loadExpr r+        | not (isSSE r)      -> loadUndef r         | otherwise          -> return (Nothing, nilOL)      let (vars, stmts) = unzip loads     return (catMaybes vars, concatOL stmts) ++-- | A series of statements to trash all the STG registers.+--+-- In LLVM we pass the STG registers around everywhere in function calls.+-- So this means LLVM considers them live across the entire function, when+-- in reality they usually aren't. For Caller save registers across C calls+-- the saving and restoring of them is done by the Cmm code generator,+-- using Cmm local vars. So to stop LLVM saving them as well (and saving+-- all of them since it thinks they're always live, we trash them just+-- before the call by assigning the 'undef' value to them. The ones we+-- need are restored from the Cmm local var and the ones we don't need+-- are fine to be trashed.+getTrashStmts :: LlvmM LlvmStatements+getTrashStmts = do+  regs <- getTrashRegs+  stmts <- flip mapM regs $ \ r -> do+    reg <- getCmmReg (CmmGlobal r)+    let ty = (pLower . getVarType) reg+    return $ Store (LMLitVar $ LMUndefLit ty) reg+  return $ toOL stmts++getTrashRegs :: LlvmM [GlobalReg]+getTrashRegs = do plat <- getLlvmPlatform+                  return $ filter (callerSaves plat) (activeStgRegs plat)+ -- | Get a function pointer to the CLabel specified. -- -- This is for Haskell functions, function type is assumed, so doesn't work@@ -1934,3 +1986,12 @@ genLoadW :: Atomic -> CmmExpr -> CmmType -> WriterT LlvmAccum LlvmM LlvmVar genLoadW atomic e ty = liftExprData $ genLoad atomic e ty +doTrashStmts :: WriterT LlvmAccum LlvmM ()+doTrashStmts = do+    stmts <- lift getTrashStmts+    tell $ LlvmAccum stmts mempty++-- | Return element of single-element list; 'panic' if list is not a single-element list+singletonPanic :: String -> [a] -> a+singletonPanic _ [x] = x+singletonPanic s _ = panic s
llvmGen/LlvmCodeGen/Data.hs view
@@ -148,12 +148,14 @@     let offset = LMStaticLit $ LMIntLit (toInteger off) (llvmWord dflags)     return $ LMAdd var offset -genStaticLit (CmmLabelDiffOff l1 l2 off) = do+genStaticLit (CmmLabelDiffOff l1 l2 off w) = do     dflags <- getDynFlags     var1 <- genStaticLit (CmmLabel l1)     var2 <- genStaticLit (CmmLabel l2)-    let var = LMSub var1 var2-        offset = LMStaticLit $ LMIntLit (toInteger off) (llvmWord dflags)+    let var+          | w == wordWidth dflags = LMSub var1 var2+          | otherwise = LMTrunc (LMSub var1 var2) (widthToLlvmInt w)+        offset = LMStaticLit $ LMIntLit (toInteger off) (LMInt $ widthInBits w)     return $ LMAdd var offset  genStaticLit (CmmBlock b) = genStaticLit $ CmmLabel $ infoTblLbl b
main/Ar.hs view
@@ -95,7 +95,8 @@         st_size <- getPaddedInt <$> getByteString 10         end     <- getByteString 2         when (end /= "\x60\x0a") $-          fail "Invalid archive header end marker"+          fail ("[BSD Archive] Invalid archive header end marker for name: " +++                C.unpack name)         off1    <- liftM fromIntegral bytesRead :: Get Int         -- BSD stores extended filenames, by writing #1/<length> into the         -- name field, the first @length@ bytes then represent the file name@@ -106,6 +107,10 @@                         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)+        when (odd st_size) $+          void (getByteString 1)+         rest    <- getBSDArchEntries         return $ (ArchiveEntry name time own grp mode (st_size - (off2 - off1)) file) : rest @@ -128,8 +133,12 @@       st_size <- getPaddedInt <$> getByteString 10       end     <- getByteString 2       when (end /= "\x60\x0a") $-        fail "Invalid archive header end marker"+        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)+      when (odd st_size) $+        void (getByteString 1)       name <- return . C.unpack $         if C.unpack (C.take 1 name) == "/"         then case C.takeWhile (/= ' ') name of
main/CodeOutput.hs view
@@ -38,7 +38,6 @@ import System.Directory import System.FilePath import System.IO-import Control.Monad (forM)  {- ************************************************************************@@ -53,7 +52,7 @@            -> FilePath            -> ModLocation            -> ForeignStubs-           -> [(ForeignSrcLang, String)]+           -> [(ForeignSrcLang, FilePath)]            -- ^ additional files to be compiled with with the C compiler            -> [InstalledUnitId]            -> Stream IO RawCmmGroup ()                       -- Compiled C--@@ -61,7 +60,7 @@                   (Bool{-stub_h_exists-}, Maybe FilePath{-stub_c_exists-}),                   [(ForeignSrcLang, FilePath)]{-foreign_fps-}) -codeOutput dflags this_mod filenm location foreign_stubs foreign_files pkg_deps+codeOutput dflags this_mod filenm location foreign_stubs foreign_fps pkg_deps   cmm_stream   =     do  {@@ -89,10 +88,6 @@                 }          ; stubs_exist <- outputForeignStubs dflags this_mod location foreign_stubs-        ; foreign_fps <- forM foreign_files $ \(lang, file_contents) -> do-            { fp <- outputForeignFile dflags lang file_contents;-            ; return (lang, fp);-            }         ; case hscTarget dflags of {              HscAsm         -> outputAsm dflags this_mod location filenm                                          linted_cmm_stream;@@ -270,14 +265,3 @@    = do writeFile fname (header ++ doc_str ++ '\n':footer ++ "\n")         return True -outputForeignFile :: DynFlags -> ForeignSrcLang -> String -> IO FilePath-outputForeignFile dflags lang file_contents- = do-   extension <- case lang of-     LangC -> return "c"-     LangCxx -> return "cpp"-     LangObjc -> return "m"-     LangObjcxx -> return "mm"-   fp <- newTempName dflags TFL_CurrentModule extension-   writeFile fp file_contents-   return fp
main/DriverPhases.hs view
@@ -289,8 +289,8 @@ phaseInputExt LlvmLlc             = "bc" phaseInputExt LlvmMangle          = "lm_s" phaseInputExt SplitAs             = "split_s"-phaseInputExt CmmCpp              = "cmm"-phaseInputExt Cmm                 = "cmmcpp"+phaseInputExt CmmCpp              = "cmmcpp"+phaseInputExt Cmm                 = "cmm" phaseInputExt MergeForeign        = "o" phaseInputExt StopLn              = "o" 
main/DriverPipeline.hs view
@@ -70,9 +70,10 @@ import System.FilePath import System.IO import Control.Monad-import Data.List        ( isSuffixOf, intercalate )+import Data.List        ( isInfixOf, isSuffixOf, intercalate ) import Data.Maybe import Data.Version+import Data.Either      ( partitionEithers )  -- --------------------------------------------------------------------------- -- Pre-process@@ -264,9 +265,8 @@        old_paths   = includePaths dflags1        prevailing_dflags = hsc_dflags hsc_env0        dflags =-          dflags1 { includePaths = current_dir : old_paths-                  , log_action = log_action prevailing_dflags-                  , log_finaliser = log_finaliser prevailing_dflags }+          dflags1 { includePaths = addQuoteInclude old_paths [current_dir]+                  , log_action = log_action prevailing_dflags }                   -- use the prevailing log_action / log_finaliser,                   -- not the one cached in the summary.  This is so                   -- that we can change the log_action without having@@ -301,12 +301,14 @@ -- useful to implement facilities such as inline-c.  compileForeign :: HscEnv -> ForeignSrcLang -> FilePath -> IO FilePath+compileForeign _ RawObject object_file = return object_file compileForeign hsc_env lang stub_c = do         let phase = case lang of               LangC -> Cc               LangCxx -> Ccxx               LangObjc -> Cobjc               LangObjcxx -> Cobjcxx+              RawObject -> panic "compileForeign: should be unreachable"         (_, stub_o) <- runPipeline StopLn hsc_env                        (stub_c, Just (RealPhase phase))                        Nothing (Temporary TFL_GhcSession)@@ -453,7 +455,7 @@         -- first check object files and extra_ld_inputs         let extra_ld_inputs = [ f | FileOption _ f <- ldInputs dflags ]         e_extra_times <- mapM (tryIO . getModificationUTCTime) extra_ld_inputs-        let (errs,extra_times) = splitEithers e_extra_times+        let (errs,extra_times) = partitionEithers e_extra_times         let obj_times =  map linkableTime linkables ++ extra_times         if not (null errs) || any (t <) obj_times             then return True@@ -469,7 +471,7 @@         if any isNothing pkg_libfiles then return True else do         e_lib_times <- mapM (tryIO . getModificationUTCTime)                           (catMaybes pkg_libfiles)-        let (lib_errs,lib_times) = splitEithers e_lib_times+        let (lib_errs,lib_times) = partitionEithers e_lib_times         if not (null lib_errs) || any (t <) lib_times            then return True            else checkLinkInfo dflags pkg_deps exe_file@@ -820,7 +822,8 @@     ++ [("", "-filetype=obj") | fastLlvmPipeline dflags ]      -- Additional llc flags-    ++ [("", "-mcpu=" ++ mcpu)   | not (null mcpu) ]+    ++ [("", "-mcpu=" ++ mcpu)   | not (null mcpu)+                                 , not (any (isInfixOf "-mcpu") (getOpts dflags opt_lc)) ]     ++ [("", "-mattr=" ++ attrs) | not (null attrs) ]    where target = LLVM_TARGET@@ -989,8 +992,9 @@   -- the .hs files resides) to the include path, since this is   -- what gcc does, and it's probably what you want.         let current_dir = takeDirectory basename+            new_includes = addQuoteInclude paths [current_dir]             paths = includePaths dflags0-            dflags = dflags0 { includePaths = current_dir : paths }+            dflags = dflags0 { includePaths = new_includes }          setDynFlags dflags @@ -1157,8 +1161,11 @@         -- files; this is the Value Add(TM) that using ghc instead of         -- gcc gives you :)         pkg_include_dirs <- liftIO $ getPackageIncludePath dflags pkgs-        let include_paths = foldr (\ x xs -> ("-I" ++ x) : xs) []-                              (cmdline_include_paths ++ pkg_include_dirs)+        let include_paths_global = foldr (\ x xs -> ("-I" ++ x) : xs) []+              (includePathsGlobal cmdline_include_paths ++ pkg_include_dirs)+        let include_paths_quote = foldr (\ x xs -> ("-iquote" ++ x) : xs) []+              (includePathsQuote cmdline_include_paths)+        let include_paths = include_paths_quote ++ include_paths_global          let gcc_extra_viac_flags = extraGccViaCFlags dflags         let pic_c_flags = picCCOpts dflags@@ -1321,10 +1328,13 @@         liftIO $ createDirectoryIfMissing True (takeDirectory output_fn)          ccInfo <- liftIO $ getCompilerInfo dflags+        let global_includes = [ SysTools.Option ("-I" ++ p)+                              | p <- includePathsGlobal cmdline_include_paths ]+        let local_includes = [ SysTools.Option ("-iquote" ++ p)+                             | p <- includePathsQuote cmdline_include_paths ]         let runAssembler inputFilename outputFilename                 = liftIO $ as_prog dflags-                       ([ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ]-+                       (local_includes ++ global_includes                        -- See Note [-fPIC for assembler]                        ++ map SysTools.Option pic_c_flags @@ -1464,10 +1474,12 @@   where         -- we always (unless -optlo specified) run Opt since we rely on it to         -- fix up some pretty big deficiencies in the code we generate-        llvmOpts = case optLevel dflags of-          0 -> "-mem2reg -globalopt -lower-expect"-          1 -> "-O1 -globalopt"-          _ -> "-O2"+        optIdx = max 0 $ min 2 $ optLevel dflags  -- ensure we're in [0,2]+        llvmOpts = case lookup optIdx $ llvmPasses dflags of+                    Just passes -> passes+                    Nothing -> panic ("runPhase LlvmOpt: llvm-passes file "+                                      ++ "is missing passes for level "+                                      ++ show optIdx)          -- don't specify anything if user has specified commands. We do this         -- for opt but not llc since opt is very specifically for optimisation@@ -1670,7 +1682,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  -Wl takes a comma-separated list of options which in the case of--Wl,-rpath -Wl,some,path,with,commas parses the the path with commas+-Wl,-rpath -Wl,some,path,with,commas parses the path with commas as separate options. Buck, the build system, produces paths with commas in them. @@ -1732,6 +1744,16 @@               in ["-L" ++ l] ++ ["-Xlinker", "-rpath", "-Xlinker", libpath]          | otherwise = ["-L" ++ l] +    pkg_lib_path_opts <-+      if gopt Opt_SingleLibFolder dflags+      then do+        libs <- getLibs dflags dep_packages+        tmpDir <- newTempDir dflags+        sequence_ [ copyFile lib (tmpDir </> basename)+                  | (lib, basename) <- libs]+        return [ "-L" ++ tmpDir ]+      else pure pkg_lib_path_opts+     let       dead_strip         | gopt Opt_WholeArchiveHsLibs dflags = []@@ -1872,6 +1894,9 @@                       ++ pkg_framework_opts                       ++ debug_opts                       ++ thread_opts+                      ++ (if platformOS platform == OSDarwin+                          then [ "-Wl,-dead_strip_dylibs" ]+                          else [])                     ))  exeFileName :: Bool -> DynFlags -> FilePath@@ -1995,8 +2020,11 @@     let cmdline_include_paths = includePaths dflags      pkg_include_dirs <- getPackageIncludePath dflags []-    let include_paths = foldr (\ x xs -> "-I" : x : xs) []-                          (cmdline_include_paths ++ pkg_include_dirs)+    let include_paths_global = foldr (\ x xs -> ("-I" ++ x) : xs) []+          (includePathsGlobal cmdline_include_paths ++ pkg_include_dirs)+    let include_paths_quote = foldr (\ x xs -> ("-iquote" ++ x) : xs) []+          (includePathsQuote cmdline_include_paths)+    let include_paths = include_paths_quote ++ include_paths_global      let verbFlags = getVerbFlags dflags 
main/DynFlags.hs view
@@ -24,7 +24,7 @@         WarningFlag(..), WarnReason(..),         Language(..),         PlatformConstants(..),-        FatalMessager, LogAction, LogFinaliser, FlushOut(..), FlushErr(..),+        FatalMessager, LogAction, FlushOut(..), FlushErr(..),         ProfAuto(..),         glasgowExtsFlags,         warningGroups, warningHierarchies,@@ -36,6 +36,7 @@         xopt, xopt_set, xopt_unset,         lang_set,         useUnicodeSyntax,+        useStarIsType,         whenGeneratingDynamicToo, ifGeneratingDynamicToo,         whenCannotGenerateDynamicToo,         dynamicTooMkDynamicDynFlags,@@ -59,6 +60,7 @@         tablesNextToCode, mkTablesNextToCode,         makeDynFlagsConsistent,         shouldUseColor,+        shouldUseHexWordLiterals,         positionIndependent,         optimisationFlags, @@ -78,7 +80,7 @@         unsafeFlags, unsafeFlagsForInfer,          -- ** LLVM Targets-        LlvmTarget(..), LlvmTargets,+        LlvmTarget(..), LlvmTargets, LlvmPasses, LlvmConfig,          -- ** System tool settings and locations         Settings(..),@@ -89,6 +91,7 @@         pgm_L, pgm_P, pgm_F, pgm_c, pgm_s, 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,+        opt_P_signature,         opt_windres, opt_lo, opt_lc, opt_lcc,          -- ** Manipulating DynFlags@@ -112,6 +115,7 @@         setUnitId,         interpretPackageEnv,         canonicalizeHomeModule,+        canonicalizeModuleIfHome,          -- ** Parsing DynFlags         parseDynamicFlagsCmdLine,@@ -164,7 +168,10 @@         CompilerInfo(..),          -- * File cleanup-        FilesToClean(..), emptyFilesToClean+        FilesToClean(..), emptyFilesToClean,++        -- * Include specifications+        IncludeSpecs(..), addGlobalInclude, addQuoteInclude, flattenIncludes   ) where  #include "HsVersions.h"@@ -175,6 +182,7 @@ import PlatformConstants import Module import PackageConfig+import {-# SOURCE #-} Plugins import {-# SOURCE #-} Hooks import {-# SOURCE #-} PrelNames ( mAIN ) import {-# SOURCE #-} Packages (PackageState, emptyPackageState)@@ -192,14 +200,15 @@ import SrcLoc import BasicTypes       ( IntWithInf, treatZeroAsInf ) import FastString+import Fingerprint import Outputable import Foreign.C        ( CInt(..) ) import System.IO.Unsafe ( unsafeDupablePerformIO ) import {-# SOURCE #-} ErrUtils ( Severity(..), MsgDoc, mkLocMessageAnn-                               , getCaretDiagnostic, dumpSDoc )+                               , getCaretDiagnostic ) import Json import SysTools.Terminal ( stderrSupportsAnsiColors )-import SysTools.BaseDir ( expandTopDir )+import SysTools.BaseDir ( expandToolDir, expandTopDir )  import System.IO.Unsafe ( unsafePerformIO ) import Data.IORef@@ -347,6 +356,7 @@    | Opt_D_dump_core_stats    | Opt_D_dump_deriv    | Opt_D_dump_ds+   | Opt_D_dump_ds_preopt    | Opt_D_dump_foreign    | Opt_D_dump_inlinings    | Opt_D_dump_rule_firings@@ -385,7 +395,6 @@    | Opt_D_dump_splices    | Opt_D_th_dec_file    | Opt_D_dump_BCOs-   | Opt_D_dump_vect    | Opt_D_dump_ticked    | Opt_D_dump_rtti    | Opt_D_source_stats@@ -437,11 +446,12 @@    | Opt_CallArity    | Opt_Exitification    | Opt_Strictness-   | Opt_LateDmdAnal+   | Opt_LateDmdAnal                    -- #6087    | Opt_KillAbsence    | Opt_KillOneShot    | Opt_FullLaziness    | Opt_FloatIn+   | Opt_LateSpecialise    | Opt_Specialise    | Opt_SpecialiseAggressively    | Opt_CrossModuleSpecialise@@ -460,8 +470,6 @@    | Opt_UnboxSmallStrictFields    | Opt_DictsCheap    | Opt_EnableRewriteRules             -- Apply rewrite rules during simplification-   | Opt_Vectorise-   | Opt_VectorisationAvoidance    | 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@@ -471,6 +479,7 @@    | Opt_IrrefutableTuples    | Opt_CmmSink    | Opt_CmmElimCommonBlocks+   | Opt_AsmShortcutting    | Opt_OmitYields    | Opt_FunToThunk               -- allow WwLib.mkWorkerArgs to remove all value lambdas    | Opt_DictsStrict                     -- be strict in argument dictionaries@@ -481,6 +490,7 @@    | Opt_SolveConstantDicts    | Opt_AlignmentSanitisation    | Opt_CatchBottoms+   | Opt_NumConstantFolding     -- PreInlining is on by default. The option is there just to see how    -- bad things get if you turn it off!@@ -523,7 +533,9 @@    | Opt_IgnoreDotGhci    | Opt_GhciSandbox    | Opt_GhciHistory+   | Opt_GhciLeakCheck    | Opt_LocalGhciHistory+   | Opt_NoIt    | Opt_HelpfulErrors    | Opt_DeferTypeErrors    | Opt_DeferTypedHoles@@ -531,6 +543,7 @@    | Opt_PIC                         -- ^ @-fPIC@    | Opt_PIE                         -- ^ @-fPIE@    | Opt_PICExecutable               -- ^ @-pie@+   | Opt_ExternalDynamicRefs    | Opt_SccProfilingOn    | Opt_Ticky    | Opt_Ticky_Allocd@@ -544,6 +557,13 @@    | Opt_OptimalApplicativeDo    | Opt_VersionMacros    | Opt_WholeArchiveHsLibs+   -- copy all libs into a single folder prior to linking binaries+   -- this should elivate the excessive command line limit restrictions+   -- on windows, by only requiring a single -L argument instead of+   -- one for each dependency.  At the time of this writing, gcc+   -- forwards all -L flags to the collect2 command without using a+   -- response file and as such breaking apart.+   | Opt_SingleLibFolder     -- output style opts    | Opt_ErrorSpans -- Include full span info in error messages,@@ -552,7 +572,23 @@    | Opt_PprCaseAsLet    | Opt_PprShowTicks    | Opt_ShowHoleConstraints+    -- Options relating to the display of valid hole fits+    -- when generating an error message for a typed hole+    -- See Note [Valid hole fits include] in TcHoleErrors.hs+   | Opt_ShowValidHoleFits+   | Opt_SortValidHoleFits+   | Opt_SortBySizeHoleFits+   | Opt_SortBySubsumHoleFits+   | Opt_AbstractRefHoleFits+   | Opt_UnclutterValidHoleFits+   | Opt_ShowTypeAppOfHoleFits+   | Opt_ShowTypeAppVarsOfHoleFits+   | Opt_ShowTypeOfHoleFits+   | Opt_ShowProvOfHoleFits+   | Opt_ShowMatchesOfHoleFits+    | Opt_ShowLoadedModules+   | Opt_HexWordLiterals -- See Note [Print Hexadecimal Literals]     -- Suppress all coercions, them replacing with '...'    | Opt_SuppressCoercions@@ -574,6 +610,7 @@    | Opt_SuppressUniques    | Opt_SuppressStgFreeVars    | Opt_SuppressTicks     -- Replaces Opt_PprShowTicks+   | Opt_SuppressTimestamps -- ^ Suppress timestamps in dumps     -- temporary flags    | Opt_AutoLinkPackages@@ -617,6 +654,7 @@    , Opt_KillOneShot    , Opt_FullLaziness    , Opt_FloatIn+   , Opt_LateSpecialise    , Opt_Specialise    , Opt_SpecialiseAggressively    , Opt_CrossModuleSpecialise@@ -635,8 +673,6 @@    , Opt_UnboxSmallStrictFields    , Opt_DictsCheap    , Opt_EnableRewriteRules-   , Opt_Vectorise-   , Opt_VectorisationAvoidance    , Opt_RegsGraph    , Opt_RegsIterative    , Opt_PedanticBottoms@@ -646,6 +682,7 @@    , Opt_IrrefutableTuples    , Opt_CmmSink    , Opt_CmmElimCommonBlocks+   , Opt_AsmShortcutting    , Opt_OmitYields    , Opt_FunToThunk    , Opt_DictsStrict@@ -669,6 +706,33 @@   | ErrReason !(Maybe WarningFlag)   deriving Show +-- | 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.+data IncludeSpecs+  = IncludeSpecs { includePathsQuote  :: [String]+                 , includePathsGlobal :: [String]+                 }+  deriving Show++-- | Append to the list of includes a path that shall be included using `-I`+-- when the C compiler is called. These paths override system search paths.+addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs+addGlobalInclude spec paths  = let f = includePathsGlobal spec+                               in spec { includePathsGlobal = f ++ paths }++-- | Append to the list of includes a path that shall be included using+-- `-iquote` when the C compiler is called. These paths only apply when quoted+-- includes are used. e.g. #include "foo.h"+addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs+addQuoteInclude spec paths  = let f = includePathsQuote spec+                              in spec { includePathsQuote = f ++ paths }++-- | Concatenate and flatten the list of global and quoted includes returning+-- just a flat list of paths.+flattenIncludes :: IncludeSpecs -> [String]+flattenIncludes specs = includePathsQuote specs ++ includePathsGlobal specs+ instance Outputable WarnReason where   ppr = text . show @@ -748,6 +812,10 @@    | Opt_WarnMissingHomeModules           -- Since 8.2    | Opt_WarnPartialFields                -- Since 8.4    | Opt_WarnMissingExportList+   | Opt_WarnInaccessibleCode+   | Opt_WarnStarIsType                   -- Since 8.6+   | Opt_WarnStarBinder                   -- Since 8.6+   | Opt_WarnImplicitKindVars             -- Since 8.6    deriving (Eq, Show, Enum)  data Language = Haskell98 | Haskell2010@@ -781,6 +849,7 @@   hscTarget             :: HscTarget,   settings              :: Settings,   llvmTargets           :: LlvmTargets,+  llvmPasses            :: LlvmPasses,   verbosity             :: Int,         -- ^ Verbosity level: see Note [Verbosity levels]   optLevel              :: Int,         -- ^ Optimisation level   debugLevel            :: Int,         -- ^ How much debug information to produce@@ -788,6 +857,7 @@   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    parMakeCount          :: Maybe Int,   -- ^ The number of modules to compile in parallel@@ -799,8 +869,14 @@    maxRelevantBinds      :: Maybe Int,   -- ^ Maximum number of bindings from the type envt                                         --   to show in type error messages-  maxValidSubstitutions :: Maybe Int,   -- ^ Maximum number of substitutions-                                        --   to show in type error messages+  maxValidHoleFits      :: Maybe Int,   -- ^ Maximum number of hole fits to show+                                        --   in typed hole error messages+  maxRefHoleFits        :: Maybe Int,   -- ^ Maximum number of refinement hole+                                        --   fits to show in typed hole error+                                        --   messages+  refLevelHoleFits      :: Maybe Int,   -- ^ Maximum level of refinement for+                                        --   refinement hole fits in typed hole+                                        --   error messages   maxUncoveredPatterns  :: Int,         -- ^ Maximum number of unmatched patterns to show                                         --   in non-exhaustiveness warnings   simplTickFactor       :: Int,         -- ^ Multiplier for simplifier ticks@@ -812,6 +888,8 @@   floatLamArgs          :: Maybe Int,   -- ^ Arg count for lambda floating                                         --   See CoreMonad.FloatOutSwitches +  cmmProcAlignment      :: Maybe Int,   -- ^ Align Cmm functions at this boundary or use default.+   historySize           :: Int,         -- ^ Simplification history size    importPaths           :: [FilePath],@@ -862,7 +940,7 @@    ldInputs              :: [Option], -  includePaths          :: [String],+  includePaths          :: IncludeSpecs,   libraryPaths          :: [String],   frameworkPaths        :: [String],    -- used on darwin only   cmdlineFrameworks     :: [String],    -- ditto@@ -879,6 +957,12 @@   frontendPluginOpts    :: [String],     -- ^ the @-ffrontend-opt@ flags given on the command line, in *reverse*     -- order that they're specified on the command line.+  plugins               :: [LoadedPlugin],+    -- ^ plugins loaded after processing arguments. What will be loaded here+    -- is directed by pluginModNames. Arguments are loaded from+    -- pluginModNameOpts. The purpose of this field is to cache the plugins so+    -- they don't have to be loaded each time they are needed.+    -- See 'DynamicLoading.initializePlugins'.    -- GHC API hooks   hooks                 :: Hooks,@@ -976,9 +1060,7 @@   ghciHistSize          :: Int,    -- | MsgDoc output action: use "ErrUtils" instead of this if you can-  initLogAction         :: IO (Maybe LogOutput),   log_action            :: LogAction,-  log_finaliser         :: LogFinaliser,   flushOut              :: FlushOut,   flushErr              :: FlushErr, @@ -1086,12 +1168,15 @@   }  type LlvmTargets = [(String, LlvmTarget)]+type LlvmPasses = [(Int, String)]+type LlvmConfig = (LlvmTargets, LlvmPasses)  data Settings = Settings {-  sTargetPlatform        :: Platform,    -- Filled in by SysTools-  sGhcUsagePath          :: FilePath,    -- Filled in by SysTools-  sGhciUsagePath         :: FilePath,    -- ditto-  sTopDir                :: FilePath,+  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,@@ -1126,6 +1211,8 @@   -- 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],@@ -1149,6 +1236,8 @@ ghcUsagePath dflags = sGhcUsagePath (settings dflags) ghciUsagePath         :: DynFlags -> FilePath ghciUsagePath dflags = sGhciUsagePath (settings dflags)+toolDir               :: DynFlags -> Maybe FilePath+toolDir dflags = sToolDir (settings dflags) topDir                :: DynFlags -> FilePath topDir dflags = sTopDir (settings dflags) tmpDir                :: DynFlags -> String@@ -1198,6 +1287,14 @@ opt_P                 :: DynFlags -> [String] opt_P dflags = concatMap (wayOptP (targetPlatform dflags)) (ways dflags)             ++ sOpt_P (settings 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))+ opt_F                 :: DynFlags -> [String] opt_F dflags = sOpt_F (settings dflags) opt_c                 :: DynFlags -> [String]@@ -1419,6 +1516,10 @@ shouldUseColor :: DynFlags -> Bool shouldUseColor dflags = overrideWith (canUseColor dflags) (useColor dflags) +shouldUseHexWordLiterals :: DynFlags -> Bool+shouldUseHexWordLiterals dflags =+  Opt_HexWordLiterals `EnumSet.member` generalFlags dflags+ -- | Are we building with @-fPIE@ or @-fPIC@ enabled? positionIndependent :: DynFlags -> Bool positionIndependent dflags = gopt Opt_PIC dflags || gopt Opt_PIE dflags@@ -1502,7 +1603,7 @@ wayGeneralFlags _ (WayCustom {}) = [] wayGeneralFlags _ WayThreaded = [] wayGeneralFlags _ WayDebug    = []-wayGeneralFlags _ WayDyn      = [Opt_PIC]+wayGeneralFlags _ WayDyn      = [Opt_PIC, Opt_ExternalDynamicRefs]     -- We could get away without adding -fPIC when compiling the     -- modules of a program that is to be linked with -dynamic; the     -- program itself does not need to be position-independent, only@@ -1645,8 +1746,8 @@  -- | 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 -> LlvmTargets -> DynFlags-defaultDynFlags mySettings myLlvmTargets =+defaultDynFlags :: Settings -> LlvmConfig -> DynFlags+defaultDynFlags mySettings (myLlvmTargets, myLlvmPasses) = -- See Note [Updating flag description in the User's Guide]      DynFlags {         ghcMode                 = CompManager,@@ -1659,8 +1760,11 @@         maxSimplIterations      = 4,         maxPmCheckIterations    = 2000000,         ruleCheck               = Nothing,+        inlineCheck             = Nothing,         maxRelevantBinds        = Just 6,-        maxValidSubstitutions   = Just 6,+        maxValidHoleFits   = Just 6,+        maxRefHoleFits     = Just 6,+        refLevelHoleFits   = Nothing,         maxUncoveredPatterns    = 4,         simplTickFactor         = 100,         specConstrThreshold     = Just 2000,@@ -1668,6 +1772,7 @@         specConstrRecursive     = 3,         liberateCaseThreshold   = Just 2000,         floatLamArgs            = Just 0, -- Default: float only if no fvs+        cmmProcAlignment        = Nothing,          historySize             = 20,         strictnessBefore        = [],@@ -1704,6 +1809,7 @@         pluginModNames          = [],         pluginModNameOpts       = [],         frontendPluginOpts      = [],+        plugins                 = [],         hooks                   = emptyHooks,          outputFile              = Nothing,@@ -1713,7 +1819,7 @@         dumpPrefix              = Nothing,         dumpPrefixForce         = Nothing,         ldInputs                = [],-        includePaths            = [],+        includePaths            = IncludeSpecs [] [],         libraryPaths            = [],         frameworkPaths          = [],         cmdlineFrameworks       = [],@@ -1737,6 +1843,7 @@         splitInfo               = Nothing,         settings                = mySettings,         llvmTargets             = myLlvmTargets,+        llvmPasses              = myLlvmPasses,          -- ghc -M values         depMakefile       = "Makefile",@@ -1791,10 +1898,7 @@          -- Logging -        initLogAction = defaultLogOutput,-         log_action = defaultLogAction,-        log_finaliser = \ _ -> return (),          flushOut = defaultFlushOut,         flushErr = defaultFlushErr,@@ -1855,9 +1959,10 @@ -- Note [JSON Error Messages] -- -- When the user requests the compiler output to be dumped as json--- we modify the log_action to collect all the messages in an IORef--- and then finally in GHC.withCleanupSession the log_finaliser is--- called which prints out the messages together.+-- we used to collect them all in an IORef and then print them at the end.+-- This doesn't work very well with GHCi. (See #14078) So instead we now+-- use the simpler method of just outputting a JSON document inplace to+-- stdout. -- -- Before the compiler calls log_action, it has already turned the `ErrMsg` -- into a formatted message. This means that we lose some possible@@ -1867,14 +1972,6 @@  type FatalMessager = String -> IO () -data LogOutput = LogOutput-               { getLogAction :: LogAction-               , getLogFinaliser :: LogFinaliser-               }--defaultLogOutput :: IO (Maybe LogOutput)-defaultLogOutput = return $ Nothing- type LogAction = DynFlags               -> WarnReason               -> Severity@@ -1883,41 +1980,24 @@               -> MsgDoc               -> IO () -type LogFinaliser = DynFlags -> IO ()- defaultFatalMessager :: FatalMessager defaultFatalMessager = hPutStrLn stderr   -- See Note [JSON Error Messages]-jsonLogOutput :: IO (Maybe LogOutput)-jsonLogOutput = do-  ref <- newIORef []-  return . Just $ LogOutput (jsonLogAction ref) (jsonLogFinaliser ref)--jsonLogAction :: IORef [SDoc] -> LogAction-jsonLogAction iref dflags reason severity srcSpan style msg+--+jsonLogAction :: LogAction+jsonLogAction dflags reason severity srcSpan _style msg   = do-      addMessage . withPprStyle (mkCodeStyle CStyle) . renderJSON $-        JSObject [ ( "span", json srcSpan )-                 , ( "doc" , JSString (showSDoc dflags msg) )-                 , ( "severity", json severity )-                 , ( "reason" ,   json reason )-                ]-      defaultLogAction dflags reason severity srcSpan style msg-  where-    addMessage m = modifyIORef iref (m:)---jsonLogFinaliser :: IORef [SDoc] -> DynFlags -> IO ()-jsonLogFinaliser iref dflags = do-  msgs <- readIORef iref-  let fmt_msgs = brackets $ pprWithCommas (blankLine $$) msgs-  output fmt_msgs-  where-    -- dumpSDoc uses log_action to output the dump-    dflags' = dflags { log_action = defaultLogAction }-    output doc = dumpSDoc dflags' neverQualify Opt_D_dump_json "" doc+    defaultLogActionHPutStrDoc dflags stdout (doc $$ text "")+                               (mkCodeStyle CStyle)+    where+      doc = renderJSON $+              JSObject [ ( "span", json srcSpan )+                       , ( "doc" , JSString (showSDoc dflags msg) )+                       , ( "severity", json severity )+                       , ( "reason" ,   json reason )+                       ]   defaultLogAction :: LogAction@@ -2034,6 +2114,9 @@  languageExtensions (Just Haskell98)     = [LangExt.ImplicitPrelude,+       -- See Note [When is StarIsType enabled]+       LangExt.StarIsType,+       LangExt.MonadFailDesugaring,        LangExt.MonomorphismRestriction,        LangExt.NPlusKPatterns,        LangExt.DatatypeContexts,@@ -2048,6 +2131,9 @@  languageExtensions (Just Haskell2010)     = [LangExt.ImplicitPrelude,+       -- See Note [When is StarIsType enabled]+       LangExt.StarIsType,+       LangExt.MonadFailDesugaring,        LangExt.MonomorphismRestriction,        LangExt.DatatypeContexts,        LangExt.TraditionalRecordSyntax,@@ -2182,6 +2268,9 @@ useUnicodeSyntax :: DynFlags -> Bool useUnicodeSyntax = gopt Opt_PrintUnicodeSyntax +useStarIsType :: DynFlags -> Bool+useStarIsType = xopt LangExt.StarIsType+ -- | Set the Haskell language standard to use setLanguage :: Language -> DynP () setLanguage l = upd (`lang_set` Just l)@@ -2294,7 +2383,8 @@  setObjectDir  f d = d { objectDir  = Just f} setHiDir      f d = d { hiDir      = Just f}-setStubDir    f d = d { stubDir    = Just f, includePaths = f : includePaths d }+setStubDir    f d = d { stubDir    = Just f+                      , includePaths = addGlobalInclude (includePaths d) [f] }   -- -stubdir D adds an implicit -I D, so that gcc can find the _stub.h file   -- \#included from the .hc file when compiling via C (i.e. unregisterised   -- builds).@@ -2313,7 +2403,7 @@ setOutputHi   f d = d { outputHi   = f}  setJsonLogAction :: DynFlags -> DynFlags-setJsonLogAction d = d { initLogAction = jsonLogOutput }+setJsonLogAction d = d { log_action = jsonLogAction }  thisComponentId :: DynFlags -> ComponentId thisComponentId dflags =@@ -2388,7 +2478,12 @@ 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})+addOptP   f = alterSettings (\s -> s { sOpt_P   = f : sOpt_P s+                                     , sOpt_P_fingerprint = fingerprintStrings (f : sOpt_P s)+                                     })+                                     -- See Note [Repeated -optP hashing]+  where+  fingerprintStrings ss = fingerprintFingerprints $ map fingerprintString ss   setDepMakefile :: FilePath -> DynFlags -> DynFlags@@ -2527,27 +2622,11 @@     Just x -> liftIO (setHeapSize x)     _      -> return () -  dflags7 <- liftIO $ setLogAction dflags5--  liftIO $ setUnsafeGlobalDynFlags dflags7+  liftIO $ setUnsafeGlobalDynFlags dflags5    let warns' = map (Warn Cmd.NoReason) (consistency_warnings ++ sh_warns) -  return (dflags7, leftover, warns' ++ warns)--setLogAction :: DynFlags -> IO DynFlags-setLogAction dflags = do- mlogger <- initLogAction dflags- return $-    maybe-         dflags-         (\logger ->-            dflags-              { log_action    = getLogAction logger-              , log_finaliser = getLogFinaliser logger-              , initLogAction = return $ Nothing -- Don't initialise it twice-              })-         mlogger+  return (dflags5, leftover, warns' ++ warns)  -- | Write an error or warning to the 'LogOutput'. putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle@@ -2751,6 +2830,8 @@ #endif   , make_ord_flag defGhcFlag "relative-dynlib-paths"       (NoArg (setGeneralFlag Opt_RelativeDynlibPaths))+  , make_ord_flag defGhcFlag "copy-libs-when-linking"+      (NoArg (setGeneralFlag Opt_SingleLibFolder))   , make_ord_flag defGhcFlag "pie"            (NoArg (setGeneralFlag Opt_PICExecutable))   , make_ord_flag defGhcFlag "no-pie"         (NoArg (unSetGeneralFlag Opt_PICExecutable)) @@ -2935,6 +3016,8 @@         (NoArg (setRtsOptsEnabled RtsOptsNone))   , make_ord_flag defGhcFlag "no-rtsopts-suggestions"       (noArg (\d -> d {rtsOptsSuggestions = False}))+  , make_ord_flag defGhcFlag "dhex-word-literals"+        (NoArg (setGeneralFlag Opt_HexWordLiterals))    , make_ord_flag defGhcFlag "ghcversion-file"      (hasArg addGhcVersionFile)   , make_ord_flag defGhcFlag "main-is"              (SepArg setMainIs)@@ -2995,7 +3078,8 @@                   setGeneralFlag Opt_SuppressIdInfo                   setGeneralFlag Opt_SuppressTicks                   setGeneralFlag Opt_SuppressStgFreeVars-                  setGeneralFlag Opt_SuppressTypeSignatures)+                  setGeneralFlag Opt_SuppressTypeSignatures+                  setGeneralFlag Opt_SuppressTimestamps)          ------ Debugging ----------------------------------------------------   , make_ord_flag defGhcFlag "dstg-stats"@@ -3055,6 +3139,8 @@         (setDumpFlag Opt_D_dump_deriv)   , make_ord_flag defGhcFlag "ddump-ds"         (setDumpFlag Opt_D_dump_ds)+  , make_ord_flag defGhcFlag "ddump-ds-preopt"+        (setDumpFlag Opt_D_dump_ds_preopt)   , make_ord_flag defGhcFlag "ddump-foreign"         (setDumpFlag Opt_D_dump_foreign)   , make_ord_flag defGhcFlag "ddump-inlinings"@@ -3143,8 +3229,6 @@         (setDumpFlag Opt_D_dump_hi)   , make_ord_flag defGhcFlag "ddump-minimal-imports"         (NoArg (setGeneralFlag Opt_D_dump_minimal_imports))-  , make_ord_flag defGhcFlag "ddump-vect"-        (setDumpFlag Opt_D_dump_vect)   , make_ord_flag defGhcFlag "ddump-hpc"         (setDumpFlag Opt_D_dump_ticked) -- back compat   , make_ord_flag defGhcFlag "ddump-ticked"@@ -3270,7 +3354,6 @@         ------ Optimisation flags ------------------------------------------   , make_dep_flag defGhcFlag "Onot"   (noArgM $ setOptLevel 0 )                                                             "Use -O0 instead"-  , make_ord_flag defGhcFlag "Odph"   (noArgM setDPHOpt)   , make_ord_flag defGhcFlag "O"      (optIntSuffixM (\mb_n ->                                                 setOptLevel (mb_n `orElse` 1)))                 -- If the number is missing, use 1@@ -3280,10 +3363,20 @@       (intSuffix (\n d -> d { maxRelevantBinds = Just n }))   , make_ord_flag defFlag "fno-max-relevant-binds"       (noArg (\d -> d { maxRelevantBinds = Nothing }))-  , make_ord_flag defFlag "fmax-valid-substitutions"-      (intSuffix (\n d -> d { maxValidSubstitutions = Just n }))-  , make_ord_flag defFlag "fno-max-valid-substitutions"-      (noArg (\d -> d { maxValidSubstitutions = Nothing }))++  , make_ord_flag defFlag "fmax-valid-hole-fits"+      (intSuffix (\n d -> d { maxValidHoleFits = Just n }))+  , make_ord_flag defFlag "fno-max-valid-hole-fits"+      (noArg (\d -> d { maxValidHoleFits = Nothing }))+  , make_ord_flag defFlag "fmax-refinement-hole-fits"+      (intSuffix (\n d -> d { maxRefHoleFits = Just n }))+  , make_ord_flag defFlag "fno-max-refinement-hole-fits"+      (noArg (\d -> d { maxRefHoleFits = Nothing }))+  , make_ord_flag defFlag "frefinement-level-hole-fits"+      (intSuffix (\n d -> d { refLevelHoleFits = Just n }))+  , make_ord_flag defFlag "fno-refinement-level-hole-fits"+      (noArg (\d -> d { refLevelHoleFits = Nothing }))+   , make_ord_flag defFlag "fmax-uncovered-patterns"       (intSuffix (\n d -> d { maxUncoveredPatterns = n }))   , make_ord_flag defFlag "fsimplifier-phases"@@ -3308,8 +3401,10 @@       (intSuffix (\n d -> d { liberateCaseThreshold = Just n }))   , make_ord_flag defFlag "fno-liberate-case-threshold"       (noArg (\d -> d { liberateCaseThreshold = Nothing }))-  , make_ord_flag defFlag "frule-check"+  , make_ord_flag defFlag "drule-check"       (sepArg (\s d -> d { ruleCheck = Just s }))+  , make_ord_flag defFlag "dinline-check"+      (sepArg (\s d -> d { inlineCheck = Just s }))   , make_ord_flag defFlag "freduction-depth"       (intSuffix (\n d -> d { reductionDepth = treatZeroAsInf n }))   , make_ord_flag defFlag "fconstraint-solver-iterations"@@ -3328,6 +3423,10 @@       (intSuffix (\n d -> d { floatLamArgs = Just n }))   , make_ord_flag defFlag "ffloat-all-lams"       (noArg (\d -> d { floatLamArgs = Nothing }))+  , make_ord_flag defFlag "fproc-alignment"+      (intSuffix (\n d -> d { cmmProcAlignment = Just n }))++   , make_ord_flag defFlag "fhistory-size"       (intSuffix (\n d -> d { historySize = n }))   , make_ord_flag defFlag "funfolding-creation-threshold"@@ -3435,10 +3534,7 @@  ++ map (mkFlag turnOff "fno-"      unSetGeneralFlag  ) fFlagsDeps  ++ map (mkFlag turnOn  "W"         setWarningFlag    ) wWarningFlagsDeps  ++ map (mkFlag turnOff "Wno-"      unSetWarningFlag  ) wWarningFlagsDeps- ++ map (mkFlag turnOn  "Werror="   (\flag -> do {-                                       ; setWarningFlag flag-                                       ; setFatalWarningFlag flag }))-                                                        wWarningFlagsDeps+ ++ map (mkFlag turnOn  "Werror="   setWErrorFlag )     wWarningFlagsDeps  ++ map (mkFlag turnOn  "Wwarn="     unSetFatalWarningFlag )                                                         wWarningFlagsDeps  ++ map (mkFlag turnOn  "Wno-error=" unSetFatalWarningFlag )@@ -3450,6 +3546,12 @@  ++ [ (NotDeprecated, unrecognisedWarning "W"),       (Deprecated,    unrecognisedWarning "fwarn-"),       (Deprecated,    unrecognisedWarning "fno-warn-") ]+ ++ [ make_ord_flag defFlag "Werror=compat"+        (NoArg (mapM_ setWErrorFlag minusWcompatOpts))+    , make_ord_flag defFlag "Wno-error=compat"+        (NoArg (mapM_ unSetFatalWarningFlag minusWcompatOpts))+    , make_ord_flag defFlag "Wwarn=compat"+        (NoArg (mapM_ unSetFatalWarningFlag minusWcompatOpts)) ]  ++ map (mkFlag turnOn  "f"         setExtensionFlag  ) fLangFlagsDeps  ++ map (mkFlag turnOff "fno-"      unSetExtensionFlag) fLangFlagsDeps  ++ map (mkFlag turnOn  "X"         setExtensionFlag  ) xFlagsDeps@@ -3696,7 +3798,9 @@   flagSpec "redundant-constraints"       Opt_WarnRedundantConstraints,   flagSpec "duplicate-exports"           Opt_WarnDuplicateExports,   flagSpec "hi-shadowing"                Opt_WarnHiShadows,+  flagSpec "inaccessible-code"           Opt_WarnInaccessibleCode,   flagSpec "implicit-prelude"            Opt_WarnImplicitPrelude,+  flagSpec "implicit-kind-vars"          Opt_WarnImplicitKindVars,   flagSpec "incomplete-patterns"         Opt_WarnIncompletePatterns,   flagSpec "incomplete-record-updates"   Opt_WarnIncompletePatternsRecUpd,   flagSpec "incomplete-uni-patterns"     Opt_WarnIncompleteUniPatterns,@@ -3758,6 +3862,8 @@   flagSpec "simplifiable-class-constraints" Opt_WarnSimplifiableClassConstraints,   flagSpec "missing-home-modules"        Opt_WarnMissingHomeModules,   flagSpec "unrecognised-warning-flags"  Opt_WarnUnrecognisedWarningFlags,+  flagSpec "star-binder"                 Opt_WarnStarBinder,+  flagSpec "star-is-type"                Opt_WarnStarIsType,   flagSpec "partial-fields"              Opt_WarnPartialFields ]  -- | These @-\<blah\>@ flags can all be reversed with @-no-\<blah\>@@@ -3780,10 +3886,12 @@   flagSpec "suppress-idinfo"            Opt_SuppressIdInfo,   flagSpec "suppress-unfoldings"        Opt_SuppressUnfoldings,   flagSpec "suppress-module-prefixes"   Opt_SuppressModulePrefixes,+  flagSpec "suppress-timestamps"        Opt_SuppressTimestamps,   flagSpec "suppress-type-applications" Opt_SuppressTypeApplications,   flagSpec "suppress-type-signatures"   Opt_SuppressTypeSignatures,   flagSpec "suppress-uniques"           Opt_SuppressUniques,-  flagSpec "suppress-var-kinds"         Opt_SuppressVarKinds]+  flagSpec "suppress-var-kinds"         Opt_SuppressVarKinds+  ]  -- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@ fFlags :: [FlagSpec GeneralFlag]@@ -3794,6 +3902,7 @@ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically+  flagSpec "asm-shortcutting"                 Opt_AsmShortcutting,   flagGhciSpec "break-on-error"               Opt_BreakOnError,   flagGhciSpec "break-on-exception"           Opt_BreakOnException,   flagSpec "building-cabal-package"           Opt_BuildingCabalPackage,@@ -3821,6 +3930,7 @@   flagSpec "error-spans"                      Opt_ErrorSpans,   flagSpec "excess-precision"                 Opt_ExcessPrecision,   flagSpec "expose-all-unfoldings"            Opt_ExposeAllUnfoldings,+  flagSpec "external-dynamic-refs"            Opt_ExternalDynamicRefs,   flagSpec "external-interpreter"             Opt_ExternalInterpreter,   flagSpec "flat-cache"                       Opt_FlatCache,   flagSpec "float-in"                         Opt_FloatIn,@@ -3831,7 +3941,9 @@   flagSpec "fun-to-thunk"                     Opt_FunToThunk,   flagSpec "gen-manifest"                     Opt_GenManifest,   flagSpec "ghci-history"                     Opt_GhciHistory,+  flagSpec "ghci-leak-check"                  Opt_GhciLeakCheck,   flagGhciSpec "local-ghci-history"           Opt_LocalGhciHistory,+  flagGhciSpec "no-it"                        Opt_NoIt,   flagSpec "ghci-sandbox"                     Opt_GhciSandbox,   flagSpec "helpful-errors"                   Opt_HelpfulErrors,   flagSpec "hpc"                              Opt_Hpc,@@ -3842,6 +3954,7 @@   flagSpec "kill-absence"                     Opt_KillAbsence,   flagSpec "kill-one-shot"                    Opt_KillOneShot,   flagSpec "late-dmd-anal"                    Opt_LateDmdAnal,+  flagSpec "late-specialise"                  Opt_LateSpecialise,   flagSpec "liberate-case"                    Opt_LiberateCase,   flagSpec "llvm-pass-vectors-in-regs"        Opt_LlvmPassVectorsInRegisters,   flagHiddenSpec "llvm-tbaa"                  Opt_LlvmTBAA,@@ -3885,20 +3998,43 @@   flagSpec "write-interface"                  Opt_WriteInterface,   flagSpec "unbox-small-strict-fields"        Opt_UnboxSmallStrictFields,   flagSpec "unbox-strict-fields"              Opt_UnboxStrictFields,-  flagSpec "vectorisation-avoidance"          Opt_VectorisationAvoidance,-  flagSpec "vectorise"                        Opt_Vectorise,   flagSpec "version-macros"                   Opt_VersionMacros,   flagSpec "worker-wrapper"                   Opt_WorkerWrapper,   flagSpec "solve-constant-dicts"             Opt_SolveConstantDicts,   flagSpec "catch-bottoms"                    Opt_CatchBottoms,   flagSpec "alignment-sanitisation"           Opt_AlignmentSanitisation,+  flagSpec "num-constant-folding"             Opt_NumConstantFolding,   flagSpec "show-warning-groups"              Opt_ShowWarnGroups,   flagSpec "hide-source-paths"                Opt_HideSourcePaths,-  flagSpec "show-hole-constraints"            Opt_ShowHoleConstraints,   flagSpec "show-loaded-modules"              Opt_ShowLoadedModules,   flagSpec "whole-archive-hs-libs"            Opt_WholeArchiveHsLibs   ]+  ++ fHoleFlags +-- | These @-f\<blah\>@ flags have to do with the typed-hole error message or+-- the valid hole fits in that message. See Note [Valid hole fits include ...]+-- in the TcHoleErrors module. These flags can all be reversed with+-- @-fno-\<blah\>@+fHoleFlags :: [(Deprecation, FlagSpec GeneralFlag)]+fHoleFlags = [+  flagSpec "show-hole-constraints"            Opt_ShowHoleConstraints,+  depFlagSpec' "show-valid-substitutions"     Opt_ShowValidHoleFits+   (useInstead "-f" "show-valid-hole-fits"),+  flagSpec "show-valid-hole-fits"             Opt_ShowValidHoleFits,+  -- Sorting settings+  flagSpec "sort-valid-hole-fits"             Opt_SortValidHoleFits,+  flagSpec "sort-by-size-hole-fits"           Opt_SortBySizeHoleFits,+  flagSpec "sort-by-subsumption-hole-fits"    Opt_SortBySubsumHoleFits,+  flagSpec "abstract-refinement-hole-fits"    Opt_AbstractRefHoleFits,+  -- Output format settings+  flagSpec "show-hole-matches-of-hole-fits"   Opt_ShowMatchesOfHoleFits,+  flagSpec "show-provenance-of-hole-fits"     Opt_ShowProvOfHoleFits,+  flagSpec "show-type-of-hole-fits"           Opt_ShowTypeOfHoleFits,+  flagSpec "show-type-app-of-hole-fits"       Opt_ShowTypeAppOfHoleFits,+  flagSpec "show-type-app-vars-of-hole-fits"  Opt_ShowTypeAppVarsOfHoleFits,+  flagSpec "unclutter-valid-hole-fits"        Opt_UnclutterValidHoleFits+  ]+ -- | These @-f\<blah\>@ flags can all be reversed with @-fno-\<blah\>@ fLangFlags :: [FlagSpec LangExt.Extension] fLangFlags = map snd fLangFlagsDeps@@ -3930,10 +4066,6 @@     (deprecatedForExtension "ImplicitParams"),   depFlagSpec' "scoped-type-variables"          LangExt.ScopedTypeVariables     (deprecatedForExtension "ScopedTypeVariables"),-  depFlagSpec' "parr"                           LangExt.ParallelArrays-    (deprecatedForExtension "ParallelArrays"),-  depFlagSpec' "PArr"                           LangExt.ParallelArrays-    (deprecatedForExtension "ParallelArrays"),   depFlagSpec' "allow-overlapping-instances"    LangExt.OverlappingInstances     (deprecatedForExtension "OverlappingInstances"),   depFlagSpec' "allow-undecidable-instances"    LangExt.UndecidableInstances@@ -4011,8 +4143,10 @@   flagSpec "DeriveLift"                       LangExt.DeriveLift,   flagSpec "DeriveTraversable"                LangExt.DeriveTraversable,   flagSpec "DerivingStrategies"               LangExt.DerivingStrategies,+  flagSpec "DerivingVia"                      LangExt.DerivingVia,   flagSpec "DisambiguateRecordFields"         LangExt.DisambiguateRecordFields,   flagSpec "DoAndIfThenElse"                  LangExt.DoAndIfThenElse,+  flagSpec "BlockArguments"                   LangExt.BlockArguments,   depFlagSpec' "DoRec"                        LangExt.RecursiveDo     (deprecatedForExtension "RecursiveDo"),   flagSpec "DuplicateRecordFields"            LangExt.DuplicateRecordFields,@@ -4032,6 +4166,8 @@   flagSpec "GHCForeignImportPrim"             LangExt.GHCForeignImportPrim,   flagSpec' "GeneralizedNewtypeDeriving"      LangExt.GeneralizedNewtypeDeriving                                               setGenDeriving,+  flagSpec' "GeneralisedNewtypeDeriving"      LangExt.GeneralizedNewtypeDeriving+                                              setGenDeriving,   flagSpec "ImplicitParams"                   LangExt.ImplicitParams,   flagSpec "ImplicitPrelude"                  LangExt.ImplicitPrelude,   flagSpec "ImpredicativeTypes"               LangExt.ImpredicativeTypes,@@ -4055,6 +4191,7 @@   flagSpec "MonomorphismRestriction"          LangExt.MonomorphismRestriction,   flagSpec "MultiParamTypeClasses"            LangExt.MultiParamTypeClasses,   flagSpec "MultiWayIf"                       LangExt.MultiWayIf,+  flagSpec "NumericUnderscores"               LangExt.NumericUnderscores,   flagSpec "NPlusKPatterns"                   LangExt.NPlusKPatterns,   flagSpec "NamedFieldPuns"                   LangExt.RecordPuns,   flagSpec "NamedWildCards"                   LangExt.NamedWildCards,@@ -4080,6 +4217,7 @@   flagSpec "PatternSynonyms"                  LangExt.PatternSynonyms,   flagSpec "PolyKinds"                        LangExt.PolyKinds,   flagSpec "PolymorphicComponents"            LangExt.RankNTypes,+  flagSpec "QuantifiedConstraints"            LangExt.QuantifiedConstraints,   flagSpec "PostfixOperators"                 LangExt.PostfixOperators,   flagSpec "QuasiQuotes"                      LangExt.QuasiQuotes,   flagSpec "Rank2Types"                       LangExt.RankNTypes,@@ -4096,6 +4234,7 @@   flagSpec "RoleAnnotations"                  LangExt.RoleAnnotations,   flagSpec "ScopedTypeVariables"              LangExt.ScopedTypeVariables,   flagSpec "StandaloneDeriving"               LangExt.StandaloneDeriving,+  flagSpec "StarIsType"                       LangExt.StarIsType,   flagSpec "StaticPointers"                   LangExt.StaticPointers,   flagSpec "Strict"                           LangExt.Strict,   flagSpec "StrictData"                       LangExt.StrictData,@@ -4148,9 +4287,32 @@     ++ default_PIC platform      ++ concatMap (wayGeneralFlags platform) (defaultWays settings)+    ++ validHoleFitDefaults      where platform = sTargetPlatform settings +-- | These are the default settings for the display and sorting of valid hole+--  fits in typed-hole error messages. See Note [Valid hole fits include ...]+ -- in the TcHoleErrors module.+validHoleFitDefaults :: [GeneralFlag]+validHoleFitDefaults+  =  [ Opt_ShowTypeAppOfHoleFits+     , Opt_ShowTypeOfHoleFits+     , Opt_ShowProvOfHoleFits+     , Opt_ShowMatchesOfHoleFits+     , Opt_ShowValidHoleFits+     , Opt_SortValidHoleFits+     , Opt_SortBySizeHoleFits+     , Opt_ShowHoleConstraints ]+++validHoleFitsImpliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]+validHoleFitsImpliedGFlags+  = [ (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowTypeAppOfHoleFits)+    , (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowTypeAppVarsOfHoleFits)+    , (Opt_ShowTypeAppVarsOfHoleFits, turnOff, Opt_ShowTypeAppOfHoleFits)+    , (Opt_UnclutterValidHoleFits, turnOff, Opt_ShowProvOfHoleFits) ]+ default_PIC :: Platform -> [GeneralFlag] default_PIC platform =   case (platformOS platform, platformArch platform) of@@ -4169,7 +4331,7 @@ impliedGFlags = [(Opt_DeferTypeErrors, turnOn, Opt_DeferTypedHoles)                 ,(Opt_DeferTypeErrors, turnOn, Opt_DeferOutOfScopeVariables)                 ,(Opt_Strictness, turnOn, Opt_WorkerWrapper)-                ]+                ] ++ validHoleFitsImpliedGFlags  -- General flags that are switched on/off when other general flags are switched -- off@@ -4180,6 +4342,7 @@ impliedXFlags -- See Note [Updating flag description in the User's Guide]   = [ (LangExt.RankNTypes,                turnOn, LangExt.ExplicitForAll)+    , (LangExt.QuantifiedConstraints,     turnOn, LangExt.ExplicitForAll)     , (LangExt.ScopedTypeVariables,       turnOn, LangExt.ExplicitForAll)     , (LangExt.LiberalTypeSynonyms,       turnOn, LangExt.ExplicitForAll)     , (LangExt.ExistentialQuantification, turnOn, LangExt.ExplicitForAll)@@ -4190,12 +4353,16 @@      , (LangExt.RebindableSyntax, turnOff, LangExt.ImplicitPrelude)      -- NB: turn off! +    , (LangExt.DerivingVia, turnOn, LangExt.DerivingStrategies)+     , (LangExt.GADTs,            turnOn, LangExt.GADTSyntax)     , (LangExt.GADTs,            turnOn, LangExt.MonoLocalBinds)     , (LangExt.TypeFamilies,     turnOn, LangExt.MonoLocalBinds)      , (LangExt.TypeFamilies,     turnOn, LangExt.KindSignatures)  -- Type families use kind signatures     , (LangExt.PolyKinds,        turnOn, LangExt.KindSignatures)  -- Ditto polymorphic kinds++    -- TypeInType is now just a synonym for a couple of other extensions.     , (LangExt.TypeInType,       turnOn, LangExt.DataKinds)     , (LangExt.TypeInType,       turnOn, LangExt.PolyKinds)     , (LangExt.TypeInType,       turnOn, LangExt.KindSignatures)@@ -4230,18 +4397,27 @@     , (LangExt.Strict, turnOn, LangExt.StrictData)   ] +-- Note [When is StarIsType enabled]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- The StarIsType extension determines whether to treat '*' as a regular type+-- operator or as a synonym for 'Data.Kind.Type'. Many existing pre-TypeInType+-- programs expect '*' to be synonymous with 'Type', so by default StarIsType is+-- enabled.+--+-- Programs that use TypeOperators might expect to repurpose '*' for+-- multiplication or another binary operation, but making TypeOperators imply+-- NoStarIsType caused too much breakage on Hackage.+--+ -- Note [Documenting optimisation flags] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- -- If you change the list of flags enabled for particular optimisation levels--- please remember to update the User's Guide. The relevant files are:+-- please remember to update the User's Guide. The relevant file is: -- --   docs/users_guide/using-optimisation.rst ----- The first contains the Flag Reference section, which briefly lists all--- available flags. The second contains a detailed description of the--- flags. Both places should contain information whether a flag is implied by--- -O0, -O or -O2.+-- Make sure to note whether a flag is implied by -O0, -O or -O2.  optLevelFlags :: [([Int], GeneralFlag)] optLevelFlags -- see Note [Documenting optimisation flags]@@ -4249,11 +4425,6 @@     , ([0,1,2], Opt_DoEtaReduction)       -- See Note [Eta-reduction in -O0]     , ([0,1,2], Opt_DmdTxDictSel)     , ([0,1,2], Opt_LlvmTBAA)-    , ([0,1,2], Opt_VectorisationAvoidance)-                -- This one is important for a tiresome reason:-                -- we want to make sure that the bindings for data-                -- constructors are eta-expanded.  This is probably-                -- a good thing anyway, but it seems fragile.      , ([0],     Opt_IgnoreInterfacePragmas)     , ([0],     Opt_OmitInterfacePragmas)@@ -4263,6 +4434,7 @@     , ([1,2],   Opt_CaseMerge)     , ([1,2],   Opt_CaseFolding)     , ([1,2],   Opt_CmmElimCommonBlocks)+    , ([2],     Opt_AsmShortcutting)     , ([1,2],   Opt_CmmSink)     , ([1,2],   Opt_CSE)     , ([1,2],   Opt_StgCSE)@@ -4279,6 +4451,7 @@     , ([1,2],   Opt_CprAnal)     , ([1,2],   Opt_WorkerWrapper)     , ([1,2],   Opt_SolveConstantDicts)+    , ([1,2],   Opt_NumConstantFolding)      , ([2],     Opt_LiberateCase)     , ([2],     Opt_SpecConstr)@@ -4383,7 +4556,9 @@         Opt_WarnUnsupportedLlvmVersion,         Opt_WarnTabs,         Opt_WarnUnrecognisedWarningFlags,-        Opt_WarnSimplifiableClassConstraints+        Opt_WarnSimplifiableClassConstraints,+        Opt_WarnStarBinder,+        Opt_WarnInaccessibleCode       ]  -- | Things you get with -W@@ -4431,6 +4606,7 @@     = [ Opt_WarnMissingMonadFailInstances       , Opt_WarnSemigroup       , Opt_WarnNonCanonicalMonoidInstances+      , Opt_WarnImplicitKindVars       ]  enableUnusedBinds :: DynP ()@@ -4637,6 +4813,11 @@ setFatalWarningFlag   f = upd (\dfs -> wopt_set_fatal dfs f) unSetFatalWarningFlag f = upd (\dfs -> wopt_unset_fatal dfs f) +setWErrorFlag :: WarningFlag -> DynP ()+setWErrorFlag flag =+  do { setWarningFlag flag+     ; setFatalWarningFlag flag }+ -------------------------- setExtensionFlag, unSetExtensionFlag :: LangExt.Extension -> DynP () setExtensionFlag f = upd (setExtensionFlag' f)@@ -4792,7 +4973,13 @@         Nothing  -> mkModule (thisPackage dflags) mod_name         Just mod -> mod +canonicalizeModuleIfHome :: DynFlags -> Module -> Module+canonicalizeModuleIfHome dflags mod+    = if thisPackage dflags == moduleUnitId mod+                      then canonicalizeHomeModule dflags (moduleName mod)+                      else mod + -- ----------------------------------------------------------------------------- -- | Find the package environment (if one exists) --@@ -4991,17 +5178,6 @@    | otherwise      = Right dflags --- -Odph is equivalent to------    -O2                               optimise as much as possible---    -fmax-simplifier-iterations20     this is necessary sometimes---    -fsimplifier-phases=3             we use an additional simplifier phase for fusion----setDPHOpt :: DynFlags -> DynP DynFlags-setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations  = 20-                                         , simplPhases         = 3-                                         })- setMainIs :: String -> DynP () setMainIs arg   | not (null main_fn) && isLower (head main_fn)@@ -5033,7 +5209,8 @@   upd (\s -> s{libraryPaths = libraryPaths s ++ splitPathList p})  addIncludePath p =-  upd (\s -> s{includePaths = includePaths s ++ splitPathList p})+  upd (\s -> s{includePaths =+                  addGlobalInclude (includePaths s) (splitPathList p)})  addFrameworkPath p =   upd (\s -> s{frameworkPaths = frameworkPaths s ++ splitPathList p})@@ -5201,7 +5378,8 @@       -- Next come the settings, so anything else can be overridden       -- in the settings file (as "lookup" uses the first match for the       -- key)-    : map (fmap $ expandTopDir $ topDir dflags) (rawSettings dflags)+    : map (fmap $ expandDirectories (topDir dflags) (toolDir dflags))+          (rawSettings dflags)    ++ [("Project version",             projectVersion dflags),        ("Project Git commit id",       cProjectGitCommitId),        ("Booter version",              cBooterVersion),@@ -5252,6 +5430,8 @@     showBool True  = "YES"     showBool False = "NO"     isWindows = platformOS (targetPlatform dflags) == OSMinGW32+    expandDirectories :: FilePath -> Maybe FilePath -> String -> String+    expandDirectories topd mtoold = expandToolDir mtoold . expandTopDir topd  -- Produced by deriveConstants #include "GHCConstantsHaskellWrappers.hs"@@ -5391,10 +5571,11 @@ -- initialized. defaultGlobalDynFlags :: DynFlags defaultGlobalDynFlags =-    (defaultDynFlags settings llvmTargets) { verbosity = 2 }+    (defaultDynFlags settings (llvmTargets, llvmPasses)) { verbosity = 2 }   where     settings = panic "v_unsafeGlobalDynFlags: settings not initialised"     llvmTargets = panic "v_unsafeGlobalDynFlags: llvmTargets not initialised"+    llvmPasses = panic "v_unsafeGlobalDynFlags: llvmPasses not initialised"  #if STAGE < 2 GLOBAL_VAR(v_unsafeGlobalDynFlags, defaultGlobalDynFlags, DynFlags)
main/DynFlags.hs-boot view
@@ -5,13 +5,16 @@  data DynFlags data DumpFlag+data GeneralFlag -targetPlatform       :: DynFlags -> Platform-pprUserLength        :: DynFlags -> Int-pprCols              :: DynFlags -> Int-unsafeGlobalDynFlags :: DynFlags-useUnicode           :: DynFlags -> Bool-useUnicodeSyntax     :: DynFlags -> Bool-shouldUseColor       :: DynFlags -> Bool-hasPprDebug          :: DynFlags -> Bool-hasNoDebugOutput     :: DynFlags -> Bool+targetPlatform           :: DynFlags -> Platform+pprUserLength            :: DynFlags -> Int+pprCols                  :: DynFlags -> Int+unsafeGlobalDynFlags     :: DynFlags+useUnicode               :: DynFlags -> Bool+useUnicodeSyntax         :: DynFlags -> Bool+useStarIsType            :: DynFlags -> Bool+shouldUseColor           :: DynFlags -> Bool+shouldUseHexWordLiterals :: DynFlags -> Bool+hasPprDebug              :: DynFlags -> Bool+hasNoDebugOutput         :: DynFlags -> Bool
main/DynamicLoading.hs view
@@ -2,9 +2,9 @@  -- | Dynamically lookup up values from modules and loading them. module DynamicLoading (+        initializePlugins, #if defined(GHCI)         -- * Loading plugins-        loadPlugins,         loadFrontendPlugin,          -- * Force loading information@@ -20,11 +20,13 @@         getHValueSafely,         lessUnsafeCoerce #else-        pluginError,+        pluginError #endif     ) where  import GhcPrelude+import HscTypes         ( HscEnv )+import DynFlags  #if defined(GHCI) import Linker           ( linkModule, getHValue )@@ -38,8 +40,7 @@                         , gre_name, mkRdrQual ) import OccName          ( OccName, mkVarOcc ) import RnNames          ( gresFromAvails )-import DynFlags-import Plugins          ( Plugin, FrontendPlugin, CommandLineOption )+import Plugins import PrelNames        ( pluginTyConName, frontendPluginTyConName )  import HscTypes@@ -56,6 +57,7 @@ import Exception import Hooks +import Control.Monad     ( when, unless ) import Data.Maybe        ( mapMaybe ) import GHC.Exts          ( unsafeCoerce# ) @@ -65,31 +67,67 @@ 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+initializePlugins hsc_env df+#if !defined(GHCI)+  = do let pluginMods = pluginModNames df+       unless (null pluginMods) (pluginError pluginMods)+       return df+#else+  | map lpModuleName (plugins df) == pluginModNames df -- plugins not changed+     && all (\p -> lpArguments p == argumentsForPlugin p (pluginModNameOpts df))+            (plugins df) -- arguments not changed+  = return df -- no need to reload plugins+  | otherwise+  = do loadedPlugins <- loadPlugins (hsc_env { hsc_dflags = df })+       return $ df { plugins = loadedPlugins }+  where argumentsForPlugin p = map snd . filter ((== lpModuleName p) . fst)+#endif++ #if defined(GHCI) -loadPlugins :: HscEnv -> IO [(ModuleName, Plugin, [CommandLineOption])]+loadPlugins :: HscEnv -> IO [LoadedPlugin] loadPlugins hsc_env-  = do { plugins <- mapM (loadPlugin hsc_env) to_load+  = do { unless (null to_load) $+           checkExternalInterpreter hsc_env+       ; plugins <- mapM loadPlugin to_load        ; return $ zipWith attachOptions to_load plugins }   where     dflags  = hsc_dflags hsc_env     to_load = pluginModNames dflags -    attachOptions mod_nm plug = (mod_nm, plug, options)+    attachOptions mod_nm (plug, mod) = LoadedPlugin plug mod (reverse options)       where         options = [ option | (opt_mod_nm, option) <- pluginModNameOpts dflags                             , opt_mod_nm == mod_nm ]+    loadPlugin = loadPlugin' (mkVarOcc "plugin") pluginTyConName hsc_env -loadPlugin :: HscEnv -> ModuleName -> IO Plugin-loadPlugin = loadPlugin' (mkVarOcc "plugin") pluginTyConName  loadFrontendPlugin :: HscEnv -> ModuleName -> IO FrontendPlugin-loadFrontendPlugin = loadPlugin' (mkVarOcc "frontendPlugin") frontendPluginTyConName+loadFrontendPlugin hsc_env mod_name = do+    checkExternalInterpreter hsc_env+    fst <$> loadPlugin' (mkVarOcc "frontendPlugin") frontendPluginTyConName+                hsc_env mod_name -loadPlugin' :: OccName -> Name -> HscEnv -> ModuleName -> IO a+-- #14335+checkExternalInterpreter :: HscEnv -> IO ()+checkExternalInterpreter hsc_env =+    when (gopt Opt_ExternalInterpreter dflags) $+      throwCmdLineError $ showSDoc dflags $+        text "Plugins require -fno-external-interpreter"+  where+    dflags = hsc_dflags hsc_env++loadPlugin' :: OccName -> Name -> HscEnv -> ModuleName -> IO (a, ModIface) loadPlugin' occ_name plugin_name hsc_env mod_name   = do { let plugin_rdr_name = mkRdrQual mod_name occ_name              dflags = hsc_dflags hsc_env@@ -101,7 +139,7 @@                           [ text "The module", ppr mod_name                           , text "did not export the plugin name"                           , ppr plugin_rdr_name ]) ;-            Just name ->+            Just (name, mod_iface) ->       do { plugin_tycon <- forceLoadTyCon hsc_env plugin_name         ; mb_plugin <- getValueSafely hsc_env name (mkTyConTy plugin_tycon)@@ -111,7 +149,7 @@                           [ text "The value", ppr name                           , text "did not have the type"                           , ppr pluginTyConName, text "as required"])-            Just plugin -> return plugin } } }+            Just plugin -> return (plugin, mod_iface) } } }   -- | Force the interfaces for the given modules to be loaded. The 'SDoc' parameter is used@@ -218,7 +256,10 @@ -- loaded very partially: just enough that it can be used, without its -- rules and instances affecting (and being linked from!) the module -- being compiled.  This was introduced by 57d6798.-lookupRdrNameInModuleForPlugins :: HscEnv -> ModuleName -> RdrName -> IO (Maybe Name)+--+-- Need the module as well to record information in the interface file+lookupRdrNameInModuleForPlugins :: HscEnv -> ModuleName -> RdrName+                                -> IO (Maybe (Name, ModIface)) lookupRdrNameInModuleForPlugins hsc_env mod_name rdr_name = do     -- First find the package the module resides in by searching exposed packages and home modules     found_module <- findPluginModule hsc_env mod_name@@ -236,7 +277,7 @@                         imp_spec = ImpSpec decl_spec ImpAll                         env = mkGlobalRdrEnv (gresFromAvails (Just imp_spec) (mi_exports iface))                     case lookupGRE_RdrName rdr_name env of-                        [gre] -> return (Just (gre_name gre))+                        [gre] -> return (Just (gre_name gre, iface))                         []    -> return Nothing                         _     -> panic "lookupRdrNameInModule" 
main/ErrUtils.hs view
@@ -500,9 +500,12 @@         doc' <- if null hdr                 then return doc                 else do t <- getCurrentTime-                        let d = text (show t)-                              $$ blankLine-                              $$ doc+                        let timeStamp = if (gopt Opt_SuppressTimestamps dflags)+                                          then empty+                                          else text (show t)+                        let d = timeStamp+                                $$ blankLine+                                $$ doc                         return $ mkDumpDoc hdr d         defaultLogActionHPrintDoc dflags handle doc' dump_style 
main/FileCleanup.hs view
@@ -3,7 +3,7 @@   ( TempFileLifetime(..)   , cleanTempDirs, cleanTempFiles, cleanCurrentModuleTempFiles   , addFilesToClean, changeTempFilesLifetime-  , newTempName, newTempLibName+  , newTempName, newTempLibName, newTempDir   , withSystemTempDirectory, withTempDirectory   ) where @@ -130,6 +130,21 @@            if b then findTempName prefix                 else do -- clean it up later                         addFilesToClean dflags lifetime [filename]+                        return filename++newTempDir :: DynFlags -> IO FilePath+newTempDir dflags+  = do d <- getTempDir dflags+       findTempDir (d </> "ghc_")+  where+    findTempDir :: FilePath -> IO FilePath+    findTempDir prefix+      = do n <- newTempSuffix dflags+           let filename = prefix ++ show n+           b <- doesDirectoryExist filename+           if b then findTempDir prefix+                else do createDirectory filename+                        -- see mkTempDir below; this is wrong: -> consIORef (dirsToClean dflags) filename                         return filename  newTempLibName :: DynFlags -> TempFileLifetime -> Suffix
main/Finder.hs view
@@ -152,15 +152,17 @@   res <- this   case res of     NotFound { fr_paths = paths1, fr_mods_hidden = mh1-             , fr_pkgs_hidden = ph1, fr_suggestions = s1 }+             , fr_pkgs_hidden = ph1, fr_unusables = u1, fr_suggestions = s1 }      -> do res2 <- or_this            case res2 of              NotFound { fr_paths = paths2, fr_pkg = mb_pkg2, fr_mods_hidden = mh2-                      , fr_pkgs_hidden = ph2, fr_suggestions = s2 }+                      , fr_pkgs_hidden = ph2, fr_unusables = u2+                      , fr_suggestions = s2 }               -> return (NotFound { fr_paths = paths1 ++ paths2                                   , fr_pkg = mb_pkg2 -- snd arg is the package search                                   , fr_mods_hidden = mh1 ++ mh2                                   , fr_pkgs_hidden = ph1 ++ ph2+                                  , fr_unusables = u1 ++ u2                                   , fr_suggestions = s1  ++ s2 })              _other -> return res2     _other -> return res@@ -205,6 +207,7 @@         InstalledNotFound fp _ -> return (NotFound{ fr_paths = fp, fr_pkg = Just (moduleUnitId m)                                          , fr_pkgs_hidden = []                                          , fr_mods_hidden = []+                                         , fr_unusables = []                                          , fr_suggestions = []})      LookupMultiple rs ->        return (FoundMultiple rs)@@ -212,11 +215,23 @@        return (NotFound{ fr_paths = [], fr_pkg = Nothing                        , fr_pkgs_hidden = map (moduleUnitId.fst) pkg_hiddens                        , fr_mods_hidden = map (moduleUnitId.fst) mod_hiddens+                       , fr_unusables = []                        , fr_suggestions = [] })+     LookupUnusable unusable ->+       let unusables' = map get_unusable unusable+           get_unusable (m, ModUnusable r) = (moduleUnitId m, r)+           get_unusable (_, r)             =+             pprPanic "findLookupResult: unexpected origin" (ppr r)+       in return (NotFound{ fr_paths = [], fr_pkg = Nothing+                          , fr_pkgs_hidden = []+                          , fr_mods_hidden = []+                          , fr_unusables = unusables'+                          , fr_suggestions = [] })      LookupNotFound suggest ->        return (NotFound{ fr_paths = [], fr_pkg = Nothing                        , fr_pkgs_hidden = []                        , fr_mods_hidden = []+                       , fr_unusables = []                        , fr_suggestions = suggest })  modLocationCache :: HscEnv -> InstalledModule -> IO InstalledFindResult -> IO InstalledFindResult@@ -260,6 +275,7 @@         fr_pkg = Just uid,         fr_mods_hidden = [],         fr_pkgs_hidden = [],+        fr_unusables = [],         fr_suggestions = []       }  where@@ -570,8 +586,19 @@ -- Error messages  cannotFindModule :: DynFlags -> ModuleName -> FindResult -> SDoc-cannotFindModule = cantFindErr (sLit "Could not find module")-                               (sLit "Ambiguous module name")+cannotFindModule flags mod res =+  cantFindErr (sLit cannotFindMsg)+              (sLit "Ambiguous module name")+              flags mod res+  where+    cannotFindMsg =+      case res of+        NotFound { fr_mods_hidden = hidden_mods+                 , fr_pkgs_hidden = hidden_pkgs+                 , fr_unusables = unusables }+          | not (null hidden_mods && null hidden_pkgs && null unusables)+          -> "Could not load module"+        _ -> "Could not find module"  cannotFindInterface  :: DynFlags -> ModuleName -> InstalledFindResult -> SDoc cannotFindInterface = cantFindInstalledErr (sLit "Failed to load interface for")@@ -598,6 +625,7 @@     pprMod (m, o) = text "it is bound as" <+> ppr m <+>                                 text "by" <+> pprOrigin m o     pprOrigin _ ModHidden = panic "cantFindErr: bound by mod hidden"+    pprOrigin _ (ModUnusable _) = panic "cantFindErr: bound by mod unusable"     pprOrigin m (ModOrigin e res _ f) = sep $ punctuate comma (       if e == Just True           then [text "package" <+> ppr (moduleUnitId m)]@@ -619,19 +647,21 @@              NotFound { fr_paths = files, fr_pkg = mb_pkg                      , fr_mods_hidden = mod_hiddens, fr_pkgs_hidden = pkg_hiddens-                     , fr_suggestions = suggest }+                     , fr_unusables = unusables, fr_suggestions = suggest }                 | Just pkg <- mb_pkg, pkg /= thisPackage dflags                 -> not_found_in_package pkg files                  | not (null suggest)                 -> pp_suggestions suggest $$ tried_these files -                | null files && null mod_hiddens && null pkg_hiddens+                | null files && null mod_hiddens &&+                  null pkg_hiddens && null unusables                 -> text "It is not a module in the current program, or in any known package."                  | otherwise                 -> vcat (map pkg_hidden pkg_hiddens) $$                    vcat (map mod_hidden mod_hiddens) $$+                   vcat (map unusable unusables) $$                    tried_these files              _ -> panic "cantFindErr"@@ -667,18 +697,28 @@         <+> quotes (ppr pkgid)         --FIXME: we don't really want to show the unit id here we should         -- show the source package id or installed package id if it's ambiguous-        <> dot $$ cabal_pkg_hidden_hint pkgid-    cabal_pkg_hidden_hint pkgid+        <> dot $$ pkg_hidden_hint pkgid+    pkg_hidden_hint pkgid      | gopt Opt_BuildingCabalPackage dflags         = let pkg = expectJust "pkg_hidden" (lookupPackage dflags pkgid)            in text "Perhaps you need to add" <+>               quotes (ppr (packageName pkg)) <+>               text "to the build-depends in your .cabal file."+     | Just pkg <- lookupPackage dflags pkgid+         = text "You can run" <+>+           quotes (text ":set -package " <> ppr (packageName pkg)) <+>+           text "to expose it." $$+           text "(Note: this unloads all the modules in the current scope.)"      | otherwise = Outputable.empty      mod_hidden pkg =         text "it is a hidden module in the package" <+> quotes (ppr pkg) +    unusable (pkg, reason)+      = text "It is a member of the package"+      <+> quotes (ppr pkg)+      $$ pprReason (text "which is") reason+     pp_suggestions :: [ModuleSuggestion] -> SDoc     pp_suggestions sugs       | null sugs = Outputable.empty@@ -690,6 +730,7 @@     -- also has a reexport, prefer that one     pp_sugg (SuggestVisible m mod o) = ppr m <+> provenance o       where provenance ModHidden = Outputable.empty+            provenance (ModUnusable _) = Outputable.empty             provenance (ModOrigin{ fromOrigPackage = e,                                    fromExposedReexport = res,                                    fromPackageFlag = f })@@ -706,6 +747,7 @@               | otherwise = Outputable.empty     pp_sugg (SuggestHidden m mod o) = ppr m <+> provenance o       where provenance ModHidden =  Outputable.empty+            provenance (ModUnusable _) = Outputable.empty             provenance (ModOrigin{ fromOrigPackage = e,                                    fromHiddenReexport = rhs })               | Just False <- e
main/GHC.hs view
@@ -132,6 +132,9 @@         ForeignHValue,         compileExprRemote, compileParsedExprRemote, +        -- ** Docs+        getDocs, GetDocsFailure(..),+         -- ** Other         runTcInteractive,   -- Desired by some clients (Trac #8878)         isStmt, hasImport, isImport, isDecl,@@ -297,7 +300,8 @@ import GhcMake import DriverPipeline   ( compileOne' ) import GhcMonad-import TcRnMonad        ( finalSafeMode, fixSafeInstances )+import TcRnMonad        ( finalSafeMode, fixSafeInstances, initIfaceTcRn )+import LoadIface        ( loadSysInterface ) import TcRnTypes import Packages import NameSet@@ -472,7 +476,6 @@           cleanTempFiles dflags           cleanTempDirs dflags           stopIServ hsc_env -- shut down the IServ-          log_finaliser dflags dflags           --  exceptions will be blocked while we clean the temporary files,           -- so there shouldn't be any difficulty if we receive further           -- signals.@@ -493,8 +496,8 @@ initGhcMonad mb_top_dir   = do { env <- liftIO $                 do { mySettings <- initSysTools mb_top_dir-                   ; myLlvmTargets <- initLlvmTargets mb_top_dir-                   ; dflags <- initDynFlags (defaultDynFlags mySettings myLlvmTargets)+                   ; myLlvmConfig <- initLlvmConfig mb_top_dir+                   ; dflags <- initDynFlags (defaultDynFlags mySettings myLlvmConfig)                    ; checkBrokenTablesNextToCode dflags                    ; setUnsafeGlobalDynFlags dflags                       -- c.f. DynFlags.parseDynamicFlagsFull, which@@ -592,12 +595,11 @@ -- | Set the action taken when the compiler produces a message.  This -- can also be accomplished using 'setProgramDynFlags', but using -- 'setLogAction' avoids invalidating the cached module graph.-setLogAction :: GhcMonad m => LogAction -> LogFinaliser -> m ()-setLogAction action finaliser = do+setLogAction :: GhcMonad m => LogAction -> m ()+setLogAction action = do   dflags' <- getProgramDynFlags   void $ setProgramDynFlags_ False $-    dflags' { log_action = action-            , log_finaliser = finaliser }+    dflags' { log_action = action }  setProgramDynFlags_ :: GhcMonad m => Bool -> DynFlags -> m [InstalledUnitId] setProgramDynFlags_ invalidate_needed dflags = do@@ -1244,13 +1246,20 @@ -- by 'Name'. Each name's lists will contain every instance in which that name -- is mentioned in the instance head. getNameToInstancesIndex :: GhcMonad m-  => [Module]  -- ^ visible modules. An orphan instance will be returned if and-               -- only it is visible from at least one module in the list.+  => [Module]        -- ^ visible modules. An orphan instance will be returned+                     -- if it is visible from at least one module in the list.+  -> Maybe [Module]  -- ^ modules to load. If this is not specified, we load+                     -- modules for everything that is in scope unqualified.   -> m (Messages, Maybe (NameEnv ([ClsInst], [FamInst])))-getNameToInstancesIndex visible_mods = do+getNameToInstancesIndex visible_mods mods_to_load = do   hsc_env <- getSession   liftIO $ runTcInteractive hsc_env $-    do { loadUnqualIfaces hsc_env (hsc_IC hsc_env)+    do { case mods_to_load of+           Nothing -> loadUnqualIfaces hsc_env (hsc_IC hsc_env)+           Just mods ->+             let doc = text "Need interface for reporting instances in scope"+             in initIfaceTcRn $ mapM_ (loadSysInterface doc) mods+        ; InstEnvs {ie_global, ie_local} <- tcGetInstEnvs        ; let visible_mods' = mkModuleSet visible_mods        ; (pkg_fie, home_fie) <- tcGetFamInstEnvs
main/GhcMake.hs view
@@ -201,11 +201,16 @@      msg       | gopt Opt_BuildingCabalPackage dflags-      = text "These modules are needed for compilation but not listed in your .cabal file's other-modules: "-        <> sep (map ppr missing)+      = hang+          (text "These modules are needed for compilation but not listed in your .cabal file's other-modules: ")+          4+          (sep (map ppr missing))       | otherwise-      = text "Modules are not listed in command line but needed for compilation: "-        <> sep (map ppr missing)+      =+        hang+          (text "Modules are not listed in command line but needed for compilation: ")+          4+          (sep (map ppr missing))     warn = makeIntoWarning       (Reason Opt_WarnMissingHomeModules)       (mkPlainErrMsg dflags noSrcSpan msg)
main/HeaderInfo.hs view
@@ -122,7 +122,8 @@        preludeImportDecl :: LImportDecl GhcPs       preludeImportDecl-        = L loc $ ImportDecl { ideclSourceSrc = NoSourceText,+        = L loc $ ImportDecl { ideclExt       = noExt,+                               ideclSourceSrc = NoSourceText,                                ideclName      = L loc pRELUDE_NAME,                                ideclPkgQual   = Nothing,                                ideclSource    = False,
main/HscMain.hs view
@@ -100,7 +100,6 @@ import ConLike import Control.Concurrent -import Avail            ( Avails ) import Module import Packages import RdrName@@ -142,6 +141,8 @@ import Hooks import TcEnv import PrelNames+import Plugins+import DynamicLoading   ( initializePlugins )  import DynFlags import ErrUtils@@ -362,7 +363,7 @@                 srcs0 = nub $ filter (not . (tmpDir dflags `isPrefixOf`))                             $ filter (not . (== n_hspp))                             $ map FilePath.normalise-                            $ filter (not . (isPrefixOf "<"))+                            $ filter (not . isPrefixOf "<")                             $ map unpackFS                             $ srcfiles pst                 srcs1 = case ml_hs_file (ms_location mod_summary) of@@ -374,7 +375,7 @@             -- filter them out:             srcs2 <- liftIO $ filterM doesFileExist srcs1 -            return HsParsedModule {+            let res = HsParsedModule {                       hpm_module    = rdr_module,                       hpm_src_files = srcs2,                       hpm_annotations@@ -383,24 +384,17 @@                                                  :(annotations_comments pst)))                    } --- XXX: should this really be a Maybe X?  Check under which circumstances this--- can become a Nothing and decide whether this should instead throw an--- exception/signal an error.-type RenamedStuff =-        (Maybe (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)],-                Maybe LHsDocString))+            -- apply parse transformation of plugins+            let applyPluginAction p opts+                  = parsedResultAction p opts mod_summary+            withPlugins dflags applyPluginAction res + -- ----------------------------------------------------------------------------- -- | If the renamed source has been kept, extract it. Dump it if requested. extract_renamed_stuff :: TcGblEnv -> Hsc (TcGblEnv, RenamedStuff) extract_renamed_stuff tc_result = do--    -- This 'do' is in the Maybe monad!-    let rn_info = do decl <- tcg_rn_decls tc_result-                     let imports = tcg_rn_imports tc_result-                         exports = tcg_rn_exports tc_result-                         doc_hdr = tcg_doc_hdr tc_result-                     return (decl,imports,exports,doc_hdr)+    let rn_info = getRenamedStuff tc_result      dflags <- getDynFlags     liftIO $ dumpIfSet_dyn dflags Opt_D_dump_rn_ast "Renamer" $@@ -414,9 +408,8 @@ hscTypecheckRename :: HscEnv -> ModSummary -> HsParsedModule                    -> IO (TcGblEnv, RenamedStuff) hscTypecheckRename hsc_env mod_summary rdr_module = runHsc hsc_env $ do-    tc_result <- hscTypecheck True mod_summary (Just rdr_module)-    extract_renamed_stuff tc_result-+      tc_result <- hscTypecheck True mod_summary (Just rdr_module)+      extract_renamed_stuff tc_result  hscTypecheck :: Bool -- ^ Keep renamed source?              -> ModSummary -> Maybe HsParsedModule@@ -459,39 +452,47 @@             -> Hsc TcGblEnv tcRnModule' sum save_rn_syntax mod = do     hsc_env <- getHscEnv+    dflags   <- getDynFlags+     tcg_res <- {-# SCC "Typecheck-Rename" #-}                ioMsgMaybe $-                   tcRnModule hsc_env (ms_hsc_src sum) save_rn_syntax mod+                   tcRnModule hsc_env sum+                     save_rn_syntax mod      -- See Note [Safe Haskell Overlapping Instances Implementation]     -- although this is used for more than just that failure case.     (tcSafeOK, whyUnsafe) <- liftIO $ readIORef (tcg_safeInfer tcg_res)-    dflags   <- getDynFlags     let allSafeOK = safeInferred dflags && tcSafeOK      -- end of the safe haskell line, how to respond to user?-    if not (safeHaskellOn dflags) || (safeInferOn dflags && not allSafeOK)-        -- if safe Haskell off or safe infer failed, mark unsafe-        then markUnsafeInfer tcg_res whyUnsafe+    res <- if not (safeHaskellOn dflags)+                || (safeInferOn dflags && not allSafeOK)+             -- if safe Haskell off or safe infer failed, mark unsafe+             then markUnsafeInfer tcg_res whyUnsafe -        -- module (could be) safe, throw warning if needed-        else do-            tcg_res' <- hscCheckSafeImports tcg_res-            safe <- liftIO $ fst <$> readIORef (tcg_safeInfer tcg_res')-            when safe $ do-              case wopt Opt_WarnSafe dflags of-                True -> (logWarnings $ unitBag $-                         makeIntoWarning (Reason Opt_WarnSafe) $-                         mkPlainWarnMsg dflags (warnSafeOnLoc dflags) $-                         errSafe tcg_res')-                False | safeHaskell dflags == Sf_Trustworthy &&-                        wopt Opt_WarnTrustworthySafe dflags ->-                        (logWarnings $ unitBag $-                         makeIntoWarning (Reason Opt_WarnTrustworthySafe) $-                         mkPlainWarnMsg dflags (trustworthyOnLoc dflags) $-                         errTwthySafe tcg_res')-                False -> return ()-            return tcg_res'+             -- module (could be) safe, throw warning if needed+             else do+                 tcg_res' <- hscCheckSafeImports tcg_res+                 safe <- liftIO $ fst <$> readIORef (tcg_safeInfer tcg_res')+                 when safe $ do+                   case wopt Opt_WarnSafe dflags of+                     True -> (logWarnings $ unitBag $+                              makeIntoWarning (Reason Opt_WarnSafe) $+                              mkPlainWarnMsg dflags (warnSafeOnLoc dflags) $+                              errSafe tcg_res')+                     False | safeHaskell dflags == Sf_Trustworthy &&+                             wopt Opt_WarnTrustworthySafe dflags ->+                             (logWarnings $ unitBag $+                              makeIntoWarning (Reason Opt_WarnTrustworthySafe) $+                              mkPlainWarnMsg dflags (trustworthyOnLoc dflags) $+                              errTwthySafe tcg_res')+                     False -> return ()+                 return tcg_res'++    -- apply plugins to the type checking result+++    return res   where     pprMod t  = ppr $ moduleName $ tcg_mod t     errSafe t = quotes (pprMod t) <+> text "has been inferred as safe!"@@ -671,15 +672,18 @@ hscIncrementalCompile always_do_basic_recompilation_check m_tc_result     mHscMessage hsc_env' mod_summary source_modified mb_old_iface mod_index   = do+    dflags <- initializePlugins hsc_env' (hsc_dflags hsc_env')+    let hsc_env'' = hsc_env' { hsc_dflags = dflags }+     -- One-shot mode needs a knot-tying mutable variable for interface     -- files. See TcRnTypes.TcGblEnv.tcg_type_env_var.     -- See also Note [hsc_type_env_var hack]     type_env_var <- newIORef emptyNameEnv     let mod = ms_mod mod_summary-        hsc_env | isOneShot (ghcMode (hsc_dflags hsc_env'))-                = hsc_env' { hsc_type_env_var = Just (mod, type_env_var) }+        hsc_env | isOneShot (ghcMode (hsc_dflags hsc_env''))+                = hsc_env'' { hsc_type_env_var = Just (mod, type_env_var) }                 | otherwise-                = hsc_env'+                = hsc_env''      -- NB: enter Hsc monad here so that we don't bail out early with     -- -Werror on typechecker warnings; we also want to run the desugarer@@ -905,15 +909,16 @@               -> return tcg_env'      warns dflags rules = listToBag $ map (warnRules dflags) rules-    warnRules dflags (L loc (HsRule n _ _ _ _ _ _)) =+    warnRules dflags (L loc (HsRule _ 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"  -- | Validate that safe imported modules are actually safe.  For modules in the -- HomePackage (the package the module we are compiling in resides) this just -- involves checking its trust type is 'Safe' or 'Trustworthy'. For modules--- that reside in another package we also must check that the external pacakge+-- that reside in another package we also must check that the external package -- is trusted. See the Note [Safe Haskell Trust Check] above for more -- information. --@@ -1392,15 +1397,13 @@     let dflags = hsc_dflags hsc_env     cmm <- ioMsgMaybe $ parseCmmFile dflags filename     liftIO $ do-        us <- mkSplitUniqSupply 'S'-        let initTopSRT = initUs_ us emptySRT         dumpIfSet_dyn dflags Opt_D_dump_cmm_verbose "Parsed Cmm" (ppr cmm)-        (_, cmmgroup) <- cmmPipeline hsc_env initTopSRT cmm-        rawCmms <- cmmToRawCmm dflags (Stream.yield cmmgroup)         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             cmm_mod = mkModule (thisPackage dflags) mod_name+        (_, cmmgroup) <- cmmPipeline hsc_env (emptySRT cmm_mod) cmm+        rawCmms <- cmmToRawCmm dflags (Stream.yield cmmgroup)         _ <- codeOutput dflags cmm_mod output_filename no_loc NoStubs [] []              rawCmms         return ()@@ -1451,21 +1454,17 @@         osSubsectionsViaSymbols (platformOS (targetPlatform dflags))         = {-# SCC "cmmPipeline" #-}           let run_pipeline us cmmgroup = do-                let (topSRT', us') = initUs us emptySRT-                (topSRT, cmmgroup) <- cmmPipeline hsc_env topSRT' cmmgroup-                let srt | isEmptySRT topSRT = []-                        | otherwise         = srtToData topSRT-                return (us', srt ++ cmmgroup)+                (_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 initTopSRT = initUs_ us emptySRT-              run_pipeline = cmmPipeline hsc_env-          in do topSRT <- Stream.mapAccumL run_pipeline initTopSRT ppr_stream1-                Stream.yield (srtToData topSRT)+          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@@ -1711,7 +1710,7 @@   hsc_env <- getHscEnv   maybe_stmt <- hscParseStmt expr   case maybe_stmt of-    Just (L _ (BodyStmt expr _ _ _)) -> return expr+    Just (L _ (BodyStmt _ expr _ _)) -> return expr     _ -> throwErrors $ unitBag $ mkPlainErrMsg (hsc_dflags hsc_env) noSrcSpan       (text "not an expression:" <+> quotes (text expr)) 
main/HscStats.hs view
@@ -70,18 +70,18 @@     trim ls    = takeWhile (not.isSpace) (dropWhile isSpace ls)      (fixity_sigs, bind_tys, bind_specs, bind_inlines, generic_sigs)-        = count_sigs [d | SigD d <- decls]+        = count_sigs [d | SigD _ d <- decls]                 -- NB: this omits fixity decls on local bindings and                 -- in class decls. ToDo -    tycl_decls = [d | TyClD d <- decls]+    tycl_decls = [d | TyClD _ d <- decls]     (class_ds, type_ds, data_ds, newt_ds, type_fam_ds) =       countTyClDecls tycl_decls -    inst_decls = [d | InstD d <- decls]+    inst_decls = [d | InstD _ d <- decls]     inst_ds    = length inst_decls     default_ds = count (\ x -> case x of { DefD{} -> True; _ -> False}) decls-    val_decls  = [d | ValD d <- decls]+    val_decls  = [d | ValD _ d <- decls]      real_exports = case exports of { Nothing -> []; Just (L _ es) -> es }     n_exports    = length real_exports@@ -102,7 +102,7 @@     (inst_method_ds, method_specs, method_inlines, inst_type_ds, inst_data_ds)         = sum5 (map inst_info inst_decls) -    count_bind (PatBind { pat_lhs = L _ (VarPat _) }) = (1,0,0)+    count_bind (PatBind { pat_lhs = L _ (VarPat{}) }) = (1,0,0)     count_bind (PatBind {})                           = (0,1,0)     count_bind (FunBind {})                           = (0,1,0)     count_bind (PatSynBind {})                        = (0,0,1)@@ -120,6 +120,7 @@     import_info (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 (L _ (XImportDecl _)) = panic "import_info"     safe_info = qual_info     qual_info False  = 0     qual_info True   = 1@@ -155,6 +156,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"      -- TODO: use Sum monoid     addpr :: (Int,Int,Int) -> Int
main/HscTypes.hs view
@@ -44,7 +44,7 @@         lookupHpt, eltsHpt, filterHpt, allHpt, mapHpt, delFromHpt,         addToHpt, addListToHpt, lookupHptDirectly, listToHpt,         hptCompleteSigs,-        hptInstances, hptRules, hptVectInfo, pprHPT,+        hptInstances, hptRules, pprHPT,          -- * State relating to known packages         ExternalPackageState(..), EpsStats(..), addEpsInStats,@@ -106,7 +106,7 @@         -- * Information on imports and exports         WhetherHasOrphans, IsBootInterface, Usage(..),         Dependencies(..), noDependencies,-        updNameCacheIO,+        updNameCache,         IfaceExport,          -- * Warnings@@ -123,10 +123,6 @@         -- * Breakpoints         ModBreaks (..), emptyModBreaks, -        -- * Vectorisation information-        VectInfo(..), IfaceVectInfo(..), noVectInfo, plusVectInfo,-        noIfaceVectInfo, isNoIfaceVectInfo,-         -- * Safe Haskell information         IfaceTrustInfo, getSafeMode, setSafeMode, noIfaceTrustInfo,         trustInfoToNum, numToTrustInfo, IsSafeImport,@@ -161,11 +157,9 @@ import Module import InstEnv          ( InstEnv, ClsInst, identicalClsInstHead ) import FamInstEnv-import CoreSyn          ( CoreProgram, RuleBase, CoreRule, CoreVect )+import CoreSyn          ( CoreProgram, RuleBase, CoreRule ) import Name import NameEnv-import NameSet-import VarEnv import VarSet import Var import Id@@ -665,13 +659,6 @@                 return (md_insts details, md_fam_insts details)     in (concat insts, concat famInsts) --- | Get the combined VectInfo of all modules in the home package table. In--- contrast to instances and rules, we don't care whether the modules are--- "below" us in the dependency sense. The VectInfo of those modules not "below"--- us does not affect the compilation of the current module.-hptVectInfo :: HscEnv -> VectInfo-hptVectInfo = concatVectInfo . hptAllThings ((: []) . md_vect_info . hm_details)- -- | Get rules from modules "below" this one (in the dependency sense) hptRules :: HscEnv -> [(ModuleName, IsBootInterface)] -> [CoreRule] hptRules = hptSomeThingsBelowUs (md_rules . hm_details) False@@ -830,6 +817,9 @@       , fr_pkgs_hidden :: [UnitId]      -- Module is in these packages,                                            --   but the *package* is hidden +        -- Modules are in these packages, but it is unusable+      , fr_unusables   :: [(UnitId, UnusablePackageReason)]+       , fr_suggestions :: [ModuleSuggestion] -- Possible mis-spelled modules       } @@ -861,6 +851,7 @@                                               -- 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,@@ -933,9 +924,7 @@         mi_fam_insts   :: [IfaceFamInst],  -- ^ Sorted family instances         mi_rules       :: [IfaceRule],     -- ^ Sorted rules         mi_orphan_hash :: !Fingerprint,    -- ^ Hash for orphan rules, class and family-                                           -- instances, and vectorise pragmas combined--        mi_vect_info :: !IfaceVectInfo,    -- ^ Vectorisation information+                                           -- instances combined                  -- Cached environments for easy lookup                 -- These are computed (lazily) from other fields@@ -964,7 +953,16 @@                 -- itself) but imports some trustworthy modules from its own                 -- package (which does require its own package be trusted).                 -- See Note [RnNames . Trust Own Package]-        mi_complete_sigs :: [IfaceCompleteMatch]+        mi_complete_sigs :: [IfaceCompleteMatch],++        mi_doc_hdr :: Maybe HsDocString,+                -- ^ Module header.++        mi_decl_docs :: DeclDocMap,+                -- ^ Docs on declarations.++        mi_arg_docs :: ArgDocMap+                -- ^ Docs on arguments.      }  -- | Old-style accessor for whether or not the ModIface came from an hs-boot@@ -1023,6 +1021,7 @@                  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,@@ -1038,11 +1037,13 @@                  mi_fam_insts = fam_insts,                  mi_rules     = rules,                  mi_orphan_hash = orphan_hash,-                 mi_vect_info = vect_info,                  mi_hpc       = hpc_info,                  mi_trust     = trust,                  mi_trust_pkg = trust_pkg,-                 mi_complete_sigs = complete_sigs }) = do+                 mi_complete_sigs = complete_sigs,+                 mi_doc_hdr   = doc_hdr,+                 mi_decl_docs = decl_docs,+                 mi_arg_docs  = arg_docs }) = do         put_ bh mod         put_ bh sig_of         put_ bh hsc_src@@ -1051,6 +1052,7 @@         put_ bh flag_hash         put_ bh opt_hash         put_ bh hpc_hash+        put_ bh plugin_hash         put_ bh orphan         put_ bh hasFamInsts         lazyPut bh deps@@ -1066,11 +1068,13 @@         put_ bh fam_insts         lazyPut bh rules         put_ bh orphan_hash-        put_ bh vect_info         put_ bh hpc_info         put_ bh trust         put_ bh trust_pkg         put_ bh complete_sigs+        lazyPut bh doc_hdr+        lazyPut bh decl_docs+        lazyPut bh arg_docs     get bh = do         mod         <- get bh@@ -1081,6 +1085,7 @@         flag_hash   <- get bh         opt_hash    <- get bh         hpc_hash    <- get bh+        plugin_hash <- get bh         orphan      <- get bh         hasFamInsts <- get bh         deps        <- lazyGet bh@@ -1096,11 +1101,13 @@         fam_insts   <- {-# SCC "bin_fam_insts" #-} get bh         rules       <- {-# SCC "bin_rules" #-} lazyGet bh         orphan_hash <- get bh-        vect_info   <- get bh         hpc_info    <- get bh         trust       <- get bh         trust_pkg   <- get bh         complete_sigs <- get bh+        doc_hdr     <- lazyGet bh+        decl_docs   <- lazyGet bh+        arg_docs    <- lazyGet bh         return (ModIface {                  mi_module      = mod,                  mi_sig_of      = sig_of,@@ -1110,6 +1117,7 @@                  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,@@ -1126,7 +1134,6 @@                  mi_fam_insts   = fam_insts,                  mi_rules       = rules,                  mi_orphan_hash = orphan_hash,-                 mi_vect_info   = vect_info,                  mi_hpc         = hpc_info,                  mi_trust       = trust,                  mi_trust_pkg   = trust_pkg,@@ -1134,7 +1141,10 @@                  mi_warn_fn     = mkIfaceWarnCache warns,                  mi_fix_fn      = mkIfaceFixCache fixities,                  mi_hash_fn     = mkIfaceHashCache decls,-                 mi_complete_sigs = complete_sigs })+                 mi_complete_sigs = complete_sigs,+                 mi_doc_hdr     = doc_hdr,+                 mi_decl_docs   = decl_docs,+                 mi_arg_docs    = arg_docs })  -- | The original names declared of a certain module that are exported type IfaceExport = AvailInfo@@ -1149,6 +1159,7 @@                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,@@ -1166,14 +1177,16 @@                mi_decls       = [],                mi_globals     = Nothing,                mi_orphan_hash = fingerprint0,-               mi_vect_info   = noIfaceVectInfo,                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_complete_sigs = [],+               mi_doc_hdr     = Nothing,+               mi_decl_docs   = emptyDeclDocMap,+               mi_arg_docs    = emptyArgDocMap }   -- | Constructs cache for the 'mi_hash_fn' field of a 'ModIface'@@ -1205,7 +1218,6 @@         md_rules     :: ![CoreRule],    -- ^ Domain may include 'Id's from other modules         md_anns      :: ![Annotation],  -- ^ Annotations present in this module: currently                                         -- they only annotate things also declared in this module-        md_vect_info :: !VectInfo,       -- ^ Module vectorisation information         md_complete_sigs :: [CompleteMatch]           -- ^ Complete match pragmas for this module      }@@ -1219,7 +1231,6 @@                  md_rules     = [],                  md_fam_insts = [],                  md_anns      = [],-                 md_vect_info = noVectInfo,                  md_complete_sigs = [] }  -- | Records the modules directly imported by a module for extracting e.g.@@ -1244,7 +1255,8 @@         imv_span :: SrcSpan,             -- ^ the source span of the whole import         imv_is_safe :: IsSafeImport,     -- ^ whether this is a safe import         imv_is_hiding :: Bool,           -- ^ whether this is an "hiding" import-        imv_all_exports :: GlobalRdrEnv, -- ^ all the things the module could provide+        imv_all_exports :: !GlobalRdrEnv, -- ^ all the things the module could provide+          -- NB. BangPattern here: otherwise this leaks. (#15111)         imv_qualified :: Bool            -- ^ whether this is a qualified import         } @@ -1278,16 +1290,13 @@                                          -- See Note [Overall plumbing for rules] in Rules.hs         mg_binds     :: !CoreProgram,    -- ^ Bindings for this module         mg_foreign   :: !ForeignStubs,   -- ^ Foreign exports declared in this module-        mg_foreign_files :: ![(ForeignSrcLang, String)],+        mg_foreign_files :: ![(ForeignSrcLang, FilePath)],         -- ^ Files to be compiled with the C compiler         mg_warns     :: !Warnings,       -- ^ Warnings declared in the module         mg_anns      :: [Annotation],    -- ^ Annotations declared in this module         mg_complete_sigs :: [CompleteMatch], -- ^ Complete Matches         mg_hpc_info  :: !HpcInfo,        -- ^ Coverage tick boxes in the module         mg_modBreaks :: !(Maybe ModBreaks), -- ^ Breakpoints for the module-        mg_vect_decls:: ![CoreVect],     -- ^ Vectorisation declarations in this module-                                         --   (produced by desugarer & consumed by vectoriser)-        mg_vect_info :: !VectInfo,       -- ^ Pool of vectorised declarations in the module                          -- The next two fields are unusual, because they give instance                         -- environments for *all* modules in the home package, including@@ -1302,9 +1311,13 @@                                                 -- one); c.f. 'tcg_fam_inst_env'          mg_safe_haskell :: SafeHaskellMode,     -- ^ Safe Haskell mode-        mg_trust_pkg    :: Bool                 -- ^ Do we need to trust our+        mg_trust_pkg    :: Bool,                -- ^ Do we need to trust our                                                 -- own package for Safe Haskell?                                                 -- See Note [RnNames . Trust Own Package]++        mg_doc_hdr       :: !(Maybe HsDocString), -- ^ Module header.+        mg_decl_docs     :: !DeclDocMap,     -- ^ Docs on declarations.+        mg_arg_docs      :: !ArgDocMap       -- ^ Docs on arguments.     }  -- The ModGuts takes on several slightly different forms:@@ -1335,11 +1348,11 @@                 -- ^ The tidied main bindings, including                 -- previously-implicit bindings for record and class                 -- selectors, and data constructor wrappers.  But *not*-                -- data constructor workers; reason: we we regard them+                -- data constructor workers; reason: we regard them                 -- as part of the code-gen of tycons          cg_foreign   :: !ForeignStubs,   -- ^ Foreign export stubs-        cg_foreign_files :: ![(ForeignSrcLang, String)],+        cg_foreign_files :: ![(ForeignSrcLang, FilePath)],         cg_dep_pkgs  :: ![InstalledUnitId], -- ^ Dependent packages, used to                                             -- generate #includes for C code gen         cg_hpc_info  :: !HpcInfo,           -- ^ Program coverage tick box information@@ -1720,8 +1733,13 @@   | isEmptyTCvSubst subst = ictxt   | otherwise             = ictxt { ic_tythings = map subst_ty tts }   where-    subst_ty (AnId id) = AnId $ id `setIdType` substTyUnchecked subst (idType id)-    subst_ty tt        = tt+    subst_ty (AnId id)+      = AnId $ id `setIdType` substTyAddInScope subst (idType id)+      -- Variables in the interactive context *can* mention free type variables+      -- because of the runtime debugger. Otherwise you'd expect all+      -- variables bound in the interactive context to be closed.+    subst_ty tt+      = tt  instance Outputable InteractiveImport where   ppr (IIModule m) = char '*' <> ppr m@@ -1819,8 +1837,7 @@          forceUnqualNames :: [Name]         forceUnqualNames =-          map tyConName [ constraintKindTyCon, heqTyCon, coercibleTyCon-                        , starKindTyCon, unicodeStarKindTyCon ]+          map tyConName [ constraintKindTyCon, heqTyCon, coercibleTyCon ]           ++ [ eqTyConName ]          right_name gre = nameModule_maybe (gre_name gre) == Just mod@@ -2311,7 +2328,6 @@ -- * A transformation rule in a module other than the one defining --   the function in the head of the rule ----- * A vectorisation pragma type WhetherHasOrphans   = Bool  -- | Does this module define family instances?@@ -2356,6 +2372,9 @@                         -- This is used by 'checkFamInstConsistency'.  This                         -- does NOT include us, unlike 'imp_finsts'. See Note                         -- [The type family instance consistency story].++         , dep_plgins :: [ModuleName]+                        -- ^ All the plugins used while compiling this module.          }   deriving( Eq )         -- Equality used only for old/new comparison in MkIface.addFingerprints@@ -2366,16 +2385,18 @@                       put_ bh (dep_pkgs deps)                       put_ bh (dep_orphs deps)                       put_ bh (dep_finsts deps)+                      put_ bh (dep_plgins deps)      get bh = do ms <- get bh                 ps <- get bh                 os <- get bh                 fis <- get bh+                pl <- get bh                 return (Deps { dep_mods = ms, dep_pkgs = ps, dep_orphs = os,-                               dep_finsts = fis })+                               dep_finsts = fis, dep_plgins = pl })  noDependencies :: Dependencies-noDependencies = Deps [] [] [] []+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@@ -2505,7 +2526,6 @@ type PackageRuleBase         = RuleBase type PackageInstEnv          = InstEnv type PackageFamInstEnv       = FamInstEnv-type PackageVectInfo         = VectInfo type PackageAnnEnv           = AnnEnv type PackageCompleteMatchMap = CompleteMatchMap @@ -2567,8 +2587,6 @@                                                -- from all the external-package modules         eps_rule_base    :: !PackageRuleBase,  -- ^ The total 'RuleEnv' accumulated                                                -- from all the external-package modules-        eps_vect_info    :: !PackageVectInfo,  -- ^ The total 'VectInfo' accumulated-                                               -- from all the external-package modules         eps_ann_env      :: !PackageAnnEnv,    -- ^ The total 'AnnEnv' accumulated                                                -- from all the external-package modules         eps_complete_matches :: !PackageCompleteMatchMap,@@ -2607,10 +2625,10 @@ its binding site, we fix it up. -} -updNameCacheIO :: HscEnv-               -> (NameCache -> (NameCache, c))  -- The updating function-               -> IO c-updNameCacheIO hsc_env upd_fn+updNameCache :: HscEnv+             -> (NameCache -> (NameCache, c))  -- The updating function+             -> IO c+updNameCache hsc_env upd_fn   = atomicModifyIORef' (hsc_NC hsc_env) upd_fn  mkSOName :: Platform -> FilePath -> FilePath@@ -2867,119 +2885,6 @@ isHpcUsed :: HpcInfo -> AnyHpcUsage isHpcUsed (HpcInfo {})                   = True isHpcUsed (NoHpcInfo { hpcUsed = used }) = used--{--************************************************************************-*                                                                      *-\subsection{Vectorisation Support}-*                                                                      *-************************************************************************--The following information is generated and consumed by the vectorisation-subsystem.  It communicates the vectorisation status of declarations from one-module to another.--Why do we need both f and f_v in the ModGuts/ModDetails/EPS version VectInfo-below?  We need to know `f' when converting to IfaceVectInfo.  However, during-vectorisation, we need to know `f_v', whose `Var' we cannot lookup based-on just the OccName easily in a Core pass.--}---- |Vectorisation information for 'ModGuts', 'ModDetails' and 'ExternalPackageState'; see also--- documentation at 'Vectorise.Env.GlobalEnv'.------ NB: The following tables may also include 'Var's, 'TyCon's and 'DataCon's from imported modules,---     which have been subsequently vectorised in the current module.----data VectInfo-  = VectInfo-    { vectInfoVar            :: DVarEnv (Var    , Var  )    -- ^ @(f, f_v)@ keyed on @f@-    , vectInfoTyCon          :: NameEnv (TyCon  , TyCon)    -- ^ @(T, T_v)@ keyed on @T@-    , vectInfoDataCon        :: NameEnv (DataCon, DataCon)  -- ^ @(C, C_v)@ keyed on @C@-    , vectInfoParallelVars   :: DVarSet                     -- ^ set of parallel variables-    , vectInfoParallelTyCons :: NameSet                     -- ^ set of parallel type constructors-    }---- |Vectorisation information for 'ModIface'; i.e, the vectorisation information propagated--- across module boundaries.------ NB: The field 'ifaceVectInfoVar' explicitly contains the workers of data constructors as well as---     class selectors — i.e., their mappings are /not/ implicitly generated from the data types.---     Moreover, whether the worker of a data constructor is in 'ifaceVectInfoVar' determines---     whether that data constructor was vectorised (or is part of an abstractly vectorised type---     constructor).----data IfaceVectInfo-  = IfaceVectInfo-    { ifaceVectInfoVar            :: [Name]  -- ^ All variables in here have a vectorised variant-    , ifaceVectInfoTyCon          :: [Name]  -- ^ All 'TyCon's in here have a vectorised variant;-                                             -- the name of the vectorised variant and those of its-                                             -- data constructors are determined by-                                             -- 'OccName.mkVectTyConOcc' and-                                             -- 'OccName.mkVectDataConOcc'; the names of the-                                             -- isomorphisms are determined by 'OccName.mkVectIsoOcc'-    , ifaceVectInfoTyConReuse     :: [Name]  -- ^ The vectorised form of all the 'TyCon's in here-                                             -- coincides with the unconverted form; the name of the-                                             -- isomorphisms is determined by 'OccName.mkVectIsoOcc'-    , ifaceVectInfoParallelVars   :: [Name]  -- iface version of 'vectInfoParallelVar'-    , ifaceVectInfoParallelTyCons :: [Name]  -- iface version of 'vectInfoParallelTyCon'-    }--noVectInfo :: VectInfo-noVectInfo-  = VectInfo emptyDVarEnv emptyNameEnv emptyNameEnv emptyDVarSet emptyNameSet--plusVectInfo :: VectInfo -> VectInfo -> VectInfo-plusVectInfo vi1 vi2 =-  VectInfo (vectInfoVar            vi1 `plusDVarEnv`   vectInfoVar            vi2)-           (vectInfoTyCon          vi1 `plusNameEnv`   vectInfoTyCon          vi2)-           (vectInfoDataCon        vi1 `plusNameEnv`   vectInfoDataCon        vi2)-           (vectInfoParallelVars   vi1 `unionDVarSet`  vectInfoParallelVars   vi2)-           (vectInfoParallelTyCons vi1 `unionNameSet` vectInfoParallelTyCons vi2)--concatVectInfo :: [VectInfo] -> VectInfo-concatVectInfo = foldr plusVectInfo noVectInfo--noIfaceVectInfo :: IfaceVectInfo-noIfaceVectInfo = IfaceVectInfo [] [] [] [] []--isNoIfaceVectInfo :: IfaceVectInfo -> Bool-isNoIfaceVectInfo (IfaceVectInfo l1 l2 l3 l4 l5)-  = null l1 && null l2 && null l3 && null l4 && null l5--instance Outputable VectInfo where-  ppr info = vcat-             [ text "variables       :" <+> ppr (vectInfoVar            info)-             , text "tycons          :" <+> ppr (vectInfoTyCon          info)-             , text "datacons        :" <+> ppr (vectInfoDataCon        info)-             , text "parallel vars   :" <+> ppr (vectInfoParallelVars   info)-             , text "parallel tycons :" <+> ppr (vectInfoParallelTyCons info)-             ]--instance Outputable IfaceVectInfo where-  ppr info = vcat-             [ text "variables       :" <+> ppr (ifaceVectInfoVar            info)-             , text "tycons          :" <+> ppr (ifaceVectInfoTyCon          info)-             , text "tycons reuse    :" <+> ppr (ifaceVectInfoTyConReuse     info)-             , text "parallel vars   :" <+> ppr (ifaceVectInfoParallelVars   info)-             , text "parallel tycons :" <+> ppr (ifaceVectInfoParallelTyCons info)-             ]---instance Binary IfaceVectInfo where-    put_ bh (IfaceVectInfo a1 a2 a3 a4 a5) = do-        put_ bh a1-        put_ bh a2-        put_ bh a3-        put_ bh a4-        put_ bh a5-    get bh = do-        a1 <- get bh-        a2 <- get bh-        a3 <- get bh-        a4 <- get bh-        a5 <- get bh-        return (IfaceVectInfo a1 a2 a3 a4 a5)  {- ************************************************************************
main/InteractiveEval.hs view
@@ -30,6 +30,8 @@         exprType,         typeKind,         parseName,+        getDocs,+        GetDocsFailure(..),         showModule,         moduleIsBootOrNotObjectLinkable,         parseExpr, compileParsedExpr,@@ -91,6 +93,8 @@ import Data.Either import qualified Data.IntMap as IntMap import Data.List (find,intercalate)+import Data.Map (Map)+import qualified Data.Map as Map import StringBuffer (stringToStringBuffer) import Control.Monad import GHC.Exts@@ -810,7 +814,7 @@   case parseThing Parser.parseDeclaration dflags stmt of     Lexer.POk _ thing ->       case unLoc thing of-        SpliceD _ -> False+        SpliceD _ _ -> False         _ -> True     Lexer.PFailed _ _ _ -> False @@ -821,6 +825,70 @@    Lexer.unP parser (Lexer.mkPState dflags buf loc) +getDocs :: GhcMonad m+        => Name+        -> m (Either GetDocsFailure (Maybe HsDocString, Map Int HsDocString))+           -- TODO: What about docs for constructors etc.?+getDocs name =+  withSession $ \hsc_env -> do+     case nameModule_maybe name of+       Nothing -> pure (Left (NameHasNoModule name))+       Just mod -> do+         if isInteractiveModule mod+           then pure (Left InteractiveName)+           else do+             ModIface { mi_doc_hdr = mb_doc_hdr+                      , mi_decl_docs = DeclDocMap dmap+                      , mi_arg_docs = ArgDocMap amap+                      } <- liftIO $ hscGetModuleInterface hsc_env mod+             if isNothing mb_doc_hdr && Map.null dmap && Map.null amap+               then pure (Left (NoDocsInIface mod compiled))+               else pure (Right ( Map.lookup name dmap+                                , Map.findWithDefault Map.empty name amap))+  where+    compiled =+      -- TODO: Find a more direct indicator.+      case nameSrcLoc name of+        RealSrcLoc {} -> False+        UnhelpfulLoc {} -> True++-- | Failure modes for 'getDocs'.++-- TODO: Find a way to differentiate between modules loaded without '-haddock'+-- and modules that contain no docs.+data GetDocsFailure++    -- | 'nameModule_maybe' returned 'Nothing'.+  = NameHasNoModule Name++    -- | This is probably because the module was loaded without @-haddock@,+    -- but it's also possible that the entire module contains no documentation.+  | NoDocsInIface+      Module+      Bool -- ^ 'True': The module was compiled.+           -- 'False': The module was :loaded.++    -- | The 'Name' was defined interactively.+  | InteractiveName++instance Outputable GetDocsFailure where+  ppr (NameHasNoModule name) =+    quotes (ppr name) <+> text "has no module where we could look for docs."+  ppr (NoDocsInIface mod compiled) = vcat+    [ text "Can't find any documentation for" <+> ppr mod <> char '.'+    , text "This is probably because the module was"+        <+> text (if compiled then "compiled" else "loaded")+        <+> text "without '-haddock',"+    , text "but it's also possible that the module contains no documentation."+    , text ""+    , if compiled+        then text "Try re-compiling with '-haddock'."+        else text "Try running ':set -haddock' and :load the file again."+        -- TODO: Figure out why :reload doesn't load the docs and maybe fix it.+    ]+  ppr InteractiveName =+    text "Docs are unavailable for interactive declarations."+ -- ----------------------------------------------------------------------------- -- Getting the type of an expression @@ -870,10 +938,15 @@   -- create a new binding.   let expr_fs = fsLit "_compileParsedExpr"       expr_name = mkInternalName (getUnique expr_fs) (mkTyVarOccFS expr_fs) loc-      let_stmt = L loc . LetStmt . L loc . HsValBinds $-        ValBindsIn (unitBag $ mkHsVarBind loc (getRdrName expr_name) expr) []+      let_stmt = L loc . LetStmt noExt . L loc . (HsValBinds noExt) $+        ValBinds noExt+                     (unitBag $ mkHsVarBind loc (getRdrName expr_name) expr) [] -  Just ([_id], hvals_io, fix_env) <- liftIO $ hscParsedStmt hsc_env let_stmt+  pstmt <- liftIO $ hscParsedStmt hsc_env let_stmt+  let (hvals_io, fix_env) = case pstmt of+        Just ([_id], hvals_io', fix_env') -> (hvals_io', fix_env')+        _ -> panic "compileParsedExprRemote"+   updateFixityEnv fix_env   status <- liftIO $ evalStmt hsc_env False (EvalThis hvals_io)   case status of@@ -894,7 +967,7 @@   parsed_expr <- parseExpr expr   -- > Data.Dynamic.toDyn expr   let loc = getLoc parsed_expr-      to_dyn_expr = mkHsApp (L loc . HsVar . L loc $ getRdrName toDynName)+      to_dyn_expr = mkHsApp (L loc . HsVar noExt . L loc $ getRdrName toDynName)                             parsed_expr   hval <- compileParsedExpr to_dyn_expr   return (unsafeCoerce# hval :: Dynamic)
main/Packages.hs view
@@ -35,6 +35,8 @@         LookupResult(..),         ModuleSuggestion(..),         ModuleOrigin(..),+        UnusablePackageReason(..),+        pprReason,          -- * Inspecting the set of packages in scope         getPackageIncludePath,@@ -48,7 +50,7 @@          collectArchives,         collectIncludeDirs, collectLibraryPaths, collectLinkOpts,-        packageHsLibs,+        packageHsLibs, getLibs,          -- * Utils         unwireUnitId,@@ -157,6 +159,8 @@     -- (But maybe the user didn't realize), so we'll still keep track     -- of these modules.)     ModHidden+    -- | Module is unavailable because the package is unusable.+  | ModUnusable UnusablePackageReason     -- | Module is public, and could have come from some places.   | ModOrigin {         -- | @Just False@ means that this module is in@@ -176,6 +180,7 @@  instance Outputable ModuleOrigin where     ppr ModHidden = text "hidden module"+    ppr (ModUnusable _) = text "unusable module"     ppr (ModOrigin e res rhs f) = sep (punctuate comma (         (case e of             Nothing -> []@@ -226,6 +231,7 @@ -- ambiguity, or is it only relevant when we're making suggestions?) originVisible :: ModuleOrigin -> Bool originVisible ModHidden = False+originVisible (ModUnusable _) = False originVisible (ModOrigin b res _ f) = b == Just True || not (null res) || f  -- | Are there actually no providers for this module?  This will never occur@@ -911,15 +917,6 @@                -> PackageFlag                -> [(PackageConfig, UnusablePackageReason)]                -> IO a---- for missing DPH package we emit a more helpful error message, because--- this may be the result of using -fdph-par or -fdph-seq.-packageFlagErr dflags (ExposePackage _ (PackageArg pkg) _) []-  | is_dph_package pkg-  = throwGhcExceptionIO (CmdLineError (showSDoc dflags $ dph_err))-  where dph_err = text "the " <> text pkg <> text " package is not installed."-                  $$ text "To install it: \"cabal install dph\"."-        is_dph_package pkg = "dph" `isPrefixOf` pkg packageFlagErr dflags flag reasons   = packageFlagErr' dflags (pprFlag flag) reasons @@ -1145,7 +1142,8 @@       pref <+> text "unusable due to cyclic dependencies:" $$         nest 2 (hsep (map ppr deps))   IgnoredDependencies deps ->-      pref <+> text "unusable due to ignored dependencies:" $$+      pref <+> text ("unusable because the -ignore-package flag was used to " +++                     "ignore at least one of its dependencies:") $$         nest 2 (hsep (map ppr deps))   ShadowedDependencies deps ->       pref <+> text "unusable due to shadowed dependencies:" $$@@ -1557,7 +1555,10 @@   dep_preload <- closeDeps dflags pkg_db (zip (map toInstalledUnitId preload3) (repeat Nothing))   let new_dep_preload = filter (`notElem` preload0) dep_preload -  let mod_map = mkModuleToPkgConfAll dflags pkg_db vis_map+  let mod_map1 = mkModuleToPkgConfAll dflags pkg_db vis_map+      mod_map2 = mkUnusableModuleToPkgConfAll unusable+      mod_map = Map.union mod_map1 mod_map2+   when (dopt Opt_D_dump_mod_map dflags) $       printInfoForUser (dflags { pprCols = 200 })                        alwaysQualify (pprModuleMap mod_map)@@ -1596,12 +1597,36 @@   -> VisibilityMap   -> ModuleToPkgConfAll mkModuleToPkgConfAll dflags pkg_db vis_map =-    Map.foldlWithKey extend_modmap emptyMap vis_map+    -- What should we fold on?  Both situations are awkward:+    --+    --    * Folding on the visibility map means that we won't create+    --      entries for packages that aren't mentioned in vis_map+    --      (e.g., hidden packages, causing #14717)+    --+    --    * Folding on pkg_db is awkward because if we have an+    --      Backpack instantiation, we need to possibly add a+    --      package from pkg_db multiple times to the actual+    --      ModuleToPkgConfAll.  Also, we don't really want+    --      definite package instantiations to show up in the+    --      list of possibilities.+    --+    -- So what will we do instead?  We'll extend vis_map with+    -- entries for every definite (for non-Backpack) and+    -- indefinite (for Backpack) package, so that we get the+    -- hidden entries we need.+    Map.foldlWithKey extend_modmap emptyMap vis_map_extended  where+  vis_map_extended = Map.union vis_map {- preferred -} default_vis++  default_vis = Map.fromList+                  [ (packageConfigId pkg, mempty)+                  | pkg <- eltsUDFM (unPackageConfigMap pkg_db)+                  -- Exclude specific instantiations of an indefinite+                  -- package+                  , indefinite pkg || null (instantiatedWith pkg)+                  ]+   emptyMap = Map.empty-  sing pk m _ = Map.singleton (mkModule pk m)-  addListTo = foldl' merge-  merge m (k, v) = MapStrict.insertWith (Map.unionWith mappend) k v m   setOrigins m os = fmap (const os) m   extend_modmap modmap uid     UnitVisibility { uv_expose_all = b, uv_renamings = rns }@@ -1629,19 +1654,19 @@     es :: Bool -> [(ModuleName, Map Module ModuleOrigin)]     es e = do      (m, exposedReexport) <- exposed_mods-     let (pk', m', pkg', origin') =+     let (pk', m', origin') =           case exposedReexport of-           Nothing -> (pk, m, pkg, fromExposedModules e)+           Nothing -> (pk, m, fromExposedModules e)            Just (Module pk' m') ->             let pkg' = pkg_lookup pk'-            in (pk', m', pkg', fromReexportedModules e pkg')-     return (m, sing pk' m' pkg' origin')+            in (pk', m', fromReexportedModules e pkg')+     return (m, mkModMap pk' m' origin')      esmap :: UniqFM (Map Module ModuleOrigin)     esmap = listToUFM (es False) -- parameter here doesn't matter, orig will                                  -- be overwritten -    hiddens = [(m, sing pk m pkg ModHidden) | m <- hidden_mods]+    hiddens = [(m, mkModMap pk m ModHidden) | m <- hidden_mods]      pk = packageConfigId pkg     pkg_lookup uid = lookupPackage' (isIndefinite dflags) pkg_db uid@@ -1650,6 +1675,43 @@     exposed_mods = exposedModules pkg     hidden_mods = hiddenModules pkg +-- | Make a 'ModuleToPkgConfAll' covering a set of unusable packages.+mkUnusableModuleToPkgConfAll :: UnusablePackages -> ModuleToPkgConfAll+mkUnusableModuleToPkgConfAll unusables =+    Map.foldl' extend_modmap Map.empty unusables+ where+    extend_modmap modmap (pkg, reason) = addListTo modmap bindings+      where bindings :: [(ModuleName, Map Module ModuleOrigin)]+            bindings = exposed ++ hidden++            origin = ModUnusable reason+            pkg_id = packageConfigId pkg++            exposed = map get_exposed exposed_mods+            hidden = [(m, mkModMap pkg_id m origin) | m <- hidden_mods]++            get_exposed (mod, Just mod') = (mod, Map.singleton mod' origin)+            get_exposed (mod, _)         = (mod, mkModMap pkg_id mod origin)++            exposed_mods = exposedModules pkg+            hidden_mods = hiddenModules pkg++-- | 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+-- value is forced before installing into the map.+addListTo :: (Monoid a, Ord k1, Ord k2)+          => Map k1 (Map k2 a)+          -> [(k1, Map k2 a)]+          -> Map k1 (Map k2 a)+addListTo = foldl' merge+  where merge m (k, v) = MapStrict.insertWith (Map.unionWith mappend) k v m++-- | Create a singleton module mapping+mkModMap :: UnitId -> ModuleName -> ModuleOrigin -> Map Module ModuleOrigin+mkModMap pkg mod = Map.singleton (mkModule pkg mod)+ -- ----------------------------------------------------------------------------- -- Extracting information from the packages in scope @@ -1699,6 +1761,14 @@   where searchPaths = nub . filter notNull . libraryDirsForWay dflags $ pc         libs        = packageHsLibs dflags pc ++ extraLibraries pc +getLibs :: DynFlags -> [PreloadUnitId] -> IO [(String,String)]+getLibs dflags pkgs = do+  ps <- getPreloadPackagesAnd dflags pkgs+  fmap concat . forM ps $ \p -> do+    let candidates = [ (l </> f, f) | l <- collectLibraryPaths dflags [p]+                                    , f <- (\n -> "lib" ++ n ++ ".a") <$> packageHsLibs dflags p ]+    filterM (doesFileExist . fst) candidates+ packageHsLibs :: DynFlags -> PackageConfig -> [String] packageHsLibs dflags p = map (mkDynName . addSuffix) (hsLibraries p)   where@@ -1797,6 +1867,9 @@     -- an exact name match.  First is due to package hidden, second     -- is due to module being hidden   | LookupHidden [(Module, ModuleOrigin)] [(Module, ModuleOrigin)]+    -- | No modules found, but there were some unusable ones with+    -- an exact name match+  | LookupUnusable [(Module, ModuleOrigin)]     -- | Nothing found, here are some suggested different names   | LookupNotFound [ModuleSuggestion] -- suggestions @@ -1828,20 +1901,28 @@   = case Map.lookup m mod_map of         Nothing -> LookupNotFound suggestions         Just xs ->-          case foldl' classify ([],[],[]) (Map.toList xs) of-            ([], [], []) -> LookupNotFound suggestions-            (_, _, [(m, _)])             -> LookupFound m (mod_pkg m)-            (_, _, exposed@(_:_))        -> LookupMultiple exposed-            (hidden_pkg, hidden_mod, []) -> LookupHidden hidden_pkg hidden_mod+          case foldl' classify ([],[],[], []) (Map.toList xs) of+            ([], [], [], []) -> LookupNotFound suggestions+            (_, _, _, [(m, _)])             -> LookupFound m (mod_pkg m)+            (_, _, _, exposed@(_:_))        -> LookupMultiple exposed+            ([], [], unusable@(_:_), [])    -> LookupUnusable unusable+            (hidden_pkg, hidden_mod, _, []) ->+              LookupHidden hidden_pkg hidden_mod   where-    classify (hidden_pkg, hidden_mod, exposed) (m, origin0) =+    classify (hidden_pkg, hidden_mod, unusable, exposed) (m, origin0) =       let origin = filterOrigin mb_pn (mod_pkg m) origin0           x = (m, origin)       in case origin of-          ModHidden                  -> (hidden_pkg,   x:hidden_mod, exposed)-          _ | originEmpty origin     -> (hidden_pkg,   hidden_mod,   exposed)-            | originVisible origin   -> (hidden_pkg,   hidden_mod,   x:exposed)-            | otherwise              -> (x:hidden_pkg, hidden_mod,   exposed)+          ModHidden+            -> (hidden_pkg, x:hidden_mod, unusable, exposed)+          ModUnusable _+            -> (hidden_pkg, hidden_mod, x:unusable, exposed)+          _ | originEmpty origin+            -> (hidden_pkg,   hidden_mod, unusable, exposed)+            | originVisible origin+            -> (hidden_pkg, hidden_mod, unusable, x:exposed)+            | otherwise+            -> (x:hidden_pkg, hidden_mod, unusable, exposed)      pkg_lookup p = lookupPackage dflags p `orElse` pprPanic "lookupModuleWithSuggestions" (ppr p <+> ppr m)     mod_pkg = pkg_lookup . moduleUnitId@@ -1857,6 +1938,7 @@     filterOrigin (Just pn) pkg o =       case o of           ModHidden -> if go pkg then ModHidden else mempty+          (ModUnusable _) -> if go pkg then o else mempty           ModOrigin { fromOrigPackage = e, fromExposedReexport = res,                       fromHiddenReexport = rhs }             -> ModOrigin {@@ -1980,7 +2062,7 @@ -- the symbol comes from another dynamically-linked package, -- and applies on all platforms, not just Windows isDllName dflags this_mod name-  | WayDyn `notElem` ways dflags = False+  | not (gopt Opt_ExternalDynamicRefs dflags) = False   | Just mod <- nameModule_maybe name     -- Issue #8696 - when GHC is dynamically linked, it will attempt     -- to load the dynamic dependencies of object files at compile
main/Plugins.hs view
@@ -1,22 +1,41 @@+{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE CPP #-} module Plugins (-    FrontendPlugin(..), defaultFrontendPlugin, FrontendPluginAction,-    Plugin(..), CommandLineOption,-    defaultPlugin+      FrontendPlugin(..), defaultFrontendPlugin, FrontendPluginAction+    , Plugin(..), CommandLineOption, LoadedPlugin(..), lpModuleName+    , defaultPlugin, keepRenamedSource, withPlugins, withPlugins_+    , PluginRecompile(..)+    , purePlugin, impurePlugin, flagRecompile     ) where  import GhcPrelude -import CoreMonad ( CoreToDo, CoreM )-import TcRnTypes ( TcPlugin )+import {-# SOURCE #-} CoreMonad ( CoreToDo, CoreM )+import qualified TcRnTypes+import TcRnTypes ( TcGblEnv, IfM, TcM, tcg_rn_decls, tcg_rn_exports )+import HsSyn+import DynFlags+import HscTypes import GhcMonad import DriverPhases+import Module ( ModuleName, Module(moduleName))+import Fingerprint+import Data.List+import Outputable (Outputable(..), text, (<+>)) +#if __GLASGOW_HASKELL__ < 840+--Qualified import so we can define a Semigroup instance+-- but it doesn't clash with Outputable.<>+import qualified Data.Semigroup+#endif +import Control.Monad+ -- | Command line options gathered from the -PModule.Name:stuff syntax -- are given to you as this type type CommandLineOption = String --- | 'Plugin' is the core compiler plugin data type. Try to avoid+-- | 'Plugin' is the compiler plugin data type. Try to avoid -- constructing one of these directly, and just modify some fields of -- 'defaultPlugin' instead: this is to try and preserve source-code -- compatibility when we add fields to this.@@ -24,23 +43,147 @@ -- Nonetheless, this API is preliminary and highly likely to change in -- the future. data Plugin = Plugin {-    installCoreToDos :: [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]+    installCoreToDos :: CorePlugin     -- ^ Modify the Core pipeline that will be used for compilation.     -- This is called as the Core pipeline is built for every module     -- being compiled, and plugins get the opportunity to modify the     -- pipeline in a nondeterministic order.-  , tcPlugin :: [CommandLineOption] -> Maybe TcPlugin+  , tcPlugin :: TcPlugin     -- ^ An optional typechecker plugin, which may modify the     -- behaviour of the constraint solver.+  , pluginRecompile :: [CommandLineOption] -> IO PluginRecompile+    -- ^ Specify how the plugin should affect recompilation.+  , parsedResultAction :: [CommandLineOption] -> ModSummary -> HsParsedModule+                            -> Hsc HsParsedModule+    -- ^ Modify the module when it is parsed. This is called by+    -- HscMain when the parsing is successful.+  , renamedResultAction :: [CommandLineOption] -> TcGblEnv+                                -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)+    -- ^ Modify each group after it is renamed. This is called after each+    -- `HsGroup` has been renamed.+  , typeCheckResultAction :: [CommandLineOption] -> ModSummary -> TcGblEnv+                               -> TcM TcGblEnv+    -- ^ Modify the module when it is type checked. This is called add the+    -- very end of typechecking.+  , spliceRunAction :: [CommandLineOption] -> LHsExpr GhcTc+                         -> TcM (LHsExpr GhcTc)+    -- ^ Modify the TH splice or quasiqoute before it is run.+  , interfaceLoadAction :: forall lcl . [CommandLineOption] -> ModIface+                                          -> IfM lcl ModIface+    -- ^ Modify an interface that have been loaded. This is called by+    -- LoadIface when an interface is successfully loaded. Not applied to+    -- the loading of the plugin interface. Tools that rely on information from+    -- modules other than the currently compiled one should implement this+    -- function.   } +-- Note [Source plugins]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- The `Plugin` datatype have been extended by fields that allow access to the+-- different inner representations that are generated during the compilation+-- process. These fields are `parsedResultAction`, `renamedResultAction`,+-- `typeCheckResultAction`, `spliceRunAction` and `interfaceLoadAction`.+--+-- The main purpose of these plugins is to help tool developers. They allow+-- development tools to extract the information about the source code of a big+-- Haskell project during the normal build procedure. In this case the plugin+-- acts as the tools access point to the compiler that can be controlled by+-- compiler flags. This is important because the manipulation of compiler flags+-- is supported by most build environment.+--+-- For the full discussion, check the full proposal at:+-- https://ghc.haskell.org/trac/ghc/wiki/ExtendedPluginsProposal+++-- | A plugin with its arguments. The result of loading the plugin.+data LoadedPlugin = LoadedPlugin {+    lpPlugin :: Plugin+    -- ^ the actual callable plugin+  , lpModule :: ModIface+    -- ^ the module containing the plugin+  , lpArguments :: [CommandLineOption]+    -- ^ command line arguments for the plugin+  }++lpModuleName :: LoadedPlugin -> ModuleName+lpModuleName = moduleName . mi_module . lpModule+++data PluginRecompile = ForceRecompile | NoForceRecompile | MaybeRecompile Fingerprint++instance Outputable PluginRecompile where+  ppr ForceRecompile = text "ForceRecompile"+  ppr NoForceRecompile = text "NoForceRecompile"+  ppr (MaybeRecompile fp) = text "MaybeRecompile" <+> ppr fp++instance Semigroup PluginRecompile where+  ForceRecompile <> _ = ForceRecompile+  NoForceRecompile <> r = r+  MaybeRecompile fp <> NoForceRecompile   = MaybeRecompile fp+  MaybeRecompile fp <> MaybeRecompile fp' = MaybeRecompile (fingerprintFingerprints [fp, fp'])+  MaybeRecompile _fp <> ForceRecompile     = ForceRecompile++instance Monoid PluginRecompile where+  mempty = NoForceRecompile+#if __GLASGOW_HASKELL__ < 840+  mappend = (Data.Semigroup.<>)+#endif++type CorePlugin = [CommandLineOption] -> [CoreToDo] -> CoreM [CoreToDo]+type TcPlugin = [CommandLineOption] -> Maybe TcRnTypes.TcPlugin++purePlugin, impurePlugin, flagRecompile :: [CommandLineOption] -> IO PluginRecompile+purePlugin _args = return NoForceRecompile++impurePlugin _args = return ForceRecompile++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. defaultPlugin :: Plugin defaultPlugin = Plugin {-        installCoreToDos = const return-      , tcPlugin         = const Nothing+        installCoreToDos      = const return+      , tcPlugin              = const Nothing+      , pluginRecompile  = impurePlugin+      , renamedResultAction   = \_ env grp -> return (env, grp)+      , parsedResultAction    = \_ _ -> return+      , typeCheckResultAction = \_ _ -> return+      , spliceRunAction       = \_ -> return+      , interfaceLoadAction   = \_ -> return     }+++-- | A renamer plugin which mades the renamed source available in+-- a typechecker plugin.+keepRenamedSource :: [CommandLineOption] -> TcGblEnv+                  -> HsGroup GhcRn -> TcM (TcGblEnv, HsGroup GhcRn)+keepRenamedSource _ gbl_env group =+  return (gbl_env { tcg_rn_decls = update (tcg_rn_decls gbl_env)+                  , tcg_rn_exports = update_exports (tcg_rn_exports gbl_env) }, group)+  where+    update_exports Nothing = Just []+    update_exports m = m++    update Nothing = Just emptyRnGroup+    update m       = m+++type PluginOperation m a = Plugin -> [CommandLineOption] -> a -> m a+type ConstPluginOperation m a = Plugin -> [CommandLineOption] -> a -> m ()++-- | Perform an operation by using all of the plugins in turn.+withPlugins :: Monad m => DynFlags -> PluginOperation m a -> a -> m a+withPlugins df transformation input+  = foldM (\arg (LoadedPlugin p _ opts) -> transformation p opts arg)+          input (plugins df)++-- | Perform a constant operation by using all of the plugins in turn.+withPlugins_ :: Monad m => DynFlags -> ConstPluginOperation m a -> a -> m ()+withPlugins_ df transformation input+  = mapM_ (\(LoadedPlugin p _ opts) -> transformation p opts input)+          (plugins df)  type FrontendPluginAction = [String] -> [(String, Maybe Phase)] -> Ghc () data FrontendPlugin = FrontendPlugin {
+ main/Plugins.hs-boot view
@@ -0,0 +1,9 @@+-- The plugins datatype is stored in DynFlags, so it needs to be+-- exposed without importing all of its implementation.+module Plugins where++import GhcPrelude ()++data Plugin++data LoadedPlugin
main/SysTools.hs view
@@ -13,7 +13,7 @@ module SysTools (         -- * Initialisation         initSysTools,-        initLlvmTargets,+        initLlvmConfig,          -- * Interface to system tools         module SysTools.Tasks,@@ -48,6 +48,7 @@ import Platform import Util import DynFlags+import Fingerprint  import System.FilePath import System.IO@@ -63,7 +64,7 @@  SysTools.initSysProgs figures out exactly where all the auxiliary programs are, and initialises mutable variables to make it easy to call them.-To to this, it makes use of definitions in Config.hs, which is a Haskell+To do this, it makes use of definitions in Config.hs, which is a Haskell file containing variables whose value is figured out by the build system.  Config.hs contains two sorts of things@@ -109,16 +110,22 @@ ************************************************************************ -} -initLlvmTargets :: Maybe String-                -> IO LlvmTargets-initLlvmTargets mbMinusB-  = do top_dir <- findTopDir mbMinusB-       let llvmTargetsFile = top_dir </> "llvm-targets"-       llvmTargetsStr <- readFile llvmTargetsFile-       case maybeReadFuzzy llvmTargetsStr of-         Just s -> return (fmap mkLlvmTarget <$> s)-         Nothing -> pgmError ("Can't parse " ++ show llvmTargetsFile)+initLlvmConfig :: Maybe String+                -> IO LlvmConfig+initLlvmConfig mbMinusB+  = do+      targets <- readAndParse "llvm-targets" mkLlvmTarget+      passes <- readAndParse "llvm-passes" id+      return (targets, passes)   where+    readAndParse name builder =+      do top_dir <- findTopDir mbMinusB+         let llvmConfigFile = top_dir </> name+         llvmConfigStr <- readFile llvmConfigFile+         case maybeReadFuzzy llvmConfigStr of+           Just s -> return (fmap builder <$> s)+           Nothing -> pgmError ("Can't parse " ++ show llvmConfigFile)+     mkLlvmTarget :: (String, String, String) -> LlvmTarget     mkLlvmTarget (dl, cpu, attrs) = LlvmTarget dl cpu (words attrs) @@ -133,6 +140,8 @@              -- 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 settingsFile = top_dir </> "settings"            platformConstantsFile = top_dir </> "platformConstants"@@ -157,6 +166,7 @@        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@@ -178,14 +188,15 @@        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+       -- 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 <- getSetting "C compiler command"+       gcc_prog <- getToolSetting "C compiler command"        gcc_args_str <- getSetting "C compiler flags"        gccSupportsNoPie <- getBooleanSetting "C compiler supports -no-pie"-       cpp_prog <- getSetting "Haskell CPP command"+       cpp_prog <- getToolSetting "Haskell CPP command"        cpp_args_str <- getSetting "Haskell CPP flags"        let unreg_gcc_args = if targetUnregisterised                             then ["-DNO_REGS", "-DUSE_MINIINTERPRETER"]@@ -203,7 +214,7 @@        ldSupportsBuildId       <- getBooleanSetting "ld supports build-id"        ldSupportsFilelist      <- getBooleanSetting "ld supports filelist"        ldIsGnuLd               <- getBooleanSetting "ld is GNU ld"-       perl_path <- getSetting "perl command"+       perl_path <- getToolSetting "perl command"         let pkgconfig_path = installed "package.conf.d"            ghc_usage_msg_path  = installed "ghc-usage.txt"@@ -216,14 +227,14 @@              -- split is a Perl script            split_script  = libexec cGHC_SPLIT_PGM -       windres_path <- getSetting "windres command"-       libtool_path <- getSetting "libtool command"-       ar_path <- getSetting "ar command"-       ranlib_path <- getSetting "ranlib command"+       windres_path <- getToolSetting "windres command"+       libtool_path <- getToolSetting "libtool command"+       ar_path <- getToolSetting "ar command"+       ranlib_path <- getToolSetting "ranlib command"         tmpdir <- getTemporaryDirectory -       touch_path <- getSetting "touch command"+       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.@@ -234,7 +245,7 @@            (split_prog,  split_args)              | isWindowsHost = (perl_path,    [Option split_script])              | otherwise     = (split_script, [])-       mkdll_prog <- getSetting "dllwrap command"+       mkdll_prog <- getToolSetting "dllwrap command"        let mkdll_args = []         -- cpp is derived from gcc on all platforms@@ -272,6 +283,7 @@                     sTmpDir         = normalise tmpdir,                     sGhcUsagePath   = ghc_usage_msg_path,                     sGhciUsagePath  = ghci_usage_msg_path,+                    sToolDir        = mtool_dir,                     sTopDir         = top_dir,                     sRawSettings    = mySettings,                     sExtraGccViaCFlags = words myExtraGccViaCFlags,@@ -302,6 +314,7 @@                     sPgm_i   = iserv_prog,                     sOpt_L       = [],                     sOpt_P       = [],+                    sOpt_P_fingerprint = fingerprint0,                     sOpt_F       = [],                     sOpt_c       = [],                     sOpt_a       = [],@@ -527,6 +540,7 @@                  ++ map Option pkg_lib_path_opts                  ++ map Option pkg_link_opts                  ++ map Option pkg_framework_opts+                 ++ [ Option "-Wl,-dead_strip_dylibs" ]               )         _ -> do             -------------------------------------------------------------------
main/SysTools/BaseDir.hs view
@@ -11,7 +11,10 @@ ----------------------------------------------------------------------------- -} -module SysTools.BaseDir (expandTopDir, findTopDir) where+module SysTools.BaseDir+  ( expandTopDir, expandToolDir+  , findTopDir, findToolDir+  ) where  #include "HsVersions.h" @@ -29,11 +32,7 @@  -- Windows #if defined(mingw32_HOST_OS)-#if MIN_VERSION_Win32(2,5,0) import qualified System.Win32.Types as Win32-#else-import qualified System.Win32.Info as Win32-#endif import Exception import Foreign import Foreign.C.String@@ -74,16 +73,42 @@  from topdir we can find package.conf, ghc-asm, etc. ++Note [tooldir: How GHC finds mingw and perl on Windows]++GHC has some custom logic on Windows for finding the mingw+toolchain and perl. Depending on whether GHC is built+with the make build system or Hadrian, and on whether we're+running a bindist, we might find the mingw toolchain and perl+either under $topdir/../{mingw, perl}/ or+$topdir/../../{mingw, perl}/.+ -}  -- | Expand occurrences of the @$topdir@ interpolation in a string. expandTopDir :: FilePath -> String -> String-expandTopDir top_dir str-  | Just str' <- stripPrefix "$topdir" str+expandTopDir = expandPathVar "topdir"++-- | Expand occurrences of the @$tooldir@ interpolation in a string+-- on Windows, leave the string untouched otherwise.+expandToolDir :: Maybe FilePath -> String -> String+#if defined(mingw32_HOST_OS)+expandToolDir (Just tool_dir) s = expandPathVar "tooldir" tool_dir s+expandToolDir Nothing         _ = panic "Could not determine $tooldir"+#else+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')-  = top_dir ++ expandTopDir top_dir str'-expandTopDir top_dir (x:xs) = x : expandTopDir top_dir xs-expandTopDir _ [] = []+  = 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).@@ -176,7 +201,7 @@   makeGetFinalPathNameByHandle :: FunPtr GetFinalPath -> GetFinalPath #elif defined(darwin_HOST_OS) || defined(linux_HOST_OS) -- on unix, this is a bit more confusing.--- The layout right now is somehting like+-- The layout right now is something like -- --   /bin/ghc-X.Y.Z <- wrapper script (1) --   /bin/ghc       <- symlink to wrapper script (2)@@ -196,4 +221,27 @@ 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.+-- When called on Windows, it either throws an error when the+-- tooldir can't be located, or returns @Just tooldirpath@.+findToolDir+  :: FilePath -- ^ topdir+  -> IO (Maybe FilePath)+#if defined(mingw32_HOST_OS)+findToolDir top_dir = go 0 (top_dir </> "..")+  where maxDepth = 2+        go :: Int -> FilePath -> IO (Maybe FilePath)+        go k path+          | k == maxDepth = throwGhcExceptionIO $+              InstallationError "could not detect mingw toolchain"+          | otherwise = do+              oneLevel <- doesDirectoryExist (path </> "mingw")+              if oneLevel+                then return (Just path)+                else go (k+1) (path </> "..")+#else+findToolDir _ = return Nothing #endif
main/SysTools/Tasks.hs view
@@ -147,7 +147,9 @@ runLlvmOpt dflags args = do   let (p,args0) = pgm_lo dflags       args1 = map Option (getOpts dflags opt_lo)-  runSomething dflags "LLVM Optimiser" p (args0 ++ args1 ++ args)+      -- We take care to pass -optlo flags (e.g. args0) last to ensure that the+      -- user can override flags passed by GHC. See #14821.+  runSomething dflags "LLVM Optimiser" p (args1 ++ args ++ args0)  -- | Run the LLVM Compiler runLlvmLlc :: DynFlags -> [Option] -> IO ()
main/TidyPgm.hs view
@@ -61,7 +61,6 @@ import UniqSupply import ErrUtils (Severity(..)) import Outputable-import UniqDFM import SrcLoc import qualified ErrUtils as Err @@ -71,7 +70,7 @@ import Data.IORef       ( atomicModifyIORef' )  {--Constructing the TypeEnv, Instances, Rules, VectInfo from which the+Constructing the TypeEnv, Instances, Rules from which the ModIface is constructed, and which goes on to subsequent modules in --make mode. @@ -165,7 +164,6 @@                              , md_rules     = []                              , md_anns      = []                              , md_exports   = exports-                             , md_vect_info = noVectInfo                              , md_complete_sigs = []                              })         }@@ -221,18 +219,22 @@  Plan B: include pragmas, make interfaces ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* Figure out which Ids are externally visible+* Step 1: Figure out which Ids are externally visible+          See Note [Choosing external Ids] -* Tidy the bindings, externalising appropriate Ids+* Step 2: Gather the externally visible rules, separately from+          the top-level bindings.+          See Note [Finding external rules] +* Step 3: Tidy the bindings, externalising appropriate Ids+          See Note [Tidy the top-level bindings]+ * Drop all Ids from the TypeEnv, and add all the External Ids from   the bindings.  (This adds their IdInfo to the TypeEnv; and adds   floated-out Ids that weren't even in the TypeEnv before.) -Step 1: Figure out external Ids-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Note [choosing external names]-+Note [Choosing external Ids]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See also the section "Interface stability" in the RecompilationAvoidance commentary:   http://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/RecompilationAvoidance@@ -242,9 +244,8 @@ unit.  These are   a) the user exported ones   b) the ones bound to static forms-  c) ones mentioned in the unfoldings, workers,-     rules of externally-visible ones ,-     or vectorised versions of externally-visible ones+  c) ones mentioned in the unfoldings, workers, or+     rules of externally-visible ones  While figuring out which Ids are external, we pick a "tidy" OccName for each one.  That is, we make its OccName distinct from the other@@ -272,8 +273,8 @@ the order in which they are presented to the tidying phase does not affect the names we assign. -Step 2: Tidy the program-~~~~~~~~~~~~~~~~~~~~~~~~+Note [Tidy the top-level bindings]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Next we traverse the bindings top to bottom.  For each *top-level* binder @@ -320,7 +321,6 @@                               , mg_binds     = binds                               , mg_patsyns   = patsyns                               , mg_rules     = imp_rules-                              , mg_vect_info = vect_info                               , mg_anns      = anns                               , mg_complete_sigs = complete_sigs                               , mg_deps      = deps@@ -347,7 +347,7 @@          ; (unfold_env, tidy_occ_env)               <- chooseExternalIds hsc_env mod omit_prags expose_all-                                   binds implicit_binds imp_rules (vectInfoVar vect_info)+                                   binds implicit_binds imp_rules         ; let { (trimmed_binds, trimmed_rules)                     = findExternalRules omit_prags binds imp_rules unfold_env } @@ -369,8 +369,6 @@                 -- and indeed it does, but if omit_prags is on, ext_rules is                 -- empty -              ; tidy_vect_info = tidyVectInfo tidy_env vect_info-                 -- Tidy the Ids inside each PatSyn, very similarly to DFunIds                 -- and then override the PatSyns in the type_env with the new tidy ones                 -- This is really the only reason we keep mg_patsyns at all; otherwise@@ -440,7 +438,6 @@                    ModDetails { md_types     = tidy_type_env,                                 md_rules     = tidy_rules,                                 md_insts     = tidy_cls_insts,-                                md_vect_info = tidy_vect_info,                                 md_fam_insts = fam_insts,                                 md_exports   = exports,                                 md_anns      = anns,      -- are already tidy@@ -489,38 +486,6 @@ extendTypeEnvWithPatSyns tidy_patsyns type_env   = extendTypeEnvList type_env [AConLike (PatSynCon ps) | ps <- tidy_patsyns ] -tidyVectInfo :: TidyEnv -> VectInfo -> VectInfo-tidyVectInfo (_, var_env) info@(VectInfo { vectInfoVar          = vars-                                         , vectInfoParallelVars = parallelVars-                                         })-  = info { vectInfoVar          = tidy_vars-         , vectInfoParallelVars = tidy_parallelVars-         }-  where-      -- we only export mappings whose domain and co-domain is exported (otherwise, the iface is-      -- inconsistent)-    tidy_vars = mkDVarEnv [ (tidy_var, (tidy_var, tidy_var_v))-                          | (var, var_v) <- eltsUDFM vars-                          , let tidy_var   = lookup_var var-                                tidy_var_v = lookup_var var_v-                          , isExternalId tidy_var   && isExportedId tidy_var-                          , isExternalId tidy_var_v && isExportedId tidy_var_v-                          , isDataConWorkId var || not (isImplicitId var)-                          ]--    tidy_parallelVars = mkDVarSet-                          [ tidy_var-                          | var <- dVarSetElems parallelVars-                          , let tidy_var = lookup_var var-                          , isExternalId tidy_var && isExportedId tidy_var-                          ]--    lookup_var var = lookupWithDefaultVarEnv var_env var var--    -- We need to make sure that all names getting into the iface version of 'VectInfo' are-    -- external; otherwise, 'MkIface' will bomb out.-    isExternalId = isExternalName . idName- {- Note [Don't attempt to trim data types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -621,7 +586,7 @@ *                                                                      * ************************************************************************ -See Note [Choosing external names].+See Note [Choosing external Ids]. -}  type UnfoldEnv  = IdEnv (Name{-new name-}, Bool {-show unfolding-})@@ -637,18 +602,17 @@                   -> [CoreBind]                   -> [CoreBind]                   -> [CoreRule]-                  -> DVarEnv (Var, Var)                   -> IO (UnfoldEnv, TidyOccEnv)                   -- Step 1 from the notes above -chooseExternalIds hsc_env mod omit_prags expose_all binds implicit_binds imp_id_rules vect_vars+chooseExternalIds hsc_env mod omit_prags expose_all binds implicit_binds imp_id_rules   = do { (unfold_env1,occ_env1) <- search init_work_list emptyVarEnv init_occ_env        ; let internal_ids = filter (not . (`elemVarEnv` unfold_env1)) binders        ; tidy_internal internal_ids unfold_env1 occ_env1 }  where   nc_var = hsc_NC hsc_env -  -- init_ext_ids is the intial list of Ids that should be+  -- init_ext_ids is the initial list of Ids that should be   -- externalised.  It serves as the starting point for finding a   -- deterministic, tidy, renaming for all external Ids in this   -- module.@@ -661,13 +625,10 @@    -- An Id should be external if either (a) it is exported,   -- (b) it appears in the RHS of a local rule for an imported Id, or-  -- (c) it is the vectorised version of an imported Id.   -- See Note [Which rules to expose]   is_external id = isExportedId id || id `elemVarSet` rule_rhs_vars-                 || id `elemVarSet` vect_var_vs    rule_rhs_vars  = mapUnionVarSet ruleRhsFreeVars imp_id_rules-  vect_var_vs    = mkVarSet [var_v | (var, var_v) <- eltsUDFM vect_vars, isGlobalId var]    binders          = map fst $ flattenBinds binds   implicit_binders = bindersOfBinds implicit_binds@@ -717,9 +678,6 @@                 | omit_prags = ([], False)                 | otherwise  = addExternal expose_all refined_id -                -- add vectorised version if any exists-          new_ids' = new_ids ++ maybeToList (fmap snd $ lookupDVarEnv vect_vars idocc)-                 -- 'idocc' is an *occurrence*, but we need to see the                 -- unfolding in the *definition*; so look up in binder_set           refined_id = case lookupVarSet binder_set idocc of@@ -730,7 +688,7 @@           referrer' | isExportedId refined_id = refined_id                     | otherwise               = referrer       ---      search (zip new_ids' (repeat referrer') ++ rest) unfold_env' occ_env'+      search (zip new_ids (repeat referrer') ++ rest) unfold_env' occ_env'    tidy_internal :: [Id] -> UnfoldEnv -> TidyOccEnv                 -> IO (UnfoldEnv, TidyOccEnv)@@ -780,7 +738,7 @@ list.  Hence, here we define a free-variable finder that returns the free variables in the order that they are encountered. -See Note [Choosing external names]+See Note [Choosing external Ids] -}  bndrFvsInOrder :: Bool -> Id -> [Id]@@ -1135,9 +1093,14 @@  tidyTopBinds hsc_env this_mod unfold_env init_occ_env binds   = do mkIntegerId <- lookupMkIntegerName dflags hsc_env+       mkNaturalId <- lookupMkNaturalName dflags hsc_env        integerSDataCon <- lookupIntegerSDataConName dflags hsc_env-       let cvt_integer = cvtLitInteger dflags mkIntegerId integerSDataCon-           result      = tidy cvt_integer init_env binds+       naturalSDataCon <- lookupNaturalSDataConName dflags hsc_env+       let cvt_literal nt i = case nt of+             LitNumInteger -> Just (cvtLitInteger dflags mkIntegerId integerSDataCon i)+             LitNumNatural -> Just (cvtLitNatural dflags mkNaturalId naturalSDataCon i)+             _             -> Nothing+           result      = tidy cvt_literal init_env binds        seqBinds (snd result) `seq` return result        -- This seqBinds avoids a spike in space usage (see #13564)   where@@ -1146,34 +1109,35 @@     init_env = (init_occ_env, emptyVarEnv)      tidy _           env []     = (env, [])-    tidy cvt_integer env (b:bs)-        = let (env1, b')  = tidyTopBind dflags this_mod-                                        cvt_integer unfold_env env b-              (env2, bs') = tidy cvt_integer env1 bs+    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')  ------------------------ tidyTopBind  :: DynFlags              -> Module-             -> (Integer -> CoreExpr)+             -> (LitNumType -> Integer -> Maybe CoreExpr)              -> UnfoldEnv              -> TidyEnv              -> CoreBind              -> (TidyEnv, CoreBind) -tidyTopBind dflags this_mod cvt_integer unfold_env+tidyTopBind dflags this_mod cvt_literal unfold_env             (occ_env,subst1) (NonRec bndr rhs)   = (tidy_env2,  NonRec bndr' rhs')   where     Just (name',show_unfold) = lookupVarEnv unfold_env bndr-    caf_info      = hasCafRefs dflags this_mod (subst1, cvt_integer)+    caf_info      = hasCafRefs dflags this_mod+                               (subst1, cvt_literal)                                (idArity bndr) rhs     (bndr', rhs') = tidyTopPair dflags show_unfold tidy_env2 caf_info name'                                 (bndr, rhs)     subst2        = extendVarEnv subst1 bndr bndr'     tidy_env2     = (occ_env, subst2) -tidyTopBind dflags this_mod cvt_integer unfold_env+tidyTopBind dflags this_mod cvt_literal unfold_env             (occ_env, subst1) (Rec prs)   = (tidy_env2, Rec prs')   where@@ -1192,7 +1156,7 @@         -- the group may refer indirectly to a CAF (because then, they all do).     caf_info         | or [ mayHaveCafRefs (hasCafRefs dflags this_mod-                                          (subst1, cvt_integer)+                                          (subst1, cvt_literal)                                           (idArity bndr) rhs)              | (bndr,rhs) <- prs ] = MayHaveCafRefs         | otherwise                = NoCafRefs@@ -1244,6 +1208,8 @@         `setCafInfo`        caf_info         `setArityInfo`      arity         `setStrictnessInfo` final_sig+        `setUnfoldingInfo`  minimal_unfold_info  -- See note [Preserve evaluatedness]+                                                 -- in CoreTidy    | otherwise           -- Externally-visible Ids get the whole lot   = vanillaIdInfo@@ -1280,7 +1246,8 @@     --------- Unfolding ------------     unf_info = unfoldingInfo idinfo     unfold_info | show_unfold = tidyUnfolding rhs_tidy_env unf_info unf_from_rhs-                | otherwise   = noUnfolding+                | otherwise   = minimal_unfold_info+    minimal_unfold_info = zapUnfolding unf_info     unf_from_rhs = mkTopUnfolding dflags is_bot tidy_rhs     is_bot = isBottomingSig final_sig     -- NB: do *not* expose the worker if show_unfold is off,@@ -1297,6 +1264,7 @@     -- for bottoming functions), but we might still have a worker/wrapper     -- split (see Note [Worker-wrapper for bottoming functions] in WorkWrap.hs +     --------- Arity ------------     -- Usually the Id will have an accurate arity on it, because     -- the simplifier has just run, but not always.@@ -1334,25 +1302,28 @@ after TidyPgm.  But CorePrep does some transformations that affect CAF-hood. So we have to *predict* the result here, which is revolting. -In particular CorePrep expands Integer literals.  So in the prediction code-here we resort to applying the same expansion (cvt_integer). Ugh!+In particular CorePrep expands Integer and Natural literals. So in the+prediction code here we resort to applying the same expansion (cvt_literal).+Ugh! -} -type CafRefEnv = (VarEnv Id, Integer -> CoreExpr)+type CafRefEnv = (VarEnv Id, LitNumType -> Integer -> Maybe CoreExpr)   -- The env finds the Caf-ness of the Id-  -- The Integer -> CoreExpr is the desugaring function for Integer literals+  -- The LitNumType -> Integer -> CoreExpr is the desugaring functions for+  -- Integer and Natural literals   -- See Note [Disgusting computation of CafRefs]  hasCafRefs :: DynFlags -> Module            -> CafRefEnv -> Arity -> CoreExpr            -> CafInfo-hasCafRefs dflags this_mod p@(_,cvt_integer) arity expr+hasCafRefs dflags this_mod (subst, cvt_literal) arity expr   | is_caf || mentions_cafs = MayHaveCafRefs   | otherwise               = NoCafRefs  where-  mentions_cafs   = cafRefsE p expr+  mentions_cafs   = cafRefsE expr   is_dynamic_name = isDllName dflags this_mod-  is_caf = not (arity > 0 || rhsIsStatic (targetPlatform dflags) is_dynamic_name cvt_integer expr)+  is_caf = not (arity > 0 || rhsIsStatic (targetPlatform dflags) is_dynamic_name+                                         cvt_literal expr)    -- NB. we pass in the arity of the expression, which is expected   -- to be calculated by exprArity.  This is because exprArity@@ -1360,34 +1331,36 @@   -- CorePrep later on, and we don't want to duplicate that   -- knowledge in rhsIsStatic below. -cafRefsE :: CafRefEnv -> Expr a -> Bool-cafRefsE p (Var id)            = cafRefsV p id-cafRefsE p (Lit lit)           = cafRefsL p lit-cafRefsE p (App f a)           = cafRefsE p f || cafRefsE p a-cafRefsE p (Lam _ e)           = cafRefsE p e-cafRefsE p (Let b e)           = cafRefsEs p (rhssOfBind b) || cafRefsE p e-cafRefsE p (Case e _ _ alts)   = cafRefsE p e || cafRefsEs p (rhssOfAlts alts)-cafRefsE p (Tick _n e)         = cafRefsE p e-cafRefsE p (Cast e _co)        = cafRefsE p e-cafRefsE _ (Type _)            = False-cafRefsE _ (Coercion _)        = False+  cafRefsE :: Expr a -> Bool+  cafRefsE (Var id)            = cafRefsV id+  cafRefsE (Lit lit)           = cafRefsL lit+  cafRefsE (App f a)           = cafRefsE f || cafRefsE a+  cafRefsE (Lam _ e)           = cafRefsE e+  cafRefsE (Let b e)           = cafRefsEs (rhssOfBind b) || cafRefsE e+  cafRefsE (Case e _ _ alts)   = cafRefsE e || cafRefsEs (rhssOfAlts alts)+  cafRefsE (Tick _n e)         = cafRefsE e+  cafRefsE (Cast e _co)        = cafRefsE e+  cafRefsE (Type _)            = False+  cafRefsE (Coercion _)        = False -cafRefsEs :: CafRefEnv -> [Expr a] -> Bool-cafRefsEs _ []     = False-cafRefsEs p (e:es) = cafRefsE p e || cafRefsEs p es+  cafRefsEs :: [Expr a] -> Bool+  cafRefsEs []     = False+  cafRefsEs (e:es) = cafRefsE e || cafRefsEs es -cafRefsL :: CafRefEnv -> Literal -> Bool--- Don't forget that mk_integer id might have Caf refs!--- We first need to convert the Integer into its final form, to--- see whether mkInteger is used.-cafRefsL p@(_, cvt_integer) (LitInteger i _) = cafRefsE p (cvt_integer i)-cafRefsL _                  _                = False+  cafRefsL :: Literal -> Bool+  -- Don't forget that mk_integer id might have Caf refs!+  -- We first need to convert the Integer into its final form, to+  -- see whether mkInteger is used. Same for LitNatural.+  cafRefsL (LitNumber nt i _) = case cvt_literal nt i of+    Just e  -> cafRefsE e+    Nothing -> False+  cafRefsL _                = False -cafRefsV :: CafRefEnv -> Id -> Bool-cafRefsV (subst, _) id-  | not (isLocalId id)                = mayHaveCafRefs (idCafInfo id)-  | Just id' <- lookupVarEnv subst id = mayHaveCafRefs (idCafInfo id')-  | otherwise                         = False+  cafRefsV :: Id -> Bool+  cafRefsV id+    | not (isLocalId id)                = mayHaveCafRefs (idCafInfo id)+    | Just id' <- lookupVarEnv subst id = mayHaveCafRefs (idCafInfo id')+    | otherwise                         = False   {-
nativeGen/AsmCodeGen.hs view
@@ -934,8 +934,10 @@         -> [NatCmmDecl statics instr]  shortcutBranches dflags ncgImpl tops-  | optLevel dflags < 1 = tops    -- only with -O or higher-  | otherwise           = map (apply_mapping ncgImpl mapping) tops'+  | gopt Opt_AsmShortcutting dflags+  = map (apply_mapping ncgImpl mapping) tops'+  | otherwise+  = tops   where     (tops', mappings) = mapAndUnzip (build_mapping ncgImpl) tops     mapping = plusUFMList mappings
nativeGen/Dwarf.hs view
@@ -149,7 +149,7 @@ {- Note [Splitting DebugBlocks] -DWARF requires that we break up the the nested DebugBlocks produced from+DWARF requires that we break up the nested DebugBlocks produced from the C-- AST. For instance, we begin with tick trees containing nested procs. For example, 
nativeGen/Dwarf/Types.hs view
@@ -415,6 +415,12 @@ -- Note that this will not prevent GDB from failing to look-up the -- correct function name for the frame, as that uses the symbol table, -- which we can not manipulate as easily.+--+-- There's a GDB patch to address this at [1]. At the moment of writing+-- it's not merged, so I recommend building GDB with the patch if you+-- care about unwinding. The hack above doesn't cover every case.+--+-- [1] https://sourceware.org/ml/gdb-patches/2018-02/msg00055.html  -- | Get DWARF register ID for a given GlobalReg dwarfGlobalRegNo :: Platform -> GlobalReg -> Word8
nativeGen/Instruction.hs view
@@ -191,14 +191,12 @@          -- Subtract an amount from the C stack pointer         mkStackAllocInstr-                :: Platform  -- TODO: remove (needed by x86/x86_64-                             -- because they share an Instr type)+                :: Platform                 -> Int-                -> instr+                -> [instr]          -- Add an amount to the C stack pointer         mkStackDeallocInstr-                :: Platform  -- TODO: remove (needed by x86/x86_64-                             -- because they share an Instr type)+                :: Platform                 -> Int-                -> instr+                -> [instr]
nativeGen/PIC.hs view
@@ -164,7 +164,7 @@         | OSAIX <- platformOS $ targetPlatform dflags         = CmmMachOp (MO_Add W32)                 [ CmmReg (CmmGlobal PicBaseReg)-                , CmmLit $ picRelative+                , CmmLit $ picRelative dflags                                 (platformArch   $ targetPlatform dflags)                                 (platformOS     $ targetPlatform dflags)                                 lbl ]@@ -173,15 +173,16 @@         | ArchPPC_64 _ <- platformArch $ targetPlatform dflags         = CmmMachOp (MO_Add W32) -- code model medium                 [ CmmReg (CmmGlobal PicBaseReg)-                , CmmLit $ picRelative+                , CmmLit $ picRelative dflags                                 (platformArch   $ targetPlatform dflags)                                 (platformOS     $ targetPlatform dflags)                                 lbl ] -        | (positionIndependent dflags || WayDyn `elem` ways dflags) && absoluteLabel lbl+        | (positionIndependent dflags || gopt Opt_ExternalDynamicRefs dflags)+            && absoluteLabel lbl         = CmmMachOp (MO_Add (wordWidth dflags))                 [ CmmReg (CmmGlobal PicBaseReg)-                , CmmLit $ picRelative+                , CmmLit $ picRelative dflags                                 (platformArch   $ targetPlatform dflags)                                 (platformOS     $ targetPlatform dflags)                                 lbl ]@@ -238,7 +239,7 @@ howToAccessLabel dflags _ OSMinGW32 this_mod _ lbl          -- Assume all symbols will be in the same PE, so just access them directly.-        | WayDyn `notElem` ways dflags+        | not (gopt Opt_ExternalDynamicRefs dflags)         = AccessDirectly          -- If the target symbol is in another PE we need to access it via the@@ -339,7 +340,8 @@         --           if we don't dynamically link to Haskell code,         --           it actually manages to do so without messing things up.         | osElfTarget os-        , not (positionIndependent dflags) && WayDyn `notElem` ways dflags+        , not (positionIndependent dflags) &&+          not (gopt Opt_ExternalDynamicRefs dflags)         = AccessDirectly  howToAccessLabel dflags arch os this_mod DataReference lbl@@ -400,10 +402,10 @@   -- ---------------------------------------------------------------------- | Says what we we have to add to our 'PIC base register' in order to+-- | Says what we have to add to our 'PIC base register' in order to --      get the address of a label. -picRelative :: Arch -> OS -> CLabel -> CmmLit+picRelative :: DynFlags -> Arch -> OS -> CLabel -> CmmLit  -- Darwin, but not x86_64: -- The PIC base register points to the PIC base label at the beginning@@ -412,15 +414,15 @@ -- We have already made sure that all labels that are not from the current -- module are accessed indirectly ('as' can't calculate differences between -- undefined labels).-picRelative arch OSDarwin lbl+picRelative dflags arch OSDarwin lbl         | arch /= ArchX86_64-        = CmmLabelDiffOff lbl mkPicBaseLabel 0+        = CmmLabelDiffOff lbl mkPicBaseLabel 0 (wordWidth dflags)  -- On AIX we use an indirect local TOC anchored by 'gotLabel'. -- This way we use up only one global TOC entry per compilation-unit -- (this is quite similiar to GCC's @-mminimal-toc@ compilation mode)-picRelative _ OSAIX lbl-        = CmmLabelDiffOff lbl gotLabel 0+picRelative dflags _ OSAIX lbl+        = CmmLabelDiffOff lbl gotLabel 0 (wordWidth dflags)  -- PowerPC Linux: -- The PIC base register points to our fake GOT. Use a label difference@@ -428,9 +430,9 @@ -- We have made sure that *everything* is accessed indirectly, so this -- is only used for offsets from the GOT to symbol pointers inside the -- GOT.-picRelative ArchPPC os lbl+picRelative dflags ArchPPC os lbl         | osElfTarget os-        = CmmLabelDiffOff lbl gotLabel 0+        = CmmLabelDiffOff lbl gotLabel 0 (wordWidth dflags)   -- Most Linux versions:@@ -440,7 +442,7 @@ -- The PIC base register is %rip, we use foo@gotpcrel for symbol pointers, -- and a GotSymbolOffset label for other things. -- For reasons of tradition, the symbol offset label is written as a plain label.-picRelative arch os lbl+picRelative _ arch os lbl         | osElfTarget os || (os == OSDarwin && arch == ArchX86_64)         = let   result                         | Just (SymbolPtr, lbl') <- dynamicLinkerLabelInfo lbl@@ -451,7 +453,7 @@            in    result -picRelative _ _ _+picRelative _ _ _ _         = panic "PositionIndependentCode.picRelative undefined for this platform"  @@ -470,7 +472,7 @@         -- PowerPC Linux: -fPIC or -dynamic         | osElfTarget os         , arch  == ArchPPC-        = positionIndependent dflags || WayDyn `elem` ways dflags+        = positionIndependent dflags || gopt Opt_ExternalDynamicRefs dflags          -- PowerPC 64 Linux: always         | osElfTarget os@@ -480,7 +482,8 @@         -- i386 (and others?): -dynamic but not -fPIC         | osElfTarget os         , arch /= ArchPPC_64 ELF_V1 && arch /= ArchPPC_64 ELF_V2-        = WayDyn `elem` ways dflags && not (positionIndependent dflags)+        = gopt Opt_ExternalDynamicRefs dflags &&+          not (positionIndependent dflags)          | otherwise         = False
nativeGen/PPC/CodeGen.hs view
@@ -382,6 +382,14 @@         mov_lo = MR rlo expr_reg     return $ ChildCode64 (expr_code `snocOL` mov_lo `snocOL` mov_hi)                          rlo++iselExpr64 (CmmMachOp (MO_SS_Conv W32 W64) [expr]) = do+    (expr_reg,expr_code) <- getSomeReg expr+    (rlo, rhi) <- getNewRegPairNat II32+    let mov_hi = SRA II32 rhi expr_reg (RIImm (ImmInt 31))+        mov_lo = MR rlo expr_reg+    return $ ChildCode64 (expr_code `snocOL` mov_lo `snocOL` mov_hi)+                         rlo iselExpr64 expr    = pprPanic "iselExpr64(powerpc)" (pprExpr expr) @@ -1325,6 +1333,7 @@         PrimTarget (MO_U_Mul2 width) -> multOp2 platform width dest_regs                                                 argsAndHints         PrimTarget (MO_Add2 _) -> add2Op platform dest_regs argsAndHints+        PrimTarget (MO_AddWordC _) -> addcOp platform dest_regs argsAndHints         PrimTarget (MO_SubWordC _) -> subcOp platform dest_regs argsAndHints         PrimTarget (MO_AddIntC width) -> addSubCOp ADDO platform width                                                    dest_regs argsAndHints@@ -1515,6 +1524,11 @@               add2Op _ _ _                 = panic "genCCall: Wrong number of arguments/results for add2" +              addcOp platform [res_r, res_c] [arg_x, arg_y]+                = add2Op platform [res_c {-hi-}, res_r {-lo-}] [arg_x, arg_y]+              addcOp _ _ _+                = panic "genCCall: Wrong number of arguments/results for addc"+               -- PowerPC subfc sets the carry for rT = ~(rA) + rB + 1,               -- which is 0 for borrow and 1 otherwise. We need 1 and 0               -- so xor with 1.@@ -2017,6 +2031,7 @@                     MO_U_QuotRem {}  -> unsupported                     MO_U_QuotRem2 {} -> unsupported                     MO_Add2 {}       -> unsupported+                    MO_AddWordC {}   -> unsupported                     MO_SubWordC {}   -> unsupported                     MO_AddIntC {}    -> unsupported                     MO_SubIntC {}    -> unsupported@@ -2094,7 +2109,8 @@                 where jumpTableEntryRel Nothing                         = CmmStaticLit (CmmInt 0 (wordWidth dflags))                       jumpTableEntryRel (Just blockid)-                        = CmmStaticLit (CmmLabelDiffOff blockLabel lbl 0)+                        = CmmStaticLit (CmmLabelDiffOff blockLabel lbl 0+                                         (wordWidth dflags))                             where blockLabel = blockLbl blockid     in Just (CmmData (Section ReadOnlyData lbl) (Statics lbl jumpTable)) generateJumpTableForInstr _ _ = Nothing
nativeGen/PPC/Instr.hs view
@@ -77,19 +77,19 @@         mkStackDeallocInstr     = ppc_mkStackDeallocInstr  -ppc_mkStackAllocInstr :: Platform -> Int -> Instr+ppc_mkStackAllocInstr :: Platform -> Int -> [Instr] ppc_mkStackAllocInstr platform amount   = ppc_mkStackAllocInstr' platform (-amount) -ppc_mkStackDeallocInstr :: Platform -> Int -> Instr+ppc_mkStackDeallocInstr :: Platform -> Int -> [Instr] ppc_mkStackDeallocInstr platform amount   = ppc_mkStackAllocInstr' platform amount -ppc_mkStackAllocInstr' :: Platform -> Int -> Instr+ppc_mkStackAllocInstr' :: Platform -> Int -> [Instr] ppc_mkStackAllocInstr' platform amount   = case platformArch platform of-    ArchPPC      -> UPDATE_SP II32 (ImmInt amount)-    ArchPPC_64 _ -> UPDATE_SP II64 (ImmInt amount)+    ArchPPC      -> [UPDATE_SP II32 (ImmInt amount)]+    ArchPPC_64 _ -> [UPDATE_SP II64 (ImmInt amount)]     _            -> panic $ "ppc_mkStackAllocInstr' "                             ++ show (platformArch platform) @@ -126,7 +126,7 @@          insert_stack_insns (BasicBlock id insns)             | Just new_blockid <- mapLookup id new_blockmap-                = [ BasicBlock id [alloc, BCC ALWAYS new_blockid Nothing]+                = [ BasicBlock id $ alloc ++ [BCC ALWAYS new_blockid Nothing]                   , BasicBlock new_blockid block'                   ]             | otherwise@@ -139,8 +139,8 @@             -- "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+                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
nativeGen/PPC/RegInfo.hs view
@@ -57,8 +57,8 @@ shortcutStatic :: (BlockId -> Maybe JumpDest) -> CmmStatic -> CmmStatic shortcutStatic fn (CmmStaticLit (CmmLabel lab))   = CmmStaticLit (CmmLabel (shortcutLabel fn lab))-shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off))-  = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off)+shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off w))+  = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off w)         -- slightly dodgy, we're ignoring the second label, but this         -- works with the way we use CmmLabelDiffOff for jump tables now. shortcutStatic _ other_static
nativeGen/PPC/Regs.hs view
@@ -165,7 +165,7 @@ litToImm (CmmFloat f W64)    = ImmDouble f litToImm (CmmLabel l)        = ImmCLbl l litToImm (CmmLabelOff l off) = ImmIndex l off-litToImm (CmmLabelDiffOff l1 l2 off)+litToImm (CmmLabelDiffOff l1 l2 off _)                              = ImmConstantSum                                (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))                                (ImmInt off)
nativeGen/RegAlloc/Graph/Spill.hs view
@@ -113,8 +113,8 @@                 -- after we've done a successful allocation.                 let liveSlotsOnEntry' :: BlockMap IntSet                     liveSlotsOnEntry'-                        = mapFoldWithKey patchLiveSlot-                                         liveSlotsOnEntry liveVRegsOnEntry+                        = mapFoldlWithKey patchLiveSlot+                                          liveSlotsOnEntry liveVRegsOnEntry                  let info'                         = LiveInfo static firstId@@ -131,10 +131,9 @@         -- then record the fact that these slots are now live in those blocks         -- in the given slotmap.         patchLiveSlot-                :: BlockId -> RegSet-                -> BlockMap IntSet -> BlockMap IntSet+                :: BlockMap IntSet -> BlockId -> RegSet -> BlockMap IntSet -        patchLiveSlot blockId regsLive slotMap+        patchLiveSlot slotMap blockId regsLive          = let                 -- Slots that are already recorded as being live.                 curSlotsLive    = fromMaybe IntSet.empty
nativeGen/RegAlloc/Liveness.hs view
@@ -147,10 +147,10 @@         mkJumpInstr target      = map Instr (mkJumpInstr target)          mkStackAllocInstr platform amount =-             Instr (mkStackAllocInstr platform amount)+             Instr <$> mkStackAllocInstr platform amount          mkStackDeallocInstr platform amount =-             Instr (mkStackDeallocInstr platform amount)+             Instr <$> mkStackDeallocInstr platform amount   -- | An instruction with liveness information.@@ -1008,5 +1008,3 @@             r_dying_br  = nonDetEltsUniqSet (mkUniqSet r_dying `unionUniqSets`                                              live_branch_only)                           -- See Note [Unique Determinism and code generation]--
nativeGen/SPARC/CodeGen.hs view
@@ -423,7 +423,10 @@                         return (unitOL (CALL (Left (litToImm (CmmLabel lbl))) n_argRegs_used False))                  ForeignTarget expr _-                 -> do  (dyn_c, [dyn_r]) <- arg_to_int_vregs expr+                 -> do  (dyn_c, dyn_rs) <- arg_to_int_vregs expr+                        let dyn_r = case dyn_rs of+                                      [dyn_r'] -> dyn_r'+                                      _ -> panic "SPARC.CodeGen.genCCall: arg_to_int"                         return (dyn_c `snocOL` CALL (Right dyn_r) n_argRegs_used False)                  PrimTarget mop@@ -433,7 +436,10 @@                                         return (unitOL (CALL (Left (litToImm (CmmLabel lbl))) n_argRegs_used False))                                  Right mopExpr -> do-                                        (dyn_c, [dyn_r]) <- arg_to_int_vregs mopExpr+                                        (dyn_c, dyn_rs) <- arg_to_int_vregs mopExpr+                                        let dyn_r = case dyn_rs of+                                                      [dyn_r'] -> dyn_r'+                                                      _ -> panic "SPARC.CodeGen.genCCall: arg_to_int"                                         return (dyn_c `snocOL` CALL (Right dyn_r) n_argRegs_used False)                          return lblOrMopExpr@@ -667,6 +673,7 @@         MO_U_QuotRem {}  -> unsupported         MO_U_QuotRem2 {} -> unsupported         MO_Add2 {}       -> unsupported+        MO_AddWordC {}   -> unsupported         MO_SubWordC {}   -> unsupported         MO_AddIntC {}    -> unsupported         MO_SubIntC {}    -> unsupported
nativeGen/SPARC/CodeGen/Expand.hs view
@@ -142,7 +142,7 @@   --- | The the high partner for this float reg.+-- | The high partner for this float reg. fRegHi :: Reg -> Reg fRegHi (RegReal (RealRegSingle r1))         | r1            >= 32
nativeGen/SPARC/CodeGen/Gen64.hs view
@@ -193,6 +193,24 @@          return  $ ChildCode64 code r_dst_lo +-- only W32 supported for now+iselExpr64 (CmmMachOp (MO_SS_Conv W32 W64) [expr])+ = do+        r_dst_lo        <- getNewRegNat II32+        let r_dst_hi    = getHiVRegFromLo r_dst_lo++        -- compute expr and load it into r_dst_lo+        (a_reg, a_code) <- getSomeReg expr++        dflags          <- getDynFlags+        let platform    = targetPlatform dflags+            code        = a_code+                `appOL` toOL+                        [ SRA a_reg (RIImm (ImmInt 31)) r_dst_hi+                        , mkRegRegMoveInstr platform a_reg r_dst_lo ]++        return  $ ChildCode64 code r_dst_lo+  iselExpr64 expr    = pprPanic "iselExpr64(sparc)" (ppr expr)
nativeGen/SPARC/Imm.hs view
@@ -59,7 +59,7 @@         CmmLabel l              -> ImmCLbl l         CmmLabelOff l off       -> ImmIndex l off -        CmmLabelDiffOff l1 l2 off+        CmmLabelDiffOff l1 l2 off _          -> ImmConstantSum                 (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))                 (ImmInt off)
nativeGen/SPARC/Regs.hs view
@@ -193,7 +193,7 @@   -- | All the regs that the register allocator can allocate to,---      with the the fixed use regs removed.+--      with the fixed use regs removed. -- allocatableRegs :: [RealReg] allocatableRegs
nativeGen/SPARC/ShortcutJump.hs view
@@ -52,8 +52,8 @@ shortcutStatic :: (BlockId -> Maybe JumpDest) -> CmmStatic -> CmmStatic shortcutStatic fn (CmmStaticLit (CmmLabel lab))         = CmmStaticLit (CmmLabel (shortcutLabel fn lab))-shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off))-        = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off)+shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off w))+        = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off w) -- slightly dodgy, we're ignoring the second label, but this -- works with the way we use CmmLabelDiffOff for jump tables now. shortcutStatic _ other_static
nativeGen/X86/CodeGen.hs view
@@ -210,6 +210,9 @@        -> genCCall dflags is32Bit target result_regs args      CmmBranch id          -> genBranch id++    --We try to arrange blocks such that the likely branch is the fallthrough+    --in CmmContFlowOpt. So we can assume the condition is likely false here.     CmmCondBranch arg true false _ -> do       b1 <- genCondJump true arg       b2 <- genBranch false@@ -465,6 +468,20 @@                           r_dst_lo             ) +iselExpr64 (CmmMachOp (MO_SS_Conv W32 W64) [expr]) = do+     fn <- getAnyReg expr+     r_dst_lo <-  getNewRegNat II32+     let r_dst_hi = getHiVRegFromLo r_dst_lo+         code = fn r_dst_lo+     return (+             ChildCode64 (code `snocOL`+                          MOV II32 (OpReg r_dst_lo) (OpReg eax) `snocOL`+                          CLTD II32 `snocOL`+                          MOV II32 (OpReg eax) (OpReg r_dst_lo) `snocOL`+                          MOV II32 (OpReg edx) (OpReg r_dst_hi))+                          r_dst_lo+            )+ iselExpr64 expr    = pprPanic "iselExpr64(i386)" (ppr expr) @@ -2212,6 +2229,8 @@                           ADC format (OpImm (ImmInteger 0)) (OpReg reg_h)                return code         _ -> panic "genCCall: Wrong number of arguments/results for add2"+    (PrimTarget (MO_AddWordC width), [res_r, res_c]) ->+        addSubIntC platform ADD_CC (const Nothing) CARRY width res_r res_c args     (PrimTarget (MO_SubWordC width), [res_r, res_c]) ->         addSubIntC platform SUB_CC (const Nothing) CARRY width res_r res_c args     (PrimTarget (MO_AddIntC width), [res_r, res_c]) ->@@ -2771,6 +2790,7 @@               MO_Add2 {}       -> unsupported               MO_AddIntC {}    -> unsupported               MO_SubIntC {}    -> unsupported+              MO_AddWordC {}   -> unsupported               MO_SubWordC {}   -> unsupported               MO_U_Mul2 {}     -> unsupported               MO_WriteBarrier  -> unsupported@@ -2837,11 +2857,16 @@                     JMP_TBL op ids (Section ReadOnlyData lbl) lbl                  ]         return code-  where (offset, ids) = switchTargetsToTable targets+  where+    (offset, blockIds) = switchTargetsToTable targets+    ids = map (fmap DestBlockId) blockIds  generateJumpTableForInstr :: DynFlags -> Instr -> Maybe (NatCmmDecl (Alignment, CmmStatics) Instr) generateJumpTableForInstr dflags (JMP_TBL _ ids section lbl)-    = Just (createJumpTable dflags ids section lbl)+    = let getBlockId (DestBlockId id) = id+          getBlockId _ = panic "Non-Label target in Jump Table"+          blockIds = map (fmap getBlockId) ids+      in Just (createJumpTable dflags blockIds section lbl) generateJumpTableForInstr _ _ = Nothing  createJumpTable :: DynFlags -> [Maybe BlockId] -> Section -> CLabel@@ -2849,10 +2874,11 @@ createJumpTable dflags ids section lbl     = let jumpTable             | positionIndependent dflags =-                  let jumpTableEntryRel Nothing-                          = CmmStaticLit (CmmInt 0 (wordWidth dflags))+                  let ww = wordWidth dflags+                      jumpTableEntryRel Nothing+                          = CmmStaticLit (CmmInt 0 ww)                       jumpTableEntryRel (Just blockid)-                          = CmmStaticLit (CmmLabelDiffOff blockLabel lbl 0)+                          = CmmStaticLit (CmmLabelDiffOff blockLabel lbl 0 ww)                           where blockLabel = blockLbl blockid                   in map jumpTableEntryRel ids             | otherwise = map (jumpTableEntry dflags) ids
nativeGen/X86/Instr.hs view
@@ -8,7 +8,7 @@ -- ----------------------------------------------------------------------------- -module X86.Instr (Instr(..), Operand(..), PrefetchVariant(..), JumpDest,+module X86.Instr (Instr(..), Operand(..), PrefetchVariant(..), JumpDest(..),                   getJumpDestBlockId, canShortcut, shortcutStatics,                   shortcutJump, i386_insert_ffrees, allocMoreStack,                   maxSpillSlots, archWordFormat)@@ -322,7 +322,7 @@         | JXX_GBL     Cond Imm      -- non-local version of JXX         -- Table jump         | JMP_TBL     Operand   -- Address to jump to-                      [Maybe BlockId] -- Blocks in the jump table+                      [Maybe JumpDest] -- Targets of the jump table                       Section   -- Data section jump table should be put in                       CLabel    -- Label of jump table         | CALL        (Either Imm Reg) [Reg]@@ -704,7 +704,7 @@ x86_jumpDestsOfInstr insn   = case insn of         JXX _ id        -> [id]-        JMP_TBL _ ids _ _ -> [id | Just id <- ids]+        JMP_TBL _ ids _ _ -> [id | Just (DestBlockId id) <- ids]         _               -> []  @@ -715,12 +715,16 @@   = case insn of         JXX cc id       -> JXX cc (patchF id)         JMP_TBL op ids section lbl-          -> JMP_TBL op (map (fmap patchF) ids) section lbl+          -> JMP_TBL op (map (fmap (patchJumpDest patchF)) ids) section lbl         _               -> insn+    where+        patchJumpDest f (DestBlockId id) = DestBlockId (f id)+        patchJumpDest _ dest             = dest    + -- ----------------------------------------------------------------------------- -- | Make a spill instruction. x86_mkSpillInstr@@ -854,25 +858,104 @@ x86_mkJumpInstr id         = [JXX ALWAYS id] +-- Note [Windows stack layout]+-- | On most OSes the kernel will place a guard page after the current stack+--   page.  If you allocate larger than a page worth you may jump over this+--   guard page.  Not only is this a security issue, but on certain OSes such+--   as Windows a new page won't be allocated if you don't hit the guard.  This+--   will cause a segfault or access fault.+--+--   This function defines if the current allocation amount requires a probe.+--   On Windows (for now) we emit a call to _chkstk for this.  For other OSes+--   this is not yet implemented.+--   See https://docs.microsoft.com/en-us/windows/desktop/DevNotes/-win32-chkstk+--   The Windows stack looks like this:+--+--                         +-------------------++--                         |        SP         |+--                         +-------------------++--                         |                   |+--                         |    GUARD PAGE     |+--                         |                   |+--                         +-------------------++--                         |                   |+--                         |                   |+--                         |     UNMAPPED      |+--                         |                   |+--                         |                   |+--                         +-------------------++--+--   In essense each allocation larger than a page size needs to be chunked and+--   a probe emitted after each page allocation.  You have to hit the guard+--   page so the kernel can map in the next page, otherwise you'll segfault.+--+needs_probe_call :: Platform -> Int -> Bool+needs_probe_call platform amount+  = case platformOS platform of+     OSMinGW32 -> case platformArch platform of+                    ArchX86    -> amount > (4 * 1024)+                    ArchX86_64 -> amount > (8 * 1024)+                    _          -> False+     _         -> False  x86_mkStackAllocInstr         :: Platform         -> Int-        -> Instr+        -> [Instr] x86_mkStackAllocInstr platform amount-  = case platformArch platform of-      ArchX86    -> SUB II32 (OpImm (ImmInt amount)) (OpReg esp)-      ArchX86_64 -> SUB II64 (OpImm (ImmInt amount)) (OpReg rsp)-      _ -> panic "x86_mkStackAllocInstr"+  = case platformOS platform of+      OSMinGW32 ->+        -- These will clobber AX but this should be ok because+        --+        -- 1. It is the first thing we do when entering the closure and AX is+        --    a caller saved registers on Windows both on x86_64 and x86.+        --+        -- 2. The closures are only entered via a call or longjmp in which case+        --    there are no expectations for volatile registers.+        --+        -- 3. When the target is a local branch point it is re-targeted+        --    after the dealloc, preserving #2.  See note [extra spill slots].+        --+        -- We emit a call because the stack probes are quite involved and+        -- would bloat code size a lot.  GHC doesn't really have an -Os.+        -- __chkstk is guaranteed to leave all nonvolatile registers and AX+        -- untouched.  It's part of the standard prologue code for any Windows+        -- function dropping the stack more than a page.+        -- See Note [Windows stack layout]+        case platformArch platform of+            ArchX86    | needs_probe_call platform amount ->+                           [ MOV II32 (OpImm (ImmInt amount)) (OpReg eax)+                           , CALL (Left $ strImmLit "___chkstk_ms") [eax]+                           , SUB II32 (OpReg eax) (OpReg esp)+                           ]+                       | otherwise ->+                           [ SUB II32 (OpImm (ImmInt amount)) (OpReg esp)+                           , TEST II32 (OpReg esp) (OpReg esp)+                           ]+            ArchX86_64 | needs_probe_call platform amount ->+                           [ MOV II64 (OpImm (ImmInt amount)) (OpReg rax)+                           , CALL (Left $ strImmLit "__chkstk_ms") [rax]+                           , SUB II64 (OpReg rax) (OpReg rsp)+                           ]+                       | otherwise ->+                           [ SUB II64 (OpImm (ImmInt amount)) (OpReg rsp)+                           , TEST II64 (OpReg rsp) (OpReg rsp)+                           ]+            _ -> panic "x86_mkStackAllocInstr"+      _       ->+        case platformArch platform of+          ArchX86    -> [ SUB II32 (OpImm (ImmInt amount)) (OpReg esp) ]+          ArchX86_64 -> [ SUB II64 (OpImm (ImmInt amount)) (OpReg rsp) ]+          _ -> panic "x86_mkStackAllocInstr"  x86_mkStackDeallocInstr         :: Platform         -> Int-        -> Instr+        -> [Instr] x86_mkStackDeallocInstr platform amount   = case platformArch platform of-      ArchX86    -> ADD II32 (OpImm (ImmInt amount)) (OpReg esp)-      ArchX86_64 -> ADD II64 (OpImm (ImmInt amount)) (OpReg rsp)+      ArchX86    -> [ADD II32 (OpImm (ImmInt amount)) (OpReg esp)]+      ArchX86_64 -> [ADD II64 (OpImm (ImmInt amount)) (OpReg rsp)]       _ -> panic "x86_mkStackDeallocInstr"  i386_insert_ffrees@@ -992,7 +1075,7 @@        insert_stack_insns (BasicBlock id insns)          | Just new_blockid <- mapLookup id new_blockmap-         = [ BasicBlock id [alloc, JXX ALWAYS new_blockid]+         = [ BasicBlock id $ alloc ++ [JXX ALWAYS new_blockid]            , BasicBlock new_blockid block' ]          | otherwise          = [ BasicBlock id block' ]@@ -1000,7 +1083,7 @@            block' = foldr insert_dealloc [] insns        insert_dealloc insn r = case insn of-         JMP _ _     -> dealloc : insn : r+         JMP _ _     -> dealloc ++ (insn : r)          JXX_GBL _ _ -> panic "insert_dealloc: cannot handle JXX_GBL"          _other      -> x86_patchJumpInstr insn retarget : r            where retarget b = fromMaybe b (mapLookup b new_blockmap)@@ -1009,7 +1092,6 @@     -- in     return (CmmProc info lbl live (ListGraph new_code)) - data JumpDest = DestBlockId BlockId | DestImm Imm  getJumpDestBlockId :: JumpDest -> Maybe BlockId@@ -1026,14 +1108,24 @@ -- The blockset helps avoid following cycles. shortcutJump :: (BlockId -> Maybe JumpDest) -> Instr -> Instr shortcutJump fn insn = shortcutJump' fn (setEmpty :: LabelSet) insn-  where shortcutJump' fn seen insn@(JXX cc id) =-          if setMember id seen then insn-          else case fn id of-                 Nothing                -> insn-                 Just (DestBlockId id') -> shortcutJump' fn seen' (JXX cc id')-                 Just (DestImm imm)     -> shortcutJump' fn seen' (JXX_GBL cc imm)-               where seen' = setInsert id seen-        shortcutJump' _ _ other = other+  where+    shortcutJump' :: (BlockId -> Maybe JumpDest) -> LabelSet -> Instr -> Instr+    shortcutJump' fn seen insn@(JXX cc id) =+        if setMember id seen then insn+        else case fn id of+            Nothing                -> insn+            Just (DestBlockId id') -> shortcutJump' fn seen' (JXX cc id')+            Just (DestImm imm)     -> shortcutJump' fn seen' (JXX_GBL cc imm)+        where seen' = setInsert id seen+    shortcutJump' fn _ (JMP_TBL addr blocks section tblId) =+        let updateBlock (Just (DestBlockId bid))  =+                case fn bid of+                    Nothing   -> Just (DestBlockId bid )+                    Just dest -> Just dest+            updateBlock dest = dest+            blocks' = map updateBlock blocks+        in  JMP_TBL addr blocks' section tblId+    shortcutJump' _ _ other = other  -- Here because it knows about JumpDest shortcutStatics :: (BlockId -> Maybe JumpDest) -> (Alignment, CmmStatics) -> (Alignment, CmmStatics)@@ -1050,8 +1142,8 @@ shortcutStatic :: (BlockId -> Maybe JumpDest) -> CmmStatic -> CmmStatic shortcutStatic fn (CmmStaticLit (CmmLabel lab))   = CmmStaticLit (CmmLabel (shortcutLabel fn lab))-shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off))-  = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off)+shortcutStatic fn (CmmStaticLit (CmmLabelDiffOff lbl1 lbl2 off w))+  = CmmStaticLit (CmmLabelDiffOff (shortcutLabel fn lbl1) lbl2 off w)         -- slightly dodgy, we're ignoring the second label, but this         -- works with the way we use CmmLabelDiffOff for jump tables now. shortcutStatic _ other_static
nativeGen/X86/Ppr.hs view
@@ -73,12 +73,17 @@ -- .subsections_via_symbols and -dead_strip can be found at -- <https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html#//apple_ref/doc/uid/TP30000823-TPXREF101> +pprProcAlignment :: SDoc+pprProcAlignment = sdocWithDynFlags $ \dflags ->+  (maybe empty pprAlign . cmmProcAlignment $ dflags)+ pprNatCmmDecl :: NatCmmDecl (Alignment, CmmStatics) Instr -> SDoc pprNatCmmDecl (CmmData section dats) =   pprSectionAlign section $$ pprDatas dats  pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) =   sdocWithDynFlags $ \dflags ->+  pprProcAlignment $$   case topInfoTable proc of     Nothing ->        case blocks of@@ -86,6 +91,7 @@            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@@ -95,6 +101,7 @@     Just (Statics info_lbl _) ->       sdocWithPlatform $ \platform ->       pprSectionAlign (Section Text info_lbl) $$+      pprProcAlignment $$       (if platformHasSubsectionsViaSymbols platform           then ppr (mkDeadStripPreventer info_lbl) <> char ':'           else empty) $$@@ -175,23 +182,44 @@             $$ pprTypeAndSizeDecl lbl             $$ (ppr lbl <> char ':') +{-+Note [Pretty print ASCII when AsmCodeGen]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Previously, when generating assembly code, we created SDoc with+`(ptext . sLit)` for every bytes in literal bytestring, then+combine them using `hcat`. +When handling literal bytestrings with millions of bytes,+millions of SDoc would be created and to combine, leading to+high memory usage.++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.+-}+ pprASCII :: [Word8] -> SDoc pprASCII str-  = hcat (map (do1 . fromIntegral) str)+  -- Transform this given literal bytestring to escaped string and construct+  -- the literal SDoc directly.+  -- See Trac #14741+  -- and Note [Pretty print ASCII when AsmCodeGen]+  = ptext $ sLit $ foldr (\w s -> (do1 . fromIntegral) w ++ s) "" str     where-       do1 :: Int -> SDoc-       do1 w | '\t' <- chr w = ptext (sLit "\\t")-       do1 w | '\n' <- chr w = ptext (sLit "\\n")-       do1 w | '"'  <- chr w = ptext (sLit "\\\"")-       do1 w | '\\' <- chr w = ptext (sLit "\\\\")-       do1 w | isPrint (chr w) = char (chr w)-       do1 w | otherwise = char '\\' <> octal w+       do1 :: Int -> String+       do1 w | '\t' <- chr w = "\\t"+             | '\n' <- chr w = "\\n"+             | '"'  <- chr w = "\\\""+             | '\\' <- chr w = "\\\\"+             | isPrint (chr w) = [chr w]+             | otherwise = '\\' : octal w -       octal :: Int -> SDoc-       octal w = int ((w `div` 64) `mod` 8)-                  <> int ((w `div` 8) `mod` 8)-                  <> int (w `mod` 8)+       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)+                 ]  pprAlign :: Int -> SDoc pprAlign bytes@@ -508,7 +536,7 @@                   --                   case lit of                   -- A relative relocation:-                  CmmLabelDiffOff _ _ _ ->+                  CmmLabelDiffOff _ _ _ _ ->                       [text "\t.long\t" <> pprImm imm,                        text "\t.long\t0"]                   _ ->
nativeGen/X86/Regs.hs view
@@ -146,7 +146,7 @@ litToImm (CmmFloat f W64)    = ImmDouble f litToImm (CmmLabel l)        = ImmCLbl l litToImm (CmmLabelOff l off) = ImmIndex l off-litToImm (CmmLabelDiffOff l1 l2 off)+litToImm (CmmLabelDiffOff l1 l2 off _)                              = ImmConstantSum                                (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))                                (ImmInt off)
parser/ApiAnnotation.hs view
@@ -280,13 +280,13 @@     | AnnThIdTySplice -- ^ '$$'     | AnnThTyQuote -- ^ double '''     | AnnTilde -- ^ '~'-    | AnnTildehsh -- ^ '~#'     | AnnType     | AnnUnit -- ^ '()' for types     | AnnUsing     | AnnVal  -- ^ e.g. INTEGER     | AnnValStr  -- ^ String value, will need quotes when output     | AnnVbar -- ^ '|'+    | AnnVia -- ^ 'via'     | AnnWhere     | Annlarrowtail -- ^ '-<'     | AnnlarrowtailU -- ^ '-<', unicode variant@@ -322,7 +322,7 @@  -- | - 'ApiAnnotation.AnnKeywordId' : 'ApiAnnotation.AnnOpen', --             'ApiAnnotation.AnnClose','ApiAnnotation.AnnComma',---             'ApiAnnotation.AnnRarrow','ApiAnnotation.AnnTildehsh',+--             'ApiAnnotation.AnnRarrow' --             'ApiAnnotation.AnnTilde' --   - May have 'ApiAnnotation.AnnComma' when in a list type LRdrName = Located RdrName
− parser/Lexer.hs
@@ -1,3396 +0,0 @@-{-# OPTIONS_GHC -fno-warn-unused-binds -fno-warn-missing-signatures #-}-{-# LANGUAGE CPP,MagicHash #-}-{-# LINE 43 "compiler/parser/Lexer.x" #-}--{-# LANGUAGE BangPatterns #-}---- See Note [Warnings in code generated by Alex] in compiler/parser/Lexer.x-{-# OPTIONS_GHC -fno-warn-unused-matches #-}-{-# OPTIONS_GHC -fno-warn-unused-binds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-tabs #-}-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}--{-# OPTIONS_GHC -funbox-strict-fields #-}--module Lexer (-   Token(..), lexer, pragState, mkPState, mkPStatePure, PState(..),-   P(..), ParseResult(..), mkParserFlags, ParserFlags(..), getSrcLoc,-   getPState, extopt, withThisPackage,-   failLocMsgP, failSpanMsgP, srcParseFail,-   getMessages,-   popContext, pushModuleContext, setLastToken, setSrcLoc,-   activeContext, nextIsEOF,-   getLexState, popLexState, pushLexState,-   extension, bangPatEnabled, datatypeContextsEnabled,-   traditionalRecordSyntaxEnabled,-   explicitForallEnabled,-   inRulePrag,-   explicitNamespacesEnabled,-   patternSynonymsEnabled,-   sccProfilingOn, hpcEnabled,-   addWarning,-   lexTokenStream,-   addAnnotation,AddAnn,addAnnsAt,mkParensApiAnn,-   commentToAnnotation,-   moveAnnotations-  ) where--import GhcPrelude---- base-import Control.Monad-import Control.Monad.Fail as MonadFail-import Data.Bits-import Data.Char-import Data.List-import Data.Maybe-import Data.Word--import EnumSet (EnumSet)-import qualified EnumSet---- ghc-boot-import qualified GHC.LanguageExtensions as LangExt---- bytestring-import Data.ByteString (ByteString)---- containers-import Data.Map (Map)-import qualified Data.Map as Map---- compiler/utils-import Bag-import Outputable-import StringBuffer-import FastString-import UniqFM-import Util             ( readRational, readHexRational )---- compiler/main-import ErrUtils-import DynFlags---- compiler/basicTypes-import SrcLoc-import Module-import BasicTypes     ( InlineSpec(..), RuleMatchInfo(..),-                        IntegralLit(..), FractionalLit(..),-                        SourceText(..) )---- compiler/parser-import Ctype--import ApiAnnotation--#if __GLASGOW_HASKELL__ >= 603-#include "ghcconfig.h"-#elif defined(__GLASGOW_HASKELL__)-#include "config.h"-#endif-#if __GLASGOW_HASKELL__ >= 503-import Data.Array-import Data.Array.Base (unsafeAt)-#else-import Array-#endif-#if __GLASGOW_HASKELL__ >= 503-import GHC.Exts-#else-import GlaExts-#endif-alex_tab_size :: Int-alex_tab_size = 8-alex_base :: AlexAddr-alex_base = AlexA#-  "\x01\x00\x00\x00\x7b\x00\x00\x00\x84\x00\x00\x00\xa0\x00\x00\x00\xbc\x00\x00\x00\xc5\x00\x00\x00\xce\x00\x00\x00\xec\x00\x00\x00\x06\x01\x00\x00\x0b\x01\x00\x00\x24\x01\x00\x00\x41\x01\x00\x00\x5d\x01\x00\x00\x98\x01\x00\x00\xd4\xff\xff\xff\x61\x00\x00\x00\xd7\xff\xff\xff\xdb\xff\xff\xff\xa4\xff\xff\xff\xaa\xff\xff\xff\x15\x02\x00\x00\x8f\x02\x00\x00\x09\x03\x00\x00\x93\xff\xff\xff\x94\xff\xff\xff\x83\x03\x00\x00\x95\xff\xff\xff\xb2\xff\xff\xff\xe7\xff\xff\xff\xe8\xff\xff\xff\xe9\xff\xff\xff\xae\xff\xff\xff\xab\xff\xff\xff\xb0\xff\xff\xff\x2f\x01\x00\x00\xf9\x03\x00\x00\xb3\xff\xff\xff\xba\xff\xff\xff\xac\xff\xff\xff\x0c\x04\x00\x00\x46\x04\x00\x00\xaf\xff\xff\xff\xb1\xff\xff\xff\x91\x04\x00\x00\xd1\x00\x00\x00\x3f\x01\x00\x00\xa8\x04\x00\x00\x5c\x01\x00\x00\x76\x01\x00\x00\xf8\x01\x00\x00\x96\x01\x00\x00\x06\x02\x00\x00\x72\x02\x00\x00\x80\x02\x00\x00\xe7\x02\x00\x00\xce\x04\x00\x00\x62\x00\x00\x00\x51\x00\x00\x00\xe5\x04\x00\x00\x80\x01\x00\x00\x5a\x00\x00\x00\x1e\x05\x00\x00\x78\x05\x00\x00\xf6\x05\x00\x00\x72\x06\x00\x00\xee\x06\x00\x00\x6a\x07\x00\x00\xe6\x07\x00\x00\x62\x08\x00\x00\x78\x00\x00\x00\xde\x08\x00\x00\x5c\x09\x00\x00\x12\x00\x00\x00\x16\x00\x00\x00\x77\x01\x00\x00\x23\x03\x00\x00\x00\x00\x00\x00\x79\x00\x00\x00\x5b\x01\x00\x00\x85\x03\x00\x00\x69\x00\x00\x00\x90\x00\x00\x00\x93\x00\x00\x00\x95\x00\x00\x00\x96\x00\x00\x00\x97\x00\x00\x00\x99\x00\x00\x00\x9c\x00\x00\x00\xd7\x09\x00\x00\xff\x09\x00\x00\x42\x0a\x00\x00\x6a\x0a\x00\x00\xad\x0a\x00\x00\xd5\x0a\x00\x00\x18\x0b\x00\x00\xf5\x05\x00\x00\x71\x06\x00\x00\xed\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x0b\x00\x00\xd2\x0b\x00\x00\x4c\x0c\x00\x00\xc6\x0c\x00\x00\x61\x03\x00\x00\x40\x0d\x00\x00\xa8\x00\x00\x00\xb4\x00\x00\x00\xbe\x0d\x00\x00\xa5\x00\x00\x00\xed\x03\x00\x00\x38\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb6\x0e\x00\x00\x00\x00\x00\x00\x30\x0f\x00\x00\xaa\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x24\x10\x00\x00\x9e\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf8\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x11\x00\x00\xb2\x11\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x00\x00\x9f\x00\x00\x00\x00\x00\x00\x00\x88\x12\x00\x00\x02\x13\x00\x00\x7c\x13\x00\x00\xf6\x13\x00\x00\x70\x14\x00\x00\xea\x14\x00\x00\x64\x15\x00\x00\xde\x15\x00\x00\xa1\x00\x00\x00\xb1\x00\x00\x00\xb5\x00\x00\x00\xbd\x00\x00\x00\x38\x16\x00\x00\x5b\x16\x00\x00\xb7\x16\x00\x00\xda\x16\x00\x00\xfd\x16\x00\x00\x25\x17\x00\x00\x68\x17\x00\x00\x8d\x17\x00\x00\x06\x18\x00\x00\x7f\x18\x00\x00\xf8\x18\x00\x00\x54\x19\x00\x00\x79\x19\x00\x00\xd0\x05\x00\x00\x8c\x19\x00\x00\xbf\x00\x00\x00\x01\x03\x00\x00\xd5\x19\x00\x00\xb9\x09\x00\x00\xfa\x19\x00\x00\xdd\x00\x00\x00\x09\x05\x00\x00\x43\x1a\x00\x00\x2d\x0b\x00\x00\x1f\x05\x00\x00\x4e\x0b\x00\x00\x53\x06\x00\x00\x69\x1a\x00\x00\xda\x05\x00\x00\x8f\x1a\x00\x00\xc8\x06\x00\x00\xc1\x00\x00\x00\xc3\x00\x00\x00\xc4\x00\x00\x00\xc7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--alex_table :: AlexAddr-alex_table = AlexA#-  "\x00\x00\x50\x00\xab\x00\xa9\x00\x59\x00\xb7\x00\x4a\x00\x91\x00\x5a\x00\x63\x00\x4c\x00\x6c\x00\x4a\x00\x4a\x00\x4a\x00\x69\x00\x79\x00\x7a\x00\x7c\x00\x49\x00\x17\x00\x18\x00\x1a\x00\x2a\x00\x1b\x00\x29\x00\x20\x00\x24\x00\x66\x00\x13\x00\x25\x00\x12\x00\x65\x00\x4a\x00\xb7\x00\xdf\x00\xb8\x00\xbb\x00\xb7\x00\xb7\x00\xde\x00\x9a\x00\x9b\x00\xb7\x00\xb7\x00\x9f\x00\xb3\x00\xb7\x00\xb7\x00\xbf\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbc\x00\xa0\x00\xb7\x00\xb7\x00\xb7\x00\xb9\x00\x92\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\x9d\x00\xb7\x00\x9e\x00\xb7\x00\xa9\x00\xa1\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa3\x00\xb5\x00\xa4\x00\xb7\x00\x4a\x00\xc5\x00\xc5\x00\xff\xff\x4c\x00\x62\x00\x4a\x00\x4a\x00\x4a\x00\x4a\x00\xc0\x00\xc0\x00\x14\x00\x4c\x00\x5a\x00\x4a\x00\x4a\x00\x4a\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xff\xff\x4a\x00\x7f\x00\xff\xff\x64\x00\xff\xff\xff\xff\xff\xff\x7f\x00\xff\xff\x4a\x00\x4a\x00\xff\xff\x50\x00\x11\x00\x4c\x00\x68\x00\x4a\x00\x4a\x00\x4a\x00\x21\x00\xff\xff\x83\x00\x11\x00\xff\xff\x75\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\xff\xff\x85\x00\x4a\x00\x4a\x00\x00\x00\x6a\x00\xad\x00\x4c\x00\x68\x00\x4a\x00\x4a\x00\x4a\x00\x4a\x00\x4e\x00\x4f\x00\x11\x00\x4c\x00\x68\x00\x4a\x00\x4a\x00\x4a\x00\x4a\x00\xae\x00\x51\x00\x7f\x00\x4c\x00\xaf\x00\x4a\x00\x4a\x00\x4a\x00\x4a\x00\x97\x00\x79\x00\x6a\x00\xb0\x00\x5c\x00\xd1\x00\x48\x00\xd8\x00\x4a\x00\xd9\x00\xda\x00\x6a\x00\x11\x00\xdb\x00\xdd\x00\x00\x00\x00\x00\x4a\x00\xc0\x00\xc0\x00\x4a\x00\x11\x00\x00\x00\x7f\x00\x4c\x00\x0e\x00\x4a\x00\x4a\x00\x4a\x00\x00\x00\x11\x00\x2d\x00\x00\x00\x2d\x00\x0e\x00\xd5\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\x4a\x00\x4a\x00\xc5\x00\xc5\x00\x4c\x00\x4b\x00\x4a\x00\x4a\x00\x4a\x00\x4d\x00\xff\xff\x4b\x00\x4b\x00\x4b\x00\x11\x00\x00\x00\x67\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x4a\x00\x00\x00\x47\x00\x4a\x00\x00\x00\x4b\x00\x00\x00\x4c\x00\x1f\x00\x4a\x00\x4a\x00\x4a\x00\x26\x00\x11\x00\x22\x00\x00\x00\x93\x00\x67\x00\x74\x00\x22\x00\x22\x00\x22\x00\x22\x00\x00\x00\x00\x00\x00\x00\x67\x00\x6b\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x4a\x00\x00\x00\x00\x00\x0e\x00\x4c\x00\x00\x00\x4a\x00\x4a\x00\x4a\x00\x22\x00\x00\x00\x11\x00\x1d\x00\x00\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x00\x00\x00\x00\x00\x00\x4a\x00\x4a\x00\x46\x00\x00\x00\x00\x00\x4c\x00\x0e\x00\x4a\x00\x4a\x00\x4a\x00\x00\x00\x00\x00\x00\x00\x11\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\x00\x00\x00\x00\x45\x00\x4a\x00\x4a\x00\x7d\x00\x7f\x00\x1c\x00\x0e\x00\x4a\x00\x4a\x00\x4a\x00\x7f\x00\x73\x00\x30\x00\x00\x00\x30\x00\x0f\x00\x00\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x4a\x00\x00\x00\xac\x00\xaa\x00\x00\x00\x00\x00\x4a\x00\x00\x00\x0e\x00\x00\x00\x4c\x00\x6c\x00\x4a\x00\x4a\x00\x4a\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\x4a\x00\x7f\x00\x00\x00\x1e\x00\x0e\x00\x00\x00\x00\x00\x00\x00\x99\x00\x9b\x00\x00\x00\x00\x00\x9f\x00\x10\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\x00\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x0e\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\x9c\x00\x00\x00\x9e\x00\x00\x00\xaa\x00\xa1\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xa2\x00\x00\x00\xa4\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x14\x00\x14\x00\x14\x00\x32\x00\x00\x00\x32\x00\x00\x00\x00\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\x00\x00\x00\x00\x00\x00\x14\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\x15\x00\x35\x00\x00\x00\x35\x00\x00\x00\x00\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\x00\x00\x00\x00\x00\x00\x15\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x70\x00\x70\x00\x70\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x16\x00\x16\x00\x16\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\x00\x00\x00\x00\x00\x00\xd2\x00\x00\x00\x00\x00\x00\x00\x4b\x00\x16\x00\x00\x00\x00\x00\x00\x00\xff\xff\x4b\x00\x4b\x00\x4b\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\xc1\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x00\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x7b\x00\x7b\x00\x7b\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x19\x00\x19\x00\x19\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x71\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x45\x00\x00\x00\x00\x00\x7e\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x00\x7f\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x22\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x22\x00\x22\x00\x22\x00\x22\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x00\x00\x00\x00\x00\x1d\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x77\x00\x00\x00\x00\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x23\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x00\x00\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x27\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\x00\x00\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x00\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\x00\x00\x00\x00\x00\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\x00\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xa8\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xd6\x00\x00\x00\x00\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\xc6\x00\x00\x00\xdc\x00\x00\x00\x00\x00\x00\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\x00\x00\x00\x00\x00\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\xc9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa7\x00\xa5\x00\x00\x00\xb1\x00\xa6\x00\x00\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xb1\x00\x00\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\x00\x00\x00\x00\x00\x00\xb1\x00\xb1\x00\x00\x00\xb1\x00\xb1\x00\xb1\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\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\x00\x00\xb1\x00\x00\x00\xb1\x00\xa5\x00\x00\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xd0\x00\xb1\x00\x00\x00\xb1\x00\x3f\x00\x3f\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x36\x00\xff\xff\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\xcd\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x00\x00\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x00\x00\x00\x00\x56\x00\x00\x00\x3f\x00\x00\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x3f\x00\x56\x00\x90\x00\x40\x00\x40\x00\x40\x00\xdc\x00\x00\x00\x00\x00\x40\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\xcb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x54\x00\x00\x00\x40\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x54\x00\x8f\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\xff\xff\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\xcf\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x40\x00\x00\x00\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x55\x00\x00\x00\x40\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x55\x00\x88\x00\x40\x00\x40\x00\x40\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x87\x00\x40\x00\x40\x00\x40\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x86\x00\x40\x00\x40\x00\x40\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\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x84\x00\x46\x00\x46\x00\x46\x00\x46\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\x46\x00\x46\x00\x78\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x47\x00\x47\x00\x47\x00\x47\x00\x00\x00\x47\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x00\x47\x00\x72\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\xff\xff\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x33\x00\x00\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x31\x00\x5f\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x00\x00\x58\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x60\x00\xff\xff\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\x76\x00\x58\x00\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x76\x00\x76\x00\x76\x00\x76\x00\x00\x00\x00\x00\x00\x00\x76\x00\x76\x00\x00\x00\x5b\x00\x76\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x76\x00\x76\x00\x76\x00\x76\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x76\x00\x00\x00\x76\x00\x76\x00\x76\x00\x76\x00\x00\x00\x00\x00\x00\x00\x76\x00\x76\x00\xb7\x00\x5b\x00\x76\x00\x76\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x76\x00\x76\x00\x76\x00\x76\x00\x76\x00\x76\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\x5d\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x76\x00\x00\x00\x76\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\x5d\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x6d\x00\x6d\x00\x6d\x00\x00\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\xc8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x00\x34\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\xca\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x34\x00\x31\x00\xb7\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x31\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x00\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6d\x00\x6e\x00\x6e\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x00\x00\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x19\x00\x19\x00\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\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\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x70\x00\x70\x00\x70\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x19\x00\x19\x00\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\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\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x00\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x47\x00\x47\x00\x47\x00\x47\x00\x00\x00\x47\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x47\x00\x47\x00\x72\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x47\x00\x6e\x00\x6e\x00\x6e\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x75\x00\x75\x00\x75\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\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\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6e\x00\x00\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x6e\x00\x46\x00\x46\x00\x46\x00\x46\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\x46\x00\x46\x00\x78\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x46\x00\x7b\x00\x7b\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7b\x00\x00\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x7b\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x15\x00\x15\x00\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\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\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\x00\x00\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x6f\x00\x70\x00\x70\x00\x70\x00\x00\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x16\x00\x16\x00\x16\x00\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\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\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x00\x00\x00\x00\x00\x00\x00\x00\x70\x00\x00\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x70\x00\x8b\x00\x8b\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8b\x00\x00\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8c\x00\x8c\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x8c\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x95\x00\x95\x00\x95\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x00\x00\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x96\x00\x96\x00\x96\x00\x00\x00\x00\x00\x00\x00\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x27\x00\x40\x00\x00\x00\x00\x00\x96\x00\x00\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x27\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x40\x00\x40\x00\x40\x00\x42\x00\x44\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x43\x00\x40\x00\x40\x00\x40\x00\x41\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x40\x00\x00\x00\x82\x00\xa5\x00\xa5\x00\xa5\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x00\x00\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa5\x00\xa6\x00\xa6\x00\xa6\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa6\x00\xa7\x00\xa7\x00\xa7\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa7\x00\x00\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa7\x00\xa8\x00\xa8\x00\xa8\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\x00\x00\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa8\x00\xa9\x00\xa9\x00\xa9\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x00\x00\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xa9\x00\xaa\x00\xaa\x00\xaa\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x00\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xaa\x00\xab\x00\xab\x00\xab\x00\x00\x00\x00\x00\x00\x00\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\x00\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xab\x00\xac\x00\xac\x00\xac\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3d\x00\x00\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\x00\x00\x00\x00\x00\x00\xb1\x00\xac\x00\x00\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xac\x00\xb1\x00\x00\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb2\x00\x00\x00\x00\x00\xb1\x00\xb1\x00\x00\x00\xb1\x00\xb1\x00\xb1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\xb1\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb2\x00\xb2\x00\xb2\x00\xb2\x00\x00\x00\x00\x00\x00\x00\xb2\x00\xb2\x00\x00\x00\xb2\x00\xb2\x00\xb2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\xb2\x00\xb1\x00\xb2\x00\xb2\x00\xb2\x00\xb2\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x00\x00\x00\xb1\x00\xb2\x00\x00\x00\xb2\x00\x00\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xb7\x00\xb2\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\x5e\x00\xb7\x00\xb7\x00\xc4\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x94\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\x7c\x00\xb7\x00\xb7\x00\x89\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\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\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x8a\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x96\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x98\x00\xb7\x00\xb7\x00\x00\x00\xb4\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x96\x00\x00\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x96\x00\x95\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x95\x00\x00\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x95\x00\x8c\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x8e\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x8c\x00\x00\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8c\x00\x8b\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xba\x00\xb7\x00\xb7\x00\x00\x00\x8d\x00\x00\x00\xb7\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\xb7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x00\x00\xb7\x00\x8b\x00\xbd\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x8b\x00\x00\x00\xb7\x00\xbd\x00\xb7\x00\xbd\x00\xbd\x00\xbd\x00\xbd\x00\x00\x00\x00\x00\xbd\x00\xbd\x00\xbd\x00\x00\x00\xbd\x00\xbd\x00\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x00\x00\x00\xbd\x00\xbd\x00\xbd\x00\xbd\x00\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xbd\x00\x00\x00\xbd\x00\xbd\x00\xbd\x00\xbd\x00\x00\x00\x00\x00\x00\x00\xbd\x00\xbd\x00\x00\x00\xbd\x00\xbd\x00\xbd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd0\x00\xbd\x00\x81\x00\xbd\x00\xbd\x00\x00\x00\xbd\x00\xbd\x00\xbd\x00\xbd\x00\xbd\x00\x36\x00\x00\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\xbe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\xbd\x00\x34\x00\xbd\x00\x00\x00\x00\x00\xbd\x00\x00\x00\xbd\x00\x00\x00\x00\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3c\x00\x00\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\xbd\x00\x00\x00\xbd\x00\xd3\x00\x00\x00\x00\x00\x3b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x00\x3a\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\x00\x00\xd4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x33\x00\x00\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\xc3\x00\x00\x00\x00\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\xc2\x00\x39\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x38\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\x00\x00\x00\x00\x00\x00\x39\x00\x00\x00\x00\x00\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x37\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\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\x00\x00\x00\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\x00\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xc7\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\x00\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xcc\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\x00\x00\x00\x00\x00\x00\x00\x2f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\xce\x00\xce\x00\xce\x00\xce\x00\xce\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"#--alex_check :: AlexAddr-alex_check = AlexA#-  "\xff\xff\x2d\x00\x01\x00\x02\x00\x2d\x00\x04\x00\x05\x00\x06\x00\x2d\x00\x65\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x65\x00\x7d\x00\x7d\x00\x7d\x00\x61\x00\x2d\x00\x2d\x00\x2d\x00\x69\x00\x6d\x00\x69\x00\x67\x00\x61\x00\x0a\x00\x6e\x00\x72\x00\x6e\x00\x0a\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\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\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\x05\x00\x30\x00\x31\x00\x0a\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x30\x00\x31\x00\x23\x00\x09\x00\x2d\x00\x0b\x00\x0c\x00\x0d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x0a\x00\x20\x00\x24\x00\x0a\x00\x23\x00\x0a\x00\x0a\x00\x0a\x00\x2a\x00\x0a\x00\x20\x00\x05\x00\x0a\x00\x2d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x6c\x00\x0a\x00\x7c\x00\x2d\x00\x0a\x00\x23\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x0a\x00\x7c\x00\x20\x00\x05\x00\xff\xff\x23\x00\x23\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x2d\x00\x2d\x00\x2d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x05\x00\x23\x00\x2d\x00\x5e\x00\x09\x00\x23\x00\x0b\x00\x0c\x00\x0d\x00\x20\x00\x23\x00\x7d\x00\x23\x00\x23\x00\x2d\x00\x23\x00\x21\x00\x23\x00\x20\x00\x23\x00\x23\x00\x23\x00\x2d\x00\x23\x00\x23\x00\xff\xff\xff\xff\x20\x00\x30\x00\x31\x00\x05\x00\x2d\x00\xff\xff\x7c\x00\x09\x00\x7b\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\x2d\x00\x2b\x00\xff\xff\x2d\x00\x7b\x00\x23\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x05\x00\x20\x00\x30\x00\x31\x00\x09\x00\x05\x00\x0b\x00\x0c\x00\x0d\x00\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2d\x00\xff\xff\x7b\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\x22\x00\x05\x00\xff\xff\x20\x00\xff\xff\x09\x00\x6c\x00\x0b\x00\x0c\x00\x0d\x00\x70\x00\x2d\x00\x05\x00\xff\xff\x7c\x00\x7b\x00\x2d\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\x7b\x00\x7c\x00\xff\xff\xff\xff\x20\x00\xff\xff\x05\x00\xff\xff\xff\xff\x7b\x00\x09\x00\xff\xff\x0b\x00\x0c\x00\x0d\x00\x20\x00\xff\xff\x2d\x00\x23\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x20\x00\x05\x00\x22\x00\xff\xff\xff\xff\x09\x00\x7b\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\x2d\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\x20\x00\x05\x00\x20\x00\x23\x00\x24\x00\x23\x00\x7b\x00\x0b\x00\x0c\x00\x0d\x00\x2a\x00\x7b\x00\x2b\x00\xff\xff\x2d\x00\x2d\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x20\x00\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\x05\x00\xff\xff\x7b\x00\xff\xff\x09\x00\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x20\x00\x5e\x00\xff\xff\x23\x00\x7b\x00\xff\xff\xff\xff\xff\xff\x28\x00\x29\x00\xff\xff\xff\xff\x2c\x00\x2d\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\xff\xff\x3b\x00\xff\xff\xff\xff\xff\xff\x7c\x00\x7b\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\xff\xff\x5d\x00\xff\xff\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\xff\xff\x7d\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2b\x00\xff\xff\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x20\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\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x2b\x00\xff\xff\x2d\x00\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\x20\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\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\xff\xff\x23\x00\xff\xff\xff\xff\xff\xff\x05\x00\x20\x00\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x20\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\x20\x00\xff\xff\xff\xff\x23\x00\x24\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\x5e\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x05\x00\xff\xff\xff\xff\x7c\x00\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\xff\xff\xff\xff\x23\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x01\x00\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x23\x00\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\xff\xff\x23\x00\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x01\x00\x02\x00\xff\xff\x04\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\x5c\x00\xff\xff\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x23\x00\x7c\x00\xff\xff\x7e\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\x2e\x00\x0a\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\x24\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\x5e\x00\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7c\x00\x7c\x00\x01\x00\x02\x00\x03\x00\x23\x00\xff\xff\xff\xff\x07\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\x5e\x00\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7c\x00\x7c\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\x00\xff\xff\x0a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x24\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\x2a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\x5e\x00\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7c\x00\x7c\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\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\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\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\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\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\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\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\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\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\x04\x00\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x45\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\x04\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x65\x00\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x04\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\x3a\x00\x7e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\x04\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\x3a\x00\x7e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\x20\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x7c\x00\x3a\x00\x7e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x01\x00\x02\x00\x03\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x45\x00\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x65\x00\x45\x00\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x65\x00\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x20\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x20\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\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\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\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\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\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x20\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\x04\x00\xff\xff\x06\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\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\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\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\x01\x00\x02\x00\x03\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x20\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\x05\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\x0b\x00\x0c\x00\x0d\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\x20\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x04\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\x01\x00\x02\x00\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\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\x3a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x23\x00\xff\xff\xff\xff\xff\xff\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x01\x00\x02\x00\x03\x00\xff\xff\xff\xff\xff\xff\x07\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\x27\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\x47\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4c\x00\x4d\x00\x4e\x00\x4f\x00\x50\x00\x51\x00\x52\x00\x53\x00\x54\x00\x55\x00\x56\x00\x57\x00\x58\x00\x59\x00\x5a\x00\xff\xff\xff\xff\xff\xff\x04\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x04\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\x3a\x00\x5e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\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\x7c\x00\xff\xff\x7e\x00\x5c\x00\xff\xff\x5e\x00\xff\xff\x04\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\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\x04\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x04\x00\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\x3a\x00\x5e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\x29\x00\x2a\x00\x2b\x00\x04\x00\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\xff\xff\x7e\x00\x5c\x00\x3a\x00\x5e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\x7c\x00\x7d\x00\x7e\x00\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x04\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\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\x5d\x00\x5e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\x02\x00\xff\xff\x04\x00\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7c\x00\x3a\x00\x7e\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\x29\x00\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\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\x7c\x00\xff\xff\x7e\x00\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x02\x00\x7c\x00\x04\x00\x7e\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\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\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\x5c\x00\xff\xff\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x02\x00\x7c\x00\x04\x00\x7e\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\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\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\x5c\x00\xff\xff\x5e\x00\x5f\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x02\x00\x7c\x00\x04\x00\x7e\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\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\x28\x00\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\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\x5c\x00\xff\xff\x5e\x00\x5f\x00\x04\x00\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x67\x00\x68\x00\x69\x00\x6a\x00\x6b\x00\x6c\x00\x6d\x00\x6e\x00\x6f\x00\x70\x00\x71\x00\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\xff\xff\x7c\x00\x21\x00\x7e\x00\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\x04\x00\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x21\x00\xff\xff\x23\x00\x24\x00\x25\x00\x26\x00\xff\xff\xff\xff\xff\xff\x2a\x00\x2b\x00\xff\xff\x2d\x00\x2e\x00\x2f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x23\x00\x5c\x00\x5d\x00\x5e\x00\x3a\x00\xff\xff\x3c\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x42\x00\xff\xff\x7c\x00\x45\x00\x7e\x00\xff\xff\xff\xff\x5c\x00\xff\xff\x5e\x00\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\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\x7c\x00\xff\xff\x7e\x00\x23\x00\xff\xff\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x78\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\x23\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\x2e\x00\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x42\x00\xff\xff\xff\xff\x45\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\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\xff\xff\xff\xff\xff\xff\x23\x00\xff\xff\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x2e\x00\x78\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x36\x00\x37\x00\x38\x00\x39\x00\xff\xff\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\x41\x00\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\xff\xff\xff\xff\x70\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x50\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\x61\x00\x62\x00\x63\x00\x64\x00\x65\x00\x66\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x70\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#--alex_deflt :: AlexAddr-alex_deflt = AlexA#-  "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x76\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x48\x00\x49\x00\xff\xff\x76\x00\xff\xff\x76\x00\xff\xff\xff\xff\xff\xff\x76\x00\x52\x00\x53\x00\x54\x00\x55\x00\x54\x00\x57\x00\x57\x00\x53\x00\x53\x00\x57\x00\x53\x00\x57\x00\x53\x00\x52\x00\x52\x00\x52\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\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\x76\x00\x76\x00\x76\x00\x76\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff"#--alex_accept = listArray (0 :: Int, 223)-  [ AlexAccNone-  , AlexAcc 172-  , AlexAccNone-  , AlexAcc 171-  , AlexAcc 170-  , AlexAcc 169-  , AlexAcc 168-  , AlexAccNone-  , AlexAccNone-  , AlexAcc 167-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccNone-  , AlexAccSkip-  , AlexAccSkip-  , AlexAcc 166-  , AlexAcc 165-  , AlexAccPred 164 ( isNormalComment )(AlexAccNone)-  , AlexAccPred 163 ( isNormalComment )(AlexAccNone)-  , AlexAccPred 162 ( isNormalComment )(AlexAccNone)-  , AlexAccPred 161 ( isNormalComment )(AlexAcc 160)-  , AlexAcc 159-  , AlexAcc 158-  , AlexAccPred 157 ( ifExtension (not . haddockEnabled) )(AlexAccNone)-  , AlexAccPred 156 ( ifExtension (not . haddockEnabled) )(AlexAcc 155)-  , AlexAccPred 154 ( ifExtension (not . haddockEnabled) )(AlexAccPred 153 ( ifExtension haddockEnabled )(AlexAccNone))-  , AlexAcc 152-  , AlexAccPred 151 ( atEOL )(AlexAccNone)-  , AlexAccPred 150 ( atEOL )(AlexAccNone)-  , AlexAccPred 149 ( atEOL )(AlexAccNone)-  , AlexAccPred 148 ( atEOL )(AlexAcc 147)-  , AlexAccPred 146 ( atEOL )(AlexAcc 145)-  , AlexAccPred 144 ( atEOL )(AlexAcc 143)-  , AlexAccPred 142 ( atEOL )(AlexAcc 141)-  , AlexAccPred 140 ( atEOL )(AlexAccNone)-  , AlexAccPred 139 ( atEOL )(AlexAccNone)-  , AlexAccPred 138 ( atEOL )(AlexAcc 137)-  , AlexAccSkip-  , AlexAccPred 136 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 135 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False) `alexAndPred`  followedByDigit )(AlexAccNone)-  , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccSkipPred (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 134 ( notFollowedBy '-' )(AlexAccNone)-  , AlexAccSkip-  , AlexAccPred 133 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 132 (alexPrevCharMatches(\c -> c >= '\n' && c <= '\n' || False))(AlexAccNone)-  , AlexAccPred 131 ( notFollowedBySymbol )(AlexAccNone)-  , AlexAcc 130-  , AlexAccPred 129 ( known_pragma linePrags )(AlexAccNone)-  , AlexAccPred 128 ( known_pragma linePrags )(AlexAcc 127)-  , AlexAccPred 126 ( known_pragma linePrags )(AlexAccPred 125 ( known_pragma oneWordPrags )(AlexAccPred 124 ( known_pragma ignoredPrags )(AlexAccPred 123 ( known_pragma fileHeaderPrags )(AlexAccNone))))-  , AlexAccPred 122 ( known_pragma linePrags )(AlexAccPred 121 ( known_pragma oneWordPrags )(AlexAccPred 120 ( known_pragma ignoredPrags )(AlexAccPred 119 ( known_pragma fileHeaderPrags )(AlexAccNone))))-  , AlexAcc 118-  , AlexAcc 117-  , AlexAcc 116-  , AlexAcc 115-  , AlexAcc 114-  , AlexAcc 113-  , AlexAcc 112-  , AlexAcc 111-  , AlexAcc 110-  , AlexAcc 109-  , AlexAccPred 108 ( known_pragma twoWordPrags )(AlexAccNone)-  , AlexAcc 107-  , AlexAcc 106-  , AlexAcc 105-  , AlexAccPred 104 ( ifExtension haddockEnabled )(AlexAccNone)-  , AlexAccPred 103 ( ifExtension parrEnabled )(AlexAccNone)-  , AlexAccPred 102 ( ifExtension parrEnabled )(AlexAccNone)-  , AlexAccPred 101 ( ifExtension thQuotesEnabled )(AlexAccNone)-  , AlexAccPred 100 ( ifExtension thQuotesEnabled )(AlexAccNone)-  , AlexAccPred 99 ( ifExtension thQuotesEnabled )(AlexAccPred 98 ( ifExtension qqEnabled )(AlexAccNone))-  , AlexAccPred 97 ( ifExtension thQuotesEnabled )(AlexAccNone)-  , AlexAccPred 96 ( ifExtension thQuotesEnabled )(AlexAccPred 95 ( ifExtension qqEnabled )(AlexAccNone))-  , AlexAccPred 94 ( ifExtension thQuotesEnabled )(AlexAccPred 93 ( ifExtension qqEnabled )(AlexAccNone))-  , AlexAccPred 92 ( ifExtension thQuotesEnabled )(AlexAccPred 91 ( ifExtension qqEnabled )(AlexAccNone))-  , AlexAccPred 90 ( ifExtension thQuotesEnabled )(AlexAccNone)-  , AlexAccPred 89 ( ifExtension thQuotesEnabled )(AlexAccNone)-  , AlexAccPred 88 ( ifExtension thEnabled )(AlexAccNone)-  , AlexAccPred 87 ( ifExtension thEnabled )(AlexAccNone)-  , AlexAccPred 86 ( ifExtension thEnabled )(AlexAccNone)-  , AlexAccPred 85 ( ifExtension thEnabled )(AlexAccNone)-  , AlexAccPred 84 ( ifExtension qqEnabled )(AlexAccNone)-  , AlexAccPred 83 ( ifExtension qqEnabled )(AlexAccNone)-  , AlexAccPred 82 ( ifCurrentChar '⟦' `alexAndPred`-        ifExtension (\i -> unicodeSyntaxEnabled i && thQuotesEnabled i) )(AlexAccPred 81 ( ifCurrentChar '⟧' `alexAndPred`-        ifExtension (\i -> unicodeSyntaxEnabled i && thQuotesEnabled i) )(AlexAccPred 80 ( ifCurrentChar '⦇' `alexAndPred`-        ifExtension (\i -> unicodeSyntaxEnabled i && arrowsEnabled i) )(AlexAccPred 79 ( ifCurrentChar '⦈' `alexAndPred`-        ifExtension (\i -> unicodeSyntaxEnabled i && arrowsEnabled i) )(AlexAccNone))))-  , AlexAccPred 78 (alexPrevCharMatches(\c -> True && c < '\SOH' || c > '\ETX' && c < '\a' || c > '\a' && c < '\n' || c > '\n' && c < '\'' || c > '\'' && c < ')' || c > ')' && c < '0' || c > '9' && c < 'A' || c > 'Z' && c < '_' || c > '_' && c < 'a' || c > 'z' && True || False) `alexAndPred`  ifExtension typeApplicationEnabled `alexAndPred` notFollowedBySymbol )(AlexAcc 77)-  , AlexAccPred 76 ( ifExtension arrowsEnabled `alexAndPred` notFollowedBySymbol )(AlexAccNone)-  , AlexAccPred 75 ( ifExtension arrowsEnabled )(AlexAccNone)-  , AlexAccPred 74 ( ifExtension ipEnabled )(AlexAccNone)-  , AlexAccPred 73 ( ifExtension overloadedLabelsEnabled )(AlexAccNone)-  , AlexAccPred 72 ( orExtensions unboxedTuplesEnabled unboxedSumsEnabled )(AlexAccNone)-  , AlexAccPred 71 ( orExtensions unboxedTuplesEnabled unboxedSumsEnabled )(AlexAccNone)-  , AlexAcc 70-  , AlexAcc 69-  , AlexAcc 68-  , AlexAcc 67-  , AlexAcc 66-  , AlexAcc 65-  , AlexAcc 64-  , AlexAcc 63-  , AlexAcc 62-  , AlexAcc 61-  , AlexAcc 60-  , AlexAcc 59-  , AlexAcc 58-  , AlexAcc 57-  , AlexAcc 56-  , AlexAcc 55-  , AlexAcc 54-  , AlexAcc 53-  , AlexAcc 52-  , AlexAcc 51-  , AlexAccPred 50 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 49 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 48 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 47 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAcc 46-  , AlexAcc 45-  , AlexAcc 44-  , AlexAcc 43-  , AlexAcc 42-  , AlexAcc 41-  , AlexAcc 40-  , AlexAcc 39-  , AlexAcc 38-  , AlexAcc 37-  , AlexAcc 36-  , AlexAcc 35-  , AlexAcc 34-  , AlexAcc 33-  , AlexAcc 32-  , AlexAccPred 31 ( ifExtension binaryLiteralsEnabled )(AlexAccNone)-  , AlexAcc 30-  , AlexAcc 29-  , AlexAccPred 28 ( ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 27 ( ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 26 ( ifExtension negativeLiteralsEnabled `alexAndPred`-                                   ifExtension binaryLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 25 ( ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 24 ( ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAcc 23-  , AlexAcc 22-  , AlexAccPred 21 ( ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 20 ( ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 19 ( ifExtension hexFloatLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 18 ( ifExtension hexFloatLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 17 ( ifExtension hexFloatLiteralsEnabled `alexAndPred`-                                    ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 16 ( ifExtension hexFloatLiteralsEnabled `alexAndPred`-                                    ifExtension negativeLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 15 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 14 ( ifExtension magicHashEnabled `alexAndPred`-                                      ifExtension binaryLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 13 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 12 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 11 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 10 ( ifExtension magicHashEnabled `alexAndPred`-                                      ifExtension binaryLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 9 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 8 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 7 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 6 ( ifExtension magicHashEnabled `alexAndPred`-                                         ifExtension binaryLiteralsEnabled )(AlexAccNone)-  , AlexAccPred 5 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 4 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 3 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAccPred 2 ( ifExtension magicHashEnabled )(AlexAccNone)-  , AlexAcc 1-  , AlexAcc 0-  ]--alex_actions = array (0 :: Int, 173)-  [ (172,alex_action_14)-  , (171,alex_action_20)-  , (170,alex_action_21)-  , (169,alex_action_19)-  , (168,alex_action_22)-  , (167,alex_action_27)-  , (166,alex_action_1)-  , (165,alex_action_1)-  , (164,alex_action_2)-  , (163,alex_action_2)-  , (162,alex_action_2)-  , (161,alex_action_2)-  , (160,alex_action_27)-  , (159,alex_action_3)-  , (158,alex_action_4)-  , (157,alex_action_5)-  , (156,alex_action_5)-  , (155,alex_action_27)-  , (154,alex_action_5)-  , (153,alex_action_39)-  , (152,alex_action_6)-  , (151,alex_action_7)-  , (150,alex_action_7)-  , (149,alex_action_7)-  , (148,alex_action_7)-  , (147,alex_action_27)-  , (146,alex_action_7)-  , (145,alex_action_27)-  , (144,alex_action_7)-  , (143,alex_action_88)-  , (142,alex_action_7)-  , (141,alex_action_88)-  , (140,alex_action_8)-  , (139,alex_action_8)-  , (138,alex_action_8)-  , (137,alex_action_27)-  , (136,alex_action_10)-  , (135,alex_action_11)-  , (134,alex_action_15)-  , (133,alex_action_17)-  , (132,alex_action_17)-  , (131,alex_action_18)-  , (130,alex_action_23)-  , (129,alex_action_24)-  , (128,alex_action_24)-  , (127,alex_action_27)-  , (126,alex_action_24)-  , (125,alex_action_33)-  , (124,alex_action_34)-  , (123,alex_action_36)-  , (122,alex_action_24)-  , (121,alex_action_33)-  , (120,alex_action_34)-  , (119,alex_action_37)-  , (118,alex_action_25)-  , (117,alex_action_26)-  , (116,alex_action_27)-  , (115,alex_action_27)-  , (114,alex_action_27)-  , (113,alex_action_27)-  , (112,alex_action_28)-  , (111,alex_action_29)-  , (110,alex_action_30)-  , (109,alex_action_31)-  , (108,alex_action_32)-  , (107,alex_action_35)-  , (106,alex_action_38)-  , (105,alex_action_38)-  , (104,alex_action_40)-  , (103,alex_action_41)-  , (102,alex_action_42)-  , (101,alex_action_43)-  , (100,alex_action_44)-  , (99,alex_action_45)-  , (98,alex_action_56)-  , (97,alex_action_46)-  , (96,alex_action_47)-  , (95,alex_action_56)-  , (94,alex_action_48)-  , (93,alex_action_56)-  , (92,alex_action_49)-  , (91,alex_action_56)-  , (90,alex_action_50)-  , (89,alex_action_51)-  , (88,alex_action_52)-  , (87,alex_action_53)-  , (86,alex_action_54)-  , (85,alex_action_55)-  , (84,alex_action_56)-  , (83,alex_action_57)-  , (82,alex_action_58)-  , (81,alex_action_59)-  , (80,alex_action_63)-  , (79,alex_action_64)-  , (78,alex_action_60)-  , (77,alex_action_88)-  , (76,alex_action_61)-  , (75,alex_action_62)-  , (74,alex_action_65)-  , (73,alex_action_66)-  , (72,alex_action_67)-  , (71,alex_action_68)-  , (70,alex_action_69)-  , (69,alex_action_69)-  , (68,alex_action_70)-  , (67,alex_action_71)-  , (66,alex_action_71)-  , (65,alex_action_72)-  , (64,alex_action_73)-  , (63,alex_action_74)-  , (62,alex_action_75)-  , (61,alex_action_76)-  , (60,alex_action_76)-  , (59,alex_action_77)-  , (58,alex_action_78)-  , (57,alex_action_78)-  , (56,alex_action_79)-  , (55,alex_action_79)-  , (54,alex_action_80)-  , (53,alex_action_80)-  , (52,alex_action_81)-  , (51,alex_action_81)-  , (50,alex_action_82)-  , (49,alex_action_83)-  , (48,alex_action_84)-  , (47,alex_action_85)-  , (46,alex_action_86)-  , (45,alex_action_87)-  , (44,alex_action_88)-  , (43,alex_action_88)-  , (42,alex_action_88)-  , (41,alex_action_88)-  , (40,alex_action_88)-  , (39,alex_action_88)-  , (38,alex_action_88)-  , (37,alex_action_88)-  , (36,alex_action_88)-  , (35,alex_action_89)-  , (34,alex_action_89)-  , (33,alex_action_90)-  , (32,alex_action_90)-  , (31,alex_action_91)-  , (30,alex_action_92)-  , (29,alex_action_93)-  , (28,alex_action_94)-  , (27,alex_action_94)-  , (26,alex_action_95)-  , (25,alex_action_96)-  , (24,alex_action_97)-  , (23,alex_action_98)-  , (22,alex_action_98)-  , (21,alex_action_99)-  , (20,alex_action_99)-  , (19,alex_action_100)-  , (18,alex_action_100)-  , (17,alex_action_101)-  , (16,alex_action_101)-  , (15,alex_action_102)-  , (14,alex_action_103)-  , (13,alex_action_104)-  , (12,alex_action_105)-  , (11,alex_action_106)-  , (10,alex_action_107)-  , (9,alex_action_108)-  , (8,alex_action_109)-  , (7,alex_action_110)-  , (6,alex_action_111)-  , (5,alex_action_112)-  , (4,alex_action_113)-  , (3,alex_action_114)-  , (2,alex_action_115)-  , (1,alex_action_116)-  , (0,alex_action_117)-  ]--{-# LINE 574 "compiler/parser/Lexer.x" #-}----- -------------------------------------------------------------------------------- The token type--data Token-  = ITas                        -- Haskell keywords-  | ITcase-  | ITclass-  | ITdata-  | ITdefault-  | ITderiving-  | ITdo-  | ITelse-  | IThiding-  | ITforeign-  | ITif-  | ITimport-  | ITin-  | ITinfix-  | ITinfixl-  | ITinfixr-  | ITinstance-  | ITlet-  | ITmodule-  | ITnewtype-  | ITof-  | ITqualified-  | ITthen-  | ITtype-  | ITwhere--  | ITforall            IsUnicodeSyntax -- GHC extension keywords-  | ITexport-  | ITlabel-  | ITdynamic-  | ITsafe-  | ITinterruptible-  | ITunsafe-  | ITstdcallconv-  | ITccallconv-  | ITcapiconv-  | ITprimcallconv-  | ITjavascriptcallconv-  | ITmdo-  | ITfamily-  | ITrole-  | ITgroup-  | ITby-  | ITusing-  | ITpattern-  | ITstatic-  | ITstock-  | ITanyclass--  -- Backpack tokens-  | ITunit-  | ITsignature-  | ITdependency-  | ITrequires--  -- Pragmas, see  note [Pragma source text] in BasicTypes-  | ITinline_prag       SourceText InlineSpec RuleMatchInfo-  | ITspec_prag         SourceText                -- SPECIALISE-  | ITspec_inline_prag  SourceText Bool    -- SPECIALISE INLINE (or NOINLINE)-  | ITsource_prag       SourceText-  | ITrules_prag        SourceText-  | ITwarning_prag      SourceText-  | ITdeprecated_prag   SourceText-  | ITline_prag         SourceText  -- not usually produced, see 'use_pos_prags'-  | ITcolumn_prag       SourceText  -- not usually produced, see 'use_pos_prags'-  | ITscc_prag          SourceText-  | ITgenerated_prag    SourceText-  | ITcore_prag         SourceText         -- hdaume: core annotations-  | ITunpack_prag       SourceText-  | ITnounpack_prag     SourceText-  | ITann_prag          SourceText-  | ITcomplete_prag     SourceText-  | ITclose_prag-  | IToptions_prag String-  | ITinclude_prag String-  | ITlanguage_prag-  | ITvect_prag         SourceText-  | ITvect_scalar_prag  SourceText-  | ITnovect_prag       SourceText-  | ITminimal_prag      SourceText-  | IToverlappable_prag SourceText  -- instance overlap mode-  | IToverlapping_prag  SourceText  -- instance overlap mode-  | IToverlaps_prag     SourceText  -- instance overlap mode-  | ITincoherent_prag   SourceText  -- instance overlap mode-  | ITctype             SourceText--  | ITdotdot                    -- reserved symbols-  | ITcolon-  | ITdcolon            IsUnicodeSyntax-  | ITequal-  | ITlam-  | ITlcase-  | ITvbar-  | ITlarrow            IsUnicodeSyntax-  | ITrarrow            IsUnicodeSyntax-  | ITat-  | ITtilde-  | ITtildehsh-  | ITdarrow            IsUnicodeSyntax-  | ITminus-  | ITbang-  | ITdot--  | ITbiglam                    -- GHC-extension symbols--  | ITocurly                    -- special symbols-  | ITccurly-  | ITvocurly-  | ITvccurly-  | ITobrack-  | ITopabrack                  -- [:, for parallel arrays with -XParallelArrays-  | ITcpabrack                  -- :], for parallel arrays with -XParallelArrays-  | ITcbrack-  | IToparen-  | ITcparen-  | IToubxparen-  | ITcubxparen-  | ITsemi-  | ITcomma-  | ITunderscore-  | ITbackquote-  | ITsimpleQuote               --  '--  | ITvarid   FastString        -- identifiers-  | ITconid   FastString-  | ITvarsym  FastString-  | ITconsym  FastString-  | ITqvarid  (FastString,FastString)-  | ITqconid  (FastString,FastString)-  | ITqvarsym (FastString,FastString)-  | ITqconsym (FastString,FastString)--  | ITdupipvarid   FastString   -- GHC extension: implicit param: ?x-  | ITlabelvarid   FastString   -- Overloaded label: #x--  | ITchar     SourceText Char       -- Note [Literal source text] in BasicTypes-  | ITstring   SourceText FastString -- Note [Literal source text] in BasicTypes-  | ITinteger  IntegralLit           -- Note [Literal source text] in BasicTypes-  | ITrational FractionalLit--  | ITprimchar   SourceText Char     -- Note [Literal source text] in BasicTypes-  | ITprimstring SourceText ByteString -- Note [Literal source text] @BasicTypes-  | ITprimint    SourceText Integer  -- Note [Literal source text] in BasicTypes-  | ITprimword   SourceText Integer  -- Note [Literal source text] in BasicTypes-  | ITprimfloat  FractionalLit-  | ITprimdouble FractionalLit--  -- Template Haskell extension tokens-  | ITopenExpQuote HasE IsUnicodeSyntax --  [| or [e|-  | ITopenPatQuote                      --  [p|-  | ITopenDecQuote                      --  [d|-  | ITopenTypQuote                      --  [t|-  | ITcloseQuote IsUnicodeSyntax        --  |]-  | ITopenTExpQuote HasE                --  [|| or [e||-  | ITcloseTExpQuote                    --  ||]-  | ITidEscape   FastString             --  $x-  | ITparenEscape                       --  $(-  | ITidTyEscape   FastString           --  $$x-  | ITparenTyEscape                     --  $$(-  | ITtyQuote                           --  ''-  | ITquasiQuote (FastString,FastString,RealSrcSpan)-    -- ITquasiQuote(quoter, quote, loc)-    -- represents a quasi-quote of the form-    -- [quoter| quote |]-  | ITqQuasiQuote (FastString,FastString,FastString,RealSrcSpan)-    -- ITqQuasiQuote(Qual, quoter, quote, loc)-    -- represents a qualified quasi-quote of the form-    -- [Qual.quoter| quote |]--  -- Arrow notation extension-  | ITproc-  | ITrec-  | IToparenbar  IsUnicodeSyntax --  (|-  | ITcparenbar  IsUnicodeSyntax --  |)-  | ITlarrowtail IsUnicodeSyntax --  -<-  | ITrarrowtail IsUnicodeSyntax --  >--  | ITLarrowtail IsUnicodeSyntax --  -<<-  | ITRarrowtail IsUnicodeSyntax --  >>---  -- type application '@' (lexed differently than as-pattern '@',-  -- due to checking for preceding whitespace)-  | ITtypeApp---  | ITunknown String            -- Used when the lexer can't make sense of it-  | ITeof                       -- end of file token--  -- Documentation annotations-  | ITdocCommentNext  String     -- something beginning '-- |'-  | ITdocCommentPrev  String     -- something beginning '-- ^'-  | ITdocCommentNamed String     -- something beginning '-- $'-  | ITdocSection      Int String -- a section heading-  | ITdocOptions      String     -- doc options (prune, ignore-exports, etc)-  | ITlineComment     String     -- comment starting by "--"-  | ITblockComment    String     -- comment in {- -}--  deriving Show--instance Outputable Token where-  ppr x = text (show x)----- the bitmap provided as the third component indicates whether the--- corresponding extension keyword is valid under the extension options--- provided to the compiler; if the extension corresponding to *any* of the--- bits set in the bitmap is enabled, the keyword is valid (this setup--- facilitates using a keyword in two different extensions that can be--- activated independently)----reservedWordsFM :: UniqFM (Token, ExtsBitmap)-reservedWordsFM = listToUFM $-    map (\(x, y, z) -> (mkFastString x, (y, z)))-        [( "_",              ITunderscore,    0 ),-         ( "as",             ITas,            0 ),-         ( "case",           ITcase,          0 ),-         ( "class",          ITclass,         0 ),-         ( "data",           ITdata,          0 ),-         ( "default",        ITdefault,       0 ),-         ( "deriving",       ITderiving,      0 ),-         ( "do",             ITdo,            0 ),-         ( "else",           ITelse,          0 ),-         ( "hiding",         IThiding,        0 ),-         ( "if",             ITif,            0 ),-         ( "import",         ITimport,        0 ),-         ( "in",             ITin,            0 ),-         ( "infix",          ITinfix,         0 ),-         ( "infixl",         ITinfixl,        0 ),-         ( "infixr",         ITinfixr,        0 ),-         ( "instance",       ITinstance,      0 ),-         ( "let",            ITlet,           0 ),-         ( "module",         ITmodule,        0 ),-         ( "newtype",        ITnewtype,       0 ),-         ( "of",             ITof,            0 ),-         ( "qualified",      ITqualified,     0 ),-         ( "then",           ITthen,          0 ),-         ( "type",           ITtype,          0 ),-         ( "where",          ITwhere,         0 ),--         ( "forall",         ITforall NormalSyntax,-                                              xbit ExplicitForallBit .|.-                                              xbit InRulePragBit),-         ( "mdo",            ITmdo,           xbit RecursiveDoBit),-             -- See Note [Lexing type pseudo-keywords]-         ( "family",         ITfamily,        0 ),-         ( "role",           ITrole,          0 ),-         ( "pattern",        ITpattern,       xbit PatternSynonymsBit),-         ( "static",         ITstatic,        0 ),-         ( "stock",          ITstock,         0 ),-         ( "anyclass",       ITanyclass,      0 ),-         ( "group",          ITgroup,         xbit TransformComprehensionsBit),-         ( "by",             ITby,            xbit TransformComprehensionsBit),-         ( "using",          ITusing,         xbit TransformComprehensionsBit),--         ( "foreign",        ITforeign,       xbit FfiBit),-         ( "export",         ITexport,        xbit FfiBit),-         ( "label",          ITlabel,         xbit FfiBit),-         ( "dynamic",        ITdynamic,       xbit FfiBit),-         ( "safe",           ITsafe,          xbit FfiBit .|.-                                              xbit SafeHaskellBit),-         ( "interruptible",  ITinterruptible, xbit InterruptibleFfiBit),-         ( "unsafe",         ITunsafe,        xbit FfiBit),-         ( "stdcall",        ITstdcallconv,   xbit FfiBit),-         ( "ccall",          ITccallconv,     xbit FfiBit),-         ( "capi",           ITcapiconv,      xbit CApiFfiBit),-         ( "prim",           ITprimcallconv,  xbit FfiBit),-         ( "javascript",     ITjavascriptcallconv, xbit FfiBit),--         ( "unit",           ITunit,          0 ),-         ( "dependency",     ITdependency,       0 ),-         ( "signature",      ITsignature,     0 ),--         ( "rec",            ITrec,           xbit ArrowsBit .|.-                                              xbit RecursiveDoBit),-         ( "proc",           ITproc,          xbit ArrowsBit)-     ]--{------------------------------------Note [Lexing type pseudo-keywords]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--One might think that we wish to treat 'family' and 'role' as regular old-varids whenever -XTypeFamilies and -XRoleAnnotations are off, respectively.-But, there is no need to do so. These pseudo-keywords are not stolen syntax:-they are only used after the keyword 'type' at the top-level, where varids are-not allowed. Furthermore, checks further downstream (TcTyClsDecls) ensure that-type families and role annotations are never declared without their extensions-on. In fact, by unconditionally lexing these pseudo-keywords as special, we-can get better error messages.--Also, note that these are included in the `varid` production in the parser ---a key detail to make all this work.--------------------------------------}--reservedSymsFM :: UniqFM (Token, ExtsBitmap -> Bool)-reservedSymsFM = listToUFM $-    map (\ (x,y,z) -> (mkFastString x,(y,z)))-      [ ("..",  ITdotdot,              always)-        -- (:) is a reserved op, meaning only list cons-       ,(":",   ITcolon,               always)-       ,("::",  ITdcolon NormalSyntax, always)-       ,("=",   ITequal,               always)-       ,("\\",  ITlam,                 always)-       ,("|",   ITvbar,                always)-       ,("<-",  ITlarrow NormalSyntax, always)-       ,("->",  ITrarrow NormalSyntax, always)-       ,("@",   ITat,                  always)-       ,("~",   ITtilde,               always)-       ,("~#",  ITtildehsh,            magicHashEnabled)-       ,("=>",  ITdarrow NormalSyntax, always)-       ,("-",   ITminus,               always)-       ,("!",   ITbang,                always)--        -- For 'forall a . t'-       ,(".", ITdot,  always) -- \i -> explicitForallEnabled i || inRulePrag i)--       ,("-<",  ITlarrowtail NormalSyntax, arrowsEnabled)-       ,(">-",  ITrarrowtail NormalSyntax, arrowsEnabled)-       ,("-<<", ITLarrowtail NormalSyntax, arrowsEnabled)-       ,(">>-", ITRarrowtail NormalSyntax, arrowsEnabled)--       ,("∷",   ITdcolon UnicodeSyntax, unicodeSyntaxEnabled)-       ,("⇒",   ITdarrow UnicodeSyntax, unicodeSyntaxEnabled)-       ,("∀",   ITforall UnicodeSyntax, unicodeSyntaxEnabled)-       ,("→",   ITrarrow UnicodeSyntax, unicodeSyntaxEnabled)-       ,("←",   ITlarrow UnicodeSyntax, unicodeSyntaxEnabled)--       ,("⤙",   ITlarrowtail UnicodeSyntax,-                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)-       ,("⤚",   ITrarrowtail UnicodeSyntax,-                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)-       ,("⤛",   ITLarrowtail UnicodeSyntax,-                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)-       ,("⤜",   ITRarrowtail UnicodeSyntax,-                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)--        -- ToDo: ideally, → and ∷ should be "specials", so that they cannot-        -- form part of a large operator.  This would let us have a better-        -- syntax for kinds: ɑ∷*→* would be a legal kind signature. (maybe).-       ]---- -------------------------------------------------------------------------------- Lexer actions--type Action = RealSrcSpan -> StringBuffer -> Int -> P (RealLocated Token)--special :: Token -> Action-special tok span _buf _len = return (L span tok)--token, layout_token :: Token -> Action-token t span _buf _len = return (L span t)-layout_token t span _buf _len = pushLexState layout >> return (L span t)--idtoken :: (StringBuffer -> Int -> Token) -> Action-idtoken f span buf len = return (L span $! (f buf len))--skip_one_varid :: (FastString -> Token) -> Action-skip_one_varid f span buf len-  = return (L span $! f (lexemeToFastString (stepOn buf) (len-1)))--skip_two_varid :: (FastString -> Token) -> Action-skip_two_varid f span buf len-  = return (L span $! f (lexemeToFastString (stepOn (stepOn buf)) (len-2)))--strtoken :: (String -> Token) -> Action-strtoken f span buf len =-  return (L span $! (f $! lexemeToString buf len))--init_strtoken :: Int -> (String -> Token) -> Action--- like strtoken, but drops the last N character(s)-init_strtoken drop f span buf len =-  return (L span $! (f $! lexemeToString buf (len-drop)))--begin :: Int -> Action-begin code _span _str _len = do pushLexState code; lexToken--pop :: Action-pop _span _buf _len = do _ <- popLexState-                         lexToken--hopefully_open_brace :: Action-hopefully_open_brace span buf len- = do relaxed <- extension relaxedLayout-      ctx <- getContext-      (AI l _) <- getInput-      let offset = srcLocCol l-          isOK = relaxed ||-                 case ctx of-                 Layout prev_off _ : _ -> prev_off < offset-                 _                     -> True-      if isOK then pop_and open_brace span buf len-              else failSpanMsgP (RealSrcSpan span) (text "Missing block")--pop_and :: Action -> Action-pop_and act span buf len = do _ <- popLexState-                              act span buf len--{-# INLINE nextCharIs #-}-nextCharIs :: StringBuffer -> (Char -> Bool) -> Bool-nextCharIs buf p = not (atEnd buf) && p (currentChar buf)--{-# INLINE nextCharIsNot #-}-nextCharIsNot :: StringBuffer -> (Char -> Bool) -> Bool-nextCharIsNot buf p = not (nextCharIs buf p)--notFollowedBy :: Char -> AlexAccPred ExtsBitmap-notFollowedBy char _ _ _ (AI _ buf)-  = nextCharIsNot buf (== char)--notFollowedBySymbol :: AlexAccPred ExtsBitmap-notFollowedBySymbol _ _ _ (AI _ buf)-  = nextCharIsNot buf (`elem` "!#$%&*+./<=>?@\\^|-~")--followedByDigit :: AlexAccPred ExtsBitmap-followedByDigit _ _ _ (AI _ buf)-  = afterOptionalSpace buf (\b -> nextCharIs b (`elem` ['0'..'9']))--ifCurrentChar :: Char -> AlexAccPred ExtsBitmap-ifCurrentChar char _ (AI _ buf) _ _-  = nextCharIs buf (== char)---- We must reject doc comments as being ordinary comments everywhere.--- In some cases the doc comment will be selected as the lexeme due to--- maximal munch, but not always, because the nested comment rule is--- valid in all states, but the doc-comment rules are only valid in--- the non-layout states.-isNormalComment :: AlexAccPred ExtsBitmap-isNormalComment bits _ _ (AI _ buf)-  | haddockEnabled bits = notFollowedByDocOrPragma-  | otherwise           = nextCharIsNot buf (== '#')-  where-    notFollowedByDocOrPragma-       = afterOptionalSpace buf (\b -> nextCharIsNot b (`elem` "|^*$#"))--afterOptionalSpace :: StringBuffer -> (StringBuffer -> Bool) -> Bool-afterOptionalSpace buf p-    = if nextCharIs buf (== ' ')-      then p (snd (nextChar buf))-      else p buf--atEOL :: AlexAccPred ExtsBitmap-atEOL _ _ _ (AI _ buf) = atEnd buf || currentChar buf == '\n'--ifExtension :: (ExtsBitmap -> Bool) -> AlexAccPred ExtsBitmap-ifExtension pred bits _ _ _ = pred bits--orExtensions :: (ExtsBitmap -> Bool) -> (ExtsBitmap -> Bool) -> AlexAccPred ExtsBitmap-orExtensions pred1 pred2 bits _ _ _ = pred1 bits || pred2 bits--multiline_doc_comment :: Action-multiline_doc_comment span buf _len = withLexedDocType (worker "")-  where-    worker commentAcc input docType checkNextLine = case alexGetChar' input of-      Just ('\n', input')-        | checkNextLine -> case checkIfCommentLine input' of-          Just input -> worker ('\n':commentAcc) input docType checkNextLine-          Nothing -> docCommentEnd input commentAcc docType buf span-        | otherwise -> docCommentEnd input commentAcc docType buf span-      Just (c, input) -> worker (c:commentAcc) input docType checkNextLine-      Nothing -> docCommentEnd input commentAcc docType buf span--    -- Check if the next line of input belongs to this doc comment as well.-    -- A doc comment continues onto the next line when the following-    -- conditions are met:-    --   * The line starts with "--"-    --   * The line doesn't start with "---".-    --   * The line doesn't start with "-- $", because that would be the-    --     start of a /new/ named haddock chunk (#10398).-    checkIfCommentLine :: AlexInput -> Maybe AlexInput-    checkIfCommentLine input = check (dropNonNewlineSpace input)-      where-        check input = do-          ('-', input) <- alexGetChar' input-          ('-', input) <- alexGetChar' input-          (c, after_c) <- alexGetChar' input-          case c of-            '-' -> Nothing-            ' ' -> case alexGetChar' after_c of-                     Just ('$', _) -> Nothing-                     _ -> Just input-            _   -> Just input--        dropNonNewlineSpace input = case alexGetChar' input of-          Just (c, input')-            | isSpace c && c /= '\n' -> dropNonNewlineSpace input'-            | otherwise -> input-          Nothing -> input--lineCommentToken :: Action-lineCommentToken span buf len = do-  b <- extension rawTokenStreamEnabled-  if b then strtoken ITlineComment span buf len else lexToken--{--  nested comments require traversing by hand, they can't be parsed-  using regular expressions.--}-nested_comment :: P (RealLocated Token) -> Action-nested_comment cont span buf len = do-  input <- getInput-  go (reverse $ lexemeToString buf len) (1::Int) input-  where-    go commentAcc 0 input = do-      setInput input-      b <- extension rawTokenStreamEnabled-      if b-        then docCommentEnd input commentAcc ITblockComment buf span-        else cont-    go commentAcc n input = case alexGetChar' input of-      Nothing -> errBrace input span-      Just ('-',input) -> case alexGetChar' input of-        Nothing  -> errBrace input span-        Just ('\125',input) -> go ('\125':'-':commentAcc) (n-1) input -- '}'-        Just (_,_)          -> go ('-':commentAcc) n input-      Just ('\123',input) -> case alexGetChar' input of  -- '{' char-        Nothing  -> errBrace input span-        Just ('-',input) -> go ('-':'\123':commentAcc) (n+1) input-        Just (_,_)       -> go ('\123':commentAcc) n input-      Just (c,input) -> go (c:commentAcc) n input--nested_doc_comment :: Action-nested_doc_comment span buf _len = withLexedDocType (go "")-  where-    go commentAcc input docType _ = case alexGetChar' input of-      Nothing -> errBrace input span-      Just ('-',input) -> case alexGetChar' input of-        Nothing -> errBrace input span-        Just ('\125',input) ->-          docCommentEnd input commentAcc docType buf span-        Just (_,_) -> go ('-':commentAcc) input docType False-      Just ('\123', input) -> case alexGetChar' input of-        Nothing  -> errBrace input span-        Just ('-',input) -> do-          setInput input-          let cont = do input <- getInput; go commentAcc input docType False-          nested_comment cont span buf _len-        Just (_,_) -> go ('\123':commentAcc) input docType False-      Just (c,input) -> go (c:commentAcc) input docType False--withLexedDocType :: (AlexInput -> (String -> Token) -> Bool -> P (RealLocated Token))-                 -> P (RealLocated Token)-withLexedDocType lexDocComment = do-  input@(AI _ buf) <- getInput-  case prevChar buf ' ' of-    -- The `Bool` argument to lexDocComment signals whether or not the next-    -- line of input might also belong to this doc comment.-    '|' -> lexDocComment input ITdocCommentNext True-    '^' -> lexDocComment input ITdocCommentPrev True-    '$' -> lexDocComment input ITdocCommentNamed True-    '*' -> lexDocSection 1 input-    _ -> panic "withLexedDocType: Bad doc type"- where-    lexDocSection n input = case alexGetChar' input of-      Just ('*', input) -> lexDocSection (n+1) input-      Just (_,   _)     -> lexDocComment input (ITdocSection n) False-      Nothing -> do setInput input; lexToken -- eof reached, lex it normally---- RULES pragmas turn on the forall and '.' keywords, and we turn them--- off again at the end of the pragma.-rulePrag :: Action-rulePrag span buf len = do-  setExts (.|. xbit InRulePragBit)-  let !src = lexemeToString buf len-  return (L span (ITrules_prag (SourceText src)))---- When 'use_pos_prags' is not set, it is expected that we emit a token instead--- of updating the position in 'PState'-linePrag :: Action-linePrag span buf len = do-  ps <- getPState-  if use_pos_prags ps-    then begin line_prag2 span buf len-    else let !src = lexemeToString buf len-         in return (L span (ITline_prag (SourceText src)))---- When 'use_pos_prags' is not set, it is expected that we emit a token instead--- of updating the position in 'PState'-columnPrag :: Action-columnPrag span buf len = do-  ps <- getPState-  let !src = lexemeToString buf len-  if use_pos_prags ps-    then begin column_prag span buf len-    else let !src = lexemeToString buf len-         in return (L span (ITcolumn_prag (SourceText src)))--endPrag :: Action-endPrag span _buf _len = do-  setExts (.&. complement (xbit InRulePragBit))-  return (L span ITclose_prag)---- docCommentEnd----------------------------------------------------------------------------------- This function is quite tricky. We can't just return a new token, we also--- need to update the state of the parser. Why? Because the token is longer--- than what was lexed by Alex, and the lexToken function doesn't know this, so--- it writes the wrong token length to the parser state. This function is--- called afterwards, so it can just update the state.--docCommentEnd :: AlexInput -> String -> (String -> Token) -> StringBuffer ->-                 RealSrcSpan -> P (RealLocated Token)-docCommentEnd input commentAcc docType buf span = do-  setInput input-  let (AI loc nextBuf) = input-      comment = reverse commentAcc-      span' = mkRealSrcSpan (realSrcSpanStart span) loc-      last_len = byteDiff buf nextBuf--  span `seq` setLastToken span' last_len-  return (L span' (docType comment))--errBrace :: AlexInput -> RealSrcSpan -> P a-errBrace (AI end _) span = failLocMsgP (realSrcSpanStart span) end "unterminated `{-'"--open_brace, close_brace :: Action-open_brace span _str _len = do-  ctx <- getContext-  setContext (NoLayout:ctx)-  return (L span ITocurly)-close_brace span _str _len = do-  popContext-  return (L span ITccurly)--qvarid, qconid :: StringBuffer -> Int -> Token-qvarid buf len = ITqvarid $! splitQualName buf len False-qconid buf len = ITqconid $! splitQualName buf len False--splitQualName :: StringBuffer -> Int -> Bool -> (FastString,FastString)--- takes a StringBuffer and a length, and returns the module name--- and identifier parts of a qualified name.  Splits at the *last* dot,--- because of hierarchical module names.-splitQualName orig_buf len parens = split orig_buf orig_buf-  where-    split buf dot_buf-        | orig_buf `byteDiff` buf >= len  = done dot_buf-        | c == '.'                        = found_dot buf'-        | otherwise                       = split buf' dot_buf-      where-       (c,buf') = nextChar buf--    -- careful, we might get names like M....-    -- so, if the character after the dot is not upper-case, this is-    -- the end of the qualifier part.-    found_dot buf -- buf points after the '.'-        | isUpper c    = split buf' buf-        | otherwise    = done buf-      where-       (c,buf') = nextChar buf--    done dot_buf =-        (lexemeToFastString orig_buf (qual_size - 1),-         if parens -- Prelude.(+)-            then lexemeToFastString (stepOn dot_buf) (len - qual_size - 2)-            else lexemeToFastString dot_buf (len - qual_size))-      where-        qual_size = orig_buf `byteDiff` dot_buf--varid :: Action-varid span buf len =-  case lookupUFM reservedWordsFM fs of-    Just (ITcase, _) -> do-      lambdaCase <- extension lambdaCaseEnabled-      keyword <- if lambdaCase-                 then do-                   lastTk <- getLastTk-                   return $ case lastTk of-                     Just ITlam -> ITlcase-                     _          -> ITcase-                 else-                   return ITcase-      maybe_layout keyword-      return $ L span keyword-    Just (ITstatic, _) -> do-      staticPointers <- extension staticPointersEnabled-      if staticPointers-        then return $ L span ITstatic-        else return $ L span $ ITvarid fs-    Just (keyword, 0) -> do-      maybe_layout keyword-      return $ L span keyword-    Just (keyword, exts) -> do-      extsEnabled <- extension $ \i -> exts .&. i /= 0-      if extsEnabled-        then do-          maybe_layout keyword-          return $ L span keyword-        else-          return $ L span $ ITvarid fs-    Nothing ->-      return $ L span $ ITvarid fs-  where-    !fs = lexemeToFastString buf len--conid :: StringBuffer -> Int -> Token-conid buf len = ITconid $! lexemeToFastString buf len--qvarsym, qconsym :: StringBuffer -> Int -> Token-qvarsym buf len = ITqvarsym $! splitQualName buf len False-qconsym buf len = ITqconsym $! splitQualName buf len False--varsym, consym :: Action-varsym = sym ITvarsym-consym = sym ITconsym--sym :: (FastString -> Token) -> Action-sym con span buf len =-  case lookupUFM reservedSymsFM fs of-    Just (keyword, exts) -> do-      extsEnabled <- extension exts-      let !tk | extsEnabled = keyword-              | otherwise   = con fs-      return $ L span tk-    Nothing ->-      return $ L span $! con fs-  where-    !fs = lexemeToFastString buf len---- Variations on the integral numeric literal.-tok_integral :: (SourceText -> Integer -> Token)-             -> (Integer -> Integer)-             -> Int -> Int-             -> (Integer, (Char -> Int))-             -> Action-tok_integral itint transint transbuf translen (radix,char_to_int) span buf len- = return $ L span $ itint (SourceText $ lexemeToString buf len)-       $! transint $ parseUnsignedInteger-       (offsetBytes transbuf buf) (subtract translen len) radix char_to_int--tok_num :: (Integer -> Integer)-                        -> Int -> Int-                        -> (Integer, (Char->Int)) -> Action-tok_num = tok_integral itint-  where-    itint st@(SourceText ('-':str)) val = ITinteger (((IL $! st) $! True)      $! val)-    itint st@(SourceText      str ) val = ITinteger (((IL $! st) $! False)     $! val)-    itint st@(NoSourceText        ) val = ITinteger (((IL $! st) $! (val < 0)) $! val)--tok_primint :: (Integer -> Integer)-            -> Int -> Int-            -> (Integer, (Char->Int)) -> Action-tok_primint = tok_integral ITprimint---tok_primword :: Int -> Int-             -> (Integer, (Char->Int)) -> Action-tok_primword = tok_integral ITprimword positive-positive, negative :: (Integer -> Integer)-positive = id-negative = negate-decimal, octal, hexadecimal :: (Integer, Char -> Int)-decimal = (10,octDecDigit)-binary = (2,octDecDigit)-octal = (8,octDecDigit)-hexadecimal = (16,hexDigit)---- readRational can understand negative rationals, exponents, everything.-tok_float, tok_primfloat, tok_primdouble :: String -> Token-tok_float        str = ITrational   $! readFractionalLit str-tok_hex_float    str = ITrational   $! readHexFractionalLit str-tok_primfloat    str = ITprimfloat  $! readFractionalLit str-tok_primdouble   str = ITprimdouble $! readFractionalLit str--readFractionalLit :: String -> FractionalLit-readFractionalLit str = ((FL $! (SourceText str)) $! is_neg) $! readRational str-                        where is_neg = case str of ('-':_) -> True-                                                   _       -> False-readHexFractionalLit :: String -> FractionalLit-readHexFractionalLit str =-  FL { fl_text  = SourceText str-     , fl_neg   = case str of-                    '-' : _ -> True-                    _       -> False-     , fl_value = readHexRational str-     }---- -------------------------------------------------------------------------------- Layout processing---- we're at the first token on a line, insert layout tokens if necessary-do_bol :: Action-do_bol span _str _len = do-        (pos, gen_semic) <- getOffside-        case pos of-            LT -> do-                --trace "layout: inserting '}'" $ do-                popContext-                -- do NOT pop the lex state, we might have a ';' to insert-                return (L span ITvccurly)-            EQ | gen_semic -> do-                --trace "layout: inserting ';'" $ do-                _ <- popLexState-                return (L span ITsemi)-            _ -> do-                _ <- popLexState-                lexToken---- certain keywords put us in the "layout" state, where we might--- add an opening curly brace.-maybe_layout :: Token -> P ()-maybe_layout t = do -- If the alternative layout rule is enabled then-                    -- we never create an implicit layout context here.-                    -- Layout is handled XXX instead.-                    -- The code for closing implicit contexts, or-                    -- inserting implicit semi-colons, is therefore-                    -- irrelevant as it only applies in an implicit-                    -- context.-                    alr <- extension alternativeLayoutRule-                    unless alr $ f t-    where f ITdo    = pushLexState layout_do-          f ITmdo   = pushLexState layout_do-          f ITof    = pushLexState layout-          f ITlcase = pushLexState layout-          f ITlet   = pushLexState layout-          f ITwhere = pushLexState layout-          f ITrec   = pushLexState layout-          f ITif    = pushLexState layout_if-          f _       = return ()---- Pushing a new implicit layout context.  If the indentation of the--- next token is not greater than the previous layout context, then--- Haskell 98 says that the new layout context should be empty; that is--- the lexer must generate {}.------ We are slightly more lenient than this: when the new context is started--- by a 'do', then we allow the new context to be at the same indentation as--- the previous context.  This is what the 'strict' argument is for.-new_layout_context :: Bool -> Bool -> Token -> Action-new_layout_context strict gen_semic tok span _buf len = do-    _ <- popLexState-    (AI l _) <- getInput-    let offset = srcLocCol l - len-    ctx <- getContext-    nondecreasing <- extension nondecreasingIndentation-    let strict' = strict || not nondecreasing-    case ctx of-        Layout prev_off _ : _  |-           (strict'     && prev_off >= offset  ||-            not strict' && prev_off > offset) -> do-                -- token is indented to the left of the previous context.-                -- we must generate a {} sequence now.-                pushLexState layout_left-                return (L span tok)-        _ -> do setContext (Layout offset gen_semic : ctx)-                return (L span tok)--do_layout_left :: Action-do_layout_left span _buf _len = do-    _ <- popLexState-    pushLexState bol  -- we must be at the start of a line-    return (L span ITvccurly)---- -------------------------------------------------------------------------------- LINE pragmas--setLine :: Int -> Action-setLine code span buf len = do-  let line = parseUnsignedInteger buf len 10 octDecDigit-  setSrcLoc (mkRealSrcLoc (srcSpanFile span) (fromIntegral line - 1) 1)-        -- subtract one: the line number refers to the *following* line-  _ <- popLexState-  pushLexState code-  lexToken--setColumn :: Action-setColumn span buf len = do-  let column =-        case reads (lexemeToString buf len) of-          [(column, _)] -> column-          _ -> error "setColumn: expected integer" -- shouldn't happen-  setSrcLoc (mkRealSrcLoc (srcSpanFile span) (srcSpanEndLine span)-                          (fromIntegral (column :: Integer)))-  _ <- popLexState-  lexToken--setFile :: Int -> Action-setFile code span buf len = do-  let file = mkFastString (go (lexemeToString (stepOn buf) (len-2)))-        where go ('\\':c:cs) = c : go cs-              go (c:cs)      = c : go cs-              go []          = []-              -- decode escapes in the filename.  e.g. on Windows-              -- when our filenames have backslashes in, gcc seems to-              -- escape the backslashes.  One symptom of not doing this-              -- is that filenames in error messages look a bit strange:-              --   C:\\foo\bar.hs-              -- only the first backslash is doubled, because we apply-              -- System.FilePath.normalise before printing out-              -- filenames and it does not remove duplicate-              -- backslashes after the drive letter (should it?).-  setAlrLastLoc $ alrInitialLoc file-  setSrcLoc (mkRealSrcLoc file (srcSpanEndLine span) (srcSpanEndCol span))-  addSrcFile file-  _ <- popLexState-  pushLexState code-  lexToken--alrInitialLoc :: FastString -> RealSrcSpan-alrInitialLoc file = mkRealSrcSpan loc loc-    where -- This is a hack to ensure that the first line in a file-          -- looks like it is after the initial location:-          loc = mkRealSrcLoc file (-1) (-1)---- -------------------------------------------------------------------------------- Options, includes and language pragmas.--lex_string_prag :: (String -> Token) -> Action-lex_string_prag mkTok span _buf _len-    = do input <- getInput-         start <- getSrcLoc-         tok <- go [] input-         end <- getSrcLoc-         return (L (mkRealSrcSpan start end) tok)-    where go acc input-              = if isString input "#-}"-                   then do setInput input-                           return (mkTok (reverse acc))-                   else case alexGetChar input of-                          Just (c,i) -> go (c:acc) i-                          Nothing -> err input-          isString _ [] = True-          isString i (x:xs)-              = case alexGetChar i of-                  Just (c,i') | c == x    -> isString i' xs-                  _other -> False-          err (AI end _) = failLocMsgP (realSrcSpanStart span) end "unterminated options pragma"----- -------------------------------------------------------------------------------- Strings & Chars---- This stuff is horrible.  I hates it.--lex_string_tok :: Action-lex_string_tok span buf _len = do-  tok <- lex_string ""-  (AI end bufEnd) <- getInput-  let-    tok' = case tok of-            ITprimstring _ bs -> ITprimstring (SourceText src) bs-            ITstring _ s -> ITstring (SourceText src) s-            _ -> panic "lex_string_tok"-    src = lexemeToString buf (cur bufEnd - cur buf)-  return (L (mkRealSrcSpan (realSrcSpanStart span) end) tok')--lex_string :: String -> P Token-lex_string s = do-  i <- getInput-  case alexGetChar' i of-    Nothing -> lit_error i--    Just ('"',i)  -> do-        setInput i-        magicHash <- extension magicHashEnabled-        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)-              _other ->-                return (ITstring (SourceText (reverse s))-                                 (mkFastString (reverse s)))-          else-                return (ITstring (SourceText (reverse s))-                                 (mkFastString (reverse s)))--    Just ('\\',i)-        | Just ('&',i) <- next -> do-                setInput i; lex_string s-        | Just (c,i) <- next, c <= '\x7f' && is_space c -> do-                           -- is_space only works for <= '\x7f' (#3751, #5425)-                setInput i; lex_stringgap s-        where next = alexGetChar' i--    Just (c, i1) -> do-        case c of-          '\\' -> do setInput i1; c' <- lex_escape; lex_string (c':s)-          c | isAny c -> do setInput i1; lex_string (c:s)-          _other -> lit_error i--lex_stringgap :: String -> P Token-lex_stringgap s = do-  i <- getInput-  c <- getCharOrFail i-  case c of-    '\\' -> lex_string s-    c | c <= '\x7f' && is_space c -> lex_stringgap s-                           -- is_space only works for <= '\x7f' (#3751, #5425)-    _other -> lit_error i---lex_char_tok :: Action--- Here we are basically parsing character literals, such as 'x' or '\n'--- but we additionally spot 'x and ''T, returning ITsimpleQuote and--- ITtyQuote respectively, but WITHOUT CONSUMING the x or T part--- (the parser does that).--- So we have to do two characters of lookahead: when we see 'x we need to--- see if there's a trailing quote-lex_char_tok span buf _len = do        -- We've seen '-   i1 <- getInput       -- Look ahead to first character-   let loc = realSrcSpanStart span-   case alexGetChar' i1 of-        Nothing -> lit_error  i1--        Just ('\'', i2@(AI end2 _)) -> do       -- We've seen ''-                   setInput i2-                   return (L (mkRealSrcSpan loc end2)  ITtyQuote)--        Just ('\\', i2@(AI _end2 _)) -> do      -- We've seen 'backslash-                  setInput i2-                  lit_ch <- lex_escape-                  i3 <- getInput-                  mc <- getCharOrFail i3 -- Trailing quote-                  if mc == '\'' then finish_char_tok buf loc lit_ch-                                else lit_error i3--        Just (c, i2@(AI _end2 _))-                | not (isAny c) -> lit_error i1-                | otherwise ->--                -- We've seen 'x, where x is a valid character-                --  (i.e. not newline etc) but not a quote or backslash-           case alexGetChar' i2 of      -- Look ahead one more character-                Just ('\'', i3) -> do   -- We've seen 'x'-                        setInput i3-                        finish_char_tok buf loc c-                _other -> do            -- We've seen 'x not followed by quote-                                        -- (including the possibility of EOF)-                                        -- Just parse the quote only-                        let (AI end _) = i1-                        return (L (mkRealSrcSpan loc end) ITsimpleQuote)--finish_char_tok :: StringBuffer -> RealSrcLoc -> Char -> P (RealLocated Token)-finish_char_tok buf loc ch  -- We've already seen the closing quote-                        -- Just need to check for trailing #-  = do  magicHash <- extension magicHashEnabled-        i@(AI end bufEnd) <- getInput-        let src = lexemeToString buf (cur bufEnd - cur buf)-        if magicHash then do-            case alexGetChar' i of-              Just ('#',i@(AI end _)) -> do-                setInput i-                return (L (mkRealSrcSpan loc end)-                          (ITprimchar (SourceText src) ch))-              _other ->-                return (L (mkRealSrcSpan loc end)-                          (ITchar (SourceText src) ch))-            else do-              return (L (mkRealSrcSpan loc end) (ITchar (SourceText src) ch))--isAny :: Char -> Bool-isAny c | c > '\x7f' = isPrint c-        | otherwise  = is_any c--lex_escape :: P Char-lex_escape = do-  i0 <- getInput-  c <- getCharOrFail i0-  case c of-        'a'   -> return '\a'-        'b'   -> return '\b'-        'f'   -> return '\f'-        'n'   -> return '\n'-        'r'   -> return '\r'-        't'   -> return '\t'-        'v'   -> return '\v'-        '\\'  -> return '\\'-        '"'   -> return '\"'-        '\''  -> return '\''-        '^'   -> do i1 <- getInput-                    c <- getCharOrFail i1-                    if c >= '@' && c <= '_'-                        then return (chr (ord c - ord '@'))-                        else lit_error i1--        'x'   -> readNum is_hexdigit 16 hexDigit-        'o'   -> readNum is_octdigit  8 octDecDigit-        x | is_decdigit x -> readNum2 is_decdigit 10 octDecDigit (octDecDigit x)--        c1 ->  do-           i <- getInput-           case alexGetChar' i of-            Nothing -> lit_error i0-            Just (c2,i2) ->-              case alexGetChar' i2 of-                Nothing -> do lit_error i0-                Just (c3,i3) ->-                   let str = [c1,c2,c3] in-                   case [ (c,rest) | (p,c) <- silly_escape_chars,-                                     Just rest <- [stripPrefix p str] ] of-                          (escape_char,[]):_ -> do-                                setInput i3-                                return escape_char-                          (escape_char,_:_):_ -> do-                                setInput i2-                                return escape_char-                          [] -> lit_error i0--readNum :: (Char -> Bool) -> Int -> (Char -> Int) -> P Char-readNum is_digit base conv = do-  i <- getInput-  c <- getCharOrFail i-  if is_digit c-        then readNum2 is_digit base conv (conv c)-        else lit_error i--readNum2 :: (Char -> Bool) -> Int -> (Char -> Int) -> Int -> P Char-readNum2 is_digit base conv i = do-  input <- getInput-  read i input-  where read i input = do-          case alexGetChar' input of-            Just (c,input') | is_digit c -> do-               let i' = i*base + conv c-               if i' > 0x10ffff-                  then setInput input >> lexError "numeric escape sequence out of range"-                  else read i' input'-            _other -> do-              setInput input; return (chr i)---silly_escape_chars :: [(String, Char)]-silly_escape_chars = [-        ("NUL", '\NUL'),-        ("SOH", '\SOH'),-        ("STX", '\STX'),-        ("ETX", '\ETX'),-        ("EOT", '\EOT'),-        ("ENQ", '\ENQ'),-        ("ACK", '\ACK'),-        ("BEL", '\BEL'),-        ("BS", '\BS'),-        ("HT", '\HT'),-        ("LF", '\LF'),-        ("VT", '\VT'),-        ("FF", '\FF'),-        ("CR", '\CR'),-        ("SO", '\SO'),-        ("SI", '\SI'),-        ("DLE", '\DLE'),-        ("DC1", '\DC1'),-        ("DC2", '\DC2'),-        ("DC3", '\DC3'),-        ("DC4", '\DC4'),-        ("NAK", '\NAK'),-        ("SYN", '\SYN'),-        ("ETB", '\ETB'),-        ("CAN", '\CAN'),-        ("EM", '\EM'),-        ("SUB", '\SUB'),-        ("ESC", '\ESC'),-        ("FS", '\FS'),-        ("GS", '\GS'),-        ("RS", '\RS'),-        ("US", '\US'),-        ("SP", '\SP'),-        ("DEL", '\DEL')-        ]---- before calling lit_error, ensure that the current input is pointing to--- the position of the error in the buffer.  This is so that we can report--- a correct location to the user, but also so we can detect UTF-8 decoding--- errors if they occur.-lit_error :: AlexInput -> P a-lit_error i = do setInput i; lexError "lexical error in string/character literal"--getCharOrFail :: AlexInput -> P Char-getCharOrFail i =  do-  case alexGetChar' i of-        Nothing -> lexError "unexpected end-of-file in string/character literal"-        Just (c,i)  -> do setInput i; return c---- -------------------------------------------------------------------------------- QuasiQuote--lex_qquasiquote_tok :: Action-lex_qquasiquote_tok span buf len = do-  let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False-  quoteStart <- getSrcLoc-  quote <- lex_quasiquote quoteStart ""-  end <- getSrcLoc-  return (L (mkRealSrcSpan (realSrcSpanStart span) end)-           (ITqQuasiQuote (qual,-                           quoter,-                           mkFastString (reverse quote),-                           mkRealSrcSpan quoteStart end)))--lex_quasiquote_tok :: Action-lex_quasiquote_tok span buf len = do-  let quoter = tail (lexemeToString buf (len - 1))-                -- 'tail' drops the initial '[',-                -- while the -1 drops the trailing '|'-  quoteStart <- getSrcLoc-  quote <- lex_quasiquote quoteStart ""-  end <- getSrcLoc-  return (L (mkRealSrcSpan (realSrcSpanStart span) end)-           (ITquasiQuote (mkFastString quoter,-                          mkFastString (reverse quote),-                          mkRealSrcSpan quoteStart end)))--lex_quasiquote :: RealSrcLoc -> String -> P String-lex_quasiquote start s = do-  i <- getInput-  case alexGetChar' i of-    Nothing -> quasiquote_error start--    -- NB: The string "|]" terminates the quasiquote,-    -- with absolutely no escaping. See the extensive-    -- discussion on Trac #5348 for why there is no-    -- escape handling.-    Just ('|',i)-        | Just (']',i) <- alexGetChar' i-        -> do { setInput i; return s }--    Just (c, i) -> do-         setInput i; lex_quasiquote start (c : s)--quasiquote_error :: RealSrcLoc -> P a-quasiquote_error start = do-  (AI end buf) <- getInput-  reportLexError start end buf "unterminated quasiquotation"---- -------------------------------------------------------------------------------- Warnings--warnTab :: Action-warnTab srcspan _buf _len = do-    addTabWarning srcspan-    lexToken--warnThen :: WarningFlag -> SDoc -> Action -> Action-warnThen option warning action srcspan buf len = do-    addWarning option (RealSrcSpan srcspan) warning-    action srcspan buf len---- -------------------------------------------------------------------------------- The Parse Monad---- | Do we want to generate ';' layout tokens? In some cases we just want to--- generate '}', e.g. in MultiWayIf we don't need ';'s because '|' separates--- alternatives (unlike a `case` expression where we need ';' to as a separator--- between alternatives).-type GenSemic = Bool--generateSemic, dontGenerateSemic :: GenSemic-generateSemic     = True-dontGenerateSemic = False--data LayoutContext-  = NoLayout-  | Layout !Int !GenSemic-  deriving Show--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---- | Test whether a 'WarningFlag' is set-warnopt :: WarningFlag -> ParserFlags -> Bool-warnopt f options = f `EnumSet.member` pWarningFlags options---- | Test whether a 'LangExt.Extension' is set-extopt :: LangExt.Extension -> ParserFlags -> Bool-extopt f options = f `EnumSet.member` pExtensionFlags options---- | The subset of the 'DynFlags' used by the parser-data ParserFlags = ParserFlags {-    pWarningFlags   :: EnumSet WarningFlag-  , pExtensionFlags :: EnumSet LangExt.Extension-  , pThisPackage    :: UnitId      -- ^ key of package currently being compiled-  , pExtsBitmap     :: !ExtsBitmap -- ^ bitmap of permitted extensions-  }--data PState = PState {-        buffer     :: StringBuffer,-        options    :: ParserFlags,-        -- This needs to take DynFlags as an argument until-        -- we have a fix for #10143-        messages   :: DynFlags -> Messages,-        tab_first  :: Maybe RealSrcSpan, -- pos of first tab warning in the file-        tab_count  :: !Int,              -- number of tab warnings in the file-        last_tk    :: Maybe Token,-        last_loc   :: RealSrcSpan, -- pos of previous token-        last_len   :: !Int,        -- len of previous token-        loc        :: RealSrcLoc,  -- current loc (end of prev token + 1)-        context    :: [LayoutContext],-        lex_state  :: [Int],-        srcfiles   :: [FastString],-        -- Used in the alternative layout rule:-        -- These tokens are the next ones to be sent out. They are-        -- just blindly emitted, without the rule looking at them again:-        alr_pending_implicit_tokens :: [RealLocated Token],-        -- This is the next token to be considered or, if it is Nothing,-        -- we need to get the next token from the input stream:-        alr_next_token :: Maybe (RealLocated Token),-        -- This is what we consider to be the location of the last token-        -- emitted:-        alr_last_loc :: RealSrcSpan,-        -- The stack of layout contexts:-        alr_context :: [ALRContext],-        -- Are we expecting a '{'? If it's Just, then the ALRLayout tells-        -- us what sort of layout the '{' will open:-        alr_expecting_ocurly :: Maybe ALRLayout,-        -- Have we just had the '}' for a let block? If so, than an 'in'-        -- token doesn't need to close anything:-        alr_justClosedExplicitLetBlock :: Bool,--        -- If this is enabled, '{-# LINE ... -#}' and '{-# COLUMN ... #-}'-        -- update the 'loc' field. Otherwise, those pragmas are lexed as tokens.-        use_pos_prags :: Bool,--        -- The next three are used to implement Annotations giving the-        -- locations of 'noise' tokens in the source, so that users of-        -- the GHC API can do source to source conversions.-        -- See note [Api annotations] in ApiAnnotation.hs-        annotations :: [(ApiAnnKey,[SrcSpan])],-        comment_q :: [Located AnnotationComment],-        annotations_comments :: [(SrcSpan,[Located AnnotationComment])]-     }-        -- last_loc and last_len are used when generating error messages,-        -- and in pushCurrentContext only.  Sigh, if only Happy passed the-        -- current token to happyError, we could at least get rid of last_len.-        -- Getting rid of last_loc would require finding another way to-        -- implement pushCurrentContext (which is only called from one place).--data ALRContext = ALRNoLayout Bool{- does it contain commas? -}-                              Bool{- is it a 'let' block? -}-                | ALRLayout ALRLayout Int-data ALRLayout = ALRLayoutLet-               | ALRLayoutWhere-               | ALRLayoutOf-               | ALRLayoutDo--newtype P a = P { unP :: PState -> ParseResult a }--instance Functor P where-  fmap = liftM--instance Applicative P where-  pure = returnP-  (<*>) = ap--instance Monad P where-  (>>=) = thenP-  fail = MonadFail.fail--instance MonadFail P where-  fail = failP--returnP :: a -> P a-returnP a = a `seq` (P $ \s -> POk s a)--thenP :: P a -> (a -> P b) -> P b-(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)--failMsgP :: String -> P a-failMsgP msg =-  P $ \s ->-    PFailed (getMessages s) (RealSrcSpan (last_loc s)) (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--getPState :: P PState-getPState = P $ \s -> POk s s--withThisPackage :: (UnitId -> a) -> P a-withThisPackage f = P $ \s@(PState{options = o}) -> POk s (f (pThisPackage o))--extension :: (ExtsBitmap -> Bool) -> P Bool-extension p = P $ \s -> POk s (p $! (pExtsBitmap . options) s)--getExts :: P ExtsBitmap-getExts = P $ \s -> POk s (pExtsBitmap . options $ s)--setExts :: (ExtsBitmap -> ExtsBitmap) -> P ()-setExts f = P $ \s -> POk s {-  options =-    let p = options s-    in  p { pExtsBitmap = f (pExtsBitmap p) }-  } ()--setSrcLoc :: RealSrcLoc -> P ()-setSrcLoc new_loc = P $ \s -> POk s{loc=new_loc} ()--getSrcLoc :: P RealSrcLoc-getSrcLoc = P $ \s@(PState{ loc=loc }) -> POk s loc--addSrcFile :: FastString -> P ()-addSrcFile f = P $ \s -> POk s{ srcfiles = f : srcfiles s } ()--setLastToken :: RealSrcSpan -> Int -> P ()-setLastToken loc len = P $ \s -> POk s {-  last_loc=loc,-  last_len=len-  } ()--setLastTk :: Token -> P ()-setLastTk tk = P $ \s -> POk s { last_tk = Just tk } ()--getLastTk :: P (Maybe Token)-getLastTk = P $ \s@(PState { last_tk = last_tk }) -> POk s last_tk--data AlexInput = AI RealSrcLoc StringBuffer--{--Note [Unicode in Alex]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Although newer versions of Alex support unicode, this grammar is processed with-the old style '--latin1' behaviour. This means that when implementing the-functions--    alexGetByte       :: AlexInput -> Maybe (Word8,AlexInput)-    alexInputPrevChar :: AlexInput -> Char--which Alex uses to to take apart our 'AlexInput', we must--  * return a latin1 character in the 'Word8' that 'alexGetByte' expects-  * return a latin1 character in 'alexInputPrevChar'.--We handle this in 'adjustChar' by squishing entire classes of unicode-characters into single bytes.--}--{-# INLINE adjustChar #-}-adjustChar :: Char -> Word8-adjustChar c = fromIntegral $ ord adj_c-  where non_graphic     = '\x00'-        upper           = '\x01'-        lower           = '\x02'-        digit           = '\x03'-        symbol          = '\x04'-        space           = '\x05'-        other_graphic   = '\x06'-        uniidchar       = '\x07'--        adj_c-          | c <= '\x07' = non_graphic-          | c <= '\x7f' = c-          -- Alex doesn't handle Unicode, so when Unicode-          -- character is encountered we output these values-          -- with the actual character value hidden in the state.-          | otherwise =-                -- NB: The logic behind these definitions is also reflected-                -- in basicTypes/Lexeme.hs-                -- Any changes here should likely be reflected there.--                case generalCategory c of-                  UppercaseLetter       -> upper-                  LowercaseLetter       -> lower-                  TitlecaseLetter       -> upper-                  ModifierLetter        -> uniidchar -- see #10196-                  OtherLetter           -> lower -- see #1103-                  NonSpacingMark        -> uniidchar -- see #7650-                  SpacingCombiningMark  -> other_graphic-                  EnclosingMark         -> other_graphic-                  DecimalNumber         -> digit-                  LetterNumber          -> other_graphic-                  OtherNumber           -> digit -- see #4373-                  ConnectorPunctuation  -> symbol-                  DashPunctuation       -> symbol-                  OpenPunctuation       -> other_graphic-                  ClosePunctuation      -> other_graphic-                  InitialQuote          -> other_graphic-                  FinalQuote            -> other_graphic-                  OtherPunctuation      -> symbol-                  MathSymbol            -> symbol-                  CurrencySymbol        -> symbol-                  ModifierSymbol        -> symbol-                  OtherSymbol           -> symbol-                  Space                 -> space-                  _other                -> non_graphic---- Getting the previous 'Char' isn't enough here - we need to convert it into--- the same format that 'alexGetByte' would have produced.------ See Note [Unicode in Alex] and #13986.-alexInputPrevChar :: AlexInput -> Char-alexInputPrevChar (AI _ buf) = chr (fromIntegral (adjustChar pc))-  where pc = prevChar buf '\n'---- backwards compatibility for Alex 2.x-alexGetChar :: AlexInput -> Maybe (Char,AlexInput)-alexGetChar inp = case alexGetByte inp of-                    Nothing    -> Nothing-                    Just (b,i) -> c `seq` Just (c,i)-                       where c = chr $ fromIntegral b---- See Note [Unicode in Alex]-alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)-alexGetByte (AI loc s)-  | atEnd s   = Nothing-  | otherwise = byte `seq` loc' `seq` s' `seq`-                --trace (show (ord c)) $-                Just (byte, (AI loc' s'))-  where (c,s') = nextChar s-        loc'   = advanceSrcLoc loc c-        byte   = adjustChar c---- This version does not squash unicode characters, it is used when--- lexing strings.-alexGetChar' :: AlexInput -> Maybe (Char,AlexInput)-alexGetChar' (AI loc s)-  | atEnd s   = Nothing-  | otherwise = c `seq` loc' `seq` s' `seq`-                --trace (show (ord c)) $-                Just (c, (AI loc' s'))-  where (c,s') = nextChar s-        loc'   = advanceSrcLoc loc c--getInput :: P AlexInput-getInput = P $ \s@PState{ loc=l, buffer=b } -> POk s (AI l b)--setInput :: AlexInput -> P ()-setInput (AI l b) = P $ \s -> POk s{ loc=l, buffer=b } ()--nextIsEOF :: P Bool-nextIsEOF = do-  AI _ s <- getInput-  return $ atEnd s--pushLexState :: Int -> P ()-pushLexState ls = P $ \s@PState{ lex_state=l } -> POk s{lex_state=ls:l} ()--popLexState :: P Int-popLexState = P $ \s@PState{ lex_state=ls:l } -> POk s{ lex_state=l } ls--getLexState :: P Int-getLexState = P $ \s@PState{ lex_state=ls:_ } -> POk s ls--popNextToken :: P (Maybe (RealLocated Token))-popNextToken-    = P $ \s@PState{ alr_next_token = m } ->-              POk (s {alr_next_token = Nothing}) m--activeContext :: P Bool-activeContext = do-  ctxt <- getALRContext-  expc <- getAlrExpectingOCurly-  impt <- implicitTokenPending-  case (ctxt,expc) of-    ([],Nothing) -> return impt-    _other       -> return True--setAlrLastLoc :: RealSrcSpan -> P ()-setAlrLastLoc l = P $ \s -> POk (s {alr_last_loc = l}) ()--getAlrLastLoc :: P RealSrcSpan-getAlrLastLoc = P $ \s@(PState {alr_last_loc = l}) -> POk s l--getALRContext :: P [ALRContext]-getALRContext = P $ \s@(PState {alr_context = cs}) -> POk s cs--setALRContext :: [ALRContext] -> P ()-setALRContext cs = P $ \s -> POk (s {alr_context = cs}) ()--getALRTransitional :: P Bool-getALRTransitional = P $ \s@PState {options = o} ->-  POk s (extopt LangExt.AlternativeLayoutRuleTransitional o)--getJustClosedExplicitLetBlock :: P Bool-getJustClosedExplicitLetBlock- = P $ \s@(PState {alr_justClosedExplicitLetBlock = b}) -> POk s b--setJustClosedExplicitLetBlock :: Bool -> P ()-setJustClosedExplicitLetBlock b- = P $ \s -> POk (s {alr_justClosedExplicitLetBlock = b}) ()--setNextToken :: RealLocated Token -> P ()-setNextToken t = P $ \s -> POk (s {alr_next_token = Just t}) ()--implicitTokenPending :: P Bool-implicitTokenPending-    = P $ \s@PState{ alr_pending_implicit_tokens = ts } ->-              case ts of-              [] -> POk s False-              _  -> POk s True--popPendingImplicitToken :: P (Maybe (RealLocated Token))-popPendingImplicitToken-    = P $ \s@PState{ alr_pending_implicit_tokens = ts } ->-              case ts of-              [] -> POk s Nothing-              (t : ts') -> POk (s {alr_pending_implicit_tokens = ts'}) (Just t)--setPendingImplicitTokens :: [RealLocated Token] -> P ()-setPendingImplicitTokens ts = P $ \s -> POk (s {alr_pending_implicit_tokens = ts}) ()--getAlrExpectingOCurly :: P (Maybe ALRLayout)-getAlrExpectingOCurly = P $ \s@(PState {alr_expecting_ocurly = b}) -> POk s b--setAlrExpectingOCurly :: Maybe ALRLayout -> P ()-setAlrExpectingOCurly b = P $ \s -> POk (s {alr_expecting_ocurly = b}) ()---- for reasons of efficiency, flags indicating language extensions (eg,--- -fglasgow-exts or -XParallelArrays) are represented by a bitmap--- stored in an unboxed Word64-type ExtsBitmap = Word64--xbit :: ExtBits -> ExtsBitmap-xbit = bit . fromEnum--xtest :: ExtBits -> ExtsBitmap -> Bool-xtest ext xmap = testBit xmap (fromEnum ext)--data ExtBits-  = FfiBit-  | InterruptibleFfiBit-  | CApiFfiBit-  | ParrBit-  | ArrowsBit-  | ThBit-  | ThQuotesBit-  | IpBit-  | OverloadedLabelsBit -- #x overloaded labels-  | ExplicitForallBit -- the 'forall' keyword and '.' symbol-  | BangPatBit -- Tells the parser to understand bang-patterns-               -- (doesn't affect the lexer)-  | PatternSynonymsBit -- pattern synonyms-  | HaddockBit-- Lex and parse Haddock comments-  | MagicHashBit -- "#" in both functions and operators-  | RecursiveDoBit -- mdo-  | UnicodeSyntaxBit -- the forall symbol, arrow symbols, etc-  | UnboxedTuplesBit -- (# and #)-  | UnboxedSumsBit -- (# and #)-  | DatatypeContextsBit-  | TransformComprehensionsBit-  | QqBit -- enable quasiquoting-  | InRulePragBit-  | RawTokenStreamBit -- producing a token stream with all comments included-  | SccProfilingOnBit-  | HpcBit-  | AlternativeLayoutRuleBit-  | RelaxedLayoutBit-  | NondecreasingIndentationBit-  | SafeHaskellBit-  | TraditionalRecordSyntaxBit-  | ExplicitNamespacesBit-  | LambdaCaseBit-  | BinaryLiteralsBit-  | NegativeLiteralsBit-  | HexFloatLiteralsBit-  | TypeApplicationsBit-  | StaticPointersBit-  deriving Enum---always :: ExtsBitmap -> Bool-always           _     = True-parrEnabled :: ExtsBitmap -> Bool-parrEnabled = xtest ParrBit-arrowsEnabled :: ExtsBitmap -> Bool-arrowsEnabled = xtest ArrowsBit-thEnabled :: ExtsBitmap -> Bool-thEnabled = xtest ThBit-thQuotesEnabled :: ExtsBitmap -> Bool-thQuotesEnabled = xtest ThQuotesBit-ipEnabled :: ExtsBitmap -> Bool-ipEnabled = xtest IpBit-overloadedLabelsEnabled :: ExtsBitmap -> Bool-overloadedLabelsEnabled = xtest OverloadedLabelsBit-explicitForallEnabled :: ExtsBitmap -> Bool-explicitForallEnabled = xtest ExplicitForallBit-bangPatEnabled :: ExtsBitmap -> Bool-bangPatEnabled = xtest BangPatBit-haddockEnabled :: ExtsBitmap -> Bool-haddockEnabled = xtest HaddockBit-magicHashEnabled :: ExtsBitmap -> Bool-magicHashEnabled = xtest MagicHashBit-unicodeSyntaxEnabled :: ExtsBitmap -> Bool-unicodeSyntaxEnabled = xtest UnicodeSyntaxBit-unboxedTuplesEnabled :: ExtsBitmap -> Bool-unboxedTuplesEnabled = xtest UnboxedTuplesBit-unboxedSumsEnabled :: ExtsBitmap -> Bool-unboxedSumsEnabled = xtest UnboxedSumsBit-datatypeContextsEnabled :: ExtsBitmap -> Bool-datatypeContextsEnabled = xtest DatatypeContextsBit-qqEnabled :: ExtsBitmap -> Bool-qqEnabled = xtest QqBit-inRulePrag :: ExtsBitmap -> Bool-inRulePrag = xtest InRulePragBit-rawTokenStreamEnabled :: ExtsBitmap -> Bool-rawTokenStreamEnabled = xtest RawTokenStreamBit-alternativeLayoutRule :: ExtsBitmap -> Bool-alternativeLayoutRule = xtest AlternativeLayoutRuleBit-hpcEnabled :: ExtsBitmap -> Bool-hpcEnabled = xtest HpcBit-relaxedLayout :: ExtsBitmap -> Bool-relaxedLayout = xtest RelaxedLayoutBit-nondecreasingIndentation :: ExtsBitmap -> Bool-nondecreasingIndentation = xtest NondecreasingIndentationBit-sccProfilingOn :: ExtsBitmap -> Bool-sccProfilingOn = xtest SccProfilingOnBit-traditionalRecordSyntaxEnabled :: ExtsBitmap -> Bool-traditionalRecordSyntaxEnabled = xtest TraditionalRecordSyntaxBit--explicitNamespacesEnabled :: ExtsBitmap -> Bool-explicitNamespacesEnabled = xtest ExplicitNamespacesBit-lambdaCaseEnabled :: ExtsBitmap -> Bool-lambdaCaseEnabled = xtest LambdaCaseBit-binaryLiteralsEnabled :: ExtsBitmap -> Bool-binaryLiteralsEnabled = xtest BinaryLiteralsBit-negativeLiteralsEnabled :: ExtsBitmap -> Bool-negativeLiteralsEnabled = xtest NegativeLiteralsBit-hexFloatLiteralsEnabled :: ExtsBitmap -> Bool-hexFloatLiteralsEnabled = xtest HexFloatLiteralsBit-patternSynonymsEnabled :: ExtsBitmap -> Bool-patternSynonymsEnabled = xtest PatternSynonymsBit-typeApplicationEnabled :: ExtsBitmap -> Bool-typeApplicationEnabled = xtest TypeApplicationsBit-staticPointersEnabled :: ExtsBitmap -> Bool-staticPointersEnabled = xtest StaticPointersBit---- PState for parsing options pragmas----pragState :: DynFlags -> StringBuffer -> RealSrcLoc -> PState-pragState dynflags buf loc = (mkPState dynflags buf loc) {-                                 lex_state = [bol, option_prags, 0]-                             }---- | Extracts the flag information needed for parsing-mkParserFlags :: DynFlags -> ParserFlags-mkParserFlags flags =-    ParserFlags {-      pWarningFlags = DynFlags.warningFlags flags-    , pExtensionFlags = DynFlags.extensionFlags flags-    , pThisPackage = DynFlags.thisPackage flags-    , pExtsBitmap = bitmap-    }-  where-      bitmap =     FfiBit                      `setBitIf` xopt LangExt.ForeignFunctionInterface flags-               .|. InterruptibleFfiBit         `setBitIf` xopt LangExt.InterruptibleFFI         flags-               .|. CApiFfiBit                  `setBitIf` xopt LangExt.CApiFFI                  flags-               .|. ParrBit                     `setBitIf` xopt LangExt.ParallelArrays           flags-               .|. ArrowsBit                   `setBitIf` xopt LangExt.Arrows                   flags-               .|. ThBit                       `setBitIf` xopt LangExt.TemplateHaskell          flags-               .|. ThQuotesBit                 `setBitIf` xopt LangExt.TemplateHaskellQuotes    flags-               .|. QqBit                       `setBitIf` xopt LangExt.QuasiQuotes              flags-               .|. IpBit                       `setBitIf` xopt LangExt.ImplicitParams           flags-               .|. OverloadedLabelsBit         `setBitIf` xopt LangExt.OverloadedLabels         flags-               .|. ExplicitForallBit           `setBitIf` xopt LangExt.ExplicitForAll           flags-               .|. BangPatBit                  `setBitIf` xopt LangExt.BangPatterns             flags-               .|. HaddockBit                  `setBitIf` gopt Opt_Haddock                      flags-               .|. MagicHashBit                `setBitIf` xopt LangExt.MagicHash                flags-               .|. RecursiveDoBit              `setBitIf` xopt LangExt.RecursiveDo              flags-               .|. UnicodeSyntaxBit            `setBitIf` xopt LangExt.UnicodeSyntax            flags-               .|. UnboxedTuplesBit            `setBitIf` xopt LangExt.UnboxedTuples            flags-               .|. UnboxedSumsBit              `setBitIf` xopt LangExt.UnboxedSums              flags-               .|. DatatypeContextsBit         `setBitIf` xopt LangExt.DatatypeContexts         flags-               .|. TransformComprehensionsBit  `setBitIf` xopt LangExt.TransformListComp        flags-               .|. TransformComprehensionsBit  `setBitIf` xopt LangExt.MonadComprehensions      flags-               .|. RawTokenStreamBit           `setBitIf` gopt Opt_KeepRawTokenStream           flags-               .|. HpcBit                      `setBitIf` gopt Opt_Hpc                          flags-               .|. AlternativeLayoutRuleBit    `setBitIf` xopt LangExt.AlternativeLayoutRule    flags-               .|. RelaxedLayoutBit            `setBitIf` xopt LangExt.RelaxedLayout            flags-               .|. SccProfilingOnBit           `setBitIf` gopt Opt_SccProfilingOn               flags-               .|. NondecreasingIndentationBit `setBitIf` xopt LangExt.NondecreasingIndentation flags-               .|. SafeHaskellBit              `setBitIf` safeImportsOn                         flags-               .|. TraditionalRecordSyntaxBit  `setBitIf` xopt LangExt.TraditionalRecordSyntax  flags-               .|. ExplicitNamespacesBit       `setBitIf` xopt LangExt.ExplicitNamespaces flags-               .|. LambdaCaseBit               `setBitIf` xopt LangExt.LambdaCase               flags-               .|. BinaryLiteralsBit           `setBitIf` xopt LangExt.BinaryLiterals           flags-               .|. NegativeLiteralsBit         `setBitIf` xopt LangExt.NegativeLiterals         flags-               .|. HexFloatLiteralsBit         `setBitIf` xopt LangExt.HexFloatLiterals         flags-               .|. PatternSynonymsBit          `setBitIf` xopt LangExt.PatternSynonyms          flags-               .|. TypeApplicationsBit         `setBitIf` xopt LangExt.TypeApplications         flags-               .|. StaticPointersBit           `setBitIf` xopt LangExt.StaticPointers           flags--      setBitIf :: ExtBits -> Bool -> ExtsBitmap-      b `setBitIf` cond | cond      = xbit b-                        | otherwise = 0---- | Creates a parse state from a 'DynFlags' value-mkPState :: DynFlags -> StringBuffer -> RealSrcLoc -> PState-mkPState flags = mkPStatePure (mkParserFlags flags)---- | Creates a parse state from a 'ParserFlags' value-mkPStatePure :: ParserFlags -> StringBuffer -> RealSrcLoc -> PState-mkPStatePure options buf loc =-  PState {-      buffer        = buf,-      options       = options,-      messages      = const emptyMessages,-      tab_first     = Nothing,-      tab_count     = 0,-      last_tk       = Nothing,-      last_loc      = mkRealSrcSpan loc loc,-      last_len      = 0,-      loc           = loc,-      context       = [],-      lex_state     = [bol, 0],-      srcfiles      = [],-      alr_pending_implicit_tokens = [],-      alr_next_token = Nothing,-      alr_last_loc = alrInitialLoc (fsLit "<no file>"),-      alr_context = [],-      alr_expecting_ocurly = Nothing,-      alr_justClosedExplicitLetBlock = False,-      use_pos_prags = True,-      annotations = [],-      comment_q = [],-      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'} ()--addTabWarning :: RealSrcSpan -> P ()-addTabWarning srcspan- = P $ \s@PState{tab_first=tf, tab_count=tc, options=o} ->-       let tf' = if isJust tf then tf else Just srcspan-           tc' = tc + 1-           s' = if warnopt Opt_WarnTabs o-                then s{tab_first = tf', tab_count = tc'}-                else s-       in POk s' ()--mkTabWarning :: PState -> DynFlags -> Maybe ErrMsg-mkTabWarning PState{tab_first=tf, tab_count=tc} d =-  let middle = if tc == 1-        then text ""-        else text ", and in" <+> speakNOf (tc - 1) (text "further location")-      message = text "Tab character found here"-                <> middle-                <> text "."-                $+$ text "Please use spaces instead."-  in fmap (\s -> makeIntoWarning (Reason Opt_WarnTabs) $-                 mkWarnMsg d (RealSrcSpan s) alwaysQualify message) tf--getMessages :: PState -> DynFlags -> Messages-getMessages p@PState{messages=m} d =-  let (ws, es) = m d-      tabwarning = mkTabWarning p d-      ws' = maybe ws (`consBag` ws) tabwarning-  in (ws', es)--getContext :: P [LayoutContext]-getContext = P $ \s@PState{context=ctx} -> POk s ctx--setContext :: [LayoutContext] -> P ()-setContext ctx = P $ \s -> POk s{context=ctx} ()--popContext :: P ()-popContext = P $ \ s@(PState{ buffer = buf, options = o, context = ctx,-                              last_len = len, last_loc = last_loc }) ->-  case ctx of-        (_:tl) ->-          POk s{ context = tl } ()-        []     ->-          PFailed (getMessages s) (RealSrcSpan last_loc) (srcParseErr o buf len)---- Push a new layout context at the indentation of the last token read.-pushCurrentContext :: GenSemic -> P ()-pushCurrentContext gen_semic = P $ \ s@PState{ last_loc=loc, context=ctx } ->-    POk s{context = Layout (srcSpanStartCol loc) gen_semic : ctx} ()---- This is only used at the outer level of a module when the 'module' keyword is--- missing.-pushModuleContext :: P ()-pushModuleContext = pushCurrentContext generateSemic--getOffside :: P (Ordering, Bool)-getOffside = P $ \s@PState{last_loc=loc, context=stk} ->-                let offs = srcSpanStartCol loc in-                let ord = case stk of-                            Layout n gen_semic : _ ->-                              --trace ("layout: " ++ show n ++ ", offs: " ++ show offs) $-                              (compare offs n, gen_semic)-                            _ ->-                              (GT, dontGenerateSemic)-                in POk s ord---- ------------------------------------------------------------------------------ Construct a parse error--srcParseErr-  :: ParserFlags-  -> StringBuffer       -- current buffer (placed just after the last token)-  -> Int                -- length of the previous token-  -> MsgDoc-srcParseErr options buf len-  = if null token-         then text "parse error (possibly incorrect indentation or mismatched brackets)"-         else text "parse error on input" <+> quotes (text token)-              $$ ppWhen (not th_enabled && token == "$") -- #7396-                        (text "Perhaps you intended to use TemplateHaskell")-              $$ ppWhen (token == "<-")-                        (if mdoInLast100-                           then text "Perhaps you intended to use RecursiveDo"-                           else text "Perhaps this statement should be within a 'do' block?")-              $$ ppWhen (token == "=")-                        (text "Perhaps you need a 'let' in a 'do' block?"-                         $$ text "e.g. 'let x = 5' instead of 'x = 5'")-              $$ ppWhen (not ps_enabled && pattern == "pattern ") -- #12429-                        (text "Perhaps you intended to use PatternSynonyms")-  where token = lexemeToString (offsetBytes (-len) buf) len-        pattern = decodePrevNChars 8 buf-        last100 = decodePrevNChars 100 buf-        mdoInLast100 = "mdo" `isInfixOf` last100-        th_enabled = extopt LangExt.TemplateHaskell options-        ps_enabled = extopt LangExt.PatternSynonyms options---- Report a parse failure, giving the span of the previous token as--- the location of the error.  This is the entry point for errors--- detected during parsing.-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)---- A lexical error is reported at a particular position in the source file,--- not over a token range.-lexError :: String -> P a-lexError str = do-  loc <- getSrcLoc-  (AI end buf) <- getInput-  reportLexError loc end buf str---- -------------------------------------------------------------------------------- This is the top-level function: called from the parser each time a--- new token is to be read from the input.--lexer :: Bool -> (Located Token -> P a) -> P a-lexer queueComments cont = do-  alr <- extension alternativeLayoutRule-  let lexTokenFun = if alr then lexTokenAlr else lexToken-  (L span tok) <- lexTokenFun-  --trace ("token: " ++ show tok) $ do--  case tok of-    ITeof -> addAnnotationOnly noSrcSpan AnnEofPos (RealSrcSpan span)-    _ -> return ()--  if (queueComments && isDocComment tok)-    then queueComment (L (RealSrcSpan span) tok)-    else return ()--  if (queueComments && isComment tok)-    then queueComment (L (RealSrcSpan span) tok) >> lexer queueComments cont-    else cont (L (RealSrcSpan span) tok)--lexTokenAlr :: P (RealLocated Token)-lexTokenAlr = do mPending <- popPendingImplicitToken-                 t <- case mPending of-                      Nothing ->-                          do mNext <- popNextToken-                             t <- case mNext of-                                  Nothing -> lexToken-                                  Just next -> return next-                             alternativeLayoutRuleToken t-                      Just t ->-                          return t-                 setAlrLastLoc (getLoc t)-                 case unLoc t of-                     ITwhere -> setAlrExpectingOCurly (Just ALRLayoutWhere)-                     ITlet   -> setAlrExpectingOCurly (Just ALRLayoutLet)-                     ITof    -> setAlrExpectingOCurly (Just ALRLayoutOf)-                     ITdo    -> setAlrExpectingOCurly (Just ALRLayoutDo)-                     ITmdo   -> setAlrExpectingOCurly (Just ALRLayoutDo)-                     ITrec   -> setAlrExpectingOCurly (Just ALRLayoutDo)-                     _       -> return ()-                 return t--alternativeLayoutRuleToken :: RealLocated Token -> P (RealLocated Token)-alternativeLayoutRuleToken t-    = do context <- getALRContext-         lastLoc <- getAlrLastLoc-         mExpectingOCurly <- getAlrExpectingOCurly-         transitional <- getALRTransitional-         justClosedExplicitLetBlock <- getJustClosedExplicitLetBlock-         setJustClosedExplicitLetBlock False-         let thisLoc = getLoc t-             thisCol = srcSpanStartCol thisLoc-             newLine = srcSpanStartLine thisLoc > srcSpanEndLine lastLoc-         case (unLoc t, context, mExpectingOCurly) of-             -- This case handles a GHC extension to the original H98-             -- layout rule...-             (ITocurly, _, Just alrLayout) ->-                 do setAlrExpectingOCurly Nothing-                    let isLet = case alrLayout of-                                ALRLayoutLet -> True-                                _ -> False-                    setALRContext (ALRNoLayout (containsCommas ITocurly) isLet : context)-                    return t-             -- ...and makes this case unnecessary-             {--             -- I think our implicit open-curly handling is slightly-             -- different to John's, in how it interacts with newlines-             -- and "in"-             (ITocurly, _, Just _) ->-                 do setAlrExpectingOCurly Nothing-                    setNextToken t-                    lexTokenAlr-             -}-             (_, ALRLayout _ col : _ls, Just expectingOCurly)-              | (thisCol > col) ||-                (thisCol == col &&-                 isNonDecreasingIndentation expectingOCurly) ->-                 do setAlrExpectingOCurly Nothing-                    setALRContext (ALRLayout expectingOCurly thisCol : context)-                    setNextToken t-                    return (L thisLoc ITocurly)-              | otherwise ->-                 do setAlrExpectingOCurly Nothing-                    setPendingImplicitTokens [L lastLoc ITccurly]-                    setNextToken t-                    return (L lastLoc ITocurly)-             (_, _, Just expectingOCurly) ->-                 do setAlrExpectingOCurly Nothing-                    setALRContext (ALRLayout expectingOCurly thisCol : context)-                    setNextToken t-                    return (L thisLoc ITocurly)-             -- We do the [] cases earlier than in the spec, as we-             -- have an actual EOF token-             (ITeof, ALRLayout _ _ : ls, _) ->-                 do setALRContext ls-                    setNextToken t-                    return (L thisLoc ITccurly)-             (ITeof, _, _) ->-                 return t-             -- the other ITeof case omitted; general case below covers it-             (ITin, _, _)-              | justClosedExplicitLetBlock ->-                 return t-             (ITin, ALRLayout ALRLayoutLet _ : ls, _)-              | newLine ->-                 do setPendingImplicitTokens [t]-                    setALRContext ls-                    return (L thisLoc ITccurly)-             -- This next case is to handle a transitional issue:-             (ITwhere, ALRLayout _ col : ls, _)-              | newLine && thisCol == col && transitional ->-                 do addWarning Opt_WarnAlternativeLayoutRuleTransitional-                               (RealSrcSpan thisLoc)-                               (transitionalAlternativeLayoutWarning-                                    "`where' clause at the same depth as implicit layout block")-                    setALRContext ls-                    setNextToken t-                    -- Note that we use lastLoc, as we may need to close-                    -- more layouts, or give a semicolon-                    return (L lastLoc ITccurly)-             -- This next case is to handle a transitional issue:-             (ITvbar, ALRLayout _ col : ls, _)-              | newLine && thisCol == col && transitional ->-                 do addWarning Opt_WarnAlternativeLayoutRuleTransitional-                               (RealSrcSpan thisLoc)-                               (transitionalAlternativeLayoutWarning-                                    "`|' at the same depth as implicit layout block")-                    setALRContext ls-                    setNextToken t-                    -- Note that we use lastLoc, as we may need to close-                    -- more layouts, or give a semicolon-                    return (L lastLoc ITccurly)-             (_, ALRLayout _ col : ls, _)-              | newLine && thisCol == col ->-                 do setNextToken t-                    return (L thisLoc ITsemi)-              | newLine && thisCol < col ->-                 do setALRContext ls-                    setNextToken t-                    -- Note that we use lastLoc, as we may need to close-                    -- more layouts, or give a semicolon-                    return (L lastLoc ITccurly)-             -- We need to handle close before open, as 'then' is both-             -- an open and a close-             (u, _, _)-              | isALRclose u ->-                 case context of-                 ALRLayout _ _ : ls ->-                     do setALRContext ls-                        setNextToken t-                        return (L thisLoc ITccurly)-                 ALRNoLayout _ isLet : ls ->-                     do let ls' = if isALRopen u-                                     then ALRNoLayout (containsCommas u) False : ls-                                     else ls-                        setALRContext ls'-                        when isLet $ setJustClosedExplicitLetBlock True-                        return t-                 [] ->-                     do let ls = if isALRopen u-                                    then [ALRNoLayout (containsCommas u) False]-                                    else []-                        setALRContext ls-                        -- XXX This is an error in John's code, but-                        -- it looks reachable to me at first glance-                        return t-             (u, _, _)-              | isALRopen u ->-                 do setALRContext (ALRNoLayout (containsCommas u) False : context)-                    return t-             (ITin, ALRLayout ALRLayoutLet _ : ls, _) ->-                 do setALRContext ls-                    setPendingImplicitTokens [t]-                    return (L thisLoc ITccurly)-             (ITin, ALRLayout _ _ : ls, _) ->-                 do setALRContext ls-                    setNextToken t-                    return (L thisLoc ITccurly)-             -- the other ITin case omitted; general case below covers it-             (ITcomma, ALRLayout _ _ : ls, _)-              | topNoLayoutContainsCommas ls ->-                 do setALRContext ls-                    setNextToken t-                    return (L thisLoc ITccurly)-             (ITwhere, ALRLayout ALRLayoutDo _ : ls, _) ->-                 do setALRContext ls-                    setPendingImplicitTokens [t]-                    return (L thisLoc ITccurly)-             -- the other ITwhere case omitted; general case below covers it-             (_, _, _) -> return t--transitionalAlternativeLayoutWarning :: String -> SDoc-transitionalAlternativeLayoutWarning msg-    = text "transitional layout will not be accepted in the future:"-   $$ text msg--isALRopen :: Token -> Bool-isALRopen ITcase          = True-isALRopen ITif            = True-isALRopen ITthen          = True-isALRopen IToparen        = True-isALRopen ITobrack        = True-isALRopen ITocurly        = True--- GHC Extensions:-isALRopen IToubxparen     = True-isALRopen ITparenEscape   = True-isALRopen ITparenTyEscape = True-isALRopen _               = False--isALRclose :: Token -> Bool-isALRclose ITof     = True-isALRclose ITthen   = True-isALRclose ITelse   = True-isALRclose ITcparen = True-isALRclose ITcbrack = True-isALRclose ITccurly = True--- GHC Extensions:-isALRclose ITcubxparen = True-isALRclose _        = False--isNonDecreasingIndentation :: ALRLayout -> Bool-isNonDecreasingIndentation ALRLayoutDo = True-isNonDecreasingIndentation _           = False--containsCommas :: Token -> Bool-containsCommas IToparen = True-containsCommas ITobrack = True--- John doesn't have {} as containing commas, but records contain them,--- which caused a problem parsing Cabal's Distribution.Simple.InstallDirs--- (defaultInstallDirs).-containsCommas ITocurly = True--- GHC Extensions:-containsCommas IToubxparen = True-containsCommas _        = False--topNoLayoutContainsCommas :: [ALRContext] -> Bool-topNoLayoutContainsCommas [] = False-topNoLayoutContainsCommas (ALRLayout _ _ : ls) = topNoLayoutContainsCommas ls-topNoLayoutContainsCommas (ALRNoLayout b _ : _) = b--lexToken :: P (RealLocated Token)-lexToken = do-  inp@(AI loc1 buf) <- getInput-  sc <- getLexState-  exts <- getExts-  case alexScanUser exts inp sc of-    AlexEOF -> do-        let span = mkRealSrcSpan loc1 loc1-        setLastToken span 0-        return (L span ITeof)-    AlexError (AI loc2 buf) ->-        reportLexError loc1 loc2 buf "lexical error"-    AlexSkip inp2 _ -> do-        setInput inp2-        lexToken-    AlexToken inp2@(AI end buf2) _ t -> do-        setInput inp2-        let span = mkRealSrcSpan loc1 end-        let bytes = byteDiff buf buf2-        span `seq` setLastToken span bytes-        lt <- t span buf bytes-        case unLoc lt of-          ITlineComment _  -> return lt-          ITblockComment _ -> return lt-          lt' -> do-            setLastTk lt'-            return lt--reportLexError :: RealSrcLoc -> RealSrcLoc -> StringBuffer -> [Char] -> P a-reportLexError loc1 loc2 buf str-  | atEnd buf = failLocMsgP loc1 loc2 (str ++ " at end of input")-  | otherwise =-  let c = fst (nextChar buf)-  in if c == '\0' -- decoding errors are mapped to '\0', see utf8DecodeChar#-     then failLocMsgP loc2 loc2 (str ++ " (UTF-8 decoding error)")-     else failLocMsgP loc1 loc2 (str ++ " at character " ++ show c)--lexTokenStream :: StringBuffer -> RealSrcLoc -> DynFlags -> ParseResult [Located Token]-lexTokenStream buf loc dflags = unP go initState-    where dflags' = gopt_set (gopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream-          initState = (mkPState dflags' buf loc) { use_pos_prags = False }-          go = do-            ltok <- lexer False return-            case ltok of-              L _ ITeof -> return []-              _ -> liftM (ltok:) go--linePrags = Map.singleton "line" linePrag--fileHeaderPrags = Map.fromList([("options", lex_string_prag IToptions_prag),-                                 ("options_ghc", lex_string_prag IToptions_prag),-                                 ("options_haddock", lex_string_prag ITdocOptions),-                                 ("language", token ITlanguage_prag),-                                 ("include", lex_string_prag ITinclude_prag)])--ignoredPrags = Map.fromList (map ignored pragmas)-               where ignored opt = (opt, nested_comment lexToken)-                     impls = ["hugs", "nhc98", "jhc", "yhc", "catch", "derive"]-                     options_pragmas = map ("options_" ++) impls-                     -- CFILES is a hugs-only thing.-                     pragmas = options_pragmas ++ ["cfiles", "contract"]--oneWordPrags = Map.fromList [-     ("rules", rulePrag),-     ("inline",-         strtoken (\s -> (ITinline_prag (SourceText s) Inline FunLike))),-     ("inlinable",-         strtoken (\s -> (ITinline_prag (SourceText s) Inlinable FunLike))),-     ("inlineable",-         strtoken (\s -> (ITinline_prag (SourceText s) Inlinable FunLike))),-                                    -- Spelling variant-     ("notinline",-         strtoken (\s -> (ITinline_prag (SourceText s) NoInline FunLike))),-     ("specialize", strtoken (\s -> ITspec_prag (SourceText s))),-     ("source", strtoken (\s -> ITsource_prag (SourceText s))),-     ("warning", strtoken (\s -> ITwarning_prag (SourceText s))),-     ("deprecated", strtoken (\s -> ITdeprecated_prag (SourceText s))),-     ("scc", strtoken (\s -> ITscc_prag (SourceText s))),-     ("generated", strtoken (\s -> ITgenerated_prag (SourceText s))),-     ("core", strtoken (\s -> ITcore_prag (SourceText s))),-     ("unpack", strtoken (\s -> ITunpack_prag (SourceText s))),-     ("nounpack", strtoken (\s -> ITnounpack_prag (SourceText s))),-     ("ann", strtoken (\s -> ITann_prag (SourceText s))),-     ("vectorize", strtoken (\s -> ITvect_prag (SourceText s))),-     ("novectorize", strtoken (\s -> ITnovect_prag (SourceText s))),-     ("minimal", strtoken (\s -> ITminimal_prag (SourceText s))),-     ("overlaps", strtoken (\s -> IToverlaps_prag (SourceText s))),-     ("overlappable", strtoken (\s -> IToverlappable_prag (SourceText s))),-     ("overlapping", strtoken (\s -> IToverlapping_prag (SourceText s))),-     ("incoherent", strtoken (\s -> ITincoherent_prag (SourceText s))),-     ("ctype", strtoken (\s -> ITctype (SourceText s))),-     ("complete", strtoken (\s -> ITcomplete_prag (SourceText s))),-     ("column", columnPrag)-     ]--twoWordPrags = Map.fromList([-     ("inline conlike",-         strtoken (\s -> (ITinline_prag (SourceText s) Inline ConLike))),-     ("notinline conlike",-         strtoken (\s -> (ITinline_prag (SourceText s) NoInline ConLike))),-     ("specialize inline",-         strtoken (\s -> (ITspec_inline_prag (SourceText s) True))),-     ("specialize notinline",-         strtoken (\s -> (ITspec_inline_prag (SourceText s) False))),-     ("vectorize scalar",-         strtoken (\s -> ITvect_scalar_prag (SourceText s)))])--dispatch_pragmas :: Map String Action -> Action-dispatch_pragmas prags span buf len = case Map.lookup (clean_pragma (lexemeToString buf len)) prags of-                                       Just found -> found span buf len-                                       Nothing -> lexError "unknown pragma"--known_pragma :: Map String Action -> AlexAccPred ExtsBitmap-known_pragma prags _ (AI _ startbuf) _ (AI _ curbuf)- = isKnown && nextCharIsNot curbuf pragmaNameChar-    where l = lexemeToString startbuf (byteDiff startbuf curbuf)-          isKnown = isJust $ Map.lookup (clean_pragma l) prags-          pragmaNameChar c = isAlphaNum c || c == '_'--clean_pragma :: String -> String-clean_pragma prag = canon_ws (map toLower (unprefix prag))-                    where unprefix prag' = case stripPrefix "{-#" prag' of-                                             Just rest -> rest-                                             Nothing -> prag'-                          canonical prag' = case prag' of-                                              "noinline" -> "notinline"-                                              "specialise" -> "specialize"-                                              "vectorise" -> "vectorize"-                                              "novectorise" -> "novectorize"-                                              "constructorlike" -> "conlike"-                                              _ -> prag'-                          canon_ws s = unwords (map canonical (words s))----{--%************************************************************************-%*                                                                      *-        Helper functions for generating annotations in the parser-%*                                                                      *-%************************************************************************--}---- | Encapsulated call to addAnnotation, requiring only the SrcSpan of---   the AST construct the annotation belongs to; together with the---   AnnKeywordId, this is the key of the annotation map.------   This type is useful for places in the parser where it is not yet---   known what SrcSpan an annotation should be added to.  The most---   common situation is when we are parsing a list: the annotations---   need to be associated with the AST element that *contains* the---   list, not the list itself.  'AddAnn' lets us defer adding the---   annotations until we finish parsing the list and are now parsing---   the enclosing element; we then apply the 'AddAnn' to associate---   the annotations.  Another common situation is where a common fragment of---   the AST has been factored out but there is no separate AST node for---   this fragment (this occurs in class and data declarations). In this---   case, the annotation belongs to the parent data declaration.------   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--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]-  where-    mj a l = (\s -> addAnnotation s a l)-    f = srcSpanFile ss-    sl = srcSpanStartLine ss-    sc = srcSpanStartCol ss-    el = srcSpanEndLine ss-    ec = srcSpanEndCol ss-    lo = mkSrcSpan (srcSpanStart s)         (mkSrcLoc f sl (sc+1))-    lc = mkSrcSpan (mkSrcLoc f el (ec - 1)) (srcSpanEnd s)---- | Move the annotations and comments belonging to the @old@ span to the @new@---   one.-moveAnnotations :: SrcSpan -> SrcSpan -> P ()-moveAnnotations old new = P $ \s ->-  let-    updateAnn ((l,a),v)-      | l == old = ((new,a),v)-      | otherwise = ((l,a),v)-    updateComment (l,c)-      | l == old = (new,c)-      | otherwise = (l,c)-  in-    POk s {-       annotations = map updateAnn (annotations s)-     , annotations_comments = map updateComment (annotations_comments s)-     } ()--queueComment :: Located Token -> P()-queueComment c = P $ \s -> POk s {-  comment_q = commentToAnnotation c : comment_q s-  } ()---- | Go through the @comment_q@ in @PState@ and remove all comments--- that belong within the given span-allocateComments :: SrcSpan -> P ()-allocateComments ss = P $ \s ->-  let-    (before,rest)  = break (\(L l _) -> isSubspanOf l ss) (comment_q s)-    (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)-     } ()--commentToAnnotation :: Located Token -> Located AnnotationComment-commentToAnnotation (L l (ITdocCommentNext s))  = L l (AnnDocCommentNext s)-commentToAnnotation (L l (ITdocCommentPrev s))  = L l (AnnDocCommentPrev s)-commentToAnnotation (L l (ITdocCommentNamed s)) = L l (AnnDocCommentNamed s)-commentToAnnotation (L l (ITdocSection n s))    = L l (AnnDocSection n s)-commentToAnnotation (L l (ITdocOptions s))      = L l (AnnDocOptions s)-commentToAnnotation (L l (ITlineComment s))     = L l (AnnLineComment s)-commentToAnnotation (L l (ITblockComment s))    = L l (AnnBlockComment s)-commentToAnnotation _                           = panic "commentToAnnotation"---- -----------------------------------------------------------------------isComment :: Token -> Bool-isComment (ITlineComment     _)   = True-isComment (ITblockComment    _)   = True-isComment _ = False--isDocComment :: Token -> Bool-isDocComment (ITdocCommentNext  _)   = True-isDocComment (ITdocCommentPrev  _)   = True-isDocComment (ITdocCommentNamed _)   = True-isDocComment (ITdocSection      _ _) = True-isDocComment (ITdocOptions      _)   = True-isDocComment _ = False--{- Note [Warnings in code generated by Alex]--We add the following warning suppression flags to all code generated by Alex:--{-# OPTIONS_GHC -fno-warn-unused-matches #-}-{-# OPTIONS_GHC -fno-warn-unused-binds #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}-{-# OPTIONS_GHC -fno-warn-tabs #-}-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}--Without these flags, current versions of Alex will generate code that is not-warning free. Note that this is the result of Alex' internals, not of the way-we have written our (Lexer).x files.--As always, we need code to be warning free when validating with -Werror.--The list of flags is as short as possible (at the time of writing), to try to-avoid suppressing warnings for bugs in our own code.--TODO. Reevaluate this situation once Alex >3.1.4 is released. Hopefully you-can remove these flags from all (Lexer).x files in the repository, and also-delete this Note. Don't forget to update aclocal.m4, and send a HEADS UP-message to ghc-devs.--The first release of Alex after 3.1.4 will either suppress all warnings itself-[1] (bad), or most warnings will be fixed and only a few select ones will be-suppressed by default [2] (better).--[1] https://github.com/simonmar/alex/commit/1eefcde22ba1bb9b51d523814415714e20f0761e-[2] https://github.com/simonmar/alex/pull/69--}---bol,column_prag,layout,layout_do,layout_if,layout_left,line_prag1,line_prag1a,line_prag1b,line_prag2,line_prag2a,line_prag2b,option_prags :: Int-bol = 1-column_prag = 2-layout = 3-layout_do = 4-layout_if = 5-layout_left = 6-line_prag1 = 7-line_prag1a = 8-line_prag1b = 9-line_prag2 = 10-line_prag2a = 11-line_prag2b = 12-option_prags = 13-alex_action_1 =  warnTab -alex_action_2 =  nested_comment lexToken -alex_action_3 =  lineCommentToken -alex_action_4 =  lineCommentToken -alex_action_5 =  lineCommentToken -alex_action_6 =  lineCommentToken -alex_action_7 =  lineCommentToken -alex_action_8 =  lineCommentToken -alex_action_10 =  begin line_prag1 -alex_action_11 =  begin line_prag1 -alex_action_14 =  do_bol -alex_action_15 =  hopefully_open_brace -alex_action_17 =  begin line_prag1 -alex_action_18 =  new_layout_context True dontGenerateSemic ITvbar -alex_action_19 =  pop -alex_action_20 =  new_layout_context True  generateSemic ITvocurly -alex_action_21 =  new_layout_context False generateSemic ITvocurly -alex_action_22 =  do_layout_left -alex_action_23 =  begin bol -alex_action_24 =  dispatch_pragmas linePrags -alex_action_25 =  setLine line_prag1a -alex_action_26 =  setFile line_prag1b -alex_action_27 =  pop -alex_action_28 =  setLine line_prag2a -alex_action_29 =  setFile line_prag2b -alex_action_30 =  pop -alex_action_31 =  setColumn -alex_action_32 =  dispatch_pragmas twoWordPrags -alex_action_33 =  dispatch_pragmas oneWordPrags -alex_action_34 =  dispatch_pragmas ignoredPrags -alex_action_35 =  endPrag -alex_action_36 =  dispatch_pragmas fileHeaderPrags -alex_action_37 =  nested_comment lexToken -alex_action_38 =  warnThen Opt_WarnUnrecognisedPragmas (text "Unrecognised pragma")-                    (nested_comment lexToken) -alex_action_39 =  multiline_doc_comment -alex_action_40 =  nested_doc_comment -alex_action_41 =  token ITopabrack -alex_action_42 =  token ITcpabrack -alex_action_43 =  token (ITopenExpQuote NoE-                                                                NormalSyntax) -alex_action_44 =  token (ITopenTExpQuote NoE) -alex_action_45 =  token (ITopenExpQuote HasE-                                                                NormalSyntax) -alex_action_46 =  token (ITopenTExpQuote HasE) -alex_action_47 =  token ITopenPatQuote -alex_action_48 =  layout_token ITopenDecQuote -alex_action_49 =  token ITopenTypQuote -alex_action_50 =  token (ITcloseQuote-                                                                NormalSyntax) -alex_action_51 =  token ITcloseTExpQuote -alex_action_52 =  skip_one_varid ITidEscape -alex_action_53 =  skip_two_varid ITidTyEscape -alex_action_54 =  token ITparenEscape -alex_action_55 =  token ITparenTyEscape -alex_action_56 =  lex_quasiquote_tok -alex_action_57 =  lex_qquasiquote_tok -alex_action_58 =  token (ITopenExpQuote NoE UnicodeSyntax) -alex_action_59 =  token (ITcloseQuote UnicodeSyntax) -alex_action_60 =  token ITtypeApp -alex_action_61 =  special (IToparenbar NormalSyntax) -alex_action_62 =  special (ITcparenbar NormalSyntax) -alex_action_63 =  special (IToparenbar UnicodeSyntax) -alex_action_64 =  special (ITcparenbar UnicodeSyntax) -alex_action_65 =  skip_one_varid ITdupipvarid -alex_action_66 =  skip_one_varid ITlabelvarid -alex_action_67 =  token IToubxparen -alex_action_68 =  token ITcubxparen -alex_action_69 =  special IToparen -alex_action_70 =  special ITcparen -alex_action_71 =  special ITobrack -alex_action_72 =  special ITcbrack -alex_action_73 =  special ITcomma -alex_action_74 =  special ITsemi -alex_action_75 =  special ITbackquote -alex_action_76 =  open_brace -alex_action_77 =  close_brace -alex_action_78 =  idtoken qvarid -alex_action_79 =  idtoken qconid -alex_action_80 =  varid -alex_action_81 =  idtoken conid -alex_action_82 =  idtoken qvarid -alex_action_83 =  idtoken qconid -alex_action_84 =  varid -alex_action_85 =  idtoken conid -alex_action_86 =  idtoken qvarsym -alex_action_87 =  idtoken qconsym -alex_action_88 =  varsym -alex_action_89 =  consym -alex_action_90 =  tok_num positive 0 0 decimal -alex_action_91 =  tok_num positive 2 2 binary -alex_action_92 =  tok_num positive 2 2 octal -alex_action_93 =  tok_num positive 2 2 hexadecimal -alex_action_94 =  tok_num negative 1 1 decimal -alex_action_95 =  tok_num negative 3 3 binary -alex_action_96 =  tok_num negative 3 3 octal -alex_action_97 =  tok_num negative 3 3 hexadecimal -alex_action_98 =  strtoken tok_float -alex_action_99 =  strtoken tok_float -alex_action_100 =  strtoken tok_hex_float -alex_action_101 =  strtoken tok_hex_float -alex_action_102 =  tok_primint positive 0 1 decimal -alex_action_103 =  tok_primint positive 2 3 binary -alex_action_104 =  tok_primint positive 2 3 octal -alex_action_105 =  tok_primint positive 2 3 hexadecimal -alex_action_106 =  tok_primint negative 1 2 decimal -alex_action_107 =  tok_primint negative 3 4 binary -alex_action_108 =  tok_primint negative 3 4 octal -alex_action_109 =  tok_primint negative 3 4 hexadecimal -alex_action_110 =  tok_primword 0 2 decimal -alex_action_111 =  tok_primword 2 4 binary -alex_action_112 =  tok_primword 2 4 octal -alex_action_113 =  tok_primword 2 4 hexadecimal -alex_action_114 =  init_strtoken 1 tok_primfloat -alex_action_115 =  init_strtoken 2 tok_primdouble -alex_action_116 =  lex_char_tok -alex_action_117 =  lex_string_tok -{-# LINE 1 "templates/GenericTemplate.hs" #-}--- -------------------------------------------------------------------------------- ALEX TEMPLATE------ This code is in the PUBLIC DOMAIN; you may copy it freely and use--- it for any purpose whatsoever.---- -------------------------------------------------------------------------------- INTERNALS and main scanner engine-------------------- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.-#if __GLASGOW_HASKELL__ > 706-#define GTE(n,m) (tagToEnum# (n >=# m))-#define EQ(n,m) (tagToEnum# (n ==# m))-#else-#define GTE(n,m) (n >=# m)-#define EQ(n,m) (n ==# m)-#endif--------------------data AlexAddr = AlexA# Addr#--- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.-#if __GLASGOW_HASKELL__ < 503-uncheckedShiftL# = shiftL#-#endif--{-# INLINE alexIndexInt16OffAddr #-}-alexIndexInt16OffAddr (AlexA# arr) off =-#ifdef WORDS_BIGENDIAN-  narrow16Int# i-  where-        i    = word2Int# ((high `uncheckedShiftL#` 8#) `or#` low)-        high = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))-        low  = int2Word# (ord# (indexCharOffAddr# arr off'))-        off' = off *# 2#-#else-  indexInt16OffAddr# arr off-#endif------{-# INLINE alexIndexInt32OffAddr #-}-alexIndexInt32OffAddr (AlexA# arr) off =-#ifdef WORDS_BIGENDIAN-  narrow32Int# i-  where-   i    = word2Int# ((b3 `uncheckedShiftL#` 24#) `or#`-                     (b2 `uncheckedShiftL#` 16#) `or#`-                     (b1 `uncheckedShiftL#` 8#) `or#` b0)-   b3   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 3#)))-   b2   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 2#)))-   b1   = int2Word# (ord# (indexCharOffAddr# arr (off' +# 1#)))-   b0   = int2Word# (ord# (indexCharOffAddr# arr off'))-   off' = off *# 4#-#else-  indexInt32OffAddr# arr off-#endif-------#if __GLASGOW_HASKELL__ < 503-quickIndex arr i = arr ! i-#else--- GHC >= 503, unsafeAt is available from Data.Array.Base.-quickIndex = unsafeAt-#endif------- -------------------------------------------------------------------------------- Main lexing routines--data AlexReturn a-  = AlexEOF-  | AlexError  !AlexInput-  | AlexSkip   !AlexInput !Int-  | AlexToken  !AlexInput !Int a---- alexScan :: AlexInput -> StartCode -> AlexReturn a-alexScan input__ (I# (sc))-  = alexScanUser undefined input__ (I# (sc))--alexScanUser user__ input__ (I# (sc))-  = case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of-  (AlexNone, input__') ->-    case alexGetByte input__ of-      Nothing ->----                                   AlexEOF-      Just _ ->----                                   AlexError input__'--  (AlexLastSkip input__'' len, _) ->----    AlexSkip input__'' len--  (AlexLastAcc k input__''' len, _) ->----    AlexToken input__''' len (alex_actions ! k)----- Push the input through the DFA, remembering the most recent accepting--- state it encountered.--alex_scan_tkn user__ orig_input len input__ s last_acc =-  input__ `seq` -- strict in the input-  let-  new_acc = (check_accs (alex_accept `quickIndex` (I# (s))))-  in-  new_acc `seq`-  case alexGetByte input__ of-     Nothing -> (new_acc, input__)-     Just (c, new_input) ->----      case fromIntegral c of { (I# (ord_c)) ->-        let-                base   = alexIndexInt32OffAddr alex_base s-                offset = (base +# ord_c)-                check  = alexIndexInt16OffAddr alex_check offset--                new_s = if GTE(offset,0#) && EQ(check,ord_c)-                          then alexIndexInt16OffAddr alex_table offset-                          else alexIndexInt16OffAddr alex_deflt s-        in-        case new_s of-            -1# -> (new_acc, input__)-                -- on an error, we want to keep the input *before* the-                -- character that failed, not after.-            _ -> alex_scan_tkn user__ orig_input (if c < 0x80 || c >= 0xC0 then (len +# 1#) else len)-                                                -- note that the length is increased ONLY if this is the 1st byte in a char encoding)-                        new_input new_s new_acc-      }-  where-        check_accs (AlexAccNone) = last_acc-        check_accs (AlexAcc a  ) = AlexLastAcc a input__ (I# (len))-        check_accs (AlexAccSkip) = AlexLastSkip  input__ (I# (len))--        check_accs (AlexAccPred a predx rest)-           | predx user__ orig_input (I# (len)) input__-           = AlexLastAcc a input__ (I# (len))-           | otherwise-           = check_accs rest-        check_accs (AlexAccSkipPred predx rest)-           | predx user__ orig_input (I# (len)) input__-           = AlexLastSkip input__ (I# (len))-           | otherwise-           = check_accs rest---data AlexLastAcc-  = AlexNone-  | AlexLastAcc !Int !AlexInput !Int-  | AlexLastSkip     !AlexInput !Int--data AlexAcc user-  = AlexAccNone-  | AlexAcc Int-  | AlexAccSkip--  | AlexAccPred Int (AlexAccPred user) (AlexAcc user)-  | AlexAccSkipPred (AlexAccPred user) (AlexAcc user)--type AlexAccPred user = user -> AlexInput -> Int -> AlexInput -> Bool---- -------------------------------------------------------------------------------- Predicates on a rule--alexAndPred p1 p2 user__ in1 len in2-  = p1 user__ in1 len in2 && p2 user__ in1 len in2----alexPrevCharIsPred :: Char -> AlexAccPred _-alexPrevCharIs c _ input__ _ _ = c == alexInputPrevChar input__--alexPrevCharMatches f _ input__ _ _ = f (alexInputPrevChar input__)----alexPrevCharIsOneOfPred :: Array Char Bool -> AlexAccPred _-alexPrevCharIsOneOf arr _ input__ _ _ = arr ! alexInputPrevChar input__----alexRightContext :: Int -> AlexAccPred _-alexRightContext (I# (sc)) user__ _ _ input__ =-     case alex_scan_tkn user__ input__ 0# input__ sc AlexNone of-          (AlexNone, _) -> False-          _ -> True-        -- TODO: there's no need to find the longest-        -- match when checking the right context, just-        -- the first match will do.-
+ parser/Lexer.x view
@@ -0,0 +1,3088 @@+-----------------------------------------------------------------------------+-- (c) The University of Glasgow, 2006+--+-- GHC's lexer for Haskell 2010 [1].+--+-- This is a combination of an Alex-generated lexer [2] from a regex+-- definition, with some hand-coded bits. [3]+--+-- Completely accurate information about token-spans within the source+-- file is maintained.  Every token has a start and end RealSrcLoc+-- attached to it.+--+-- References:+-- [1] https://www.haskell.org/onlinereport/haskell2010/haskellch2.html+-- [2] http://www.haskell.org/alex/+-- [3] https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Parser+--+-----------------------------------------------------------------------------++--   ToDo / known bugs:+--    - parsing integers is a bit slow+--    - readRational is a bit slow+--+--   Known bugs, that were also in the previous version:+--    - M... should be 3 tokens, not 1.+--    - pragma-end should be only valid in a pragma++--   qualified operator NOTES.+--+--   - If M.(+) is a single lexeme, then..+--     - Probably (+) should be a single lexeme too, for consistency.+--       Otherwise ( + ) would be a prefix operator, but M.( + ) would not be.+--     - But we have to rule out reserved operators, otherwise (..) becomes+--       a different lexeme.+--     - Should we therefore also rule out reserved operators in the qualified+--       form?  This is quite difficult to achieve.  We don't do it for+--       qualified varids.+++-- -----------------------------------------------------------------------------+-- Alex "Haskell code fragment top"++{+{-# LANGUAGE BangPatterns #-}++-- See Note [Warnings in code generated by Alex] in compiler/parser/Lexer.x+{-# OPTIONS_GHC -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-tabs #-}+{-# OPTIONS_GHC -fno-warn-missing-signatures #-}++{-# OPTIONS_GHC -funbox-strict-fields #-}++module Lexer (+   Token(..), lexer, pragState, mkPState, mkPStatePure, PState(..),+   P(..), ParseResult(..), mkParserFlags, ParserFlags(..), getSrcLoc,+   getPState, extopt, withThisPackage,+   failLocMsgP, failSpanMsgP, srcParseFail,+   getMessages,+   popContext, pushModuleContext, setLastToken, setSrcLoc,+   activeContext, nextIsEOF,+   getLexState, popLexState, pushLexState,+   extension, bangPatEnabled, datatypeContextsEnabled,+   traditionalRecordSyntaxEnabled,+   explicitForallEnabled,+   inRulePrag,+   explicitNamespacesEnabled,+   patternSynonymsEnabled,+   sccProfilingOn, hpcEnabled,+   starIsTypeEnabled,+   addWarning,+   lexTokenStream,+   addAnnotation,AddAnn,addAnnsAt,mkParensApiAnn,+   commentToAnnotation,+   moveAnnotations+  ) where++import GhcPrelude++-- base+import Control.Monad+import Control.Monad.Fail as MonadFail+import Data.Bits+import Data.Char+import Data.List+import Data.Maybe+import Data.Word++import EnumSet (EnumSet)+import qualified EnumSet++-- ghc-boot+import qualified GHC.LanguageExtensions as LangExt++-- bytestring+import Data.ByteString (ByteString)++-- containers+import Data.Map (Map)+import qualified Data.Map as Map++-- compiler/utils+import Bag+import Outputable+import StringBuffer+import FastString+import UniqFM+import Util             ( readRational, readHexRational )++-- compiler/main+import ErrUtils+import DynFlags++-- compiler/basicTypes+import SrcLoc+import Module+import BasicTypes     ( InlineSpec(..), RuleMatchInfo(..),+                        IntegralLit(..), FractionalLit(..),+                        SourceText(..) )++-- compiler/parser+import Ctype++import ApiAnnotation+}++-- -----------------------------------------------------------------------------+-- Alex "Character set macros"++-- NB: The logic behind these definitions is also reflected in basicTypes/Lexeme.hs+-- Any changes here should likely be reflected there.+$unispace    = \x05 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$nl          = [\n\r\f]+$whitechar   = [$nl\v\ $unispace]+$white_no_nl = $whitechar # \n -- TODO #8424+$tab         = \t++$ascdigit  = 0-9+$unidigit  = \x03 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$decdigit  = $ascdigit -- for now, should really be $digit (ToDo)+$digit     = [$ascdigit $unidigit]++$special   = [\(\)\,\;\[\]\`\{\}]+$ascsymbol = [\!\#\$\%\&\*\+\.\/\<\=\>\?\@\\\^\|\-\~\:]+$unisymbol = \x04 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$symbol    = [$ascsymbol $unisymbol] # [$special \_\"\']++$unilarge  = \x01 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$asclarge  = [A-Z]+$large     = [$asclarge $unilarge]++$unismall  = \x02 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$ascsmall  = [a-z]+$small     = [$ascsmall $unismall \_]++$unigraphic = \x06 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$graphic   = [$small $large $symbol $digit $special $unigraphic \"\']++$binit     = 0-1+$octit     = 0-7+$hexit     = [$decdigit A-F a-f]++$uniidchar = \x07 -- Trick Alex into handling Unicode. See [Unicode in Alex].+$idchar    = [$small $large $digit $uniidchar \']++$pragmachar = [$small $large $digit]++$docsym    = [\| \^ \* \$]+++-- -----------------------------------------------------------------------------+-- Alex "Regular expression macros"++@varid     = $small $idchar*          -- variable identifiers+@conid     = $large $idchar*          -- constructor identifiers++@varsym    = ($symbol # \:) $symbol*  -- variable (operator) symbol+@consym    = \: $symbol*              -- constructor (operator) symbol++-- See Note [Lexing NumericUnderscores extension] and #14473+@numspc       = _*                   -- numeric spacer (#14473)+@decimal      = $decdigit(@numspc $decdigit)*+@binary       = $binit(@numspc $binit)*+@octal        = $octit(@numspc $octit)*+@hexadecimal  = $hexit(@numspc $hexit)*+@exponent     = @numspc [eE] [\-\+]? @decimal+@bin_exponent = @numspc [pP] [\-\+]? @decimal++@qual = (@conid \.)++@qvarid = @qual @varid+@qconid = @qual @conid+@qvarsym = @qual @varsym+@qconsym = @qual @consym++@floating_point = @numspc @decimal \. @decimal @exponent? | @numspc @decimal @exponent+@hex_floating_point = @numspc @hexadecimal \. @hexadecimal @bin_exponent? | @numspc @hexadecimal @bin_exponent++-- normal signed numerical literals can only be explicitly negative,+-- not explicitly positive (contrast @exponent)+@negative = \-+@signed = @negative ?+++-- -----------------------------------------------------------------------------+-- Alex "Identifier"++haskell :-+++-- -----------------------------------------------------------------------------+-- Alex "Rules"++-- everywhere: skip whitespace+$white_no_nl+ ;+$tab          { warnTab }++-- Everywhere: deal with nested comments.  We explicitly rule out+-- pragmas, "{-#", so that we don't accidentally treat them as comments.+-- (this can happen even though pragmas will normally take precedence due to+-- longest-match, because pragmas aren't valid in every state, but comments+-- are). We also rule out nested Haddock comments, if the -haddock flag is+-- set.++"{-" / { isNormalComment } { nested_comment lexToken }++-- Single-line comments are a bit tricky.  Haskell 98 says that two or+-- more dashes followed by a symbol should be parsed as a varsym, so we+-- have to exclude those.++-- Since Haddock comments aren't valid in every state, we need to rule them+-- out here.++-- The following two rules match comments that begin with two dashes, but+-- continue with a different character. The rules test that this character+-- is not a symbol (in which case we'd have a varsym), and that it's not a+-- space followed by a Haddock comment symbol (docsym) (in which case we'd+-- have a Haddock comment). The rules then munch the rest of the line.++"-- " ~$docsym .* { lineCommentToken }+"--" [^$symbol \ ] .* { lineCommentToken }++-- Next, match Haddock comments if no -haddock flag++"-- " $docsym .* / { ifExtension (not . haddockEnabled) } { lineCommentToken }++-- Now, when we've matched comments that begin with 2 dashes and continue+-- with a different character, we need to match comments that begin with three+-- or more dashes (which clearly can't be Haddock comments). We only need to+-- make sure that the first non-dash character isn't a symbol, and munch the+-- rest of the line.++"---"\-* ~$symbol .* { lineCommentToken }++-- Since the previous rules all match dashes followed by at least one+-- character, we also need to match a whole line filled with just dashes.++"--"\-* / { atEOL } { lineCommentToken }++-- We need this rule since none of the other single line comment rules+-- actually match this case.++"-- " / { atEOL } { lineCommentToken }++-- 'bol' state: beginning of a line.  Slurp up all the whitespace (including+-- blank lines) until we find a non-whitespace character, then do layout+-- processing.+--+-- One slight wibble here: what if the line begins with {-#? In+-- theory, we have to lex the pragma to see if it's one we recognise,+-- and if it is, then we backtrack and do_bol, otherwise we treat it+-- as a nested comment.  We don't bother with this: if the line begins+-- with {-#, then we'll assume it's a pragma we know about and go for do_bol.+<bol> {+  \n                                    ;+  ^\# line                              { begin line_prag1 }+  ^\# / { followedByDigit }             { begin line_prag1 }+  ^\# pragma .* \n                      ; -- GCC 3.3 CPP generated, apparently+  ^\# \! .* \n                          ; -- #!, for scripts+  ()                                    { do_bol }+}++-- after a layout keyword (let, where, do, of), we begin a new layout+-- context if the curly brace is missing.+-- Careful! This stuff is quite delicate.+<layout, layout_do, layout_if> {+  \{ / { notFollowedBy '-' }            { hopefully_open_brace }+        -- we might encounter {-# here, but {- has been handled already+  \n                                    ;+  ^\# (line)?                           { begin line_prag1 }+}++-- after an 'if', a vertical bar starts a layout context for MultiWayIf+<layout_if> {+  \| / { notFollowedBySymbol }          { new_layout_context True dontGenerateSemic ITvbar }+  ()                                    { pop }+}++-- do is treated in a subtly different way, see new_layout_context+<layout>    ()                          { new_layout_context True  generateSemic ITvocurly }+<layout_do> ()                          { new_layout_context False generateSemic ITvocurly }++-- after a new layout context which was found to be to the left of the+-- previous context, we have generated a '{' token, and we now need to+-- generate a matching '}' token.+<layout_left>  ()                       { do_layout_left }++<0,option_prags> \n                     { begin bol }++"{-#" $whitechar* $pragmachar+ / { known_pragma linePrags }+                                { dispatch_pragmas linePrags }++-- single-line line pragmas, of the form+--    # <line> "<file>" <extra-stuff> \n+<line_prag1> @decimal                   { setLine line_prag1a }+<line_prag1a> \" [$graphic \ ]* \"      { setFile line_prag1b }+<line_prag1b> .*                        { pop }++-- Haskell-style line pragmas, of the form+--    {-# LINE <line> "<file>" #-}+<line_prag2> @decimal                   { setLine line_prag2a }+<line_prag2a> \" [$graphic \ ]* \"      { setFile line_prag2b }+<line_prag2b> "#-}"|"-}"                { pop }+   -- NOTE: accept -} at the end of a LINE pragma, for compatibility+   -- with older versions of GHC which generated these.++-- Haskell-style column pragmas, of the form+--    {-# COLUMN <column> #-}+<column_prag> @decimal $whitechar* "#-}" { setColumn }++<0,option_prags> {+  "{-#" $whitechar* $pragmachar++        $whitechar+ $pragmachar+ / { known_pragma twoWordPrags }+                                 { dispatch_pragmas twoWordPrags }++  "{-#" $whitechar* $pragmachar+ / { known_pragma oneWordPrags }+                                 { dispatch_pragmas oneWordPrags }++  -- We ignore all these pragmas, but don't generate a warning for them+  "{-#" $whitechar* $pragmachar+ / { known_pragma ignoredPrags }+                                 { dispatch_pragmas ignoredPrags }++  -- ToDo: should only be valid inside a pragma:+  "#-}"                          { endPrag }+}++<option_prags> {+  "{-#"  $whitechar* $pragmachar+ / { known_pragma fileHeaderPrags }+                                   { dispatch_pragmas fileHeaderPrags }+}++<0> {+  -- In the "0" mode we ignore these pragmas+  "{-#"  $whitechar* $pragmachar+ / { known_pragma fileHeaderPrags }+                     { nested_comment lexToken }+}++<0,option_prags> {+  "{-#"  { warnThen Opt_WarnUnrecognisedPragmas (text "Unrecognised pragma")+                    (nested_comment lexToken) }+}++-- '0' state: ordinary lexemes++-- Haddock comments++<0,option_prags> {+  "-- " $docsym      / { ifExtension haddockEnabled } { multiline_doc_comment }+  "{-" \ ? $docsym   / { ifExtension haddockEnabled } { nested_doc_comment }+}++-- "special" symbols++<0> {+  "[|"        / { ifExtension thQuotesEnabled } { token (ITopenExpQuote NoE+                                                                NormalSyntax) }+  "[||"       / { ifExtension thQuotesEnabled } { token (ITopenTExpQuote NoE) }+  "[e|"       / { ifExtension thQuotesEnabled } { token (ITopenExpQuote HasE+                                                                NormalSyntax) }+  "[e||"      / { ifExtension thQuotesEnabled } { token (ITopenTExpQuote HasE) }+  "[p|"       / { ifExtension thQuotesEnabled } { token ITopenPatQuote }+  "[d|"       / { ifExtension thQuotesEnabled } { layout_token ITopenDecQuote }+  "[t|"       / { ifExtension thQuotesEnabled } { token ITopenTypQuote }+  "|]"        / { ifExtension thQuotesEnabled } { token (ITcloseQuote+                                                                NormalSyntax) }+  "||]"       / { ifExtension thQuotesEnabled } { token ITcloseTExpQuote }+  \$ @varid   / { ifExtension thEnabled } { skip_one_varid ITidEscape }+  "$$" @varid / { ifExtension thEnabled } { skip_two_varid ITidTyEscape }+  "$("        / { ifExtension thEnabled } { token ITparenEscape }+  "$$("       / { ifExtension thEnabled } { token ITparenTyEscape }++  "[" @varid "|"  / { ifExtension qqEnabled }+                     { lex_quasiquote_tok }++  -- qualified quasi-quote (#5555)+  "[" @qvarid "|"  / { ifExtension qqEnabled }+                     { lex_qquasiquote_tok }++  $unigraphic -- ⟦+    / { ifCurrentChar '⟦' `alexAndPred`+        ifExtension (\i -> unicodeSyntaxEnabled i && thQuotesEnabled i) }+    { token (ITopenExpQuote NoE UnicodeSyntax) }+  $unigraphic -- ⟧+    / { ifCurrentChar '⟧' `alexAndPred`+        ifExtension (\i -> unicodeSyntaxEnabled i && thQuotesEnabled i) }+    { token (ITcloseQuote UnicodeSyntax) }+}++  -- See Note [Lexing type applications]+<0> {+    [^ $idchar \) ] ^+  "@"+    / { ifExtension typeApplicationEnabled `alexAndPred` notFollowedBySymbol }+    { token ITtypeApp }+}++<0> {+  "(|" / { ifExtension arrowsEnabled `alexAndPred` notFollowedBySymbol }+                                        { special (IToparenbar NormalSyntax) }+  "|)" / { ifExtension arrowsEnabled }  { special (ITcparenbar NormalSyntax) }++  $unigraphic -- ⦇+    / { ifCurrentChar '⦇' `alexAndPred`+        ifExtension (\i -> unicodeSyntaxEnabled i && arrowsEnabled i) }+    { special (IToparenbar UnicodeSyntax) }+  $unigraphic -- ⦈+    / { ifCurrentChar '⦈' `alexAndPred`+        ifExtension (\i -> unicodeSyntaxEnabled i && arrowsEnabled i) }+    { special (ITcparenbar UnicodeSyntax) }+}++<0> {+  \? @varid / { ifExtension ipEnabled } { skip_one_varid ITdupipvarid }+}++<0> {+  "#" @varid / { ifExtension overloadedLabelsEnabled }+               { skip_one_varid ITlabelvarid }+}++<0> {+  "(#" / { orExtensions unboxedTuplesEnabled unboxedSumsEnabled }+         { token IToubxparen }+  "#)" / { orExtensions unboxedTuplesEnabled unboxedSumsEnabled }+         { token ITcubxparen }+}++<0,option_prags> {+  \(                                    { special IToparen }+  \)                                    { special ITcparen }+  \[                                    { special ITobrack }+  \]                                    { special ITcbrack }+  \,                                    { special ITcomma }+  \;                                    { special ITsemi }+  \`                                    { special ITbackquote }++  \{                                    { open_brace }+  \}                                    { close_brace }+}++<0,option_prags> {+  @qvarid                       { idtoken qvarid }+  @qconid                       { idtoken qconid }+  @varid                        { varid }+  @conid                        { idtoken conid }+}++<0> {+  @qvarid "#"+      / { ifExtension magicHashEnabled } { idtoken qvarid }+  @qconid "#"+      / { ifExtension magicHashEnabled } { idtoken qconid }+  @varid "#"+       / { ifExtension magicHashEnabled } { varid }+  @conid "#"+       / { ifExtension magicHashEnabled } { idtoken conid }+}++-- ToDo: - move `var` and (sym) into lexical syntax?+--       - remove backquote from $special?+<0> {+  @qvarsym                                         { idtoken qvarsym }+  @qconsym                                         { idtoken qconsym }+  @varsym                                          { varsym }+  @consym                                          { consym }+}++-- For the normal boxed literals we need to be careful+-- when trying to be close to Haskell98++-- Note [Lexing NumericUnderscores extension] (#14473)+--+-- NumericUnderscores extension allows underscores in numeric literals.+-- Multiple underscores are represented with @numspc macro.+-- To be simpler, we have only the definitions with underscores.+-- And then we have a separate function (tok_integral and tok_frac)+-- that validates the literals.+-- If extensions are not enabled, check that there are no underscores.+--+<0> {+  -- Normal integral literals (:: Num a => a, from Integer)+  @decimal                                                               { tok_num positive 0 0 decimal }+  0[bB] @numspc @binary        / { ifExtension binaryLiteralsEnabled }   { tok_num positive 2 2 binary }+  0[oO] @numspc @octal                                                   { tok_num positive 2 2 octal }+  0[xX] @numspc @hexadecimal                                             { tok_num positive 2 2 hexadecimal }+  @negative @decimal           / { ifExtension negativeLiteralsEnabled } { tok_num negative 1 1 decimal }+  @negative 0[bB] @numspc @binary  / { ifExtension negativeLiteralsEnabled `alexAndPred`+                                       ifExtension binaryLiteralsEnabled }   { tok_num negative 3 3 binary }+  @negative 0[oO] @numspc @octal   / { ifExtension negativeLiteralsEnabled } { tok_num negative 3 3 octal }+  @negative 0[xX] @numspc @hexadecimal / { ifExtension negativeLiteralsEnabled } { tok_num negative 3 3 hexadecimal }++  -- Normal rational literals (:: Fractional a => a, from Rational)+  @floating_point                                                        { tok_frac 0 tok_float }+  @negative @floating_point    / { ifExtension negativeLiteralsEnabled } { tok_frac 0 tok_float }+  0[xX] @numspc @hex_floating_point     / { ifExtension hexFloatLiteralsEnabled } { tok_frac 0 tok_hex_float }+  @negative 0[xX] @numspc @hex_floating_point / { ifExtension hexFloatLiteralsEnabled `alexAndPred`+                                                  ifExtension negativeLiteralsEnabled } { tok_frac 0 tok_hex_float }+}++<0> {+  -- Unboxed ints (:: Int#) and words (:: Word#)+  -- It's simpler (and faster?) to give separate cases to the negatives,+  -- especially considering octal/hexadecimal prefixes.+  @decimal                     \# / { ifExtension magicHashEnabled } { tok_primint positive 0 1 decimal }+  0[bB] @numspc @binary        \# / { ifExtension magicHashEnabled `alexAndPred`+                                      ifExtension binaryLiteralsEnabled } { tok_primint positive 2 3 binary }+  0[oO] @numspc @octal         \# / { ifExtension magicHashEnabled } { tok_primint positive 2 3 octal }+  0[xX] @numspc @hexadecimal   \# / { ifExtension magicHashEnabled } { tok_primint positive 2 3 hexadecimal }+  @negative @decimal           \# / { ifExtension magicHashEnabled } { tok_primint negative 1 2 decimal }+  @negative 0[bB] @numspc @binary  \# / { ifExtension magicHashEnabled `alexAndPred`+                                          ifExtension binaryLiteralsEnabled } { tok_primint negative 3 4 binary }+  @negative 0[oO] @numspc @octal   \# / { ifExtension magicHashEnabled } { tok_primint negative 3 4 octal }+  @negative 0[xX] @numspc @hexadecimal \# / { ifExtension magicHashEnabled } { tok_primint negative 3 4 hexadecimal }++  @decimal                     \# \# / { ifExtension magicHashEnabled } { tok_primword 0 2 decimal }+  0[bB] @numspc @binary        \# \# / { ifExtension magicHashEnabled `alexAndPred`+                                         ifExtension binaryLiteralsEnabled } { tok_primword 2 4 binary }+  0[oO] @numspc @octal         \# \# / { ifExtension magicHashEnabled } { tok_primword 2 4 octal }+  0[xX] @numspc @hexadecimal   \# \# / { ifExtension magicHashEnabled } { tok_primword 2 4 hexadecimal }++  -- Unboxed floats and doubles (:: Float#, :: Double#)+  -- prim_{float,double} work with signed literals+  @signed @floating_point \# / { ifExtension magicHashEnabled } { tok_frac 1 tok_primfloat }+  @signed @floating_point \# \# / { ifExtension magicHashEnabled } { tok_frac 2 tok_primdouble }+}++-- Strings and chars are lexed by hand-written code.  The reason is+-- that even if we recognise the string or char here in the regex+-- lexer, we would still have to parse the string afterward in order+-- to convert it to a String.+<0> {+  \'                            { lex_char_tok }+  \"                            { lex_string_tok }+}++-- Note [Lexing type applications]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- The desired syntax for type applications is to prefix the type application+-- with '@', like this:+--+--   foo @Int @Bool baz bum+--+-- This, of course, conflicts with as-patterns. The conflict arises because+-- expressions and patterns use the same parser, and also because we want+-- to allow type patterns within expression patterns.+--+-- Disambiguation is accomplished by requiring *something* to appear between+-- type application and the preceding token. This something must end with+-- a character that cannot be the end of the variable bound in an as-pattern.+-- Currently (June 2015), this means that the something cannot end with a+-- $idchar or a close-paren. (The close-paren is necessary if the as-bound+-- identifier is symbolic.)+--+-- Note that looking for whitespace before the '@' is insufficient, because+-- of this pathological case:+--+--   foo {- hi -}@Int+--+-- This design is predicated on the fact that as-patterns are generally+-- whitespace-free, and also that this whole thing is opt-in, with the+-- TypeApplications extension.++-- -----------------------------------------------------------------------------+-- Alex "Haskell code fragment bottom"++{++-- -----------------------------------------------------------------------------+-- The token type++data Token+  = ITas                        -- Haskell keywords+  | ITcase+  | ITclass+  | ITdata+  | ITdefault+  | ITderiving+  | ITdo+  | ITelse+  | IThiding+  | ITforeign+  | ITif+  | ITimport+  | ITin+  | ITinfix+  | ITinfixl+  | ITinfixr+  | ITinstance+  | ITlet+  | ITmodule+  | ITnewtype+  | ITof+  | ITqualified+  | ITthen+  | ITtype+  | ITwhere++  | ITforall            IsUnicodeSyntax -- GHC extension keywords+  | ITexport+  | ITlabel+  | ITdynamic+  | ITsafe+  | ITinterruptible+  | ITunsafe+  | ITstdcallconv+  | ITccallconv+  | ITcapiconv+  | ITprimcallconv+  | ITjavascriptcallconv+  | ITmdo+  | ITfamily+  | ITrole+  | ITgroup+  | ITby+  | ITusing+  | ITpattern+  | ITstatic+  | ITstock+  | ITanyclass+  | ITvia++  -- Backpack tokens+  | ITunit+  | ITsignature+  | ITdependency+  | ITrequires++  -- Pragmas, see  note [Pragma source text] in BasicTypes+  | ITinline_prag       SourceText InlineSpec RuleMatchInfo+  | ITspec_prag         SourceText                -- SPECIALISE+  | ITspec_inline_prag  SourceText Bool    -- SPECIALISE INLINE (or NOINLINE)+  | ITsource_prag       SourceText+  | ITrules_prag        SourceText+  | ITwarning_prag      SourceText+  | ITdeprecated_prag   SourceText+  | ITline_prag         SourceText  -- not usually produced, see 'use_pos_prags'+  | ITcolumn_prag       SourceText  -- not usually produced, see 'use_pos_prags'+  | ITscc_prag          SourceText+  | ITgenerated_prag    SourceText+  | ITcore_prag         SourceText         -- hdaume: core annotations+  | ITunpack_prag       SourceText+  | ITnounpack_prag     SourceText+  | ITann_prag          SourceText+  | ITcomplete_prag     SourceText+  | ITclose_prag+  | IToptions_prag String+  | ITinclude_prag String+  | ITlanguage_prag+  | ITminimal_prag      SourceText+  | IToverlappable_prag SourceText  -- instance overlap mode+  | IToverlapping_prag  SourceText  -- instance overlap mode+  | IToverlaps_prag     SourceText  -- instance overlap mode+  | ITincoherent_prag   SourceText  -- instance overlap mode+  | ITctype             SourceText++  | ITdotdot                    -- reserved symbols+  | ITcolon+  | ITdcolon            IsUnicodeSyntax+  | ITequal+  | ITlam+  | ITlcase+  | ITvbar+  | ITlarrow            IsUnicodeSyntax+  | ITrarrow            IsUnicodeSyntax+  | ITat+  | ITtilde+  | ITdarrow            IsUnicodeSyntax+  | ITminus+  | ITbang+  | ITstar              IsUnicodeSyntax+  | ITdot++  | ITbiglam                    -- GHC-extension symbols++  | ITocurly                    -- special symbols+  | ITccurly+  | ITvocurly+  | ITvccurly+  | ITobrack+  | ITopabrack                  -- [:, for parallel arrays with -XParallelArrays+  | ITcpabrack                  -- :], for parallel arrays with -XParallelArrays+  | ITcbrack+  | IToparen+  | ITcparen+  | IToubxparen+  | ITcubxparen+  | ITsemi+  | ITcomma+  | ITunderscore+  | ITbackquote+  | ITsimpleQuote               --  '++  | ITvarid   FastString        -- identifiers+  | ITconid   FastString+  | ITvarsym  FastString+  | ITconsym  FastString+  | ITqvarid  (FastString,FastString)+  | ITqconid  (FastString,FastString)+  | ITqvarsym (FastString,FastString)+  | ITqconsym (FastString,FastString)++  | ITdupipvarid   FastString   -- GHC extension: implicit param: ?x+  | ITlabelvarid   FastString   -- Overloaded label: #x++  | ITchar     SourceText Char       -- Note [Literal source text] in BasicTypes+  | ITstring   SourceText FastString -- Note [Literal source text] in BasicTypes+  | ITinteger  IntegralLit           -- Note [Literal source text] in BasicTypes+  | ITrational FractionalLit++  | ITprimchar   SourceText Char     -- Note [Literal source text] in BasicTypes+  | ITprimstring SourceText ByteString -- Note [Literal source text] @BasicTypes+  | ITprimint    SourceText Integer  -- Note [Literal source text] in BasicTypes+  | ITprimword   SourceText Integer  -- Note [Literal source text] in BasicTypes+  | ITprimfloat  FractionalLit+  | ITprimdouble FractionalLit++  -- Template Haskell extension tokens+  | ITopenExpQuote HasE IsUnicodeSyntax --  [| or [e|+  | ITopenPatQuote                      --  [p|+  | ITopenDecQuote                      --  [d|+  | ITopenTypQuote                      --  [t|+  | ITcloseQuote IsUnicodeSyntax        --  |]+  | ITopenTExpQuote HasE                --  [|| or [e||+  | ITcloseTExpQuote                    --  ||]+  | ITidEscape   FastString             --  $x+  | ITparenEscape                       --  $(+  | ITidTyEscape   FastString           --  $$x+  | ITparenTyEscape                     --  $$(+  | ITtyQuote                           --  ''+  | ITquasiQuote (FastString,FastString,RealSrcSpan)+    -- ITquasiQuote(quoter, quote, loc)+    -- represents a quasi-quote of the form+    -- [quoter| quote |]+  | ITqQuasiQuote (FastString,FastString,FastString,RealSrcSpan)+    -- ITqQuasiQuote(Qual, quoter, quote, loc)+    -- represents a qualified quasi-quote of the form+    -- [Qual.quoter| quote |]++  -- Arrow notation extension+  | ITproc+  | ITrec+  | IToparenbar  IsUnicodeSyntax --  (|+  | ITcparenbar  IsUnicodeSyntax --  |)+  | ITlarrowtail IsUnicodeSyntax --  -<+  | ITrarrowtail IsUnicodeSyntax --  >-+  | ITLarrowtail IsUnicodeSyntax --  -<<+  | ITRarrowtail IsUnicodeSyntax --  >>-++  -- type application '@' (lexed differently than as-pattern '@',+  -- due to checking for preceding whitespace)+  | ITtypeApp+++  | ITunknown String            -- Used when the lexer can't make sense of it+  | ITeof                       -- end of file token++  -- Documentation annotations+  | ITdocCommentNext  String     -- something beginning '-- |'+  | ITdocCommentPrev  String     -- something beginning '-- ^'+  | ITdocCommentNamed String     -- something beginning '-- $'+  | ITdocSection      Int String -- a section heading+  | ITdocOptions      String     -- doc options (prune, ignore-exports, etc)+  | ITlineComment     String     -- comment starting by "--"+  | ITblockComment    String     -- comment in {- -}++  deriving Show++instance Outputable Token where+  ppr x = text (show x)+++-- the bitmap provided as the third component indicates whether the+-- corresponding extension keyword is valid under the extension options+-- provided to the compiler; if the extension corresponding to *any* of the+-- bits set in the bitmap is enabled, the keyword is valid (this setup+-- facilitates using a keyword in two different extensions that can be+-- activated independently)+--+reservedWordsFM :: UniqFM (Token, ExtsBitmap)+reservedWordsFM = listToUFM $+    map (\(x, y, z) -> (mkFastString x, (y, z)))+        [( "_",              ITunderscore,    0 ),+         ( "as",             ITas,            0 ),+         ( "case",           ITcase,          0 ),+         ( "class",          ITclass,         0 ),+         ( "data",           ITdata,          0 ),+         ( "default",        ITdefault,       0 ),+         ( "deriving",       ITderiving,      0 ),+         ( "do",             ITdo,            0 ),+         ( "else",           ITelse,          0 ),+         ( "hiding",         IThiding,        0 ),+         ( "if",             ITif,            0 ),+         ( "import",         ITimport,        0 ),+         ( "in",             ITin,            0 ),+         ( "infix",          ITinfix,         0 ),+         ( "infixl",         ITinfixl,        0 ),+         ( "infixr",         ITinfixr,        0 ),+         ( "instance",       ITinstance,      0 ),+         ( "let",            ITlet,           0 ),+         ( "module",         ITmodule,        0 ),+         ( "newtype",        ITnewtype,       0 ),+         ( "of",             ITof,            0 ),+         ( "qualified",      ITqualified,     0 ),+         ( "then",           ITthen,          0 ),+         ( "type",           ITtype,          0 ),+         ( "where",          ITwhere,         0 ),++         ( "forall",         ITforall NormalSyntax,+                                              xbit ExplicitForallBit .|.+                                              xbit InRulePragBit),+         ( "mdo",            ITmdo,           xbit RecursiveDoBit),+             -- See Note [Lexing type pseudo-keywords]+         ( "family",         ITfamily,        0 ),+         ( "role",           ITrole,          0 ),+         ( "pattern",        ITpattern,       xbit PatternSynonymsBit),+         ( "static",         ITstatic,        0 ),+         ( "stock",          ITstock,         0 ),+         ( "anyclass",       ITanyclass,      0 ),+         ( "via",            ITvia,           0 ),+         ( "group",          ITgroup,         xbit TransformComprehensionsBit),+         ( "by",             ITby,            xbit TransformComprehensionsBit),+         ( "using",          ITusing,         xbit TransformComprehensionsBit),++         ( "foreign",        ITforeign,       xbit FfiBit),+         ( "export",         ITexport,        xbit FfiBit),+         ( "label",          ITlabel,         xbit FfiBit),+         ( "dynamic",        ITdynamic,       xbit FfiBit),+         ( "safe",           ITsafe,          xbit FfiBit .|.+                                              xbit SafeHaskellBit),+         ( "interruptible",  ITinterruptible, xbit InterruptibleFfiBit),+         ( "unsafe",         ITunsafe,        xbit FfiBit),+         ( "stdcall",        ITstdcallconv,   xbit FfiBit),+         ( "ccall",          ITccallconv,     xbit FfiBit),+         ( "capi",           ITcapiconv,      xbit CApiFfiBit),+         ( "prim",           ITprimcallconv,  xbit FfiBit),+         ( "javascript",     ITjavascriptcallconv, xbit FfiBit),++         ( "unit",           ITunit,          0 ),+         ( "dependency",     ITdependency,       0 ),+         ( "signature",      ITsignature,     0 ),++         ( "rec",            ITrec,           xbit ArrowsBit .|.+                                              xbit RecursiveDoBit),+         ( "proc",           ITproc,          xbit ArrowsBit)+     ]++{-----------------------------------+Note [Lexing type pseudo-keywords]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++One might think that we wish to treat 'family' and 'role' as regular old+varids whenever -XTypeFamilies and -XRoleAnnotations are off, respectively.+But, there is no need to do so. These pseudo-keywords are not stolen syntax:+they are only used after the keyword 'type' at the top-level, where varids are+not allowed. Furthermore, checks further downstream (TcTyClsDecls) ensure that+type families and role annotations are never declared without their extensions+on. In fact, by unconditionally lexing these pseudo-keywords as special, we+can get better error messages.++Also, note that these are included in the `varid` production in the parser --+a key detail to make all this work.+-------------------------------------}++reservedSymsFM :: UniqFM (Token, ExtsBitmap -> Bool)+reservedSymsFM = listToUFM $+    map (\ (x,y,z) -> (mkFastString x,(y,z)))+      [ ("..",  ITdotdot,              always)+        -- (:) is a reserved op, meaning only list cons+       ,(":",   ITcolon,               always)+       ,("::",  ITdcolon NormalSyntax, always)+       ,("=",   ITequal,               always)+       ,("\\",  ITlam,                 always)+       ,("|",   ITvbar,                always)+       ,("<-",  ITlarrow NormalSyntax, always)+       ,("->",  ITrarrow NormalSyntax, always)+       ,("@",   ITat,                  always)+       ,("~",   ITtilde,               always)+       ,("=>",  ITdarrow NormalSyntax, always)+       ,("-",   ITminus,               always)+       ,("!",   ITbang,                always)++       ,("*", ITstar NormalSyntax, starIsTypeEnabled)++        -- For 'forall a . t'+       ,(".", ITdot,  always) -- \i -> explicitForallEnabled i || inRulePrag i)++       ,("-<",  ITlarrowtail NormalSyntax, arrowsEnabled)+       ,(">-",  ITrarrowtail NormalSyntax, arrowsEnabled)+       ,("-<<", ITLarrowtail NormalSyntax, arrowsEnabled)+       ,(">>-", ITRarrowtail NormalSyntax, arrowsEnabled)++       ,("∷",   ITdcolon UnicodeSyntax, unicodeSyntaxEnabled)+       ,("⇒",   ITdarrow UnicodeSyntax, unicodeSyntaxEnabled)+       ,("∀",   ITforall UnicodeSyntax, unicodeSyntaxEnabled)+       ,("→",   ITrarrow UnicodeSyntax, unicodeSyntaxEnabled)+       ,("←",   ITlarrow UnicodeSyntax, unicodeSyntaxEnabled)++       ,("⤙",   ITlarrowtail UnicodeSyntax,+                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)+       ,("⤚",   ITrarrowtail UnicodeSyntax,+                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)+       ,("⤛",   ITLarrowtail UnicodeSyntax,+                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)+       ,("⤜",   ITRarrowtail UnicodeSyntax,+                                \i -> unicodeSyntaxEnabled i && arrowsEnabled i)+       ,("★",   ITstar UnicodeSyntax,+                  \i -> unicodeSyntaxEnabled i && starIsTypeEnabled i)++        -- ToDo: ideally, → and ∷ should be "specials", so that they cannot+        -- form part of a large operator.  This would let us have a better+        -- syntax for kinds: ɑ∷*→* would be a legal kind signature. (maybe).+       ]++-- -----------------------------------------------------------------------------+-- Lexer actions++type Action = RealSrcSpan -> StringBuffer -> Int -> P (RealLocated Token)++special :: Token -> Action+special tok span _buf _len = return (L span tok)++token, layout_token :: Token -> Action+token t span _buf _len = return (L span t)+layout_token t span _buf _len = pushLexState layout >> return (L span t)++idtoken :: (StringBuffer -> Int -> Token) -> Action+idtoken f span buf len = return (L span $! (f buf len))++skip_one_varid :: (FastString -> Token) -> Action+skip_one_varid f span buf len+  = return (L span $! f (lexemeToFastString (stepOn buf) (len-1)))++skip_two_varid :: (FastString -> Token) -> Action+skip_two_varid f span buf len+  = return (L span $! f (lexemeToFastString (stepOn (stepOn buf)) (len-2)))++strtoken :: (String -> Token) -> Action+strtoken f span buf len =+  return (L span $! (f $! lexemeToString buf len))++begin :: Int -> Action+begin code _span _str _len = do pushLexState code; lexToken++pop :: Action+pop _span _buf _len = do _ <- popLexState+                         lexToken++hopefully_open_brace :: Action+hopefully_open_brace span buf len+ = do relaxed <- extension relaxedLayout+      ctx <- getContext+      (AI l _) <- getInput+      let offset = srcLocCol l+          isOK = relaxed ||+                 case ctx of+                 Layout prev_off _ : _ -> prev_off < offset+                 _                     -> True+      if isOK then pop_and open_brace span buf len+              else failSpanMsgP (RealSrcSpan span) (text "Missing block")++pop_and :: Action -> Action+pop_and act span buf len = do _ <- popLexState+                              act span buf len++{-# INLINE nextCharIs #-}+nextCharIs :: StringBuffer -> (Char -> Bool) -> Bool+nextCharIs buf p = not (atEnd buf) && p (currentChar buf)++{-# INLINE nextCharIsNot #-}+nextCharIsNot :: StringBuffer -> (Char -> Bool) -> Bool+nextCharIsNot buf p = not (nextCharIs buf p)++notFollowedBy :: Char -> AlexAccPred ExtsBitmap+notFollowedBy char _ _ _ (AI _ buf)+  = nextCharIsNot buf (== char)++notFollowedBySymbol :: AlexAccPred ExtsBitmap+notFollowedBySymbol _ _ _ (AI _ buf)+  = nextCharIsNot buf (`elem` "!#$%&*+./<=>?@\\^|-~")++followedByDigit :: AlexAccPred ExtsBitmap+followedByDigit _ _ _ (AI _ buf)+  = afterOptionalSpace buf (\b -> nextCharIs b (`elem` ['0'..'9']))++ifCurrentChar :: Char -> AlexAccPred ExtsBitmap+ifCurrentChar char _ (AI _ buf) _ _+  = nextCharIs buf (== char)++-- We must reject doc comments as being ordinary comments everywhere.+-- In some cases the doc comment will be selected as the lexeme due to+-- maximal munch, but not always, because the nested comment rule is+-- valid in all states, but the doc-comment rules are only valid in+-- the non-layout states.+isNormalComment :: AlexAccPred ExtsBitmap+isNormalComment bits _ _ (AI _ buf)+  | haddockEnabled bits = notFollowedByDocOrPragma+  | otherwise           = nextCharIsNot buf (== '#')+  where+    notFollowedByDocOrPragma+       = afterOptionalSpace buf (\b -> nextCharIsNot b (`elem` "|^*$#"))++afterOptionalSpace :: StringBuffer -> (StringBuffer -> Bool) -> Bool+afterOptionalSpace buf p+    = if nextCharIs buf (== ' ')+      then p (snd (nextChar buf))+      else p buf++atEOL :: AlexAccPred ExtsBitmap+atEOL _ _ _ (AI _ buf) = atEnd buf || currentChar buf == '\n'++ifExtension :: (ExtsBitmap -> Bool) -> AlexAccPred ExtsBitmap+ifExtension pred bits _ _ _ = pred bits++orExtensions :: (ExtsBitmap -> Bool) -> (ExtsBitmap -> Bool) -> AlexAccPred ExtsBitmap+orExtensions pred1 pred2 bits _ _ _ = pred1 bits || pred2 bits++multiline_doc_comment :: Action+multiline_doc_comment span buf _len = withLexedDocType (worker "")+  where+    worker commentAcc input docType checkNextLine = case alexGetChar' input of+      Just ('\n', input')+        | checkNextLine -> case checkIfCommentLine input' of+          Just input -> worker ('\n':commentAcc) input docType checkNextLine+          Nothing -> docCommentEnd input commentAcc docType buf span+        | otherwise -> docCommentEnd input commentAcc docType buf span+      Just (c, input) -> worker (c:commentAcc) input docType checkNextLine+      Nothing -> docCommentEnd input commentAcc docType buf span++    -- Check if the next line of input belongs to this doc comment as well.+    -- A doc comment continues onto the next line when the following+    -- conditions are met:+    --   * The line starts with "--"+    --   * The line doesn't start with "---".+    --   * The line doesn't start with "-- $", because that would be the+    --     start of a /new/ named haddock chunk (#10398).+    checkIfCommentLine :: AlexInput -> Maybe AlexInput+    checkIfCommentLine input = check (dropNonNewlineSpace input)+      where+        check input = do+          ('-', input) <- alexGetChar' input+          ('-', input) <- alexGetChar' input+          (c, after_c) <- alexGetChar' input+          case c of+            '-' -> Nothing+            ' ' -> case alexGetChar' after_c of+                     Just ('$', _) -> Nothing+                     _ -> Just input+            _   -> Just input++        dropNonNewlineSpace input = case alexGetChar' input of+          Just (c, input')+            | isSpace c && c /= '\n' -> dropNonNewlineSpace input'+            | otherwise -> input+          Nothing -> input++lineCommentToken :: Action+lineCommentToken span buf len = do+  b <- extension rawTokenStreamEnabled+  if b then strtoken ITlineComment span buf len else lexToken++{-+  nested comments require traversing by hand, they can't be parsed+  using regular expressions.+-}+nested_comment :: P (RealLocated Token) -> Action+nested_comment cont span buf len = do+  input <- getInput+  go (reverse $ lexemeToString buf len) (1::Int) input+  where+    go commentAcc 0 input = do+      setInput input+      b <- extension rawTokenStreamEnabled+      if b+        then docCommentEnd input commentAcc ITblockComment buf span+        else cont+    go commentAcc n input = case alexGetChar' input of+      Nothing -> errBrace input span+      Just ('-',input) -> case alexGetChar' input of+        Nothing  -> errBrace input span+        Just ('\125',input) -> go ('\125':'-':commentAcc) (n-1) input -- '}'+        Just (_,_)          -> go ('-':commentAcc) n input+      Just ('\123',input) -> case alexGetChar' input of  -- '{' char+        Nothing  -> errBrace input span+        Just ('-',input) -> go ('-':'\123':commentAcc) (n+1) input+        Just (_,_)       -> go ('\123':commentAcc) n input+      Just (c,input) -> go (c:commentAcc) n input++nested_doc_comment :: Action+nested_doc_comment span buf _len = withLexedDocType (go "")+  where+    go commentAcc input docType _ = case alexGetChar' input of+      Nothing -> errBrace input span+      Just ('-',input) -> case alexGetChar' input of+        Nothing -> errBrace input span+        Just ('\125',input) ->+          docCommentEnd input commentAcc docType buf span+        Just (_,_) -> go ('-':commentAcc) input docType False+      Just ('\123', input) -> case alexGetChar' input of+        Nothing  -> errBrace input span+        Just ('-',input) -> do+          setInput input+          let cont = do input <- getInput; go commentAcc input docType False+          nested_comment cont span buf _len+        Just (_,_) -> go ('\123':commentAcc) input docType False+      Just (c,input) -> go (c:commentAcc) input docType False++withLexedDocType :: (AlexInput -> (String -> Token) -> Bool -> P (RealLocated Token))+                 -> P (RealLocated Token)+withLexedDocType lexDocComment = do+  input@(AI _ buf) <- getInput+  case prevChar buf ' ' of+    -- The `Bool` argument to lexDocComment signals whether or not the next+    -- line of input might also belong to this doc comment.+    '|' -> lexDocComment input ITdocCommentNext True+    '^' -> lexDocComment input ITdocCommentPrev True+    '$' -> lexDocComment input ITdocCommentNamed True+    '*' -> lexDocSection 1 input+    _ -> panic "withLexedDocType: Bad doc type"+ where+    lexDocSection n input = case alexGetChar' input of+      Just ('*', input) -> lexDocSection (n+1) input+      Just (_,   _)     -> lexDocComment input (ITdocSection n) False+      Nothing -> do setInput input; lexToken -- eof reached, lex it normally++-- RULES pragmas turn on the forall and '.' keywords, and we turn them+-- off again at the end of the pragma.+rulePrag :: Action+rulePrag span buf len = do+  setExts (.|. xbit InRulePragBit)+  let !src = lexemeToString buf len+  return (L span (ITrules_prag (SourceText src)))++-- When 'use_pos_prags' is not set, it is expected that we emit a token instead+-- of updating the position in 'PState'+linePrag :: Action+linePrag span buf len = do+  ps <- getPState+  if use_pos_prags ps+    then begin line_prag2 span buf len+    else let !src = lexemeToString buf len+         in return (L span (ITline_prag (SourceText src)))++-- When 'use_pos_prags' is not set, it is expected that we emit a token instead+-- of updating the position in 'PState'+columnPrag :: Action+columnPrag span buf len = do+  ps <- getPState+  let !src = lexemeToString buf len+  if use_pos_prags ps+    then begin column_prag span buf len+    else let !src = lexemeToString buf len+         in return (L span (ITcolumn_prag (SourceText src)))++endPrag :: Action+endPrag span _buf _len = do+  setExts (.&. complement (xbit InRulePragBit))+  return (L span ITclose_prag)++-- docCommentEnd+-------------------------------------------------------------------------------+-- This function is quite tricky. We can't just return a new token, we also+-- need to update the state of the parser. Why? Because the token is longer+-- than what was lexed by Alex, and the lexToken function doesn't know this, so+-- it writes the wrong token length to the parser state. This function is+-- called afterwards, so it can just update the state.++docCommentEnd :: AlexInput -> String -> (String -> Token) -> StringBuffer ->+                 RealSrcSpan -> P (RealLocated Token)+docCommentEnd input commentAcc docType buf span = do+  setInput input+  let (AI loc nextBuf) = input+      comment = reverse commentAcc+      span' = mkRealSrcSpan (realSrcSpanStart span) loc+      last_len = byteDiff buf nextBuf++  span `seq` setLastToken span' last_len+  return (L span' (docType comment))++errBrace :: AlexInput -> RealSrcSpan -> P a+errBrace (AI end _) span = failLocMsgP (realSrcSpanStart span) end "unterminated `{-'"++open_brace, close_brace :: Action+open_brace span _str _len = do+  ctx <- getContext+  setContext (NoLayout:ctx)+  return (L span ITocurly)+close_brace span _str _len = do+  popContext+  return (L span ITccurly)++qvarid, qconid :: StringBuffer -> Int -> Token+qvarid buf len = ITqvarid $! splitQualName buf len False+qconid buf len = ITqconid $! splitQualName buf len False++splitQualName :: StringBuffer -> Int -> Bool -> (FastString,FastString)+-- takes a StringBuffer and a length, and returns the module name+-- and identifier parts of a qualified name.  Splits at the *last* dot,+-- because of hierarchical module names.+splitQualName orig_buf len parens = split orig_buf orig_buf+  where+    split buf dot_buf+        | orig_buf `byteDiff` buf >= len  = done dot_buf+        | c == '.'                        = found_dot buf'+        | otherwise                       = split buf' dot_buf+      where+       (c,buf') = nextChar buf++    -- careful, we might get names like M....+    -- so, if the character after the dot is not upper-case, this is+    -- the end of the qualifier part.+    found_dot buf -- buf points after the '.'+        | isUpper c    = split buf' buf+        | otherwise    = done buf+      where+       (c,buf') = nextChar buf++    done dot_buf =+        (lexemeToFastString orig_buf (qual_size - 1),+         if parens -- Prelude.(+)+            then lexemeToFastString (stepOn dot_buf) (len - qual_size - 2)+            else lexemeToFastString dot_buf (len - qual_size))+      where+        qual_size = orig_buf `byteDiff` dot_buf++varid :: Action+varid span buf len =+  case lookupUFM reservedWordsFM fs of+    Just (ITcase, _) -> do+      lastTk <- getLastTk+      keyword <- case lastTk of+        Just ITlam -> do+          lambdaCase <- extension lambdaCaseEnabled+          if lambdaCase+            then return ITlcase+            else failMsgP "Illegal lambda-case (use -XLambdaCase)"+        _ -> return ITcase+      maybe_layout keyword+      return $ L span keyword+    Just (ITstatic, _) -> do+      staticPointers <- extension staticPointersEnabled+      if staticPointers+        then return $ L span ITstatic+        else return $ L span $ ITvarid fs+    Just (keyword, 0) -> do+      maybe_layout keyword+      return $ L span keyword+    Just (keyword, exts) -> do+      extsEnabled <- extension $ \i -> exts .&. i /= 0+      if extsEnabled+        then do+          maybe_layout keyword+          return $ L span keyword+        else+          return $ L span $ ITvarid fs+    Nothing ->+      return $ L span $ ITvarid fs+  where+    !fs = lexemeToFastString buf len++conid :: StringBuffer -> Int -> Token+conid buf len = ITconid $! lexemeToFastString buf len++qvarsym, qconsym :: StringBuffer -> Int -> Token+qvarsym buf len = ITqvarsym $! splitQualName buf len False+qconsym buf len = ITqconsym $! splitQualName buf len False++varsym, consym :: Action+varsym = sym ITvarsym+consym = sym ITconsym++sym :: (FastString -> Token) -> Action+sym con span buf len =+  case lookupUFM reservedSymsFM fs of+    Just (keyword, exts) -> do+      extsEnabled <- extension exts+      let !tk | extsEnabled = keyword+              | otherwise   = con fs+      return $ L span tk+    Nothing ->+      return $ L span $! con fs+  where+    !fs = lexemeToFastString buf len++-- Variations on the integral numeric literal.+tok_integral :: (SourceText -> Integer -> Token)+             -> (Integer -> Integer)+             -> Int -> Int+             -> (Integer, (Char -> Int))+             -> Action+tok_integral itint transint transbuf translen (radix,char_to_int) span buf len = do+  numericUnderscores <- extension numericUnderscoresEnabled  -- #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)+       $! transint $ parseUnsignedInteger+       (offsetBytes transbuf buf) (subtract translen len) radix char_to_int++tok_num :: (Integer -> Integer)+                        -> Int -> Int+                        -> (Integer, (Char->Int)) -> Action+tok_num = tok_integral itint+  where+    itint st@(SourceText ('-':str)) val = ITinteger (((IL $! st) $! True)      $! val)+    itint st@(SourceText      str ) val = ITinteger (((IL $! st) $! False)     $! val)+    itint st@(NoSourceText        ) val = ITinteger (((IL $! st) $! (val < 0)) $! val)++tok_primint :: (Integer -> Integer)+            -> Int -> Int+            -> (Integer, (Char->Int)) -> Action+tok_primint = tok_integral ITprimint+++tok_primword :: Int -> Int+             -> (Integer, (Char->Int)) -> Action+tok_primword = tok_integral ITprimword positive+positive, negative :: (Integer -> Integer)+positive = id+negative = negate+decimal, octal, hexadecimal :: (Integer, Char -> Int)+decimal = (10,octDecDigit)+binary = (2,octDecDigit)+octal = (8,octDecDigit)+hexadecimal = (16,hexDigit)++-- readRational can understand negative rationals, exponents, everything.+tok_frac :: Int -> (String -> Token) -> Action+tok_frac drop f span buf len = do+  numericUnderscores <- extension numericUnderscoresEnabled  -- #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))++tok_float, tok_primfloat, tok_primdouble :: String -> Token+tok_float        str = ITrational   $! readFractionalLit str+tok_hex_float    str = ITrational   $! readHexFractionalLit str+tok_primfloat    str = ITprimfloat  $! readFractionalLit str+tok_primdouble   str = ITprimdouble $! readFractionalLit str++readFractionalLit :: String -> FractionalLit+readFractionalLit str = ((FL $! (SourceText str)) $! is_neg) $! readRational str+                        where is_neg = case str of ('-':_) -> True+                                                   _       -> False+readHexFractionalLit :: String -> FractionalLit+readHexFractionalLit str =+  FL { fl_text  = SourceText str+     , fl_neg   = case str of+                    '-' : _ -> True+                    _       -> False+     , fl_value = readHexRational str+     }++-- -----------------------------------------------------------------------------+-- Layout processing++-- we're at the first token on a line, insert layout tokens if necessary+do_bol :: Action+do_bol span _str _len = do+        (pos, gen_semic) <- getOffside+        case pos of+            LT -> do+                --trace "layout: inserting '}'" $ do+                popContext+                -- do NOT pop the lex state, we might have a ';' to insert+                return (L span ITvccurly)+            EQ | gen_semic -> do+                --trace "layout: inserting ';'" $ do+                _ <- popLexState+                return (L span ITsemi)+            _ -> do+                _ <- popLexState+                lexToken++-- certain keywords put us in the "layout" state, where we might+-- add an opening curly brace.+maybe_layout :: Token -> P ()+maybe_layout t = do -- If the alternative layout rule is enabled then+                    -- we never create an implicit layout context here.+                    -- Layout is handled XXX instead.+                    -- The code for closing implicit contexts, or+                    -- inserting implicit semi-colons, is therefore+                    -- irrelevant as it only applies in an implicit+                    -- context.+                    alr <- extension alternativeLayoutRule+                    unless alr $ f t+    where f ITdo    = pushLexState layout_do+          f ITmdo   = pushLexState layout_do+          f ITof    = pushLexState layout+          f ITlcase = pushLexState layout+          f ITlet   = pushLexState layout+          f ITwhere = pushLexState layout+          f ITrec   = pushLexState layout+          f ITif    = pushLexState layout_if+          f _       = return ()++-- Pushing a new implicit layout context.  If the indentation of the+-- next token is not greater than the previous layout context, then+-- Haskell 98 says that the new layout context should be empty; that is+-- the lexer must generate {}.+--+-- We are slightly more lenient than this: when the new context is started+-- by a 'do', then we allow the new context to be at the same indentation as+-- the previous context.  This is what the 'strict' argument is for.+new_layout_context :: Bool -> Bool -> Token -> Action+new_layout_context strict gen_semic tok span _buf len = do+    _ <- popLexState+    (AI l _) <- getInput+    let offset = srcLocCol l - len+    ctx <- getContext+    nondecreasing <- extension nondecreasingIndentation+    let strict' = strict || not nondecreasing+    case ctx of+        Layout prev_off _ : _  |+           (strict'     && prev_off >= offset  ||+            not strict' && prev_off > offset) -> do+                -- token is indented to the left of the previous context.+                -- we must generate a {} sequence now.+                pushLexState layout_left+                return (L span tok)+        _ -> do setContext (Layout offset gen_semic : ctx)+                return (L span tok)++do_layout_left :: Action+do_layout_left span _buf _len = do+    _ <- popLexState+    pushLexState bol  -- we must be at the start of a line+    return (L span ITvccurly)++-- -----------------------------------------------------------------------------+-- LINE pragmas++setLine :: Int -> Action+setLine code span buf len = do+  let line = parseUnsignedInteger buf len 10 octDecDigit+  setSrcLoc (mkRealSrcLoc (srcSpanFile span) (fromIntegral line - 1) 1)+        -- subtract one: the line number refers to the *following* line+  _ <- popLexState+  pushLexState code+  lexToken++setColumn :: Action+setColumn span buf len = do+  let column =+        case reads (lexemeToString buf len) of+          [(column, _)] -> column+          _ -> error "setColumn: expected integer" -- shouldn't happen+  setSrcLoc (mkRealSrcLoc (srcSpanFile span) (srcSpanEndLine span)+                          (fromIntegral (column :: Integer)))+  _ <- popLexState+  lexToken++setFile :: Int -> Action+setFile code span buf len = do+  let file = mkFastString (go (lexemeToString (stepOn buf) (len-2)))+        where go ('\\':c:cs) = c : go cs+              go (c:cs)      = c : go cs+              go []          = []+              -- decode escapes in the filename.  e.g. on Windows+              -- when our filenames have backslashes in, gcc seems to+              -- escape the backslashes.  One symptom of not doing this+              -- is that filenames in error messages look a bit strange:+              --   C:\\foo\bar.hs+              -- only the first backslash is doubled, because we apply+              -- System.FilePath.normalise before printing out+              -- filenames and it does not remove duplicate+              -- backslashes after the drive letter (should it?).+  setAlrLastLoc $ alrInitialLoc file+  setSrcLoc (mkRealSrcLoc file (srcSpanEndLine span) (srcSpanEndCol span))+  addSrcFile file+  _ <- popLexState+  pushLexState code+  lexToken++alrInitialLoc :: FastString -> RealSrcSpan+alrInitialLoc file = mkRealSrcSpan loc loc+    where -- This is a hack to ensure that the first line in a file+          -- looks like it is after the initial location:+          loc = mkRealSrcLoc file (-1) (-1)++-- -----------------------------------------------------------------------------+-- Options, includes and language pragmas.++lex_string_prag :: (String -> Token) -> Action+lex_string_prag mkTok span _buf _len+    = do input <- getInput+         start <- getSrcLoc+         tok <- go [] input+         end <- getSrcLoc+         return (L (mkRealSrcSpan start end) tok)+    where go acc input+              = if isString input "#-}"+                   then do setInput input+                           return (mkTok (reverse acc))+                   else case alexGetChar input of+                          Just (c,i) -> go (c:acc) i+                          Nothing -> err input+          isString _ [] = True+          isString i (x:xs)+              = case alexGetChar i of+                  Just (c,i') | c == x    -> isString i' xs+                  _other -> False+          err (AI end _) = failLocMsgP (realSrcSpanStart span) end "unterminated options pragma"+++-- -----------------------------------------------------------------------------+-- Strings & Chars++-- This stuff is horrible.  I hates it.++lex_string_tok :: Action+lex_string_tok span buf _len = do+  tok <- lex_string ""+  (AI end bufEnd) <- getInput+  let+    tok' = case tok of+            ITprimstring _ bs -> ITprimstring (SourceText src) bs+            ITstring _ s -> ITstring (SourceText src) s+            _ -> panic "lex_string_tok"+    src = lexemeToString buf (cur bufEnd - cur buf)+  return (L (mkRealSrcSpan (realSrcSpanStart span) end) tok')++lex_string :: String -> P Token+lex_string s = do+  i <- getInput+  case alexGetChar' i of+    Nothing -> lit_error i++    Just ('"',i)  -> do+        setInput i+        magicHash <- extension magicHashEnabled+        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)+              _other ->+                return (ITstring (SourceText (reverse s))+                                 (mkFastString (reverse s)))+          else+                return (ITstring (SourceText (reverse s))+                                 (mkFastString (reverse s)))++    Just ('\\',i)+        | Just ('&',i) <- next -> do+                setInput i; lex_string s+        | Just (c,i) <- next, c <= '\x7f' && is_space c -> do+                           -- is_space only works for <= '\x7f' (#3751, #5425)+                setInput i; lex_stringgap s+        where next = alexGetChar' i++    Just (c, i1) -> do+        case c of+          '\\' -> do setInput i1; c' <- lex_escape; lex_string (c':s)+          c | isAny c -> do setInput i1; lex_string (c:s)+          _other -> lit_error i++lex_stringgap :: String -> P Token+lex_stringgap s = do+  i <- getInput+  c <- getCharOrFail i+  case c of+    '\\' -> lex_string s+    c | c <= '\x7f' && is_space c -> lex_stringgap s+                           -- is_space only works for <= '\x7f' (#3751, #5425)+    _other -> lit_error i+++lex_char_tok :: Action+-- Here we are basically parsing character literals, such as 'x' or '\n'+-- but we additionally spot 'x and ''T, returning ITsimpleQuote and+-- ITtyQuote respectively, but WITHOUT CONSUMING the x or T part+-- (the parser does that).+-- So we have to do two characters of lookahead: when we see 'x we need to+-- see if there's a trailing quote+lex_char_tok span buf _len = do        -- We've seen '+   i1 <- getInput       -- Look ahead to first character+   let loc = realSrcSpanStart span+   case alexGetChar' i1 of+        Nothing -> lit_error  i1++        Just ('\'', i2@(AI end2 _)) -> do       -- We've seen ''+                   setInput i2+                   return (L (mkRealSrcSpan loc end2)  ITtyQuote)++        Just ('\\', i2@(AI _end2 _)) -> do      -- We've seen 'backslash+                  setInput i2+                  lit_ch <- lex_escape+                  i3 <- getInput+                  mc <- getCharOrFail i3 -- Trailing quote+                  if mc == '\'' then finish_char_tok buf loc lit_ch+                                else lit_error i3++        Just (c, i2@(AI _end2 _))+                | not (isAny c) -> lit_error i1+                | otherwise ->++                -- We've seen 'x, where x is a valid character+                --  (i.e. not newline etc) but not a quote or backslash+           case alexGetChar' i2 of      -- Look ahead one more character+                Just ('\'', i3) -> do   -- We've seen 'x'+                        setInput i3+                        finish_char_tok buf loc c+                _other -> do            -- We've seen 'x not followed by quote+                                        -- (including the possibility of EOF)+                                        -- Just parse the quote only+                        let (AI end _) = i1+                        return (L (mkRealSrcSpan loc end) ITsimpleQuote)++finish_char_tok :: StringBuffer -> RealSrcLoc -> Char -> P (RealLocated Token)+finish_char_tok buf loc ch  -- We've already seen the closing quote+                        -- Just need to check for trailing #+  = do  magicHash <- extension magicHashEnabled+        i@(AI end bufEnd) <- getInput+        let src = lexemeToString buf (cur bufEnd - cur buf)+        if magicHash then do+            case alexGetChar' i of+              Just ('#',i@(AI end _)) -> do+                setInput i+                return (L (mkRealSrcSpan loc end)+                          (ITprimchar (SourceText src) ch))+              _other ->+                return (L (mkRealSrcSpan loc end)+                          (ITchar (SourceText src) ch))+            else do+              return (L (mkRealSrcSpan loc end) (ITchar (SourceText src) ch))++isAny :: Char -> Bool+isAny c | c > '\x7f' = isPrint c+        | otherwise  = is_any c++lex_escape :: P Char+lex_escape = do+  i0 <- getInput+  c <- getCharOrFail i0+  case c of+        'a'   -> return '\a'+        'b'   -> return '\b'+        'f'   -> return '\f'+        'n'   -> return '\n'+        'r'   -> return '\r'+        't'   -> return '\t'+        'v'   -> return '\v'+        '\\'  -> return '\\'+        '"'   -> return '\"'+        '\''  -> return '\''+        '^'   -> do i1 <- getInput+                    c <- getCharOrFail i1+                    if c >= '@' && c <= '_'+                        then return (chr (ord c - ord '@'))+                        else lit_error i1++        'x'   -> readNum is_hexdigit 16 hexDigit+        'o'   -> readNum is_octdigit  8 octDecDigit+        x | is_decdigit x -> readNum2 is_decdigit 10 octDecDigit (octDecDigit x)++        c1 ->  do+           i <- getInput+           case alexGetChar' i of+            Nothing -> lit_error i0+            Just (c2,i2) ->+              case alexGetChar' i2 of+                Nothing -> do lit_error i0+                Just (c3,i3) ->+                   let str = [c1,c2,c3] in+                   case [ (c,rest) | (p,c) <- silly_escape_chars,+                                     Just rest <- [stripPrefix p str] ] of+                          (escape_char,[]):_ -> do+                                setInput i3+                                return escape_char+                          (escape_char,_:_):_ -> do+                                setInput i2+                                return escape_char+                          [] -> lit_error i0++readNum :: (Char -> Bool) -> Int -> (Char -> Int) -> P Char+readNum is_digit base conv = do+  i <- getInput+  c <- getCharOrFail i+  if is_digit c+        then readNum2 is_digit base conv (conv c)+        else lit_error i++readNum2 :: (Char -> Bool) -> Int -> (Char -> Int) -> Int -> P Char+readNum2 is_digit base conv i = do+  input <- getInput+  read i input+  where read i input = do+          case alexGetChar' input of+            Just (c,input') | is_digit c -> do+               let i' = i*base + conv c+               if i' > 0x10ffff+                  then setInput input >> lexError "numeric escape sequence out of range"+                  else read i' input'+            _other -> do+              setInput input; return (chr i)+++silly_escape_chars :: [(String, Char)]+silly_escape_chars = [+        ("NUL", '\NUL'),+        ("SOH", '\SOH'),+        ("STX", '\STX'),+        ("ETX", '\ETX'),+        ("EOT", '\EOT'),+        ("ENQ", '\ENQ'),+        ("ACK", '\ACK'),+        ("BEL", '\BEL'),+        ("BS", '\BS'),+        ("HT", '\HT'),+        ("LF", '\LF'),+        ("VT", '\VT'),+        ("FF", '\FF'),+        ("CR", '\CR'),+        ("SO", '\SO'),+        ("SI", '\SI'),+        ("DLE", '\DLE'),+        ("DC1", '\DC1'),+        ("DC2", '\DC2'),+        ("DC3", '\DC3'),+        ("DC4", '\DC4'),+        ("NAK", '\NAK'),+        ("SYN", '\SYN'),+        ("ETB", '\ETB'),+        ("CAN", '\CAN'),+        ("EM", '\EM'),+        ("SUB", '\SUB'),+        ("ESC", '\ESC'),+        ("FS", '\FS'),+        ("GS", '\GS'),+        ("RS", '\RS'),+        ("US", '\US'),+        ("SP", '\SP'),+        ("DEL", '\DEL')+        ]++-- before calling lit_error, ensure that the current input is pointing to+-- the position of the error in the buffer.  This is so that we can report+-- a correct location to the user, but also so we can detect UTF-8 decoding+-- errors if they occur.+lit_error :: AlexInput -> P a+lit_error i = do setInput i; lexError "lexical error in string/character literal"++getCharOrFail :: AlexInput -> P Char+getCharOrFail i =  do+  case alexGetChar' i of+        Nothing -> lexError "unexpected end-of-file in string/character literal"+        Just (c,i)  -> do setInput i; return c++-- -----------------------------------------------------------------------------+-- QuasiQuote++lex_qquasiquote_tok :: Action+lex_qquasiquote_tok span buf len = do+  let (qual, quoter) = splitQualName (stepOn buf) (len - 2) False+  quoteStart <- getSrcLoc+  quote <- lex_quasiquote quoteStart ""+  end <- getSrcLoc+  return (L (mkRealSrcSpan (realSrcSpanStart span) end)+           (ITqQuasiQuote (qual,+                           quoter,+                           mkFastString (reverse quote),+                           mkRealSrcSpan quoteStart end)))++lex_quasiquote_tok :: Action+lex_quasiquote_tok span buf len = do+  let quoter = tail (lexemeToString buf (len - 1))+                -- 'tail' drops the initial '[',+                -- while the -1 drops the trailing '|'+  quoteStart <- getSrcLoc+  quote <- lex_quasiquote quoteStart ""+  end <- getSrcLoc+  return (L (mkRealSrcSpan (realSrcSpanStart span) end)+           (ITquasiQuote (mkFastString quoter,+                          mkFastString (reverse quote),+                          mkRealSrcSpan quoteStart end)))++lex_quasiquote :: RealSrcLoc -> String -> P String+lex_quasiquote start s = do+  i <- getInput+  case alexGetChar' i of+    Nothing -> quasiquote_error start++    -- NB: The string "|]" terminates the quasiquote,+    -- with absolutely no escaping. See the extensive+    -- discussion on Trac #5348 for why there is no+    -- escape handling.+    Just ('|',i)+        | Just (']',i) <- alexGetChar' i+        -> do { setInput i; return s }++    Just (c, i) -> do+         setInput i; lex_quasiquote start (c : s)++quasiquote_error :: RealSrcLoc -> P a+quasiquote_error start = do+  (AI end buf) <- getInput+  reportLexError start end buf "unterminated quasiquotation"++-- -----------------------------------------------------------------------------+-- Warnings++warnTab :: Action+warnTab srcspan _buf _len = do+    addTabWarning srcspan+    lexToken++warnThen :: WarningFlag -> SDoc -> Action -> Action+warnThen option warning action srcspan buf len = do+    addWarning option (RealSrcSpan srcspan) warning+    action srcspan buf len++-- -----------------------------------------------------------------------------+-- The Parse Monad++-- | Do we want to generate ';' layout tokens? In some cases we just want to+-- generate '}', e.g. in MultiWayIf we don't need ';'s because '|' separates+-- alternatives (unlike a `case` expression where we need ';' to as a separator+-- between alternatives).+type GenSemic = Bool++generateSemic, dontGenerateSemic :: GenSemic+generateSemic     = True+dontGenerateSemic = False++data LayoutContext+  = NoLayout+  | Layout !Int !GenSemic+  deriving Show++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++-- | Test whether a 'WarningFlag' is set+warnopt :: WarningFlag -> ParserFlags -> Bool+warnopt f options = f `EnumSet.member` pWarningFlags options++-- | Test whether a 'LangExt.Extension' is set+extopt :: LangExt.Extension -> ParserFlags -> Bool+extopt f options = f `EnumSet.member` pExtensionFlags options++-- | The subset of the 'DynFlags' used by the parser+data ParserFlags = ParserFlags {+    pWarningFlags   :: EnumSet WarningFlag+  , pExtensionFlags :: EnumSet LangExt.Extension+  , pThisPackage    :: UnitId      -- ^ key of package currently being compiled+  , pExtsBitmap     :: !ExtsBitmap -- ^ bitmap of permitted extensions+  }++data PState = PState {+        buffer     :: StringBuffer,+        options    :: ParserFlags,+        -- This needs to take DynFlags as an argument until+        -- we have a fix for #10143+        messages   :: DynFlags -> Messages,+        tab_first  :: Maybe RealSrcSpan, -- pos of first tab warning in the file+        tab_count  :: !Int,              -- number of tab warnings in the file+        last_tk    :: Maybe Token,+        last_loc   :: RealSrcSpan, -- pos of previous token+        last_len   :: !Int,        -- len of previous token+        loc        :: RealSrcLoc,  -- current loc (end of prev token + 1)+        context    :: [LayoutContext],+        lex_state  :: [Int],+        srcfiles   :: [FastString],+        -- Used in the alternative layout rule:+        -- These tokens are the next ones to be sent out. They are+        -- just blindly emitted, without the rule looking at them again:+        alr_pending_implicit_tokens :: [RealLocated Token],+        -- This is the next token to be considered or, if it is Nothing,+        -- we need to get the next token from the input stream:+        alr_next_token :: Maybe (RealLocated Token),+        -- This is what we consider to be the location of the last token+        -- emitted:+        alr_last_loc :: RealSrcSpan,+        -- The stack of layout contexts:+        alr_context :: [ALRContext],+        -- Are we expecting a '{'? If it's Just, then the ALRLayout tells+        -- us what sort of layout the '{' will open:+        alr_expecting_ocurly :: Maybe ALRLayout,+        -- Have we just had the '}' for a let block? If so, than an 'in'+        -- token doesn't need to close anything:+        alr_justClosedExplicitLetBlock :: Bool,++        -- If this is enabled, '{-# LINE ... -#}' and '{-# COLUMN ... #-}'+        -- update the 'loc' field. Otherwise, those pragmas are lexed as tokens.+        use_pos_prags :: Bool,++        -- The next three are used to implement Annotations giving the+        -- locations of 'noise' tokens in the source, so that users of+        -- the GHC API can do source to source conversions.+        -- See note [Api annotations] in ApiAnnotation.hs+        annotations :: [(ApiAnnKey,[SrcSpan])],+        comment_q :: [Located AnnotationComment],+        annotations_comments :: [(SrcSpan,[Located AnnotationComment])]+     }+        -- last_loc and last_len are used when generating error messages,+        -- and in pushCurrentContext only.  Sigh, if only Happy passed the+        -- current token to happyError, we could at least get rid of last_len.+        -- Getting rid of last_loc would require finding another way to+        -- implement pushCurrentContext (which is only called from one place).++data ALRContext = ALRNoLayout Bool{- does it contain commas? -}+                              Bool{- is it a 'let' block? -}+                | ALRLayout ALRLayout Int+data ALRLayout = ALRLayoutLet+               | ALRLayoutWhere+               | ALRLayoutOf+               | ALRLayoutDo++newtype P a = P { unP :: PState -> ParseResult a }++instance Functor P where+  fmap = liftM++instance Applicative P where+  pure = returnP+  (<*>) = ap++instance Monad P where+  (>>=) = thenP+  fail = MonadFail.fail++instance MonadFail P where+  fail = failP++returnP :: a -> P a+returnP a = a `seq` (P $ \s -> POk s a)++thenP :: P a -> (a -> P b) -> P b+(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)++failMsgP :: String -> P a+failMsgP msg =+  P $ \s ->+    PFailed (getMessages s) (RealSrcSpan (last_loc s)) (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++getPState :: P PState+getPState = P $ \s -> POk s s++withThisPackage :: (UnitId -> a) -> P a+withThisPackage f = P $ \s@(PState{options = o}) -> POk s (f (pThisPackage o))++extension :: (ExtsBitmap -> Bool) -> P Bool+extension p = P $ \s -> POk s (p $! (pExtsBitmap . options) s)++getExts :: P ExtsBitmap+getExts = P $ \s -> POk s (pExtsBitmap . options $ s)++setExts :: (ExtsBitmap -> ExtsBitmap) -> P ()+setExts f = P $ \s -> POk s {+  options =+    let p = options s+    in  p { pExtsBitmap = f (pExtsBitmap p) }+  } ()++setSrcLoc :: RealSrcLoc -> P ()+setSrcLoc new_loc = P $ \s -> POk s{loc=new_loc} ()++getSrcLoc :: P RealSrcLoc+getSrcLoc = P $ \s@(PState{ loc=loc }) -> POk s loc++addSrcFile :: FastString -> P ()+addSrcFile f = P $ \s -> POk s{ srcfiles = f : srcfiles s } ()++setLastToken :: RealSrcSpan -> Int -> P ()+setLastToken loc len = P $ \s -> POk s {+  last_loc=loc,+  last_len=len+  } ()++setLastTk :: Token -> P ()+setLastTk tk = P $ \s -> POk s { last_tk = Just tk } ()++getLastTk :: P (Maybe Token)+getLastTk = P $ \s@(PState { last_tk = last_tk }) -> POk s last_tk++data AlexInput = AI RealSrcLoc StringBuffer++{-+Note [Unicode in Alex]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Although newer versions of Alex support unicode, this grammar is processed with+the old style '--latin1' behaviour. This means that when implementing the+functions++    alexGetByte       :: AlexInput -> Maybe (Word8,AlexInput)+    alexInputPrevChar :: AlexInput -> Char++which Alex uses to take apart our 'AlexInput', we must++  * return a latin1 character in the 'Word8' that 'alexGetByte' expects+  * return a latin1 character in 'alexInputPrevChar'.++We handle this in 'adjustChar' by squishing entire classes of unicode+characters into single bytes.+-}++{-# INLINE adjustChar #-}+adjustChar :: Char -> Word8+adjustChar c = fromIntegral $ ord adj_c+  where non_graphic     = '\x00'+        upper           = '\x01'+        lower           = '\x02'+        digit           = '\x03'+        symbol          = '\x04'+        space           = '\x05'+        other_graphic   = '\x06'+        uniidchar       = '\x07'++        adj_c+          | c <= '\x07' = non_graphic+          | c <= '\x7f' = c+          -- Alex doesn't handle Unicode, so when Unicode+          -- character is encountered we output these values+          -- with the actual character value hidden in the state.+          | otherwise =+                -- NB: The logic behind these definitions is also reflected+                -- in basicTypes/Lexeme.hs+                -- Any changes here should likely be reflected there.++                case generalCategory c of+                  UppercaseLetter       -> upper+                  LowercaseLetter       -> lower+                  TitlecaseLetter       -> upper+                  ModifierLetter        -> uniidchar -- see #10196+                  OtherLetter           -> lower -- see #1103+                  NonSpacingMark        -> uniidchar -- see #7650+                  SpacingCombiningMark  -> other_graphic+                  EnclosingMark         -> other_graphic+                  DecimalNumber         -> digit+                  LetterNumber          -> other_graphic+                  OtherNumber           -> digit -- see #4373+                  ConnectorPunctuation  -> symbol+                  DashPunctuation       -> symbol+                  OpenPunctuation       -> other_graphic+                  ClosePunctuation      -> other_graphic+                  InitialQuote          -> other_graphic+                  FinalQuote            -> other_graphic+                  OtherPunctuation      -> symbol+                  MathSymbol            -> symbol+                  CurrencySymbol        -> symbol+                  ModifierSymbol        -> symbol+                  OtherSymbol           -> symbol+                  Space                 -> space+                  _other                -> non_graphic++-- Getting the previous 'Char' isn't enough here - we need to convert it into+-- the same format that 'alexGetByte' would have produced.+--+-- See Note [Unicode in Alex] and #13986.+alexInputPrevChar :: AlexInput -> Char+alexInputPrevChar (AI _ buf) = chr (fromIntegral (adjustChar pc))+  where pc = prevChar buf '\n'++-- backwards compatibility for Alex 2.x+alexGetChar :: AlexInput -> Maybe (Char,AlexInput)+alexGetChar inp = case alexGetByte inp of+                    Nothing    -> Nothing+                    Just (b,i) -> c `seq` Just (c,i)+                       where c = chr $ fromIntegral b++-- See Note [Unicode in Alex]+alexGetByte :: AlexInput -> Maybe (Word8,AlexInput)+alexGetByte (AI loc s)+  | atEnd s   = Nothing+  | otherwise = byte `seq` loc' `seq` s' `seq`+                --trace (show (ord c)) $+                Just (byte, (AI loc' s'))+  where (c,s') = nextChar s+        loc'   = advanceSrcLoc loc c+        byte   = adjustChar c++-- This version does not squash unicode characters, it is used when+-- lexing strings.+alexGetChar' :: AlexInput -> Maybe (Char,AlexInput)+alexGetChar' (AI loc s)+  | atEnd s   = Nothing+  | otherwise = c `seq` loc' `seq` s' `seq`+                --trace (show (ord c)) $+                Just (c, (AI loc' s'))+  where (c,s') = nextChar s+        loc'   = advanceSrcLoc loc c++getInput :: P AlexInput+getInput = P $ \s@PState{ loc=l, buffer=b } -> POk s (AI l b)++setInput :: AlexInput -> P ()+setInput (AI l b) = P $ \s -> POk s{ loc=l, buffer=b } ()++nextIsEOF :: P Bool+nextIsEOF = do+  AI _ s <- getInput+  return $ atEnd s++pushLexState :: Int -> P ()+pushLexState ls = P $ \s@PState{ lex_state=l } -> POk s{lex_state=ls:l} ()++popLexState :: P Int+popLexState = P $ \s@PState{ lex_state=ls:l } -> POk s{ lex_state=l } ls++getLexState :: P Int+getLexState = P $ \s@PState{ lex_state=ls:_ } -> POk s ls++popNextToken :: P (Maybe (RealLocated Token))+popNextToken+    = P $ \s@PState{ alr_next_token = m } ->+              POk (s {alr_next_token = Nothing}) m++activeContext :: P Bool+activeContext = do+  ctxt <- getALRContext+  expc <- getAlrExpectingOCurly+  impt <- implicitTokenPending+  case (ctxt,expc) of+    ([],Nothing) -> return impt+    _other       -> return True++setAlrLastLoc :: RealSrcSpan -> P ()+setAlrLastLoc l = P $ \s -> POk (s {alr_last_loc = l}) ()++getAlrLastLoc :: P RealSrcSpan+getAlrLastLoc = P $ \s@(PState {alr_last_loc = l}) -> POk s l++getALRContext :: P [ALRContext]+getALRContext = P $ \s@(PState {alr_context = cs}) -> POk s cs++setALRContext :: [ALRContext] -> P ()+setALRContext cs = P $ \s -> POk (s {alr_context = cs}) ()++getALRTransitional :: P Bool+getALRTransitional = P $ \s@PState {options = o} ->+  POk s (extopt LangExt.AlternativeLayoutRuleTransitional o)++getJustClosedExplicitLetBlock :: P Bool+getJustClosedExplicitLetBlock+ = P $ \s@(PState {alr_justClosedExplicitLetBlock = b}) -> POk s b++setJustClosedExplicitLetBlock :: Bool -> P ()+setJustClosedExplicitLetBlock b+ = P $ \s -> POk (s {alr_justClosedExplicitLetBlock = b}) ()++setNextToken :: RealLocated Token -> P ()+setNextToken t = P $ \s -> POk (s {alr_next_token = Just t}) ()++implicitTokenPending :: P Bool+implicitTokenPending+    = P $ \s@PState{ alr_pending_implicit_tokens = ts } ->+              case ts of+              [] -> POk s False+              _  -> POk s True++popPendingImplicitToken :: P (Maybe (RealLocated Token))+popPendingImplicitToken+    = P $ \s@PState{ alr_pending_implicit_tokens = ts } ->+              case ts of+              [] -> POk s Nothing+              (t : ts') -> POk (s {alr_pending_implicit_tokens = ts'}) (Just t)++setPendingImplicitTokens :: [RealLocated Token] -> P ()+setPendingImplicitTokens ts = P $ \s -> POk (s {alr_pending_implicit_tokens = ts}) ()++getAlrExpectingOCurly :: P (Maybe ALRLayout)+getAlrExpectingOCurly = P $ \s@(PState {alr_expecting_ocurly = b}) -> POk s b++setAlrExpectingOCurly :: Maybe ALRLayout -> P ()+setAlrExpectingOCurly b = P $ \s -> POk (s {alr_expecting_ocurly = b}) ()++-- for reasons of efficiency, flags indicating language extensions (eg,+-- -fglasgow-exts or -XParallelArrays) are represented by a bitmap+-- stored in an unboxed Word64+type ExtsBitmap = Word64++xbit :: ExtBits -> ExtsBitmap+xbit = bit . fromEnum++xtest :: ExtBits -> ExtsBitmap -> Bool+xtest ext xmap = testBit xmap (fromEnum ext)++data ExtBits+  = FfiBit+  | InterruptibleFfiBit+  | CApiFfiBit+  | ArrowsBit+  | ThBit+  | ThQuotesBit+  | IpBit+  | OverloadedLabelsBit -- #x overloaded labels+  | ExplicitForallBit -- the 'forall' keyword and '.' symbol+  | BangPatBit -- Tells the parser to understand bang-patterns+               -- (doesn't affect the lexer)+  | PatternSynonymsBit -- pattern synonyms+  | HaddockBit-- Lex and parse Haddock comments+  | MagicHashBit -- "#" in both functions and operators+  | RecursiveDoBit -- mdo+  | UnicodeSyntaxBit -- the forall symbol, arrow symbols, etc+  | UnboxedTuplesBit -- (# and #)+  | UnboxedSumsBit -- (# and #)+  | DatatypeContextsBit+  | TransformComprehensionsBit+  | QqBit -- enable quasiquoting+  | InRulePragBit+  | RawTokenStreamBit -- producing a token stream with all comments included+  | SccProfilingOnBit+  | HpcBit+  | AlternativeLayoutRuleBit+  | RelaxedLayoutBit+  | NondecreasingIndentationBit+  | SafeHaskellBit+  | TraditionalRecordSyntaxBit+  | ExplicitNamespacesBit+  | LambdaCaseBit+  | BinaryLiteralsBit+  | NegativeLiteralsBit+  | HexFloatLiteralsBit+  | TypeApplicationsBit+  | StaticPointersBit+  | NumericUnderscoresBit+  | StarIsTypeBit+  deriving Enum+++always :: ExtsBitmap -> Bool+always           _     = True+arrowsEnabled :: ExtsBitmap -> Bool+arrowsEnabled = xtest ArrowsBit+thEnabled :: ExtsBitmap -> Bool+thEnabled = xtest ThBit+thQuotesEnabled :: ExtsBitmap -> Bool+thQuotesEnabled = xtest ThQuotesBit+ipEnabled :: ExtsBitmap -> Bool+ipEnabled = xtest IpBit+overloadedLabelsEnabled :: ExtsBitmap -> Bool+overloadedLabelsEnabled = xtest OverloadedLabelsBit+explicitForallEnabled :: ExtsBitmap -> Bool+explicitForallEnabled = xtest ExplicitForallBit+bangPatEnabled :: ExtsBitmap -> Bool+bangPatEnabled = xtest BangPatBit+haddockEnabled :: ExtsBitmap -> Bool+haddockEnabled = xtest HaddockBit+magicHashEnabled :: ExtsBitmap -> Bool+magicHashEnabled = xtest MagicHashBit+unicodeSyntaxEnabled :: ExtsBitmap -> Bool+unicodeSyntaxEnabled = xtest UnicodeSyntaxBit+unboxedTuplesEnabled :: ExtsBitmap -> Bool+unboxedTuplesEnabled = xtest UnboxedTuplesBit+unboxedSumsEnabled :: ExtsBitmap -> Bool+unboxedSumsEnabled = xtest UnboxedSumsBit+datatypeContextsEnabled :: ExtsBitmap -> Bool+datatypeContextsEnabled = xtest DatatypeContextsBit+qqEnabled :: ExtsBitmap -> Bool+qqEnabled = xtest QqBit+inRulePrag :: ExtsBitmap -> Bool+inRulePrag = xtest InRulePragBit+rawTokenStreamEnabled :: ExtsBitmap -> Bool+rawTokenStreamEnabled = xtest RawTokenStreamBit+alternativeLayoutRule :: ExtsBitmap -> Bool+alternativeLayoutRule = xtest AlternativeLayoutRuleBit+hpcEnabled :: ExtsBitmap -> Bool+hpcEnabled = xtest HpcBit+relaxedLayout :: ExtsBitmap -> Bool+relaxedLayout = xtest RelaxedLayoutBit+nondecreasingIndentation :: ExtsBitmap -> Bool+nondecreasingIndentation = xtest NondecreasingIndentationBit+sccProfilingOn :: ExtsBitmap -> Bool+sccProfilingOn = xtest SccProfilingOnBit+traditionalRecordSyntaxEnabled :: ExtsBitmap -> Bool+traditionalRecordSyntaxEnabled = xtest TraditionalRecordSyntaxBit++explicitNamespacesEnabled :: ExtsBitmap -> Bool+explicitNamespacesEnabled = xtest ExplicitNamespacesBit+lambdaCaseEnabled :: ExtsBitmap -> Bool+lambdaCaseEnabled = xtest LambdaCaseBit+binaryLiteralsEnabled :: ExtsBitmap -> Bool+binaryLiteralsEnabled = xtest BinaryLiteralsBit+negativeLiteralsEnabled :: ExtsBitmap -> Bool+negativeLiteralsEnabled = xtest NegativeLiteralsBit+hexFloatLiteralsEnabled :: ExtsBitmap -> Bool+hexFloatLiteralsEnabled = xtest HexFloatLiteralsBit+patternSynonymsEnabled :: ExtsBitmap -> Bool+patternSynonymsEnabled = xtest PatternSynonymsBit+typeApplicationEnabled :: ExtsBitmap -> Bool+typeApplicationEnabled = xtest TypeApplicationsBit+staticPointersEnabled :: ExtsBitmap -> Bool+staticPointersEnabled = xtest StaticPointersBit+numericUnderscoresEnabled :: ExtsBitmap -> Bool+numericUnderscoresEnabled = xtest NumericUnderscoresBit+starIsTypeEnabled :: ExtsBitmap -> Bool+starIsTypeEnabled = xtest StarIsTypeBit++-- PState for parsing options pragmas+--+pragState :: DynFlags -> StringBuffer -> RealSrcLoc -> PState+pragState dynflags buf loc = (mkPState dynflags buf loc) {+                                 lex_state = [bol, option_prags, 0]+                             }++-- | Extracts the flag information needed for parsing+mkParserFlags :: DynFlags -> ParserFlags+mkParserFlags flags =+    ParserFlags {+      pWarningFlags = DynFlags.warningFlags flags+    , pExtensionFlags = DynFlags.extensionFlags flags+    , pThisPackage = DynFlags.thisPackage flags+    , pExtsBitmap = bitmap+    }+  where+    bitmap = safeHaskellBit .|. langExtBits .|. optBits+    safeHaskellBit =+          SafeHaskellBit `setBitIf` safeImportsOn flags+    langExtBits =+          FfiBit                      `xoptBit` LangExt.ForeignFunctionInterface+      .|. InterruptibleFfiBit         `xoptBit` LangExt.InterruptibleFFI+      .|. CApiFfiBit                  `xoptBit` LangExt.CApiFFI+      .|. ArrowsBit                   `xoptBit` LangExt.Arrows+      .|. ThBit                       `xoptBit` LangExt.TemplateHaskell+      .|. ThQuotesBit                 `xoptBit` LangExt.TemplateHaskellQuotes+      .|. QqBit                       `xoptBit` LangExt.QuasiQuotes+      .|. IpBit                       `xoptBit` LangExt.ImplicitParams+      .|. OverloadedLabelsBit         `xoptBit` LangExt.OverloadedLabels+      .|. ExplicitForallBit           `xoptBit` LangExt.ExplicitForAll+      .|. BangPatBit                  `xoptBit` LangExt.BangPatterns+      .|. MagicHashBit                `xoptBit` LangExt.MagicHash+      .|. RecursiveDoBit              `xoptBit` LangExt.RecursiveDo+      .|. UnicodeSyntaxBit            `xoptBit` LangExt.UnicodeSyntax+      .|. UnboxedTuplesBit            `xoptBit` LangExt.UnboxedTuples+      .|. UnboxedSumsBit              `xoptBit` LangExt.UnboxedSums+      .|. DatatypeContextsBit         `xoptBit` LangExt.DatatypeContexts+      .|. TransformComprehensionsBit  `xoptBit` LangExt.TransformListComp+      .|. TransformComprehensionsBit  `xoptBit` LangExt.MonadComprehensions+      .|. AlternativeLayoutRuleBit    `xoptBit` LangExt.AlternativeLayoutRule+      .|. RelaxedLayoutBit            `xoptBit` LangExt.RelaxedLayout+      .|. NondecreasingIndentationBit `xoptBit` LangExt.NondecreasingIndentation+      .|. TraditionalRecordSyntaxBit  `xoptBit` LangExt.TraditionalRecordSyntax+      .|. ExplicitNamespacesBit       `xoptBit` LangExt.ExplicitNamespaces+      .|. LambdaCaseBit               `xoptBit` LangExt.LambdaCase+      .|. BinaryLiteralsBit           `xoptBit` LangExt.BinaryLiterals+      .|. NegativeLiteralsBit         `xoptBit` LangExt.NegativeLiterals+      .|. HexFloatLiteralsBit         `xoptBit` LangExt.HexFloatLiterals+      .|. PatternSynonymsBit          `xoptBit` LangExt.PatternSynonyms+      .|. TypeApplicationsBit         `xoptBit` LangExt.TypeApplications+      .|. StaticPointersBit           `xoptBit` LangExt.StaticPointers+      .|. NumericUnderscoresBit       `xoptBit` LangExt.NumericUnderscores+      .|. StarIsTypeBit               `xoptBit` LangExt.StarIsType+    optBits =+          HaddockBit        `goptBit` Opt_Haddock+      .|. RawTokenStreamBit `goptBit` Opt_KeepRawTokenStream+      .|. HpcBit            `goptBit` Opt_Hpc+      .|. SccProfilingOnBit `goptBit` Opt_SccProfilingOn++    xoptBit bit ext = bit `setBitIf` xopt ext flags+    goptBit bit opt = bit `setBitIf` gopt opt flags++    setBitIf :: ExtBits -> Bool -> ExtsBitmap+    b `setBitIf` cond | cond      = xbit b+                      | otherwise = 0++-- | Creates a parse state from a 'DynFlags' value+mkPState :: DynFlags -> StringBuffer -> RealSrcLoc -> PState+mkPState flags = mkPStatePure (mkParserFlags flags)++-- | Creates a parse state from a 'ParserFlags' value+mkPStatePure :: ParserFlags -> StringBuffer -> RealSrcLoc -> PState+mkPStatePure options buf loc =+  PState {+      buffer        = buf,+      options       = options,+      messages      = const emptyMessages,+      tab_first     = Nothing,+      tab_count     = 0,+      last_tk       = Nothing,+      last_loc      = mkRealSrcSpan loc loc,+      last_len      = 0,+      loc           = loc,+      context       = [],+      lex_state     = [bol, 0],+      srcfiles      = [],+      alr_pending_implicit_tokens = [],+      alr_next_token = Nothing,+      alr_last_loc = alrInitialLoc (fsLit "<no file>"),+      alr_context = [],+      alr_expecting_ocurly = Nothing,+      alr_justClosedExplicitLetBlock = False,+      use_pos_prags = True,+      annotations = [],+      comment_q = [],+      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'} ()++addTabWarning :: RealSrcSpan -> P ()+addTabWarning srcspan+ = P $ \s@PState{tab_first=tf, tab_count=tc, options=o} ->+       let tf' = if isJust tf then tf else Just srcspan+           tc' = tc + 1+           s' = if warnopt Opt_WarnTabs o+                then s{tab_first = tf', tab_count = tc'}+                else s+       in POk s' ()++mkTabWarning :: PState -> DynFlags -> Maybe ErrMsg+mkTabWarning PState{tab_first=tf, tab_count=tc} d =+  let middle = if tc == 1+        then text ""+        else text ", and in" <+> speakNOf (tc - 1) (text "further location")+      message = text "Tab character found here"+                <> middle+                <> text "."+                $+$ text "Please use spaces instead."+  in fmap (\s -> makeIntoWarning (Reason Opt_WarnTabs) $+                 mkWarnMsg d (RealSrcSpan s) alwaysQualify message) tf++getMessages :: PState -> DynFlags -> Messages+getMessages p@PState{messages=m} d =+  let (ws, es) = m d+      tabwarning = mkTabWarning p d+      ws' = maybe ws (`consBag` ws) tabwarning+  in (ws', es)++getContext :: P [LayoutContext]+getContext = P $ \s@PState{context=ctx} -> POk s ctx++setContext :: [LayoutContext] -> P ()+setContext ctx = P $ \s -> POk s{context=ctx} ()++popContext :: P ()+popContext = P $ \ s@(PState{ buffer = buf, options = o, context = ctx,+                              last_len = len, last_loc = last_loc }) ->+  case ctx of+        (_:tl) ->+          POk s{ context = tl } ()+        []     ->+          PFailed (getMessages s) (RealSrcSpan last_loc) (srcParseErr o buf len)++-- Push a new layout context at the indentation of the last token read.+pushCurrentContext :: GenSemic -> P ()+pushCurrentContext gen_semic = P $ \ s@PState{ last_loc=loc, context=ctx } ->+    POk s{context = Layout (srcSpanStartCol loc) gen_semic : ctx} ()++-- This is only used at the outer level of a module when the 'module' keyword is+-- missing.+pushModuleContext :: P ()+pushModuleContext = pushCurrentContext generateSemic++getOffside :: P (Ordering, Bool)+getOffside = P $ \s@PState{last_loc=loc, context=stk} ->+                let offs = srcSpanStartCol loc in+                let ord = case stk of+                            Layout n gen_semic : _ ->+                              --trace ("layout: " ++ show n ++ ", offs: " ++ show offs) $+                              (compare offs n, gen_semic)+                            _ ->+                              (GT, dontGenerateSemic)+                in POk s ord++-- ---------------------------------------------------------------------------+-- Construct a parse error++srcParseErr+  :: ParserFlags+  -> StringBuffer       -- current buffer (placed just after the last token)+  -> Int                -- length of the previous token+  -> MsgDoc+srcParseErr options buf len+  = if null token+         then text "parse error (possibly incorrect indentation or mismatched brackets)"+         else text "parse error on input" <+> quotes (text token)+              $$ ppWhen (not th_enabled && token == "$") -- #7396+                        (text "Perhaps you intended to use TemplateHaskell")+              $$ ppWhen (token == "<-")+                        (if mdoInLast100+                           then text "Perhaps you intended to use RecursiveDo"+                           else text "Perhaps this statement should be within a 'do' block?")+              $$ ppWhen (token == "=")+                        (text "Perhaps you need a 'let' in a 'do' block?"+                         $$ text "e.g. 'let x = 5' instead of 'x = 5'")+              $$ ppWhen (not ps_enabled && pattern == "pattern ") -- #12429+                        (text "Perhaps you intended to use PatternSynonyms")+  where token = lexemeToString (offsetBytes (-len) buf) len+        pattern = decodePrevNChars 8 buf+        last100 = decodePrevNChars 100 buf+        mdoInLast100 = "mdo" `isInfixOf` last100+        th_enabled = extopt LangExt.TemplateHaskell options+        ps_enabled = extopt LangExt.PatternSynonyms options++-- Report a parse failure, giving the span of the previous token as+-- the location of the error.  This is the entry point for errors+-- detected during parsing.+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)++-- A lexical error is reported at a particular position in the source file,+-- not over a token range.+lexError :: String -> P a+lexError str = do+  loc <- getSrcLoc+  (AI end buf) <- getInput+  reportLexError loc end buf str++-- -----------------------------------------------------------------------------+-- This is the top-level function: called from the parser each time a+-- new token is to be read from the input.++lexer :: Bool -> (Located Token -> P a) -> P a+lexer queueComments cont = do+  alr <- extension alternativeLayoutRule+  let lexTokenFun = if alr then lexTokenAlr else lexToken+  (L span tok) <- lexTokenFun+  --trace ("token: " ++ show tok) $ do++  case tok of+    ITeof -> addAnnotationOnly noSrcSpan AnnEofPos (RealSrcSpan span)+    _ -> return ()++  if (queueComments && isDocComment tok)+    then queueComment (L (RealSrcSpan span) tok)+    else return ()++  if (queueComments && isComment tok)+    then queueComment (L (RealSrcSpan span) tok) >> lexer queueComments cont+    else cont (L (RealSrcSpan span) tok)++lexTokenAlr :: P (RealLocated Token)+lexTokenAlr = do mPending <- popPendingImplicitToken+                 t <- case mPending of+                      Nothing ->+                          do mNext <- popNextToken+                             t <- case mNext of+                                  Nothing -> lexToken+                                  Just next -> return next+                             alternativeLayoutRuleToken t+                      Just t ->+                          return t+                 setAlrLastLoc (getLoc t)+                 case unLoc t of+                     ITwhere -> setAlrExpectingOCurly (Just ALRLayoutWhere)+                     ITlet   -> setAlrExpectingOCurly (Just ALRLayoutLet)+                     ITof    -> setAlrExpectingOCurly (Just ALRLayoutOf)+                     ITdo    -> setAlrExpectingOCurly (Just ALRLayoutDo)+                     ITmdo   -> setAlrExpectingOCurly (Just ALRLayoutDo)+                     ITrec   -> setAlrExpectingOCurly (Just ALRLayoutDo)+                     _       -> return ()+                 return t++alternativeLayoutRuleToken :: RealLocated Token -> P (RealLocated Token)+alternativeLayoutRuleToken t+    = do context <- getALRContext+         lastLoc <- getAlrLastLoc+         mExpectingOCurly <- getAlrExpectingOCurly+         transitional <- getALRTransitional+         justClosedExplicitLetBlock <- getJustClosedExplicitLetBlock+         setJustClosedExplicitLetBlock False+         let thisLoc = getLoc t+             thisCol = srcSpanStartCol thisLoc+             newLine = srcSpanStartLine thisLoc > srcSpanEndLine lastLoc+         case (unLoc t, context, mExpectingOCurly) of+             -- This case handles a GHC extension to the original H98+             -- layout rule...+             (ITocurly, _, Just alrLayout) ->+                 do setAlrExpectingOCurly Nothing+                    let isLet = case alrLayout of+                                ALRLayoutLet -> True+                                _ -> False+                    setALRContext (ALRNoLayout (containsCommas ITocurly) isLet : context)+                    return t+             -- ...and makes this case unnecessary+             {-+             -- I think our implicit open-curly handling is slightly+             -- different to John's, in how it interacts with newlines+             -- and "in"+             (ITocurly, _, Just _) ->+                 do setAlrExpectingOCurly Nothing+                    setNextToken t+                    lexTokenAlr+             -}+             (_, ALRLayout _ col : _ls, Just expectingOCurly)+              | (thisCol > col) ||+                (thisCol == col &&+                 isNonDecreasingIndentation expectingOCurly) ->+                 do setAlrExpectingOCurly Nothing+                    setALRContext (ALRLayout expectingOCurly thisCol : context)+                    setNextToken t+                    return (L thisLoc ITocurly)+              | otherwise ->+                 do setAlrExpectingOCurly Nothing+                    setPendingImplicitTokens [L lastLoc ITccurly]+                    setNextToken t+                    return (L lastLoc ITocurly)+             (_, _, Just expectingOCurly) ->+                 do setAlrExpectingOCurly Nothing+                    setALRContext (ALRLayout expectingOCurly thisCol : context)+                    setNextToken t+                    return (L thisLoc ITocurly)+             -- We do the [] cases earlier than in the spec, as we+             -- have an actual EOF token+             (ITeof, ALRLayout _ _ : ls, _) ->+                 do setALRContext ls+                    setNextToken t+                    return (L thisLoc ITccurly)+             (ITeof, _, _) ->+                 return t+             -- the other ITeof case omitted; general case below covers it+             (ITin, _, _)+              | justClosedExplicitLetBlock ->+                 return t+             (ITin, ALRLayout ALRLayoutLet _ : ls, _)+              | newLine ->+                 do setPendingImplicitTokens [t]+                    setALRContext ls+                    return (L thisLoc ITccurly)+             -- This next case is to handle a transitional issue:+             (ITwhere, ALRLayout _ col : ls, _)+              | newLine && thisCol == col && transitional ->+                 do addWarning Opt_WarnAlternativeLayoutRuleTransitional+                               (RealSrcSpan thisLoc)+                               (transitionalAlternativeLayoutWarning+                                    "`where' clause at the same depth as implicit layout block")+                    setALRContext ls+                    setNextToken t+                    -- Note that we use lastLoc, as we may need to close+                    -- more layouts, or give a semicolon+                    return (L lastLoc ITccurly)+             -- This next case is to handle a transitional issue:+             (ITvbar, ALRLayout _ col : ls, _)+              | newLine && thisCol == col && transitional ->+                 do addWarning Opt_WarnAlternativeLayoutRuleTransitional+                               (RealSrcSpan thisLoc)+                               (transitionalAlternativeLayoutWarning+                                    "`|' at the same depth as implicit layout block")+                    setALRContext ls+                    setNextToken t+                    -- Note that we use lastLoc, as we may need to close+                    -- more layouts, or give a semicolon+                    return (L lastLoc ITccurly)+             (_, ALRLayout _ col : ls, _)+              | newLine && thisCol == col ->+                 do setNextToken t+                    return (L thisLoc ITsemi)+              | newLine && thisCol < col ->+                 do setALRContext ls+                    setNextToken t+                    -- Note that we use lastLoc, as we may need to close+                    -- more layouts, or give a semicolon+                    return (L lastLoc ITccurly)+             -- We need to handle close before open, as 'then' is both+             -- an open and a close+             (u, _, _)+              | isALRclose u ->+                 case context of+                 ALRLayout _ _ : ls ->+                     do setALRContext ls+                        setNextToken t+                        return (L thisLoc ITccurly)+                 ALRNoLayout _ isLet : ls ->+                     do let ls' = if isALRopen u+                                     then ALRNoLayout (containsCommas u) False : ls+                                     else ls+                        setALRContext ls'+                        when isLet $ setJustClosedExplicitLetBlock True+                        return t+                 [] ->+                     do let ls = if isALRopen u+                                    then [ALRNoLayout (containsCommas u) False]+                                    else []+                        setALRContext ls+                        -- XXX This is an error in John's code, but+                        -- it looks reachable to me at first glance+                        return t+             (u, _, _)+              | isALRopen u ->+                 do setALRContext (ALRNoLayout (containsCommas u) False : context)+                    return t+             (ITin, ALRLayout ALRLayoutLet _ : ls, _) ->+                 do setALRContext ls+                    setPendingImplicitTokens [t]+                    return (L thisLoc ITccurly)+             (ITin, ALRLayout _ _ : ls, _) ->+                 do setALRContext ls+                    setNextToken t+                    return (L thisLoc ITccurly)+             -- the other ITin case omitted; general case below covers it+             (ITcomma, ALRLayout _ _ : ls, _)+              | topNoLayoutContainsCommas ls ->+                 do setALRContext ls+                    setNextToken t+                    return (L thisLoc ITccurly)+             (ITwhere, ALRLayout ALRLayoutDo _ : ls, _) ->+                 do setALRContext ls+                    setPendingImplicitTokens [t]+                    return (L thisLoc ITccurly)+             -- the other ITwhere case omitted; general case below covers it+             (_, _, _) -> return t++transitionalAlternativeLayoutWarning :: String -> SDoc+transitionalAlternativeLayoutWarning msg+    = text "transitional layout will not be accepted in the future:"+   $$ text msg++isALRopen :: Token -> Bool+isALRopen ITcase          = True+isALRopen ITif            = True+isALRopen ITthen          = True+isALRopen IToparen        = True+isALRopen ITobrack        = True+isALRopen ITocurly        = True+-- GHC Extensions:+isALRopen IToubxparen     = True+isALRopen ITparenEscape   = True+isALRopen ITparenTyEscape = True+isALRopen _               = False++isALRclose :: Token -> Bool+isALRclose ITof     = True+isALRclose ITthen   = True+isALRclose ITelse   = True+isALRclose ITcparen = True+isALRclose ITcbrack = True+isALRclose ITccurly = True+-- GHC Extensions:+isALRclose ITcubxparen = True+isALRclose _        = False++isNonDecreasingIndentation :: ALRLayout -> Bool+isNonDecreasingIndentation ALRLayoutDo = True+isNonDecreasingIndentation _           = False++containsCommas :: Token -> Bool+containsCommas IToparen = True+containsCommas ITobrack = True+-- John doesn't have {} as containing commas, but records contain them,+-- which caused a problem parsing Cabal's Distribution.Simple.InstallDirs+-- (defaultInstallDirs).+containsCommas ITocurly = True+-- GHC Extensions:+containsCommas IToubxparen = True+containsCommas _        = False++topNoLayoutContainsCommas :: [ALRContext] -> Bool+topNoLayoutContainsCommas [] = False+topNoLayoutContainsCommas (ALRLayout _ _ : ls) = topNoLayoutContainsCommas ls+topNoLayoutContainsCommas (ALRNoLayout b _ : _) = b++lexToken :: P (RealLocated Token)+lexToken = do+  inp@(AI loc1 buf) <- getInput+  sc <- getLexState+  exts <- getExts+  case alexScanUser exts inp sc of+    AlexEOF -> do+        let span = mkRealSrcSpan loc1 loc1+        setLastToken span 0+        return (L span ITeof)+    AlexError (AI loc2 buf) ->+        reportLexError loc1 loc2 buf "lexical error"+    AlexSkip inp2 _ -> do+        setInput inp2+        lexToken+    AlexToken inp2@(AI end buf2) _ t -> do+        setInput inp2+        let span = mkRealSrcSpan loc1 end+        let bytes = byteDiff buf buf2+        span `seq` setLastToken span bytes+        lt <- t span buf bytes+        case unLoc lt of+          ITlineComment _  -> return lt+          ITblockComment _ -> return lt+          lt' -> do+            setLastTk lt'+            return lt++reportLexError :: RealSrcLoc -> RealSrcLoc -> StringBuffer -> [Char] -> P a+reportLexError loc1 loc2 buf str+  | atEnd buf = failLocMsgP loc1 loc2 (str ++ " at end of input")+  | otherwise =+  let c = fst (nextChar buf)+  in if c == '\0' -- decoding errors are mapped to '\0', see utf8DecodeChar#+     then failLocMsgP loc2 loc2 (str ++ " (UTF-8 decoding error)")+     else failLocMsgP loc1 loc2 (str ++ " at character " ++ show c)++lexTokenStream :: StringBuffer -> RealSrcLoc -> DynFlags -> ParseResult [Located Token]+lexTokenStream buf loc dflags = unP go initState+    where dflags' = gopt_set (gopt_unset dflags Opt_Haddock) Opt_KeepRawTokenStream+          initState = (mkPState dflags' buf loc) { use_pos_prags = False }+          go = do+            ltok <- lexer False return+            case ltok of+              L _ ITeof -> return []+              _ -> liftM (ltok:) go++linePrags = Map.singleton "line" linePrag++fileHeaderPrags = Map.fromList([("options", lex_string_prag IToptions_prag),+                                 ("options_ghc", lex_string_prag IToptions_prag),+                                 ("options_haddock", lex_string_prag ITdocOptions),+                                 ("language", token ITlanguage_prag),+                                 ("include", lex_string_prag ITinclude_prag)])++ignoredPrags = Map.fromList (map ignored pragmas)+               where ignored opt = (opt, nested_comment lexToken)+                     impls = ["hugs", "nhc98", "jhc", "yhc", "catch", "derive"]+                     options_pragmas = map ("options_" ++) impls+                     -- CFILES is a hugs-only thing.+                     pragmas = options_pragmas ++ ["cfiles", "contract"]++oneWordPrags = Map.fromList [+     ("rules", rulePrag),+     ("inline",+         strtoken (\s -> (ITinline_prag (SourceText s) Inline FunLike))),+     ("inlinable",+         strtoken (\s -> (ITinline_prag (SourceText s) Inlinable FunLike))),+     ("inlineable",+         strtoken (\s -> (ITinline_prag (SourceText s) Inlinable FunLike))),+                                    -- Spelling variant+     ("notinline",+         strtoken (\s -> (ITinline_prag (SourceText s) NoInline FunLike))),+     ("specialize", strtoken (\s -> ITspec_prag (SourceText s))),+     ("source", strtoken (\s -> ITsource_prag (SourceText s))),+     ("warning", strtoken (\s -> ITwarning_prag (SourceText s))),+     ("deprecated", strtoken (\s -> ITdeprecated_prag (SourceText s))),+     ("scc", strtoken (\s -> ITscc_prag (SourceText s))),+     ("generated", strtoken (\s -> ITgenerated_prag (SourceText s))),+     ("core", strtoken (\s -> ITcore_prag (SourceText s))),+     ("unpack", strtoken (\s -> ITunpack_prag (SourceText s))),+     ("nounpack", strtoken (\s -> ITnounpack_prag (SourceText s))),+     ("ann", strtoken (\s -> ITann_prag (SourceText s))),+     ("minimal", strtoken (\s -> ITminimal_prag (SourceText s))),+     ("overlaps", strtoken (\s -> IToverlaps_prag (SourceText s))),+     ("overlappable", strtoken (\s -> IToverlappable_prag (SourceText s))),+     ("overlapping", strtoken (\s -> IToverlapping_prag (SourceText s))),+     ("incoherent", strtoken (\s -> ITincoherent_prag (SourceText s))),+     ("ctype", strtoken (\s -> ITctype (SourceText s))),+     ("complete", strtoken (\s -> ITcomplete_prag (SourceText s))),+     ("column", columnPrag)+     ]++twoWordPrags = Map.fromList [+     ("inline conlike",+         strtoken (\s -> (ITinline_prag (SourceText s) Inline ConLike))),+     ("notinline conlike",+         strtoken (\s -> (ITinline_prag (SourceText s) NoInline ConLike))),+     ("specialize inline",+         strtoken (\s -> (ITspec_inline_prag (SourceText s) True))),+     ("specialize notinline",+         strtoken (\s -> (ITspec_inline_prag (SourceText s) False)))+     ]++dispatch_pragmas :: Map String Action -> Action+dispatch_pragmas prags span buf len = case Map.lookup (clean_pragma (lexemeToString buf len)) prags of+                                       Just found -> found span buf len+                                       Nothing -> lexError "unknown pragma"++known_pragma :: Map String Action -> AlexAccPred ExtsBitmap+known_pragma prags _ (AI _ startbuf) _ (AI _ curbuf)+ = isKnown && nextCharIsNot curbuf pragmaNameChar+    where l = lexemeToString startbuf (byteDiff startbuf curbuf)+          isKnown = isJust $ Map.lookup (clean_pragma l) prags+          pragmaNameChar c = isAlphaNum c || c == '_'++clean_pragma :: String -> String+clean_pragma prag = canon_ws (map toLower (unprefix prag))+                    where unprefix prag' = case stripPrefix "{-#" prag' of+                                             Just rest -> rest+                                             Nothing -> prag'+                          canonical prag' = case prag' of+                                              "noinline" -> "notinline"+                                              "specialise" -> "specialize"+                                              "constructorlike" -> "conlike"+                                              _ -> prag'+                          canon_ws s = unwords (map canonical (words s))++++{-+%************************************************************************+%*                                                                      *+        Helper functions for generating annotations in the parser+%*                                                                      *+%************************************************************************+-}++-- | Encapsulated call to addAnnotation, requiring only the SrcSpan of+--   the AST construct the annotation belongs to; together with the+--   AnnKeywordId, this is the key of the annotation map.+--+--   This type is useful for places in the parser where it is not yet+--   known what SrcSpan an annotation should be added to.  The most+--   common situation is when we are parsing a list: the annotations+--   need to be associated with the AST element that *contains* the+--   list, not the list itself.  'AddAnn' lets us defer adding the+--   annotations until we finish parsing the list and are now parsing+--   the enclosing element; we then apply the 'AddAnn' to associate+--   the annotations.  Another common situation is where a common fragment of+--   the AST has been factored out but there is no separate AST node for+--   this fragment (this occurs in class and data declarations). In this+--   case, the annotation belongs to the parent data declaration.+--+--   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++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]+  where+    mj a l = (\s -> addAnnotation s a l)+    f = srcSpanFile ss+    sl = srcSpanStartLine ss+    sc = srcSpanStartCol ss+    el = srcSpanEndLine ss+    ec = srcSpanEndCol ss+    lo = mkSrcSpan (srcSpanStart s)         (mkSrcLoc f sl (sc+1))+    lc = mkSrcSpan (mkSrcLoc f el (ec - 1)) (srcSpanEnd s)++-- | Move the annotations and comments belonging to the @old@ span to the @new@+--   one.+moveAnnotations :: SrcSpan -> SrcSpan -> P ()+moveAnnotations old new = P $ \s ->+  let+    updateAnn ((l,a),v)+      | l == old = ((new,a),v)+      | otherwise = ((l,a),v)+    updateComment (l,c)+      | l == old = (new,c)+      | otherwise = (l,c)+  in+    POk s {+       annotations = map updateAnn (annotations s)+     , annotations_comments = map updateComment (annotations_comments s)+     } ()++queueComment :: Located Token -> P()+queueComment c = P $ \s -> POk s {+  comment_q = commentToAnnotation c : comment_q s+  } ()++-- | Go through the @comment_q@ in @PState@ and remove all comments+-- that belong within the given span+allocateComments :: SrcSpan -> P ()+allocateComments ss = P $ \s ->+  let+    (before,rest)  = break (\(L l _) -> isSubspanOf l ss) (comment_q s)+    (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)+     } ()++commentToAnnotation :: Located Token -> Located AnnotationComment+commentToAnnotation (L l (ITdocCommentNext s))  = L l (AnnDocCommentNext s)+commentToAnnotation (L l (ITdocCommentPrev s))  = L l (AnnDocCommentPrev s)+commentToAnnotation (L l (ITdocCommentNamed s)) = L l (AnnDocCommentNamed s)+commentToAnnotation (L l (ITdocSection n s))    = L l (AnnDocSection n s)+commentToAnnotation (L l (ITdocOptions s))      = L l (AnnDocOptions s)+commentToAnnotation (L l (ITlineComment s))     = L l (AnnLineComment s)+commentToAnnotation (L l (ITblockComment s))    = L l (AnnBlockComment s)+commentToAnnotation _                           = panic "commentToAnnotation"++-- ---------------------------------------------------------------------++isComment :: Token -> Bool+isComment (ITlineComment     _)   = True+isComment (ITblockComment    _)   = True+isComment _ = False++isDocComment :: Token -> Bool+isDocComment (ITdocCommentNext  _)   = True+isDocComment (ITdocCommentPrev  _)   = True+isDocComment (ITdocCommentNamed _)   = True+isDocComment (ITdocSection      _ _) = True+isDocComment (ITdocOptions      _)   = True+isDocComment _ = False++{- Note [Warnings in code generated by Alex]++We add the following warning suppression flags to all code generated by Alex:++{-# OPTIONS_GHC -fno-warn-unused-matches #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-tabs #-}+{-# OPTIONS_GHC -fno-warn-missing-signatures #-}++Without these flags, current versions of Alex will generate code that is not+warning free. Note that this is the result of Alex' internals, not of the way+we have written our (Lexer).x files.++As always, we need code to be warning free when validating with -Werror.++The list of flags is as short as possible (at the time of writing), to try to+avoid suppressing warnings for bugs in our own code.++TODO. Reevaluate this situation once Alex >3.1.4 is released. Hopefully you+can remove these flags from all (Lexer).x files in the repository, and also+delete this Note. Don't forget to update aclocal.m4, and send a HEADS UP+message to ghc-devs.++The first release of Alex after 3.1.4 will either suppress all warnings itself+[1] (bad), or most warnings will be fixed and only a few select ones will be+suppressed by default [2] (better).++[1] https://github.com/simonmar/alex/commit/1eefcde22ba1bb9b51d523814415714e20f0761e+[2] https://github.com/simonmar/alex/pull/69+-}+}
− parser/Parser.hs
@@ -1,12627 +0,0 @@-{-# OPTIONS_GHC -w #-}-{-# OPTIONS -XMagicHash -XBangPatterns -XTypeSynonymInstances -XFlexibleInstances -cpp #-}-#if __GLASGOW_HASKELL__ >= 710-{-# OPTIONS_GHC -XPartialTypeSignatures #-}-#endif--- | 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 )-import GHC.Exts-import Data.Char-import Control.Monad    ( mplus )-import Control.Applicative ((<$))---- 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           ( 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 PrelNames        ( eqTyCon_RDR )-import TysWiredIn       ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilDataCon,-                          unboxedUnitTyCon, unboxedUnitDataCon,-                          listTyCon_RDR, parrTyCon_RDR, consDataCon_RDR )---- compiler/utils-import Util             ( looksLikePackageName )-import GhcPrelude--import qualified GHC.LanguageExtensions as LangExt-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.9--newtype HappyAbsSyn  = HappyAbsSyn HappyAny-#if __GLASGOW_HASKELL__ >= 607-type HappyAny = Happy_GHC_Exts.Any-#else-type HappyAny = forall a . a-#endif-happyIn16 :: (Located RdrName) -> (HappyAbsSyn )-happyIn16 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn16 #-}-happyOut16 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut16 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut16 #-}-happyIn17 :: ([LHsUnit PackageName]) -> (HappyAbsSyn )-happyIn17 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn17 #-}-happyOut17 :: (HappyAbsSyn ) -> ([LHsUnit PackageName])-happyOut17 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut17 #-}-happyIn18 :: (OrdList (LHsUnit PackageName)) -> (HappyAbsSyn )-happyIn18 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn18 #-}-happyOut18 :: (HappyAbsSyn ) -> (OrdList (LHsUnit PackageName))-happyOut18 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut18 #-}-happyIn19 :: (LHsUnit PackageName) -> (HappyAbsSyn )-happyIn19 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn19 #-}-happyOut19 :: (HappyAbsSyn ) -> (LHsUnit PackageName)-happyOut19 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut19 #-}-happyIn20 :: (LHsUnitId PackageName) -> (HappyAbsSyn )-happyIn20 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn20 #-}-happyOut20 :: (HappyAbsSyn ) -> (LHsUnitId PackageName)-happyOut20 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut20 #-}-happyIn21 :: (OrdList (LHsModuleSubst PackageName)) -> (HappyAbsSyn )-happyIn21 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn21 #-}-happyOut21 :: (HappyAbsSyn ) -> (OrdList (LHsModuleSubst PackageName))-happyOut21 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut21 #-}-happyIn22 :: (LHsModuleSubst PackageName) -> (HappyAbsSyn )-happyIn22 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn22 #-}-happyOut22 :: (HappyAbsSyn ) -> (LHsModuleSubst PackageName)-happyOut22 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut22 #-}-happyIn23 :: (LHsModuleId PackageName) -> (HappyAbsSyn )-happyIn23 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn23 #-}-happyOut23 :: (HappyAbsSyn ) -> (LHsModuleId PackageName)-happyOut23 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut23 #-}-happyIn24 :: (Located PackageName) -> (HappyAbsSyn )-happyIn24 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn24 #-}-happyOut24 :: (HappyAbsSyn ) -> (Located PackageName)-happyOut24 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut24 #-}-happyIn25 :: (Located FastString) -> (HappyAbsSyn )-happyIn25 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn25 #-}-happyOut25 :: (HappyAbsSyn ) -> (Located FastString)-happyOut25 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut25 #-}-happyIn26 :: (Located FastString) -> (HappyAbsSyn )-happyIn26 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn26 #-}-happyOut26 :: (HappyAbsSyn ) -> (Located FastString)-happyOut26 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut26 #-}-happyIn27 :: (Maybe [LRenaming]) -> (HappyAbsSyn )-happyIn27 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn27 #-}-happyOut27 :: (HappyAbsSyn ) -> (Maybe [LRenaming])-happyOut27 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut27 #-}-happyIn28 :: (OrdList LRenaming) -> (HappyAbsSyn )-happyIn28 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn28 #-}-happyOut28 :: (HappyAbsSyn ) -> (OrdList LRenaming)-happyOut28 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut28 #-}-happyIn29 :: (LRenaming) -> (HappyAbsSyn )-happyIn29 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn29 #-}-happyOut29 :: (HappyAbsSyn ) -> (LRenaming)-happyOut29 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut29 #-}-happyIn30 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )-happyIn30 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn30 #-}-happyOut30 :: (HappyAbsSyn ) -> (OrdList (LHsUnitDecl PackageName))-happyOut30 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut30 #-}-happyIn31 :: (OrdList (LHsUnitDecl PackageName)) -> (HappyAbsSyn )-happyIn31 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn31 #-}-happyOut31 :: (HappyAbsSyn ) -> (OrdList (LHsUnitDecl PackageName))-happyOut31 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut31 #-}-happyIn32 :: (LHsUnitDecl PackageName) -> (HappyAbsSyn )-happyIn32 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn32 #-}-happyOut32 :: (HappyAbsSyn ) -> (LHsUnitDecl PackageName)-happyOut32 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut32 #-}-happyIn33 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn33 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn33 #-}-happyOut33 :: (HappyAbsSyn ) -> (Located (HsModule GhcPs))-happyOut33 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut33 #-}-happyIn34 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn34 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn34 #-}-happyOut34 :: (HappyAbsSyn ) -> (Located (HsModule GhcPs))-happyOut34 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut34 #-}-happyIn35 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn35 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn35 #-}-happyOut35 :: (HappyAbsSyn ) -> (Maybe LHsDocString)-happyOut35 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut35 #-}-happyIn36 :: (()) -> (HappyAbsSyn )-happyIn36 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn36 #-}-happyOut36 :: (HappyAbsSyn ) -> (())-happyOut36 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut36 #-}-happyIn37 :: (()) -> (HappyAbsSyn )-happyIn37 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn37 #-}-happyOut37 :: (HappyAbsSyn ) -> (())-happyOut37 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut37 #-}-happyIn38 :: (Maybe (Located WarningTxt)) -> (HappyAbsSyn )-happyIn38 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn38 #-}-happyOut38 :: (HappyAbsSyn ) -> (Maybe (Located WarningTxt))-happyOut38 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut38 #-}-happyIn39 :: (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn39 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn39 #-}-happyOut39 :: (HappyAbsSyn ) -> (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyOut39 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut39 #-}-happyIn40 :: (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn40 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn40 #-}-happyOut40 :: (HappyAbsSyn ) -> (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyOut40 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut40 #-}-happyIn41 :: (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs]))) -> (HappyAbsSyn )-happyIn41 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn41 #-}-happyOut41 :: (HappyAbsSyn ) -> (([AddAnn]-             ,([LImportDecl GhcPs], [LHsDecl GhcPs])))-happyOut41 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut41 #-}-happyIn42 :: (([LImportDecl GhcPs], [LHsDecl GhcPs])) -> (HappyAbsSyn )-happyIn42 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn42 #-}-happyOut42 :: (HappyAbsSyn ) -> (([LImportDecl GhcPs], [LHsDecl GhcPs]))-happyOut42 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut42 #-}-happyIn43 :: (Located (HsModule GhcPs)) -> (HappyAbsSyn )-happyIn43 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn43 #-}-happyOut43 :: (HappyAbsSyn ) -> (Located (HsModule GhcPs))-happyOut43 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut43 #-}-happyIn44 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn44 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn44 #-}-happyOut44 :: (HappyAbsSyn ) -> ([LImportDecl GhcPs])-happyOut44 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut44 #-}-happyIn45 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn45 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn45 #-}-happyOut45 :: (HappyAbsSyn ) -> ([LImportDecl GhcPs])-happyOut45 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut45 #-}-happyIn46 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn46 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn46 #-}-happyOut46 :: (HappyAbsSyn ) -> ([LImportDecl GhcPs])-happyOut46 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut46 #-}-happyIn47 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn47 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn47 #-}-happyOut47 :: (HappyAbsSyn ) -> ([LImportDecl GhcPs])-happyOut47 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut47 #-}-happyIn48 :: ((Maybe (Located [LIE GhcPs]))) -> (HappyAbsSyn )-happyIn48 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn48 #-}-happyOut48 :: (HappyAbsSyn ) -> ((Maybe (Located [LIE GhcPs])))-happyOut48 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut48 #-}-happyIn49 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn49 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn49 #-}-happyOut49 :: (HappyAbsSyn ) -> (OrdList (LIE GhcPs))-happyOut49 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut49 #-}-happyIn50 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn50 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn50 #-}-happyOut50 :: (HappyAbsSyn ) -> (OrdList (LIE GhcPs))-happyOut50 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut50 #-}-happyIn51 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn51 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn51 #-}-happyOut51 :: (HappyAbsSyn ) -> (OrdList (LIE GhcPs))-happyOut51 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut51 #-}-happyIn52 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn52 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn52 #-}-happyOut52 :: (HappyAbsSyn ) -> (OrdList (LIE GhcPs))-happyOut52 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut52 #-}-happyIn53 :: (OrdList (LIE GhcPs)) -> (HappyAbsSyn )-happyIn53 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn53 #-}-happyOut53 :: (HappyAbsSyn ) -> (OrdList (LIE GhcPs))-happyOut53 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut53 #-}-happyIn54 :: (Located ([AddAnn],ImpExpSubSpec)) -> (HappyAbsSyn )-happyIn54 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn54 #-}-happyOut54 :: (HappyAbsSyn ) -> (Located ([AddAnn],ImpExpSubSpec))-happyOut54 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut54 #-}-happyIn55 :: (([AddAnn], [Located ImpExpQcSpec])) -> (HappyAbsSyn )-happyIn55 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn55 #-}-happyOut55 :: (HappyAbsSyn ) -> (([AddAnn], [Located ImpExpQcSpec]))-happyOut55 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut55 #-}-happyIn56 :: (([AddAnn], [Located ImpExpQcSpec])) -> (HappyAbsSyn )-happyIn56 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn56 #-}-happyOut56 :: (HappyAbsSyn ) -> (([AddAnn], [Located ImpExpQcSpec]))-happyOut56 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut56 #-}-happyIn57 :: (Located ([AddAnn], Located ImpExpQcSpec)) -> (HappyAbsSyn )-happyIn57 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn57 #-}-happyOut57 :: (HappyAbsSyn ) -> (Located ([AddAnn], Located ImpExpQcSpec))-happyOut57 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut57 #-}-happyIn58 :: (Located ImpExpQcSpec) -> (HappyAbsSyn )-happyIn58 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn58 #-}-happyOut58 :: (HappyAbsSyn ) -> (Located ImpExpQcSpec)-happyOut58 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut58 #-}-happyIn59 :: (Located RdrName) -> (HappyAbsSyn )-happyIn59 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn59 #-}-happyOut59 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut59 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut59 #-}-happyIn60 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn60 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn60 #-}-happyOut60 :: (HappyAbsSyn ) -> ([AddAnn])-happyOut60 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut60 #-}-happyIn61 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn61 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn61 #-}-happyOut61 :: (HappyAbsSyn ) -> ([AddAnn])-happyOut61 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut61 #-}-happyIn62 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn62 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn62 #-}-happyOut62 :: (HappyAbsSyn ) -> ([LImportDecl GhcPs])-happyOut62 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut62 #-}-happyIn63 :: ([LImportDecl GhcPs]) -> (HappyAbsSyn )-happyIn63 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn63 #-}-happyOut63 :: (HappyAbsSyn ) -> ([LImportDecl GhcPs])-happyOut63 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut63 #-}-happyIn64 :: (LImportDecl GhcPs) -> (HappyAbsSyn )-happyIn64 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn64 #-}-happyOut64 :: (HappyAbsSyn ) -> (LImportDecl GhcPs)-happyOut64 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut64 #-}-happyIn65 :: ((([AddAnn],SourceText),IsBootInterface)) -> (HappyAbsSyn )-happyIn65 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn65 #-}-happyOut65 :: (HappyAbsSyn ) -> ((([AddAnn],SourceText),IsBootInterface))-happyOut65 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut65 #-}-happyIn66 :: (([AddAnn],Bool)) -> (HappyAbsSyn )-happyIn66 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn66 #-}-happyOut66 :: (HappyAbsSyn ) -> (([AddAnn],Bool))-happyOut66 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut66 #-}-happyIn67 :: (([AddAnn],Maybe StringLiteral)) -> (HappyAbsSyn )-happyIn67 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn67 #-}-happyOut67 :: (HappyAbsSyn ) -> (([AddAnn],Maybe StringLiteral))-happyOut67 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut67 #-}-happyIn68 :: (([AddAnn],Bool)) -> (HappyAbsSyn )-happyIn68 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn68 #-}-happyOut68 :: (HappyAbsSyn ) -> (([AddAnn],Bool))-happyOut68 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut68 #-}-happyIn69 :: (([AddAnn],Located (Maybe (Located ModuleName)))) -> (HappyAbsSyn )-happyIn69 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn69 #-}-happyOut69 :: (HappyAbsSyn ) -> (([AddAnn],Located (Maybe (Located ModuleName))))-happyOut69 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut69 #-}-happyIn70 :: (Located (Maybe (Bool, Located [LIE GhcPs]))) -> (HappyAbsSyn )-happyIn70 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn70 #-}-happyOut70 :: (HappyAbsSyn ) -> (Located (Maybe (Bool, Located [LIE GhcPs])))-happyOut70 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut70 #-}-happyIn71 :: (Located (Bool, Located [LIE GhcPs])) -> (HappyAbsSyn )-happyIn71 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn71 #-}-happyOut71 :: (HappyAbsSyn ) -> (Located (Bool, Located [LIE GhcPs]))-happyOut71 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut71 #-}-happyIn72 :: (Located (SourceText,Int)) -> (HappyAbsSyn )-happyIn72 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn72 #-}-happyOut72 :: (HappyAbsSyn ) -> (Located (SourceText,Int))-happyOut72 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut72 #-}-happyIn73 :: (Located FixityDirection) -> (HappyAbsSyn )-happyIn73 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn73 #-}-happyOut73 :: (HappyAbsSyn ) -> (Located FixityDirection)-happyOut73 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut73 #-}-happyIn74 :: (Located (OrdList (Located RdrName))) -> (HappyAbsSyn )-happyIn74 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn74 #-}-happyOut74 :: (HappyAbsSyn ) -> (Located (OrdList (Located RdrName)))-happyOut74 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut74 #-}-happyIn75 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn75 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn75 #-}-happyOut75 :: (HappyAbsSyn ) -> (OrdList (LHsDecl GhcPs))-happyOut75 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut75 #-}-happyIn76 :: (OrdList (LHsDecl GhcPs)) -> (HappyAbsSyn )-happyIn76 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn76 #-}-happyOut76 :: (HappyAbsSyn ) -> (OrdList (LHsDecl GhcPs))-happyOut76 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut76 #-}-happyIn77 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn77 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn77 #-}-happyOut77 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut77 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut77 #-}-happyIn78 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )-happyIn78 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn78 #-}-happyOut78 :: (HappyAbsSyn ) -> (LTyClDecl GhcPs)-happyOut78 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut78 #-}-happyIn79 :: (LTyClDecl GhcPs) -> (HappyAbsSyn )-happyIn79 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn79 #-}-happyOut79 :: (HappyAbsSyn ) -> (LTyClDecl GhcPs)-happyOut79 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut79 #-}-happyIn80 :: (LInstDecl GhcPs) -> (HappyAbsSyn )-happyIn80 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn80 #-}-happyOut80 :: (HappyAbsSyn ) -> (LInstDecl GhcPs)-happyOut80 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut80 #-}-happyIn81 :: (Maybe (Located OverlapMode)) -> (HappyAbsSyn )-happyIn81 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn81 #-}-happyOut81 :: (HappyAbsSyn ) -> (Maybe (Located OverlapMode))-happyOut81 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut81 #-}-happyIn82 :: (Maybe (Located DerivStrategy)) -> (HappyAbsSyn )-happyIn82 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn82 #-}-happyOut82 :: (HappyAbsSyn ) -> (Maybe (Located DerivStrategy))-happyOut82 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut82 #-}-happyIn83 :: (Located ([AddAnn], Maybe (LInjectivityAnn GhcPs))) -> (HappyAbsSyn )-happyIn83 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn83 #-}-happyOut83 :: (HappyAbsSyn ) -> (Located ([AddAnn], Maybe (LInjectivityAnn GhcPs)))-happyOut83 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut83 #-}-happyIn84 :: (LInjectivityAnn GhcPs) -> (HappyAbsSyn )-happyIn84 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn84 #-}-happyOut84 :: (HappyAbsSyn ) -> (LInjectivityAnn GhcPs)-happyOut84 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut84 #-}-happyIn85 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn85 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn85 #-}-happyOut85 :: (HappyAbsSyn ) -> (Located [Located RdrName])-happyOut85 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut85 #-}-happyIn86 :: (Located ([AddAnn],FamilyInfo GhcPs)) -> (HappyAbsSyn )-happyIn86 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn86 #-}-happyOut86 :: (HappyAbsSyn ) -> (Located ([AddAnn],FamilyInfo GhcPs))-happyOut86 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut86 #-}-happyIn87 :: (Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs])) -> (HappyAbsSyn )-happyIn87 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn87 #-}-happyOut87 :: (HappyAbsSyn ) -> (Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs]))-happyOut87 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut87 #-}-happyIn88 :: (Located [LTyFamInstEqn GhcPs]) -> (HappyAbsSyn )-happyIn88 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn88 #-}-happyOut88 :: (HappyAbsSyn ) -> (Located [LTyFamInstEqn GhcPs])-happyOut88 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut88 #-}-happyIn89 :: (Located ([AddAnn],TyFamInstEqn GhcPs)) -> (HappyAbsSyn )-happyIn89 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn89 #-}-happyOut89 :: (HappyAbsSyn ) -> (Located ([AddAnn],TyFamInstEqn GhcPs))-happyOut89 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut89 #-}-happyIn90 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn90 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn90 #-}-happyOut90 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut90 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut90 #-}-happyIn91 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn91 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn91 #-}-happyOut91 :: (HappyAbsSyn ) -> ([AddAnn])-happyOut91 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut91 #-}-happyIn92 :: ([AddAnn]) -> (HappyAbsSyn )-happyIn92 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn92 #-}-happyOut92 :: (HappyAbsSyn ) -> ([AddAnn])-happyOut92 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut92 #-}-happyIn93 :: (LInstDecl GhcPs) -> (HappyAbsSyn )-happyIn93 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn93 #-}-happyOut93 :: (HappyAbsSyn ) -> (LInstDecl GhcPs)-happyOut93 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut93 #-}-happyIn94 :: (Located (AddAnn, NewOrData)) -> (HappyAbsSyn )-happyIn94 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn94 #-}-happyOut94 :: (HappyAbsSyn ) -> (Located (AddAnn, NewOrData))-happyOut94 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut94 #-}-happyIn95 :: (Located ([AddAnn], Maybe (LHsKind GhcPs))) -> (HappyAbsSyn )-happyIn95 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn95 #-}-happyOut95 :: (HappyAbsSyn ) -> (Located ([AddAnn], Maybe (LHsKind GhcPs)))-happyOut95 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut95 #-}-happyIn96 :: (Located ([AddAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )-happyIn96 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn96 #-}-happyOut96 :: (HappyAbsSyn ) -> (Located ([AddAnn], LFamilyResultSig GhcPs))-happyOut96 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut96 #-}-happyIn97 :: (Located ([AddAnn], LFamilyResultSig GhcPs)) -> (HappyAbsSyn )-happyIn97 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn97 #-}-happyOut97 :: (HappyAbsSyn ) -> (Located ([AddAnn], LFamilyResultSig GhcPs))-happyOut97 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut97 #-}-happyIn98 :: (Located ([AddAnn], ( LFamilyResultSig GhcPs-                                            , Maybe (LInjectivityAnn GhcPs)))) -> (HappyAbsSyn )-happyIn98 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn98 #-}-happyOut98 :: (HappyAbsSyn ) -> (Located ([AddAnn], ( LFamilyResultSig GhcPs-                                            , Maybe (LInjectivityAnn GhcPs))))-happyOut98 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut98 #-}-happyIn99 :: (Located (Maybe (LHsContext GhcPs), LHsType GhcPs)) -> (HappyAbsSyn )-happyIn99 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn99 #-}-happyOut99 :: (HappyAbsSyn ) -> (Located (Maybe (LHsContext GhcPs), LHsType GhcPs))-happyOut99 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut99 #-}-happyIn100 :: (Maybe (Located CType)) -> (HappyAbsSyn )-happyIn100 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn100 #-}-happyOut100 :: (HappyAbsSyn ) -> (Maybe (Located CType))-happyOut100 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut100 #-}-happyIn101 :: (LDerivDecl GhcPs) -> (HappyAbsSyn )-happyIn101 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn101 #-}-happyOut101 :: (HappyAbsSyn ) -> (LDerivDecl GhcPs)-happyOut101 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut101 #-}-happyIn102 :: (LRoleAnnotDecl GhcPs) -> (HappyAbsSyn )-happyIn102 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn102 #-}-happyOut102 :: (HappyAbsSyn ) -> (LRoleAnnotDecl GhcPs)-happyOut102 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut102 #-}-happyIn103 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )-happyIn103 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn103 #-}-happyOut103 :: (HappyAbsSyn ) -> (Located [Located (Maybe FastString)])-happyOut103 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut103 #-}-happyIn104 :: (Located [Located (Maybe FastString)]) -> (HappyAbsSyn )-happyIn104 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn104 #-}-happyOut104 :: (HappyAbsSyn ) -> (Located [Located (Maybe FastString)])-happyOut104 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut104 #-}-happyIn105 :: (Located (Maybe FastString)) -> (HappyAbsSyn )-happyIn105 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn105 #-}-happyOut105 :: (HappyAbsSyn ) -> (Located (Maybe FastString))-happyOut105 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut105 #-}-happyIn106 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn106 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn106 #-}-happyOut106 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut106 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut106 #-}-happyIn107 :: ((Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn])) -> (HappyAbsSyn )-happyIn107 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn107 #-}-happyOut107 :: (HappyAbsSyn ) -> ((Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn]))-happyOut107 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut107 #-}-happyIn108 :: ([Located RdrName]) -> (HappyAbsSyn )-happyIn108 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn108 #-}-happyOut108 :: (HappyAbsSyn ) -> ([Located RdrName])-happyOut108 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut108 #-}-happyIn109 :: ([RecordPatSynField (Located RdrName)]) -> (HappyAbsSyn )-happyIn109 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn109 #-}-happyOut109 :: (HappyAbsSyn ) -> ([RecordPatSynField (Located RdrName)])-happyOut109 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut109 #-}-happyIn110 :: (Located ([AddAnn]-                         , Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn110 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn110 #-}-happyOut110 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                         , Located (OrdList (LHsDecl GhcPs))))-happyOut110 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut110 #-}-happyIn111 :: (LSig GhcPs) -> (HappyAbsSyn )-happyIn111 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn111 #-}-happyOut111 :: (HappyAbsSyn ) -> (LSig GhcPs)-happyOut111 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut111 #-}-happyIn112 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn112 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn112 #-}-happyOut112 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut112 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut112 #-}-happyIn113 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn113 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn113 #-}-happyOut113 :: (HappyAbsSyn ) -> (Located ([AddAnn],OrdList (LHsDecl GhcPs)))-happyOut113 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut113 #-}-happyIn114 :: (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn114 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn114 #-}-happyOut114 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs)))-happyOut114 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut114 #-}-happyIn115 :: (Located ([AddAnn]-                       ,(OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn115 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn115 #-}-happyOut115 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                       ,(OrdList (LHsDecl GhcPs))))-happyOut115 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut115 #-}-happyIn116 :: (Located (OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn116 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn116 #-}-happyOut116 :: (HappyAbsSyn ) -> (Located (OrdList (LHsDecl GhcPs)))-happyOut116 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut116 #-}-happyIn117 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn117 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn117 #-}-happyOut117 :: (HappyAbsSyn ) -> (Located ([AddAnn],OrdList (LHsDecl GhcPs)))-happyOut117 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut117 #-}-happyIn118 :: (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn118 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn118 #-}-happyOut118 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                     , OrdList (LHsDecl GhcPs)))-happyOut118 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut118 #-}-happyIn119 :: (Located ([AddAnn]-                        , OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn119 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn119 #-}-happyOut119 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                        , OrdList (LHsDecl GhcPs)))-happyOut119 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut119 #-}-happyIn120 :: (Located ([AddAnn],OrdList (LHsDecl GhcPs))) -> (HappyAbsSyn )-happyIn120 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn120 #-}-happyOut120 :: (HappyAbsSyn ) -> (Located ([AddAnn],OrdList (LHsDecl GhcPs)))-happyOut120 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut120 #-}-happyIn121 :: (Located ([AddAnn],Located (OrdList (LHsDecl GhcPs)))) -> (HappyAbsSyn )-happyIn121 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn121 #-}-happyOut121 :: (HappyAbsSyn ) -> (Located ([AddAnn],Located (OrdList (LHsDecl GhcPs))))-happyOut121 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut121 #-}-happyIn122 :: (Located ([AddAnn],Located (HsLocalBinds GhcPs))) -> (HappyAbsSyn )-happyIn122 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn122 #-}-happyOut122 :: (HappyAbsSyn ) -> (Located ([AddAnn],Located (HsLocalBinds GhcPs)))-happyOut122 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut122 #-}-happyIn123 :: (Located ([AddAnn],Located (HsLocalBinds GhcPs))) -> (HappyAbsSyn )-happyIn123 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn123 #-}-happyOut123 :: (HappyAbsSyn ) -> (Located ([AddAnn],Located (HsLocalBinds GhcPs)))-happyOut123 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut123 #-}-happyIn124 :: (OrdList (LRuleDecl GhcPs)) -> (HappyAbsSyn )-happyIn124 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn124 #-}-happyOut124 :: (HappyAbsSyn ) -> (OrdList (LRuleDecl GhcPs))-happyOut124 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut124 #-}-happyIn125 :: (LRuleDecl GhcPs) -> (HappyAbsSyn )-happyIn125 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn125 #-}-happyOut125 :: (HappyAbsSyn ) -> (LRuleDecl GhcPs)-happyOut125 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut125 #-}-happyIn126 :: (([AddAnn],Maybe Activation)) -> (HappyAbsSyn )-happyIn126 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn126 #-}-happyOut126 :: (HappyAbsSyn ) -> (([AddAnn],Maybe Activation))-happyOut126 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut126 #-}-happyIn127 :: (([AddAnn]-                              ,Activation)) -> (HappyAbsSyn )-happyIn127 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn127 #-}-happyOut127 :: (HappyAbsSyn ) -> (([AddAnn]-                              ,Activation))-happyOut127 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut127 #-}-happyIn128 :: (([AddAnn],[LRuleBndr GhcPs])) -> (HappyAbsSyn )-happyIn128 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn128 #-}-happyOut128 :: (HappyAbsSyn ) -> (([AddAnn],[LRuleBndr GhcPs]))-happyOut128 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut128 #-}-happyIn129 :: ([LRuleBndr GhcPs]) -> (HappyAbsSyn )-happyIn129 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn129 #-}-happyOut129 :: (HappyAbsSyn ) -> ([LRuleBndr GhcPs])-happyOut129 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut129 #-}-happyIn130 :: (LRuleBndr GhcPs) -> (HappyAbsSyn )-happyIn130 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn130 #-}-happyOut130 :: (HappyAbsSyn ) -> (LRuleBndr GhcPs)-happyOut130 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut130 #-}-happyIn131 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn131 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn131 #-}-happyOut131 :: (HappyAbsSyn ) -> (OrdList (LWarnDecl GhcPs))-happyOut131 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut131 #-}-happyIn132 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn132 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn132 #-}-happyOut132 :: (HappyAbsSyn ) -> (OrdList (LWarnDecl GhcPs))-happyOut132 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut132 #-}-happyIn133 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn133 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn133 #-}-happyOut133 :: (HappyAbsSyn ) -> (OrdList (LWarnDecl GhcPs))-happyOut133 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut133 #-}-happyIn134 :: (OrdList (LWarnDecl GhcPs)) -> (HappyAbsSyn )-happyIn134 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn134 #-}-happyOut134 :: (HappyAbsSyn ) -> (OrdList (LWarnDecl GhcPs))-happyOut134 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut134 #-}-happyIn135 :: (Located ([AddAnn],[Located StringLiteral])) -> (HappyAbsSyn )-happyIn135 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn135 #-}-happyOut135 :: (HappyAbsSyn ) -> (Located ([AddAnn],[Located StringLiteral]))-happyOut135 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut135 #-}-happyIn136 :: (Located (OrdList (Located StringLiteral))) -> (HappyAbsSyn )-happyIn136 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn136 #-}-happyOut136 :: (HappyAbsSyn ) -> (Located (OrdList (Located StringLiteral)))-happyOut136 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut136 #-}-happyIn137 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn137 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn137 #-}-happyOut137 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut137 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut137 #-}-happyIn138 :: (Located ([AddAnn],HsDecl GhcPs)) -> (HappyAbsSyn )-happyIn138 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn138 #-}-happyOut138 :: (HappyAbsSyn ) -> (Located ([AddAnn],HsDecl GhcPs))-happyOut138 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut138 #-}-happyIn139 :: (Located CCallConv) -> (HappyAbsSyn )-happyIn139 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn139 #-}-happyOut139 :: (HappyAbsSyn ) -> (Located CCallConv)-happyOut139 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut139 #-}-happyIn140 :: (Located Safety) -> (HappyAbsSyn )-happyIn140 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn140 #-}-happyOut140 :: (HappyAbsSyn ) -> (Located Safety)-happyOut140 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut140 #-}-happyIn141 :: (Located ([AddAnn]-                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs))) -> (HappyAbsSyn )-happyIn141 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn141 #-}-happyOut141 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs)))-happyOut141 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut141 #-}-happyIn142 :: (([AddAnn], Maybe (LHsType GhcPs))) -> (HappyAbsSyn )-happyIn142 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn142 #-}-happyOut142 :: (HappyAbsSyn ) -> (([AddAnn], Maybe (LHsType GhcPs)))-happyOut142 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut142 #-}-happyIn143 :: (([AddAnn], Maybe (Located RdrName))) -> (HappyAbsSyn )-happyIn143 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn143 #-}-happyOut143 :: (HappyAbsSyn ) -> (([AddAnn], Maybe (Located RdrName)))-happyOut143 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut143 #-}-happyIn144 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn144 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn144 #-}-happyOut144 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut144 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut144 #-}-happyIn145 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn145 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn145 #-}-happyOut145 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut145 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut145 #-}-happyIn146 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn146 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn146 #-}-happyOut146 :: (HappyAbsSyn ) -> (Located [Located RdrName])-happyOut146 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut146 #-}-happyIn147 :: ((OrdList (LHsSigType GhcPs))) -> (HappyAbsSyn )-happyIn147 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn147 #-}-happyOut147 :: (HappyAbsSyn ) -> ((OrdList (LHsSigType GhcPs)))-happyOut147 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut147 #-}-happyIn148 :: (Located ([AddAnn],HsSrcBang)) -> (HappyAbsSyn )-happyIn148 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn148 #-}-happyOut148 :: (HappyAbsSyn ) -> (Located ([AddAnn],HsSrcBang))-happyOut148 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut148 #-}-happyIn149 :: (Located ([AddAnn], SrcStrictness)) -> (HappyAbsSyn )-happyIn149 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn149 #-}-happyOut149 :: (HappyAbsSyn ) -> (Located ([AddAnn], SrcStrictness))-happyOut149 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut149 #-}-happyIn150 :: (Located ([AddAnn], SourceText, SrcUnpackedness)) -> (HappyAbsSyn )-happyIn150 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn150 #-}-happyOut150 :: (HappyAbsSyn ) -> (Located ([AddAnn], SourceText, SrcUnpackedness))-happyOut150 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut150 #-}-happyIn151 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn151 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn151 #-}-happyOut151 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut151 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut151 #-}-happyIn152 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn152 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn152 #-}-happyOut152 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut152 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut152 #-}-happyIn153 :: (LHsContext GhcPs) -> (HappyAbsSyn )-happyIn153 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn153 #-}-happyOut153 :: (HappyAbsSyn ) -> (LHsContext GhcPs)-happyOut153 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut153 #-}-happyIn154 :: (LHsContext GhcPs) -> (HappyAbsSyn )-happyIn154 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn154 #-}-happyOut154 :: (HappyAbsSyn ) -> (LHsContext GhcPs)-happyOut154 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut154 #-}-happyIn155 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn155 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn155 #-}-happyOut155 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut155 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut155 #-}-happyIn156 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn156 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn156 #-}-happyOut156 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut156 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut156 #-}-happyIn157 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn157 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn157 #-}-happyOut157 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut157 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut157 #-}-happyIn158 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn158 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn158 #-}-happyOut158 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut158 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut158 #-}-happyIn159 :: (Located [LHsAppType GhcPs]) -> (HappyAbsSyn )-happyIn159 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn159 #-}-happyOut159 :: (HappyAbsSyn ) -> (Located [LHsAppType GhcPs])-happyOut159 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut159 #-}-happyIn160 :: (LHsAppType GhcPs) -> (HappyAbsSyn )-happyIn160 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn160 #-}-happyOut160 :: (HappyAbsSyn ) -> (LHsAppType GhcPs)-happyOut160 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut160 #-}-happyIn161 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn161 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn161 #-}-happyOut161 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut161 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut161 #-}-happyIn162 :: (LHsSigType GhcPs) -> (HappyAbsSyn )-happyIn162 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn162 #-}-happyOut162 :: (HappyAbsSyn ) -> (LHsSigType GhcPs)-happyOut162 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut162 #-}-happyIn163 :: ([LHsSigType GhcPs]) -> (HappyAbsSyn )-happyIn163 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn163 #-}-happyOut163 :: (HappyAbsSyn ) -> ([LHsSigType GhcPs])-happyOut163 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut163 #-}-happyIn164 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn164 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn164 #-}-happyOut164 :: (HappyAbsSyn ) -> ([LHsType GhcPs])-happyOut164 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut164 #-}-happyIn165 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn165 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn165 #-}-happyOut165 :: (HappyAbsSyn ) -> ([LHsType GhcPs])-happyOut165 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut165 #-}-happyIn166 :: ([LHsType GhcPs]) -> (HappyAbsSyn )-happyIn166 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn166 #-}-happyOut166 :: (HappyAbsSyn ) -> ([LHsType GhcPs])-happyOut166 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut166 #-}-happyIn167 :: ([LHsTyVarBndr GhcPs]) -> (HappyAbsSyn )-happyIn167 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn167 #-}-happyOut167 :: (HappyAbsSyn ) -> ([LHsTyVarBndr GhcPs])-happyOut167 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut167 #-}-happyIn168 :: (LHsTyVarBndr GhcPs) -> (HappyAbsSyn )-happyIn168 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn168 #-}-happyOut168 :: (HappyAbsSyn ) -> (LHsTyVarBndr GhcPs)-happyOut168 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut168 #-}-happyIn169 :: (Located ([AddAnn],[Located (FunDep (Located RdrName))])) -> (HappyAbsSyn )-happyIn169 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn169 #-}-happyOut169 :: (HappyAbsSyn ) -> (Located ([AddAnn],[Located (FunDep (Located RdrName))]))-happyOut169 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut169 #-}-happyIn170 :: (Located [Located (FunDep (Located RdrName))]) -> (HappyAbsSyn )-happyIn170 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn170 #-}-happyOut170 :: (HappyAbsSyn ) -> (Located [Located (FunDep (Located RdrName))])-happyOut170 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut170 #-}-happyIn171 :: (Located (FunDep (Located RdrName))) -> (HappyAbsSyn )-happyIn171 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn171 #-}-happyOut171 :: (HappyAbsSyn ) -> (Located (FunDep (Located RdrName)))-happyOut171 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut171 #-}-happyIn172 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn172 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn172 #-}-happyOut172 :: (HappyAbsSyn ) -> (Located [Located RdrName])-happyOut172 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut172 #-}-happyIn173 :: (LHsKind GhcPs) -> (HappyAbsSyn )-happyIn173 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn173 #-}-happyOut173 :: (HappyAbsSyn ) -> (LHsKind GhcPs)-happyOut173 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut173 #-}-happyIn174 :: (Located ([AddAnn]-                          ,[LConDecl GhcPs])) -> (HappyAbsSyn )-happyIn174 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn174 #-}-happyOut174 :: (HappyAbsSyn ) -> (Located ([AddAnn]-                          ,[LConDecl GhcPs]))-happyOut174 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut174 #-}-happyIn175 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )-happyIn175 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn175 #-}-happyOut175 :: (HappyAbsSyn ) -> (Located [LConDecl GhcPs])-happyOut175 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut175 #-}-happyIn176 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn176 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn176 #-}-happyOut176 :: (HappyAbsSyn ) -> (LConDecl GhcPs)-happyOut176 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut176 #-}-happyIn177 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn177 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn177 #-}-happyOut177 :: (HappyAbsSyn ) -> (LConDecl GhcPs)-happyOut177 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut177 #-}-happyIn178 :: (Located ([AddAnn],[LConDecl GhcPs])) -> (HappyAbsSyn )-happyIn178 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn178 #-}-happyOut178 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LConDecl GhcPs]))-happyOut178 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut178 #-}-happyIn179 :: (Located [LConDecl GhcPs]) -> (HappyAbsSyn )-happyIn179 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn179 #-}-happyOut179 :: (HappyAbsSyn ) -> (Located [LConDecl GhcPs])-happyOut179 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut179 #-}-happyIn180 :: (LConDecl GhcPs) -> (HappyAbsSyn )-happyIn180 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn180 #-}-happyOut180 :: (HappyAbsSyn ) -> (LConDecl GhcPs)-happyOut180 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut180 #-}-happyIn181 :: (Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs])) -> (HappyAbsSyn )-happyIn181 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn181 #-}-happyOut181 :: (HappyAbsSyn ) -> (Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs]))-happyOut181 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut181 #-}-happyIn182 :: (Located (Located RdrName, HsConDeclDetails GhcPs)) -> (HappyAbsSyn )-happyIn182 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn182 #-}-happyOut182 :: (HappyAbsSyn ) -> (Located (Located RdrName, HsConDeclDetails GhcPs))-happyOut182 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut182 #-}-happyIn183 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )-happyIn183 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn183 #-}-happyOut183 :: (HappyAbsSyn ) -> ([LConDeclField GhcPs])-happyOut183 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut183 #-}-happyIn184 :: ([LConDeclField GhcPs]) -> (HappyAbsSyn )-happyIn184 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn184 #-}-happyOut184 :: (HappyAbsSyn ) -> ([LConDeclField GhcPs])-happyOut184 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut184 #-}-happyIn185 :: (LConDeclField GhcPs) -> (HappyAbsSyn )-happyIn185 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn185 #-}-happyOut185 :: (HappyAbsSyn ) -> (LConDeclField GhcPs)-happyOut185 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut185 #-}-happyIn186 :: (HsDeriving GhcPs) -> (HappyAbsSyn )-happyIn186 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn186 #-}-happyOut186 :: (HappyAbsSyn ) -> (HsDeriving GhcPs)-happyOut186 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut186 #-}-happyIn187 :: (HsDeriving GhcPs) -> (HappyAbsSyn )-happyIn187 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn187 #-}-happyOut187 :: (HappyAbsSyn ) -> (HsDeriving GhcPs)-happyOut187 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut187 #-}-happyIn188 :: (LHsDerivingClause GhcPs) -> (HappyAbsSyn )-happyIn188 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn188 #-}-happyOut188 :: (HappyAbsSyn ) -> (LHsDerivingClause GhcPs)-happyOut188 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut188 #-}-happyIn189 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn189 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn189 #-}-happyOut189 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut189 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut189 #-}-happyIn190 :: (LDocDecl) -> (HappyAbsSyn )-happyIn190 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn190 #-}-happyOut190 :: (HappyAbsSyn ) -> (LDocDecl)-happyOut190 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut190 #-}-happyIn191 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn191 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn191 #-}-happyOut191 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut191 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut191 #-}-happyIn192 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn192 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn192 #-}-happyOut192 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut192 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut192 #-}-happyIn193 :: (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn193 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn193 #-}-happyOut193 :: (HappyAbsSyn ) -> (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)))-happyOut193 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut193 #-}-happyIn194 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn194 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn194 #-}-happyOut194 :: (HappyAbsSyn ) -> (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyOut194 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut194 #-}-happyIn195 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn195 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn195 #-}-happyOut195 :: (HappyAbsSyn ) -> (LGRHS GhcPs (LHsExpr GhcPs))-happyOut195 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut195 #-}-happyIn196 :: (LHsDecl GhcPs) -> (HappyAbsSyn )-happyIn196 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn196 #-}-happyOut196 :: (HappyAbsSyn ) -> (LHsDecl GhcPs)-happyOut196 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut196 #-}-happyIn197 :: (([AddAnn],Maybe Activation)) -> (HappyAbsSyn )-happyIn197 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn197 #-}-happyOut197 :: (HappyAbsSyn ) -> (([AddAnn],Maybe Activation))-happyOut197 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut197 #-}-happyIn198 :: (([AddAnn],Activation)) -> (HappyAbsSyn )-happyIn198 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn198 #-}-happyOut198 :: (HappyAbsSyn ) -> (([AddAnn],Activation))-happyOut198 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut198 #-}-happyIn199 :: (Located (HsSplice GhcPs)) -> (HappyAbsSyn )-happyIn199 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn199 #-}-happyOut199 :: (HappyAbsSyn ) -> (Located (HsSplice GhcPs))-happyOut199 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut199 #-}-happyIn200 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn200 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn200 #-}-happyOut200 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut200 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut200 #-}-happyIn201 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn201 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn201 #-}-happyOut201 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut201 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut201 #-}-happyIn202 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn202 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn202 #-}-happyOut202 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut202 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut202 #-}-happyIn203 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn203 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn203 #-}-happyOut203 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut203 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut203 #-}-happyIn204 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn204 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn204 #-}-happyOut204 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut204 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut204 #-}-happyIn205 :: (([Located a],Bool)) -> (HappyAbsSyn )-happyIn205 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn205 #-}-happyOut205 :: (HappyAbsSyn ) -> (([Located a],Bool))-happyOut205 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut205 #-}-happyIn206 :: (Located (([AddAnn],SourceText),StringLiteral)) -> (HappyAbsSyn )-happyIn206 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn206 #-}-happyOut206 :: (HappyAbsSyn ) -> (Located (([AddAnn],SourceText),StringLiteral))-happyOut206 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut206 #-}-happyIn207 :: (Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),-                         ((SourceText,SourceText),(SourceText,SourceText))-                       )) -> (HappyAbsSyn )-happyIn207 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn207 #-}-happyOut207 :: (HappyAbsSyn ) -> (Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),-                         ((SourceText,SourceText),(SourceText,SourceText))-                       ))-happyOut207 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut207 #-}-happyIn208 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn208 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn208 #-}-happyOut208 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut208 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut208 #-}-happyIn209 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn209 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn209 #-}-happyOut209 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut209 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut209 #-}-happyIn210 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn210 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn210 #-}-happyOut210 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut210 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut210 #-}-happyIn211 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn211 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn211 #-}-happyOut211 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut211 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut211 #-}-happyIn212 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn212 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn212 #-}-happyOut212 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut212 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut212 #-}-happyIn213 :: ([LHsCmdTop GhcPs]) -> (HappyAbsSyn )-happyIn213 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn213 #-}-happyOut213 :: (HappyAbsSyn ) -> ([LHsCmdTop GhcPs])-happyOut213 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut213 #-}-happyIn214 :: (LHsCmdTop GhcPs) -> (HappyAbsSyn )-happyIn214 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn214 #-}-happyOut214 :: (HappyAbsSyn ) -> (LHsCmdTop GhcPs)-happyOut214 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut214 #-}-happyIn215 :: (([AddAnn],[LHsDecl GhcPs])) -> (HappyAbsSyn )-happyIn215 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn215 #-}-happyOut215 :: (HappyAbsSyn ) -> (([AddAnn],[LHsDecl GhcPs]))-happyOut215 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut215 #-}-happyIn216 :: ([LHsDecl GhcPs]) -> (HappyAbsSyn )-happyIn216 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn216 #-}-happyOut216 :: (HappyAbsSyn ) -> ([LHsDecl GhcPs])-happyOut216 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut216 #-}-happyIn217 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn217 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn217 #-}-happyOut217 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut217 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut217 #-}-happyIn218 :: (([AddAnn],SumOrTuple)) -> (HappyAbsSyn )-happyIn218 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn218 #-}-happyOut218 :: (HappyAbsSyn ) -> (([AddAnn],SumOrTuple))-happyOut218 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut218 #-}-happyIn219 :: ((SrcSpan,[LHsTupArg GhcPs])) -> (HappyAbsSyn )-happyIn219 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn219 #-}-happyOut219 :: (HappyAbsSyn ) -> ((SrcSpan,[LHsTupArg GhcPs]))-happyOut219 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut219 #-}-happyIn220 :: ([LHsTupArg GhcPs]) -> (HappyAbsSyn )-happyIn220 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn220 #-}-happyOut220 :: (HappyAbsSyn ) -> ([LHsTupArg GhcPs])-happyOut220 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut220 #-}-happyIn221 :: (([AddAnn],HsExpr GhcPs)) -> (HappyAbsSyn )-happyIn221 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn221 #-}-happyOut221 :: (HappyAbsSyn ) -> (([AddAnn],HsExpr GhcPs))-happyOut221 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut221 #-}-happyIn222 :: (Located [LHsExpr GhcPs]) -> (HappyAbsSyn )-happyIn222 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn222 #-}-happyOut222 :: (HappyAbsSyn ) -> (Located [LHsExpr GhcPs])-happyOut222 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut222 #-}-happyIn223 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn223 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn223 #-}-happyOut223 :: (HappyAbsSyn ) -> (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyOut223 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut223 #-}-happyIn224 :: (Located [[LStmt GhcPs (LHsExpr GhcPs)]]) -> (HappyAbsSyn )-happyIn224 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn224 #-}-happyOut224 :: (HappyAbsSyn ) -> (Located [[LStmt GhcPs (LHsExpr GhcPs)]])-happyOut224 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut224 #-}-happyIn225 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn225 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn225 #-}-happyOut225 :: (HappyAbsSyn ) -> (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyOut225 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut225 #-}-happyIn226 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn226 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn226 #-}-happyOut226 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs)))-happyOut226 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut226 #-}-happyIn227 :: (([AddAnn],HsExpr GhcPs)) -> (HappyAbsSyn )-happyIn227 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn227 #-}-happyOut227 :: (HappyAbsSyn ) -> (([AddAnn],HsExpr GhcPs))-happyOut227 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut227 #-}-happyIn228 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn228 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn228 #-}-happyOut228 :: (HappyAbsSyn ) -> (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyOut228 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut228 #-}-happyIn229 :: (Located [LStmt GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn229 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn229 #-}-happyOut229 :: (HappyAbsSyn ) -> (Located [LStmt GhcPs (LHsExpr GhcPs)])-happyOut229 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut229 #-}-happyIn230 :: (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn230 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn230 #-}-happyOut230 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]))-happyOut230 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut230 #-}-happyIn231 :: (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn231 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn231 #-}-happyOut231 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]))-happyOut231 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut231 #-}-happyIn232 :: (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn232 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn232 #-}-happyOut232 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]))-happyOut232 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut232 #-}-happyIn233 :: (LMatch GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn233 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn233 #-}-happyOut233 :: (HappyAbsSyn ) -> (LMatch GhcPs (LHsExpr GhcPs))-happyOut233 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut233 #-}-happyIn234 :: (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn234 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn234 #-}-happyOut234 :: (HappyAbsSyn ) -> (Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)))-happyOut234 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut234 #-}-happyIn235 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn235 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn235 #-}-happyOut235 :: (HappyAbsSyn ) -> (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyOut235 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut235 #-}-happyIn236 :: (Located [LGRHS GhcPs (LHsExpr GhcPs)]) -> (HappyAbsSyn )-happyIn236 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn236 #-}-happyOut236 :: (HappyAbsSyn ) -> (Located [LGRHS GhcPs (LHsExpr GhcPs)])-happyOut236 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut236 #-}-happyIn237 :: (Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn237 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn237 #-}-happyOut237 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)]))-happyOut237 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut237 #-}-happyIn238 :: (LGRHS GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn238 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn238 #-}-happyOut238 :: (HappyAbsSyn ) -> (LGRHS GhcPs (LHsExpr GhcPs))-happyOut238 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut238 #-}-happyIn239 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn239 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn239 #-}-happyOut239 :: (HappyAbsSyn ) -> (LPat GhcPs)-happyOut239 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut239 #-}-happyIn240 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn240 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn240 #-}-happyOut240 :: (HappyAbsSyn ) -> (LPat GhcPs)-happyOut240 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut240 #-}-happyIn241 :: (LPat GhcPs) -> (HappyAbsSyn )-happyIn241 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn241 #-}-happyOut241 :: (HappyAbsSyn ) -> (LPat GhcPs)-happyOut241 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut241 #-}-happyIn242 :: ([LPat GhcPs]) -> (HappyAbsSyn )-happyIn242 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn242 #-}-happyOut242 :: (HappyAbsSyn ) -> ([LPat GhcPs])-happyOut242 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut242 #-}-happyIn243 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn243 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn243 #-}-happyOut243 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)]))-happyOut243 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut243 #-}-happyIn244 :: (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)])) -> (HappyAbsSyn )-happyIn244 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn244 #-}-happyOut244 :: (HappyAbsSyn ) -> (Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)]))-happyOut244 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut244 #-}-happyIn245 :: (Maybe (LStmt GhcPs (LHsExpr GhcPs))) -> (HappyAbsSyn )-happyIn245 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn245 #-}-happyOut245 :: (HappyAbsSyn ) -> (Maybe (LStmt GhcPs (LHsExpr GhcPs)))-happyOut245 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut245 #-}-happyIn246 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn246 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn246 #-}-happyOut246 :: (HappyAbsSyn ) -> (LStmt GhcPs (LHsExpr GhcPs))-happyOut246 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut246 #-}-happyIn247 :: (LStmt GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn247 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn247 #-}-happyOut247 :: (HappyAbsSyn ) -> (LStmt GhcPs (LHsExpr GhcPs))-happyOut247 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut247 #-}-happyIn248 :: (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool))) -> (HappyAbsSyn )-happyIn248 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn248 #-}-happyOut248 :: (HappyAbsSyn ) -> (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)))-happyOut248 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut248 #-}-happyIn249 :: (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool))) -> (HappyAbsSyn )-happyIn249 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn249 #-}-happyOut249 :: (HappyAbsSyn ) -> (([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)))-happyOut249 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut249 #-}-happyIn250 :: (LHsRecField GhcPs (LHsExpr GhcPs)) -> (HappyAbsSyn )-happyIn250 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn250 #-}-happyOut250 :: (HappyAbsSyn ) -> (LHsRecField GhcPs (LHsExpr GhcPs))-happyOut250 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut250 #-}-happyIn251 :: (Located [LIPBind GhcPs]) -> (HappyAbsSyn )-happyIn251 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn251 #-}-happyOut251 :: (HappyAbsSyn ) -> (Located [LIPBind GhcPs])-happyOut251 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut251 #-}-happyIn252 :: (LIPBind GhcPs) -> (HappyAbsSyn )-happyIn252 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn252 #-}-happyOut252 :: (HappyAbsSyn ) -> (LIPBind GhcPs)-happyOut252 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut252 #-}-happyIn253 :: (Located HsIPName) -> (HappyAbsSyn )-happyIn253 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn253 #-}-happyOut253 :: (HappyAbsSyn ) -> (Located HsIPName)-happyOut253 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut253 #-}-happyIn254 :: (Located FastString) -> (HappyAbsSyn )-happyIn254 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn254 #-}-happyOut254 :: (HappyAbsSyn ) -> (Located FastString)-happyOut254 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut254 #-}-happyIn255 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn255 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn255 #-}-happyOut255 :: (HappyAbsSyn ) -> (LBooleanFormula (Located RdrName))-happyOut255 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut255 #-}-happyIn256 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn256 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn256 #-}-happyOut256 :: (HappyAbsSyn ) -> (LBooleanFormula (Located RdrName))-happyOut256 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut256 #-}-happyIn257 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn257 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn257 #-}-happyOut257 :: (HappyAbsSyn ) -> (LBooleanFormula (Located RdrName))-happyOut257 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut257 #-}-happyIn258 :: ([LBooleanFormula (Located RdrName)]) -> (HappyAbsSyn )-happyIn258 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn258 #-}-happyOut258 :: (HappyAbsSyn ) -> ([LBooleanFormula (Located RdrName)])-happyOut258 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut258 #-}-happyIn259 :: (LBooleanFormula (Located RdrName)) -> (HappyAbsSyn )-happyIn259 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn259 #-}-happyOut259 :: (HappyAbsSyn ) -> (LBooleanFormula (Located RdrName))-happyOut259 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut259 #-}-happyIn260 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn260 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn260 #-}-happyOut260 :: (HappyAbsSyn ) -> (Located [Located RdrName])-happyOut260 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut260 #-}-happyIn261 :: (Located RdrName) -> (HappyAbsSyn )-happyIn261 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn261 #-}-happyOut261 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut261 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut261 #-}-happyIn262 :: (Located RdrName) -> (HappyAbsSyn )-happyIn262 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn262 #-}-happyOut262 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut262 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut262 #-}-happyIn263 :: (Located RdrName) -> (HappyAbsSyn )-happyIn263 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn263 #-}-happyOut263 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut263 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut263 #-}-happyIn264 :: (Located RdrName) -> (HappyAbsSyn )-happyIn264 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn264 #-}-happyOut264 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut264 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut264 #-}-happyIn265 :: (Located RdrName) -> (HappyAbsSyn )-happyIn265 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn265 #-}-happyOut265 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut265 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut265 #-}-happyIn266 :: (Located [Located RdrName]) -> (HappyAbsSyn )-happyIn266 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn266 #-}-happyOut266 :: (HappyAbsSyn ) -> (Located [Located RdrName])-happyOut266 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut266 #-}-happyIn267 :: (Located DataCon) -> (HappyAbsSyn )-happyIn267 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn267 #-}-happyOut267 :: (HappyAbsSyn ) -> (Located DataCon)-happyOut267 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut267 #-}-happyIn268 :: (Located DataCon) -> (HappyAbsSyn )-happyIn268 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn268 #-}-happyOut268 :: (HappyAbsSyn ) -> (Located DataCon)-happyOut268 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut268 #-}-happyIn269 :: (Located RdrName) -> (HappyAbsSyn )-happyIn269 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn269 #-}-happyOut269 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut269 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut269 #-}-happyIn270 :: (Located RdrName) -> (HappyAbsSyn )-happyIn270 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn270 #-}-happyOut270 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut270 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut270 #-}-happyIn271 :: (Located RdrName) -> (HappyAbsSyn )-happyIn271 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn271 #-}-happyOut271 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut271 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut271 #-}-happyIn272 :: (Located RdrName) -> (HappyAbsSyn )-happyIn272 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn272 #-}-happyOut272 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut272 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut272 #-}-happyIn273 :: (Located RdrName) -> (HappyAbsSyn )-happyIn273 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn273 #-}-happyOut273 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut273 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut273 #-}-happyIn274 :: (Located RdrName) -> (HappyAbsSyn )-happyIn274 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn274 #-}-happyOut274 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut274 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut274 #-}-happyIn275 :: (Located RdrName) -> (HappyAbsSyn )-happyIn275 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn275 #-}-happyOut275 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut275 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut275 #-}-happyIn276 :: (Located RdrName) -> (HappyAbsSyn )-happyIn276 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn276 #-}-happyOut276 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut276 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut276 #-}-happyIn277 :: (LHsType GhcPs) -> (HappyAbsSyn )-happyIn277 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn277 #-}-happyOut277 :: (HappyAbsSyn ) -> (LHsType GhcPs)-happyOut277 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut277 #-}-happyIn278 :: (Located RdrName) -> (HappyAbsSyn )-happyIn278 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn278 #-}-happyOut278 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut278 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut278 #-}-happyIn279 :: (Located RdrName) -> (HappyAbsSyn )-happyIn279 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn279 #-}-happyOut279 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut279 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut279 #-}-happyIn280 :: (Located RdrName) -> (HappyAbsSyn )-happyIn280 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn280 #-}-happyOut280 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut280 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut280 #-}-happyIn281 :: (Located RdrName) -> (HappyAbsSyn )-happyIn281 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn281 #-}-happyOut281 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut281 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut281 #-}-happyIn282 :: (Located RdrName) -> (HappyAbsSyn )-happyIn282 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn282 #-}-happyOut282 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut282 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut282 #-}-happyIn283 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn283 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn283 #-}-happyOut283 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut283 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut283 #-}-happyIn284 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn284 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn284 #-}-happyOut284 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut284 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut284 #-}-happyIn285 :: (LHsExpr GhcPs) -> (HappyAbsSyn )-happyIn285 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn285 #-}-happyOut285 :: (HappyAbsSyn ) -> (LHsExpr GhcPs)-happyOut285 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut285 #-}-happyIn286 :: (Located RdrName) -> (HappyAbsSyn )-happyIn286 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn286 #-}-happyOut286 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut286 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut286 #-}-happyIn287 :: (Located RdrName) -> (HappyAbsSyn )-happyIn287 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn287 #-}-happyOut287 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut287 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut287 #-}-happyIn288 :: (Located RdrName) -> (HappyAbsSyn )-happyIn288 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn288 #-}-happyOut288 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut288 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut288 #-}-happyIn289 :: (Located RdrName) -> (HappyAbsSyn )-happyIn289 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn289 #-}-happyOut289 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut289 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut289 #-}-happyIn290 :: (Located RdrName) -> (HappyAbsSyn )-happyIn290 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn290 #-}-happyOut290 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut290 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut290 #-}-happyIn291 :: (Located RdrName) -> (HappyAbsSyn )-happyIn291 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn291 #-}-happyOut291 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut291 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut291 #-}-happyIn292 :: (Located RdrName) -> (HappyAbsSyn )-happyIn292 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn292 #-}-happyOut292 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut292 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut292 #-}-happyIn293 :: (Located RdrName) -> (HappyAbsSyn )-happyIn293 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn293 #-}-happyOut293 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut293 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut293 #-}-happyIn294 :: (Located RdrName) -> (HappyAbsSyn )-happyIn294 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn294 #-}-happyOut294 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut294 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut294 #-}-happyIn295 :: (Located RdrName) -> (HappyAbsSyn )-happyIn295 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn295 #-}-happyOut295 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut295 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut295 #-}-happyIn296 :: (Located RdrName) -> (HappyAbsSyn )-happyIn296 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn296 #-}-happyOut296 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut296 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut296 #-}-happyIn297 :: (Located RdrName) -> (HappyAbsSyn )-happyIn297 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn297 #-}-happyOut297 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut297 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut297 #-}-happyIn298 :: (Located RdrName) -> (HappyAbsSyn )-happyIn298 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn298 #-}-happyOut298 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut298 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut298 #-}-happyIn299 :: (Located RdrName) -> (HappyAbsSyn )-happyIn299 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn299 #-}-happyOut299 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut299 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut299 #-}-happyIn300 :: (Located FastString) -> (HappyAbsSyn )-happyIn300 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn300 #-}-happyOut300 :: (HappyAbsSyn ) -> (Located FastString)-happyOut300 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut300 #-}-happyIn301 :: (Located FastString) -> (HappyAbsSyn )-happyIn301 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn301 #-}-happyOut301 :: (HappyAbsSyn ) -> (Located FastString)-happyOut301 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut301 #-}-happyIn302 :: (Located RdrName) -> (HappyAbsSyn )-happyIn302 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn302 #-}-happyOut302 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut302 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut302 #-}-happyIn303 :: (Located RdrName) -> (HappyAbsSyn )-happyIn303 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn303 #-}-happyOut303 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut303 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut303 #-}-happyIn304 :: (Located RdrName) -> (HappyAbsSyn )-happyIn304 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn304 #-}-happyOut304 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut304 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut304 #-}-happyIn305 :: (Located RdrName) -> (HappyAbsSyn )-happyIn305 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn305 #-}-happyOut305 :: (HappyAbsSyn ) -> (Located RdrName)-happyOut305 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut305 #-}-happyIn306 :: (Located (HsLit GhcPs)) -> (HappyAbsSyn )-happyIn306 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn306 #-}-happyOut306 :: (HappyAbsSyn ) -> (Located (HsLit GhcPs))-happyOut306 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut306 #-}-happyIn307 :: (()) -> (HappyAbsSyn )-happyIn307 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn307 #-}-happyOut307 :: (HappyAbsSyn ) -> (())-happyOut307 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut307 #-}-happyIn308 :: (Located ModuleName) -> (HappyAbsSyn )-happyIn308 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn308 #-}-happyOut308 :: (HappyAbsSyn ) -> (Located ModuleName)-happyOut308 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut308 #-}-happyIn309 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn309 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn309 #-}-happyOut309 :: (HappyAbsSyn ) -> (([SrcSpan],Int))-happyOut309 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut309 #-}-happyIn310 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn310 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn310 #-}-happyOut310 :: (HappyAbsSyn ) -> (([SrcSpan],Int))-happyOut310 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut310 #-}-happyIn311 :: (([SrcSpan],Int)) -> (HappyAbsSyn )-happyIn311 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn311 #-}-happyOut311 :: (HappyAbsSyn ) -> (([SrcSpan],Int))-happyOut311 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut311 #-}-happyIn312 :: (LHsDocString) -> (HappyAbsSyn )-happyIn312 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn312 #-}-happyOut312 :: (HappyAbsSyn ) -> (LHsDocString)-happyOut312 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut312 #-}-happyIn313 :: (LHsDocString) -> (HappyAbsSyn )-happyIn313 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn313 #-}-happyOut313 :: (HappyAbsSyn ) -> (LHsDocString)-happyOut313 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut313 #-}-happyIn314 :: (Located (String, HsDocString)) -> (HappyAbsSyn )-happyIn314 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn314 #-}-happyOut314 :: (HappyAbsSyn ) -> (Located (String, HsDocString))-happyOut314 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut314 #-}-happyIn315 :: (Located (Int, HsDocString)) -> (HappyAbsSyn )-happyIn315 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn315 #-}-happyOut315 :: (HappyAbsSyn ) -> (Located (Int, HsDocString))-happyOut315 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut315 #-}-happyIn316 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn316 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn316 #-}-happyOut316 :: (HappyAbsSyn ) -> (Maybe LHsDocString)-happyOut316 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut316 #-}-happyIn317 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn317 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn317 #-}-happyOut317 :: (HappyAbsSyn ) -> (Maybe LHsDocString)-happyOut317 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut317 #-}-happyIn318 :: (Maybe LHsDocString) -> (HappyAbsSyn )-happyIn318 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyIn318 #-}-happyOut318 :: (HappyAbsSyn ) -> (Maybe LHsDocString)-happyOut318 x = Happy_GHC_Exts.unsafeCoerce# x-{-# INLINE happyOut318 #-}-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\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\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\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\x0e\x0d\x44\xf4\xff\x1f\x3f\x38\x00\x00\x04\x19\x80\xaa\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\xfc\x9b\xaf\xfa\xff\x2f\xff\xfb\xf9\x20\x08\x32\x00\x55\xe1\xcc\xff\xff\xeb\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x10\x24\x00\xaa\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\x20\xc8\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\xe0\xd0\x5c\x44\xff\x7f\xf9\x9f\x03\x04\x41\x90\x00\xa8\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\xc0\xa1\x81\x88\xfe\xff\xe3\x07\x07\x00\x80\x20\x03\x50\x15\xce\xfc\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x10\xfd\xfe\x84\x0f\x00\x00\x20\x00\x86\x20\x0a\xfa\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x9e\x01\x00\x18\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\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\x10\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x30\x20\x00\x82\x1f\x9f\xf0\x01\x18\x00\x00\x88\x40\x54\x81\x23\x18\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\x10\x00\xc1\x8f\x4f\xf8\x00\x0c\x00\x00\x04\x20\xaa\xc0\x11\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\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\x20\x20\x00\x82\x1f\x9f\xf0\x01\x00\x00\x00\x00\x00\x40\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\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\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\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\xc5\x15\xfc\x9e\x01\x00\x18\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\x06\x04\x40\xf4\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2e\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\x0c\x08\x80\xe8\xc7\x27\x7c\x00\x06\x00\x81\x36\x14\x75\xf8\x7b\x06\x00\x60\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x64\x28\xaa\xf1\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\x20\x20\x00\x82\x1f\x9f\xf0\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x40\x00\x44\xbf\x3f\xe1\x03\x00\x00\x08\x80\x21\x88\x82\x5e\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x00\x04\x09\x80\xaa\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\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\x80\x40\x18\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\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\x0e\x00\x00\x41\x02\xa0\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x06\x04\x40\xf4\xfb\x13\x3e\x00\x00\x00\x00\x01\x84\xaa\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\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\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\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x28\x12\x10\x55\xe1\xcc\xff\xc3\xeb\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\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\x40\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\x60\x40\x00\x44\xbf\x3f\xe1\x03\x00\x00\x00\x10\x00\xa8\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\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\x80\x01\x01\x10\xfd\xfe\x84\x0f\x00\x00\x00\x40\x00\xa0\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\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\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\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x20\x44\x00\xaa\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\x30\x20\x00\xa2\xdf\x9f\xf0\x01\x00\x00\x00\x08\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\x60\x40\x00\x44\xbf\x3f\xf1\x03\x00\x00\x00\x10\x00\xa8\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\xc0\x80\x00\x88\x7e\x7f\xc2\x07\x00\x00\x00\x20\x00\x50\x15\xce\xfc\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x20\x41\x86\xe0\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x40\x82\x0c\x41\x55\xfc\xff\xff\xf0\xfa\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x80\x14\x19\x82\xba\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x29\x32\x04\xd5\xf9\xff\xff\xc3\xeb\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x00\x00\xaa\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\x20\x20\x00\xa2\xdf\x9f\xf0\x01\x00\x00\x00\x00\x00\x44\x01\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x00\x04\x09\x80\xaa\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\x0c\x08\x80\xe8\xc7\x27\x7c\x00\x06\x00\x01\x32\x14\x55\xf0\x7b\x06\x00\x60\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\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\x20\x48\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xa1\x81\x88\xfe\xff\xe2\x07\x07\x00\x80\x20\x01\x50\x15\xce\xfc\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x04\x04\x40\xf0\xe3\x13\x3e\x00\x00\x00\x00\x00\x80\x2a\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\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\x18\x80\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\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\x40\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\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\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\x80\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\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\x04\x04\x40\xf4\xfb\x13\x3e\x00\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\x08\x08\x80\xe8\xf7\x27\x7c\x00\x00\x00\x00\x00\x00\x51\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\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\xa4\xc8\x10\xd4\xe5\xff\xff\x0f\xaf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\x00\x00\x00\x40\x00\xa0\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\x20\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x30\x00\x43\x00\x00\x31\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x0c\x00\x02\x64\x28\xaa\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\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\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\x02\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc0\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\x06\x04\x42\xf0\xfb\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\x20\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\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\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\x40\x40\x00\x44\xbf\x3f\xe1\x03\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\x80\x80\x00\x88\x7e\x7f\xc2\x07\x00\x00\x00\x00\x00\x10\x05\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\x01\x01\x52\xfd\xfe\x84\x0f\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\x0a\x02\xa0\xfa\xfd\x09\x1f\x00\x00\x00\x00\x00\x00\x04\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\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\x08\x80\xe8\xf7\x27\x7c\x00\x00\x00\x00\x00\x00\x10\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x04\x00\xaa\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\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\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\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\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\x08\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\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\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\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\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\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\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\xaa\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\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\xa8\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\x00\x00\x00\x50\x05\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\x80\x01\x01\x10\xfd\xfe\x84\x0f\x00\x00\x00\x40\x00\xa0\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\x60\x40\x00\x44\xbf\x3f\xe1\x03\x00\x00\x00\x10\x00\xa8\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\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\x20\x00\x86\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\x10\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\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\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\x01\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\x10\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\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\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x00\x20\x00\x90\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\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\x10\x00\x00\x00\x82\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\xf0\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\xe0\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\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\x30\x20\x00\x82\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x18\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x30\x00\x08\x90\xa1\xa8\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\x01\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\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\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\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\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\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x9e\x01\x00\x18\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\x06\x04\x40\xf0\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\x0a\x00\x00\x41\x02\xa0\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\x0c\x08\x80\xe8\xc7\x27\x7c\x00\x06\x00\x01\x32\x14\x55\xf0\x7b\x06\x00\x60\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x00\x00\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\x30\x20\x00\x82\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x18\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x80\x01\xf8\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\x20\x00\x00\x20\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\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\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x40\x90\x00\xa8\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\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\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\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\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x48\x90\x21\xa8\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\xc0\xa1\x81\x88\xfe\xff\xe2\x07\x07\x00\x90\x22\x43\x50\x15\xff\xff\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xfa\xfd\x89\x1f\x00\x00\x00\x80\x00\x40\x55\x38\xf3\xff\xf0\xfa\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\x20\x20\x00\xa2\xdf\x9f\xf0\x01\x00\x00\x04\xc0\x10\xc4\x21\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\x02\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\x80\x80\x00\x88\x7e\x7f\xc2\x07\x00\x00\x00\x00\x00\x00\x01\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\x80\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\x04\x04\x40\xf4\xfb\x13\x3e\x00\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\x0c\x08\x80\xe8\xc7\x27\x7c\x00\x06\x00\x01\x32\x14\x55\xf0\x7b\x06\x00\x60\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\xa1\xb9\x88\xfe\xff\xf2\x3f\x07\x08\x82\x20\x03\x50\x15\xce\xfc\xff\xbf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x73\x11\xfd\xff\xe5\x7f\x0e\x10\x04\x41\x06\xa0\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\x02\x02\x20\xfa\xfd\x09\x1f\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\x06\x04\x40\xf4\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\x01\x30\x04\x00\x10\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x40\x0b\x00\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\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\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\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\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\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\x01\x30\x04\x00\x10\x33\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\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\x10\x00\x43\x00\x82\x30\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\x00\x00\x00\x00\x10\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\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\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x48\x90\x21\xa8\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\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\x08\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x41\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\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\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\x03\x02\x20\xfa\xfd\x09\x1f\x00\x00\x00\x80\x00\x42\x55\x38\xf3\xff\xf0\xfa\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x44\x00\xaa\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\x40\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\x60\x40\x00\x44\xbf\x3f\xe1\x03\x00\x00\x00\x10\x00\xa8\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\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\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\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\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\x70\x68\x20\xa2\xff\xff\xf8\xc1\x01\x00\x20\xc8\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\xff\xf1\x83\x03\x00\x40\x90\x01\xa8\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\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\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\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\x20\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\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x40\x90\x01\xa8\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\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\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\x06\x04\x40\xf4\xfb\x13\x3e\x00\x00\x00\x00\x01\x80\xaa\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x08\x12\x00\x55\xe1\xcc\xff\xc3\xeb\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\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\x60\x40\x00\x04\x3f\x3e\xe1\x03\x30\x00\x00\x10\x81\xa8\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x06\x04\x40\xf4\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x08\x12\x00\x55\xe1\xcc\xff\xc3\xeb\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x10\x24\x00\xaa\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\x20\x48\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x40\x90\x00\xa8\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\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\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\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\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\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\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\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\xc0\x80\x00\x88\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x87\xbf\x67\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\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\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\x20\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\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\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\x40\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\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\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\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\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\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\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\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\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\x80\x80\x00\x88\x7e\x7f\xc2\x07\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x08\x80\xe0\xc7\x27\x7c\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\x20\x20\x00\x82\x1f\x9f\xf0\x01\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\x60\x40\x00\x04\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x9e\x01\x00\x18\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\x10\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x00\x00\xa2\x80\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\x80\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\x80\x80\x00\x08\x0e\x7c\xc2\x07\x00\x00\x00\x00\x00\x00\x00\x0c\x20\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\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\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\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\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\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xc0\x80\x00\x88\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x67\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x18\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\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x30\x00\x08\x90\xa1\xa8\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x64\x28\xaa\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\x30\x20\x00\xa2\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x19\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\x80\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\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\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\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\x20\x48\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x40\x90\x00\xa8\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\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\x08\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x00\x04\x09\x80\xaa\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\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\x80\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x00\x41\x06\xa4\xaa\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x0c\x60\x55\x39\xf3\xff\xf0\xfa\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\x06\x04\x40\xf4\xfb\x13\x3e\x00\x00\x00\x00\x11\x80\xaa\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x12\x64\x08\xaa\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\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x40\x90\x00\xa8\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\xc0\xa1\x81\x98\xfe\xff\xe2\x07\x07\x00\x80\x20\x03\x50\x15\xce\xfc\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x20\x41\x86\xa0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x3f\x38\x00\x00\x04\x09\x80\xaa\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\x1c\x1a\x88\xe9\xff\x2f\x7e\x70\x00\x00\x08\x32\x00\x55\xe1\xcc\xff\xc3\xeb\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x12\x64\x08\xaa\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\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x80\x04\x19\x82\xaa\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\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\x30\x20\x00\xa2\xdf\x9f\xf0\x01\x00\x00\x00\x00\x00\x54\x8d\x33\xff\x0f\xaf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xfd\x7c\x10\x04\x19\x80\xaa\x70\xe6\xff\xff\xf5\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x3e\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\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\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\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\x02\x02\x20\xf8\xf1\x09\x1f\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x01\x01\x10\xfd\xfe\x84\x0f\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\x02\x02\x20\xfa\xfd\x09\x1f\x00\x00\x00\x00\x00\x40\x14\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xaa\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\x44\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x01\x30\x04\x00\x10\x33\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x83\x03\x00\x40\x90\x00\xa8\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\xc0\xa1\x81\x88\xfe\xff\xe2\x07\x07\x00\x90\x20\x43\x50\x15\xff\xff\x3f\xbc\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\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\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\x03\x02\x20\xf8\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x8e\x01\x00\x18\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\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\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\x02\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\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\x80\x00\x08\x7e\x7c\xc2\x07\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x10\x24\x00\xaa\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\x20\xc8\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\x60\x40\x00\x04\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x01\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\x80\x00\x09\x00\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\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\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x80\x80\x00\x88\x7e\x7f\xc2\x07\x00\x00\x00\x00\x00\x00\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x00\xa2\xdf\x9f\xf0\x01\x00\x00\x00\x00\x00\x40\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\x40\x40\x00\x44\xbf\x3f\xe1\x03\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\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\x04\x04\x40\xf4\xfb\x13\x3e\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\x08\x80\xe8\xf7\x27\x7c\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x10\x64\x00\xaa\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\x70\x68\x20\xa2\xff\xbf\xf8\xc1\x01\x00\x20\xc8\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x80\x80\x00\x88\x7e\x7f\xc2\x07\x00\x00\x00\x00\x00\x10\x05\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\x01\x01\x10\xfd\xfe\x84\x0f\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x80\xe8\xf7\x27\x7c\x00\x00\x00\x00\x00\x00\x51\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\x18\x10\x00\xd1\xef\x4f\xf8\x00\x00\x00\x00\x04\x00\xaa\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\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\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\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\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\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\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\xff\xe6\xab\xfe\xff\xcb\xff\x7e\x3e\x08\x82\x0c\x40\x55\x38\xf3\xff\xff\xfa\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\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\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\x02\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\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\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\x40\x15\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\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\x54\x01\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\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\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\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\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x04\x04\x40\xf4\xfb\x13\x3e\x00\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x08\x80\xe8\xf7\x27\x7c\x00\x00\x00\x00\x00\x00\x10\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\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\x02\x02\x20\xfa\xfd\x09\x1f\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x64\x28\xaa\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\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x80\x80\x00\x08\x7e\x7c\xc2\x07\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\x01\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\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\xc0\x80\x00\x88\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x67\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\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\x20\x20\x00\x82\x1f\x9f\xf0\x01\x00\x00\x00\x02\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\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\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\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\x40\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\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\xc0\x80\x00\x08\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x63\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x9e\x01\x00\x18\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\x06\x04\x40\xf4\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\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\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\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x20\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\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\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\xc0\x80\x00\x88\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x67\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x06\x04\x40\xf4\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\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\x80\x43\x73\x11\xfd\xff\xe5\x7f\x0e\x10\x04\x41\x06\xa0\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x64\x28\xaa\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\x20\x20\x00\xa2\xdf\x9f\xf0\x01\x00\x00\x00\x00\x00\x40\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\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\xc0\x80\x00\x08\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x63\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\xc0\x00\x20\x40\x86\xa2\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x9e\x01\x00\x18\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\x00\x18\x02\x00\x88\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\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\x80\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\x02\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x00\x04\x09\x80\xaa\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\x01\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\x80\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x00\x41\x02\xa0\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\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\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\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\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\xc0\xa1\x81\x88\xfe\xff\xe2\x07\x07\x00\x80\x20\x03\x50\x55\xce\xfc\x3f\xbc\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\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\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\x70\x68\x20\xa2\xff\xff\xf8\xc1\x01\x00\x20\xc8\x00\x54\x85\x33\xff\x0f\xaf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x0e\x0d\x44\xf4\xff\x17\x3f\x38\x00\x00\x04\x19\x80\xaa\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x08\x12\x00\x55\xe1\xcc\xff\xc3\xeb\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\xe0\xd0\x40\x44\xff\x7f\xf1\x83\x03\x00\x48\x90\x21\xa8\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\x80\x80\x00\x88\x7e\x7f\xc2\x07\x00\x00\x08\x00\x00\x00\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x08\x80\xe8\xc7\x27\x7c\x00\x06\x00\x01\x32\x14\x55\xf0\x7b\x06\x00\x60\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\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\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\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\x30\x20\x00\xa2\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x19\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x00\x88\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x67\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x0f\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\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\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\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\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\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\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\x10\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\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\x80\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x00\x41\x02\xa0\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x0c\x40\x55\x38\xf3\xff\xf0\xfa\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x10\x24\x00\xaa\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\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\xc0\xa1\x81\x98\xfe\xff\xe2\x07\x07\x00\x80\x20\x03\x50\x15\xce\xfc\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x31\xfd\xff\xc5\x0f\x0e\x00\x00\x41\x06\xa0\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\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\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\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\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\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\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\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\x20\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\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\x40\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x08\x12\x00\x55\xe1\xcc\xff\xc3\xeb\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\x70\x6b\x2e\xaa\xff\xbf\xfc\xcf\x01\x82\x20\xc8\x00\x54\x85\x33\xff\xff\xaf\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\x00\x00\x00\x00\xe0\xd6\x5c\x54\xff\x7f\xf9\x9f\x03\x04\x41\x90\x01\xa8\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\x70\x69\xae\xaa\xff\xbf\xfc\xcf\x01\x82\x20\xc8\x00\x54\x85\x33\xff\xff\xaf\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\x00\x00\x00\x00\xe0\xd2\x5c\x55\xff\x7f\xf9\x9f\x03\x04\x41\x90\x01\xa8\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\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\x08\x08\x80\xe0\xc7\x27\x7c\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\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x02\x02\x20\xfa\xfd\x09\x1f\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\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\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\x40\x40\x00\x44\xbf\x3f\xe1\x03\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\x01\x01\x10\xfd\xfe\x84\x0f\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\x40\x01\x0c\x01\x00\xc4\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\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\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\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x50\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x38\x34\x10\xd1\xff\x5f\xfc\xe0\x00\x00\x10\x24\x00\xaa\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\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\x80\x43\x73\x11\xfd\xff\xe5\x7f\x0e\x10\x04\x41\x06\xa0\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\x87\xe6\x22\xfa\xff\xcb\xff\x1c\x20\x08\x82\x0c\x40\x55\x38\xf3\xff\xff\xfa\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x64\x28\xaa\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\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\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\x02\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x3e\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\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\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\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\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x00\x41\x02\xa0\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\x03\x02\x21\xf8\xf5\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x8e\x01\x00\x18\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\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\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\x10\x05\x08\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\x04\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\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\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\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\x06\x04\x40\xf4\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\xc0\xa1\x81\x88\xfe\xff\xe2\x07\x07\x00\x80\x20\x01\x50\x15\xce\xfc\x3f\xbc\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x43\x03\x11\xfd\xff\xc5\x0f\x0e\x00\x00\x41\x02\xa0\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\x87\x06\x22\xfa\xff\x8b\x1f\x1c\x00\x00\x82\x04\x40\x55\x38\xf3\xff\xf0\xfa\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x80\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\x80\x80\x00\x08\x0e\x7c\xc2\x07\x00\x00\x00\x00\x00\x00\x00\x0c\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\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\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\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\x10\x10\x20\xd5\xef\x4f\xfa\x00\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\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x40\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\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\x10\x20\x43\x00\x00\x30\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x80\x80\x00\x08\x0e\x7c\xc2\x07\x00\x00\x00\x00\x00\x00\x00\x0c\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\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\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x08\x12\x00\x55\xe1\xcc\xff\xc3\xeb\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\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\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\x06\x04\x40\xf0\xe3\x13\x3e\x00\x03\x00\x00\x11\x88\x2a\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\x08\x08\x80\xe0\xc7\x27\x7c\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\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\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\xc0\x80\x00\x08\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x07\xbf\x63\x00\x00\xc6\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\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\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\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\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\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\xc0\xad\xb9\xa8\xfe\xff\xf2\x3f\x07\x08\x82\x20\x03\x50\x15\xce\xfc\xff\xbf\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x06\x04\x40\xf0\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\x0c\x08\x80\xe0\xc7\x27\x7c\x00\x06\x00\x01\x32\x14\x55\xf0\x3b\x06\x00\x60\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\x06\x60\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\x30\x20\x00\x82\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x18\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x97\xe6\xaa\xfa\xff\xcb\xff\x1c\x20\x08\x82\x0c\x40\x55\x38\xf3\xff\xff\xfa\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\x06\x04\x40\xf0\xe3\x13\x3e\x00\x03\x80\x00\x19\x8a\x2a\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\x30\x20\x00\x82\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x18\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x01\x01\x10\xfc\xf8\x84\x0f\xc0\x00\x30\x40\x86\xa2\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\x03\x02\x20\xf8\xf1\x09\x1f\x80\x01\x60\x80\x0c\x45\x15\xfc\x8e\x01\x00\x18\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\x04\x04\x40\xf0\xe3\x13\x3e\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\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\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\x80\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\x60\x40\x00\x44\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\x01\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x01\x01\x10\xfc\xf8\x84\x0f\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\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\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\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\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\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\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\xc0\x80\x00\x08\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x63\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x64\x28\xaa\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\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\x80\x01\x01\x10\xfd\xf8\x84\x0f\xc0\x00\x20\x40\x86\xa2\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\x03\x02\x20\xfa\xf1\x09\x1f\x80\x01\x40\x80\x0c\x45\x15\xfc\x9e\x01\x00\x18\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\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\x30\x20\x00\xa2\x1f\x9f\xf0\x01\x18\x00\x04\xc8\x50\x54\xc1\xef\x19\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\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\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\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\x80\x01\x01\x10\xfc\xf8\x84\x0f\xc0\x00\x20\x40\x04\xa2\x0a\x5e\xc1\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\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\x1c\x1a\x88\xe8\xff\x2f\x7e\x70\x00\x00\x08\x12\x00\x55\xe1\xcc\xff\xc3\xeb\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\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\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\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\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x20\x08\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\x80\x80\x00\xa8\x7e\x7f\xc2\x07\x00\x00\x08\x00\x00\x00\x01\xcc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\x40\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\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x02\x20\xf8\xf1\x09\x1f\x80\x01\x00\x80\x08\x44\x15\x38\x82\x01\x00\x18\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\x06\x04\x40\xf0\xe3\x13\x3e\x00\x03\x00\x00\x11\x88\x2a\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\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\x60\x40\x00\x04\x3f\x3e\xe1\x03\x30\x00\x08\x90\xa1\xa8\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\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\x18\x10\x00\xd1\x8f\x4f\xf8\x00\x0c\x00\x02\x6d\x28\xea\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x80\x00\x08\x7e\x7c\xc2\x07\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\xc0\x80\x00\x08\x7e\x7c\xc2\x07\x60\x00\x10\x20\x43\x51\x05\xbf\x63\x00\x00\xc6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xd0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x01\x01\x10\xfc\xf8\x84\x0f\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\x0c\x08\x80\xe0\xc7\x27\x7c\x00\x06\x00\x01\x22\x10\x55\xf0\x0a\x06\x00\x60\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\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\x30\x20\x00\x82\x1f\x9f\xf0\x01\x18\x00\x00\x88\x40\x54\x81\x23\x18\x00\x80\x31\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x02\x02\x20\x38\xf0\x09\x1f\x00\x00\x00\x00\x00\x00\x00\x70\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\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\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\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\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\x01\x01\x50\xfd\xfe\x84\x0f\x00\x00\x10\x00\x00\x00\x02\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\x08\x08\x90\xea\xf7\x27\x7d\x00\x00\x00\x00\x00\x00\x10\xc0\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\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\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\x40\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\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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","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","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_forall","rule_var_list","rule_var","warnings","warning","deprecations","deprecation","strings","stringlist","annotation","fdecl","callconv","safety","fspec","opt_sig","opt_tyconsig","sigtype","sigtypedoc","sig_vars","sigtypes1","strict_mark","strictness","unpackedness","ctype","ctypedoc","context","context_no_ops","type","typedoc","btype","btype_no_ops","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","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","parr","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'","'unit'","'signature'","'dependency'","'{-# INLINE'","'{-# SPECIALISE'","'{-# SPECIALISE_INLINE'","'{-# SOURCE'","'{-# RULES'","'{-# CORE'","'{-# SCC'","'{-# GENERATED'","'{-# DEPRECATED'","'{-# WARNING'","'{-# UNPACK'","'{-# NOUNPACK'","'{-# ANN'","'{-# VECTORISE'","'{-# VECTORISE_SCALAR'","'{-# NOVECTORISE'","'{-# 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 * 473-        bit_end = (st + 1) * 473-        read_bit = readArrayBit happyExpList-        bits = map read_bit [bit_start..bit_end - 1]-        bits_indexed = zip bits [0..472]-        token_strs_expected = concatMap f bits_indexed-        f (False, _) = []-        f (True, nr) = [token_strs !! nr]--happyActOffsets :: HappyAddr-happyActOffsets = HappyA# "\x4f\x00\x0c\x00\xa8\x00\x18\x19\xde\x0e\xd9\x20\xd7\x1d\x7c\x15\x18\x19\x73\x3f\x07\x2b\xc8\x00\x41\x00\x3b\x43\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x03\x00\x00\x00\x00\x66\x00\x00\x00\x6d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x71\x01\x0d\x02\x0d\x02\x21\x38\x00\x00\x55\x02\xb6\x01\x02\x02\x00\x00\x0d\x03\x9e\x36\x00\x00\x00\x00\x00\x00\x2e\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\x99\x46\x00\x00\x00\x00\x00\x00\x34\x02\x4c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x84\x29\x05\x2a\x01\x28\x82\x28\x7c\x42\xda\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x20\x00\x00\x00\x00\x56\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\x7b\x02\x87\x0a\x25\x03\xda\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x02\xcf\x0a\x00\x00\x00\x00\xd9\x20\xd9\x20\xb9\x23\x00\x00\xae\x02\x00\x00\x00\x00\xc4\x02\x87\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdc\x02\x00\x00\x00\x00\xd9\x20\xff\x00\xb2\x19\x35\x03\x63\x03\xdd\x25\x63\x03\xdd\x25\xbc\x02\x18\x00\xbf\x02\x30\x23\xdd\x25\x42\x24\xdd\x25\x16\x16\xe4\x17\x7a\x12\x14\x13\x78\x27\xf2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd9\x20\xd9\x20\x07\x2b\xfc\x03\xd9\x20\x00\x00\xd9\x20\x00\x00\xd9\x20\xfa\x41\xd6\x02\x00\x00\xc1\x02\x42\x03\x00\x00\xfd\x02\x09\x03\x00\x00\x00\x00\x00\x00\x20\x04\x6d\x03\x20\x03\x59\x00\x20\x03\x3b\x43\xe1\x43\x6d\x03\xae\x13\x00\x00\xf5\x02\xdd\x25\xf5\x02\xf5\x02\x00\x00\x00\x00\x00\x00\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xed\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x36\x91\x03\x3f\x03\xd4\x01\xc3\x04\x00\x00\x86\x2a\x90\x01\x3f\x44\x4d\x03\x5f\x44\x5f\x44\xc1\x43\xdd\x42\xb8\x03\x3b\x43\xdd\x25\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x03\x3e\x03\xa9\x03\x6b\x03\xc6\x03\x73\x03\x0b\x04\x00\x00\x00\x00\x00\x00\xc1\x03\xba\x03\x50\x00\x08\x03\x08\x03\x29\x04\x06\x04\x8b\x00\x0d\x04\x23\x05\x1c\x04\x23\x05\x23\x05\xdd\x25\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x25\x16\x04\x57\x03\x42\x00\x00\x00\x66\x01\x2d\x04\xa2\x00\x00\x00\x66\x01\xb4\x00\x00\x00\x2b\x04\xd3\x03\x67\x45\x52\x04\x44\x00\x44\x01\x00\x00\x86\x06\x86\x06\x58\x04\x5b\x04\x9e\x36\x9e\x36\xeb\x02\x07\x2b\x95\x04\xac\x04\xd1\x04\xec\x04\xee\x04\x00\x00\x00\x00\x00\x00\x07\x2b\x9e\x36\xe2\x04\xef\x04\x00\x00\x8b\x00\x00\x00\xa7\x22\x00\x00\x00\x00\x88\x2b\x41\x40\x9e\x36\xfc\x04\xd8\x04\x00\x00\x0d\x05\xcf\x0a\xee\x01\x01\x05\x00\x00\xd9\x20\x00\x00\x00\x00\x00\x00\x0b\x05\x12\x05\x2e\x05\x3a\x05\x48\x14\xb0\x16\x00\x00\x42\x24\x00\x00\x00\x00\x41\x40\x53\x05\x5f\x05\x83\x05\x00\x00\x62\x05\x00\x00\x65\x05\x00\x00\x5b\x43\x45\x00\x3b\x43\x00\x00\x0f\x00\x3b\x43\x09\x2c\x3b\x43\x00\x00\xde\x05\xe0\x11\xe0\x11\xc1\x45\x8a\x2c\x24\x09\x00\x00\x00\x00\x00\x00\x00\x00\x92\x05\xa1\x05\x48\x0b\x93\x03\xa2\x05\xa8\x05\x88\x05\x8d\x05\x00\x00\x00\x00\x90\x05\xd2\x06\xa3\x05\x00\x00\x00\x00\xb4\x02\x00\x00\x00\x00\x54\x01\xd3\x05\x00\x00\x00\x00\xe2\x14\x00\x00\xdb\x05\x86\x01\xd9\x05\x00\x06\x95\x01\x14\x06\x21\x06\x00\x00\x00\x00\xcb\x24\x00\x00\x00\x00\x54\x25\x68\x04\xdd\x25\x07\x06\x47\x06\x4a\x06\x4e\x06\x00\x00\x00\x00\x4c\x1a\x4c\x1a\x49\x06\x00\x00\x93\x06\x34\x06\x5d\x00\x00\x00\x00\x00\x71\x1e\x5f\x06\x00\x00\xa1\x06\xdd\x25\xd9\x20\xfd\x42\x00\x00\x21\x38\x00\x00\x00\x00\xd9\x20\x0b\x2d\xd9\x20\xd9\x20\xd9\x20\xd9\x20\x44\x06\x57\x06\xcc\x03\x50\x06\x51\x06\x79\x02\x62\x06\x6e\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x2d\x03\x29\x5c\x42\x69\x06\x6a\x06\x73\x01\x70\x06\x72\x06\xdd\x03\x00\x00\xd3\x01\x77\x06\xdb\x02\x78\x06\x7a\x06\x7b\x06\x00\x00\x7e\x06\x00\x00\x20\x02\x00\x00\x85\x06\x00\x00\x4d\x00\x00\x00\xc1\x45\x00\x00\x00\x00\x89\x06\x99\x46\x00\x00\x2f\x47\x9e\x36\x00\x00\x0b\x2d\x0b\x2d\x00\x00\x00\x00\x78\x41\x13\x02\x00\x00\xd6\x3e\x06\x01\x00\x00\x82\x06\x00\x00\xf5\x03\xf5\x03\xab\x03\x00\x00\x00\x00\xab\x03\x00\x00\x00\x00\xe8\x06\x00\x00\x00\x00\x00\x00\x00\x00\xc2\x06\xdf\x06\xa0\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x06\x00\x00\x0b\x2d\x17\x01\x00\x00\xc3\x02\x8d\x06\x00\x00\x00\x00\x0b\x2d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x2d\x00\x00\x0b\x2d\x00\x00\x00\x00\x00\x00\x0b\x2d\x0b\x2d\x00\x00\x00\x00\x95\x06\x8e\x06\x9d\x06\x9e\x06\x9f\x06\xa2\x06\xa3\x06\xa5\x06\xa9\x06\xaa\x06\xb1\x06\xaf\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\xbe\x06\x00\x00\xb4\x06\xd9\x06\x00\x00\x00\x00\x00\x00\x68\x04\xc0\x01\xd6\x06\xbf\x06\x00\x00\x00\x00\x00\x00\x1b\x07\x00\x00\xd9\x20\xd9\x20\x4c\x01\x00\x00\x65\x02\xd9\x20\x00\x00\x00\x00\xe5\x06\x00\x00\x00\x00\x7e\x18\x44\x0e\x54\x25\xe0\x06\xe4\x17\x00\x00\xd9\x20\xe6\x1a\xe4\x17\x00\x00\xd9\x20\xe6\x1a\xe4\x17\x00\x00\xc3\x06\x00\x00\x00\x00\x00\x00\x4a\x17\xe3\x06\x00\x00\x66\x26\x00\x00\x00\x00\x00\x00\x00\x00\xde\x0e\x50\x00\xd4\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcf\x06\xd0\x06\x00\x00\xcd\x06\x00\x00\x00\x00\x00\x00\x00\x00\x3b\x45\x00\x00\x00\x00\xf1\x06\x00\x00\x7b\x00\xfc\x06\x99\x46\x4d\x01\x5d\x01\x00\x00\x00\x00\xae\x07\x6f\x1b\x5f\x01\x00\x00\xfe\x06\x6c\x02\xb8\x02\xf5\x06\x00\x00\x06\x07\x04\x07\xd8\x06\xf3\x06\x0a\x07\x00\x00\x10\x07\xf6\x06\xf9\x06\xbd\x44\xbd\x44\x00\x00\x12\x07\x23\x05\x6d\x03\x0b\x07\x0c\x07\x14\x07\x00\x00\xf4\x06\xeb\x08\x00\x00\x00\x00\xd9\x20\xe4\x17\x5b\x00\x9e\x36\x20\x00\x00\x00\x0f\x07\x88\x01\x27\x07\x99\x46\x00\x00\x00\x00\x53\x00\x00\x00\xd9\x20\x71\x1e\x9e\x36\x64\x07\x00\x00\x37\x07\x1c\x07\xc3\x04\x00\x00\x00\x00\x00\x00\x00\x00\x72\x07\x54\x00\xc0\x03\xf1\x03\x00\x00\x38\x07\x8c\x2d\xfb\x3d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x3e\x79\x46\x19\x07\x8c\x2d\x00\x00\x79\x46\xc1\x45\x0b\x1f\x0b\x1f\x76\x07\x00\x00\xb9\x00\x00\x00\x11\x07\x00\x00\x13\x07\x00\x00\x00\x00\xdd\x44\xdd\x44\x00\x00\x00\x00\xdd\x44\xef\x26\x45\x07\x47\x07\x2c\x04\x4e\x07\xd9\x20\x2f\x04\x00\x00\x00\x00\x00\x00\x8a\x07\x00\x00\x82\x04\x82\x04\x00\x00\x00\x00\x00\x00\x9a\x07\x00\x00\x39\x07\x00\x00\xde\x0e\x3e\x07\x66\x01\x66\x01\x3e\x07\x2d\x07\x00\x00\x00\x00\x23\x05\x65\x07\x00\x00\x00\x00\x23\x05\x00\x00\x00\x00\x66\x07\x00\x00\x00\x00\x00\x00\x4b\x02\x00\x00\x00\x00\x5c\x01\x49\x07\xd9\x20\xe1\x45\x9b\x07\x00\x00\x52\x07\x43\x07\x00\x00\x00\x00\x44\x07\x00\x00\x80\x3e\x00\x00\x6b\x07\x6f\x07\x73\x07\x77\x07\x1d\x46\x00\x00\x00\x00\x0d\x2e\x6e\x07\x0d\x2e\x99\x46\x00\x00\x54\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x04\x0d\x2e\x00\x00\x00\x00\x0d\x2e\x56\x07\x00\x00\xd4\x46\x00\x00\xb5\x04\x00\x00\x78\x07\xb1\x07\x00\x00\x00\x00\xbe\x04\x6a\x07\x9e\x36\x7a\x07\x8e\x2e\x8e\x2e\xb4\x07\xca\x07\x82\x07\x0f\x2f\x20\x00\x00\x00\x8c\x07\x00\x00\x00\x00\x86\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x2f\x00\x00\x7f\x07\x0f\x2f\x00\x00\x00\x00\x00\x00\x61\x07\x00\x00\xe0\x11\xd9\x20\x00\x00\x00\x00\x90\x2f\x1d\x46\x81\x07\x9e\x36\x90\x2f\x90\x2f\x24\x09\x00\x00\x00\x00\x84\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x2c\x02\x00\x00\x00\x00\x73\x21\x00\x00\x65\x01\x00\x00\x00\x00\x00\x00\x0d\x22\x00\x00\x50\x00\x88\x07\x00\x00\x15\x05\x00\x00\x09\x1c\x98\x07\x00\x00\x67\x07\x00\x00\x00\x00\xa3\x1c\x00\x00\x00\x00\x00\x00\x0d\x22\xa5\x1f\x0d\x22\x00\x00\x00\x00\xe4\x17\xfd\x42\x00\x00\x00\x00\x00\x00\x11\x30\x00\x00\x00\x00\xb2\x07\x00\x00\xa1\x07\x00\x00\xa2\x07\x9f\x07\x90\x07\x11\x30\x00\x00\x11\x30\x70\x07\x1e\x05\x00\x00\xab\x07\xab\x07\x02\x08\x46\x02\x03\x08\x00\x00\x2c\x00\x2c\x00\x00\x00\xb3\x07\x9d\x07\x00\x00\x94\x07\x00\x00\x00\x00\x00\x00\xbc\x07\x00\x00\x00\x00\x00\x00\x00\x00\xba\x07\x00\x00\xd1\x07\x00\x00\x00\x00\x00\x00\x16\x08\xdc\x07\x0d\x22\x3f\x20\x00\x00\x00\x00\x0d\x22\x07\x08\x77\x01\x3d\x1d\x3d\x1d\x0d\x22\xc1\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x30\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x07\xc7\x07\xed\x07\x00\x00\xf7\x07\x00\x00\x24\x08\x3f\x08\x00\x00\xc2\x07\x00\x00\x48\x08\x00\x00\x62\x02\x48\x08\x2a\x05\x92\x30\x1c\x02\x13\x31\x00\x00\x00\x00\x0d\x22\x00\x00\x78\x0f\x78\x0f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x12\x10\x12\x10\x00\x00\x00\x00\x00\x00\x37\x08\x2f\x47\x00\x00\x08\x08\x94\x31\x00\x00\x00\x00\x1d\x46\x00\x00\x00\x00\x69\x05\xf1\x07\x3d\x46\x00\x00\x79\x46\x58\x12\x00\x00\x00\x00\xf3\x07\x00\x00\xdd\x07\x00\x00\x13\x08\x00\x00\x14\x08\x2e\x04\x00\x00\x4a\x08\x1f\x08\x21\x08\x58\x08\x01\x08\x00\x00\x7d\x05\x00\x00\x00\x00\x7d\x05\x75\x08\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x22\x2a\x08\x00\x00\x00\x00\xe0\x11\xe0\x11\x00\x00\x00\x00\x94\x31\x00\x00\x26\x08\x00\x00\xac\x05\x00\x00\x76\x00\x00\x00\x79\x01\x00\x00\x00\x00\x6d\x08\xb9\x02\x00\x00\x2f\x47\x00\x00\x00\x00\x7a\x01\x00\x00\x62\x08\x0d\x22\x15\x32\xd9\x02\x00\x00\x00\x00\x00\x00\xbc\x03\xbc\x03\x00\x00\xf7\x02\x00\x00\x32\x00\x00\x00\x6c\x08\x00\x00\x81\x08\x00\x00\x00\x00\x96\x32\x00\x00\x00\x00\x00\x00\x00\x00\x0d\x22\x0d\x22\x0d\x22\x00\x00\x00\x00\x00\x00\x00\x00\x09\x08\x83\x08\x00\x00\x00\x00\x00\x00\x00\x00\x81\x01\x00\x00\x01\x01\x0e\x3f\xe0\x02\xd2\x05\x22\x08\x00\x00\x6d\x40\x46\x02\x00\x00\x00\x00\x00\x00\xd2\x05\x00\x00\x00\x00\x00\x00\x00\x00\x46\x02\x27\x08\x00\x00\x00\x00\x00\x00\x00\x00\x2e\x04\x2e\x03\xc3\x03\x3d\x06\x46\x02\x00\x00\x00\x00\x00\x00\x6b\x00\x2d\x08\x28\x08\x3b\x3f\x2e\x04\x2e\x04\x00\x00\x0d\x22\x3e\x08\x00\x00\x00\x00\x63\x08\x00\x00\x00\x00\x21\x38\xf4\x46\x3c\x08\x0b\x08\x00\x00\x1b\x35\x50\x00\x2b\x08\x00\x00\x4d\x08\x2e\x08\x3a\x08\x00\x00\xac\x10\x00\x00\x97\x04\x9e\x36\x9e\x36\xfc\x0b\x9e\x36\x00\x00\x00\x00\x00\x00\x46\x11\x9e\x36\x00\x00\x00\x00\x9e\x36\x5a\x08\x00\x00\x9c\x35\x1d\x36\x2f\x47\x00\x00\xa7\x01\x2a\x03\x96\x32\x00\x00\x61\x00\x2e\x04\x00\x00\x00\x00\x00\x00\x00\x00\x50\x00\x42\x08\x00\x00\x00\x00\x00\x00\x35\x08\x46\x02\x36\x08\x00\x00\x00\x00\x2f\x47\x00\x00\xc8\x01\x00\x00\x50\x00\x38\x03\x44\x08\x9e\x36\x20\x00\x00\x00\x00\x00\x5d\x08\x17\x33\x9d\x04\x00\x00\x00\x00\x98\x33\x19\x34\x00\x00\x00\x00\x6d\x03\x9a\x34\xbc\x03\x00\x00\x41\x08\x17\x00\x45\x08\x00\x00\x00\x00\x2f\x08\x56\x08\x5e\x08\x1f\x37\x00\x00\x30\x08\x0d\x22\x43\x08\x00\x00\x64\x00\x64\x00\x00\x00\x2e\x04\x00\x00\x2e\x04\x00\x00\x00\x00\x53\x08\x54\x08\x5f\x08\x60\x08\x00\x00\x70\x02\x00\x00\x00\x00\x00\x00\x58\x41\x49\x08\x00\x00\x00\x00\x46\x02\x61\x08\x50\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe9\x02\x00\x00\xc4\x08\x95\x02\x00\x00\x1d\x00\x68\x08\x68\x08\x88\x08\x00\x00\x00\x00\x00\x00\x21\x38\x21\x38\x00\x00\x4e\x08\x00\x00\x9e\x36\x00\x00\x00\x00\x00\x00\x76\x08\x82\x08\x01\x28\x00\x00\x00\x00\xf4\x46\x00\x00\x00\x00\xc0\x08\xda\x08\x20\x00\x00\x00\x00\x00\x9e\x36\x00\x00\x00\x00\x00\x00\x00\x00\x77\x08\x46\x02\x00\x00\x00\x00\x79\x08\x00\x00\x00\x00\xce\x08\xe4\x08\x00\x00\xe4\x08\x9c\x08\x2f\x47\x00\x00\x00\x00\xa0\x37\x64\x08\x21\x38\x00\x00\xd4\x08\xe0\x08\xa0\x3e\x2e\x04\x00\x00\x2e\x04\x2e\x04\x00\x00\x2e\x04\x58\x41\x00\x00\x00\x00\xd2\x40\x00\x00\x00\x00\x00\x00\x00\x00\x85\x08\xab\x08\x00\x00\x2e\x04\xfc\x05\xfc\x05\x00\x00\x00\x00\x00\x00\x00\x00\xf6\x08\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x08\x2e\x04\x00\x00\x00\x00\x00\x00\x00\x00"#--happyGotoOffsets :: HappyAddr-happyGotoOffsets = HappyA# "\x05\x00\xfe\xff\xd7\x08\x05\x4f\x3f\x01\xde\x0c\xab\x50\x51\x07\x0f\x4d\x01\x00\xd0\x3a\x27\x01\x07\x00\x87\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\xcf\x04\x00\x00\x00\x00\x00\x00\xfc\x01\x00\x00\x00\x00\x00\x00\xfe\x01\x00\x00\x00\x00\x3d\x05\x4b\x05\x6a\x02\x00\x00\x7a\x08\x00\x00\x00\x00\x00\x00\x00\x00\x6b\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\x03\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\xff\xfd\x3a\x1e\x3b\x90\x09\x26\x09\xe0\x01\xed\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7d\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\xff\x04\xe3\x07\xfd\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc6\x0c\x00\x00\x00\x00\xc3\x51\x09\x52\xea\x5c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4f\x52\x2c\x08\x4c\x4f\xe9\x04\x31\x08\xfa\x5c\x3d\x08\x36\x5d\x00\x00\x00\x00\x00\x00\xb7\x3f\x72\x5d\xae\x5c\x82\x5d\x02\x48\x6e\x48\xaf\x46\x91\x47\xbe\x5e\xdf\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95\x52\x0f\x5b\x60\x3b\x46\x08\xdb\x52\x00\x00\x21\x53\x00\x00\x67\x53\x05\x08\xd2\x08\x00\x00\x00\x00\x13\x0d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x05\x15\x01\xe0\x04\xf5\x04\x09\x05\xc2\x03\xdf\x07\x6a\x01\x20\x47\x00\x00\x00\x00\xbe\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xba\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x94\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0\x07\x00\x00\x00\x00\xd9\x08\xd8\x08\x00\x00\x71\x09\xa5\x08\x8a\x00\x71\x05\x22\x01\xc5\x00\xc5\x06\x3b\x04\x00\x00\x8b\x04\xfa\x5d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf1\x08\x00\x00\x00\x00\x00\x00\x00\x00\x7d\x01\x00\x00\x8a\x01\x00\x00\x96\x02\x00\x08\x06\x08\x0a\x08\xf2\x08\x00\x00\x51\x04\x00\x00\x19\x06\x00\x00\xf2\x06\x41\x07\x0a\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x46\x5e\x29\x08\xf8\x02\x00\x00\x00\x00\xb0\x08\x00\x00\x00\x00\x00\x00\xb9\x08\x00\x00\x00\x00\x77\x05\x00\x00\xe8\xff\x00\x00\x37\x00\x52\xff\x00\x00\xb6\x08\xb7\x08\x00\x00\x00\x00\x46\x03\x87\x0d\x16\x03\x6b\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x38\x27\x6b\x22\x9a\x08\x00\x00\x00\x00\x76\x04\x00\x00\x61\x5c\x00\x00\x00\x00\x33\x0a\xfd\x03\x25\x08\xee\x08\x00\x00\x00\x00\x00\x00\xb8\x14\x93\xff\x00\x00\x00\x00\x55\x5b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\x48\xb2\x49\x00\x00\xae\x5c\x00\x00\x00\x00\x86\x04\x00\x00\xb5\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4a\x09\x00\x00\xae\x04\x00\x00\x00\x00\xc0\x04\x88\x0a\xe1\x04\x00\x00\x00\x00\x48\x03\xc7\x03\x74\x00\x28\x05\xc9\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\xff\x18\x08\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x28\x00\x00\x00\xee\x18\x00\x00\x00\x00\x00\x00\xff\x04\x7e\x08\x00\x00\x93\xff\x00\x00\x00\x00\x00\x00\xda\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x5e\x00\x00\x00\x00\xb3\x44\x6f\x08\x92\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x4d\x9b\x4d\x00\x00\x00\x00\x00\x00\x8e\x08\x88\xff\x00\x00\x00\x00\xe1\x4d\xed\x04\x00\x00\x00\x00\xce\x5e\xad\x53\xb0\x03\x00\x00\x68\x03\x00\x00\x00\x00\x23\x5c\xb6\x0b\xf3\x53\x39\x54\x7f\x54\xc5\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\xe1\x37\xe9\x08\x19\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\x57\x02\x00\x00\x75\x00\x00\x00\x00\x00\x00\x00\x9a\x01\x00\x00\xf6\x01\x14\x25\x00\x00\xae\x3b\xcb\x3b\x00\x00\x00\x00\x3b\x07\x00\x00\x00\x00\x16\x00\x33\x08\x00\x00\xac\x02\x00\x00\x34\x08\x40\x08\x37\x09\x00\x00\x00\x00\x3b\x09\x00\x00\x00\x00\x22\x09\x00\x00\x00\x00\x00\x00\x00\x00\x54\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\xf4\x3b\x00\x00\x00\x00\xda\x00\x00\x00\x00\x00\x00\x00\x40\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x75\x38\x00\x00\xd4\x38\x00\x00\x00\x00\x00\x00\x09\x39\x26\x39\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8f\x08\x8a\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0b\x55\x51\x55\x65\x08\x00\x00\x00\x00\x97\x55\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2d\x4e\x7e\x3c\x71\x5c\x00\x00\x1e\x4a\x00\x00\xdd\x55\x3a\x4c\x8a\x4a\x00\x00\x23\x56\x82\x4c\xf6\x4a\x00\x00\x94\xff\x00\x00\x00\x00\x00\x00\x46\x49\x00\x00\x00\x00\xb0\x06\x00\x00\x00\x00\x00\x00\x00\x00\xcb\x01\x66\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\xb3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x32\x08\x00\x00\xa5\x01\x00\x00\x67\x08\x00\x00\x00\x00\x94\x00\x00\x00\x69\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\x17\x05\xcf\x08\x00\x00\x00\x00\x83\x07\xa1\x01\x00\x00\x00\x00\xf0\x04\x00\x00\x00\x00\xee\x18\x00\x00\x00\x00\x23\x5c\x62\x4b\x00\x00\x38\x08\xba\xff\x00\x00\x00\x00\x52\x08\x00\x00\xb8\x01\x00\x00\x00\x00\x0b\x00\x00\x00\x69\x56\x73\x4e\x3b\x26\x09\x09\x66\x05\x21\x09\x00\x00\x36\x09\x00\x00\x00\x00\x00\x00\x00\x00\x1b\x09\xce\x05\x36\x05\x33\x09\x00\x00\x00\x00\x05\x23\xb8\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd6\xff\xa6\x02\x70\x08\x4f\x0c\x00\x00\xed\xff\xf4\xff\xf1\x50\x37\x51\x16\x09\x00\x00\x00\x00\x00\x00\x1a\x09\x00\x00\x13\x09\x00\x00\x00\x00\x1f\x02\x93\x09\x00\x00\x00\x00\xb1\xff\x0a\x5f\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x56\x00\x00\x00\x00\x00\x00\x00\x00\x5e\x09\x00\x00\x80\x09\x82\x09\x00\x00\x00\x00\x00\x00\xb4\x03\x00\x00\x6d\x09\x00\x00\xcb\x01\x7a\x09\x2a\x09\x2b\x09\x83\x09\x72\x09\x00\x00\x00\x00\x4f\x08\x00\x00\x00\x00\x00\x00\x7d\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x5b\x1a\x00\x46\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x02\x00\x00\x00\x00\x11\x3c\x63\x09\x68\x39\x56\x00\x00\x00\x4e\x09\x00\x00\x00\x00\x00\x00\x00\x00\x42\x09\xcc\x0a\x00\x00\x00\x00\xb6\x39\x00\x00\x00\x00\x15\x02\x00\x00\x4c\x09\x00\x00\x00\x00\x45\x09\x00\x00\x00\x00\xec\x05\x00\x00\x3a\x28\x00\x00\x17\x24\xb2\x25\x14\x09\xa5\x05\x00\x00\xd4\x39\xc3\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x0b\x00\x00\x00\x00\x60\x0b\x00\x00\x00\x00\x00\x00\x78\x05\x00\x00\x40\x07\xf5\x56\x00\x00\x00\x00\x6c\x0c\x7b\x03\x00\x00\x3b\x29\xe3\x36\xa2\x3c\x0a\x06\x00\x00\x00\x00\x88\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\x3b\x57\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x81\x57\x00\x00\x95\x08\x00\x00\x00\x00\x83\x04\x00\x00\xbf\x4e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x92\x4f\x00\x00\x00\x00\x00\x00\xc7\x57\x1e\x50\x0d\x58\x00\x00\x00\x00\xce\x4b\x8b\x01\x00\x00\x00\x00\x00\x00\x01\x3a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\x03\x5f\x3c\x00\x00\x22\x3a\x22\x00\xab\x09\x00\x00\x9a\x09\x9d\x09\x00\x00\x15\x00\x00\x00\x00\x00\xfb\xff\xfd\xff\x00\x00\x00\x00\x8f\x03\x00\x00\xaf\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x09\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x58\x09\xe7\x08\x53\x58\x65\x50\x00\x00\x00\x00\x99\x58\x00\x00\x00\x00\xc9\x4c\xd8\x4f\xdf\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x3c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x28\x09\xb1\x05\x00\x00\xc5\xff\x00\x00\x1d\x09\x00\x00\x85\x09\xca\x05\x00\x00\xf8\x3c\x00\x00\x1f\x38\x00\x00\x00\x00\x25\x59\x00\x00\x46\x04\xc5\x04\x00\x00\x30\x09\xdd\x05\x00\x00\x00\x00\x00\x00\x4a\x02\xc9\x02\x00\x00\x00\x00\x00\x00\x87\x09\xf0\xff\x00\x00\x00\x00\xa7\x0c\x00\x00\x00\x00\x34\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3e\x00\x00\x00\xca\x02\xee\x18\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaa\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x09\x00\x00\x00\x00\xb9\x09\x9c\x09\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x59\x00\x00\x00\x00\x00\x00\x42\x06\xc1\x06\x00\x00\x00\x00\xfe\x0c\x00\x00\x00\x00\x00\x00\x8b\x09\x00\x00\x7f\x09\x00\x00\xb1\x08\x00\x00\x00\x00\x89\x09\x00\x00\x00\x00\x15\x02\x00\x00\x00\x00\xb4\x08\x00\x00\x8d\x09\xe1\x5b\x44\x04\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x02\xb1\x03\x00\x00\x7b\x05\x00\x00\x83\x02\x00\x00\x34\x09\x00\x00\xe3\x05\x00\x00\x00\x00\x81\x0b\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x59\xf7\x59\x3d\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x08\x00\x00\x00\x00\x26\x00\x00\x00\xbe\x09\x00\x00\x00\x00\x55\x00\xe3\xff\x00\x00\x00\x00\x00\x00\xc0\x09\x00\x00\x78\x02\x8d\x02\x00\x00\x27\x00\xba\x09\x00\x00\x00\x00\x00\x00\x00\x00\xbb\x08\x5f\x03\x9c\x04\x4e\x05\x2b\x00\x00\x00\x00\x00\x00\x00\x03\x00\xd3\x09\x00\x00\x29\x00\xbd\x08\xbf\x08\x00\x00\x83\x5a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0c\x06\x24\x02\x00\x00\xbe\x08\x00\x00\x2a\x04\xc1\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x05\x00\x00\x94\x09\x42\x05\x3d\x2a\xee\x18\x3f\x2b\x00\x00\x00\x00\x00\x00\x44\x05\x40\x06\x00\x00\x00\x00\x59\x08\x9e\x09\x00\x00\x46\x01\x48\x02\x1b\x00\x00\x00\xc5\x08\x00\x00\x5b\x3d\x00\x00\x54\x06\xd0\x08\x00\x00\x16\x02\x32\x02\x00\x00\xd5\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19\x00\x00\x00\x00\x00\x00\x00\x27\x02\x00\x00\xdc\x08\x00\x00\xe5\x08\x00\x00\x00\x00\x8d\x08\xcd\xff\x00\x00\x00\x00\xa3\x09\x39\x0d\xb5\x09\x00\x00\x00\x00\x6d\x3a\xb2\x3a\x00\x00\x00\x00\xa2\xff\x15\x0c\xad\x05\x00\x00\x00\x00\xe2\x08\x00\x00\x00\x00\x00\x00\xa5\x03\x00\x00\x00\x00\x10\x03\x00\x00\xb7\x03\xc9\x5a\x00\x00\x00\x00\xe7\x09\xf6\x09\x00\x00\xff\xff\x00\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x34\x03\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\xed\x09\xef\x09\x00\x00\x00\x00\x00\x00\x00\x00\x10\x04\xa2\x01\x00\x00\x9a\xff\x00\x00\xa6\x1a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\x09\x00\x00\x00\x00\x70\x00\x00\x00\x00\x00\x73\x09\xf8\x05\xd2\xff\x00\x00\x00\x00\x93\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x74\x09\x16\x06\x00\x00\x1d\x06\x00\x00\x12\x00\x00\x00\x00\x00\x10\x03\xcf\x03\x66\x04\x00\x00\x00\x00\x00\x00\x1f\x00\xec\x08\x00\x00\x02\x00\xf4\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\xf8\x08\x03\x0a\x07\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x28\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfe\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# "\xc0\xff\xc1\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x85\xfd\x00\x00\x00\x00\xbf\xff\xc0\xff\x00\x00\xf2\xff\x17\xfd\x14\xfd\x11\xfd\x01\xfd\xff\xfc\x00\xfd\x0d\xfd\xfe\xfc\xfd\xfc\xfc\xfc\x0f\xfd\x0e\xfd\x10\xfd\x0c\xfd\x0b\xfd\xfb\xfc\xfa\xfc\xf9\xfc\xf8\xfc\xf7\xfc\xf6\xfc\xf5\xfc\xf4\xfc\xf3\xfc\xf1\xfc\xf2\xfc\x00\x00\x12\xfd\x13\xfd\x00\x00\x8b\xff\x00\x00\xb1\xff\xc2\xff\x8b\xff\xd1\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xaa\xfe\xa9\xfe\x00\x00\x00\x00\xa0\xfe\x99\xfe\x93\xfe\x90\xfe\x8e\xfe\x7c\xfe\x00\x00\x89\xfe\x4d\xfd\x8d\xfe\x46\xfd\x3b\xfd\x3e\xfd\x35\xfd\x88\xfe\x8c\xfe\x21\xfd\x1d\xfd\x72\xfe\x67\xfe\x1b\xfd\x1a\xfd\x1c\xfd\x00\x00\x00\x00\x32\xfd\xa6\xfe\x31\xfd\xa7\xfe\x1f\xfd\xcd\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e\xfd\x38\xfd\x33\xfd\x34\xfd\x3c\xfd\x36\xfd\x37\xfd\x74\xfd\x73\xfe\x74\xfe\x7a\xfe\x00\x00\x1d\xfe\x1c\xfe\x00\x00\xf1\xff\x63\xfd\x56\xfd\x62\xfd\xef\xff\xf0\xff\x25\xfd\x09\xfd\x0a\xfd\x05\xfd\x02\xfd\x61\xfd\xee\xfc\x52\xfd\xeb\xfc\xe8\xfc\x04\xfd\xf0\xfc\xef\xfc\x00\x00\x00\x00\x00\x00\x00\x00\xec\xfc\x03\xfd\xe9\xfc\xed\xfc\x06\xfd\xea\xfc\xdc\xfd\x81\xfd\x16\xfe\x04\xfe\x15\xfe\x00\x00\x00\x00\x05\xfe\xfa\xfd\xf7\xfd\xf5\xfd\xe6\xfd\x00\x00\x00\x00\x86\xfd\x84\xfd\xf2\xfd\xf1\xfd\xf3\xfd\xf4\xfd\xf0\xfd\xe7\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\xaf\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x73\xfd\xe7\xfc\xe6\xfc\xef\xfd\xee\xfd\xe3\xfc\xe2\xfc\xe5\xfc\xe4\xfc\xe1\xfc\xe0\xfc\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xda\xfd\x00\x00\xd8\xfd\x00\x00\x00\x00\x78\xff\x2a\xfe\x00\x00\x00\x00\x13\xfe\x00\x00\x14\xfd\x76\xff\x75\xff\x74\xff\x00\x00\x00\x00\x21\xfe\x21\xfe\x21\xfe\x00\x00\x71\xfd\x00\x00\x00\x00\x94\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x6e\xff\x6d\xff\x6c\xff\x19\xff\x6b\xff\x6a\xff\x36\xfe\x5d\xff\x35\xfe\x3e\xfe\x5c\xff\x39\xfe\x5b\xff\x3d\xfe\x3c\xfe\x3b\xfe\x3a\xfe\x00\x00\x29\xff\x00\x00\x48\xff\x4c\xff\x28\xff\x00\x00\x00\x00\x00\x00\xe0\xfe\xcb\xfe\xd0\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd5\xfc\xd4\xfc\xd3\xfc\xd2\xfc\x00\x00\x00\x00\x85\xff\x00\x00\x00\x00\x00\x00\x00\x00\x8b\xff\xc3\xff\x8b\xff\x00\x00\x88\xff\x00\x00\x00\x00\x00\x00\x83\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x66\xfd\x5d\xfd\x67\xfd\x19\xfd\x5f\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xd1\xfe\x00\x00\x69\xfd\x00\x00\xcc\xfe\x00\x00\x00\x00\xe1\xfe\xde\xfe\x00\x00\x5c\xfd\x00\x00\x00\x00\x00\x00\x68\xff\x00\x00\x00\x00\x00\x00\x99\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\xff\x4b\xff\x4a\xff\x6d\xfe\x00\x00\x64\xfe\x00\x00\x1c\xff\x00\x00\x2b\xfd\x00\x00\x2a\xfd\x2c\xfd\x00\x00\x00\x00\x00\x00\x19\xff\x00\x00\x93\xfd\xcf\xfd\x16\xfe\x00\x00\x00\x00\x28\xfd\x00\x00\x27\xfd\x29\xfd\x23\xfd\x07\xfd\x00\x00\x08\xfd\x52\xfd\x00\x00\x00\x00\xd6\xfc\x04\xfd\x5a\xfd\xda\xfc\x00\x00\x5c\xfd\xb2\xfe\x00\x00\x72\xfd\x70\xfd\x6e\xfd\x6d\xfd\x6a\xfd\x00\x00\x00\x00\x00\x00\x20\xfe\x00\x00\x00\x00\x00\x00\x00\x00\xe8\xfe\x00\x00\xeb\xfe\xeb\xfe\x00\x00\x00\x00\x00\x00\x77\xff\xe2\xfd\x50\xfd\xe3\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xff\x6f\xff\x00\x00\x00\x00\x00\x00\xe4\xfd\xe5\xfd\x00\x00\xd5\xfd\xf4\xfd\x00\x00\x00\x00\x07\xfd\x08\xfd\x00\x00\x58\xfd\x00\x00\xae\xfd\xad\xfd\x00\x00\xc3\xfd\x00\x00\xc2\xfd\x55\xfd\x91\xfd\x0b\xfe\xf8\xfd\x90\xfd\x8d\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xfb\xfd\x83\xfd\x87\xfd\x87\xfd\x00\x00\x09\xfe\x80\xfd\x01\xfe\x00\x00\x0d\xfe\x98\xfd\x00\x00\x00\x00\x0a\xfe\x00\x00\x00\x00\x00\x00\x7e\xfd\xfd\xfd\x00\x00\x08\xfe\x03\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\x79\xfe\x65\xfd\x64\xfd\x8b\xfe\x8a\xfe\x76\xfe\x2e\xfd\x6d\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x6c\xfe\x00\x00\x00\x00\x00\x00\x83\xfe\x00\x00\x3e\xfd\x00\x00\x00\x00\xa6\xfe\x00\x00\x85\xfe\x00\x00\x48\xfd\x00\x00\x49\xfd\x00\x00\x49\xfe\x47\xfe\xce\xfc\x00\x00\xa4\xfe\xa5\xfe\x00\x00\x67\xfe\x66\xfe\x00\x00\x00\x00\x8f\xfe\x00\x00\x00\x00\xa8\xfe\x87\xfe\x00\x00\x00\x00\xe9\xff\x00\x00\x00\x00\xae\xff\x88\xff\xad\xff\x00\x00\x00\x00\xbc\xff\xdd\xfc\xdc\xfc\xbc\xff\xac\xff\xaa\xff\xab\xff\x8c\xff\xed\xff\xde\xfc\xdf\xfc\xea\xff\x00\x00\xd9\xff\xdd\xff\xda\xff\xdc\xff\xdb\xff\xde\xff\xec\xff\xa2\xfe\x98\xfe\xa1\xfe\x00\x00\x68\xfe\x00\x00\x00\x00\xad\xfe\x00\x00\x00\x00\x86\xfe\x80\xfe\x00\x00\x7f\xfe\x47\xfd\x44\xfd\x4a\xfd\x4c\xfd\xdb\xfc\x45\xfd\x00\x00\x7e\xfe\x00\x00\x4b\xfd\x81\xfe\x82\xfe\x00\x00\x00\x00\x20\xfd\x3d\xfd\x00\x00\x00\x00\x00\x00\x32\xfd\x31\xfd\xa7\xfe\x1f\xfd\x33\xfd\x34\xfd\x37\xfd\x6c\xfe\x00\x00\x6e\xfe\x7b\xfe\xee\xff\x59\xfd\x60\xfd\x15\xfd\x57\xfd\x51\xfd\x24\xfd\x17\xfe\x18\xfe\x19\xfe\x1a\xfe\x1b\xfe\xb0\xfe\x14\xfe\xfc\xfd\x00\x00\x7f\xfd\x7c\xfd\x79\xfd\x7b\xfd\x82\xfd\xf9\xfd\x00\x00\x00\x00\x00\x00\xa9\xfd\xa7\xfd\x99\xfd\x96\xfd\x00\x00\x02\xfe\x00\x00\x00\x00\x00\x00\x88\xfd\x00\x00\x00\x00\x00\xfe\xff\xfd\x00\x00\x8f\xfd\x0f\xfe\x00\x00\x00\x00\x8d\xfd\x00\x00\x00\x00\xe9\xfd\xc1\xfd\x00\x00\x00\x00\xe8\xfd\x00\x00\x00\x00\x00\x00\x16\xfd\xc5\xfd\xc9\xfd\xea\xfd\xcb\xfd\xc4\xfd\xca\xfd\xeb\xfd\x00\x00\xe1\xfd\xde\xfd\xdf\xfd\xd0\xfd\xd1\xfd\x00\x00\x00\x00\xdd\xfd\xe0\xfd\xd9\xfd\xd7\xfd\x4e\xfd\x00\x00\x00\x00\x4f\xfd\x2b\xfe\x2f\xfd\x72\xff\x30\xfd\x54\xfd\x00\x00\x2d\xfe\xaf\xfe\x00\x00\x9c\xfe\x97\xfe\x00\x00\x67\xfe\x00\x00\x00\x00\x34\xfe\xec\xfe\xb4\xfe\x33\xfe\x00\x00\x76\xfd\xf2\xfd\x00\x00\x00\x00\x00\x00\x71\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x27\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd8\xfc\xd7\xfc\x16\xfd\xcd\xfd\xec\xfd\xed\xfd\xce\xfd\x00\x00\x00\x00\x00\x00\x27\xff\xb3\xfe\x00\x00\x97\xfe\x00\x00\x67\xfe\x12\xfe\x37\xfe\xe4\xfe\x2f\xfe\x00\x00\x00\x00\x00\x00\xf9\xfe\x5f\xfe\x25\xff\x00\x00\x4c\xff\x4d\xff\x4e\xff\x50\xff\x4f\xff\xef\xfe\x16\xff\x00\x00\x23\xff\x53\xff\x00\x00\x00\x00\x00\x00\xbe\xfe\xbd\xfe\xbc\xfe\xbb\xfe\xba\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x0d\xff\x0a\xff\x00\x00\x00\x00\x00\x00\xd8\xfe\xdd\xfe\x00\x00\x65\xff\xe2\xfe\xca\xfe\xc5\xfe\xc9\xfe\x67\xff\xcd\xfe\x00\x00\xcf\xfe\x66\xff\xd2\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x63\xff\x38\xfe\x86\xff\x7f\xff\x84\xff\xbc\xff\xbc\xff\xb8\xff\xb7\xff\xb4\xff\x6f\xff\xb9\xff\x8a\xff\xb5\xff\xb6\xff\xa8\xff\x00\x00\x00\x00\xa8\xff\x81\xff\x80\xff\x61\xff\x00\x00\x00\x00\x5e\xff\x62\xff\x00\x00\xc4\xfe\xc2\xfe\x00\x00\xd3\xfe\x68\xfd\xce\xfe\x00\x00\xc6\xfe\xe3\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x0f\xff\x10\xff\x00\x00\x08\xff\x09\xff\x04\xff\x00\x00\x0c\xff\x00\x00\xc0\xfe\x00\x00\xb8\xfe\xb7\xfe\xb9\xfe\x00\x00\xbf\xfe\x59\xff\x00\x00\x47\xff\x00\x00\x00\x00\x17\xff\x15\xff\x14\xff\x11\xff\x12\xff\x54\xff\x00\x00\x00\x00\x69\xff\x55\xff\x00\x00\x63\xfe\x61\xfe\x00\x00\x5a\xff\x00\x00\x1d\xff\x00\x00\xe4\xfe\x31\xfe\x30\xfe\x00\x00\x00\x00\x00\x00\x96\xfe\x00\x00\x00\x00\x5a\xfe\x45\xfe\x00\x00\x00\x00\x27\xff\x1a\xff\x00\x00\xcc\xfd\xc8\xfd\xd9\xfc\x26\xfd\x22\xfd\x5b\xfd\xb1\xfe\x29\xfe\x6f\xfd\x6c\xfd\x5e\xfd\x6b\xfd\x26\xfe\x00\x00\x1f\xfe\x00\x00\x00\x00\x23\xfe\x28\xfe\xe7\xfe\x77\xfd\xea\xfe\xed\xfe\x00\x00\xe6\xfe\xe9\xfe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd3\xfd\xd2\xfd\x71\xff\xd4\xfd\xd6\xfd\xdb\xfd\xc7\xfd\xc6\xfd\xcf\xfd\xbb\xfd\xaa\xfd\xba\xfd\xb8\xfd\xb5\xfd\xb4\xfd\x00\x00\xac\xfd\xcf\xfd\xbd\xfd\xbf\xfd\xbc\xfd\x00\x00\x8e\xfd\x00\x00\xa2\xfd\x9e\xfd\x00\x00\xa3\xfd\x00\x00\x00\x00\xa4\xfd\x00\x00\x06\xfe\x8c\xfd\x89\xfd\x8b\xfd\x07\xfe\x10\xfe\x00\x00\x00\x00\x00\x00\x97\xfd\x0c\xfe\x00\x00\x00\x00\xf6\xfd\x77\xfe\x18\xfd\x00\x00\x2d\xfd\x6b\xfe\x6a\xfe\x69\xfe\x00\x00\x5d\xfe\x00\x00\x00\x00\xcf\xfc\x00\x00\xa3\xfe\x00\x00\x00\x00\x00\x00\xeb\xff\xa8\xff\xa8\xff\x00\x00\xa1\xff\x00\x00\xe8\xff\xc1\xff\xc1\xff\xd8\xff\x00\x00\xcf\xfc\xd0\xfc\xcd\xfc\x75\xfe\x7d\xfe\x84\xfe\x00\x00\x7d\xfd\x7a\xfd\x95\xfd\xa8\xfd\x01\xfe\x8a\xfd\x00\x00\xa6\xfd\xa1\xfd\x9d\xfd\xe4\xfe\x9a\xfd\x00\x00\x9f\xfd\xa5\xfd\x11\xfe\xc0\xfd\xb3\xfd\xf6\xfc\x00\x00\x00\x00\x00\x00\x70\xff\x8d\xff\x73\xff\x9e\xfe\x95\xfe\x9d\xfe\x00\x00\xae\xfe\x2c\xfe\x75\xfd\xee\xfe\x78\xfd\x00\x00\xac\xfe\x00\x00\x1e\xfe\x00\x00\x1b\xff\x5a\xfe\x45\xfe\x26\xff\xcd\xfc\x57\xff\x44\xfe\x42\xfe\x48\xff\x45\xfe\x00\x00\x00\x00\x9d\xfe\x00\x00\xe5\xfe\x32\xfe\x00\x00\xfa\xfe\xfd\xfe\xfd\xfe\x5e\xfe\x5f\xfe\x5f\xfe\x24\xff\x18\xff\xf0\xfe\xf3\xfe\xf3\xfe\x13\xff\x21\xff\x22\xff\x42\xff\x00\x00\x38\xff\x00\x00\x00\x00\xc1\xfe\x53\xfd\x00\x00\x0b\xff\x0e\xff\x00\x00\x00\x00\xd7\xfe\xd5\xfe\x00\x00\x00\x00\xdc\xfe\xda\xfe\x00\x00\xc8\xfe\x00\x00\xc3\xfe\x00\x00\x64\xff\x00\x00\x00\x00\x82\xff\x00\x00\x00\x00\x00\x00\x00\x00\x89\xff\x8e\xff\x00\x00\xbe\xff\xbd\xff\x00\x00\x7d\xff\x5f\xff\x60\xff\xc7\xfe\xdb\xfe\x00\x00\x00\x00\xd6\xfe\xd9\xfe\xeb\xfe\xeb\xfe\x07\xff\xb5\xfe\x00\x00\x46\xff\x00\x00\x58\xff\x00\x00\xf8\xfe\x19\xff\xf4\xfe\x00\x00\xf7\xfe\x29\xff\x30\xff\x00\x00\x62\xfe\x60\xfe\x03\xff\xfe\xfe\x00\x00\x02\xff\x32\xff\x00\x00\x00\x00\x00\x00\x2e\xfe\x9f\xfe\x94\xfe\x57\xfe\x57\xfe\x56\xff\x00\x00\x43\xfe\x53\xfe\x51\xfe\x4d\xfe\x52\xff\x45\xfe\x24\xfe\x25\xfe\x00\x00\xab\xfd\xb7\xfd\xb6\xfd\xb9\xfd\x00\x00\x00\x00\x00\x00\xbe\xfd\xa0\xfd\x9b\xfd\x9c\xfd\x00\x00\x00\x00\x78\xfe\x48\xfe\x46\xfe\x65\xfe\x00\x00\xcc\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\xff\xa3\xff\xa1\xff\x9e\xff\x9f\xff\xa0\xff\x00\x00\xb2\xff\x8b\xff\x8b\xff\xa2\xff\xa1\xff\x9a\xff\x92\xff\x8f\xff\x43\xfd\x90\xff\x00\x00\x00\x00\x00\x00\x00\x00\xa1\xff\xa9\xff\xb3\xff\xd0\xff\xcd\xff\xd7\xff\xe7\xff\xf1\xfc\x00\x00\x00\x00\xcf\xff\x00\x00\x00\x00\xb2\xfd\xb1\xfd\x00\x00\xab\xfe\x51\xff\x00\x00\x67\xfe\x00\x00\x3a\xfd\x41\xfe\x00\x00\x00\x00\x58\xfe\x55\xfe\x00\x00\x00\x00\x00\x00\xfc\xfe\xff\xfe\x34\xff\x20\xff\x00\x00\x00\x00\x00\x00\x00\x00\x31\xff\xfb\xfe\xf2\xfe\xf5\xfe\x00\x00\x2f\xff\xf1\xfe\x00\x00\x19\xff\x41\xff\x39\xff\x39\xff\x00\x00\xb6\xfe\x00\x00\x00\x00\x00\x00\xdf\xfe\x7b\xff\x00\x00\xc5\xff\x8b\xff\x8b\xff\xc4\xff\x00\x00\x00\x00\x7e\xff\x87\xff\x7c\xff\x00\x00\xa1\xff\x00\x00\x06\xff\x05\xff\x45\xff\x43\xff\x00\x00\x3a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x27\xff\x2e\xff\xf6\xfe\x25\xff\x00\x00\x20\xff\x33\xff\x36\xff\x00\x00\x00\x00\x00\xff\x5c\xfe\x00\x00\x00\x00\x57\xfe\x5b\xfe\x70\xfe\x97\xfe\x00\x00\x40\xfe\x39\xfd\xcf\xfc\x00\x00\x00\x00\x4c\xfe\x91\xfe\xcf\xfc\x00\x00\x00\x00\x0e\xfe\xc8\xff\xc9\xff\xc6\xff\x00\x00\xc7\xff\x00\x00\xce\xff\xa7\xff\x00\x00\x00\x00\x00\x00\x00\x00\x9b\xff\x00\x00\x91\xff\x9c\xff\x9d\xff\x98\xff\xa4\xff\xaf\xff\xb0\xff\xa1\xff\x00\x00\x97\xff\x95\xff\x94\xff\x93\xff\x42\xfd\x41\xfd\x3f\xfd\x40\xfd\x00\x00\xd3\xff\xd1\xff\x00\x00\xe3\xff\x00\x00\xa8\xff\xa8\xff\x00\x00\xb0\xfd\x4f\xfe\x92\xfe\x00\x00\x00\x00\x4e\xfe\xcd\xfc\x3f\xfe\x00\x00\x59\xfe\x54\xfe\x56\xfe\x00\x00\x88\xfe\x00\x00\x1f\xff\x35\xff\x00\x00\x01\xff\x37\xff\x5a\xfe\x45\xfe\x27\xff\x3e\xff\x40\xff\x3b\xff\x3d\xff\x3f\xff\x44\xff\xd4\xfe\x00\x00\xa1\xff\xbb\xff\xba\xff\x00\x00\x7a\xff\x3c\xff\x5a\xfe\x45\xfe\x2d\xff\x45\xfe\x88\xfe\x00\x00\x6f\xfe\x52\xfe\x4c\xfe\xcf\xfc\x4b\xfe\xfe\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xff\xe4\xff\x00\x00\xd6\xff\xd4\xff\x00\x00\x99\xff\xa5\xff\xa3\xff\x96\xff\xd5\xff\xd2\xff\xe5\xff\x00\x00\x00\x00\xe2\xff\x00\x00\x00\x00\x00\x00\x50\xfe\x1e\xff\x2b\xff\x2c\xff\x45\xfe\x79\xff\x2a\xff\xca\xff\xcb\xff\x00\x00\x00\x00\xe1\xff\xdf\xff\xe0\xff"#--happyCheck :: HappyAddr-happyCheck = HappyA# "\xff\xff\x00\x00\x0d\x00\x3a\x00\x05\x00\x06\x00\x23\x00\x24\x00\x06\x00\x4f\x00\x0f\x00\x10\x00\x0f\x00\x10\x00\x13\x00\x11\x00\x13\x00\x13\x00\x4f\x00\x10\x00\x0c\x00\x0d\x00\x13\x00\x12\x00\x13\x00\x14\x00\x13\x00\x14\x00\x4f\x00\x18\x00\x08\x00\x09\x00\x0a\x00\x4f\x00\x1b\x00\x04\x00\x1d\x00\x74\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\x44\x00\x7d\x00\x21\x00\x22\x00\x23\x00\x24\x00\x21\x00\x22\x00\x23\x00\x24\x00\xa4\x00\x21\x00\x22\x00\x23\x00\x24\x00\xa1\x00\x5c\x00\x22\x00\x23\x00\x24\x00\x7d\x00\x5c\x00\x23\x00\x24\x00\x3b\x00\x3c\x00\x23\x00\x24\x00\x00\x00\x5d\x00\x7c\x00\x7d\x00\x13\x00\x01\x00\x44\x00\xa8\x00\xa9\x00\xa7\x00\xa8\x00\xa9\x00\xa2\x00\x00\x00\xcb\x00\xcb\x00\x45\x00\x35\x00\x13\x00\x3b\x00\x3c\x00\xa2\x00\xde\x00\x58\x00\xa3\x00\xa4\x00\x11\x00\x0a\x00\x19\x00\x56\x00\x51\x00\xa2\x00\x50\x00\x51\x00\x64\x00\x21\x01\xa2\x00\x34\x00\x6b\x00\x25\x01\x11\x00\x13\x00\x25\x00\x07\x01\x08\x01\x19\x00\x13\x00\x2a\x00\x2b\x00\x27\x00\x28\x00\x29\x00\x2a\x00\x2b\x00\x54\x00\x11\x00\x29\x00\x2a\x00\x2b\x00\x71\x00\x72\x00\x75\x00\x4e\x00\x4d\x00\x81\x00\x5d\x00\x4d\x00\x4f\x00\x77\x00\x89\x00\x56\x00\x89\x00\x80\x00\x25\x01\x34\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x34\x00\x35\x00\x8a\x00\x3e\x00\x3f\x00\x63\x00\xf4\x00\xf5\x00\x54\x00\x4d\x00\x89\x00\xf9\x00\x23\x01\xfb\x00\xfc\x00\x47\x00\x71\x00\x72\x00\x54\x00\x63\x00\x71\x00\x0c\x00\x89\x00\x66\x00\x73\x00\x25\x01\x25\x01\x27\x01\x89\x00\x78\x00\x47\x00\xb3\x00\x72\x00\x67\x00\x1f\x01\x28\x01\x66\x00\x13\x01\x80\x00\xfd\x00\x16\x01\x2e\x01\x75\x00\x89\x00\x13\x01\x6b\x00\x1c\x01\x16\x01\x6b\x00\x1f\x01\x56\x00\x09\x01\x0a\x01\x1c\x01\x5a\x00\x89\x00\x28\x01\x89\x00\xc8\x00\x28\x01\x80\x00\x51\x00\x2e\x01\x13\x01\x54\x00\x2e\x01\x16\x01\x28\x01\x1a\x01\x1b\x01\x5b\x00\x1d\x01\x1c\x01\x2e\x01\x13\x01\x21\x01\x28\x01\x16\x01\x28\x01\x98\x00\x4d\x00\xc8\x00\x2e\x01\x1c\x01\x2e\x01\x89\x00\x28\x01\x82\x00\x82\x00\xf7\x00\xf8\x00\x28\x01\x2e\x01\xfb\x00\xfc\x00\x16\x01\xfe\x00\x2e\x01\x4d\x00\x12\x01\x16\x01\x1c\x01\x8a\x00\x00\x00\x13\x01\x98\x00\x1c\x01\x16\x01\x28\x01\x1c\x01\x2a\x01\x2b\x01\x0e\x01\x1c\x01\x58\x00\x7e\x00\x71\x00\x13\x00\x14\x01\x15\x01\x16\x01\x17\x01\x24\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x24\x01\x12\x01\x71\x00\x24\x01\x2c\x01\x01\x00\x2c\x01\x2c\x01\x63\x00\x24\x01\x12\x01\x1c\x01\x2c\x01\x16\x01\x2c\x01\x1c\x01\x2c\x01\xfd\x00\x34\x00\x1c\x01\x1c\x01\x73\x00\x74\x00\x81\x00\x1c\x01\x15\x00\x28\x01\x1c\x01\x2a\x01\x2b\x01\x28\x01\x1c\x01\x2a\x01\x2b\x01\x1c\x01\x28\x01\x13\x01\x2a\x01\x2b\x01\x16\x01\x28\x01\x00\x00\x2a\x01\x2b\x01\x28\x01\x1c\x01\x2a\x01\x2b\x01\x28\x01\x16\x01\x2a\x01\x2b\x01\x02\x01\x21\x01\x04\x01\x1c\x01\x06\x01\x02\x01\x00\x00\x04\x01\x00\x00\x06\x01\x02\x01\x63\x00\x04\x01\x65\x00\x06\x01\x10\x01\x50\x00\x12\x01\x14\x01\x15\x01\x16\x01\x66\x00\x00\x00\x14\x01\x15\x01\x16\x01\x1c\x01\x1c\x01\x14\x01\x15\x01\x16\x01\x1c\x01\x71\x00\x39\x00\x00\x00\x00\x00\x1c\x01\x3d\x00\x3e\x00\x3f\x00\x40\x00\x10\x01\x00\x00\x12\x01\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x13\x01\x13\x01\x72\x00\x16\x01\x16\x01\x1c\x01\x4e\x00\x48\x00\x49\x00\x1c\x01\x1c\x01\xfe\x00\x4f\x00\x55\x00\x56\x00\x19\x00\x75\x00\x76\x00\x5a\x00\x97\x00\x98\x00\x0c\x00\x50\x00\x5f\x00\x0b\x01\x16\x01\x0d\x01\x0e\x01\x19\x00\x2d\x00\x2e\x00\x1c\x01\x00\x00\x54\x00\x1f\x01\x2d\x00\x17\x01\x1c\x00\x19\x01\x1a\x01\x1b\x01\x6c\x00\x1d\x01\x66\x00\x4e\x00\x20\x01\x21\x01\x72\x00\x2d\x00\x79\x00\xf4\x00\xf5\x00\x56\x00\x78\x00\x71\x00\xf9\x00\x72\x00\xfb\x00\xfc\x00\x6e\x00\x66\x00\x68\x00\x66\x00\x72\x00\x54\x00\x00\x00\x16\x01\x84\x00\x85\x00\x86\x00\x67\x00\x71\x00\x1c\x01\x71\x00\x8b\x00\x1f\x01\x8d\x00\x4e\x00\x8f\x00\x90\x00\x91\x00\x13\x01\x51\x00\x54\x00\x16\x01\x54\x00\x81\x00\x56\x00\x66\x00\x66\x00\x1c\x01\x5a\x00\x4e\x00\x1f\x01\x72\x00\x80\x00\x66\x00\x14\x00\x54\x00\x71\x00\x71\x00\xad\x00\xae\x00\xaf\x00\x84\x00\x85\x00\x86\x00\x71\x00\xb4\x00\x1a\x01\x1b\x01\xb7\x00\x1d\x01\x72\x00\xba\x00\xbb\x00\x90\x00\x91\x00\xb7\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x39\x00\x31\x00\x32\x00\x72\x00\x3d\x00\x3e\x00\x3f\x00\x40\x00\x9b\x00\x66\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x8a\x00\x10\x01\x54\x00\x12\x01\xf4\x00\xf5\x00\x71\x00\x4e\x00\x1e\x00\xf9\x00\x1e\x00\xfb\x00\xfc\x00\x1c\x01\x55\x00\x56\x00\xb7\x00\x50\x00\x64\x00\x5a\x00\x84\x00\x85\x00\x86\x00\x2d\x00\x5f\x00\x2d\x00\xed\x00\xee\x00\x66\x00\x19\x00\x8e\x00\x97\x00\x98\x00\x91\x00\x1f\x01\x13\x01\xf7\x00\xf8\x00\x16\x01\x71\x00\xfb\x00\xfc\x00\x97\x00\x98\x00\x1c\x01\x6c\x00\x33\x00\x1f\x01\x54\x00\x2d\x00\x79\x00\x72\x00\x00\x01\x01\x01\xa6\x00\x03\x01\x04\x01\x19\x00\x06\x01\x07\x01\x08\x01\x97\x00\x98\x00\x9b\x00\x13\x01\x14\x01\x15\x01\x16\x01\x10\x01\x11\x01\x12\x01\xb7\x00\x6c\x00\x1c\x01\x5a\x00\x1e\x01\x1f\x01\x2d\x00\x72\x00\x22\x01\x1c\x01\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\x00\x01\x01\x01\x51\x00\x03\x01\x04\x01\x54\x00\x06\x01\x07\x01\x08\x01\xe9\x00\xea\x00\x14\x00\x64\x00\xad\x00\xae\x00\xaf\x00\x10\x01\x11\x01\x12\x01\x50\x00\xb4\x00\x54\x00\x4d\x00\xb7\x00\x39\x00\x71\x00\xba\x00\xbb\x00\x1c\x01\x68\x00\x1f\x01\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x48\x00\x49\x00\x72\x00\x31\x00\x32\x00\x76\x00\x1e\x00\x4d\x00\x4e\x00\x4d\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x72\x00\x14\x01\x15\x01\x16\x01\x00\x01\x01\x01\x5a\x00\x2d\x00\x04\x01\x1c\x01\x06\x01\x5f\x00\x10\x01\x1e\x00\x12\x01\x58\x00\x64\x00\x65\x00\x1a\x00\x5c\x00\x10\x01\x68\x00\x12\x01\x10\x01\x1c\x01\x12\x01\xed\x00\xee\x00\x2d\x00\x97\x00\x98\x00\x72\x00\x1c\x01\x4f\x00\x1f\x01\x1c\x01\xf7\x00\xf8\x00\x2e\x00\x2f\x00\xfb\x00\xfc\x00\x10\x01\x64\x00\x12\x01\x1f\x00\x84\x00\x85\x00\x86\x00\x89\x00\x64\x00\x8b\x00\x8c\x00\x8b\x00\x1c\x01\x8d\x00\x71\x00\x8f\x00\x90\x00\x91\x00\x2e\x00\x2f\x00\x6c\x00\x71\x00\x13\x01\x14\x01\x15\x01\x16\x01\x72\x00\x68\x00\x04\x01\x6c\x00\x06\x01\x1c\x01\x78\x00\x1e\x01\x1f\x01\x72\x00\x7c\x00\x22\x01\x84\x00\x85\x00\x86\x00\x9b\x00\x12\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x91\x00\x1c\x01\x68\x00\xb4\x00\xb7\x00\x55\x00\xb7\x00\x39\x00\x4f\x00\xba\x00\xbb\x00\x10\x01\x72\x00\x12\x01\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x5b\x00\x5c\x00\x63\x00\x1c\x01\xf4\x00\xf5\x00\x61\x00\x4d\x00\x4e\x00\xf9\x00\x55\x00\xfb\x00\xfc\x00\x64\x00\x64\x00\x5b\x00\x5c\x00\x6c\x00\xb7\x00\x9b\x00\x5a\x00\x61\x00\x10\x01\x72\x00\x12\x01\x5f\x00\x71\x00\x71\x00\x77\x00\x78\x00\x64\x00\x65\x00\x7b\x00\x7c\x00\x1c\x01\x13\x01\x57\x00\x10\x01\x16\x01\x12\x01\xed\x00\xee\x00\x12\x01\x77\x00\x1c\x01\x80\x00\x64\x00\x1f\x01\x80\x00\x1c\x01\xf7\x00\xf8\x00\x1c\x01\x64\x00\xfb\x00\xfc\x00\x6c\x00\x00\x01\x01\x01\x71\x00\x03\x01\x04\x01\x72\x00\x06\x01\x07\x01\x08\x01\x71\x00\x9f\x00\xa0\x00\xa1\x00\x6c\x00\x6b\x00\x81\x00\x10\x01\x11\x01\x12\x01\x72\x00\x9b\x00\x13\x01\x14\x01\x15\x01\x16\x01\x76\x00\x6b\x00\x56\x00\x1c\x01\x7a\x00\x1c\x01\x5a\x00\x1e\x01\x1f\x01\x00\x01\x01\x01\x22\x01\x76\x00\x04\x01\x72\x00\x06\x01\x7a\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x10\x01\x72\x00\x12\x01\xb4\x00\x76\x00\x28\x01\xb7\x00\x39\x00\x7a\x00\xba\x00\xbb\x00\x2e\x01\x1c\x01\x67\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x64\x00\x49\x00\x9b\x00\x4f\x00\x50\x00\x6e\x00\x84\x00\x85\x00\x86\x00\x72\x00\x63\x00\x6b\x00\x65\x00\x71\x00\x64\x00\x5b\x00\x5c\x00\x5b\x00\x5c\x00\x91\x00\x5a\x00\x61\x00\x76\x00\x61\x00\x4f\x00\x5f\x00\x7a\x00\x71\x00\x6b\x00\x28\x01\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x68\x00\x2e\x01\x5b\x00\x5c\x00\x23\x00\x73\x00\xed\x00\xee\x00\x61\x00\x77\x00\x78\x00\x77\x00\x16\x01\x7b\x00\x7c\x00\x7b\x00\xf7\x00\xf8\x00\x1c\x01\x6c\x00\xfb\x00\xfc\x00\x63\x00\xb7\x00\x65\x00\x72\x00\x84\x00\x85\x00\x86\x00\x80\x00\x77\x00\x78\x00\x18\x00\x8b\x00\x1f\x01\x8d\x00\x67\x00\x8f\x00\x90\x00\x91\x00\x6b\x00\x9b\x00\x6d\x00\x28\x01\x13\x01\x14\x01\x15\x01\x16\x01\x16\x01\x2e\x01\x39\x00\x76\x00\x30\x00\x1c\x01\x1c\x01\x1e\x01\x1f\x01\x3e\x00\x3f\x00\x22\x01\x84\x00\x85\x00\x86\x00\x3b\x00\x3c\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x91\x00\x34\x00\x13\x01\xb4\x00\xb7\x00\x16\x01\xb7\x00\x39\x00\x6e\x00\xba\x00\xbb\x00\x1c\x01\x72\x00\x9b\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xfd\x00\x9b\x00\x4f\x00\x00\x01\x01\x01\x1a\x01\x1b\x01\x04\x01\x1d\x01\x06\x01\x01\x01\x58\x00\x21\x01\x04\x01\x5b\x00\x06\x01\x25\x01\x13\x00\xb7\x00\x10\x01\x5a\x00\x12\x01\x67\x00\x51\x00\x64\x00\x5f\x00\x6b\x00\x55\x00\x6d\x00\x67\x00\x71\x00\x1c\x01\x71\x00\x6b\x00\x68\x00\x6d\x00\x21\x01\x76\x00\xeb\x00\xec\x00\xed\x00\xee\x00\x77\x00\x78\x00\x76\x00\x6e\x00\x7b\x00\x7c\x00\x7a\x00\x72\x00\xf7\x00\xf8\x00\x50\x00\x51\x00\xfb\x00\xfc\x00\x89\x00\x00\x01\x01\x01\x1f\x00\x03\x01\x04\x01\x6e\x00\x06\x01\x07\x01\x08\x01\x72\x00\x9f\x00\xa0\x00\xa1\x00\x4d\x00\x20\x01\x21\x01\x10\x01\x11\x01\x12\x01\x25\x01\x4d\x00\x13\x01\x14\x01\x15\x01\x16\x01\x63\x00\x01\x01\x65\x00\x1c\x01\x04\x01\x1c\x01\x06\x01\x1e\x01\x1f\x01\x00\x01\x01\x01\x22\x01\x76\x00\x04\x01\x51\x00\x06\x01\x7a\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x10\x01\x4d\x00\x12\x01\xb4\x00\x4d\x00\x51\x00\xb7\x00\x39\x00\x51\x00\xba\x00\xbb\x00\x63\x00\x1c\x01\x65\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x76\x00\x49\x00\x13\x01\x29\x01\x4a\x00\x16\x01\x67\x00\x2d\x01\x84\x00\x85\x00\x86\x00\x1c\x01\xe8\x00\xe9\x00\xea\x00\x14\x01\x15\x01\x16\x01\x8e\x00\x72\x00\x5a\x00\x91\x00\x50\x00\x1c\x01\x76\x00\x5f\x00\x60\x00\x61\x00\x7a\x00\x51\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x84\x00\x85\x00\x86\x00\x56\x00\xeb\x00\xec\x00\xed\x00\xee\x00\x8c\x00\x8d\x00\x29\x01\x8f\x00\x90\x00\x91\x00\x2d\x01\x93\x00\xf7\x00\xf8\x00\x3e\x00\x3f\x00\xfb\x00\xfc\x00\x14\x01\x15\x01\x16\x01\xb7\x00\x84\x00\x85\x00\x86\x00\x63\x00\x1c\x01\x65\x00\x29\x01\x8b\x00\x1f\x01\x8d\x00\x2d\x01\x8f\x00\x90\x00\x91\x00\x14\x01\x15\x01\x16\x01\x28\x01\x13\x01\x14\x01\x15\x01\x16\x01\x1c\x01\x2e\x01\x29\x01\xb7\x00\x4d\x00\x1c\x01\x2d\x01\x1e\x01\x1f\x01\x50\x00\x51\x00\x22\x01\x84\x00\x85\x00\x86\x00\x50\x00\x51\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x91\x00\x29\x01\x4d\x00\xb4\x00\xb7\x00\x2d\x01\xb7\x00\x39\x00\x11\x00\xba\x00\xbb\x00\xb1\x00\xb2\x00\xb3\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x48\x00\x49\x00\x4a\x00\x4b\x00\x4a\x00\x00\x01\x01\x01\x15\x01\x16\x01\x04\x01\x63\x00\x06\x01\x65\x00\x63\x00\x1c\x01\x65\x00\x1e\x01\x1f\x01\xb7\x00\x4d\x00\x5a\x00\x10\x01\x63\x00\x12\x01\x65\x00\x5f\x00\x60\x00\x61\x00\xb1\x00\xb2\x00\xb3\x00\x00\x01\x01\x01\x1c\x01\x03\x01\x04\x01\x16\x01\x06\x01\x07\x01\x08\x01\xed\x00\xee\x00\x1c\x01\x54\x00\x1e\x01\x1f\x01\x4d\x00\x10\x01\x11\x01\x12\x01\xf7\x00\xf8\x00\x02\x00\x03\x00\xfb\x00\xfc\x00\x47\x00\x00\x01\x01\x01\x1c\x01\x03\x01\x04\x01\x5a\x00\x06\x01\x07\x01\x08\x01\x02\x00\x03\x00\x14\x01\x15\x01\x16\x01\x69\x00\x6a\x00\x10\x01\x11\x01\x12\x01\x1c\x01\x80\x00\x13\x01\x14\x01\x15\x01\x16\x01\xda\x00\xdb\x00\xdc\x00\x1c\x01\xde\x00\x1c\x01\x56\x00\x1e\x01\x1f\x01\x00\x01\x01\x01\x22\x01\x54\x00\x04\x01\x56\x00\x06\x01\x6c\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x10\x01\x6c\x00\x12\x01\xb4\x00\x69\x00\x6a\x00\xb7\x00\x39\x00\x6c\x00\xba\x00\xbb\x00\x63\x00\x1c\x01\x65\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x67\x00\x49\x00\x69\x00\x63\x00\x6b\x00\x65\x00\x6d\x00\x4d\x00\x4e\x00\xf7\x00\xf8\x00\xb5\x00\xb6\x00\xfb\x00\xfc\x00\x76\x00\x6c\x00\x15\x01\x16\x01\x7a\x00\x5a\x00\x14\x01\x15\x01\x16\x01\x1c\x01\x5f\x00\x1e\x01\x1f\x01\x6c\x00\x1c\x01\x64\x00\x81\x00\xb5\x00\xb6\x00\x84\x00\x85\x00\x86\x00\x50\x00\x88\x00\x89\x00\xed\x00\xee\x00\x8c\x00\x8d\x00\x54\x00\x8f\x00\x90\x00\x91\x00\x1e\x01\x1f\x01\xf7\x00\xf8\x00\xb5\x00\xb6\x00\xfb\x00\xfc\x00\x14\x01\x15\x01\x16\x01\x72\x00\x84\x00\x85\x00\x86\x00\xdc\x00\x1c\x01\xde\x00\x63\x00\x8b\x00\x65\x00\x8d\x00\x4d\x00\x8f\x00\x90\x00\x91\x00\x14\x01\x15\x01\x16\x01\x72\x00\x13\x01\x14\x01\x15\x01\x16\x01\x1c\x01\x6c\x00\x6d\x00\xb7\x00\x63\x00\x1c\x01\x65\x00\x1e\x01\x1f\x01\x6e\x00\x6f\x00\x22\x01\x19\x01\x1a\x01\x1b\x01\x0d\x00\x1d\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x14\x01\x15\x01\x16\x01\xb4\x00\xb7\x00\x68\x00\xb7\x00\x39\x00\x1c\x01\xba\x00\xbb\x00\x9a\x00\x9b\x00\x9c\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xf2\x00\xf3\x00\x6a\x00\xf5\x00\x4a\x00\x6c\x00\x63\x00\xf9\x00\x65\x00\xfb\x00\xfc\x00\x6c\x00\xed\x00\x26\x01\x27\x01\x19\x01\x1a\x01\x1b\x01\x93\x00\x1d\x01\x5a\x00\x91\x00\x20\x01\x21\x01\x91\x00\x5f\x00\x60\x00\x25\x01\x57\x00\x58\x00\x59\x00\x00\x01\x01\x01\x13\x01\x03\x01\x04\x01\x16\x01\x06\x01\x07\x01\x08\x01\xed\x00\xee\x00\x1c\x01\x91\x00\x63\x00\x1f\x01\x65\x00\x10\x01\x11\x01\x12\x01\xf7\x00\xf8\x00\x07\x01\x08\x01\xfb\x00\xfc\x00\x6e\x00\x00\x01\x01\x01\x1c\x01\x03\x01\x04\x01\x6c\x00\x06\x01\x07\x01\x08\x01\x72\x00\x9f\x00\xa0\x00\xa1\x00\xaa\x00\xab\x00\xac\x00\x10\x01\x11\x01\x12\x01\x69\x00\x6a\x00\x13\x01\x14\x01\x15\x01\x16\x01\xaa\x00\xab\x00\xac\x00\x1c\x01\x63\x00\x1c\x01\x65\x00\x1e\x01\x1f\x01\xec\x00\xed\x00\x22\x01\x19\x01\x1a\x01\x1b\x01\x6a\x00\x1d\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\xaa\x00\xab\x00\xac\x00\xb4\x00\x9b\x00\x9c\x00\xb7\x00\x39\x00\x68\x00\xba\x00\xbb\x00\x04\x01\x05\x01\x06\x01\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x81\x00\x49\x00\x36\x00\x37\x00\x4f\x00\xaa\x00\xab\x00\xac\x00\x84\x00\x85\x00\x86\x00\x72\x00\x4d\x00\x58\x00\x8a\x00\x4d\x00\x5b\x00\x5c\x00\x8e\x00\x4d\x00\x5a\x00\x91\x00\x61\x00\x56\x00\x0d\x00\x5f\x00\xaa\x00\xab\x00\xac\x00\x71\x00\xf9\x00\xfa\x00\xfb\x00\xfc\x00\x68\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xed\x00\xee\x00\xa6\x00\x54\x00\x77\x00\x78\x00\x15\x00\x73\x00\x7b\x00\x7c\x00\xf7\x00\xf8\x00\x6c\x00\x6c\x00\xfb\x00\xfc\x00\xaa\x00\xab\x00\xac\x00\xb7\x00\x84\x00\x85\x00\x86\x00\xaa\x00\xab\x00\xac\x00\x73\x00\x8b\x00\x1f\x01\x8d\x00\x6c\x00\x8f\x00\x90\x00\x91\x00\xaa\x00\xab\x00\xac\x00\x28\x01\x13\x01\x14\x01\x15\x01\x16\x01\x6c\x00\x2e\x01\x73\x00\x73\x00\x6e\x00\x1c\x01\x6e\x00\x1e\x01\x1f\x01\x6c\x00\x6c\x00\x22\x01\x6c\x00\x6c\x00\x6a\x00\x64\x00\x61\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x71\x00\x0c\x00\x33\x00\xb4\x00\xb7\x00\x19\x00\xb7\x00\x39\x00\x5b\x00\xba\x00\xbb\x00\x50\x00\x72\x00\x72\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xfd\x00\x73\x00\x6c\x00\x6c\x00\x6c\x00\x00\x01\x01\x01\x6c\x00\x6c\x00\x04\x01\x6c\x00\x06\x01\x09\x01\x0a\x01\x6c\x00\x6c\x00\x68\x00\xff\x00\x00\x01\x01\x01\x5a\x00\x10\x01\x04\x01\x12\x01\x06\x01\x5f\x00\x4f\x00\x64\x00\x72\x00\x1a\x01\x1b\x01\x72\x00\x1d\x01\x1c\x01\x68\x00\x51\x00\x21\x01\x56\x00\x5b\x00\x5c\x00\xed\x00\xee\x00\x72\x00\x17\x00\x61\x00\x4f\x00\x72\x00\x56\x00\x54\x00\x64\x00\xf7\x00\xf8\x00\x6c\x00\x6c\x00\xfb\x00\xfc\x00\x72\x00\x00\x01\x01\x01\x4d\x00\x03\x01\x04\x01\x73\x00\x06\x01\x07\x01\x08\x01\x77\x00\x78\x00\x5a\x00\x50\x00\x7b\x00\x7c\x00\x51\x00\x10\x01\x11\x01\x12\x01\x4d\x00\x50\x00\x13\x01\x14\x01\x15\x01\x16\x01\x81\x00\x50\x00\x68\x00\x1c\x01\x4d\x00\x1c\x01\x4d\x00\x1e\x01\x1f\x01\x6c\x00\x91\x00\x22\x01\x6c\x00\x72\x00\xb7\x00\x54\x00\x5a\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\x02\x00\xc3\x00\xc4\x00\xb4\x00\xc6\x00\x50\x00\xb7\x00\x39\x00\x0a\x00\xba\x00\xbb\x00\x19\x00\x73\x00\x73\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x16\x00\x50\x00\x6c\x00\x51\x00\x39\x00\x19\x00\x1c\x00\x1d\x00\x1e\x00\x76\x00\x1a\x00\x80\x00\x4d\x00\x80\x00\x4d\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x5a\x00\x4d\x00\x2c\x00\xed\x00\xee\x00\x5f\x00\x16\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x0c\x00\xf7\x00\xf8\x00\x6b\x00\x71\x00\xfb\x00\xfc\x00\x80\x00\xed\x00\xee\x00\x5f\x00\x68\x00\x4d\x00\x4d\x00\x19\x00\x72\x00\x64\x00\x73\x00\xf7\x00\xf8\x00\xf5\x00\x50\x00\xfb\x00\xfc\x00\xf9\x00\x50\x00\xfb\x00\xfc\x00\x54\x00\x50\x00\x14\x01\x15\x01\x16\x01\x50\x00\x72\x00\x51\x00\x19\x00\x61\x00\x1c\x01\x19\x00\x1e\x01\x1f\x01\x56\x00\x07\x00\x22\x01\x51\x00\x13\x01\x14\x01\x15\x01\x16\x01\x13\x01\x4d\x00\x54\x00\x16\x01\x49\x00\x1c\x01\x7d\x00\x1e\x01\x1f\x01\x1c\x01\x61\x00\x22\x01\x1f\x01\x75\x00\x76\x00\x68\x00\x81\x00\x28\x01\x29\x01\x2a\x01\x2b\x01\xad\x00\xae\x00\xaf\x00\xb0\x00\xff\x00\x00\x01\x01\x01\xb4\x00\x71\x00\x04\x01\xb7\x00\x06\x01\x71\x00\xba\x00\xbb\x00\x64\x00\x4f\x00\x50\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xb4\x00\x54\x00\x68\x00\xb7\x00\x5b\x00\x5c\x00\xba\x00\xbb\x00\x6c\x00\x6c\x00\x61\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\x6b\x00\x84\x00\x85\x00\x86\x00\x8a\x00\x19\x00\x19\x00\x89\x00\x8b\x00\x6c\x00\x8d\x00\x73\x00\x8f\x00\x90\x00\x91\x00\x77\x00\x78\x00\x8a\x00\x6c\x00\x7b\x00\x7c\x00\x71\x00\x5b\x00\xed\x00\xee\x00\x19\x00\x54\x00\xf6\x00\x71\x00\xf8\x00\x2d\x00\x51\x00\xfb\x00\xf7\x00\xf8\x00\x72\x00\x4d\x00\xfb\x00\xfc\x00\x19\x00\xed\x00\xee\x00\xff\x00\x00\x01\x01\x01\x53\x00\x4d\x00\x04\x01\x07\x00\x06\x01\xf7\x00\xf8\x00\xb7\x00\x89\x00\xfb\x00\xfc\x00\x13\x01\x07\x00\x19\x00\x16\x01\x61\x00\x13\x01\x14\x01\x15\x01\x16\x01\x1c\x01\x50\x00\x1e\x01\x1f\x01\x68\x00\x1c\x01\x80\x00\x1e\x01\x1f\x01\x4d\x00\x4d\x00\x22\x01\x19\x00\x13\x01\x14\x01\x15\x01\x16\x01\x28\x01\x29\x01\x2a\x01\x2b\x01\x4d\x00\x1c\x01\x4d\x00\x1e\x01\x1f\x01\x19\x00\x71\x00\x22\x01\x84\x00\x85\x00\x86\x00\x02\x00\x53\x00\x89\x00\x50\x00\x8b\x00\x56\x00\x8d\x00\x11\x00\x8f\x00\x90\x00\x91\x00\xff\x00\x00\x01\x01\x01\x23\x00\x1a\x00\x04\x01\x07\x00\x06\x01\x81\x00\x53\x00\x09\x00\x4f\x00\x6c\x00\x67\x00\x54\x00\x2e\x00\x6b\x00\x00\x01\x01\x01\x8a\x00\x03\x01\x04\x01\x6b\x00\x06\x01\x07\x01\x08\x01\x71\x00\x50\x00\x64\x00\x71\x00\x6b\x00\x47\x00\x6c\x00\x10\x01\x11\x01\x12\x01\x64\x00\xb7\x00\x64\x00\x84\x00\x85\x00\x86\x00\x53\x00\x50\x00\x89\x00\x1c\x01\x8b\x00\x6c\x00\x8d\x00\x72\x00\x8f\x00\x90\x00\x91\x00\x61\x00\x5a\x00\x8a\x00\x8a\x00\x72\x00\x84\x00\x85\x00\x86\x00\x6c\x00\x6c\x00\x89\x00\x72\x00\x8b\x00\x81\x00\x8d\x00\x02\x00\x8f\x00\x90\x00\x91\x00\x54\x00\x6c\x00\x6c\x00\x6c\x00\xef\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\x6b\x00\xf5\x00\x4d\x00\x54\x00\x89\x00\xf9\x00\x19\x00\xfb\x00\xfc\x00\xb7\x00\x84\x00\x85\x00\x86\x00\x53\x00\x07\x00\x89\x00\x6c\x00\x8b\x00\x6c\x00\x8d\x00\x19\x00\x8f\x00\x90\x00\x91\x00\x07\x00\x50\x00\x19\x00\x8a\x00\xb7\x00\x00\x01\x01\x01\x13\x01\x03\x01\x04\x01\x16\x01\x06\x01\x07\x01\x08\x01\x19\x00\x4f\x00\x1c\x01\x77\x00\x07\x00\x1f\x01\x85\x00\x10\x01\x11\x01\x12\x01\x77\x00\xff\x00\x00\x01\x01\x01\x30\x00\x25\x01\x04\x01\x38\x00\x06\x01\x1c\x01\xc7\x00\x54\x00\xe3\x00\xb7\x00\x84\x00\x85\x00\x86\x00\xe3\x00\x10\x01\x89\x00\x12\x01\x8b\x00\x41\x00\x8d\x00\x42\x00\x8f\x00\x90\x00\x91\x00\x7a\x00\xe3\x00\x1c\x01\x31\x00\x23\x01\x32\x00\x00\x01\x01\x01\x77\x00\x03\x01\x04\x01\x24\x01\x06\x01\x07\x01\x08\x01\x24\x01\x06\x01\x77\x00\x7b\x00\x7b\x00\x99\x00\x7f\x00\x10\x01\x11\x01\x12\x01\x00\x01\x01\x01\x4f\x00\x03\x01\x04\x01\x25\x01\x06\x01\x07\x01\x08\x01\x1c\x01\x54\x00\xc5\x00\xb7\x00\xd6\x00\x5b\x00\x5c\x00\x10\x01\x11\x01\x12\x01\xbd\x00\x61\x00\x16\x00\xff\x00\x00\x01\x01\x01\x16\x00\x30\x00\x04\x01\x1c\x01\x06\x01\x23\x01\x03\x00\x24\x01\x00\x01\x01\x01\x29\x01\x03\x01\x04\x01\x73\x00\x06\x01\x07\x01\x08\x01\x77\x00\x78\x00\x24\x01\xd6\x00\x7b\x00\x7c\x00\xde\x00\x10\x01\x11\x01\x12\x01\x63\x00\x84\x00\x85\x00\x86\x00\x87\x00\x50\x00\x89\x00\x4f\x00\x8b\x00\x1c\x01\x8d\x00\x41\x00\x8f\x00\x90\x00\x91\x00\x29\x01\xff\x00\x00\x01\x01\x01\x5b\x00\x5c\x00\x04\x01\x67\x00\x06\x01\x51\x00\x61\x00\x70\x00\x6d\x00\x23\x01\x23\x01\x23\x01\x78\x00\x23\x01\x00\x01\x01\x01\x1f\x01\x03\x01\x04\x01\x34\x00\x06\x01\x07\x01\x08\x01\x16\x00\x73\x00\x16\x00\x2c\x00\x20\x00\x77\x00\x78\x00\x10\x01\x11\x01\x12\x01\xb7\x00\x77\x00\x77\x00\x20\x00\x5e\x00\x33\x00\x43\x00\x59\x00\x66\x00\x1c\x01\x84\x00\x85\x00\x86\x00\x87\x00\x62\x00\x89\x00\x6b\x00\x8b\x00\x9e\x00\x8d\x00\x2c\x00\x8f\x00\x90\x00\x91\x00\x23\x01\x0e\x00\x20\x00\x95\x00\x96\x00\x20\x00\xbd\x00\xf0\x00\xf1\x00\xf2\x00\xf3\x00\x6b\x00\xf5\x00\xde\x00\x9e\x00\x42\x00\xf9\x00\xac\x00\xfb\x00\xfc\x00\x9c\x00\x46\x00\x24\x01\x17\x00\x17\x00\x35\x00\x47\x00\x54\x00\x23\x01\x4c\x00\xed\x00\x23\x01\x4b\x00\xa5\x00\x1c\x00\x23\x01\x1c\x00\xb7\x00\x0b\x00\x24\x01\x26\x00\x24\x01\x13\x01\x24\x01\x23\x01\x16\x01\x52\x00\x29\x01\x23\x01\x00\x01\x01\x01\x1c\x01\x03\x01\x04\x01\x1f\x01\x06\x01\x07\x01\x08\x01\x54\x00\x50\x00\x24\x01\x84\x00\x85\x00\x86\x00\x23\x01\x10\x01\x11\x01\x12\x01\x8b\x00\x16\x00\x8d\x00\x23\x01\x8f\x00\x90\x00\x91\x00\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x52\x00\x23\x01\x20\x01\x21\x01\x29\x01\x16\x00\x20\x00\x25\x01\x20\x00\x24\x01\x9e\x00\x9e\x00\xed\x00\x84\x00\x85\x00\x86\x00\x87\x00\x24\x01\x89\x00\x17\x00\x8b\x00\x24\x01\x8d\x00\x17\x00\x8f\x00\x90\x00\x91\x00\x24\x01\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xb7\x00\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xf0\x00\xf1\x00\xf2\x00\xf3\x00\xff\xff\xf5\x00\xff\xff\xff\xff\x1c\x01\xf9\x00\xff\xff\xfb\x00\xfc\x00\xb7\x00\xff\xff\xff\xff\xff\xff\x25\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x13\x01\xff\xff\xff\xff\x16\x01\xff\xff\xff\xff\xff\xff\x1a\x01\x1b\x01\x1c\x01\x1d\x01\xff\xff\x1f\x01\xff\xff\x21\x01\xff\xff\xff\xff\xff\xff\x25\x01\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\xff\xff\xb7\x00\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xf4\x00\xf5\x00\xff\xff\xff\xff\xff\xff\xf9\x00\x1c\x01\xfb\x00\xfc\x00\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\x13\x01\xff\xff\xff\xff\x16\x01\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\x1f\x01\x80\x00\x81\x00\x25\x01\xed\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x56\x00\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\x1c\x01\xff\xff\xff\xff\x61\x00\xff\xff\xb7\x00\x80\x00\xff\xff\xff\xff\x25\x01\x84\x00\x85\x00\x86\x00\x87\x00\x6c\x00\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\x72\x00\x8f\x00\x90\x00\x91\x00\x92\x00\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\xff\xff\xff\xff\x4f\x00\x50\x00\xed\x00\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x5d\x00\x5e\x00\x5f\x00\x60\x00\x61\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\x4f\x00\x50\x00\x51\x00\xb7\x00\xff\xff\x54\x00\x73\x00\x10\x01\x11\x01\x12\x01\x77\x00\x78\x00\x5b\x00\x5c\x00\x7b\x00\x7c\x00\x80\x00\xff\xff\x61\x00\x1c\x01\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xed\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x92\x00\xff\xff\x73\x00\xff\xff\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\x1c\x01\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\x80\x00\x5b\x00\x1c\x01\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x6c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\x72\x00\xff\xff\xff\xff\xff\xff\xff\xff\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xf7\x00\xf8\x00\xff\xff\xb7\x00\xfb\x00\xfc\x00\x10\x01\x11\x01\x12\x01\xff\xff\x80\x00\xff\xff\xff\xff\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x80\x00\xff\xff\xff\xff\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xed\x00\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x80\x00\xff\xff\xb7\x00\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x4f\x00\x50\x00\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xed\x00\x73\x00\x10\x01\x11\x01\x12\x01\x77\x00\x78\x00\xff\xff\xff\xff\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x80\x00\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xed\x00\x8f\x00\x90\x00\x91\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\x81\x00\xff\xff\x1c\x01\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\xff\xff\xff\xff\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xf6\x00\xff\xff\xf8\x00\xff\xff\xff\xff\xfb\x00\xff\xff\xff\xff\xfe\x00\xff\xff\x81\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\xff\xff\x0a\x01\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x13\x01\xff\xff\xed\x00\x16\x01\xff\xff\xff\xff\xb7\x00\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x10\x01\x11\x01\x12\x01\x81\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\x1c\x01\xff\xff\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xed\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\x81\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\x1c\x01\xff\xff\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x10\x01\x11\x01\x12\x01\x81\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\x1c\x01\xfe\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\xff\xff\x0d\x01\x0e\x01\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xff\xff\x17\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\xff\xff\xff\xff\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\x00\x01\x01\x01\x22\x01\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x10\x01\x11\x01\x12\x01\xfe\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\x0b\x01\xff\xff\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\x17\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\xff\xff\x1d\x01\xff\xff\xff\xff\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xb7\x00\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\x00\x00\x01\x00\x02\x00\x03\x00\xff\xff\x10\x01\x11\x01\x12\x01\x08\x00\xff\xff\x0a\x00\x0b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x66\x00\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\x3a\x00\x3b\x00\x3c\x00\x3d\x00\x3e\x00\x3f\x00\xff\xff\xff\xff\x42\x00\x43\x00\x44\x00\x45\x00\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\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\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\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\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\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\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\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\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\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\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\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\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\x4f\x00\xff\xff\x51\x00\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\x3b\x00\x3c\x00\x3d\x00\xff\xff\x61\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\x4f\x00\xff\xff\x73\x00\x52\x00\xff\xff\x54\x00\x77\x00\x78\x00\xff\xff\x58\x00\x7b\x00\x7c\x00\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\x6e\x00\x6f\x00\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\x6e\x00\x6f\x00\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xfe\x00\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x46\x00\x0b\x01\xff\xff\x0d\x01\x0e\x01\xff\xff\x4c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x17\x01\xff\xff\x19\x01\x1a\x01\x1b\x01\x58\x00\x1d\x01\xff\xff\x5b\x00\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x68\x00\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\x54\x00\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\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\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x4f\x00\xff\xff\xff\xff\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x64\x00\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xfe\x00\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x0b\x01\xff\xff\x0d\x01\x0e\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x52\x00\x17\x01\x54\x00\x19\x01\x1a\x01\x1b\x01\x58\x00\x1d\x01\xff\xff\x5b\x00\x20\x01\x21\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x52\x00\x93\x00\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xb7\x00\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\x50\x00\x51\x00\xff\xff\x1c\x01\x54\x00\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\x62\x00\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\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\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\x71\x00\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\x3c\x00\x3d\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\x52\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\xff\xff\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x3b\x00\xff\xff\x3d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\xff\xff\x8d\x00\x52\x00\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xb7\x00\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x53\x00\xff\xff\xff\xff\xff\xff\x1c\x01\x58\x00\x84\x00\x85\x00\x86\x00\x5c\x00\x88\x00\x89\x00\xff\xff\xff\xff\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xb7\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xed\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x1c\x01\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\x30\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\x58\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xb7\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xed\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\x62\x00\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x1c\x01\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\xff\xff\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xb7\x00\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xb7\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xed\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x10\x01\x11\x01\x12\x01\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\x67\x00\x1c\x01\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\x70\x00\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xb7\x00\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x1c\x01\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x94\x00\x95\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\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\x6f\x00\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xb7\x00\xff\xff\x79\x00\x7a\x00\xff\xff\xff\xff\x7d\x00\x7e\x00\x7f\x00\x80\x00\x81\x00\x82\x00\x83\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\xff\xff\x01\x00\x02\x00\xff\xff\x8d\x00\x8e\x00\x8f\x00\x90\x00\xff\xff\x92\x00\x0a\x00\x94\x00\x95\x00\x96\x00\x97\x00\x98\x00\x99\x00\x9a\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\xff\xff\xed\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\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\x56\x00\xff\xff\x58\x00\x59\x00\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x40\x00\x41\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\x6e\x00\xb7\x00\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\x72\x00\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\x40\x00\x41\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\x68\x00\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\x6a\x00\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\x40\x00\x41\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\xff\xff\x40\x00\x41\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\x00\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4e\x00\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4e\x00\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\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\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\x7b\x00\x7c\x00\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\xff\xff\x4f\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x58\x00\xff\xff\x5a\x00\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\xff\xff\x7a\x00\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xed\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x73\x00\x74\x00\x75\x00\x76\x00\xff\xff\x78\x00\xff\xff\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\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\x94\x00\x95\x00\xff\xff\x16\x00\xff\xff\x99\x00\x9a\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x40\x00\x41\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\xff\xff\x58\x00\xff\xff\xff\xff\xff\xff\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x63\x00\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x74\x00\x75\x00\x76\x00\xb7\x00\xff\xff\xff\xff\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\x81\x00\x84\x00\x85\x00\x86\x00\x87\x00\x88\x00\x89\x00\xff\xff\x8b\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x94\x00\x95\x00\xff\xff\xff\xff\xff\xff\x99\x00\x9a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xed\x00\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x95\x00\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xed\x00\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xed\x00\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x95\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\x96\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x95\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xed\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\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xed\x00\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\x1c\x01\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x9d\x00\xff\xff\xed\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xb7\x00\x06\x01\x07\x01\x08\x01\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xb7\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x95\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\xed\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x00\x01\x01\x01\xb7\x00\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\x9d\x00\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xb7\x00\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\x1c\x01\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\x9d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xb7\x00\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\x1c\x01\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x98\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xed\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xb7\x00\x8b\x00\x1c\x01\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\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\xed\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\x00\x01\x01\x01\xb7\x00\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xb7\x00\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xed\x00\x8b\x00\x1c\x01\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\x1c\x01\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\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\xed\x00\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xb7\x00\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xb7\x00\x8f\x00\x90\x00\x91\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\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xed\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\x1c\x01\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\x1c\x01\x89\x00\xff\xff\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xed\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xb7\x00\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\xff\xff\x1c\x01\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\xff\xff\xed\x00\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xd7\x00\xd8\x00\xd9\x00\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xdf\x00\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xb7\x00\xfb\x00\xfc\x00\x1c\x01\x84\x00\x85\x00\x86\x00\xff\xff\x88\x00\x89\x00\xff\xff\xff\xff\x8c\x00\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\x23\x01\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xed\x00\xb7\x00\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x84\x00\x85\x00\x86\x00\x87\x00\xff\xff\x89\x00\xed\x00\x8b\x00\xff\xff\x8d\x00\xff\xff\x8f\x00\x90\x00\x91\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\x02\x00\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xb7\x00\xff\xff\x1c\x01\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xed\x00\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x01\x01\x01\xff\xff\x03\x01\x04\x01\xff\xff\x06\x01\x07\x01\x08\x01\xff\xff\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\x10\x01\x11\x01\x12\x01\xff\xff\xff\xff\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\xff\xff\xff\xff\x80\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x80\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\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\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6b\x00\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x00\x1d\x00\x1e\x00\x75\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x80\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\x77\x00\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\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\x02\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\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\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\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\xff\xff\x1a\x00\x80\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x80\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\x02\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\x73\x00\xff\xff\x75\x00\x76\x00\x77\x00\x78\x00\x79\x00\x7a\x00\x7b\x00\x7c\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x01\x00\x02\x00\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\x0a\x00\xff\xff\x73\x00\xff\xff\x75\x00\x76\x00\x77\x00\x78\x00\xff\xff\x7a\x00\xff\xff\x7c\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\xb7\x00\x02\x00\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x0a\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\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\xe1\x00\x2c\x00\xff\xff\xff\xff\x2f\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\x02\x00\x1e\x01\x1f\x01\xff\xff\x6b\x00\x22\x01\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\x72\x00\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\x13\x00\x79\x00\x7a\x00\x16\x00\xff\xff\x18\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x2f\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x02\x00\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\x0a\x00\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\x79\x00\x7a\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\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\x4e\x00\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\x67\x00\xff\xff\xff\xff\xff\xff\x6b\x00\x0a\x00\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\x16\x00\xff\xff\x7a\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\x67\x00\xff\xff\x69\x00\xff\xff\x6b\x00\x0a\x00\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\x16\x00\xff\xff\x7a\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\x7a\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\x04\x00\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\xff\xff\x75\x00\x76\x00\x16\x00\xff\xff\x18\x00\x7a\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\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\x6b\x00\xff\xff\xff\xff\x4e\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\x75\x00\xff\xff\xff\xff\x1a\x00\x79\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\x6b\x00\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x16\x00\x75\x00\xff\xff\xff\xff\x1a\x00\x79\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\x4f\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\xff\xff\xff\xff\xff\xff\x79\x00\xff\xff\x5b\x00\x5c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x61\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x02\x00\xff\xff\xff\xff\x6b\x00\x6c\x00\x6d\x00\xff\xff\xff\xff\x0a\x00\xff\xff\x72\x00\xff\xff\xff\xff\x75\x00\x76\x00\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\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x0a\x00\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\x75\x00\x76\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x0a\x00\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\x75\x00\x76\x00\xff\xff\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\xff\xff\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x67\x00\x0a\x00\xff\xff\xff\xff\x6b\x00\xff\xff\x6d\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\x75\x00\x76\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\x02\x00\xb7\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x0a\x00\xff\xff\xff\xff\xc1\x00\xc2\x00\xc3\x00\xc4\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\xe1\x00\xe2\x00\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\x75\x00\x76\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x51\x00\xff\xff\xff\xff\xff\xff\x55\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x02\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\x63\x00\x0a\x00\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x16\x00\xff\xff\x72\x00\xff\xff\x1a\x00\x75\x00\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\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\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x75\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x6b\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x16\x00\xff\xff\xff\xff\x75\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\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\x6b\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x16\x00\xff\xff\xff\xff\x75\x00\x1a\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\x23\x00\x24\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\x6b\x00\xff\xff\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x16\x00\xff\xff\xff\xff\x75\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\xff\xff\xff\xff\xff\xff\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\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\x75\x00\xff\xff\x1c\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x02\x00\xff\xff\xff\xff\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0a\x00\xff\xff\x2c\x00\xff\xff\xff\xff\xff\xff\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\x16\x00\xff\xff\xff\xff\xff\xff\x75\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\x56\x00\xff\xff\xff\xff\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\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\x75\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\x6b\x00\x31\x00\x32\x00\x33\x00\x34\x00\x35\x00\xff\xff\xb7\x00\xb8\x00\xb9\x00\x75\x00\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x75\x00\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xff\xff\xff\xff\x25\x01\xff\xff\x27\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\x1a\x01\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xff\xff\xff\xff\x25\x01\xff\xff\x27\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xff\xff\xff\xff\x25\x01\xff\xff\x27\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x00\xff\xff\xff\xff\xff\xff\xcd\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\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xce\x00\xff\xff\xff\xff\xff\xff\xff\xff\xd3\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x00\xff\xff\xff\xff\xcc\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\x00\xff\xff\xff\xff\xcc\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xc9\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xfe\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\x0c\x01\x0d\x01\xff\xff\x0f\x01\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\x18\x01\x19\x01\xff\xff\x1b\x01\x1c\x01\x1d\x01\x1e\x01\x1f\x01\x20\x01\x21\x01\x22\x01\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xcf\x00\xd0\x00\xd1\x00\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\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xcf\x00\xd0\x00\xd1\x00\xd2\x00\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xd0\x00\xd1\x00\xd2\x00\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xe5\x00\xe6\x00\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xe6\x00\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xe4\x00\xff\xff\xe6\x00\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xd4\x00\xd5\x00\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xd7\x00\xd8\x00\xd9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xdf\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xd4\x00\xd5\x00\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xd7\x00\xd8\x00\xd9\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xdf\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x00\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xdc\x00\xdd\x00\xde\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe6\x00\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xd2\x00\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xe0\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xe7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xff\xff\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xd9\x00\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xdf\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xdf\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xdf\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xdf\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xb8\x00\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xff\xff\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xff\xff\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xff\xff\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xb7\x00\xff\xff\xb9\x00\xff\xff\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xb7\x00\xff\xff\xfb\x00\xfc\x00\xbb\x00\xbc\x00\xff\xff\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\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\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xf7\x00\xf8\x00\xbb\x00\xff\xff\xfb\x00\xfc\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xe1\x00\xe2\x00\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc0\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xed\x00\xee\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xb7\x00\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\x00\xc1\x00\xc2\x00\xc3\x00\xc4\x00\xff\xff\xff\xff\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xed\x00\xee\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xf7\x00\xf8\x00\xff\xff\xff\xff\xfb\x00\xfc\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\x14\x01\x15\x01\x16\x01\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x1c\x01\xff\xff\x1e\x01\x1f\x01\xff\xff\xff\xff\x22\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\x6e\x00\x86\x05\x9e\x02\x41\x05\x42\x05\xa6\x04\x9e\x04\x88\x05\x6c\x03\x99\x04\x96\x04\x95\x04\x96\x04\x97\x04\x0d\x01\x97\x04\x0e\x01\x0d\x04\x25\x05\x3e\x05\x3f\x05\x97\x04\x0f\x01\x10\x01\x11\x01\x2c\x00\x2d\x00\x5b\x05\x12\x01\x1b\x02\x1c\x02\x1d\x02\x6c\x05\x2e\x00\x8a\x05\x2f\x00\x32\x03\x8b\x05\xb7\x04\x1c\x02\x1d\x02\xb6\x04\x1c\x02\xdc\x03\x21\x05\xb7\x04\x1c\x02\x1d\x02\xb7\x04\x1c\x02\x1d\x02\x5e\x04\x4b\x03\x9b\x04\x9c\x04\x9d\x04\x9e\x04\x65\x05\x9c\x04\x9d\x04\x9e\x04\x73\x05\x69\x05\x9c\x04\x9d\x04\x9e\x04\x52\x05\xfa\x02\x83\x05\x84\x05\x9e\x04\x30\x04\x40\x03\x31\x05\x9e\x04\x92\x02\x93\x02\x26\x05\x9e\x04\x19\x02\x3e\x03\x44\x03\x45\x03\xc1\xff\x55\x03\x90\x05\x92\x04\xf6\x01\xf4\x01\xf5\x01\xf6\x01\x6d\x03\x19\x02\x8a\x02\x9b\x03\xf9\x04\x99\x04\xc1\xff\x92\x02\x93\x02\x0e\x04\x6a\x02\xbb\x02\x7c\x04\x7d\x04\x7d\x01\xf5\x04\x67\x03\x92\x03\x7b\x05\x5c\x05\x70\x03\xcd\xfc\x4a\xfe\xc0\x02\x6d\x05\xc1\xff\x64\x03\xd5\x01\x58\x01\x0e\x02\xa7\x04\x9b\x02\x48\x00\xbc\xff\xc1\xff\xa8\x04\xa9\x04\x35\x05\x36\x05\x37\x05\x38\x05\xa9\x04\xcd\xfc\xe0\x04\x85\x05\x38\x05\xa9\x04\x36\x04\x37\x04\xb2\x01\xfb\x03\x0c\x03\xbc\x02\x5b\x04\xbe\x02\x7f\x00\x7c\x05\x33\x00\xd1\x02\x07\x01\xb3\x01\xeb\x01\x0f\x02\x6e\x01\xcc\x04\x71\x00\x23\x01\xc1\xff\x99\x04\x08\x01\x25\x03\x26\x03\x32\x00\x2c\x01\x2d\x01\xdf\x02\x72\x03\x07\x01\x22\x01\x6b\x02\x71\x00\x23\x01\x59\x01\x57\x04\x37\x04\xc0\x01\x14\x01\x0d\x03\x0d\x01\x33\x00\x1a\x02\xf9\x02\x8b\x02\x8b\x02\x8c\x02\x07\x01\x89\x00\x59\x01\x65\x03\xcd\xfc\x7b\x01\x26\x01\xf7\x01\x1a\x02\x24\x01\xbf\x02\x9f\x02\x25\x01\x7e\x04\x56\x03\x33\x00\x46\x03\xf6\x04\x11\x00\x25\x01\xbc\xff\x26\x01\x92\x03\xa0\x02\xa1\x02\x11\x00\x9b\xfe\x07\x01\xf7\x01\x33\x00\x95\x02\xf7\x01\x73\x03\xde\x02\xf8\x01\x46\x03\xdf\x02\xf8\x01\x25\x01\xf7\x01\xde\x01\x78\x00\x34\x01\x79\x00\x11\x00\x6e\x03\x46\x03\xa2\x02\xf7\x01\x25\x01\xf7\x01\x29\x04\x08\x03\x94\x02\x6e\x03\x11\x00\x7e\x04\x33\x00\xf7\x01\xab\x02\x29\x02\x6f\x00\x70\x00\xf7\x01\x6e\x03\x71\x00\x72\x00\xfb\x02\x73\x00\x6e\x03\x03\x03\x5f\x04\xfb\x02\x11\x00\x08\x01\x19\x02\x3f\x03\x53\x05\x11\x00\x25\x01\x9f\x04\x4c\x00\xa0\x04\xa1\x04\x74\x00\x11\x00\x39\x03\x4f\x01\x09\x03\xba\x04\x0e\x00\x0f\x00\x10\x00\x75\x00\x40\x05\x76\x00\x77\x00\x78\x00\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\x43\x05\x5f\x04\x04\x03\x43\x05\x30\x00\x33\x00\x30\x00\x30\x00\x36\x00\x40\x05\xfa\x04\x4c\x00\x30\x00\x38\x04\x30\x00\x1e\x02\x30\x00\xf7\x02\xbb\x04\x11\x00\x4c\x00\x2a\x01\x2b\x01\x3a\x03\x1e\x02\x34\x00\x9f\x04\x1e\x02\xa0\x04\xa1\x04\x9f\x04\x1e\x02\xa0\x04\xa1\x04\x1e\x02\x9f\x04\x3f\x03\xa0\x04\xa1\x04\x25\x01\x9f\x04\x19\x02\xa0\x04\xa1\x04\x9f\x04\x11\x00\xa0\x04\xa1\x04\x9f\x04\x38\x04\xa0\x04\xa1\x04\xaa\x04\xa2\x02\xab\x04\x11\x00\x46\x00\xaa\x04\x19\x02\xab\x04\x19\x02\x46\x00\xaa\x04\xb7\x01\xab\x04\xb8\x01\x46\x00\xfd\x01\xcf\x03\x4b\x00\xac\x04\x0f\x00\x10\x00\x1a\x02\xff\xff\xac\x04\x0f\x00\x10\x00\x11\x00\x4c\x00\xac\x04\x0f\x00\x10\x00\x11\x00\x1b\x02\xcc\x00\x19\x02\x19\x02\x11\x00\xe3\x00\xe4\x00\xe5\x00\xe6\x00\xfd\x01\x19\x02\x4b\x00\x35\x01\x36\x01\x71\x00\x23\x01\x2a\x02\x2a\x02\x8f\x03\x25\x01\x25\x01\x4c\x00\xe7\x00\xfe\x04\xfc\x04\x11\x00\x11\x00\x50\x01\x7f\x00\xe8\x00\xe9\x00\x16\x01\x2e\x01\x2f\x01\xea\x00\xfb\x01\xfc\x01\x3b\x01\x8e\x03\xcd\x00\x51\x01\x37\x01\x52\x01\x53\x01\x14\x01\x89\x04\x8a\x04\x11\x00\x19\x02\x6a\x01\x26\x01\x15\x01\x75\x00\x3c\x01\x76\x00\x77\x00\x78\x00\x6c\x01\x79\x00\x1a\x02\xf6\x03\x7c\x00\x7d\x00\x6d\x01\x15\x01\xeb\x00\x2c\x01\x2d\x01\xd1\x02\x89\x00\xb7\x03\x22\x01\x8f\x03\x71\x00\x23\x01\x8e\x02\x1a\x02\x3d\x04\x1a\x02\x6d\x01\x3e\x02\x19\x02\x41\x02\x36\x00\x37\x00\x38\x00\x06\x03\x8a\x03\x11\x00\x88\x03\xee\x02\x42\x03\x3d\x01\x84\x02\x3d\x00\x3e\x00\x3f\x00\x24\x01\x99\xfe\x85\x02\x25\x01\x99\xfe\x3e\x04\x6b\x03\x1a\x02\x1a\x02\x11\x00\x9b\xfe\x80\x02\x26\x01\x3f\x02\x07\x03\x1a\x02\x48\x01\x81\x02\xdb\x04\xd1\x04\xec\x00\xed\x00\xee\x00\x36\x00\x37\x00\x38\x00\xb6\x04\xef\x00\x43\x02\x78\x00\x8c\x00\x79\x00\x86\x02\xf0\x00\xd0\x00\x00\x02\x3f\x00\x40\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xcc\x00\x49\x01\x4a\x01\x82\x02\x96\x03\xe4\x00\xe5\x00\xe6\x00\xff\xff\x1a\x02\x6e\x01\x36\x01\x71\x00\x23\x01\x08\x01\xfd\x01\xc0\x01\x4b\x00\x30\x01\x2d\x01\x8a\x03\xe7\x00\x0c\x02\x22\x01\x0a\x02\x71\x00\x23\x01\x4c\x00\xe8\x00\xe9\x00\x40\x00\x38\x02\xbe\x03\xea\x00\x36\x00\x37\x00\x38\x00\x0b\x02\xcd\x00\x0b\x02\x9c\x00\x9d\x00\x1a\x02\xf0\x04\x74\x05\x27\x02\xfc\x01\x1a\x05\x26\x01\x24\x01\x9e\x00\x70\x00\x25\x01\x61\x05\x71\x00\x72\x00\x8f\x03\xfc\x01\x11\x00\x39\x02\x09\x02\x26\x01\x6a\x01\x15\x01\xeb\x00\x3a\x02\x42\x00\x43\x00\x75\x05\x44\x00\x45\x00\xef\x04\x46\x00\x47\x00\x48\x00\x67\x03\xfc\x01\xff\xff\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x49\x00\x4a\x00\x4b\x00\x40\x00\xcf\x02\x11\x00\x03\x02\x7a\x00\x7b\x00\x15\x01\x6d\x01\xa0\x00\x4c\x00\x6e\x01\x6f\x01\x71\x00\x23\x01\xf1\x00\xf2\x00\xf3\x00\xf4\x00\x42\x00\x43\x00\xa1\xfe\x44\x00\x45\x00\xa1\xfe\x46\x00\x47\x00\x48\x00\xe5\x03\x60\x02\x48\x01\x23\x02\xec\x00\xed\x00\xee\x00\x49\x00\x4a\x00\x4b\x00\x00\x02\xef\x00\xf9\x03\xfb\x01\x8c\x00\xcc\x00\x1b\x02\xf0\x00\xd0\x00\x4c\x00\x2f\x02\x26\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xfb\x04\xfc\x04\x30\x02\x49\x01\x4a\x01\x34\x03\x33\x05\x62\x04\x63\x04\xfa\x01\x6e\x01\x78\x03\x71\x00\x23\x01\xfa\x03\x61\x02\x0f\x00\x10\x00\x42\x00\x43\x00\xea\x00\x0b\x02\x45\x00\x11\x00\x46\x00\xcd\x00\xfd\x01\x32\x05\x4b\x00\x56\x00\x64\x04\x69\x04\x1c\x03\x58\x00\x49\x00\x3f\x04\x4b\x00\xfd\x01\x4c\x00\x4b\x00\x9c\x00\x9d\x00\x0b\x02\x17\x05\xfc\x01\x40\x04\x4c\x00\x7f\x00\x26\x01\x4c\x00\x9e\x00\x70\x00\x1d\x03\x1e\x03\x71\x00\x72\x00\xfd\x01\xb6\x03\x4b\x00\x13\x02\x36\x00\x37\x00\x38\x00\x07\x01\x89\x03\x09\x01\x0a\x01\xee\x02\x4c\x00\x3d\x01\xb7\x03\x3d\x00\x3e\x00\x3f\x00\x14\x02\x15\x02\x6c\x01\x8a\x03\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x6d\x01\xa9\x01\xe2\x01\x51\x02\x46\x00\x11\x00\x89\x00\x7a\x00\x7b\x00\x36\x02\x8c\x00\xa0\x00\x36\x00\x37\x00\x38\x00\xff\xff\xe3\x01\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x66\x04\x04\x02\x4c\x00\x7d\x05\xef\x00\x40\x00\x92\xfd\x8c\x00\xcc\x00\x7f\x00\xaf\x02\xd0\x00\x26\x02\x7e\x05\x4b\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x80\x00\x81\x00\xc6\x01\x4c\x00\x30\x01\x2d\x01\x82\x00\x62\x04\x63\x04\x22\x01\xc5\x01\x71\x00\x23\x01\x87\x03\xda\x04\x80\x00\x81\x00\x6c\x01\x40\x00\xff\xff\xea\x00\x82\x00\x20\x04\x6d\x01\x4b\x00\xcd\x00\x88\x03\xdb\x04\x88\x00\x89\x00\x64\x04\x65\x04\x8b\x00\x8c\x00\x4c\x00\x24\x01\xc4\x01\xfd\x01\x25\x01\x4b\x00\x9c\x00\x9d\x00\x63\x05\x88\x00\x11\x00\xb4\x01\xd0\x04\x26\x01\xb1\x01\x4c\x00\x9e\x00\x70\x00\x4c\x00\xb5\x04\x71\x00\x72\x00\x35\x02\x42\x00\x43\x00\xd1\x04\x44\x00\x45\x00\x36\x02\x46\x00\x47\x00\x48\x00\xb6\x04\xce\x04\xca\x04\xcb\x04\x80\x05\xec\x02\x86\x01\x49\x00\x4a\x00\x4b\x00\x81\x05\xff\xff\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x62\x00\xc9\x04\x02\x02\x4c\x00\x65\x00\x11\x00\x9b\xfe\x7a\x00\x7b\x00\x42\x00\x43\x00\xa0\x00\x62\x00\x45\x00\x83\x01\x46\x00\x65\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x66\x04\x49\x00\x19\xfd\x4b\x00\xef\x00\x11\x02\xf7\x01\x8c\x00\xcc\x00\x12\x02\xaf\x02\xd0\x00\x2c\x02\x4c\x00\x7b\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\xf8\x04\xed\x02\xff\xff\x7f\x00\x84\x01\xa1\x01\x36\x00\x37\x00\x38\x00\x6d\x01\x81\x01\xec\x02\x82\x01\x8a\x03\x60\x05\x80\x00\x81\x00\x80\x00\x81\x00\x49\x05\xea\x00\x82\x00\x62\x00\x82\x00\x7f\x00\xcd\x00\x65\x00\x61\x05\x4b\x01\xf7\x01\x6e\x01\xcc\x04\x71\x00\x23\x01\xb4\x02\xc5\x04\x80\x00\x81\x00\x4c\x01\x56\x01\x9c\x00\x9d\x00\x82\x00\x88\x00\x89\x00\x88\x00\x43\x03\x8b\x00\x8c\x00\x8b\x00\x9e\x00\x70\x00\x11\x00\x6c\x01\x71\x00\x72\x00\xb7\x01\x40\x00\xb8\x01\x6d\x01\x36\x00\x37\x00\x38\x00\x34\x01\x88\x00\x89\x00\x1e\x01\xee\x02\x26\x01\x3d\x01\x83\x00\x3d\x00\x3e\x00\x3f\x00\x39\x01\xff\xff\x85\x00\xf7\x01\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x56\x04\xcd\x04\x1b\x01\x87\x00\x20\x03\x11\x00\x11\x00\x7a\x00\x7b\x00\x25\x03\x26\x03\xa0\x00\x36\x00\x37\x00\x38\x00\x21\x03\x22\x03\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\xae\x02\x5d\x02\x19\x01\x2e\x04\xef\x00\x40\x00\x25\x01\x8c\x00\xcc\x00\x9b\x02\xaf\x02\xd0\x00\x11\x00\x6d\x01\xff\xff\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x4a\x05\xff\xff\x55\x00\x42\x00\x43\x00\x43\x02\x78\x00\x45\x00\x79\x00\x46\x00\xea\x02\x9d\x02\xc0\x02\x45\x00\x57\x00\x46\x00\xd5\x01\x18\x01\x40\x00\x49\x00\xea\x00\x4b\x00\x83\x00\xfe\x02\x20\x03\xcd\x00\x39\x01\xff\x02\x85\x00\x83\x00\x17\x02\x4c\x00\xcd\xfc\x2d\x05\xac\x02\x85\x00\xa2\x02\x87\x00\xb5\x02\xb2\x02\xb3\x02\x9d\x00\x63\x00\x64\x00\x87\x00\x54\x02\x66\x00\x67\x00\x8a\x00\x36\x02\x9e\x00\x70\x00\x50\x03\x51\x03\x71\x00\x72\x00\x07\x01\x42\x00\x43\x00\x19\x03\x44\x00\x45\x00\x3b\x02\x46\x00\x47\x00\x48\x00\x36\x02\xc9\x04\xca\x04\xcb\x04\x17\x03\xd4\x01\x7d\x00\x49\x00\x4a\x00\x4b\x00\xd5\x01\x15\x03\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x92\x01\x2d\x05\x93\x01\x4c\x00\x45\x00\x11\x00\x46\x00\x7a\x00\x7b\x00\x42\x00\x43\x00\xa0\x00\x11\x02\x45\x00\x13\x03\x46\x00\x12\x02\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\xae\x02\x49\x00\x2e\x03\x4b\x00\xef\x00\x2a\x03\x2f\x03\x8c\x00\xcc\x00\x2b\x03\xaf\x02\xd0\x00\x81\x01\x4c\x00\x82\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x62\x00\xd1\x04\x02\x04\xdf\x03\x6c\x04\x25\x01\x02\x03\xe0\x03\x36\x00\x37\x00\x38\x00\x11\x00\x5e\x02\x5f\x02\x60\x02\x0e\x00\x0f\x00\x10\x00\x76\x05\x0a\x03\xea\x00\x1a\x05\xfa\x02\x11\x00\x11\x02\xcd\x00\x6d\x04\x73\x04\x12\x02\xf0\x02\x6e\x01\xcc\x04\x71\x00\x23\x01\x36\x00\x37\x00\x38\x00\x02\x02\xb1\x02\xb2\x02\xb3\x02\x9d\x00\x11\x05\x12\x05\xdf\x03\x3d\x00\x3e\x00\x3f\x00\x93\x04\x13\x05\x9e\x00\x70\x00\x25\x03\x26\x03\x71\x00\x72\x00\x61\x02\x0f\x00\x10\x00\x40\x00\x36\x00\x37\x00\x38\x00\x7a\x02\x11\x00\x7b\x02\xdf\x03\xd2\x04\x26\x01\x3d\x01\x4d\x05\x3d\x00\x3e\x00\x3f\x00\x77\x01\x0f\x00\x10\x00\xf7\x01\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x11\x00\xcd\x04\xdf\x03\x40\x00\xe9\x02\x11\x00\x48\x05\x7a\x00\x7b\x00\x0a\x05\x0b\x05\xa0\x00\x36\x00\x37\x00\x38\x00\x0a\x05\x59\x05\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x6f\x04\x49\x05\xdf\x03\xe8\x02\xef\x00\x40\x00\x8f\x05\x8c\x00\xcc\x00\xe5\x02\xaf\x02\xd0\x00\x15\x03\xdb\x02\xdc\x02\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x43\x01\x44\x01\x45\x01\x46\x01\x6c\x04\x42\x00\x43\x00\xd0\x01\x10\x00\x45\x00\x27\x04\x46\x00\x28\x04\x1f\x04\x11\x00\x20\x04\xd1\x01\x7b\x00\x40\x00\xe7\x02\xea\x00\x49\x00\x81\x01\x4b\x00\x82\x01\xcd\x00\x6d\x04\x6e\x04\xda\x02\xdb\x02\xdc\x02\x42\x00\x43\x00\x4c\x00\x44\x00\x45\x00\x41\x02\x46\x00\x47\x00\x48\x00\x9c\x00\x9d\x00\x11\x00\xe2\x02\xd1\x01\x7b\x00\xe6\x02\x49\x00\x4a\x00\x4b\x00\x9e\x00\x70\x00\x09\x02\x07\x02\x71\x00\x72\x00\x59\x01\x42\x00\x43\x00\x4c\x00\x44\x00\x45\x00\xe0\x02\x46\x00\x47\x00\x48\x00\x06\x02\x07\x02\x1e\x01\x0f\x00\x10\x00\x7e\x01\xba\x01\x49\x00\x4a\x00\x4b\x00\x11\x00\xd2\x02\xd1\x00\x9f\x00\x0f\x00\xd2\x00\xee\x03\xef\x03\xf0\x03\x4c\x00\xbe\x01\x11\x00\xd1\x02\x7a\x00\x7b\x00\x42\x00\x43\x00\xa0\x00\xc0\x01\x45\x00\xf2\x03\x46\x00\xce\x02\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x6f\x04\x49\x00\x53\x02\x4b\x00\xef\x00\x7e\x01\x7f\x01\x8c\x00\xcc\x00\xcc\x02\xaf\x02\xd0\x00\xdb\x03\x4c\x00\xdc\x03\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x8a\x01\x07\x05\x8b\x01\x78\x04\x8c\x01\x79\x04\x8d\x01\x62\x04\x63\x04\x2b\x05\x70\x00\x7d\x01\x79\x01\x71\x00\x72\x00\x62\x00\x05\xfd\xc7\x02\x10\x00\x65\x00\xea\x00\x1c\x01\x0f\x00\x10\x00\x11\x00\xcd\x00\xd1\x01\x7b\x00\x52\x02\x11\x00\x03\x05\xa4\x02\x7b\x01\x79\x01\x36\x00\x37\x00\x38\x00\xc6\x02\xa5\x02\xa6\x02\x9c\x00\x9d\x00\xa7\x02\xa8\x02\xc3\x02\x3d\x00\x3e\x00\x3f\x00\x7a\x00\x7b\x00\x9e\x00\x70\x00\x78\x01\x79\x01\x71\x00\x72\x00\xbc\x02\x0f\x00\x10\x00\xc7\x02\x36\x00\x37\x00\x38\x00\x66\x02\x11\x00\xbe\x01\x5a\x04\xee\x02\x5b\x04\x3d\x01\xc4\x02\x3d\x00\x3e\x00\x3f\x00\xb9\x02\x0f\x00\x10\x00\xc2\x02\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x11\x00\x31\x01\x32\x01\x40\x00\xed\x04\x11\x00\xee\x04\x7a\x00\x7b\x00\xff\x02\x00\x03\xa0\x00\xd3\x01\xa1\x01\x78\x00\x6f\x02\x79\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x66\x04\xb6\x02\x0f\x00\x10\x00\xef\x00\x40\x00\xf4\x01\x8c\x00\xcc\x00\x11\x00\xaf\x02\xd0\x00\x5c\x03\x5d\x03\x5e\x03\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x7c\x03\x74\x01\xf2\x01\x75\x01\x6c\x04\x9a\x02\xe2\x04\x22\x01\xe3\x04\x71\x00\x23\x01\x99\x02\xa9\x02\x74\x03\x75\x03\xd3\x01\xa1\x01\x78\x00\x98\x02\x79\x00\xea\x00\x97\x02\xd4\x01\x7d\x00\x92\x02\xcd\x00\x0b\x05\xd5\x01\x51\x03\x52\x03\x53\x03\x42\x00\x43\x00\x24\x01\x44\x00\x45\x00\x25\x01\x46\x00\x47\x00\x48\x00\x9c\x00\x9d\x00\x11\x00\x90\x02\xa5\x04\x26\x01\xa6\x04\x49\x00\x4a\x00\x4b\x00\x9e\x00\x70\x00\x9b\x02\x48\x00\x71\x00\x72\x00\x8a\x02\x42\x00\x43\x00\x4c\x00\x44\x00\x45\x00\x87\x02\x46\x00\x47\x00\x48\x00\x7e\x02\x50\x05\xca\x04\xcb\x04\x11\x04\x12\x04\x13\x04\x49\x00\x4a\x00\x4b\x00\x7e\x01\x1a\x04\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x7f\x04\x12\x04\x13\x04\x4c\x00\xed\x04\x11\x00\xee\x04\x7a\x00\x7b\x00\x06\x04\x07\x04\xa0\x00\xd3\x01\xa1\x01\x78\x00\x83\x02\x79\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x6f\x04\x79\x04\x12\x04\x13\x04\xef\x00\x6a\x04\x5e\x03\x8c\x00\xcc\x00\x7f\x02\xaf\x02\xd0\x00\xc6\x04\xc7\x04\x46\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x77\x02\x02\x05\xf2\x04\xf3\x04\x28\x05\xc2\x04\x12\x04\x13\x04\x36\x00\x37\x00\x38\x00\x7e\x02\x76\x02\x29\x05\x18\x05\x75\x02\x80\x00\x81\x00\x19\x05\x74\x02\xea\x00\x1a\x05\x82\x00\x70\x02\x6f\x02\xcd\x00\x6e\x05\x12\x04\x13\x04\x6e\x02\x6e\x01\xcc\x04\x71\x00\x23\x01\xe6\x04\xf2\x02\xf3\x02\xf4\x02\xf5\x02\xf6\x02\x9c\x00\x9d\x00\x1b\x05\xc0\x01\x88\x00\x2a\x05\x66\x02\x56\x02\x8b\x00\x2b\x05\x9e\x00\x70\x00\x53\x02\x52\x02\x71\x00\x72\x00\x92\x05\x12\x04\x13\x04\x40\x00\x36\x00\x37\x00\x38\x00\x91\x05\x12\x04\x13\x04\x55\x02\xee\x02\x26\x01\x3d\x01\x50\x02\x3d\x00\x3e\x00\x3f\x00\x95\x05\x12\x04\x13\x04\xf7\x01\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x4f\x02\xcd\x04\x41\x02\x40\x02\x3d\x02\x11\x00\x3c\x02\x7a\x00\x7b\x00\x37\x02\x34\x02\xa0\x00\x33\x02\x32\x02\x31\x02\x2e\x02\x29\x02\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\xae\x02\x17\x02\x0d\x01\x09\x02\xef\x00\x40\x00\xd3\x03\x8c\x00\xcc\x00\xd2\x03\xaf\x02\xd0\x00\xd1\x03\xce\x03\xc5\x03\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x9f\x02\xc6\x03\xc4\x03\xe8\xfc\x04\xfd\x42\x00\x43\x00\xf0\xfc\xef\xfc\x45\x00\x03\xfd\x46\x00\xfd\x03\xa1\x02\xe9\xfc\xea\xfc\xc3\x03\x13\x03\x87\x01\x43\x00\xea\x00\x49\x00\x45\x00\x4b\x00\x46\x00\xcd\x00\x7f\x00\xc2\x03\x3f\x02\xde\x01\x78\x00\xc1\x03\x79\x00\x4c\x00\xe5\x04\xc0\x03\xa2\x02\xbd\x03\x80\x00\x81\x00\x9c\x00\x9d\x00\xbc\x03\xbb\x03\x82\x00\xb4\x03\x6d\x01\xaa\x03\xcb\x02\x95\x03\x9e\x00\x70\x00\x37\x02\x33\x02\x71\x00\x72\x00\x94\x03\x42\x00\x43\x00\x86\x03\x44\x00\x45\x00\x56\x01\x46\x00\x47\x00\x48\x00\x88\x00\x89\x00\x93\x03\x91\x03\x8b\x00\x8c\x00\x8b\x03\x49\x00\x4a\x00\x4b\x00\x85\x03\x84\x03\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x83\x03\x81\x03\x82\x03\x4c\x00\x80\x03\x11\x00\x7b\x03\x7a\x00\x7b\x00\x7f\x03\x91\x02\xa0\x00\x7e\x03\x18\xfd\x8c\x00\x6a\x01\x6c\x03\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\xae\x02\x13\x00\x97\x03\x97\x00\xef\x00\x98\x03\x69\x03\x8c\x00\xcc\x00\x14\x00\xaf\x02\xd0\x00\x61\x03\x78\x03\x77\x03\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\x15\x00\x5c\x03\x5a\x03\x4e\x03\xcc\x00\x58\x03\x17\x00\x18\x00\x19\x00\x87\x00\x3c\x03\x34\x01\x31\x03\x37\x03\x30\x03\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xea\x00\x2d\x03\x24\x00\x9c\x00\x9d\x00\xcd\x00\x29\x03\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x0d\x01\x9e\x00\x70\x00\xd8\x03\xfd\x03\x71\x00\x72\x00\x46\x04\x9c\x00\x9d\x00\xcd\x00\x3c\x04\x43\x04\x41\x04\x36\x04\x33\x04\x34\x04\x32\x04\x9e\x00\x70\x00\x21\x01\x30\x04\x71\x00\x72\x00\x22\x01\x0f\xfd\x71\x00\x23\x01\x2d\x04\x0e\xfd\x9a\x01\x0f\x00\x10\x00\x10\xfd\x23\x04\x1d\x04\x67\x03\x1a\x04\x11\x00\x17\x04\x7a\x00\x7b\x00\x18\x04\x15\x04\xa0\x00\x11\x04\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x24\x01\x0d\x04\xcb\x02\x25\x01\x6b\x05\x11\x00\x68\x00\x7a\x00\x7b\x00\x11\x00\x02\x04\xa0\x00\x26\x01\x20\x02\x21\x02\x0b\x04\xec\x03\xf1\x00\xf2\x00\xf3\x00\xf4\x00\xec\x00\xed\x00\xad\x02\x05\x04\x11\x03\x87\x01\x43\x00\xef\x00\xfd\x03\x45\x00\x8c\x00\x46\x00\xf3\x03\xaf\x02\xd0\x00\xed\x03\x7f\x00\x55\x01\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\xb0\x02\xce\x00\x3e\x02\xe2\x03\x8c\x00\x80\x00\x81\x00\xcf\x00\xd0\x00\xe4\x03\xe3\x03\x82\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\xd8\x03\x36\x00\x37\x00\x38\x00\x08\x01\xa3\x04\x9b\x04\x07\x01\xee\x02\x95\x04\x3d\x01\x56\x01\x3d\x00\x3e\x00\x3f\x00\x88\x00\x89\x00\x08\x01\x92\x04\x8b\x00\x8c\x00\x6e\x02\x90\x04\x9c\x00\x9d\x00\x67\x03\xc0\x01\xd8\x01\x4c\x04\xd9\x01\x8b\x04\x8b\x03\xda\x01\x9e\x00\x70\x00\x84\x04\x83\x04\x71\x00\x72\x00\x17\x04\x9c\x00\x9d\x00\x10\x03\x87\x01\x43\x00\x4c\x01\x82\x04\x45\x00\x15\x04\x46\x00\x9e\x00\x70\x00\x40\x00\x07\x01\x71\x00\x72\x00\xdd\x01\x15\x04\x62\x04\x25\x01\x59\x04\xd1\x00\x9f\x00\x0f\x00\xd2\x00\x11\x00\x5e\x04\x7a\x00\x7b\x00\x55\x04\x11\x00\x54\x04\x7a\x00\x7b\x00\x53\x04\x52\x04\xa0\x00\x50\x04\xd1\x00\x9f\x00\x0f\x00\xd2\x00\xf1\x00\xf2\x00\xf3\x00\xf4\x00\x4f\x04\x11\x00\x4e\x04\x7a\x00\x7b\x00\x4d\x04\x4c\x04\xa0\x00\x36\x00\x37\x00\x38\x00\xeb\x04\xd3\x02\x4d\x01\xe8\x04\x4e\x01\xe4\x04\x3c\x00\xdd\x04\x3d\x00\x3e\x00\x3f\x00\x79\x03\x87\x01\x43\x00\xd8\x04\xc5\x04\x45\x00\x15\x04\x46\x00\xbe\x04\x70\x03\xbd\x04\x1e\x05\xb3\x04\x23\x05\x17\x05\x1d\x05\x31\x05\x42\x00\x43\x00\x08\x01\x44\x00\x45\x00\x25\x05\x46\x00\x47\x00\x48\x00\x10\x05\x0f\x05\x0d\x05\x0e\x05\x67\x05\x59\x01\x65\x05\x49\x00\x4a\x00\x4b\x00\x68\x05\x40\x00\x5f\x05\x36\x00\x37\x00\x38\x00\x01\x05\x5c\x03\x4d\x01\x4c\x00\x4e\x01\x4f\x05\x3c\x00\x50\x05\x3d\x00\x3e\x00\x3f\x00\x4d\x05\x4c\x05\x08\x01\x08\x01\x35\x05\x36\x00\x37\x00\x38\x00\x3e\x05\x3d\x05\x4d\x01\x82\x05\x4e\x01\x47\x05\x3c\x00\x7f\x05\x3d\x00\x3e\x00\x3f\x00\x72\x05\x3c\x05\x3b\x05\x83\x05\x70\x01\x71\x01\x72\x01\x73\x01\x74\x01\xd8\x03\x75\x01\x78\x05\x66\xfe\x07\x01\x22\x01\x17\x04\x71\x00\x23\x01\x40\x00\x36\x00\x37\x00\x38\x00\x5d\x05\x15\x04\x4d\x01\x6b\x05\x4e\x01\x95\x05\x3c\x00\x17\x04\x3d\x00\x3e\x00\x3f\x00\x15\x04\xd1\x03\x8f\x05\x08\x01\x40\x00\x42\x00\x43\x00\x24\x01\x44\x00\x45\x00\x25\x01\x46\x00\x47\x00\x48\x00\x8e\x05\x9a\x05\x11\x00\x9b\x05\x15\x04\x26\x01\x03\x02\x49\x00\x4a\x00\x4b\x00\x9d\x05\x86\x01\x87\x01\x43\x00\x0b\x01\xd2\x01\x45\x00\x84\x01\x46\x00\x4c\x00\x90\x01\x56\x01\xc1\x01\x40\x00\x36\x00\x37\x00\x38\x00\xb9\x01\x88\x01\x4d\x01\x4b\x00\x4e\x01\x41\x01\x3c\x00\x46\x01\x3d\x00\x3e\x00\x3f\x00\x39\x01\xb5\x01\x4c\x00\x19\x01\x1b\x03\x17\x03\x42\x00\x43\x00\x0a\x03\x44\x00\x45\x00\x1a\x03\x46\x00\x47\x00\x48\x00\x19\x03\x0d\x03\x04\x03\xf6\x02\xf0\x02\xe0\x02\xc4\x02\x49\x00\x4a\x00\x4b\x00\x42\x00\x43\x00\x7f\x00\x44\x00\x45\x00\xe7\x01\x46\x00\x47\x00\x48\x00\x4c\x00\xd2\x02\x8e\x02\x40\x00\x78\x02\x80\x00\x81\x00\x49\x00\x4a\x00\x4b\x00\x6c\x02\x82\x00\xd5\x03\x43\x04\x87\x01\x43\x00\xd4\x03\x20\x03\x45\x00\x4c\x00\x46\x00\x17\x02\xd3\x03\x12\x02\x42\x00\x43\x00\x69\x03\x44\x00\x45\x00\x56\x01\x46\x00\x47\x00\x48\x00\x88\x00\x89\x00\x0f\x02\xbe\x03\x8b\x00\x8c\x00\x6a\x02\x49\x00\x4a\x00\x4b\x00\x5f\x03\x36\x00\x37\x00\x38\x00\x42\x02\x5a\x03\x3a\x00\x7f\x00\x3b\x00\x4c\x00\x3c\x00\x58\x03\x3d\x00\x3e\x00\x3f\x00\x69\x03\x41\x04\x87\x01\x43\x00\x80\x00\x81\x00\x45\x00\x56\x03\x46\x00\x4e\x03\x82\x00\x3a\x03\x37\x03\xb7\x03\x95\x03\x8c\x03\x35\x03\x8b\x03\x42\x00\x43\x00\x42\x03\x44\x00\x45\x00\x27\x03\x46\x00\x47\x00\x48\x00\x26\x03\xa4\x02\x23\x03\x4a\x04\x49\x04\x88\x00\x89\x00\x49\x00\x4a\x00\x4b\x00\x40\x00\x48\x04\x47\x04\x46\x04\x34\x04\x44\x04\x2b\x04\x28\x04\x25\x04\x4c\x00\x36\x00\x37\x00\x38\x00\xe4\x01\x1d\x04\x3a\x00\x1b\x04\x3b\x00\x15\x04\x3c\x00\xfb\x03\x3d\x00\x3e\x00\x3f\x00\xf3\x03\xd9\x03\xd8\x03\xe5\x01\xe6\x01\xd6\x03\x90\x04\x7b\x03\x72\x01\x73\x01\x74\x01\x8e\x04\x75\x01\x6a\x02\x80\x04\x7a\x04\x22\x01\x7b\x04\x71\x00\x23\x01\x6b\x04\x60\x04\x50\x04\xee\x04\xeb\x04\xe9\x04\xe0\x04\xde\x04\xdd\x04\xdb\x04\x41\x00\xd8\x04\xd6\x04\xc3\x04\xb3\x04\xbb\x04\xa3\x04\x40\x00\x23\x05\x2e\x05\x2f\x05\x20\x05\x24\x01\x1f\x05\x10\x05\x25\x01\x08\x05\x15\x05\xf8\x04\x42\x00\x43\x00\x11\x00\x44\x00\x45\x00\x26\x01\x46\x00\x47\x00\x48\x00\x00\x05\x5a\x05\xf1\x04\x36\x00\x37\x00\x38\x00\x68\x05\x49\x00\x4a\x00\x4b\x00\x3c\x01\x45\x05\x3d\x01\x62\x05\x3d\x00\x3e\x00\x3f\x00\x43\x02\x78\x00\x4c\x00\x79\x00\x57\x05\x61\x05\xd4\x01\x7d\x00\x69\x03\x44\x05\x79\x05\xd5\x01\x78\x05\x89\x05\x6f\x05\x93\x05\x41\x00\x36\x00\x37\x00\x38\x00\xe9\x01\x87\x05\x3a\x00\x97\x05\x3b\x00\x98\x05\x3c\x00\x96\x05\x3d\x00\x3e\x00\x3f\x00\x9b\x05\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\xbf\x02\x72\x01\x73\x01\x74\x01\x00\x00\x75\x01\x00\x00\x00\x00\x4c\x00\x22\x01\x00\x00\x71\x00\x23\x01\x40\x00\x00\x00\x00\x00\x00\x00\xe7\x01\x00\x00\x36\x00\x37\x00\x38\x00\xe9\x01\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x24\x01\x00\x00\x00\x00\x25\x01\x00\x00\x00\x00\x00\x00\x43\x02\x78\x00\x11\x00\x79\x00\x00\x00\x26\x01\x00\x00\xc0\x02\x00\x00\x00\x00\x00\x00\xd5\x01\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\x40\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x33\x03\x2d\x01\x00\x00\x00\x00\x00\x00\x22\x01\x4c\x00\x71\x00\x23\x01\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\xea\x01\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\x24\x01\x00\x00\x00\x00\x25\x01\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x11\x00\x00\x00\x00\x00\x26\x01\xd4\x02\xa4\x02\xeb\x01\x41\x00\x36\x00\x37\x00\x38\x00\x5b\x02\xa5\x02\xd5\x02\x00\x00\x3b\x00\xa7\x02\xd6\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\xea\x01\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x70\x05\x4a\x00\x4b\x00\x00\x00\xd7\x01\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x81\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x82\x00\x00\x00\x40\x00\xb7\x02\x00\x00\x00\x00\xeb\x01\x36\x00\x37\x00\x38\x00\x5b\x02\x6c\x01\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x6d\x01\x3d\x00\x3e\x00\x3f\x00\xe9\x02\x88\x00\x89\x00\x00\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x02\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x5b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\xb8\x02\x00\x00\x00\x00\x00\x00\x7f\x00\xcc\x01\xd7\x02\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x81\x00\xcd\x01\xce\x01\xcf\x01\xd0\x01\x82\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x7f\x00\x55\x01\xb4\xfe\x40\x00\x00\x00\xb4\xfe\x56\x01\x49\x00\x4a\x00\x4b\x00\x88\x00\x89\x00\x80\x00\x81\x00\x8b\x00\x8c\x00\xb7\x02\x00\x00\x82\x00\x4c\x00\x36\x00\x37\x00\x38\x00\x5b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x41\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x24\x04\x00\x00\x56\x01\x00\x00\x00\x00\x00\x00\x88\x00\x89\x00\x00\x00\x00\x00\x8b\x00\x8c\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x55\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\xed\x01\x00\x00\x9d\x02\xef\x01\x08\x04\x57\x00\x4c\x00\x0b\x04\x36\x00\x37\x00\x38\x00\x5b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x9e\x02\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x6d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x63\x00\x64\x00\x00\x00\x00\x00\x66\x00\x67\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\x96\x01\x70\x00\x00\x00\x40\x00\x71\x00\x72\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x08\x04\x00\x00\x00\x00\x09\x04\x36\x00\x37\x00\x38\x00\x5b\x02\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x97\x01\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\x08\x04\x00\x00\x00\x00\xc1\x04\x36\x00\x37\x00\x38\x00\x5b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x41\x00\x3d\x00\x3e\x00\x3f\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\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\x5a\x02\x00\x00\x40\x00\x00\x00\x36\x00\x37\x00\x38\x00\x5b\x02\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x06\x05\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\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\x40\x00\x41\x00\x56\x01\x49\x00\x4a\x00\x4b\x00\x88\x00\x89\x00\x00\x00\x00\x00\x8b\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x4c\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\x51\x05\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x5b\x02\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x41\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\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\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x41\x03\x00\x00\x4c\x00\x36\x00\x37\x00\x38\x00\x00\x00\xa5\x02\xa6\x02\x00\x00\x00\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xd8\x01\x00\x00\xd9\x01\x00\x00\x00\x00\xda\x01\x00\x00\x00\x00\xdb\x01\x00\x00\x03\x04\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\xa5\x02\xa6\x02\x00\x00\xdc\x01\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xdd\x01\x00\x00\x41\x00\x25\x01\x00\x00\x00\x00\x40\x00\xde\x01\x78\x00\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\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\x40\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x5c\x04\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\xa5\x02\xa6\x02\x4c\x00\x00\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xa9\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\xa9\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\xe4\x04\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\xa5\x02\xa6\x02\x4c\x00\x00\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x02\x8c\x00\xe2\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\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\x59\x05\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\xa5\x02\xa6\x02\x4c\x00\x50\x01\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\xca\x01\x00\x00\x52\x01\x53\x01\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x00\x00\x75\x00\x00\x00\x76\x00\x77\x00\x78\x00\x00\x00\x79\x00\x00\x00\x00\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\x00\x00\xa9\x02\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x42\x00\x43\x00\xa0\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x49\x00\x4a\x00\x4b\x00\x50\x01\xec\x02\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x51\x01\x00\x00\x52\x01\x53\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x02\x00\x00\x00\x00\x00\x00\x75\x00\x00\x00\x76\x00\x77\x00\x78\x00\x00\x00\x79\x00\x00\x00\x00\x00\x7c\x00\x7d\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\x00\x00\x19\x02\xa2\x00\x13\x00\xa3\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\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\xae\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\xe2\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a\x02\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb1\x03\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\xf6\x00\xf7\x00\xf8\x00\xf9\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\xfa\x00\xd7\x00\x00\x00\xfb\x00\x00\x00\x15\x00\x00\x00\xfc\x00\x00\x00\x16\x00\xfd\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xfe\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\xff\x00\xab\x00\xdc\x00\xad\x00\x00\x01\x01\x01\x00\x00\x00\x00\x02\x01\x03\x01\x04\x01\x05\x01\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x07\x01\x08\x01\x09\x01\x0a\x01\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x71\x04\x72\x04\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x73\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xfe\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\x00\x00\xab\x00\xdc\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x07\x01\x08\x01\x09\x01\x0a\x01\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x68\x04\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\x00\x00\xd7\x00\x00\x00\xfb\x00\x00\x00\x15\x00\x00\x00\x69\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xfe\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\x00\x00\xab\x00\xdc\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x07\x01\x08\x01\x09\x01\x0a\x01\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x71\x04\x72\x04\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x73\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xfe\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\x00\x00\xab\x00\xdc\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x07\x01\x08\x01\x09\x01\x0a\x01\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x68\x04\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\x00\x00\xd7\x00\x00\x00\xfb\x00\x00\x00\x15\x00\x00\x00\x69\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xfe\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\x00\x00\xab\x00\xdc\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x07\x01\x08\x01\x09\x01\x0a\x01\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xfe\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\x00\x00\xab\x00\xdc\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x06\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x07\x01\x08\x01\x09\x01\x0a\x01\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x7f\x00\x00\x00\x56\x04\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x80\x00\x81\x00\xab\x00\xac\x00\xad\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x56\x01\xae\x00\x00\x00\x6a\x01\x88\x00\x89\x00\x00\x00\xaf\x00\x8b\x00\x8c\x00\x6b\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x6c\x01\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x6d\x01\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x6a\x01\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\xa1\x01\xb6\x00\x00\x00\x00\x00\x6d\x01\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x6a\x01\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\x6b\x01\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x6c\x01\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x6d\x01\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x51\x02\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x36\x02\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x54\x02\xb6\x00\x00\x00\x00\x00\x36\x02\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\xd4\x00\xd5\x00\xd6\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\xd8\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\xd9\x00\xda\x00\xdb\x00\x00\x00\x50\x01\xab\x00\xdc\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xdd\x00\xcf\x02\x00\x00\x52\x01\x53\x01\x00\x00\xde\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x75\x00\x00\x00\x76\x00\x77\x00\x78\x00\xaf\x00\x79\x00\x00\x00\xb0\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xdf\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\xa9\x01\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\xcb\x02\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x36\x02\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x6e\x01\xb7\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\x00\x8c\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\xe2\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb3\x03\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb1\x03\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\xa9\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x50\x01\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xca\x01\x00\x00\x52\x01\x53\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x75\x00\xc0\x01\x76\x00\x77\x00\x78\x00\xaf\x00\x79\x00\x00\x00\xb0\x00\x7c\x00\x7d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc1\x01\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\xa9\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x15\x00\xa4\x03\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x05\x12\x05\x00\x00\x3d\x00\x3e\x00\x3f\x00\xae\x00\x72\x05\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x40\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xe6\xfd\xe6\xfd\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\xe6\xfd\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xfd\x00\x00\x00\x00\x00\x00\xe6\xfd\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\x00\x00\x00\x00\xe6\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\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\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\x00\x00\x4c\x00\xe6\xfd\x00\x00\x00\x00\x00\x00\xe6\xfd\x00\x00\x00\x00\xe6\xfd\xe6\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\x00\x00\x00\x00\x00\x00\xe6\xfd\x00\x00\xe6\xfd\x00\x00\xe6\xfd\x00\x00\xe6\xfd\x00\x00\xe6\xfd\x00\x00\x00\x00\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\x00\x00\x00\x00\x00\x00\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\x00\x00\xe6\xfd\x00\x00\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xe6\xfd\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\xe2\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\xb1\x03\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\xa9\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x00\x00\x00\x00\x00\x00\x00\x15\x00\xa4\x03\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\xe2\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\xe2\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\x00\xe2\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\xf8\x03\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\xac\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x00\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\xa2\x00\x13\x00\xa3\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa4\x00\x00\x00\x14\x00\xa5\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\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\xa7\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\xa8\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xab\x00\x00\x00\xad\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe2\x02\x00\x00\x3d\x01\xae\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\xb0\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\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x40\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\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\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x01\x00\x00\x00\x00\x00\x00\x4c\x00\xaf\x00\x36\x00\x37\x00\x38\x00\xb0\x01\x4c\x03\xa6\x02\x00\x00\x00\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x40\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\xa9\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\xc8\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x4c\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\xaa\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x36\x00\x37\x00\x38\x00\x24\x02\xff\x03\xd5\x02\x00\x00\x3b\x00\xa7\x02\xd6\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x40\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\xd7\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\xc8\x01\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x4c\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x02\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x00\x00\x00\x00\x00\x00\xb0\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x40\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\xaf\x00\x36\x00\x37\x00\x38\x00\x23\x02\xfe\x03\xd5\x02\x00\x00\x3b\x00\xa7\x02\xd6\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x40\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\xd7\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\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\x36\x00\x37\x00\x38\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x61\x03\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\x00\xb2\x00\x4c\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x9a\x03\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x40\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\xaf\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\xb2\x00\x4c\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\xa2\x00\x13\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x4b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xe3\x02\x4d\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\xb2\x00\x00\x00\xb3\x00\x00\x00\xb4\x00\x00\x00\xb5\x00\x00\x00\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb7\x00\x2b\x00\x87\x00\x40\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x68\x00\xb8\x00\xb9\x00\xba\x00\xbb\x00\xbc\x00\xbd\x00\xbe\x00\xbf\x00\xc0\x00\xc1\x00\xc2\x00\x00\x00\x4e\x00\x13\x00\x00\x00\xc3\x00\xc4\x00\xc5\x00\xc6\x00\x00\x00\xc7\x00\x14\x00\xc8\x00\xc9\x00\xca\x00\xcb\x00\xcc\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x4f\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x00\x00\x41\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\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x53\x00\x54\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\x55\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\xed\x01\x00\x00\xee\x01\xef\x01\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\xf0\x01\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x01\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x53\x00\x54\x00\x00\x00\x18\x04\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\xe9\x01\x40\x00\x00\x00\x00\x00\x6d\x01\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x53\x00\x54\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\x45\x02\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x46\x02\x47\x02\x00\x00\x00\x00\x00\x00\x00\x00\x48\x02\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x6c\x01\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6d\x01\x5f\x00\x60\x00\x61\x00\x62\x00\x49\x02\x4a\x02\x00\x00\x65\x00\x66\x00\x4b\x02\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x00\x00\x53\x00\x54\x00\x00\x04\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\xf4\x01\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x53\x00\x54\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\x55\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\xf2\x01\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x3f\x01\x00\x00\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\x40\x01\x41\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x00\x00\x53\x00\x54\x00\x06\x05\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x53\x00\x54\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\x55\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xd9\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x00\x00\x53\x00\x54\x00\x04\x05\x00\x00\x3d\x01\x00\x00\x3d\x00\x3e\x00\x3f\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x53\x00\x54\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\x55\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xab\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xab\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xd9\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xab\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xab\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xd9\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xab\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\xd4\x04\x00\x00\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x00\x00\xd5\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\x00\xab\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x56\x05\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x68\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x15\x05\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\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\x00\x00\x57\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x59\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5f\x00\x60\x00\x61\x00\x62\x00\x63\x00\x64\x00\x00\x00\x65\x00\x66\x00\x67\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\x36\x00\x37\x00\x38\x00\x00\x00\xff\x03\xa6\x02\x00\x00\x7f\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x56\x00\x00\x00\x9a\xfe\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x02\x06\x02\x61\x00\x62\x00\x00\x00\x89\x00\x00\x00\x65\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\xa9\x02\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf9\x02\x06\x02\x61\x00\x62\x00\x00\x00\x89\x00\x00\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\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\x6b\x00\x6c\x00\x00\x00\x15\x00\x00\x00\x6d\x00\x6e\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\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\x36\x00\x37\x00\x38\x00\x4b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x4c\x02\x4d\x02\x00\x00\x00\x00\x56\x00\x00\x00\x00\x00\x00\x00\x58\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x00\x00\x5b\x00\x00\x00\x5c\x00\x00\x00\x5d\x00\x00\x00\x5e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x06\x02\x61\x00\x62\x00\x40\x00\x00\x00\x00\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x00\x6a\x00\x36\x00\x37\x00\x38\x00\xcf\x03\x75\x04\xd5\x02\x00\x00\x3b\x00\xa7\x02\xd6\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6b\x00\x6c\x00\x00\x00\x00\x00\x00\x00\x6d\x00\x6e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x4b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x41\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xcc\x03\x40\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\x00\x00\x00\x00\x40\x00\x00\x00\x36\x00\x37\x00\x38\x00\xca\x03\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xd7\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xcb\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\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\x40\x00\x41\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x4b\x02\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x41\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xc9\x03\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\x00\x00\x00\x00\x40\x00\x00\x00\x36\x00\x37\x00\x38\x00\xc7\x03\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc8\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x4b\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xc6\x03\x00\x00\x00\x00\x00\x00\x00\x00\x40\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x40\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\x36\x00\x37\x00\x38\x00\xca\x03\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x41\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\x2a\x04\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\x40\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\x36\x00\x37\x00\x38\x00\xca\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x4c\x00\x3c\x00\x00\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\x23\x04\x00\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\xca\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x40\x00\x46\x00\x47\x00\x48\x00\x0f\x04\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\x00\x00\x00\x00\x4c\x00\x36\x00\x37\x00\x38\x00\x4b\x02\x00\x00\x3a\x00\x40\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\xe4\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\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\xca\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x42\x00\x43\x00\x40\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\xdd\x03\x00\x00\x41\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\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x4c\x00\x36\x00\x37\x00\x38\x00\xca\x03\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x56\x05\x00\x00\x00\x00\x00\x00\x00\x00\x41\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\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\x36\x00\x37\x00\x38\x00\x2d\x04\x00\x00\x3a\x00\x00\x00\x3b\x00\x4c\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x53\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x39\x00\x00\x00\x3a\x00\x41\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\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\x36\x00\x37\x00\x38\x00\xf2\x01\x00\x00\x3a\x00\x40\x00\x3b\x00\x4c\x00\x3c\x00\x00\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\x00\x00\x00\x00\x00\x00\x41\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\xf0\x01\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\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\x41\x00\x00\x00\x00\x00\x00\x00\x00\x00\x54\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\x40\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\x36\x00\x37\x00\x38\x00\x93\x01\x00\x00\x3a\x00\x41\x00\x3b\x00\x4c\x00\x3c\x00\x00\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\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\x41\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x00\x00\x00\x4c\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\x36\x00\x37\x00\x38\x00\x24\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x4c\x00\x3c\x00\x00\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\x41\x00\x00\x00\x36\x00\x37\x00\x38\x00\x23\x02\x00\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\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\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\x36\x00\x37\x00\x38\x00\xcf\x03\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x40\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\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x2d\x04\x00\x00\x3a\x00\x41\x00\x3b\x00\x00\x00\x3c\x00\x00\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\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\x40\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\x00\x00\x00\x00\x41\x00\x00\x00\x36\x00\x37\x00\x38\x00\xde\x03\x4c\x00\x3a\x00\x00\x00\x3b\x00\x00\x00\x3c\x00\x00\x00\x3d\x00\x3e\x00\x3f\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\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\x40\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\x36\x00\x37\x00\x38\x00\x00\x00\xfe\x03\xa6\x02\x00\x00\x4c\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x36\x00\x37\x00\x38\x00\x00\x00\x75\x04\xa6\x02\x00\x00\x41\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\xab\x03\xac\x03\xad\x03\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\xae\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x40\x00\x71\x00\x72\x00\x4c\x00\x36\x00\x37\x00\x38\x00\x00\x00\x76\x04\xa6\x02\x00\x00\x00\x00\xa7\x02\xa8\x02\x00\x00\x3d\x00\x3e\x00\x3f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x02\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\xaf\x03\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x00\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\xa9\x02\x40\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x36\x00\x37\x00\x38\x00\xf6\x04\x00\x00\x3a\x00\xa9\x02\x3b\x00\x00\x00\x3c\x00\x00\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\x42\x00\x43\x00\x00\x00\x44\x00\x45\x00\x13\x00\x46\x00\x47\x00\x48\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x40\x00\x00\x00\x4c\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x48\x03\x49\x03\x4a\x03\x00\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x00\x00\x00\x00\x24\x00\x41\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x2c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x49\x00\x4a\x00\x4b\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x4c\x00\x00\x00\x00\x00\x00\x00\x4b\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x2c\x02\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x4b\x03\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2c\x02\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17\x00\x18\x00\x19\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x4b\x03\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x21\x02\x8d\x05\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x02\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\x13\x00\x00\x00\x25\x00\x26\x00\x27\x00\xb9\x04\x29\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x21\x02\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x02\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\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\x00\x00\x00\x00\x00\x00\x20\x02\x21\x02\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00\x16\x00\x22\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x20\x02\x21\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x22\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x7f\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\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x00\x00\x13\x00\x00\x00\x84\x00\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\x86\x00\x00\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x2c\x00\x8a\x00\x8b\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\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\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe0\x01\xc9\x02\x13\x00\x00\x00\xe1\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00\xe2\x01\x00\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x00\x00\x8a\x00\x00\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\x8c\x00\x13\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x14\x00\xac\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\x04\x00\x00\x00\x00\x15\x00\x00\x00\xaf\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\xad\x01\x24\x00\x00\x00\x00\x00\xb0\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x13\x00\x7a\x00\x7b\x00\x00\x00\xb1\x04\xa0\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\xb2\x04\x00\x00\x00\x00\x2b\x00\x62\x00\x00\x00\xae\x04\x2c\x00\x65\x00\x15\x00\x00\x00\xaf\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\xb0\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x62\x00\x00\x00\x00\x00\x2c\x00\x65\x00\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\x00\x13\x00\x00\x00\x00\x00\x99\x01\x00\x00\x85\x00\x00\x00\x00\x00\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x15\x00\x00\x00\xaf\x04\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x3a\x05\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb1\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x62\x00\x00\x00\x00\x00\x2c\x00\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\xe0\x01\x00\x00\x00\x00\x00\x00\xe1\x01\x14\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x15\x00\x00\x00\x8a\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x2c\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x8a\x01\x00\x00\x8b\x01\x00\x00\x8c\x01\x14\x00\x8d\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x62\x00\x00\x00\x15\x00\x00\x00\x65\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x00\x00\x8a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x20\x01\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\x61\x00\x62\x00\x15\x00\x00\x00\x21\x01\x65\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x2a\x00\x00\x00\x00\x00\x63\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x2b\x00\x00\x00\x00\x00\x16\x00\x2c\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x15\x00\x2b\x00\x00\x00\x00\x00\x16\x00\x2c\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x00\x00\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x00\x00\x00\x00\x00\x00\x2c\x00\x00\x00\x80\x00\x81\x00\x00\x00\x00\x00\x00\x00\x00\x00\x82\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x13\x00\x00\x00\x00\x00\x77\x01\x6c\x01\x85\x00\x00\x00\x00\x00\x14\x00\x00\x00\x6d\x01\x00\x00\x00\x00\x2b\x00\x87\x00\x88\x00\x89\x00\x28\x01\x00\x00\x00\x00\x15\x00\x00\x00\x29\x01\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x2a\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x14\x00\x00\x00\x00\x00\x77\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x2b\x00\x87\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x39\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x14\x00\x00\x00\x00\x00\x2a\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x2b\x00\x87\x00\x00\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x77\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x83\x00\x14\x00\x00\x00\x00\x00\x2a\x01\x00\x00\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x2b\x00\x87\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\x13\x00\x8c\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x14\x00\x00\x00\x00\x00\xac\x01\x95\x00\x96\x00\x97\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\x7b\x02\x7c\x02\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x2b\x00\x87\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\xff\x00\x00\x00\x00\x00\x00\x0a\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\xfd\x02\x14\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x15\x00\x00\x00\xc7\x02\x00\x00\x16\x00\x2b\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\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\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x2c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2b\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x3a\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x15\x00\x00\x00\x00\x00\x2b\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\x00\x00\x00\x00\x00\x00\x00\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\x00\x00\x00\x00\x2c\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x15\x00\x00\x00\x00\x00\x2b\x00\x16\x00\x00\x00\x17\x00\x18\x00\x19\x00\x1a\x00\x1b\x00\x1c\x00\x13\x00\x1d\x00\x1e\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x3a\x04\x00\x00\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x15\x00\x00\x00\x00\x00\x2b\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\x00\x00\x00\x00\x00\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\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\x2b\x00\x00\x00\x17\x00\x18\x00\x19\x00\x50\x00\x51\x00\x52\x00\x13\x00\x00\x00\x00\x00\x1f\x00\x20\x00\x21\x00\x22\x00\x23\x00\x14\x00\x00\x00\x24\x00\x00\x00\x00\x00\x00\x00\xff\x01\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x15\x00\x00\x00\x00\x00\x00\x00\x61\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\x22\x04\x00\x00\x00\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\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\x61\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\xff\x01\x25\x00\x26\x00\x27\x00\x28\x00\x29\x00\x00\x00\x8c\x00\x5a\x01\x5b\x01\x61\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x61\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x63\x01\xa1\x01\x65\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x66\x01\x7d\x00\xa0\x00\x00\x00\x00\x00\x67\x01\x00\x00\x68\x01\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x5c\x01\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x63\x01\x64\x01\x65\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x66\x01\x7d\x00\xa0\x00\x00\x00\x00\x00\x67\x01\x00\x00\x68\x01\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9b\x01\x9c\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x00\x00\x00\x00\x9f\x01\x00\x00\x68\x01\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa5\x01\x00\x00\x00\x00\x00\x00\xa6\x01\xa7\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa3\x01\x00\x00\x00\x00\x00\x00\x00\x00\xa4\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x02\x00\x00\x00\x00\x88\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x87\x02\x00\x00\x00\x00\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\xc9\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa8\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\xa5\x03\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x9c\x03\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\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\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\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\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x73\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x5a\x01\x5b\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe6\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x5e\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\x5f\x01\x60\x01\x00\x00\x61\x01\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x62\x01\x9d\x01\x00\x00\x9e\x01\x11\x00\x79\x00\x7a\x00\x7b\x00\x7c\x00\x7d\x00\xa0\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa6\x03\x9f\x03\xa0\x03\xa1\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\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x00\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x9e\x03\x9f\x03\xa0\x03\xa1\x03\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x87\x04\xa0\x03\xa1\x03\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa2\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x99\x00\x9a\x00\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x72\x02\x00\x00\x71\x02\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x70\x02\x00\x00\x71\x02\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x67\x02\x68\x02\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\xb1\x03\xac\x03\xad\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x62\x03\x68\x02\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x69\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\xed\x03\xac\x03\xad\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xae\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0a\x01\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x8c\x00\xbb\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\xbc\x01\xbd\x01\xbe\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xea\x03\x9b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x85\x04\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x86\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x98\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe8\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x8c\x04\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\xae\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x3d\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xdf\x00\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x3c\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xd7\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xc9\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xc8\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xc2\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x95\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8f\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8e\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x01\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x63\x02\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x59\x02\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x58\x02\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x57\x02\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x56\x02\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xb9\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xb8\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xb4\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xa7\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xa4\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x63\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x2b\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x04\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xf6\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xf4\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xe9\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xe7\x03\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8d\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x8b\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x84\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x74\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xe8\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xc0\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xbf\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\xbe\x04\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x1e\x05\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x47\x05\x8e\x00\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x00\x00\x94\x01\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x00\x00\xcc\x02\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x00\x00\x3a\x04\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x8c\x00\x00\x00\xd5\x04\x00\x00\x8f\x00\x90\x00\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x8c\x00\x00\x00\x71\x00\x72\x00\x8f\x00\x5c\x02\x00\x00\x91\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x9e\x00\x70\x00\xd9\x02\x00\x00\x71\x00\x72\x00\x92\x00\x93\x00\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xac\x01\x95\x00\x96\x00\x97\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x7b\x02\xaa\x03\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\xaa\x01\x94\x00\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\xc6\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb8\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\xb4\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\xab\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xa9\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x59\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x1b\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x03\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x0e\x03\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\xc6\x01\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x77\x02\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x9c\x00\x9d\x00\x99\x01\x97\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x64\x02\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x31\x03\x95\x00\x96\x00\x97\x00\x00\x00\x00\x00\x00\x00\x9a\x01\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\x00\x00\x00\x00\x00\xa0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9c\x00\x9d\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9e\x00\x70\x00\x00\x00\x00\x00\x71\x00\x72\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x9f\x00\x0f\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00\x7a\x00\x7b\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"#--happyReduceArr = Happy_Data_Array.array (13, 818) [-	(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)-	]--happy_n_terms = 156 :: Int-happy_n_nonterms = 303 :: 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 happyOut292 happy_x_1 of { 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 happyOut263 happy_x_1 of { 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 happyOut286 happy_x_1 of { 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 happyOut270 happy_x_1 of { 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)-                               [mj AnnOpenP happy_var_1,mu AnnRarrow happy_var_2,mj AnnCloseP 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 = happySpecReduce_3  1# happyReduction_18-happyReduction_18 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_2 of { happy_var_2 -> -	happyIn17-		 (fromOL happy_var_2-	)}--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 { 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  2# happyReduction_20-happyReduction_20 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_1 of { happy_var_1 -> -	case happyOut19 happy_x_3 of { happy_var_3 -> -	happyIn18-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_21 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_21 = happySpecReduce_2  2# happyReduction_21-happyReduction_21 happy_x_2-	happy_x_1-	 =  case happyOut18 happy_x_1 of { happy_var_1 -> -	happyIn18-		 (happy_var_1-	)}--happyReduce_22 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_22 = happySpecReduce_1  2# happyReduction_22-happyReduction_22 happy_x_1-	 =  case happyOut19 happy_x_1 of { happy_var_1 -> -	happyIn18-		 (unitOL happy_var_1-	)}--happyReduce_23 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_23 = happyReduce 4# 3# happyReduction_23-happyReduction_23 (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 { happy_var_2 -> -	case happyOut30 happy_x_4 of { happy_var_4 -> -	happyIn19-		 (sL1 happy_var_1 $ HsUnit { hsunitName = happy_var_2-                              , hsunitBody = fromOL happy_var_4 }-	) `HappyStk` happyRest}}}--happyReduce_24 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_24 = happySpecReduce_1  4# happyReduction_24-happyReduction_24 happy_x_1-	 =  case happyOut24 happy_x_1 of { happy_var_1 -> -	happyIn20-		 (sL1 happy_var_1 $ HsUnitId happy_var_1 []-	)}--happyReduce_25 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_25 = happyReduce 4# 4# happyReduction_25-happyReduction_25 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut24 happy_x_1 of { happy_var_1 -> -	case happyOut21 happy_x_3 of { 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_26 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_26 = happySpecReduce_3  5# happyReduction_26-happyReduction_26 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut21 happy_x_1 of { happy_var_1 -> -	case happyOut22 happy_x_3 of { happy_var_3 -> -	happyIn21-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_27 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_27 = happySpecReduce_2  5# happyReduction_27-happyReduction_27 happy_x_2-	happy_x_1-	 =  case happyOut21 happy_x_1 of { happy_var_1 -> -	happyIn21-		 (happy_var_1-	)}--happyReduce_28 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_28 = happySpecReduce_1  5# happyReduction_28-happyReduction_28 happy_x_1-	 =  case happyOut22 happy_x_1 of { happy_var_1 -> -	happyIn21-		 (unitOL happy_var_1-	)}--happyReduce_29 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_29 = happySpecReduce_3  6# happyReduction_29-happyReduction_29 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut308 happy_x_1 of { happy_var_1 -> -	case happyOut23 happy_x_3 of { happy_var_3 -> -	happyIn22-		 (sLL happy_var_1 happy_var_3 $ (happy_var_1, happy_var_3)-	)}}--happyReduce_30 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_30 = happyReduce 4# 6# happyReduction_30-happyReduction_30 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut308 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { 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_31 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_31 = happySpecReduce_3  7# happyReduction_31-happyReduction_31 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut308 happy_x_2 of { 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_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 happyOut20 happy_x_1 of { happy_var_1 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	happyIn23-		 (sLL happy_var_1 happy_var_3 $ HsModuleId happy_var_1 happy_var_3-	)}}--happyReduce_33 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_33 = happySpecReduce_1  8# happyReduction_33-happyReduction_33 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn24-		 (sL1 happy_var_1 $ PackageName (getSTRING happy_var_1)-	)}--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 happyOut26 happy_x_1 of { happy_var_1 -> -	happyIn24-		 (sL1 happy_var_1 $ PackageName (unLoc 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  9# happyReduction_35-happyReduction_35 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn25-		 (sL1 happy_var_1 $ getVARID 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 $ getCONID 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 happyOut300 happy_x_1 of { happy_var_1 -> -	happyIn25-		 (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  10# happyReduction_38-happyReduction_38 happy_x_1-	 =  case happyOut25 happy_x_1 of { happy_var_1 -> -	happyIn26-		 (happy_var_1-	)}--happyReduce_39 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_39 = happySpecReduce_3  10# happyReduction_39-happyReduction_39 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut25 happy_x_1 of { happy_var_1 -> -	case happyOut26 happy_x_3 of { happy_var_3 -> -	happyIn26-		 (sLL happy_var_1 happy_var_3 $ appendFS (unLoc happy_var_1) (consFS '-' (unLoc happy_var_3))-	)}}--happyReduce_40 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_40 = happySpecReduce_0  11# happyReduction_40-happyReduction_40  =  happyIn27-		 (Nothing-	)--happyReduce_41 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_41 = happySpecReduce_3  11# happyReduction_41-happyReduction_41 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_2 of { happy_var_2 -> -	happyIn27-		 (Just (fromOL happy_var_2)-	)}--happyReduce_42 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_42 = happySpecReduce_3  12# happyReduction_42-happyReduction_42 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_1 of { happy_var_1 -> -	case happyOut29 happy_x_3 of { happy_var_3 -> -	happyIn28-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_43 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_43 = happySpecReduce_2  12# happyReduction_43-happyReduction_43 happy_x_2-	happy_x_1-	 =  case happyOut28 happy_x_1 of { happy_var_1 -> -	happyIn28-		 (happy_var_1-	)}--happyReduce_44 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_44 = happySpecReduce_1  12# happyReduction_44-happyReduction_44 happy_x_1-	 =  case happyOut29 happy_x_1 of { happy_var_1 -> -	happyIn28-		 (unitOL happy_var_1-	)}--happyReduce_45 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_45 = happySpecReduce_3  13# happyReduction_45-happyReduction_45 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut308 happy_x_1 of { happy_var_1 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	happyIn29-		 (sLL happy_var_1 happy_var_3 $ Renaming happy_var_1 (Just happy_var_3)-	)}}--happyReduce_46 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_46 = happySpecReduce_1  13# happyReduction_46-happyReduction_46 happy_x_1-	 =  case happyOut308 happy_x_1 of { happy_var_1 -> -	happyIn29-		 (sL1 happy_var_1    $ Renaming happy_var_1 Nothing-	)}--happyReduce_47 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_47 = happySpecReduce_3  14# happyReduction_47-happyReduction_47 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_2 of { happy_var_2 -> -	happyIn30-		 (happy_var_2-	)}--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 { 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  15# happyReduction_49-happyReduction_49 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_1 of { happy_var_1 -> -	case happyOut32 happy_x_3 of { happy_var_3 -> -	happyIn31-		 (happy_var_1 `appOL` unitOL happy_var_3-	)}}--happyReduce_50 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_50 = happySpecReduce_2  15# happyReduction_50-happyReduction_50 happy_x_2-	happy_x_1-	 =  case happyOut31 happy_x_1 of { happy_var_1 -> -	happyIn31-		 (happy_var_1-	)}--happyReduce_51 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_51 = happySpecReduce_1  15# happyReduction_51-happyReduction_51 happy_x_1-	 =  case happyOut32 happy_x_1 of { happy_var_1 -> -	happyIn31-		 (unitOL happy_var_1-	)}--happyReduce_52 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_52 = happyReduce 7# 16# happyReduction_52-happyReduction_52 (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 { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	case happyOut38 happy_x_4 of { happy_var_4 -> -	case happyOut48 happy_x_5 of { happy_var_5 -> -	case happyOut39 happy_x_7 of { 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_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 { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	case happyOut38 happy_x_4 of { happy_var_4 -> -	case happyOut48 happy_x_5 of { happy_var_5 -> -	case happyOut39 happy_x_7 of { 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_54 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_54 = happySpecReduce_3  16# happyReduction_54-happyReduction_54 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	happyIn32-		 (sL1 happy_var_2 $ DeclD ModuleD happy_var_3 Nothing-	)}}--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 happyOut308 happy_x_3 of { happy_var_3 -> -	happyIn32-		 (sL1 happy_var_2 $ DeclD SignatureD 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_1 of { happy_var_1 -> -	case happyOut20 happy_x_2 of { happy_var_2 -> -	case happyOut27 happy_x_3 of { happy_var_3 -> -	happyIn32-		 (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_2-                                              , idModRenaming = happy_var_3-                                              , idSignatureInclude = False })-	)}}}--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_3 of { happy_var_3 -> -	happyIn32-		 (sL1 happy_var_1 $ IncludeD (IncludeDecl { idUnitId = happy_var_3-                                              , idModRenaming = Nothing-                                              , idSignatureInclude = True })-	)}}--happyReduce_58 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_58 = happyMonadReduce 7# 17# happyReduction_58-happyReduction_58 (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 { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	case happyOut38 happy_x_4 of { happy_var_4 -> -	case happyOut48 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut39 happy_x_7 of { happy_var_7 -> -	( fileSrcSpan >>= \ loc ->-                ams (L 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_59 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_59 = happyMonadReduce 7# 18# 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 { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	case happyOut38 happy_x_4 of { happy_var_4 -> -	case happyOut48 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut39 happy_x_7 of { happy_var_7 -> -	( fileSrcSpan >>= \ loc ->-                ams (L 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_60 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_60 = happyMonadReduce 1# 18# happyReduction_60-happyReduction_60 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut40 happy_x_1 of { happy_var_1 -> -	( fileSrcSpan >>= \ loc ->-                   ams (L 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_61 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_61 = happySpecReduce_1  19# happyReduction_61-happyReduction_61 happy_x_1-	 =  case happyOut316 happy_x_1 of { happy_var_1 -> -	happyIn35-		 (happy_var_1-	)}--happyReduce_62 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_62 = happySpecReduce_0  19# happyReduction_62-happyReduction_62  =  happyIn35-		 (Nothing-	)--happyReduce_63 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_63 = happyMonadReduce 0# 20# happyReduction_63-happyReduction_63 (happyRest) tk-	 = happyThen ((( pushModuleContext))-	) (\r -> happyReturn (happyIn36 r))--happyReduce_64 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_64 = happyMonadReduce 0# 21# happyReduction_64-happyReduction_64 (happyRest) tk-	 = happyThen ((( pushModuleContext))-	) (\r -> happyReturn (happyIn37 r))--happyReduce_65 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_65 = happyMonadReduce 3# 22# happyReduction_65-happyReduction_65 (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 happyOut135 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 $ 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_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 happyOut135 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 $ 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_67 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_67 = happySpecReduce_0  22# happyReduction_67-happyReduction_67  =  happyIn38-		 (Nothing-	)--happyReduce_68 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_68 = happySpecReduce_3  23# happyReduction_68-happyReduction_68 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut41 happy_x_2 of { 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_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 happyOut41 happy_x_2 of { happy_var_2 -> -	happyIn39-		 ((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  24# happyReduction_70-happyReduction_70 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut41 happy_x_2 of { 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_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 happyOut41 happy_x_2 of { happy_var_2 -> -	happyIn40-		 (([],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_2  25# happyReduction_72-happyReduction_72 happy_x_2-	happy_x_1-	 =  case happyOut61 happy_x_1 of { happy_var_1 -> -	case happyOut42 happy_x_2 of { happy_var_2 -> -	happyIn41-		 ((happy_var_1, 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  26# happyReduction_73-happyReduction_73 happy_x_2-	happy_x_1-	 =  case happyOut63 happy_x_1 of { happy_var_1 -> -	case happyOut76 happy_x_2 of { happy_var_2 -> -	happyIn42-		 ((reverse happy_var_1, cvTopDecls 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 { happy_var_1 -> -	case happyOut75 happy_x_2 of { 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_1  26# happyReduction_75-happyReduction_75 happy_x_1-	 =  case happyOut62 happy_x_1 of { happy_var_1 -> -	happyIn42-		 ((reverse happy_var_1, [])-	)}--happyReduce_76 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_76 = happyMonadReduce 7# 27# happyReduction_76-happyReduction_76 (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 { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	case happyOut38 happy_x_4 of { happy_var_4 -> -	case happyOut48 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut44 happy_x_7 of { happy_var_7 -> -	( fileSrcSpan >>= \ loc ->-                   ams (L 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_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 { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut308 happy_x_3 of { happy_var_3 -> -	case happyOut38 happy_x_4 of { happy_var_4 -> -	case happyOut48 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	case happyOut44 happy_x_7 of { happy_var_7 -> -	( fileSrcSpan >>= \ loc ->-                   ams (L 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 1# 27# happyReduction_78-happyReduction_78 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut45 happy_x_1 of { happy_var_1 -> -	( fileSrcSpan >>= \ loc ->-                   return (L loc (HsModule Nothing Nothing happy_var_1 [] Nothing-                          Nothing)))})-	) (\r -> happyReturn (happyIn43 r))--happyReduce_79 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_79 = happySpecReduce_2  28# happyReduction_79-happyReduction_79 happy_x_2-	happy_x_1-	 =  case happyOut46 happy_x_2 of { happy_var_2 -> -	happyIn44-		 (happy_var_2-	)}--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 { 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  29# happyReduction_81-happyReduction_81 happy_x_2-	happy_x_1-	 =  case happyOut46 happy_x_2 of { happy_var_2 -> -	happyIn45-		 (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 { 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  30# happyReduction_83-happyReduction_83 happy_x_2-	happy_x_1-	 =  case happyOut47 happy_x_2 of { happy_var_2 -> -	happyIn46-		 (happy_var_2-	)}--happyReduce_84 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_84 = happySpecReduce_1  31# happyReduction_84-happyReduction_84 happy_x_1-	 =  case happyOut63 happy_x_1 of { happy_var_1 -> -	happyIn47-		 (happy_var_1-	)}--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 happyOut62 happy_x_1 of { 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 = happyMonadReduce 3# 32# happyReduction_86-happyReduction_86 (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 { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL 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_87 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_87 = happySpecReduce_0  32# happyReduction_87-happyReduction_87  =  happyIn48-		 (Nothing-	)--happyReduce_88 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_88 = happyMonadReduce 3# 33# happyReduction_88-happyReduction_88 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut51 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut51 happy_x_3 of { 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_89 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_89 = happySpecReduce_1  33# happyReduction_89-happyReduction_89 happy_x_1-	 =  case happyOut50 happy_x_1 of { happy_var_1 -> -	happyIn49-		 (happy_var_1-	)}--happyReduce_90 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_90 = happyMonadReduce 5# 34# happyReduction_90-happyReduction_90 (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 { happy_var_1 -> -	case happyOut53 happy_x_2 of { happy_var_2 -> -	case happyOut51 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut50 happy_x_5 of { 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_91 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_91 = happySpecReduce_3  34# happyReduction_91-happyReduction_91 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut51 happy_x_1 of { happy_var_1 -> -	case happyOut53 happy_x_2 of { happy_var_2 -> -	case happyOut51 happy_x_3 of { happy_var_3 -> -	happyIn50-		 (happy_var_1 `appOL` happy_var_2 `appOL` happy_var_3-	)}}}--happyReduce_92 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_92 = happySpecReduce_1  34# happyReduction_92-happyReduction_92 happy_x_1-	 =  case happyOut51 happy_x_1 of { happy_var_1 -> -	happyIn50-		 (happy_var_1-	)}--happyReduce_93 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_93 = happySpecReduce_2  35# happyReduction_93-happyReduction_93 happy_x_2-	happy_x_1-	 =  case happyOut52 happy_x_1 of { happy_var_1 -> -	case happyOut51 happy_x_2 of { happy_var_2 -> -	happyIn51-		 (happy_var_1 `appOL` happy_var_2-	)}}--happyReduce_94 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_94 = happySpecReduce_0  35# happyReduction_94-happyReduction_94  =  happyIn51-		 (nilOL-	)--happyReduce_95 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_95 = happySpecReduce_1  36# happyReduction_95-happyReduction_95 happy_x_1-	 =  case happyOut315 happy_x_1 of { happy_var_1 -> -	happyIn52-		 (unitOL (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> IEGroup n doc))-	)}--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 happyOut314 happy_x_1 of { happy_var_1 -> -	happyIn52-		 (unitOL (sL1 happy_var_1 (IEDocNamed ((fst . unLoc) happy_var_1)))-	)}--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 happyOut312 happy_x_1 of { happy_var_1 -> -	happyIn52-		 (unitOL (sL1 happy_var_1 (IEDoc (unLoc happy_var_1)))-	)}--happyReduce_98 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_98 = happyMonadReduce 2# 37# happyReduction_98-happyReduction_98 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut58 happy_x_1 of { happy_var_1 -> -	case happyOut54 happy_x_2 of { 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_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 happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut308 happy_x_2 of { happy_var_2 -> -	( amsu (sLL happy_var_1 happy_var_2 (IEModuleContents happy_var_2))-                                             [mj AnnModule happy_var_1])}})-	) (\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 happyOut263 happy_x_2 of { happy_var_2 -> -	( amsu (sLL happy_var_1 happy_var_2 (IEVar (sLL happy_var_1 happy_var_2 (IEPattern happy_var_2))))-                                             [mj AnnPattern 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 = happySpecReduce_0  38# happyReduction_101-happyReduction_101  =  happyIn54-		 (sL0 ([],ImpExpAbs)-	)--happyReduce_102 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_102 = happyMonadReduce 3# 38# happyReduction_102-happyReduction_102 (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 { 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_103 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_103 = happySpecReduce_0  39# happyReduction_103-happyReduction_103  =  happyIn55-		 (([],[])-	)--happyReduce_104 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_104 = happySpecReduce_1  39# happyReduction_104-happyReduction_104 happy_x_1-	 =  case happyOut56 happy_x_1 of { happy_var_1 -> -	happyIn55-		 (happy_var_1-	)}--happyReduce_105 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_105 = happyMonadReduce 3# 40# happyReduction_105-happyReduction_105 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut56 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut57 happy_x_3 of { happy_var_3 -> -	( case (head (snd happy_var_1)) of-                                                    l@(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_106 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_106 = happySpecReduce_1  40# happyReduction_106-happyReduction_106 happy_x_1-	 =  case happyOut57 happy_x_1 of { happy_var_1 -> -	happyIn56-		 ((fst (unLoc happy_var_1),[snd (unLoc happy_var_1)])-	)}--happyReduce_107 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_107 = happySpecReduce_1  41# happyReduction_107-happyReduction_107 happy_x_1-	 =  case happyOut58 happy_x_1 of { happy_var_1 -> -	happyIn57-		 (sL1 happy_var_1 ([],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 happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn57-		 (sL1 happy_var_1 ([mj AnnDotdot happy_var_1], sL1 happy_var_1 ImpExpQcWildcard)-	)}--happyReduce_109 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_109 = happySpecReduce_1  42# happyReduction_109-happyReduction_109 happy_x_1-	 =  case happyOut59 happy_x_1 of { happy_var_1 -> -	happyIn58-		 (sL1 happy_var_1 (ImpExpQcName happy_var_1)-	)}--happyReduce_110 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_110 = happyMonadReduce 2# 42# happyReduction_110-happyReduction_110 (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 { 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_111 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_111 = happySpecReduce_1  43# happyReduction_111-happyReduction_111 happy_x_1-	 =  case happyOut292 happy_x_1 of { happy_var_1 -> -	happyIn59-		 (happy_var_1-	)}--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 happyOut274 happy_x_1 of { 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_2  44# happyReduction_113-happyReduction_113 happy_x_2-	happy_x_1-	 =  case happyOut60 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn60-		 (mj AnnSemi happy_var_2 : happy_var_1-	)}}--happyReduce_114 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_114 = happySpecReduce_1  44# happyReduction_114-happyReduction_114 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn60-		 ([mj AnnSemi happy_var_1]-	)}--happyReduce_115 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_115 = happySpecReduce_2  45# happyReduction_115-happyReduction_115 happy_x_2-	happy_x_1-	 =  case happyOut61 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn61-		 (mj AnnSemi happy_var_2 : happy_var_1-	)}}--happyReduce_116 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_116 = happySpecReduce_0  45# happyReduction_116-happyReduction_116  =  happyIn61-		 ([]-	)--happyReduce_117 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_117 = happySpecReduce_2  46# happyReduction_117-happyReduction_117 happy_x_2-	happy_x_1-	 =  case happyOut63 happy_x_1 of { happy_var_1 -> -	case happyOut64 happy_x_2 of { happy_var_2 -> -	happyIn62-		 (happy_var_2 : happy_var_1-	)}}--happyReduce_118 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_118 = happyMonadReduce 3# 47# happyReduction_118-happyReduction_118 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut63 happy_x_1 of { happy_var_1 -> -	case happyOut64 happy_x_2 of { happy_var_2 -> -	case happyOut60 happy_x_3 of { happy_var_3 -> -	( ams happy_var_2 happy_var_3 >> return (happy_var_2 : happy_var_1))}}})-	) (\r -> happyReturn (happyIn63 r))--happyReduce_119 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_119 = happySpecReduce_0  47# happyReduction_119-happyReduction_119  =  happyIn63-		 ([]-	)--happyReduce_120 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_120 = happyMonadReduce 8# 48# happyReduction_120-happyReduction_120 (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 { happy_var_2 -> -	case happyOut66 happy_x_3 of { happy_var_3 -> -	case happyOut68 happy_x_4 of { happy_var_4 -> -	case happyOut67 happy_x_5 of { happy_var_5 -> -	case happyOut308 happy_x_6 of { happy_var_6 -> -	case happyOut69 happy_x_7 of { happy_var_7 -> -	case happyOut70 happy_x_8 of { happy_var_8 -> -	( ams (L (comb4 happy_var_1 happy_var_6 (snd happy_var_7) happy_var_8) $-                  ImportDecl { 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_121 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_121 = happySpecReduce_2  49# happyReduction_121-happyReduction_121 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_122 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_122 = happySpecReduce_0  49# happyReduction_122-happyReduction_122  =  happyIn65-		 ((([],NoSourceText),False)-	)--happyReduce_123 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_123 = happySpecReduce_1  50# happyReduction_123-happyReduction_123 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn66-		 (([mj AnnSafe happy_var_1],True)-	)}--happyReduce_124 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_124 = happySpecReduce_0  50# happyReduction_124-happyReduction_124  =  happyIn66-		 (([],False)-	)--happyReduce_125 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_125 = happyMonadReduce 1# 51# happyReduction_125-happyReduction_125 (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_126 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_126 = happySpecReduce_0  51# happyReduction_126-happyReduction_126  =  happyIn67-		 (([],Nothing)-	)--happyReduce_127 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_127 = happySpecReduce_1  52# happyReduction_127-happyReduction_127 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn68-		 (([mj AnnQualified happy_var_1],True)-	)}--happyReduce_128 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_128 = happySpecReduce_0  52# happyReduction_128-happyReduction_128  =  happyIn68-		 (([],False)-	)--happyReduce_129 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_129 = happySpecReduce_2  53# happyReduction_129-happyReduction_129 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut308 happy_x_2 of { happy_var_2 -> -	happyIn69-		 (([mj AnnAs happy_var_1]-                                                 ,sLL happy_var_1 happy_var_2 (Just happy_var_2))-	)}}--happyReduce_130 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_130 = happySpecReduce_0  53# happyReduction_130-happyReduction_130  =  happyIn69-		 (([],noLoc Nothing)-	)--happyReduce_131 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_131 = happyMonadReduce 1# 54# happyReduction_131-happyReduction_131 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut71 happy_x_1 of { happy_var_1 -> -	( let (b, ie) = unLoc happy_var_1 in-                                       checkImportSpec ie-                                        >>= \checkedIe ->-                                          return (L (gl happy_var_1) (Just (b, checkedIe))))})-	) (\r -> happyReturn (happyIn70 r))--happyReduce_132 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_132 = happySpecReduce_0  54# happyReduction_132-happyReduction_132  =  happyIn70-		 (noLoc Nothing-	)--happyReduce_133 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_133 = happyMonadReduce 3# 55# happyReduction_133-happyReduction_133 (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 { 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_134 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_134 = happyMonadReduce 4# 55# happyReduction_134-happyReduction_134 (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 { 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_135 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_135 = happySpecReduce_0  56# happyReduction_135-happyReduction_135  =  happyIn72-		 (noLoc (NoSourceText,9)-	)--happyReduce_136 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_136 = happyMonadReduce 1# 56# happyReduction_136-happyReduction_136 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( checkPrecP (sL1 happy_var_1 (getINTEGERs happy_var_1,fromInteger (il_value (getINTEGER happy_var_1)))))})-	) (\r -> happyReturn (happyIn72 r))--happyReduce_137 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_137 = happySpecReduce_1  57# happyReduction_137-happyReduction_137 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn73-		 (sL1 happy_var_1 InfixN-	)}--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 InfixL-	)}--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 InfixR-	)}--happyReduce_140 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_140 = happyMonadReduce 3# 58# happyReduction_140-happyReduction_140 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut74 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut281 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) `appOL` unitOL happy_var_3)))}}})-	) (\r -> happyReturn (happyIn74 r))--happyReduce_141 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_141 = happySpecReduce_1  58# happyReduction_141-happyReduction_141 happy_x_1-	 =  case happyOut281 happy_x_1 of { happy_var_1 -> -	happyIn74-		 (sL1 happy_var_1 (unitOL happy_var_1)-	)}--happyReduce_142 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_142 = happySpecReduce_2  59# happyReduction_142-happyReduction_142 happy_x_2-	happy_x_1-	 =  case happyOut76 happy_x_1 of { happy_var_1 -> -	case happyOut77 happy_x_2 of { happy_var_2 -> -	happyIn75-		 (happy_var_1 `snocOL` happy_var_2-	)}}--happyReduce_143 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_143 = happyMonadReduce 3# 60# happyReduction_143-happyReduction_143 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut76 happy_x_1 of { happy_var_1 -> -	case happyOut77 happy_x_2 of { happy_var_2 -> -	case happyOut60 happy_x_3 of { happy_var_3 -> -	( ams happy_var_2 happy_var_3 >> return (happy_var_1 `snocOL` happy_var_2))}}})-	) (\r -> happyReturn (happyIn76 r))--happyReduce_144 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_144 = happySpecReduce_0  60# happyReduction_144-happyReduction_144  =  happyIn76-		 (nilOL-	)--happyReduce_145 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_145 = happySpecReduce_1  61# happyReduction_145-happyReduction_145 happy_x_1-	 =  case happyOut78 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (sL1 happy_var_1 (TyClD (unLoc happy_var_1))-	)}--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 happyOut79 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (sL1 happy_var_1 (TyClD (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 happyOut80 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (sL1 happy_var_1 (InstD (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 happyOut101 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (sLL happy_var_1 happy_var_1 (DerivD (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 happyOut102 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (sL1 happy_var_1 (RoleAnnotD (unLoc happy_var_1))-	)}--happyReduce_150 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_150 = happyMonadReduce 4# 61# happyReduction_150-happyReduction_150 (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 happyOut164 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (DefD (DefaultDecl happy_var_3)))-                                                         [mj AnnDefault happy_var_1-                                                         ,mop happy_var_2,mcp happy_var_4])}}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_151 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_151 = happyMonadReduce 2# 61# happyReduction_151-happyReduction_151 (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 { 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_152 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_152 = happyMonadReduce 3# 61# happyReduction_152-happyReduction_152 (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 happyOut133 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ WarningD (Warnings (getDEPRECATED_PRAGs happy_var_1) (fromOL happy_var_2)))-                                                       [mo happy_var_1,mc happy_var_3])}}})-	) (\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 happyOut131 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ WarningD (Warnings (getWARNING_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 happyOut124 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ RuleD (HsRules (getRULES_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 5# 61# happyReduction_155-happyReduction_155 (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 happyOut292 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut200 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 $ VectD (HsVect (getVECT_PRAGs happy_var_1) happy_var_2 happy_var_4))-                                                    [mo happy_var_1,mj AnnEqual happy_var_3-                                                    ,mc happy_var_5])}}}}})-	) (\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 happyOut292 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ VectD (HsNoVect (getNOVECT_PRAGs happy_var_1) 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 = happyMonadReduce 4# 61# happyReduction_157-happyReduction_157 (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 happyOut271 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $-                                    VectD (HsVectTypeIn (getVECT_PRAGs happy_var_1) False happy_var_3 Nothing))-                                    [mo happy_var_1,mj AnnType happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_158 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_158 = happyMonadReduce 4# 61# happyReduction_158-happyReduction_158 (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 happyOut271 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $-                                    VectD (HsVectTypeIn (getVECT_SCALAR_PRAGs happy_var_1) True happy_var_3 Nothing))-                                    [mo happy_var_1,mj AnnType happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_159 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_159 = happyMonadReduce 6# 61# happyReduction_159-happyReduction_159 (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 happyOut271 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut271 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( ams (sLL happy_var_1 happy_var_6 $-                                    VectD (HsVectTypeIn (getVECT_PRAGs happy_var_1) False happy_var_3 (Just happy_var_5)))-                                    [mo happy_var_1,mj AnnType happy_var_2,mj AnnEqual happy_var_4,mc happy_var_6])}}}}}})-	) (\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 6# 61# happyReduction_160-happyReduction_160 (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 happyOut271 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut271 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( ams (sLL happy_var_1 happy_var_6 $-                                    VectD (HsVectTypeIn (getVECT_SCALAR_PRAGs happy_var_1) True happy_var_3 (Just happy_var_5)))-                                    [mo happy_var_1,mj AnnType happy_var_2,mj AnnEqual happy_var_4,mc happy_var_6])}}}}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_161 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_161 = happyMonadReduce 4# 61# 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 happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut271 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4  $ VectD (HsVectClassIn (getVECT_PRAGs happy_var_1) happy_var_3))-                                                 [mo happy_var_1,mj AnnClass happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn77 r))--happyReduce_162 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_162 = happySpecReduce_1  61# happyReduction_162-happyReduction_162 happy_x_1-	 =  case happyOut137 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (happy_var_1-	)}--happyReduce_163 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_163 = happySpecReduce_1  61# happyReduction_163-happyReduction_163 happy_x_1-	 =  case happyOut191 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (happy_var_1-	)}--happyReduce_164 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_164 = happySpecReduce_1  61# happyReduction_164-happyReduction_164 happy_x_1-	 =  case happyOut202 happy_x_1 of { happy_var_1 -> -	happyIn77-		 (sLL happy_var_1 happy_var_1 $ mkSpliceDecl happy_var_1-	)}--happyReduce_165 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_165 = happyMonadReduce 4# 62# 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 happyOut99 happy_x_2 of { happy_var_2 -> -	case happyOut169 happy_x_3 of { happy_var_3 -> -	case happyOut115 happy_x_4 of { 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_166 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_166 = happyMonadReduce 4# 63# 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 happyOut155 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut152 happy_x_4 of { 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_167 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_167 = happyMonadReduce 6# 63# 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 happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { happy_var_3 -> -	case happyOut97 happy_x_4 of { happy_var_4 -> -	case happyOut83 happy_x_5 of { happy_var_5 -> -	case happyOut86 happy_x_6 of { 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_168 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_168 = happyMonadReduce 5# 63# happyReduction_168-happyReduction_168 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOut100 happy_x_2 of { happy_var_2 -> -	case happyOut99 happy_x_3 of { happy_var_3 -> -	case happyOut178 happy_x_4 of { happy_var_4 -> -	case happyOut186 happy_x_5 of { 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_169 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_169 = happyMonadReduce 6# 63# happyReduction_169-happyReduction_169 (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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOut100 happy_x_2 of { happy_var_2 -> -	case happyOut99 happy_x_3 of { happy_var_3 -> -	case happyOut95 happy_x_4 of { happy_var_4 -> -	case happyOut174 happy_x_5 of { happy_var_5 -> -	case happyOut186 happy_x_6 of { 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_170 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_170 = happyMonadReduce 4# 63# happyReduction_170-happyReduction_170 (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 { happy_var_3 -> -	case happyOut96 happy_x_4 of { 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_171 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_171 = happyMonadReduce 4# 64# happyReduction_171-happyReduction_171 (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 { happy_var_2 -> -	case happyOut162 happy_x_3 of { happy_var_3 -> -	case happyOut119 happy_x_4 of { happy_var_4 -> -	( do { (binds, sigs, _, ats, adts, _) <- cvBindsAndSigs (snd $ unLoc happy_var_4)-             ; let cid = ClsInstDecl { 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 (L (comb3 happy_var_1 (hsSigType happy_var_3) happy_var_4) (ClsInstD { cid_inst = cid }))-                   (mj AnnInstance happy_var_1 : (fst $ unLoc happy_var_4)) })}}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_172 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_172 = happyMonadReduce 3# 64# happyReduction_172-happyReduction_172 (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 happyOut89 happy_x_3 of { 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_173 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_173 = happyMonadReduce 6# 64# happyReduction_173-happyReduction_173 (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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut100 happy_x_3 of { happy_var_3 -> -	case happyOut99 happy_x_4 of { happy_var_4 -> -	case happyOut178 happy_x_5 of { happy_var_5 -> -	case happyOut186 happy_x_6 of { 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 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_5)))}}}}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_174 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_174 = happyMonadReduce 7# 64# happyReduction_174-happyReduction_174 (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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut100 happy_x_3 of { happy_var_3 -> -	case happyOut99 happy_x_4 of { happy_var_4 -> -	case happyOut95 happy_x_5 of { happy_var_5 -> -	case happyOut174 happy_x_6 of { happy_var_6 -> -	case happyOut186 happy_x_7 of { 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 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_5)++(fst $ unLoc happy_var_6)))}}}}}}})-	) (\r -> happyReturn (happyIn80 r))--happyReduce_175 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_175 = happyMonadReduce 2# 65# 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 (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_176 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_176 = happyMonadReduce 2# 65# 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 (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_177 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_177 = happyMonadReduce 2# 65# 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 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_178 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_178 = happyMonadReduce 2# 65# happyReduction_178-happyReduction_178 (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_179 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_179 = happySpecReduce_0  65# happyReduction_179-happyReduction_179  =  happyIn81-		 (Nothing-	)--happyReduce_180 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_180 = happyMonadReduce 1# 66# 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 StockStrategy))-                                       [mj AnnStock happy_var_1])})-	) (\r -> happyReturn (happyIn82 r))--happyReduce_181 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_181 = happyMonadReduce 1# 66# happyReduction_181-happyReduction_181 (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 (happyIn82 r))--happyReduce_182 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_182 = happyMonadReduce 1# 66# happyReduction_182-happyReduction_182 (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 (happyIn82 r))--happyReduce_183 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_183 = happySpecReduce_0  66# happyReduction_183-happyReduction_183  =  happyIn82-		 (Nothing-	)--happyReduce_184 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_184 = happySpecReduce_0  67# happyReduction_184-happyReduction_184  =  happyIn83-		 (noLoc ([], Nothing)-	)--happyReduce_185 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_185 = happySpecReduce_2  67# happyReduction_185-happyReduction_185 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut84 happy_x_2 of { happy_var_2 -> -	happyIn83-		 (sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]-                                                , Just (happy_var_2))-	)}}--happyReduce_186 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_186 = happyMonadReduce 3# 68# happyReduction_186-happyReduction_186 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut290 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut85 happy_x_3 of { 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 (happyIn84 r))--happyReduce_187 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_187 = happySpecReduce_2  69# happyReduction_187-happyReduction_187 happy_x_2-	happy_x_1-	 =  case happyOut85 happy_x_1 of { happy_var_1 -> -	case happyOut290 happy_x_2 of { happy_var_2 -> -	happyIn85-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_188 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_188 = happySpecReduce_1  69# happyReduction_188-happyReduction_188 happy_x_1-	 =  case happyOut290 happy_x_1 of { happy_var_1 -> -	happyIn85-		 (sLL happy_var_1 happy_var_1 [happy_var_1]-	)}--happyReduce_189 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_189 = happySpecReduce_0  70# happyReduction_189-happyReduction_189  =  happyIn86-		 (noLoc ([],OpenTypeFamily)-	)--happyReduce_190 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_190 = happySpecReduce_2  70# happyReduction_190-happyReduction_190 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut87 happy_x_2 of { happy_var_2 -> -	happyIn86-		 (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_191 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_191 = happySpecReduce_3  71# happyReduction_191-happyReduction_191 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut88 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn87-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]-                                                ,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  71# happyReduction_192-happyReduction_192 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut88 happy_x_2 of { happy_var_2 -> -	happyIn87-		 (let L loc _ = happy_var_2 in-                                             L loc ([],Just (unLoc happy_var_2))-	)}--happyReduce_193 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_193 = happySpecReduce_3  71# happyReduction_193-happyReduction_193 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 -> -	happyIn87-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mj AnnDotdot happy_var_2-                                                 ,mcc happy_var_3],Nothing)-	)}}}--happyReduce_194 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_194 = happySpecReduce_3  71# happyReduction_194-happyReduction_194 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn87-		 (let L loc _ = happy_var_2 in-                                             L loc ([mj AnnDotdot happy_var_2],Nothing)-	)}--happyReduce_195 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_195 = happyMonadReduce 3# 72# happyReduction_195-happyReduction_195 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut88 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut89 happy_x_3 of { happy_var_3 -> -	( let L loc (anns, eqn) = happy_var_3 in-                                         asl (unLoc happy_var_1) happy_var_2 (L loc eqn)-                                         >> ams happy_var_3 anns-                                         >> return (sLL happy_var_1 happy_var_3 (L loc eqn : unLoc happy_var_1)))}}})-	) (\r -> happyReturn (happyIn88 r))--happyReduce_196 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_196 = happyMonadReduce 2# 72# happyReduction_196-happyReduction_196 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut88 happy_x_1 of { 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 (happyIn88 r))--happyReduce_197 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_197 = happyMonadReduce 1# 72# happyReduction_197-happyReduction_197 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut89 happy_x_1 of { happy_var_1 -> -	( let L loc (anns, eqn) = happy_var_1 in-                                         ams happy_var_1 anns-                                         >> return (sLL happy_var_1 happy_var_1 [L loc eqn]))})-	) (\r -> happyReturn (happyIn88 r))--happyReduce_198 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_198 = happySpecReduce_0  72# happyReduction_198-happyReduction_198  =  happyIn88-		 (noLoc []-	)--happyReduce_199 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_199 = happyMonadReduce 3# 73# happyReduction_199-happyReduction_199 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut155 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut151 happy_x_3 of { happy_var_3 -> -	( do { (eqn,ann) <- mkTyFamInstEqn happy_var_1 happy_var_3-                    ; return (sLL happy_var_1 happy_var_3 (mj AnnEqual happy_var_2:ann, eqn))  })}}})-	) (\r -> happyReturn (happyIn89 r))--happyReduce_200 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_200 = happyMonadReduce 4# 74# 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 happyOut91 happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { happy_var_3 -> -	case happyOut96 happy_x_4 of { 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 (happyIn90 r))--happyReduce_201 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_201 = happyMonadReduce 3# 74# 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 happyOut155 happy_x_2 of { happy_var_2 -> -	case happyOut98 happy_x_3 of { 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 (happyIn90 r))--happyReduce_202 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_202 = happyMonadReduce 4# 74# 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 happyOut155 happy_x_3 of { happy_var_3 -> -	case happyOut98 happy_x_4 of { 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 (happyIn90 r))--happyReduce_203 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_203 = happyMonadReduce 2# 74# 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 happyOut89 happy_x_2 of { 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 (happyIn90 r))--happyReduce_204 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_204 = happyMonadReduce 3# 74# 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 happyOut89 happy_x_3 of { 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 (happyIn90 r))--happyReduce_205 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_205 = happySpecReduce_0  75# happyReduction_205-happyReduction_205  =  happyIn91-		 ([]-	)--happyReduce_206 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_206 = happySpecReduce_1  75# happyReduction_206-happyReduction_206 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn91-		 ([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  76# happyReduction_207-happyReduction_207  =  happyIn92-		 ([]-	)--happyReduce_208 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_208 = happySpecReduce_1  76# happyReduction_208-happyReduction_208 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn92-		 ([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# 77# 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 happyOut92 happy_x_2 of { happy_var_2 -> -	case happyOut89 happy_x_3 of { 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 (happyIn93 r))--happyReduce_210 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_210 = happyMonadReduce 5# 77# 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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOut100 happy_x_2 of { happy_var_2 -> -	case happyOut99 happy_x_3 of { happy_var_3 -> -	case happyOut178 happy_x_4 of { happy_var_4 -> -	case happyOut186 happy_x_5 of { 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 happy_var_3-                                    Nothing (reverse (snd $ unLoc happy_var_4))-                                            (fmap reverse happy_var_5))-                       ((fst $ unLoc happy_var_1):(fst $ unLoc happy_var_4)))}}}}})-	) (\r -> happyReturn (happyIn93 r))--happyReduce_211 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_211 = happyMonadReduce 6# 77# 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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut100 happy_x_3 of { happy_var_3 -> -	case happyOut99 happy_x_4 of { happy_var_4 -> -	case happyOut178 happy_x_5 of { happy_var_5 -> -	case happyOut186 happy_x_6 of { 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 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_5)))}}}}}})-	) (\r -> happyReturn (happyIn93 r))--happyReduce_212 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_212 = happyMonadReduce 6# 77# 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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOut100 happy_x_2 of { happy_var_2 -> -	case happyOut99 happy_x_3 of { happy_var_3 -> -	case happyOut95 happy_x_4 of { happy_var_4 -> -	case happyOut174 happy_x_5 of { happy_var_5 -> -	case happyOut186 happy_x_6 of { 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-                                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_4)++(fst $ unLoc happy_var_5)))}}}}}})-	) (\r -> happyReturn (happyIn93 r))--happyReduce_213 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_213 = happyMonadReduce 7# 77# 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 happyOut94 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut100 happy_x_3 of { happy_var_3 -> -	case happyOut99 happy_x_4 of { happy_var_4 -> -	case happyOut95 happy_x_5 of { happy_var_5 -> -	case happyOut174 happy_x_6 of { happy_var_6 -> -	case happyOut186 happy_x_7 of { 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-                                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_5)++(fst $ unLoc happy_var_6)))}}}}}}})-	) (\r -> happyReturn (happyIn93 r))--happyReduce_214 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_214 = happySpecReduce_1  78# happyReduction_214-happyReduction_214 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn94-		 (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  78# happyReduction_215-happyReduction_215 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn94-		 (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  79# happyReduction_216-happyReduction_216  =  happyIn95-		 (noLoc     ([]               , Nothing)-	)--happyReduce_217 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_217 = happySpecReduce_2  79# happyReduction_217-happyReduction_217 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut173 happy_x_2 of { happy_var_2 -> -	happyIn95-		 (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  80# happyReduction_218-happyReduction_218  =  happyIn96-		 (noLoc     ([]               , noLoc NoSig           )-	)--happyReduce_219 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_219 = happySpecReduce_2  80# happyReduction_219-happyReduction_219 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut173 happy_x_2 of { happy_var_2 -> -	happyIn96-		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], sLL happy_var_1 happy_var_2 (KindSig 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  81# happyReduction_220-happyReduction_220  =  happyIn97-		 (noLoc     ([]               , noLoc      NoSig       )-	)--happyReduce_221 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_221 = happySpecReduce_2  81# happyReduction_221-happyReduction_221 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut173 happy_x_2 of { happy_var_2 -> -	happyIn97-		 (sLL happy_var_1 happy_var_2 ([mu AnnDcolon happy_var_1], sLL happy_var_1 happy_var_2 (KindSig  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  81# happyReduction_222-happyReduction_222 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut168 happy_x_2 of { happy_var_2 -> -	happyIn97-		 (sLL happy_var_1 happy_var_2 ([mj AnnEqual happy_var_1] , sLL happy_var_1 happy_var_2 (TyVarSig 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  82# happyReduction_223-happyReduction_223  =  happyIn98-		 (noLoc ([], (noLoc NoSig, Nothing))-	)--happyReduce_224 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_224 = happySpecReduce_2  82# happyReduction_224-happyReduction_224 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut173 happy_x_2 of { happy_var_2 -> -	happyIn98-		 (sLL happy_var_1 happy_var_2 ( [mu AnnDcolon happy_var_1]-                                 , (sLL happy_var_2 happy_var_2 (KindSig 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# 82# 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 happyOut168 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut84 happy_x_4 of { happy_var_4 -> -	happyIn98-		 (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 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# 83# happyReduction_226-happyReduction_226 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut153 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { 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 (happyIn99 r))--happyReduce_227 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_227 = happySpecReduce_1  83# happyReduction_227-happyReduction_227 happy_x_1-	 =  case happyOut155 happy_x_1 of { happy_var_1 -> -	happyIn99-		 (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 4# 84# happyReduction_228-happyReduction_228 (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 (happyIn100 r))--happyReduce_229 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_229 = happyMonadReduce 3# 84# happyReduction_229-happyReduction_229 (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 (happyIn100 r))--happyReduce_230 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_230 = happySpecReduce_0  84# happyReduction_230-happyReduction_230  =  happyIn100-		 (Nothing-	)--happyReduce_231 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_231 = happyMonadReduce 5# 85# happyReduction_231-happyReduction_231 (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 happyOut82 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut81 happy_x_4 of { happy_var_4 -> -	case happyOut162 happy_x_5 of { 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 happy_var_5 happy_var_2 happy_var_4))-                            [mj AnnDeriving happy_var_1, mj AnnInstance happy_var_3] })}}}}})-	) (\r -> happyReturn (happyIn101 r))--happyReduce_232 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_232 = happyMonadReduce 4# 86# 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 happyOut273 happy_x_3 of { happy_var_3 -> -	case happyOut103 happy_x_4 of { 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 (happyIn102 r))--happyReduce_233 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_233 = happySpecReduce_0  87# happyReduction_233-happyReduction_233  =  happyIn103-		 (noLoc []-	)--happyReduce_234 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_234 = happySpecReduce_1  87# happyReduction_234-happyReduction_234 happy_x_1-	 =  case happyOut104 happy_x_1 of { happy_var_1 -> -	happyIn103-		 (happy_var_1-	)}--happyReduce_235 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_235 = happySpecReduce_1  88# happyReduction_235-happyReduction_235 happy_x_1-	 =  case happyOut105 happy_x_1 of { happy_var_1 -> -	happyIn104-		 (sLL happy_var_1 happy_var_1 [happy_var_1]-	)}--happyReduce_236 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_236 = happySpecReduce_2  88# happyReduction_236-happyReduction_236 happy_x_2-	happy_x_1-	 =  case happyOut104 happy_x_1 of { happy_var_1 -> -	case happyOut105 happy_x_2 of { happy_var_2 -> -	happyIn104-		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1-	)}}--happyReduce_237 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_237 = happySpecReduce_1  89# happyReduction_237-happyReduction_237 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn105-		 (sL1 happy_var_1 $ Just $ getVARID happy_var_1-	)}--happyReduce_238 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_238 = happySpecReduce_1  89# happyReduction_238-happyReduction_238 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn105-		 (sL1 happy_var_1 Nothing-	)}--happyReduce_239 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_239 = happyMonadReduce 4# 90# happyReduction_239-happyReduction_239 (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 happyOut107 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut239 happy_x_4 of { happy_var_4 -> -	(      let (name, args,as ) = happy_var_2 in-                 ams (sLL happy_var_1 happy_var_4 . ValD $ mkPatSynBind name args happy_var_4-                                                    ImplicitBidirectional)-               (as ++ [mj AnnPattern happy_var_1, mj AnnEqual happy_var_3]))}}}})-	) (\r -> happyReturn (happyIn106 r))--happyReduce_240 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_240 = happyMonadReduce 4# 90# happyReduction_240-happyReduction_240 (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 happyOut107 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut239 happy_x_4 of { happy_var_4 -> -	(    let (name, args, as) = happy_var_2 in-               ams (sLL happy_var_1 happy_var_4 . ValD $ mkPatSynBind name args happy_var_4 Unidirectional)-               (as ++ [mj AnnPattern happy_var_1,mu AnnLarrow happy_var_3]))}}}})-	) (\r -> happyReturn (happyIn106 r))--happyReduce_241 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_241 = happyMonadReduce 5# 90# happyReduction_241-happyReduction_241 (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 happyOut107 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut239 happy_x_4 of { happy_var_4 -> -	case happyOut110 happy_x_5 of { 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 $-                           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 (happyIn106 r))--happyReduce_242 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_242 = happySpecReduce_2  91# happyReduction_242-happyReduction_242 happy_x_2-	happy_x_1-	 =  case happyOut265 happy_x_1 of { happy_var_1 -> -	case happyOut108 happy_x_2 of { happy_var_2 -> -	happyIn107-		 ((happy_var_1, PrefixCon happy_var_2, [])-	)}}--happyReduce_243 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_243 = happySpecReduce_3  91# happyReduction_243-happyReduction_243 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut294 happy_x_1 of { happy_var_1 -> -	case happyOut269 happy_x_2 of { happy_var_2 -> -	case happyOut294 happy_x_3 of { happy_var_3 -> -	happyIn107-		 ((happy_var_2, InfixCon happy_var_1 happy_var_3, [])-	)}}}--happyReduce_244 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_244 = happyReduce 4# 91# happyReduction_244-happyReduction_244 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut265 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut109 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn107-		 ((happy_var_1, RecCon happy_var_3, [moc happy_var_2, mcc happy_var_4] )-	) `HappyStk` happyRest}}}}--happyReduce_245 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_245 = happySpecReduce_0  92# happyReduction_245-happyReduction_245  =  happyIn108-		 ([]-	)--happyReduce_246 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_246 = happySpecReduce_2  92# happyReduction_246-happyReduction_246 happy_x_2-	happy_x_1-	 =  case happyOut294 happy_x_1 of { happy_var_1 -> -	case happyOut108 happy_x_2 of { happy_var_2 -> -	happyIn108-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_247 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_247 = happySpecReduce_1  93# happyReduction_247-happyReduction_247 happy_x_1-	 =  case happyOut291 happy_x_1 of { happy_var_1 -> -	happyIn109-		 ([RecordPatSynField happy_var_1 happy_var_1]-	)}--happyReduce_248 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_248 = happyMonadReduce 3# 93# happyReduction_248-happyReduction_248 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut291 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut109 happy_x_3 of { 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 (happyIn109 r))--happyReduce_249 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_249 = happyReduce 4# 94# happyReduction_249-happyReduction_249 (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 happyOut120 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn110-		 (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_250 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_250 = happyReduce 4# 94# happyReduction_250-happyReduction_250 (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 happyOut120 happy_x_3 of { happy_var_3 -> -	happyIn110-		 (L (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_251 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_251 = happyMonadReduce 4# 95# happyReduction_251-happyReduction_251 (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 { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut145 happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ PatSynSig (unLoc happy_var_2) (mkLHsSigType happy_var_4))-                          [mj AnnPattern happy_var_1, mu AnnDcolon happy_var_3])}}}})-	) (\r -> happyReturn (happyIn111 r))--happyReduce_252 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_252 = happySpecReduce_1  96# happyReduction_252-happyReduction_252 happy_x_1-	 =  case happyOut90 happy_x_1 of { happy_var_1 -> -	happyIn112-		 (happy_var_1-	)}--happyReduce_253 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_253 = happySpecReduce_1  96# happyReduction_253-happyReduction_253 happy_x_1-	 =  case happyOut192 happy_x_1 of { happy_var_1 -> -	happyIn112-		 (happy_var_1-	)}--happyReduce_254 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_254 = happyMonadReduce 4# 96# happyReduction_254-happyReduction_254 (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 happyOut201 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut145 happy_x_4 of { 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 $ ClassOpSig True [v] $ mkLHsSigType happy_var_4)-                                [mj AnnDefault happy_var_1,mu AnnDcolon happy_var_3] })}}}})-	) (\r -> happyReturn (happyIn112 r))--happyReduce_255 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_255 = happyMonadReduce 3# 97# happyReduction_255-happyReduction_255 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut113 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut112 happy_x_3 of { 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 (happyIn113 r))--happyReduce_256 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_256 = happyMonadReduce 2# 97# happyReduction_256-happyReduction_256 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut113 happy_x_1 of { 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 (happyIn113 r))--happyReduce_257 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_257 = happySpecReduce_1  97# happyReduction_257-happyReduction_257 happy_x_1-	 =  case happyOut112 happy_x_1 of { happy_var_1 -> -	happyIn113-		 (sL1 happy_var_1 ([], unitOL happy_var_1)-	)}--happyReduce_258 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_258 = happySpecReduce_0  97# happyReduction_258-happyReduction_258  =  happyIn113-		 (noLoc ([],nilOL)-	)--happyReduce_259 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_259 = happySpecReduce_3  98# happyReduction_259-happyReduction_259 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut113 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn114-		 (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_260 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_260 = happySpecReduce_3  98# happyReduction_260-happyReduction_260 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut113 happy_x_2 of { happy_var_2 -> -	happyIn114-		 (happy_var_2-	)}--happyReduce_261 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_261 = happySpecReduce_2  99# happyReduction_261-happyReduction_261 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut114 happy_x_2 of { happy_var_2 -> -	happyIn115-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)-                                             ,snd $ unLoc happy_var_2)-	)}}--happyReduce_262 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_262 = happySpecReduce_0  99# happyReduction_262-happyReduction_262  =  happyIn115-		 (noLoc ([],nilOL)-	)--happyReduce_263 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_263 = happySpecReduce_1  100# happyReduction_263-happyReduction_263 happy_x_1-	 =  case happyOut93 happy_x_1 of { happy_var_1 -> -	happyIn116-		 (sLL happy_var_1 happy_var_1 (unitOL (sL1 happy_var_1 (InstD (unLoc happy_var_1))))-	)}--happyReduce_264 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_264 = happySpecReduce_1  100# happyReduction_264-happyReduction_264 happy_x_1-	 =  case happyOut192 happy_x_1 of { happy_var_1 -> -	happyIn116-		 (sLL happy_var_1 happy_var_1 (unitOL happy_var_1)-	)}--happyReduce_265 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_265 = happyMonadReduce 3# 101# happyReduction_265-happyReduction_265 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut117 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut116 happy_x_3 of { 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 (happyIn117 r))--happyReduce_266 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_266 = happyMonadReduce 2# 101# happyReduction_266-happyReduction_266 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut117 happy_x_1 of { 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 (happyIn117 r))--happyReduce_267 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_267 = happySpecReduce_1  101# happyReduction_267-happyReduction_267 happy_x_1-	 =  case happyOut116 happy_x_1 of { happy_var_1 -> -	happyIn117-		 (sL1 happy_var_1 ([],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_0  101# happyReduction_268-happyReduction_268  =  happyIn117-		 (noLoc ([],nilOL)-	)--happyReduce_269 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_269 = happySpecReduce_3  102# happyReduction_269-happyReduction_269 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut117 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn118-		 (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_270 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_270 = happySpecReduce_3  102# happyReduction_270-happyReduction_270 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut117 happy_x_2 of { happy_var_2 -> -	happyIn118-		 (L (gl happy_var_2) (unLoc happy_var_2)-	)}--happyReduce_271 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_271 = happySpecReduce_2  103# happyReduction_271-happyReduction_271 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut118 happy_x_2 of { happy_var_2 -> -	happyIn119-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1:(fst $ unLoc happy_var_2)-                                             ,(snd $ unLoc happy_var_2))-	)}}--happyReduce_272 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_272 = happySpecReduce_0  103# happyReduction_272-happyReduction_272  =  happyIn119-		 (noLoc ([],nilOL)-	)--happyReduce_273 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_273 = happyMonadReduce 3# 104# happyReduction_273-happyReduction_273 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut120 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut192 happy_x_3 of { 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 (happyIn120 r))--happyReduce_274 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_274 = happyMonadReduce 2# 104# happyReduction_274-happyReduction_274 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut120 happy_x_1 of { 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_275 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_275 = happySpecReduce_1  104# happyReduction_275-happyReduction_275 happy_x_1-	 =  case happyOut192 happy_x_1 of { happy_var_1 -> -	happyIn120-		 (sL1 happy_var_1 ([], unitOL happy_var_1)-	)}--happyReduce_276 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_276 = happySpecReduce_0  104# happyReduction_276-happyReduction_276  =  happyIn120-		 (noLoc ([],nilOL)-	)--happyReduce_277 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_277 = happySpecReduce_3  105# happyReduction_277-happyReduction_277 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut120 happy_x_2 of { 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)-                                                   ,sL1 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_3  105# happyReduction_278-happyReduction_278 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut120 happy_x_2 of { happy_var_2 -> -	happyIn121-		 (L (gl happy_var_2) (fst $ unLoc happy_var_2,sL1 happy_var_2 $ snd $ unLoc happy_var_2)-	)}--happyReduce_279 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_279 = happyMonadReduce 1# 106# happyReduction_279-happyReduction_279 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut121 happy_x_1 of { 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 val_binds)) })})-	) (\r -> happyReturn (happyIn122 r))--happyReduce_280 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_280 = happySpecReduce_3  106# happyReduction_280-happyReduction_280 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut251 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn122-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3]-                                             ,sL1 happy_var_2 $ HsIPBinds (IPBinds (reverse $ unLoc happy_var_2)-                                                         emptyTcEvBinds))-	)}}}--happyReduce_281 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_281 = happySpecReduce_3  106# happyReduction_281-happyReduction_281 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut251 happy_x_2 of { happy_var_2 -> -	happyIn122-		 (L (getLoc happy_var_2) ([]-                                            ,sL1 happy_var_2 $ HsIPBinds (IPBinds (reverse $ unLoc happy_var_2)-                                                        emptyTcEvBinds))-	)}--happyReduce_282 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_282 = happySpecReduce_2  107# happyReduction_282-happyReduction_282 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut122 happy_x_2 of { happy_var_2 -> -	happyIn123-		 (sLL happy_var_1 happy_var_2 (mj AnnWhere happy_var_1 : (fst $ unLoc 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 = happySpecReduce_0  107# happyReduction_283-happyReduction_283  =  happyIn123-		 (noLoc ([],noLoc emptyLocalBinds)-	)--happyReduce_284 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_284 = happyMonadReduce 3# 108# happyReduction_284-happyReduction_284 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut124 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut125 happy_x_3 of { happy_var_3 -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return (happy_var_1 `snocOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn124 r))--happyReduce_285 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_285 = happyMonadReduce 2# 108# happyReduction_285-happyReduction_285 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut124 happy_x_1 of { 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 (happyIn124 r))--happyReduce_286 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_286 = happySpecReduce_1  108# happyReduction_286-happyReduction_286 happy_x_1-	 =  case happyOut125 happy_x_1 of { happy_var_1 -> -	happyIn124-		 (unitOL happy_var_1-	)}--happyReduce_287 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_287 = happySpecReduce_0  108# happyReduction_287-happyReduction_287  =  happyIn124-		 (nilOL-	)--happyReduce_288 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_288 = happyMonadReduce 6# 109# happyReduction_288-happyReduction_288 (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 happyOut126 happy_x_2 of { happy_var_2 -> -	case happyOut128 happy_x_3 of { happy_var_3 -> -	case happyOut201 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut200 happy_x_6 of { happy_var_6 -> -	(ams (sLL happy_var_1 happy_var_6 $ (HsRule (L (gl happy_var_1) (getSTRINGs happy_var_1,getSTRING happy_var_1))-                                  ((snd happy_var_2) `orElse` AlwaysActive)-                                  (snd happy_var_3) happy_var_4 placeHolderNames happy_var_6-                                  placeHolderNames))-               (mj AnnEqual happy_var_5 : (fst happy_var_2) ++ (fst happy_var_3)))}}}}}})-	) (\r -> happyReturn (happyIn125 r))--happyReduce_289 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_289 = happySpecReduce_0  110# happyReduction_289-happyReduction_289  =  happyIn126-		 (([],Nothing)-	)--happyReduce_290 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_290 = happySpecReduce_1  110# happyReduction_290-happyReduction_290 happy_x_1-	 =  case happyOut127 happy_x_1 of { happy_var_1 -> -	happyIn126-		 ((fst happy_var_1,Just (snd happy_var_1))-	)}--happyReduce_291 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_291 = happySpecReduce_3  111# happyReduction_291-happyReduction_291 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 -> -	happyIn127-		 (([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_292 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_292 = happyReduce 4# 111# happyReduction_292-happyReduction_292 (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 -> -	happyIn127-		 (([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_293 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_293 = happySpecReduce_3  111# happyReduction_293-happyReduction_293 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 -> -	happyIn127-		 (([mos happy_var_1,mj AnnTilde happy_var_2,mcs happy_var_3]-                                  ,NeverActive)-	)}}}--happyReduce_294 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_294 = happySpecReduce_3  112# happyReduction_294-happyReduction_294 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut129 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn128-		 (([mu AnnForall happy_var_1,mj AnnDot happy_var_3],happy_var_2)-	)}}}--happyReduce_295 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_295 = happySpecReduce_0  112# happyReduction_295-happyReduction_295  =  happyIn128-		 (([],[])-	)--happyReduce_296 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_296 = happySpecReduce_1  113# happyReduction_296-happyReduction_296 happy_x_1-	 =  case happyOut130 happy_x_1 of { happy_var_1 -> -	happyIn129-		 ([happy_var_1]-	)}--happyReduce_297 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_297 = happySpecReduce_2  113# happyReduction_297-happyReduction_297 happy_x_2-	happy_x_1-	 =  case happyOut130 happy_x_1 of { happy_var_1 -> -	case happyOut129 happy_x_2 of { happy_var_2 -> -	happyIn129-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_298 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_298 = happySpecReduce_1  114# happyReduction_298-happyReduction_298 happy_x_1-	 =  case happyOut294 happy_x_1 of { happy_var_1 -> -	happyIn130-		 (sLL happy_var_1 happy_var_1 (RuleBndr happy_var_1)-	)}--happyReduce_299 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_299 = happyMonadReduce 5# 114# happyReduction_299-happyReduction_299 (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 happyOut294 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut151 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 (RuleBndrSig happy_var_2-                                                       (mkLHsSigWcType happy_var_4)))-                                               [mop happy_var_1,mu AnnDcolon happy_var_3,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn130 r))--happyReduce_300 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_300 = happyMonadReduce 3# 115# happyReduction_300-happyReduction_300 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut131 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut132 happy_x_3 of { happy_var_3 -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return (happy_var_1 `appOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn131 r))--happyReduce_301 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_301 = happyMonadReduce 2# 115# happyReduction_301-happyReduction_301 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut131 happy_x_1 of { 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 (happyIn131 r))--happyReduce_302 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_302 = happySpecReduce_1  115# happyReduction_302-happyReduction_302 happy_x_1-	 =  case happyOut132 happy_x_1 of { happy_var_1 -> -	happyIn131-		 (happy_var_1-	)}--happyReduce_303 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_303 = happySpecReduce_0  115# happyReduction_303-happyReduction_303  =  happyIn131-		 (nilOL-	)--happyReduce_304 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_304 = happyMonadReduce 2# 116# happyReduction_304-happyReduction_304 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut260 happy_x_1 of { happy_var_1 -> -	case happyOut135 happy_x_2 of { happy_var_2 -> -	( amsu (sLL happy_var_1 happy_var_2 (Warning (unLoc happy_var_1) (WarningTxt (noLoc NoSourceText) $ snd $ unLoc happy_var_2)))-                     (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn132 r))--happyReduce_305 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_305 = happyMonadReduce 3# 117# happyReduction_305-happyReduction_305 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut133 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut134 happy_x_3 of { happy_var_3 -> -	( addAnnotation (oll happy_var_1) AnnSemi (gl happy_var_2)-                                          >> return (happy_var_1 `appOL` happy_var_3))}}})-	) (\r -> happyReturn (happyIn133 r))--happyReduce_306 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_306 = happyMonadReduce 2# 117# happyReduction_306-happyReduction_306 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut133 happy_x_1 of { 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 (happyIn133 r))--happyReduce_307 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_307 = happySpecReduce_1  117# happyReduction_307-happyReduction_307 happy_x_1-	 =  case happyOut134 happy_x_1 of { happy_var_1 -> -	happyIn133-		 (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  117# happyReduction_308-happyReduction_308  =  happyIn133-		 (nilOL-	)--happyReduce_309 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_309 = happyMonadReduce 2# 118# happyReduction_309-happyReduction_309 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut260 happy_x_1 of { happy_var_1 -> -	case happyOut135 happy_x_2 of { happy_var_2 -> -	( amsu (sLL happy_var_1 happy_var_2 $ (Warning (unLoc happy_var_1) (DeprecatedTxt (noLoc NoSourceText) $ snd $ unLoc happy_var_2)))-                     (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn134 r))--happyReduce_310 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_310 = happySpecReduce_1  119# happyReduction_310-happyReduction_310 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn135-		 (sL1 happy_var_1 ([],[L (gl happy_var_1) (getStringLiteral happy_var_1)])-	)}--happyReduce_311 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_311 = happySpecReduce_3  119# happyReduction_311-happyReduction_311 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut136 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn135-		 (sLL happy_var_1 happy_var_3 $ ([mos happy_var_1,mcs happy_var_3],fromOL (unLoc happy_var_2))-	)}}}--happyReduce_312 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_312 = happyMonadReduce 3# 120# happyReduction_312-happyReduction_312 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut136 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 -> -	( addAnnotation (oll $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>-                               return (sLL happy_var_1 happy_var_3 (unLoc happy_var_1 `snocOL`-                                                  (L (gl happy_var_3) (getStringLiteral happy_var_3)))))}}})-	) (\r -> happyReturn (happyIn136 r))--happyReduce_313 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_313 = happySpecReduce_1  120# happyReduction_313-happyReduction_313 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn136-		 (sLL happy_var_1 happy_var_1 (unitOL (L (gl happy_var_1) (getStringLiteral happy_var_1)))-	)}--happyReduce_314 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_314 = happySpecReduce_0  120# happyReduction_314-happyReduction_314  =  happyIn136-		 (noLoc nilOL-	)--happyReduce_315 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_315 = happyMonadReduce 4# 121# happyReduction_315-happyReduction_315 (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 happyOut261 happy_x_2 of { happy_var_2 -> -	case happyOut209 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (AnnD $ HsAnnotation-                                            (getANN_PRAGs happy_var_1)-                                            (ValueAnnProvenance happy_var_2) happy_var_3))-                                            [mo happy_var_1,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn137 r))--happyReduce_316 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_316 = happyMonadReduce 5# 121# happyReduction_316-happyReduction_316 (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 happyOut278 happy_x_3 of { happy_var_3 -> -	case happyOut209 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 (AnnD $ HsAnnotation-                                            (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 (happyIn137 r))--happyReduce_317 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_317 = happyMonadReduce 4# 121# happyReduction_317-happyReduction_317 (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 happyOut209 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 (AnnD $ HsAnnotation-                                                (getANN_PRAGs happy_var_1)-                                                 ModuleAnnProvenance happy_var_3))-                                                [mo happy_var_1,mj AnnModule happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn137 r))--happyReduce_318 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_318 = happyMonadReduce 4# 122# happyReduction_318-happyReduction_318 (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 happyOut139 happy_x_2 of { happy_var_2 -> -	case happyOut140 happy_x_3 of { happy_var_3 -> -	case happyOut141 happy_x_4 of { 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 (happyIn138 r))--happyReduce_319 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_319 = happyMonadReduce 3# 122# happyReduction_319-happyReduction_319 (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 happyOut139 happy_x_2 of { happy_var_2 -> -	case happyOut141 happy_x_3 of { 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 (happyIn138 r))--happyReduce_320 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_320 = happyMonadReduce 3# 122# happyReduction_320-happyReduction_320 (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 happyOut139 happy_x_2 of { happy_var_2 -> -	case happyOut141 happy_x_3 of { 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 (happyIn138 r))--happyReduce_321 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_321 = happySpecReduce_1  123# happyReduction_321-happyReduction_321 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn139-		 (sLL happy_var_1 happy_var_1 StdCallConv-	)}--happyReduce_322 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_322 = happySpecReduce_1  123# happyReduction_322-happyReduction_322 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn139-		 (sLL happy_var_1 happy_var_1 CCallConv-	)}--happyReduce_323 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_323 = happySpecReduce_1  123# happyReduction_323-happyReduction_323 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn139-		 (sLL happy_var_1 happy_var_1 CApiConv-	)}--happyReduce_324 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_324 = happySpecReduce_1  123# happyReduction_324-happyReduction_324 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn139-		 (sLL happy_var_1 happy_var_1 PrimCallConv-	)}--happyReduce_325 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_325 = happySpecReduce_1  123# happyReduction_325-happyReduction_325 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn139-		 (sLL happy_var_1 happy_var_1 JavaScriptCallConv-	)}--happyReduce_326 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_326 = happySpecReduce_1  124# happyReduction_326-happyReduction_326 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn140-		 (sLL happy_var_1 happy_var_1 PlayRisky-	)}--happyReduce_327 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_327 = happySpecReduce_1  124# happyReduction_327-happyReduction_327 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn140-		 (sLL happy_var_1 happy_var_1 PlaySafe-	)}--happyReduce_328 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_328 = happySpecReduce_1  124# happyReduction_328-happyReduction_328 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn140-		 (sLL happy_var_1 happy_var_1 PlayInterruptible-	)}--happyReduce_329 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_329 = happyReduce 4# 125# happyReduction_329-happyReduction_329 (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 happyOut291 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut145 happy_x_4 of { happy_var_4 -> -	happyIn141-		 (sLL happy_var_1 happy_var_4 ([mu AnnDcolon happy_var_3]-                                             ,(L (getLoc happy_var_1)-                                                    (getStringLiteral happy_var_1), happy_var_2, mkLHsSigType happy_var_4))-	) `HappyStk` happyRest}}}}--happyReduce_330 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_330 = happySpecReduce_3  125# happyReduction_330-happyReduction_330 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut291 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut145 happy_x_3 of { happy_var_3 -> -	happyIn141-		 (sLL happy_var_1 happy_var_3 ([mu AnnDcolon happy_var_2]-                                             ,(noLoc (StringLiteral NoSourceText nilFS), happy_var_1, mkLHsSigType happy_var_3))-	)}}}--happyReduce_331 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_331 = happySpecReduce_0  126# happyReduction_331-happyReduction_331  =  happyIn142-		 (([],Nothing)-	)--happyReduce_332 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_332 = happySpecReduce_2  126# happyReduction_332-happyReduction_332 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut144 happy_x_2 of { happy_var_2 -> -	happyIn142-		 (([mu AnnDcolon happy_var_1],Just happy_var_2)-	)}}--happyReduce_333 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_333 = happySpecReduce_0  127# happyReduction_333-happyReduction_333  =  happyIn143-		 (([], Nothing)-	)--happyReduce_334 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_334 = happySpecReduce_2  127# happyReduction_334-happyReduction_334 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut271 happy_x_2 of { happy_var_2 -> -	happyIn143-		 (([mu AnnDcolon happy_var_1], Just happy_var_2)-	)}}--happyReduce_335 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_335 = happySpecReduce_1  128# happyReduction_335-happyReduction_335 happy_x_1-	 =  case happyOut151 happy_x_1 of { happy_var_1 -> -	happyIn144-		 (happy_var_1-	)}--happyReduce_336 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_336 = happySpecReduce_1  129# happyReduction_336-happyReduction_336 happy_x_1-	 =  case happyOut152 happy_x_1 of { happy_var_1 -> -	happyIn145-		 (happy_var_1-	)}--happyReduce_337 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_337 = happyMonadReduce 3# 130# happyReduction_337-happyReduction_337 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut146 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut291 happy_x_3 of { 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 (happyIn146 r))--happyReduce_338 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_338 = happySpecReduce_1  130# happyReduction_338-happyReduction_338 happy_x_1-	 =  case happyOut291 happy_x_1 of { happy_var_1 -> -	happyIn146-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_339 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_339 = happySpecReduce_1  131# happyReduction_339-happyReduction_339 happy_x_1-	 =  case happyOut144 happy_x_1 of { happy_var_1 -> -	happyIn147-		 (unitOL (mkLHsSigType happy_var_1)-	)}--happyReduce_340 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_340 = happyMonadReduce 3# 131# happyReduction_340-happyReduction_340 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut144 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut147 happy_x_3 of { 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 (happyIn147 r))--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 happyOut149 happy_x_1 of { happy_var_1 -> -	happyIn148-		 (sL1 happy_var_1 (let (a, str) = unLoc happy_var_1 in (a, HsSrcBang NoSourceText NoSrcUnpack str))-	)}--happyReduce_342 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_342 = happySpecReduce_1  132# happyReduction_342-happyReduction_342 happy_x_1-	 =  case happyOut150 happy_x_1 of { happy_var_1 -> -	happyIn148-		 (sL1 happy_var_1 (let (a, prag, unpk) = unLoc happy_var_1 in (a, HsSrcBang prag unpk NoSrcStrict))-	)}--happyReduce_343 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_343 = happySpecReduce_2  132# happyReduction_343-happyReduction_343 happy_x_2-	happy_x_1-	 =  case happyOut150 happy_x_1 of { happy_var_1 -> -	case happyOut149 happy_x_2 of { happy_var_2 -> -	happyIn148-		 (sLL happy_var_1 happy_var_2 (let { (a, prag, unpk) = unLoc happy_var_1-                                                   ; (a', str) = unLoc happy_var_2 }-                                                in (a ++ a', HsSrcBang prag unpk str))-	)}}--happyReduce_344 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_344 = happySpecReduce_1  133# happyReduction_344-happyReduction_344 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn149-		 (sL1 happy_var_1 ([mj AnnBang happy_var_1], SrcStrict)-	)}--happyReduce_345 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_345 = happySpecReduce_1  133# happyReduction_345-happyReduction_345 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn149-		 (sL1 happy_var_1 ([mj AnnTilde happy_var_1], SrcLazy)-	)}--happyReduce_346 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_346 = happySpecReduce_2  134# 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 -> -	happyIn150-		 (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  134# 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 -> -	happyIn150-		 (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 = happyMonadReduce 4# 135# happyReduction_348-happyReduction_348 (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 happyOut167 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut151 happy_x_4 of { happy_var_4 -> -	( hintExplicitForall (getLoc happy_var_1) >>-                                           ams (sLL happy_var_1 happy_var_4 $-                                                HsForAllTy { hst_bndrs = happy_var_2-                                                           , hst_body = happy_var_4 })-                                               [mu AnnForall happy_var_1, mj AnnDot happy_var_3])}}}})-	) (\r -> happyReturn (happyIn151 r))--happyReduce_349 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_349 = happyMonadReduce 3# 135# happyReduction_349-happyReduction_349 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut153 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut151 happy_x_3 of { 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_body = happy_var_3 }))}}})-	) (\r -> happyReturn (happyIn151 r))--happyReduce_350 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_350 = happyMonadReduce 3# 135# happyReduction_350-happyReduction_350 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut253 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (HsIParamTy happy_var_1 happy_var_3))-                                             [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn151 r))--happyReduce_351 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_351 = happySpecReduce_1  135# happyReduction_351-happyReduction_351 happy_x_1-	 =  case happyOut155 happy_x_1 of { happy_var_1 -> -	happyIn151-		 (happy_var_1-	)}--happyReduce_352 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_352 = happyMonadReduce 4# 136# 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 happyOut167 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut152 happy_x_4 of { happy_var_4 -> -	( hintExplicitForall (getLoc happy_var_1) >>-                                            ams (sLL happy_var_1 happy_var_4 $-                                                 HsForAllTy { hst_bndrs = happy_var_2-                                                            , hst_body = happy_var_4 })-                                                [mu AnnForall happy_var_1,mj AnnDot happy_var_3])}}}})-	) (\r -> happyReturn (happyIn152 r))--happyReduce_353 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_353 = happyMonadReduce 3# 136# happyReduction_353-happyReduction_353 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut153 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut152 happy_x_3 of { 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_body = happy_var_3 }))}}})-	) (\r -> happyReturn (happyIn152 r))--happyReduce_354 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_354 = happyMonadReduce 3# 136# happyReduction_354-happyReduction_354 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut253 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut155 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (HsIParamTy happy_var_1 happy_var_3))-                                             [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn152 r))--happyReduce_355 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_355 = happySpecReduce_1  136# happyReduction_355-happyReduction_355 happy_x_1-	 =  case happyOut156 happy_x_1 of { happy_var_1 -> -	happyIn152-		 (happy_var_1-	)}--happyReduce_356 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_356 = happyMonadReduce 1# 137# happyReduction_356-happyReduction_356 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut157 happy_x_1 of { 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 (happyIn153 r))--happyReduce_357 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_357 = happyMonadReduce 1# 138# happyReduction_357-happyReduction_357 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut158 happy_x_1 of { happy_var_1 -> -	( do { ty <- splitTilde happy_var_1-                                             ; (anns,ctx) <- checkContext ty-                                             ; if null (unLoc ctx)-                                                   then addAnnotation (gl ty) AnnUnit (gl ty)-                                                   else return ()-                                             ; ams ctx anns-                                             })})-	) (\r -> happyReturn (happyIn154 r))--happyReduce_358 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_358 = happySpecReduce_1  139# happyReduction_358-happyReduction_358 happy_x_1-	 =  case happyOut157 happy_x_1 of { happy_var_1 -> -	happyIn155-		 (happy_var_1-	)}--happyReduce_359 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_359 = happyMonadReduce 3# 139# happyReduction_359-happyReduction_359 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut157 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut151 happy_x_3 of { 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 happy_var_1 happy_var_3)-                                              [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn155 r))--happyReduce_360 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_360 = happySpecReduce_1  140# happyReduction_360-happyReduction_360 happy_x_1-	 =  case happyOut157 happy_x_1 of { happy_var_1 -> -	happyIn156-		 (happy_var_1-	)}--happyReduce_361 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_361 = happySpecReduce_2  140# happyReduction_361-happyReduction_361 happy_x_2-	happy_x_1-	 =  case happyOut157 happy_x_1 of { happy_var_1 -> -	case happyOut313 happy_x_2 of { happy_var_2 -> -	happyIn156-		 (sLL happy_var_1 happy_var_2 $ HsDocTy happy_var_1 happy_var_2-	)}}--happyReduce_362 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_362 = happyMonadReduce 3# 140# happyReduction_362-happyReduction_362 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut157 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut152 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsFunTy happy_var_1 happy_var_3)-                                                [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn156 r))--happyReduce_363 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_363 = happyMonadReduce 4# 140# happyReduction_363-happyReduction_363 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut157 happy_x_1 of { happy_var_1 -> -	case happyOut313 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut152 happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $-                                                 HsFunTy (L (comb2 happy_var_1 happy_var_2) (HsDocTy happy_var_1 happy_var_2))-                                                         happy_var_4)-                                                [mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn156 r))--happyReduce_364 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_364 = happyMonadReduce 1# 141# happyReduction_364-happyReduction_364 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut159 happy_x_1 of { happy_var_1 -> -	(  splitTildeApps (reverse (unLoc happy_var_1)) >>=-                                          \ts -> return $ sL1 happy_var_1 $ HsAppsTy ts)})-	) (\r -> happyReturn (happyIn157 r))--happyReduce_365 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_365 = happySpecReduce_2  142# happyReduction_365-happyReduction_365 happy_x_2-	happy_x_1-	 =  case happyOut158 happy_x_1 of { happy_var_1 -> -	case happyOut161 happy_x_2 of { happy_var_2 -> -	happyIn158-		 (sLL happy_var_1 happy_var_2 $ HsAppTy 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_1  142# happyReduction_366-happyReduction_366 happy_x_1-	 =  case happyOut161 happy_x_1 of { happy_var_1 -> -	happyIn158-		 (happy_var_1-	)}--happyReduce_367 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_367 = happySpecReduce_1  143# happyReduction_367-happyReduction_367 happy_x_1-	 =  case happyOut160 happy_x_1 of { happy_var_1 -> -	happyIn159-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_368 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_368 = happySpecReduce_2  143# happyReduction_368-happyReduction_368 happy_x_2-	happy_x_1-	 =  case happyOut159 happy_x_1 of { happy_var_1 -> -	case happyOut160 happy_x_2 of { happy_var_2 -> -	happyIn159-		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : (unLoc happy_var_1)-	)}}--happyReduce_369 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_369 = happySpecReduce_1  144# happyReduction_369-happyReduction_369 happy_x_1-	 =  case happyOut161 happy_x_1 of { happy_var_1 -> -	happyIn160-		 (sL1 happy_var_1 $ HsAppPrefix happy_var_1-	)}--happyReduce_370 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_370 = happySpecReduce_1  144# happyReduction_370-happyReduction_370 happy_x_1-	 =  case happyOut275 happy_x_1 of { happy_var_1 -> -	happyIn160-		 (sL1 happy_var_1 $ HsAppInfix happy_var_1-	)}--happyReduce_371 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_371 = happySpecReduce_1  144# happyReduction_371-happyReduction_371 happy_x_1-	 =  case happyOut289 happy_x_1 of { happy_var_1 -> -	happyIn160-		 (sL1 happy_var_1 $ HsAppInfix happy_var_1-	)}--happyReduce_372 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_372 = happyMonadReduce 2# 144# happyReduction_372-happyReduction_372 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut270 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsAppInfix happy_var_2)-                                               [mj AnnSimpleQuote happy_var_1])}})-	) (\r -> happyReturn (happyIn160 r))--happyReduce_373 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_373 = happyMonadReduce 2# 144# happyReduction_373-happyReduction_373 (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 { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsAppInfix happy_var_2)-                                               [mj AnnSimpleQuote happy_var_1])}})-	) (\r -> happyReturn (happyIn160 r))--happyReduce_374 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_374 = happySpecReduce_1  145# happyReduction_374-happyReduction_374 happy_x_1-	 =  case happyOut272 happy_x_1 of { happy_var_1 -> -	happyIn161-		 (sL1 happy_var_1 (HsTyVar NotPromoted happy_var_1)-	)}--happyReduce_375 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_375 = happySpecReduce_1  145# happyReduction_375-happyReduction_375 happy_x_1-	 =  case happyOut288 happy_x_1 of { happy_var_1 -> -	happyIn161-		 (sL1 happy_var_1 (HsTyVar NotPromoted happy_var_1)-	)}--happyReduce_376 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_376 = happyMonadReduce 2# 145# happyReduction_376-happyReduction_376 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut148 happy_x_1 of { happy_var_1 -> -	case happyOut161 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 (HsBangTy (snd $ unLoc happy_var_1) happy_var_2))-                                                (fst $ unLoc happy_var_1))}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_377 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_377 = happyMonadReduce 3# 145# happyReduction_377-happyReduction_377 (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_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( amms (checkRecordSyntax-                                                    (sLL happy_var_1 happy_var_3 $ HsRecTy happy_var_2))-                                                        -- Constructor sigs only-                                                 [moc happy_var_1,mcc happy_var_3])}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_378 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_378 = happyMonadReduce 2# 145# happyReduction_378-happyReduction_378 (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-                                                    HsBoxedOrConstraintTuple [])-                                                [mop happy_var_1,mcp happy_var_2])}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_379 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_379 = happyMonadReduce 5# 145# happyReduction_379-happyReduction_379 (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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut165 happy_x_4 of { 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-                                             HsBoxedOrConstraintTuple (happy_var_2 : happy_var_4))-                                                [mop happy_var_1,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_380 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_380 = happyMonadReduce 2# 145# happyReduction_380-happyReduction_380 (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 HsUnboxedTuple [])-                                             [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_381 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_381 = happyMonadReduce 3# 145# happyReduction_381-happyReduction_381 (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 happyOut165 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsTupleTy HsUnboxedTuple happy_var_2)-                                             [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_382 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_382 = happyMonadReduce 3# 145# happyReduction_382-happyReduction_382 (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 happyOut166 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsSumTy happy_var_2)-                                             [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_383 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_383 = happyMonadReduce 3# 145# happyReduction_383-happyReduction_383 (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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsListTy  happy_var_2) [mos happy_var_1,mcs happy_var_3])}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_384 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_384 = happyMonadReduce 3# 145# happyReduction_384-happyReduction_384 (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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsPArrTy  happy_var_2) [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_385 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_385 = happyMonadReduce 3# 145# happyReduction_385-happyReduction_385 (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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsParTy   happy_var_2) [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_386 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_386 = happyMonadReduce 5# 145# happyReduction_386-happyReduction_386 (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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut173 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 $ HsKindSig happy_var_2 happy_var_4)-                                             [mop happy_var_1,mu AnnDcolon happy_var_3,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_387 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_387 = happySpecReduce_1  145# happyReduction_387-happyReduction_387 happy_x_1-	 =  case happyOut199 happy_x_1 of { happy_var_1 -> -	happyIn161-		 (sL1 happy_var_1 (HsSpliceTy (unLoc happy_var_1) placeHolderKind)-	)}--happyReduce_388 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_388 = happyMonadReduce 3# 145# happyReduction_388-happyReduction_388 (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 happyOut200 happy_x_2 of { 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 (happyIn161 r))--happyReduce_389 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_389 = happyMonadReduce 1# 145# happyReduction_389-happyReduction_389 (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 $-                                             (sL1 happy_var_1 (mkUnqual varName (getTH_ID_SPLICE happy_var_1))))-                                             [mj AnnThIdSplice happy_var_1])})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_390 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_390 = happyMonadReduce 2# 145# 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 happyOut262 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTyVar Promoted happy_var_2) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_391 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_391 = happyMonadReduce 6# 145# happyReduction_391-happyReduction_391 (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 happyOut151 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut165 happy_x_5 of { 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 [] (happy_var_3 : happy_var_5))-                                    [mj AnnSimpleQuote happy_var_1,mop happy_var_2,mcp happy_var_6])}}}}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_392 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_392 = happyMonadReduce 4# 145# happyReduction_392-happyReduction_392 (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 happyOut164 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsExplicitListTy Promoted-                                                            placeHolderKind happy_var_3)-                                                       [mj AnnSimpleQuote happy_var_1,mos happy_var_2,mcs happy_var_4])}}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_393 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_393 = happyMonadReduce 2# 145# 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 happyOut291 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTyVar Promoted happy_var_2)-                                                       [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_394 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_394 = happyMonadReduce 5# 145# 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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut165 happy_x_4 of { 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 NotPromoted-                                                     placeHolderKind (happy_var_2 : happy_var_4))-                                                 [mos happy_var_1,mcs happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn161 r))--happyReduce_395 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_395 = happySpecReduce_1  145# happyReduction_395-happyReduction_395 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn161-		 (sLL happy_var_1 happy_var_1 $ HsTyLit $ HsNumTy (getINTEGERs happy_var_1)-                                                               (il_value (getINTEGER happy_var_1))-	)}--happyReduce_396 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_396 = happySpecReduce_1  145# happyReduction_396-happyReduction_396 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn161-		 (sLL happy_var_1 happy_var_1 $ HsTyLit $ HsStrTy (getSTRINGs happy_var_1)-                                                               (getSTRING  happy_var_1)-	)}--happyReduce_397 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_397 = happySpecReduce_1  145# happyReduction_397-happyReduction_397 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn161-		 (sL1 happy_var_1 $ mkAnonWildCardTy-	)}--happyReduce_398 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_398 = happySpecReduce_1  146# happyReduction_398-happyReduction_398 happy_x_1-	 =  case happyOut144 happy_x_1 of { happy_var_1 -> -	happyIn162-		 (mkLHsSigType happy_var_1-	)}--happyReduce_399 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_399 = happySpecReduce_1  147# happyReduction_399-happyReduction_399 happy_x_1-	 =  case happyOut156 happy_x_1 of { happy_var_1 -> -	happyIn163-		 ([mkLHsSigType happy_var_1]-	)}--happyReduce_400 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_400 = happyMonadReduce 3# 147# happyReduction_400-happyReduction_400 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut156 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut163 happy_x_3 of { happy_var_3 -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)-                                           >> return (mkLHsSigType happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn163 r))--happyReduce_401 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_401 = happySpecReduce_1  148# happyReduction_401-happyReduction_401 happy_x_1-	 =  case happyOut165 happy_x_1 of { happy_var_1 -> -	happyIn164-		 (happy_var_1-	)}--happyReduce_402 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_402 = happySpecReduce_0  148# happyReduction_402-happyReduction_402  =  happyIn164-		 ([]-	)--happyReduce_403 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_403 = happySpecReduce_1  149# happyReduction_403-happyReduction_403 happy_x_1-	 =  case happyOut151 happy_x_1 of { happy_var_1 -> -	happyIn165-		 ([happy_var_1]-	)}--happyReduce_404 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_404 = happyMonadReduce 3# 149# happyReduction_404-happyReduction_404 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut151 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut165 happy_x_3 of { happy_var_3 -> -	( addAnnotation (gl happy_var_1) AnnComma (gl happy_var_2)-                                          >> return (happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn165 r))--happyReduce_405 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_405 = happyMonadReduce 3# 150# happyReduction_405-happyReduction_405 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut151 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut151 happy_x_3 of { happy_var_3 -> -	( addAnnotation (gl happy_var_1) AnnVbar (gl happy_var_2)-                                          >> return [happy_var_1,happy_var_3])}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_406 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_406 = happyMonadReduce 3# 150# happyReduction_406-happyReduction_406 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut151 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut166 happy_x_3 of { happy_var_3 -> -	( addAnnotation (gl happy_var_1) AnnVbar (gl happy_var_2)-                                          >> return (happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn166 r))--happyReduce_407 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_407 = happySpecReduce_2  151# happyReduction_407-happyReduction_407 happy_x_2-	happy_x_1-	 =  case happyOut168 happy_x_1 of { happy_var_1 -> -	case happyOut167 happy_x_2 of { happy_var_2 -> -	happyIn167-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_408 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_408 = happySpecReduce_0  151# happyReduction_408-happyReduction_408  =  happyIn167-		 ([]-	)--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 happyOut288 happy_x_1 of { happy_var_1 -> -	happyIn168-		 (sL1 happy_var_1 (UserTyVar happy_var_1)-	)}--happyReduce_410 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_410 = happyMonadReduce 5# 152# happyReduction_410-happyReduction_410 (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 happyOut288 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut173 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5  (KindedTyVar happy_var_2 happy_var_4))-                                               [mop happy_var_1,mu AnnDcolon happy_var_3-                                               ,mcp happy_var_5])}}}}})-	) (\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_0  153# happyReduction_411-happyReduction_411  =  happyIn169-		 (noLoc ([],[])-	)--happyReduce_412 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_412 = happySpecReduce_2  153# happyReduction_412-happyReduction_412 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut170 happy_x_2 of { happy_var_2 -> -	happyIn169-		 ((sLL happy_var_1 happy_var_2 ([mj AnnVbar happy_var_1]-                                                 ,reverse (unLoc happy_var_2)))-	)}}--happyReduce_413 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_413 = happyMonadReduce 3# 154# happyReduction_413-happyReduction_413 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut170 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut171 happy_x_3 of { 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 (happyIn170 r))--happyReduce_414 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_414 = happySpecReduce_1  154# happyReduction_414-happyReduction_414 happy_x_1-	 =  case happyOut171 happy_x_1 of { happy_var_1 -> -	happyIn170-		 (sL1 happy_var_1 [happy_var_1]-	)}--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 happyOut172 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut172 happy_x_3 of { happy_var_3 -> -	( ams (L (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 (happyIn171 r))--happyReduce_416 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_416 = happySpecReduce_0  156# happyReduction_416-happyReduction_416  =  happyIn172-		 (noLoc []-	)--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 happyOut172 happy_x_1 of { happy_var_1 -> -	case happyOut288 happy_x_2 of { happy_var_2 -> -	happyIn172-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_418 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_418 = happySpecReduce_1  157# happyReduction_418-happyReduction_418 happy_x_1-	 =  case happyOut151 happy_x_1 of { happy_var_1 -> -	happyIn173-		 (happy_var_1-	)}--happyReduce_419 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_419 = happyReduce 4# 158# happyReduction_419-happyReduction_419 (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 happyOut175 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn174-		 (L (comb2 happy_var_1 happy_var_3)-                                                    ([mj AnnWhere happy_var_1-                                                     ,moc happy_var_2-                                                     ,mcc happy_var_4]-                                                    , unLoc happy_var_3)-	) `HappyStk` happyRest}}}}--happyReduce_420 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_420 = happyReduce 4# 158# happyReduction_420-happyReduction_420 (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 happyOut175 happy_x_3 of { happy_var_3 -> -	happyIn174-		 (L (comb2 happy_var_1 happy_var_3)-                                                     ([mj AnnWhere happy_var_1]-                                                     , unLoc happy_var_3)-	) `HappyStk` happyRest}}--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 = happyMonadReduce 3# 159# happyReduction_422-happyReduction_422 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut176 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut175 happy_x_3 of { happy_var_3 -> -	( addAnnotation (gl happy_var_1) AnnSemi (gl happy_var_2)-                     >> return (L (comb2 happy_var_1 happy_var_3) (happy_var_1 : unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn175 r))--happyReduce_423 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_423 = happySpecReduce_1  159# happyReduction_423-happyReduction_423 happy_x_1-	 =  case happyOut176 happy_x_1 of { happy_var_1 -> -	happyIn175-		 (L (gl happy_var_1) [happy_var_1]-	)}--happyReduce_424 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_424 = happySpecReduce_0  159# happyReduction_424-happyReduction_424  =  happyIn175-		 (noLoc []-	)--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 happyOut318 happy_x_1 of { happy_var_1 -> -	case happyOut177 happy_x_3 of { happy_var_3 -> -	( return $ addConDoc happy_var_3 happy_var_1)}})-	) (\r -> happyReturn (happyIn176 r))--happyReduce_426 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_426 = happyMonadReduce 1# 160# happyReduction_426-happyReduction_426 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut177 happy_x_1 of { happy_var_1 -> -	( return happy_var_1)})-	) (\r -> happyReturn (happyIn176 r))--happyReduce_427 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_427 = happyMonadReduce 3# 161# happyReduction_427-happyReduction_427 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut266 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut144 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (mkGadtDecl (unLoc happy_var_1) (mkLHsSigType happy_var_3)))-                       [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn177 r))--happyReduce_428 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_428 = happySpecReduce_3  162# happyReduction_428-happyReduction_428 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut318 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut179 happy_x_3 of { happy_var_3 -> -	happyIn178-		 (L (comb2 happy_var_2 happy_var_3) ([mj AnnEqual happy_var_2]-                                                     ,addConDocs (unLoc happy_var_3) happy_var_1)-	)}}}--happyReduce_429 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_429 = happyMonadReduce 5# 163# happyReduction_429-happyReduction_429 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut179 happy_x_1 of { happy_var_1 -> -	case happyOut318 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut317 happy_x_4 of { happy_var_4 -> -	case happyOut180 happy_x_5 of { 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 (happyIn179 r))--happyReduce_430 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_430 = happySpecReduce_1  163# happyReduction_430-happyReduction_430 happy_x_1-	 =  case happyOut180 happy_x_1 of { happy_var_1 -> -	happyIn179-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_431 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_431 = happyMonadReduce 6# 164# happyReduction_431-happyReduction_431 (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 happyOut318 happy_x_1 of { happy_var_1 -> -	case happyOut181 happy_x_2 of { happy_var_2 -> -	case happyOut154 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut182 happy_x_5 of { happy_var_5 -> -	case happyOut317 happy_x_6 of { happy_var_6 -> -	( ams (let (con,details) = unLoc happy_var_5 in-                  addConDoc (L (comb4 happy_var_2 happy_var_3 happy_var_4 happy_var_5) (mkConDeclH98 con-                                                   (snd $ unLoc happy_var_2) happy_var_3 details))-                            (happy_var_1 `mplus` happy_var_6))-                        (mu AnnDarrow happy_var_4:(fst $ unLoc happy_var_2)))}}}}}})-	) (\r -> happyReturn (happyIn180 r))--happyReduce_432 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_432 = happyMonadReduce 4# 164# happyReduction_432-happyReduction_432 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut318 happy_x_1 of { happy_var_1 -> -	case happyOut181 happy_x_2 of { happy_var_2 -> -	case happyOut182 happy_x_3 of { happy_var_3 -> -	case happyOut317 happy_x_4 of { happy_var_4 -> -	( ams ( let (con,details) = unLoc happy_var_3 in-                  addConDoc (L (comb2 happy_var_2 happy_var_3) (mkConDeclH98 con-                                           (snd $ unLoc happy_var_2) (noLoc []) details))-                            (happy_var_1 `mplus` happy_var_4))-                       (fst $ unLoc happy_var_2))}}}})-	) (\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_3  165# happyReduction_433-happyReduction_433 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut167 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn181-		 (sLL happy_var_1 happy_var_3 ([mu AnnForall happy_var_1,mj AnnDot happy_var_3], Just happy_var_2)-	)}}}--happyReduce_434 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_434 = happySpecReduce_0  165# happyReduction_434-happyReduction_434  =  happyIn181-		 (noLoc ([], Nothing)-	)--happyReduce_435 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_435 = happyMonadReduce 1# 166# happyReduction_435-happyReduction_435 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut158 happy_x_1 of { happy_var_1 -> -	( do { c <- splitCon happy_var_1-                                                     ; return $ sLL happy_var_1 happy_var_1 c })})-	) (\r -> happyReturn (happyIn182 r))--happyReduce_436 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_436 = happyMonadReduce 3# 166# happyReduction_436-happyReduction_436 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut158 happy_x_1 of { happy_var_1 -> -	case happyOut269 happy_x_2 of { happy_var_2 -> -	case happyOut158 happy_x_3 of { happy_var_3 -> -	( do { ty <- splitTilde happy_var_1-                                                     ; return $ sLL happy_var_1 happy_var_3 (happy_var_2, InfixCon ty happy_var_3) })}}})-	) (\r -> happyReturn (happyIn182 r))--happyReduce_437 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_437 = happySpecReduce_0  167# happyReduction_437-happyReduction_437  =  happyIn183-		 ([]-	)--happyReduce_438 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_438 = happySpecReduce_1  167# happyReduction_438-happyReduction_438 happy_x_1-	 =  case happyOut184 happy_x_1 of { happy_var_1 -> -	happyIn183-		 (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 happyOut185 happy_x_1 of { happy_var_1 -> -	case happyOut318 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut317 happy_x_4 of { happy_var_4 -> -	case happyOut184 happy_x_5 of { 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 (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 { happy_var_1 -> -	happyIn184-		 ([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 happyOut318 happy_x_1 of { happy_var_1 -> -	case happyOut146 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut151 happy_x_4 of { happy_var_4 -> -	case happyOut317 happy_x_5 of { happy_var_5 -> -	( ams (L (comb2 happy_var_2 happy_var_4)-                      (ConDeclField (reverse (map (\ln@(L l n) -> L l $ FieldOcc ln PlaceHolder) (unLoc happy_var_2))) happy_var_4 (happy_var_1 `mplus` happy_var_5)))-                   [mu AnnDcolon happy_var_3])}}}}})-	) (\r -> happyReturn (happyIn185 r))--happyReduce_442 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_442 = happySpecReduce_0  170# happyReduction_442-happyReduction_442  =  happyIn186-		 (noLoc []-	)--happyReduce_443 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_443 = happySpecReduce_1  170# happyReduction_443-happyReduction_443 happy_x_1-	 =  case happyOut187 happy_x_1 of { happy_var_1 -> -	happyIn186-		 (happy_var_1-	)}--happyReduce_444 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_444 = happySpecReduce_2  171# happyReduction_444-happyReduction_444 happy_x_2-	happy_x_1-	 =  case happyOut187 happy_x_1 of { happy_var_1 -> -	case happyOut188 happy_x_2 of { happy_var_2 -> -	happyIn187-		 (sLL happy_var_1 happy_var_2 $ happy_var_2 : unLoc happy_var_1-	)}}--happyReduce_445 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_445 = happySpecReduce_1  171# happyReduction_445-happyReduction_445 happy_x_1-	 =  case happyOut188 happy_x_1 of { happy_var_1 -> -	happyIn187-		 (sLL happy_var_1 happy_var_1 [happy_var_1]-	)}--happyReduce_446 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_446 = happyMonadReduce 3# 172# happyReduction_446-happyReduction_446 (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 { happy_var_2 -> -	case happyOut277 happy_x_3 of { happy_var_3 -> -	( let { full_loc = comb2 happy_var_1 happy_var_3 }-                 in ams (L full_loc $ HsDerivingClause happy_var_2 $ L full_loc-                            [mkLHsSigType happy_var_3])-                        [mj AnnDeriving happy_var_1])}}})-	) (\r -> happyReturn (happyIn188 r))--happyReduce_447 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_447 = happyMonadReduce 4# 172# happyReduction_447-happyReduction_447 (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 happyOut82 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 -> -	( let { full_loc = comb2 happy_var_1 happy_var_4 }-                 in ams (L full_loc $ HsDerivingClause happy_var_2 $ L full_loc [])-                        [mj AnnDeriving happy_var_1,mop happy_var_3,mcp happy_var_4])}}}})-	) (\r -> happyReturn (happyIn188 r))--happyReduce_448 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_448 = happyMonadReduce 5# 172# 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 happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut82 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut163 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	( let { full_loc = comb2 happy_var_1 happy_var_5 }-                 in ams (L full_loc $ HsDerivingClause happy_var_2 $ L full_loc happy_var_4)-                        [mj AnnDeriving happy_var_1,mop happy_var_3,mcp happy_var_5])}}}}})-	) (\r -> happyReturn (happyIn188 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 { happy_var_1 -> -	happyIn189-		 (sL1 happy_var_1 (DocD (unLoc happy_var_1))-	)}--happyReduce_450 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_450 = happySpecReduce_1  174# happyReduction_450-happyReduction_450 happy_x_1-	 =  case happyOut312 happy_x_1 of { happy_var_1 -> -	happyIn190-		 (sL1 happy_var_1 (DocCommentNext (unLoc happy_var_1))-	)}--happyReduce_451 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_451 = happySpecReduce_1  174# happyReduction_451-happyReduction_451 happy_x_1-	 =  case happyOut313 happy_x_1 of { happy_var_1 -> -	happyIn190-		 (sL1 happy_var_1 (DocCommentPrev (unLoc happy_var_1))-	)}--happyReduce_452 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_452 = happySpecReduce_1  174# happyReduction_452-happyReduction_452 happy_x_1-	 =  case happyOut314 happy_x_1 of { happy_var_1 -> -	happyIn190-		 (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> DocCommentNamed n doc)-	)}--happyReduce_453 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_453 = happySpecReduce_1  174# happyReduction_453-happyReduction_453 happy_x_1-	 =  case happyOut315 happy_x_1 of { happy_var_1 -> -	happyIn190-		 (sL1 happy_var_1 (case (unLoc happy_var_1) of (n, doc) -> DocGroup n doc)-	)}--happyReduce_454 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_454 = happySpecReduce_1  175# happyReduction_454-happyReduction_454 happy_x_1-	 =  case happyOut196 happy_x_1 of { happy_var_1 -> -	happyIn191-		 (happy_var_1-	)}--happyReduce_455 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_455 = happyMonadReduce 3# 175# happyReduction_455-happyReduction_455 (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 { happy_var_2 -> -	case happyOut193 happy_x_3 of { happy_var_3 -> -	( do { let { e = sLL happy_var_1 happy_var_2 (SectionR (sL1 happy_var_1 (HsVar (sL1 happy_var_1 bang_RDR))) happy_var_2)-                                              -- Turn it all into an expression so that-                                              -- checkPattern can check that bangs are enabled-                                            ; l = comb2 happy_var_1 happy_var_3 };-                                        (ann, r) <- checkValDef empty SrcStrict e Nothing 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 _ _ _ _) ->-                                                ams (L l ()) [mj AnnFunId n] >> return () ;-                                          (PatBind (L lh _lhs) _rhs _ _ _) ->-                                                ams (L lh ()) [] >> return () } ;--                                        _ <- ams (L l ()) (ann ++ fst (unLoc happy_var_3) ++ [mj AnnBang happy_var_1]) ;-                                        return $! (sL l $ ValD r) })}}})-	) (\r -> happyReturn (happyIn191 r))--happyReduce_456 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_456 = happyMonadReduce 3# 175# happyReduction_456-happyReduction_456 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut202 happy_x_1 of { happy_var_1 -> -	case happyOut142 happy_x_2 of { happy_var_2 -> -	case happyOut193 happy_x_3 of { 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 _ _ _ _) ->-                                                ams (L l ()) (mj AnnFunId n:(fst happy_var_2)) >> return () ;-                                          (PatBind (L lh _lhs) _rhs _ _ _) ->-                                                ams (L lh ()) (fst happy_var_2) >> return () } ;-                                        _ <- ams (L l ()) (ann ++ (fst $ unLoc happy_var_3));-                                        return $! (sL l $ ValD r) })}}})-	) (\r -> happyReturn (happyIn191 r))--happyReduce_457 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_457 = happySpecReduce_1  175# happyReduction_457-happyReduction_457 happy_x_1-	 =  case happyOut106 happy_x_1 of { happy_var_1 -> -	happyIn191-		 (happy_var_1-	)}--happyReduce_458 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_458 = happySpecReduce_1  175# happyReduction_458-happyReduction_458 happy_x_1-	 =  case happyOut189 happy_x_1 of { happy_var_1 -> -	happyIn191-		 (happy_var_1-	)}--happyReduce_459 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_459 = happySpecReduce_1  176# happyReduction_459-happyReduction_459 happy_x_1-	 =  case happyOut191 happy_x_1 of { happy_var_1 -> -	happyIn192-		 (happy_var_1-	)}--happyReduce_460 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_460 = happySpecReduce_1  176# happyReduction_460-happyReduction_460 happy_x_1-	 =  case happyOut212 happy_x_1 of { happy_var_1 -> -	happyIn192-		 (sLL happy_var_1 happy_var_1 $ mkSpliceDecl happy_var_1-	)}--happyReduce_461 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_461 = happySpecReduce_3  177# happyReduction_461-happyReduction_461 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut200 happy_x_2 of { happy_var_2 -> -	case happyOut123 happy_x_3 of { happy_var_3 -> -	happyIn193-		 (sL (comb3 happy_var_1 happy_var_2 happy_var_3)-                                    ((mj AnnEqual happy_var_1 : (fst $ unLoc happy_var_3))-                                    ,GRHSs (unguardedRHS (comb3 happy_var_1 happy_var_2 happy_var_3) happy_var_2)-                                   (snd $ unLoc happy_var_3))-	)}}}--happyReduce_462 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_462 = happySpecReduce_2  177# happyReduction_462-happyReduction_462 happy_x_2-	happy_x_1-	 =  case happyOut194 happy_x_1 of { happy_var_1 -> -	case happyOut123 happy_x_2 of { happy_var_2 -> -	happyIn193-		 (sLL happy_var_1 happy_var_2  (fst $ unLoc happy_var_2-                                    ,GRHSs (reverse (unLoc happy_var_1))-                                                    (snd $ unLoc happy_var_2))-	)}}--happyReduce_463 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_463 = happySpecReduce_2  178# happyReduction_463-happyReduction_463 happy_x_2-	happy_x_1-	 =  case happyOut194 happy_x_1 of { happy_var_1 -> -	case happyOut195 happy_x_2 of { happy_var_2 -> -	happyIn194-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : 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  178# happyReduction_464-happyReduction_464 happy_x_1-	 =  case happyOut195 happy_x_1 of { happy_var_1 -> -	happyIn194-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_465 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_465 = happyMonadReduce 4# 179# happyReduction_465-happyReduction_465 (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 happyOut228 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut200 happy_x_4 of { happy_var_4 -> -	( ams (sL (comb2 happy_var_1 happy_var_4) $ GRHS (unLoc happy_var_2) happy_var_4)-                                         [mj AnnVbar happy_var_1,mj AnnEqual happy_var_3])}}}})-	) (\r -> happyReturn (happyIn195 r))--happyReduce_466 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_466 = happyMonadReduce 3# 180# happyReduction_466-happyReduction_466 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut202 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut145 happy_x_3 of { happy_var_3 -> -	( do v <- checkValSigLhs happy_var_1-                        ; _ <- ams (sLL happy_var_1 happy_var_3 ()) [mu AnnDcolon happy_var_2]-                        ; return (sLL happy_var_1 happy_var_3 $ SigD $-                                  TypeSig [v] (mkLHsSigWcType happy_var_3)))}}})-	) (\r -> happyReturn (happyIn196 r))--happyReduce_467 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_467 = happyMonadReduce 5# 180# happyReduction_467-happyReduction_467 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut291 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut146 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut145 happy_x_5 of { happy_var_5 -> -	( do { let sig = TypeSig (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 sig )-                       [mu AnnDcolon happy_var_4] })}}}}})-	) (\r -> happyReturn (happyIn196 r))--happyReduce_468 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_468 = happyMonadReduce 3# 180# happyReduction_468-happyReduction_468 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut73 happy_x_1 of { happy_var_1 -> -	case happyOut72 happy_x_2 of { happy_var_2 -> -	case happyOut74 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ SigD-                        (FixSig (FixitySig (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 (happyIn196 r))--happyReduce_469 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_469 = happySpecReduce_1  180# happyReduction_469-happyReduction_469 happy_x_1-	 =  case happyOut111 happy_x_1 of { happy_var_1 -> -	happyIn196-		 (sLL happy_var_1 happy_var_1 . SigD . unLoc $ happy_var_1-	)}--happyReduce_470 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_470 = happyMonadReduce 4# 180# happyReduction_470-happyReduction_470 (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 { happy_var_2 -> -	case happyOut143 happy_x_3 of { 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 (CompleteMatchSig (getCOMPLETE_PRAGs happy_var_1) happy_var_2 tc)))-                    ([ mo happy_var_1 ] ++ dcolon ++ [mc happy_var_4]))}}}})-	) (\r -> happyReturn (happyIn196 r))--happyReduce_471 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_471 = happyMonadReduce 4# 180# happyReduction_471-happyReduction_471 (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 happyOut197 happy_x_2 of { happy_var_2 -> -	case happyOut292 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams ((sLL happy_var_1 happy_var_4 $ SigD (InlineSig 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 (happyIn196 r))--happyReduce_472 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_472 = happyMonadReduce 3# 180# happyReduction_472-happyReduction_472 (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 happyOut292 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (SigD (SCCFunSig (getSCC_PRAGs happy_var_1) happy_var_2 Nothing)))-                 [mo happy_var_1, mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn196 r))--happyReduce_473 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_473 = happyMonadReduce 4# 180# happyReduction_473-happyReduction_473 (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 happyOut292 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 -> -	( do { scc <- getSCC happy_var_3-                ; let str_lit = StringLiteral (getSTRINGs happy_var_3) scc-                ; ams (sLL happy_var_1 happy_var_4 (SigD (SCCFunSig (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 (happyIn196 r))--happyReduce_474 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_474 = happyMonadReduce 6# 180# happyReduction_474-happyReduction_474 (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 happyOut197 happy_x_2 of { happy_var_2 -> -	case happyOut292 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut147 happy_x_5 of { 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 (SpecSig 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 (happyIn196 r))--happyReduce_475 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_475 = happyMonadReduce 6# 180# happyReduction_475-happyReduction_475 (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 happyOut197 happy_x_2 of { happy_var_2 -> -	case happyOut292 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut147 happy_x_5 of { happy_var_5 -> -	case happyOutTok happy_x_6 of { happy_var_6 -> -	( ams (sLL happy_var_1 happy_var_6 $ SigD (SpecSig 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 (happyIn196 r))--happyReduce_476 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_476 = happyMonadReduce 4# 180# happyReduction_476-happyReduction_476 (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 happyOut162 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4-                                  $ SigD (SpecInstSig (getSPEC_PRAGs happy_var_1) happy_var_3))-                       [mo happy_var_1,mj AnnInstance happy_var_2,mc happy_var_4])}}}})-	) (\r -> happyReturn (happyIn196 r))--happyReduce_477 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_477 = happyMonadReduce 3# 180# happyReduction_477-happyReduction_477 (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 happyOut255 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ SigD (MinimalSig (getMINIMAL_PRAGs happy_var_1) happy_var_2))-                   [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn196 r))--happyReduce_478 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_478 = happySpecReduce_0  181# happyReduction_478-happyReduction_478  =  happyIn197-		 (([],Nothing)-	)--happyReduce_479 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_479 = happySpecReduce_1  181# happyReduction_479-happyReduction_479 happy_x_1-	 =  case happyOut198 happy_x_1 of { happy_var_1 -> -	happyIn197-		 ((fst happy_var_1,Just (snd happy_var_1))-	)}--happyReduce_480 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_480 = happySpecReduce_3  182# happyReduction_480-happyReduction_480 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 -> -	happyIn198-		 (([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_481 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_481 = happyReduce 4# 182# happyReduction_481-happyReduction_481 (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 -> -	happyIn198-		 (([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_482 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_482 = happySpecReduce_1  183# happyReduction_482-happyReduction_482 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn199-		 (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_483 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_483 = happySpecReduce_1  183# happyReduction_483-happyReduction_483 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn199-		 (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_484 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_484 = happyMonadReduce 3# 184# happyReduction_484-happyReduction_484 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut144 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ ExprWithTySig happy_var_1 (mkLHsSigWcType happy_var_3))-                                       [mu AnnDcolon happy_var_2])}}})-	) (\r -> happyReturn (happyIn200 r))--happyReduce_485 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_485 = happyMonadReduce 3# 184# happyReduction_485-happyReduction_485 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp happy_var_1 happy_var_3 placeHolderType-                                                        HsFirstOrderApp True)-                                       [mu Annlarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn200 r))--happyReduce_486 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_486 = happyMonadReduce 3# 184# happyReduction_486-happyReduction_486 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp happy_var_3 happy_var_1 placeHolderType-                                                      HsFirstOrderApp False)-                                       [mu Annrarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn200 r))--happyReduce_487 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_487 = happyMonadReduce 3# 184# happyReduction_487-happyReduction_487 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp happy_var_1 happy_var_3 placeHolderType-                                                      HsHigherOrderApp True)-                                       [mu AnnLarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn200 r))--happyReduce_488 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_488 = happyMonadReduce 3# 184# happyReduction_488-happyReduction_488 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsArrApp happy_var_3 happy_var_1 placeHolderType-                                                      HsHigherOrderApp False)-                                       [mu AnnRarrowtail happy_var_2])}}})-	) (\r -> happyReturn (happyIn200 r))--happyReduce_489 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_489 = happySpecReduce_1  184# happyReduction_489-happyReduction_489 happy_x_1-	 =  case happyOut201 happy_x_1 of { happy_var_1 -> -	happyIn200-		 (happy_var_1-	)}--happyReduce_490 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_490 = happySpecReduce_1  185# happyReduction_490-happyReduction_490 happy_x_1-	 =  case happyOut204 happy_x_1 of { happy_var_1 -> -	happyIn201-		 (happy_var_1-	)}--happyReduce_491 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_491 = happyMonadReduce 3# 185# happyReduction_491-happyReduction_491 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOut283 happy_x_2 of { happy_var_2 -> -	case happyOut204 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (OpApp happy_var_1 happy_var_2 placeHolderFixity happy_var_3))-                                     [mj AnnVal happy_var_2])}}})-	) (\r -> happyReturn (happyIn201 r))--happyReduce_492 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_492 = happySpecReduce_1  186# happyReduction_492-happyReduction_492 happy_x_1-	 =  case happyOut203 happy_x_1 of { happy_var_1 -> -	happyIn202-		 (happy_var_1-	)}--happyReduce_493 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_493 = happyMonadReduce 3# 186# happyReduction_493-happyReduction_493 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut202 happy_x_1 of { happy_var_1 -> -	case happyOut283 happy_x_2 of { happy_var_2 -> -	case happyOut203 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (OpApp happy_var_1 happy_var_2 placeHolderFixity happy_var_3))-                                         [mj AnnVal happy_var_2])}}})-	) (\r -> happyReturn (happyIn202 r))--happyReduce_494 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_494 = happyMonadReduce 5# 187# happyReduction_494-happyReduction_494 (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 happyOut241 happy_x_2 of { happy_var_2 -> -	case happyOut242 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut200 happy_x_5 of { happy_var_5 -> -	( ams (sLL happy_var_1 happy_var_5 $ HsLam (mkMatchGroup FromSource-                            [sLL happy_var_1 happy_var_5 $ Match { 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 (happyIn203 r))--happyReduce_495 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_495 = happyMonadReduce 4# 187# happyReduction_495-happyReduction_495 (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 happyOut122 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut200 happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsLet (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 (happyIn203 r))--happyReduce_496 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_496 = happyMonadReduce 3# 187# happyReduction_496-happyReduction_496 (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 happyOut230 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsLamCase-                                   (mkMatchGroup FromSource (snd $ unLoc happy_var_3)))-                   (mj AnnLam happy_var_1:mj AnnCase happy_var_2:(fst $ unLoc happy_var_3)))}}})-	) (\r -> happyReturn (happyIn203 r))--happyReduce_497 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_497 = happyMonadReduce 8# 187# happyReduction_497-happyReduction_497 (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 happyOut200 happy_x_2 of { happy_var_2 -> -	case happyOut205 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut200 happy_x_5 of { happy_var_5 -> -	case happyOut205 happy_x_6 of { happy_var_6 -> -	case happyOutTok happy_x_7 of { happy_var_7 -> -	case happyOut200 happy_x_8 of { 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 (happyIn203 r))--happyReduce_498 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_498 = happyMonadReduce 2# 187# happyReduction_498-happyReduction_498 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut237 happy_x_2 of { happy_var_2 -> -	( hintMultiWayIf (getLoc happy_var_1) >>-                                           ams (sLL happy_var_1 happy_var_2 $ HsMultiIf-                                                     placeHolderType-                                                     (reverse $ snd $ unLoc happy_var_2))-                                               (mj AnnIf happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn203 r))--happyReduce_499 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_499 = happyMonadReduce 4# 187# happyReduction_499-happyReduction_499 (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 happyOut200 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut230 happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsCase 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 (happyIn203 r))--happyReduce_500 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_500 = happyMonadReduce 2# 187# happyReduction_500-happyReduction_500 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut208 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ NegApp happy_var_2 noSyntaxExpr)-                                               [mj AnnMinus happy_var_1])}})-	) (\r -> happyReturn (happyIn203 r))--happyReduce_501 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_501 = happyMonadReduce 2# 187# happyReduction_501-happyReduction_501 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut243 happy_x_2 of { happy_var_2 -> -	( ams (L (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 (happyIn203 r))--happyReduce_502 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_502 = happyMonadReduce 2# 187# happyReduction_502-happyReduction_502 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut243 happy_x_2 of { happy_var_2 -> -	( ams (L (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 (happyIn203 r))--happyReduce_503 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_503 = happyMonadReduce 2# 187# happyReduction_503-happyReduction_503 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut207 happy_x_1 of { happy_var_1 -> -	case happyOut200 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsTickPragma (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 (happyIn203 r))--happyReduce_504 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_504 = happyMonadReduce 4# 187# happyReduction_504-happyReduction_504 (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 { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut200 happy_x_4 of { happy_var_4 -> -	( checkPattern empty happy_var_2 >>= \ p ->-                           checkCommand happy_var_4 >>= \ cmd ->-                           ams (sLL happy_var_1 happy_var_4 $ HsProc p (sLL happy_var_1 happy_var_4 $ HsCmdTop cmd placeHolderType-                                                placeHolderType []))-                                            -- TODO: is LL right here?-                               [mj AnnProc happy_var_1,mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn203 r))--happyReduce_505 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_505 = happyMonadReduce 4# 187# happyReduction_505-happyReduction_505 (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 happyOut200 happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsCoreAnn (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 (happyIn203 r))--happyReduce_506 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_506 = happySpecReduce_1  187# happyReduction_506-happyReduction_506 happy_x_1-	 =  case happyOut208 happy_x_1 of { happy_var_1 -> -	happyIn203-		 (happy_var_1-	)}--happyReduce_507 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_507 = happySpecReduce_1  188# happyReduction_507-happyReduction_507 happy_x_1-	 =  case happyOut203 happy_x_1 of { happy_var_1 -> -	happyIn204-		 (happy_var_1-	)}--happyReduce_508 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_508 = happyMonadReduce 2# 188# happyReduction_508-happyReduction_508 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut206 happy_x_1 of { happy_var_1 -> -	case happyOut200 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsSCC (snd $ fst $ unLoc happy_var_1) (snd $ unLoc happy_var_1) happy_var_2)-                                      (fst $ fst $ unLoc happy_var_1))}})-	) (\r -> happyReturn (happyIn204 r))--happyReduce_509 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_509 = happySpecReduce_1  189# happyReduction_509-happyReduction_509 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn205-		 (([happy_var_1],True)-	)}--happyReduce_510 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_510 = happySpecReduce_0  189# happyReduction_510-happyReduction_510  =  happyIn205-		 (([],False)-	)--happyReduce_511 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_511 = happyMonadReduce 3# 190# happyReduction_511-happyReduction_511 (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 (happyIn206 r))--happyReduce_512 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_512 = happySpecReduce_3  190# happyReduction_512-happyReduction_512 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 -> -	happyIn206-		 (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_513 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_513 = happyReduce 10# 191# happyReduction_513-happyReduction_513 (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 -> -	happyIn207-		 (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_514 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_514 = happySpecReduce_2  192# happyReduction_514-happyReduction_514 happy_x_2-	happy_x_1-	 =  case happyOut208 happy_x_1 of { happy_var_1 -> -	case happyOut209 happy_x_2 of { happy_var_2 -> -	happyIn208-		 (sLL happy_var_1 happy_var_2 $ HsApp happy_var_1 happy_var_2-	)}}--happyReduce_515 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_515 = happyMonadReduce 3# 192# happyReduction_515-happyReduction_515 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut208 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut161 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsAppType happy_var_1 (mkHsWildCardBndrs happy_var_3))-                                            [mj AnnAt happy_var_2])}}})-	) (\r -> happyReturn (happyIn208 r))--happyReduce_516 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_516 = happyMonadReduce 2# 192# happyReduction_516-happyReduction_516 (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 { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsStatic placeHolderNames happy_var_2)-                                            [mj AnnStatic happy_var_1])}})-	) (\r -> happyReturn (happyIn208 r))--happyReduce_517 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_517 = happySpecReduce_1  192# happyReduction_517-happyReduction_517 happy_x_1-	 =  case happyOut209 happy_x_1 of { happy_var_1 -> -	happyIn208-		 (happy_var_1-	)}--happyReduce_518 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_518 = happyMonadReduce 3# 193# happyReduction_518-happyReduction_518 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut292 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut209 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ EAsPat happy_var_1 happy_var_3) [mj AnnAt happy_var_2])}}})-	) (\r -> happyReturn (happyIn209 r))--happyReduce_519 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_519 = happyMonadReduce 2# 193# 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 happyOut209 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ ELazyPat happy_var_2) [mj AnnTilde happy_var_1])}})-	) (\r -> happyReturn (happyIn209 r))--happyReduce_520 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_520 = happySpecReduce_1  193# happyReduction_520-happyReduction_520 happy_x_1-	 =  case happyOut210 happy_x_1 of { happy_var_1 -> -	happyIn209-		 (happy_var_1-	)}--happyReduce_521 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_521 = happyMonadReduce 4# 194# happyReduction_521-happyReduction_521 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut210 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut248 happy_x_3 of { 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)-                                     ; _ <- ams (sLL 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 (happyIn210 r))--happyReduce_522 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_522 = happySpecReduce_1  194# happyReduction_522-happyReduction_522 happy_x_1-	 =  case happyOut211 happy_x_1 of { happy_var_1 -> -	happyIn210-		 (happy_var_1-	)}--happyReduce_523 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_523 = happySpecReduce_1  195# happyReduction_523-happyReduction_523 happy_x_1-	 =  case happyOut292 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 (HsVar   $! happy_var_1)-	)}--happyReduce_524 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_524 = happySpecReduce_1  195# happyReduction_524-happyReduction_524 happy_x_1-	 =  case happyOut263 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 (HsVar   $! happy_var_1)-	)}--happyReduce_525 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_525 = happySpecReduce_1  195# happyReduction_525-happyReduction_525 happy_x_1-	 =  case happyOut253 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 (HsIPVar $! unLoc happy_var_1)-	)}--happyReduce_526 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_526 = happySpecReduce_1  195# happyReduction_526-happyReduction_526 happy_x_1-	 =  case happyOut254 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 (HsOverLabel Nothing $! unLoc happy_var_1)-	)}--happyReduce_527 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_527 = happySpecReduce_1  195# happyReduction_527-happyReduction_527 happy_x_1-	 =  case happyOut306 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 (HsLit   $! unLoc happy_var_1)-	)}--happyReduce_528 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_528 = happySpecReduce_1  195# happyReduction_528-happyReduction_528 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL (getLoc happy_var_1) (HsOverLit $! mkHsIntegral-                                         (getINTEGER happy_var_1) placeHolderType)-	)}--happyReduce_529 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_529 = happySpecReduce_1  195# happyReduction_529-happyReduction_529 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL (getLoc happy_var_1) (HsOverLit $! mkHsFractional-                                          (getRATIONAL happy_var_1) placeHolderType)-	)}--happyReduce_530 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_530 = happyMonadReduce 3# 195# happyReduction_530-happyReduction_530 (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 { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (HsPar happy_var_2)) [mop happy_var_1,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_531 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_531 = happyMonadReduce 3# 195# happyReduction_531-happyReduction_531 (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 { 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 (happyIn211 r))--happyReduce_532 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_532 = happyMonadReduce 3# 195# happyReduction_532-happyReduction_532 (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 { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (ExplicitTuple [L (gl happy_var_2)-                                                         (Present happy_var_2)] Unboxed))-                                               [mo happy_var_1,mc happy_var_3])}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_533 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_533 = happyMonadReduce 3# 195# happyReduction_533-happyReduction_533 (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 { 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 (happyIn211 r))--happyReduce_534 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_534 = happyMonadReduce 3# 195# happyReduction_534-happyReduction_534 (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 { 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 (happyIn211 r))--happyReduce_535 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_535 = happyMonadReduce 3# 195# happyReduction_535-happyReduction_535 (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 { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (snd happy_var_2)) (mo happy_var_1:mc happy_var_3:(fst happy_var_2)))}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_536 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_536 = happySpecReduce_1  195# happyReduction_536-happyReduction_536 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 EWildPat-	)}--happyReduce_537 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_537 = happySpecReduce_1  195# happyReduction_537-happyReduction_537 happy_x_1-	 =  case happyOut212 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (happy_var_1-	)}--happyReduce_538 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_538 = happyMonadReduce 2# 195# happyReduction_538-happyReduction_538 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut292 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket (VarBr True  (unLoc happy_var_2))) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_539 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_539 = happyMonadReduce 2# 195# happyReduction_539-happyReduction_539 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut263 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket (VarBr True  (unLoc happy_var_2))) [mj AnnSimpleQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_540 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_540 = happyMonadReduce 2# 195# happyReduction_540-happyReduction_540 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut288 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket (VarBr False (unLoc happy_var_2))) [mj AnnThTyQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_541 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_541 = happyMonadReduce 2# 195# happyReduction_541-happyReduction_541 (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 { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2 $ HsBracket (VarBr False (unLoc happy_var_2))) [mj AnnThTyQuote happy_var_1,mj AnnName happy_var_2])}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_542 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_542 = happyMonadReduce 3# 195# 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 happyOut200 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket (ExpBr 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 (happyIn211 r))--happyReduce_543 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_543 = happyMonadReduce 3# 195# 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 happyOut200 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket (TExpBr 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 (happyIn211 r))--happyReduce_544 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_544 = happyMonadReduce 3# 195# 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 happyOut151 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket (TypBr happy_var_2)) [mo happy_var_1,mu AnnCloseQ happy_var_3])}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_545 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_545 = happyMonadReduce 3# 195# 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 happyOut201 happy_x_2 of { 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 (PatBr p))-                                          [mo happy_var_1,mu AnnCloseQ happy_var_3])}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_546 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_546 = happyMonadReduce 3# 195# 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 happyOut215 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ HsBracket (DecBrL (snd happy_var_2)))-                                      (mo happy_var_1:mu AnnCloseQ happy_var_3:fst happy_var_2))}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_547 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_547 = happySpecReduce_1  195# happyReduction_547-happyReduction_547 happy_x_1-	 =  case happyOut199 happy_x_1 of { happy_var_1 -> -	happyIn211-		 (sL1 happy_var_1 (HsSpliceE (unLoc happy_var_1))-	)}--happyReduce_548 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_548 = happyMonadReduce 4# 195# happyReduction_548-happyReduction_548 (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 happyOut211 happy_x_2 of { happy_var_2 -> -	case happyOut213 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	( ams (sLL happy_var_1 happy_var_4 $ HsArrForm happy_var_2-                                                           Nothing (reverse happy_var_3))-                                          [mu AnnOpenB happy_var_1,mu AnnCloseB happy_var_4])}}}})-	) (\r -> happyReturn (happyIn211 r))--happyReduce_549 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_549 = happyMonadReduce 1# 196# happyReduction_549-happyReduction_549 (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 (sL1 happy_var_1 (mkUnqual varName-                                                           (getTH_ID_SPLICE happy_var_1)))))-                                       [mj AnnThIdSplice happy_var_1])})-	) (\r -> happyReturn (happyIn212 r))--happyReduce_550 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_550 = happyMonadReduce 3# 196# happyReduction_550-happyReduction_550 (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 happyOut200 happy_x_2 of { 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 (happyIn212 r))--happyReduce_551 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_551 = happyMonadReduce 1# 196# happyReduction_551-happyReduction_551 (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 (sL1 happy_var_1 (mkUnqual varName-                                                        (getTH_ID_TY_SPLICE happy_var_1)))))-                                       [mj AnnThIdTySplice happy_var_1])})-	) (\r -> happyReturn (happyIn212 r))--happyReduce_552 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_552 = happyMonadReduce 3# 196# happyReduction_552-happyReduction_552 (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 happyOut200 happy_x_2 of { 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 (happyIn212 r))--happyReduce_553 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_553 = happySpecReduce_2  197# happyReduction_553-happyReduction_553 happy_x_2-	happy_x_1-	 =  case happyOut213 happy_x_1 of { happy_var_1 -> -	case happyOut214 happy_x_2 of { happy_var_2 -> -	happyIn213-		 (happy_var_2 : happy_var_1-	)}}--happyReduce_554 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_554 = happySpecReduce_0  197# happyReduction_554-happyReduction_554  =  happyIn213-		 ([]-	)--happyReduce_555 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_555 = happyMonadReduce 1# 198# happyReduction_555-happyReduction_555 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut211 happy_x_1 of { happy_var_1 -> -	( checkCommand happy_var_1 >>= \ cmd ->-                                    return (sL1 happy_var_1 $ HsCmdTop cmd-                                           placeHolderType placeHolderType []))})-	) (\r -> happyReturn (happyIn214 r))--happyReduce_556 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_556 = happySpecReduce_3  199# happyReduction_556-happyReduction_556 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut216 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn215-		 (([mj AnnOpenC happy_var_1-                                                  ,mj AnnCloseC happy_var_3],happy_var_2)-	)}}}--happyReduce_557 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_557 = happySpecReduce_3  199# happyReduction_557-happyReduction_557 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut216 happy_x_2 of { happy_var_2 -> -	happyIn215-		 (([],happy_var_2)-	)}--happyReduce_558 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_558 = happySpecReduce_1  200# happyReduction_558-happyReduction_558 happy_x_1-	 =  case happyOut76 happy_x_1 of { happy_var_1 -> -	happyIn216-		 (cvTopDecls happy_var_1-	)}--happyReduce_559 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_559 = happySpecReduce_1  200# happyReduction_559-happyReduction_559 happy_x_1-	 =  case happyOut75 happy_x_1 of { happy_var_1 -> -	happyIn216-		 (cvTopDecls happy_var_1-	)}--happyReduce_560 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_560 = happySpecReduce_1  201# happyReduction_560-happyReduction_560 happy_x_1-	 =  case happyOut200 happy_x_1 of { happy_var_1 -> -	happyIn217-		 (happy_var_1-	)}--happyReduce_561 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_561 = happySpecReduce_2  201# happyReduction_561-happyReduction_561 happy_x_2-	happy_x_1-	 =  case happyOut201 happy_x_1 of { happy_var_1 -> -	case happyOut283 happy_x_2 of { happy_var_2 -> -	happyIn217-		 (sLL happy_var_1 happy_var_2 $ SectionL happy_var_1 happy_var_2-	)}}--happyReduce_562 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_562 = happySpecReduce_2  201# happyReduction_562-happyReduction_562 happy_x_2-	happy_x_1-	 =  case happyOut284 happy_x_1 of { happy_var_1 -> -	case happyOut201 happy_x_2 of { happy_var_2 -> -	happyIn217-		 (sLL happy_var_1 happy_var_2 $ SectionR happy_var_1 happy_var_2-	)}}--happyReduce_563 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_563 = happyMonadReduce 3# 201# happyReduction_563-happyReduction_563 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut200 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut217 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 $ EViewPat happy_var_1 happy_var_3) [mu AnnRarrow happy_var_2])}}})-	) (\r -> happyReturn (happyIn217 r))--happyReduce_564 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_564 = happyMonadReduce 2# 202# happyReduction_564-happyReduction_564 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOut219 happy_x_2 of { happy_var_2 -> -	( do { addAnnotation (gl happy_var_1) AnnComma (fst happy_var_2)-                                ; return ([],Tuple ((sL1 happy_var_1 (Present happy_var_1)) : snd happy_var_2)) })}})-	) (\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  202# happyReduction_565-happyReduction_565 happy_x_2-	happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOut311 happy_x_2 of { happy_var_2 -> -	happyIn218-		 ((mvbars (fst happy_var_2), Sum 1  (snd happy_var_2 + 1) happy_var_1)-	)}}--happyReduce_566 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_566 = happyMonadReduce 2# 202# happyReduction_566-happyReduction_566 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut309 happy_x_1 of { happy_var_1 -> -	case happyOut220 happy_x_2 of { happy_var_2 -> -	( do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (fst happy_var_1)-                      ; return-                           ([],Tuple (map (\l -> L l missingTupArg) (fst happy_var_1) ++ happy_var_2)) })}})-	) (\r -> happyReturn (happyIn218 r))--happyReduce_567 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_567 = happySpecReduce_3  202# happyReduction_567-happyReduction_567 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut311 happy_x_1 of { happy_var_1 -> -	case happyOut217 happy_x_2 of { happy_var_2 -> -	case happyOut310 happy_x_3 of { happy_var_3 -> -	happyIn218-		 ((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_568 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_568 = happyMonadReduce 2# 203# happyReduction_568-happyReduction_568 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut309 happy_x_1 of { happy_var_1 -> -	case happyOut220 happy_x_2 of { happy_var_2 -> -	( do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (tail $ fst happy_var_1)-             ; return (-            (head $ fst happy_var_1-            ,(map (\l -> L l missingTupArg) (tail $ fst happy_var_1)) ++ happy_var_2)) })}})-	) (\r -> happyReturn (happyIn219 r))--happyReduce_569 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_569 = happyMonadReduce 2# 204# happyReduction_569-happyReduction_569 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOut219 happy_x_2 of { happy_var_2 -> -	( addAnnotation (gl happy_var_1) AnnComma (fst happy_var_2) >>-                                    return ((L (gl happy_var_1) (Present happy_var_1)) : snd happy_var_2))}})-	) (\r -> happyReturn (happyIn220 r))--happyReduce_570 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_570 = happySpecReduce_1  204# happyReduction_570-happyReduction_570 happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	happyIn220-		 ([L (gl happy_var_1) (Present 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  204# happyReduction_571-happyReduction_571  =  happyIn220-		 ([noLoc missingTupArg]-	)--happyReduce_572 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_572 = happySpecReduce_1  205# happyReduction_572-happyReduction_572 happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	happyIn221-		 (([],ExplicitList placeHolderType Nothing [happy_var_1])-	)}--happyReduce_573 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_573 = happySpecReduce_1  205# happyReduction_573-happyReduction_573 happy_x_1-	 =  case happyOut222 happy_x_1 of { happy_var_1 -> -	happyIn221-		 (([],ExplicitList placeHolderType Nothing-                                                   (reverse (unLoc happy_var_1)))-	)}--happyReduce_574 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_574 = happySpecReduce_2  205# happyReduction_574-happyReduction_574 happy_x_2-	happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn221-		 (([mj AnnDotdot happy_var_2],-                                      ArithSeq noPostTcExpr Nothing (From happy_var_1))-	)}}--happyReduce_575 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_575 = happyReduce 4# 205# happyReduction_575-happyReduction_575 (happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	happyIn221-		 (([mj AnnComma happy_var_2,mj AnnDotdot happy_var_4],-                                  ArithSeq noPostTcExpr Nothing-                                                             (FromThen happy_var_1 happy_var_3))-	) `HappyStk` happyRest}}}}--happyReduce_576 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_576 = happySpecReduce_3  205# happyReduction_576-happyReduction_576 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	happyIn221-		 (([mj AnnDotdot happy_var_2],-                                   ArithSeq noPostTcExpr Nothing-                                                               (FromTo happy_var_1 happy_var_3))-	)}}}--happyReduce_577 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_577 = happyReduce 5# 205# happyReduction_577-happyReduction_577 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut200 happy_x_5 of { happy_var_5 -> -	happyIn221-		 (([mj AnnComma happy_var_2,mj AnnDotdot happy_var_4],-                                    ArithSeq noPostTcExpr Nothing-                                                (FromThenTo happy_var_1 happy_var_3 happy_var_5))-	) `HappyStk` happyRest}}}}}--happyReduce_578 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_578 = happyMonadReduce 3# 205# happyReduction_578-happyReduction_578 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut223 happy_x_3 of { happy_var_3 -> -	( checkMonadComp >>= \ ctxt ->-                return ([mj AnnVbar happy_var_2],-                        mkHsComp ctxt (unLoc happy_var_3) happy_var_1))}}})-	) (\r -> happyReturn (happyIn221 r))--happyReduce_579 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_579 = happyMonadReduce 3# 206# happyReduction_579-happyReduction_579 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut222 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut217 happy_x_3 of { 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 (happyIn222 r))--happyReduce_580 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_580 = happyMonadReduce 3# 206# happyReduction_580-happyReduction_580 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut217 happy_x_3 of { 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 (happyIn222 r))--happyReduce_581 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_581 = happySpecReduce_1  207# happyReduction_581-happyReduction_581 happy_x_1-	 =  case happyOut224 happy_x_1 of { happy_var_1 -> -	happyIn223-		 (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 [ParStmtBlock qs [] noSyntaxExpr |-                                            qs <- qss]-                                            noExpr noSyntaxExpr placeHolderType]-                    -- We actually found some actual parallel lists so-                    -- we wrap them into as a ParStmt-	)}--happyReduce_582 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_582 = happyMonadReduce 3# 208# happyReduction_582-happyReduction_582 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut225 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut224 happy_x_3 of { 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 (happyIn224 r))--happyReduce_583 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_583 = happySpecReduce_1  208# happyReduction_583-happyReduction_583 happy_x_1-	 =  case happyOut225 happy_x_1 of { happy_var_1 -> -	happyIn224-		 (L (getLoc happy_var_1) [reverse (unLoc happy_var_1)]-	)}--happyReduce_584 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_584 = happyMonadReduce 3# 209# happyReduction_584-happyReduction_584 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut225 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut226 happy_x_3 of { happy_var_3 -> -	( addAnnotation (gl $ head $ unLoc happy_var_1) AnnComma (gl happy_var_2) >>-                ams (sLL 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 (happyIn225 r))--happyReduce_585 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_585 = happyMonadReduce 3# 209# happyReduction_585-happyReduction_585 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut225 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut247 happy_x_3 of { 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 (happyIn225 r))--happyReduce_586 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_586 = happyMonadReduce 1# 209# happyReduction_586-happyReduction_586 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut226 happy_x_1 of { happy_var_1 -> -	( ams happy_var_1 (fst $ unLoc happy_var_1) >>-                              return (sLL happy_var_1 happy_var_1 [L (getLoc happy_var_1) ((snd $ unLoc happy_var_1) [])]))})-	) (\r -> happyReturn (happyIn225 r))--happyReduce_587 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_587 = happySpecReduce_1  209# happyReduction_587-happyReduction_587 happy_x_1-	 =  case happyOut247 happy_x_1 of { happy_var_1 -> -	happyIn225-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_588 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_588 = happySpecReduce_2  210# happyReduction_588-happyReduction_588 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut200 happy_x_2 of { happy_var_2 -> -	happyIn226-		 (sLL happy_var_1 happy_var_2 ([mj AnnThen happy_var_1], \ss -> (mkTransformStmt ss happy_var_2))-	)}}--happyReduce_589 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_589 = happyReduce 4# 210# happyReduction_589-happyReduction_589 (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 happyOut200 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut200 happy_x_4 of { happy_var_4 -> -	happyIn226-		 (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_590 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_590 = happyReduce 4# 210# happyReduction_590-happyReduction_590 (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 happyOut200 happy_x_4 of { happy_var_4 -> -	happyIn226-		 (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_591 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_591 = happyReduce 6# 210# happyReduction_591-happyReduction_591 (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 happyOut200 happy_x_4 of { happy_var_4 -> -	case happyOutTok happy_x_5 of { happy_var_5 -> -	case happyOut200 happy_x_6 of { happy_var_6 -> -	happyIn226-		 (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_592 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_592 = happySpecReduce_0  211# happyReduction_592-happyReduction_592  =  happyIn227-		 (([],ExplicitPArr placeHolderType [])-	)--happyReduce_593 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_593 = happySpecReduce_1  211# happyReduction_593-happyReduction_593 happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	happyIn227-		 (([],ExplicitPArr placeHolderType [happy_var_1])-	)}--happyReduce_594 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_594 = happySpecReduce_1  211# happyReduction_594-happyReduction_594 happy_x_1-	 =  case happyOut222 happy_x_1 of { happy_var_1 -> -	happyIn227-		 (([],ExplicitPArr placeHolderType-                                                          (reverse (unLoc happy_var_1)))-	)}--happyReduce_595 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_595 = happySpecReduce_3  211# happyReduction_595-happyReduction_595 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	happyIn227-		 (([mj AnnDotdot happy_var_2]-                                 ,PArrSeq noPostTcExpr (FromTo happy_var_1 happy_var_3))-	)}}}--happyReduce_596 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_596 = happyReduce 5# 211# happyReduction_596-happyReduction_596 (happy_x_5 `HappyStk`-	happy_x_4 `HappyStk`-	happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest)-	 = case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	case happyOutTok happy_x_4 of { happy_var_4 -> -	case happyOut200 happy_x_5 of { happy_var_5 -> -	happyIn227-		 (([mj AnnComma happy_var_2,mj AnnDotdot happy_var_4]-                          ,PArrSeq noPostTcExpr (FromThenTo happy_var_1 happy_var_3 happy_var_5))-	) `HappyStk` happyRest}}}}}--happyReduce_597 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_597 = happySpecReduce_3  211# happyReduction_597-happyReduction_597 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut217 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut223 happy_x_3 of { happy_var_3 -> -	happyIn227-		 (([mj AnnVbar happy_var_2],mkHsComp PArrComp (unLoc 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  212# happyReduction_598-happyReduction_598 happy_x_1-	 =  case happyOut229 happy_x_1 of { happy_var_1 -> -	happyIn228-		 (L (getLoc happy_var_1) (reverse (unLoc happy_var_1))-	)}--happyReduce_599 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_599 = happyMonadReduce 3# 213# happyReduction_599-happyReduction_599 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut229 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut247 happy_x_3 of { 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 (happyIn229 r))--happyReduce_600 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_600 = happySpecReduce_1  213# happyReduction_600-happyReduction_600 happy_x_1-	 =  case happyOut247 happy_x_1 of { happy_var_1 -> -	happyIn229-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_601 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_601 = happySpecReduce_3  214# happyReduction_601-happyReduction_601 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut231 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn230-		 (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_602 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_602 = happySpecReduce_3  214# happyReduction_602-happyReduction_602 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut231 happy_x_2 of { happy_var_2 -> -	happyIn230-		 (L (getLoc happy_var_2) (fst $ unLoc happy_var_2-                                        ,(reverse (snd $ unLoc happy_var_2)))-	)}--happyReduce_603 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_603 = happySpecReduce_2  214# happyReduction_603-happyReduction_603 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn230-		 (noLoc ([moc happy_var_1,mcc happy_var_2],[])-	)}}--happyReduce_604 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_604 = happySpecReduce_2  214# happyReduction_604-happyReduction_604 happy_x_2-	happy_x_1-	 =  happyIn230-		 (noLoc ([],[])-	)--happyReduce_605 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_605 = happySpecReduce_1  215# happyReduction_605-happyReduction_605 happy_x_1-	 =  case happyOut232 happy_x_1 of { happy_var_1 -> -	happyIn231-		 (sL1 happy_var_1 (fst $ unLoc happy_var_1,snd $ unLoc happy_var_1)-	)}--happyReduce_606 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_606 = happySpecReduce_2  215# happyReduction_606-happyReduction_606 happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut231 happy_x_2 of { happy_var_2 -> -	happyIn231-		 (sLL happy_var_1 happy_var_2 ((mj AnnSemi happy_var_1:(fst $ unLoc happy_var_2))-                                               ,snd $ unLoc happy_var_2)-	)}}--happyReduce_607 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_607 = happyMonadReduce 3# 216# happyReduction_607-happyReduction_607 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut232 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut233 happy_x_3 of { 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 (happyIn232 r))--happyReduce_608 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_608 = happyMonadReduce 2# 216# happyReduction_608-happyReduction_608 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut232 happy_x_1 of { 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 (happyIn232 r))--happyReduce_609 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_609 = happySpecReduce_1  216# happyReduction_609-happyReduction_609 happy_x_1-	 =  case happyOut233 happy_x_1 of { happy_var_1 -> -	happyIn232-		 (sL1 happy_var_1 ([],[happy_var_1])-	)}--happyReduce_610 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_610 = happyMonadReduce 2# 217# happyReduction_610-happyReduction_610 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut239 happy_x_1 of { happy_var_1 -> -	case happyOut234 happy_x_2 of { happy_var_2 -> -	(ams (sLL happy_var_1 happy_var_2 (Match { m_ctxt = CaseAlt-                                               , m_pats = [happy_var_1]-                                               , m_grhss = snd $ unLoc happy_var_2 }))-                                      (fst $ unLoc happy_var_2))}})-	) (\r -> happyReturn (happyIn233 r))--happyReduce_611 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_611 = happySpecReduce_2  218# happyReduction_611-happyReduction_611 happy_x_2-	happy_x_1-	 =  case happyOut235 happy_x_1 of { happy_var_1 -> -	case happyOut123 happy_x_2 of { happy_var_2 -> -	happyIn234-		 (sLL happy_var_1 happy_var_2 (fst $ unLoc happy_var_2,-                                            GRHSs (unLoc happy_var_1) (snd $ unLoc happy_var_2))-	)}}--happyReduce_612 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_612 = happyMonadReduce 2# 219# happyReduction_612-happyReduction_612 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut200 happy_x_2 of { 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 (happyIn235 r))--happyReduce_613 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_613 = happySpecReduce_1  219# happyReduction_613-happyReduction_613 happy_x_1-	 =  case happyOut236 happy_x_1 of { happy_var_1 -> -	happyIn235-		 (sL1 happy_var_1 (reverse (unLoc happy_var_1))-	)}--happyReduce_614 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_614 = happySpecReduce_2  220# happyReduction_614-happyReduction_614 happy_x_2-	happy_x_1-	 =  case happyOut236 happy_x_1 of { happy_var_1 -> -	case happyOut238 happy_x_2 of { happy_var_2 -> -	happyIn236-		 (sLL happy_var_1 happy_var_2 (happy_var_2 : unLoc happy_var_1)-	)}}--happyReduce_615 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_615 = happySpecReduce_1  220# happyReduction_615-happyReduction_615 happy_x_1-	 =  case happyOut238 happy_x_1 of { happy_var_1 -> -	happyIn236-		 (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 = happySpecReduce_3  221# happyReduction_616-happyReduction_616 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut236 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn237-		 (sLL happy_var_1 happy_var_3 ([moc happy_var_1,mcc happy_var_3],unLoc happy_var_2)-	)}}}--happyReduce_617 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_617 = happySpecReduce_2  221# happyReduction_617-happyReduction_617 happy_x_2-	happy_x_1-	 =  case happyOut236 happy_x_1 of { happy_var_1 -> -	happyIn237-		 (sL1 happy_var_1 ([],unLoc happy_var_1)-	)}--happyReduce_618 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_618 = happyMonadReduce 4# 222# happyReduction_618-happyReduction_618 (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 happyOut228 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	case happyOut200 happy_x_4 of { happy_var_4 -> -	( ams (sL (comb2 happy_var_1 happy_var_4) $ GRHS (unLoc happy_var_2) happy_var_4)-                                         [mj AnnVbar happy_var_1,mu AnnRarrow happy_var_3])}}}})-	) (\r -> happyReturn (happyIn238 r))--happyReduce_619 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_619 = happyMonadReduce 1# 223# happyReduction_619-happyReduction_619 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut200 happy_x_1 of { happy_var_1 -> -	( checkPattern empty happy_var_1)})-	) (\r -> happyReturn (happyIn239 r))--happyReduce_620 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_620 = happyMonadReduce 2# 223# happyReduction_620-happyReduction_620 (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 { happy_var_2 -> -	( amms (checkPattern empty (sLL happy_var_1 happy_var_2 (SectionR-                                                     (sL1 happy_var_1 (HsVar (sL1 happy_var_1 bang_RDR))) happy_var_2)))-                                [mj AnnBang happy_var_1])}})-	) (\r -> happyReturn (happyIn239 r))--happyReduce_621 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_621 = happyMonadReduce 1# 224# happyReduction_621-happyReduction_621 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut200 happy_x_1 of { happy_var_1 -> -	( checkPattern-                                (text "Possibly caused by a missing 'do'?") happy_var_1)})-	) (\r -> happyReturn (happyIn240 r))--happyReduce_622 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_622 = happyMonadReduce 2# 224# happyReduction_622-happyReduction_622 (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 { happy_var_2 -> -	( amms (checkPattern-                                     (text "Possibly caused by a missing 'do'?")-                                     (sLL happy_var_1 happy_var_2 (SectionR (sL1 happy_var_1 (HsVar (sL1 happy_var_1 bang_RDR))) happy_var_2)))-                                  [mj AnnBang happy_var_1])}})-	) (\r -> happyReturn (happyIn240 r))--happyReduce_623 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_623 = happyMonadReduce 1# 225# happyReduction_623-happyReduction_623 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut209 happy_x_1 of { happy_var_1 -> -	( checkPattern empty happy_var_1)})-	) (\r -> happyReturn (happyIn241 r))--happyReduce_624 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_624 = happyMonadReduce 2# 225# happyReduction_624-happyReduction_624 (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 { happy_var_2 -> -	( amms (checkPattern empty-                                            (sLL happy_var_1 happy_var_2 (SectionR-                                                (sL1 happy_var_1 (HsVar (sL1 happy_var_1 bang_RDR))) happy_var_2)))-                                        [mj AnnBang happy_var_1])}})-	) (\r -> happyReturn (happyIn241 r))--happyReduce_625 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_625 = happySpecReduce_2  226# happyReduction_625-happyReduction_625 happy_x_2-	happy_x_1-	 =  case happyOut241 happy_x_1 of { happy_var_1 -> -	case happyOut242 happy_x_2 of { happy_var_2 -> -	happyIn242-		 (happy_var_1 : happy_var_2-	)}}--happyReduce_626 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_626 = happySpecReduce_0  226# happyReduction_626-happyReduction_626  =  happyIn242-		 ([]-	)--happyReduce_627 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_627 = happySpecReduce_3  227# happyReduction_627-happyReduction_627 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut244 happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	happyIn243-		 (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_628 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_628 = happySpecReduce_3  227# happyReduction_628-happyReduction_628 happy_x_3-	happy_x_2-	happy_x_1-	 =  case happyOut244 happy_x_2 of { happy_var_2 -> -	happyIn243-		 (L (gl happy_var_2) (fst $ unLoc happy_var_2-                                                    ,reverse $ snd $ unLoc happy_var_2)-	)}--happyReduce_629 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_629 = happyMonadReduce 3# 228# happyReduction_629-happyReduction_629 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut244 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut246 happy_x_3 of { 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 (happyIn244 r))--happyReduce_630 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_630 = happyMonadReduce 2# 228# happyReduction_630-happyReduction_630 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut244 happy_x_1 of { 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 (happyIn244 r))--happyReduce_631 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_631 = happySpecReduce_1  228# happyReduction_631-happyReduction_631 happy_x_1-	 =  case happyOut246 happy_x_1 of { happy_var_1 -> -	happyIn244-		 (sL1 happy_var_1 ([],[happy_var_1])-	)}--happyReduce_632 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_632 = happySpecReduce_0  228# happyReduction_632-happyReduction_632  =  happyIn244-		 (noLoc ([],[])-	)--happyReduce_633 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_633 = happySpecReduce_1  229# happyReduction_633-happyReduction_633 happy_x_1-	 =  case happyOut246 happy_x_1 of { happy_var_1 -> -	happyIn245-		 (Just happy_var_1-	)}--happyReduce_634 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_634 = happySpecReduce_0  229# happyReduction_634-happyReduction_634  =  happyIn245-		 (Nothing-	)--happyReduce_635 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_635 = happySpecReduce_1  230# happyReduction_635-happyReduction_635 happy_x_1-	 =  case happyOut247 happy_x_1 of { happy_var_1 -> -	happyIn246-		 (happy_var_1-	)}--happyReduce_636 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_636 = happyMonadReduce 2# 230# happyReduction_636-happyReduction_636 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut243 happy_x_2 of { 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 (happyIn246 r))--happyReduce_637 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_637 = happyMonadReduce 3# 231# happyReduction_637-happyReduction_637 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut240 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { 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 (happyIn247 r))--happyReduce_638 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_638 = happySpecReduce_1  231# happyReduction_638-happyReduction_638 happy_x_1-	 =  case happyOut200 happy_x_1 of { happy_var_1 -> -	happyIn247-		 (sL1 happy_var_1 $ mkBodyStmt happy_var_1-	)}--happyReduce_639 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_639 = happyMonadReduce 2# 231# happyReduction_639-happyReduction_639 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	case happyOut122 happy_x_2 of { happy_var_2 -> -	( ams (sLL happy_var_1 happy_var_2$ LetStmt (snd $ unLoc happy_var_2))-                                               (mj AnnLet happy_var_1:(fst $ unLoc happy_var_2)))}})-	) (\r -> happyReturn (happyIn247 r))--happyReduce_640 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_640 = happySpecReduce_1  232# happyReduction_640-happyReduction_640 happy_x_1-	 =  case happyOut249 happy_x_1 of { happy_var_1 -> -	happyIn248-		 (happy_var_1-	)}--happyReduce_641 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_641 = happySpecReduce_0  232# happyReduction_641-happyReduction_641  =  happyIn248-		 (([],([], False))-	)--happyReduce_642 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_642 = happyMonadReduce 3# 233# happyReduction_642-happyReduction_642 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut250 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut249 happy_x_3 of { 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 (happyIn249 r))--happyReduce_643 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_643 = happySpecReduce_1  233# happyReduction_643-happyReduction_643 happy_x_1-	 =  case happyOut250 happy_x_1 of { happy_var_1 -> -	happyIn249-		 (([],([happy_var_1], False))-	)}--happyReduce_644 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_644 = happySpecReduce_1  233# happyReduction_644-happyReduction_644 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn249-		 (([mj AnnDotdot happy_var_1],([],   True))-	)}--happyReduce_645 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_645 = happyMonadReduce 3# 234# happyReduction_645-happyReduction_645 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut292 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut217 happy_x_3 of { 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 (happyIn250 r))--happyReduce_646 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_646 = happySpecReduce_1  234# happyReduction_646-happyReduction_646 happy_x_1-	 =  case happyOut292 happy_x_1 of { happy_var_1 -> -	happyIn250-		 (sLL happy_var_1 happy_var_1 $ HsRecField (sL1 happy_var_1 $ mkFieldOcc happy_var_1) placeHolderPunRhs True-	)}--happyReduce_647 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_647 = happyMonadReduce 3# 235# happyReduction_647-happyReduction_647 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut251 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut252 happy_x_3 of { 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 (happyIn251 r))--happyReduce_648 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_648 = happyMonadReduce 2# 235# happyReduction_648-happyReduction_648 (happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut251 happy_x_1 of { 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 (happyIn251 r))--happyReduce_649 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_649 = happySpecReduce_1  235# happyReduction_649-happyReduction_649 happy_x_1-	 =  case happyOut252 happy_x_1 of { happy_var_1 -> -	happyIn251-		 (let this = happy_var_1 in this `seq` sL1 happy_var_1 [this]-	)}--happyReduce_650 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_650 = happyMonadReduce 3# 236# happyReduction_650-happyReduction_650 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut253 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut200 happy_x_3 of { happy_var_3 -> -	( ams (sLL happy_var_1 happy_var_3 (IPBind (Left happy_var_1) happy_var_3))-                                              [mj AnnEqual happy_var_2])}}})-	) (\r -> happyReturn (happyIn252 r))--happyReduce_651 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_651 = happySpecReduce_1  237# happyReduction_651-happyReduction_651 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn253-		 (sL1 happy_var_1 (HsIPName (getIPDUPVARID happy_var_1))-	)}--happyReduce_652 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_652 = happySpecReduce_1  238# happyReduction_652-happyReduction_652 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn254-		 (sL1 happy_var_1 (getLABELVARID happy_var_1)-	)}--happyReduce_653 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_653 = happySpecReduce_1  239# happyReduction_653-happyReduction_653 happy_x_1-	 =  case happyOut256 happy_x_1 of { happy_var_1 -> -	happyIn255-		 (happy_var_1-	)}--happyReduce_654 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_654 = happySpecReduce_0  239# happyReduction_654-happyReduction_654  =  happyIn255-		 (noLoc mkTrue-	)--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 { happy_var_1 -> -	happyIn256-		 (happy_var_1-	)}--happyReduce_656 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_656 = happyMonadReduce 3# 240# happyReduction_656-happyReduction_656 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut257 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut256 happy_x_3 of { 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 (happyIn256 r))--happyReduce_657 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_657 = happySpecReduce_1  241# happyReduction_657-happyReduction_657 happy_x_1-	 =  case happyOut258 happy_x_1 of { happy_var_1 -> -	happyIn257-		 (sLL (head happy_var_1) (last happy_var_1) (And (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  242# happyReduction_658-happyReduction_658 happy_x_1-	 =  case happyOut259 happy_x_1 of { happy_var_1 -> -	happyIn258-		 ([happy_var_1]-	)}--happyReduce_659 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_659 = happyMonadReduce 3# 242# happyReduction_659-happyReduction_659 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut259 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut258 happy_x_3 of { happy_var_3 -> -	( aa happy_var_1 (AnnComma, happy_var_2) >> return (happy_var_1 : happy_var_3))}}})-	) (\r -> happyReturn (happyIn258 r))--happyReduce_660 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_660 = happyMonadReduce 3# 243# happyReduction_660-happyReduction_660 (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 happyOut256 happy_x_2 of { 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 (happyIn259 r))--happyReduce_661 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_661 = happySpecReduce_1  243# happyReduction_661-happyReduction_661 happy_x_1-	 =  case happyOut261 happy_x_1 of { happy_var_1 -> -	happyIn259-		 (sL1 happy_var_1 (Var happy_var_1)-	)}--happyReduce_662 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_662 = happySpecReduce_1  244# happyReduction_662-happyReduction_662 happy_x_1-	 =  case happyOut261 happy_x_1 of { happy_var_1 -> -	happyIn260-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_663 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_663 = happyMonadReduce 3# 244# happyReduction_663-happyReduction_663 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut261 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut260 happy_x_3 of { 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 (happyIn260 r))--happyReduce_664 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_664 = happySpecReduce_1  245# happyReduction_664-happyReduction_664 happy_x_1-	 =  case happyOut291 happy_x_1 of { happy_var_1 -> -	happyIn261-		 (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  245# happyReduction_665-happyReduction_665 happy_x_1-	 =  case happyOut265 happy_x_1 of { happy_var_1 -> -	happyIn261-		 (happy_var_1-	)}--happyReduce_666 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_666 = happySpecReduce_1  246# happyReduction_666-happyReduction_666 happy_x_1-	 =  case happyOut264 happy_x_1 of { happy_var_1 -> -	happyIn262-		 (happy_var_1-	)}--happyReduce_667 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_667 = happySpecReduce_1  246# happyReduction_667-happyReduction_667 happy_x_1-	 =  case happyOut267 happy_x_1 of { happy_var_1 -> -	happyIn262-		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc 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  247# happyReduction_668-happyReduction_668 happy_x_1-	 =  case happyOut264 happy_x_1 of { happy_var_1 -> -	happyIn263-		 (happy_var_1-	)}--happyReduce_669 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_669 = happySpecReduce_1  247# happyReduction_669-happyReduction_669 happy_x_1-	 =  case happyOut268 happy_x_1 of { happy_var_1 -> -	happyIn263-		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc 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  248# happyReduction_670-happyReduction_670 happy_x_1-	 =  case happyOut302 happy_x_1 of { happy_var_1 -> -	happyIn264-		 (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# 248# happyReduction_671-happyReduction_671 (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 { 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 (happyIn264 r))--happyReduce_672 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_672 = happySpecReduce_1  249# happyReduction_672-happyReduction_672 happy_x_1-	 =  case happyOut303 happy_x_1 of { happy_var_1 -> -	happyIn265-		 (happy_var_1-	)}--happyReduce_673 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_673 = happyMonadReduce 3# 249# happyReduction_673-happyReduction_673 (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 { 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 (happyIn265 r))--happyReduce_674 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_674 = happySpecReduce_1  249# happyReduction_674-happyReduction_674 happy_x_1-	 =  case happyOut268 happy_x_1 of { happy_var_1 -> -	happyIn265-		 (sL1 happy_var_1 $ nameRdrName (dataConName (unLoc 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  250# happyReduction_675-happyReduction_675 happy_x_1-	 =  case happyOut265 happy_x_1 of { happy_var_1 -> -	happyIn266-		 (sL1 happy_var_1 [happy_var_1]-	)}--happyReduce_676 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_676 = happyMonadReduce 3# 250# happyReduction_676-happyReduction_676 (happy_x_3 `HappyStk`-	happy_x_2 `HappyStk`-	happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOut265 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOut266 happy_x_3 of { 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 (happyIn266 r))--happyReduce_677 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_677 = happyMonadReduce 2# 251# happyReduction_677-happyReduction_677 (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 (happyIn267 r))--happyReduce_678 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_678 = happyMonadReduce 3# 251# happyReduction_678-happyReduction_678 (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 { 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 (happyIn267 r))--happyReduce_679 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_679 = happyMonadReduce 2# 251# happyReduction_679-happyReduction_679 (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 (happyIn267 r))--happyReduce_680 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_680 = happyMonadReduce 3# 251# happyReduction_680-happyReduction_680 (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 { 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 (happyIn267 r))--happyReduce_681 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_681 = happySpecReduce_1  252# happyReduction_681-happyReduction_681 happy_x_1-	 =  case happyOut267 happy_x_1 of { happy_var_1 -> -	happyIn268-		 (happy_var_1-	)}--happyReduce_682 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_682 = happyMonadReduce 2# 252# happyReduction_682-happyReduction_682 (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 (happyIn268 r))--happyReduce_683 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_683 = happySpecReduce_1  253# happyReduction_683-happyReduction_683 happy_x_1-	 =  case happyOut305 happy_x_1 of { happy_var_1 -> -	happyIn269-		 (happy_var_1-	)}--happyReduce_684 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_684 = happyMonadReduce 3# 253# 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 happyOut303 happy_x_2 of { 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 (happyIn269 r))--happyReduce_685 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_685 = happySpecReduce_1  254# happyReduction_685-happyReduction_685 happy_x_1-	 =  case happyOut304 happy_x_1 of { happy_var_1 -> -	happyIn270-		 (happy_var_1-	)}--happyReduce_686 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_686 = happyMonadReduce 3# 254# 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 happyOut302 happy_x_2 of { 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 (happyIn270 r))--happyReduce_687 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_687 = happySpecReduce_1  255# happyReduction_687-happyReduction_687 happy_x_1-	 =  case happyOut272 happy_x_1 of { happy_var_1 -> -	happyIn271-		 (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# 255# 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 $ getRdrName unitTyCon)-                                              [mop happy_var_1,mcp happy_var_2])}})-	) (\r -> happyReturn (happyIn271 r))--happyReduce_689 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_689 = happyMonadReduce 2# 255# 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 $ getRdrName unboxedUnitTyCon)-                                              [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn271 r))--happyReduce_690 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_690 = happySpecReduce_1  256# happyReduction_690-happyReduction_690 happy_x_1-	 =  case happyOut273 happy_x_1 of { happy_var_1 -> -	happyIn272-		 (happy_var_1-	)}--happyReduce_691 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_691 = happyMonadReduce 3# 256# happyReduction_691-happyReduction_691 (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 { 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 (happyIn272 r))--happyReduce_692 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_692 = happyMonadReduce 3# 256# 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 happyOut309 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 (tupleTyCon Unboxed-                                                        (snd happy_var_2 + 1)))-                                       (mo happy_var_1:mc happy_var_3:(mcommas (fst happy_var_2))))}}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_693 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_693 = happyMonadReduce 3# 256# happyReduction_693-happyReduction_693 (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 (happyIn272 r))--happyReduce_694 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_694 = happyMonadReduce 2# 256# 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 $ listTyCon_RDR) [mos happy_var_1,mcs happy_var_2])}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_695 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_695 = happyMonadReduce 2# 256# 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 $ parrTyCon_RDR) [mo happy_var_1,mc happy_var_2])}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_696 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_696 = happyMonadReduce 3# 256# 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 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 eqPrimTyCon)-                                        [mop happy_var_1,mj AnnTildehsh happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn272 r))--happyReduce_697 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_697 = happySpecReduce_1  257# happyReduction_697-happyReduction_697 happy_x_1-	 =  case happyOut276 happy_x_1 of { happy_var_1 -> -	happyIn273-		 (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# 257# 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 happyOut279 happy_x_2 of { 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 (happyIn273 r))--happyReduce_699 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_699 = happyMonadReduce 3# 257# 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 $ eqTyCon_RDR)-                                               [mop happy_var_1,mj AnnVal happy_var_2,mcp happy_var_3])}}})-	) (\r -> happyReturn (happyIn273 r))--happyReduce_700 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_700 = happySpecReduce_1  258# happyReduction_700-happyReduction_700 happy_x_1-	 =  case happyOut276 happy_x_1 of { happy_var_1 -> -	happyIn274-		 (happy_var_1-	)}--happyReduce_701 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_701 = happyMonadReduce 3# 258# happyReduction_701-happyReduction_701 (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 = 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 (happyIn274 r))--happyReduce_702 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_702 = happyMonadReduce 3# 258# 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 happyOutTok happy_x_2 of { happy_var_2 -> -	case happyOutTok happy_x_3 of { happy_var_3 -> -	( let 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 (happyIn274 r))--happyReduce_703 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_703 = happyMonadReduce 3# 258# 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 -> -	( let 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 (happyIn274 r))--happyReduce_704 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_704 = happyMonadReduce 3# 258# 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 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 (happyIn274 r))--happyReduce_705 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_705 = happySpecReduce_1  259# happyReduction_705-happyReduction_705 happy_x_1-	 =  case happyOut279 happy_x_1 of { happy_var_1 -> -	happyIn275-		 (happy_var_1-	)}--happyReduce_706 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_706 = happyMonadReduce 3# 259# 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 happyOut276 happy_x_2 of { 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_707 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_707 = happySpecReduce_1  260# happyReduction_707-happyReduction_707 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn276-		 (sL1 happy_var_1 $! mkQual tcClsName (getQCONID happy_var_1)-	)}--happyReduce_708 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_708 = happySpecReduce_1  260# happyReduction_708-happyReduction_708 happy_x_1-	 =  case happyOut278 happy_x_1 of { happy_var_1 -> -	happyIn276-		 (happy_var_1-	)}--happyReduce_709 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_709 = happySpecReduce_1  261# happyReduction_709-happyReduction_709 happy_x_1-	 =  case happyOut276 happy_x_1 of { happy_var_1 -> -	happyIn277-		 (sL1 happy_var_1                     (HsTyVar NotPromoted happy_var_1)-	)}--happyReduce_710 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_710 = happySpecReduce_2  261# happyReduction_710-happyReduction_710 happy_x_2-	happy_x_1-	 =  case happyOut276 happy_x_1 of { happy_var_1 -> -	case happyOut313 happy_x_2 of { happy_var_2 -> -	happyIn277-		 (sLL happy_var_1 happy_var_2 (HsDocTy (sL1 happy_var_1 (HsTyVar NotPromoted happy_var_1)) happy_var_2)-	)}}--happyReduce_711 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_711 = happySpecReduce_1  262# happyReduction_711-happyReduction_711 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn278-		 (sL1 happy_var_1 $! mkUnqual tcClsName (getCONID 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  263# happyReduction_712-happyReduction_712 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn279-		 (sL1 happy_var_1 $! mkQual tcClsName (getQCONSYM 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  263# happyReduction_713-happyReduction_713 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn279-		 (sL1 happy_var_1 $! mkQual tcClsName (getQVARSYM happy_var_1)-	)}--happyReduce_714 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_714 = happySpecReduce_1  263# happyReduction_714-happyReduction_714 happy_x_1-	 =  case happyOut280 happy_x_1 of { happy_var_1 -> -	happyIn279-		 (happy_var_1-	)}--happyReduce_715 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_715 = happySpecReduce_1  264# happyReduction_715-happyReduction_715 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn280-		 (sL1 happy_var_1 $! mkUnqual tcClsName (getCONSYM 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  264# happyReduction_716-happyReduction_716 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn280-		 (sL1 happy_var_1 $! mkUnqual tcClsName (getVARSYM 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  264# happyReduction_717-happyReduction_717 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn280-		 (sL1 happy_var_1 $! consDataCon_RDR-	)}--happyReduce_718 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_718 = happySpecReduce_1  264# happyReduction_718-happyReduction_718 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn280-		 (sL1 happy_var_1 $! mkUnqual tcClsName (fsLit "-")-	)}--happyReduce_719 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_719 = happySpecReduce_1  265# happyReduction_719-happyReduction_719 happy_x_1-	 =  case happyOut282 happy_x_1 of { happy_var_1 -> -	happyIn281-		 (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  265# happyReduction_720-happyReduction_720 happy_x_1-	 =  case happyOut269 happy_x_1 of { happy_var_1 -> -	happyIn281-		 (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  266# happyReduction_721-happyReduction_721 happy_x_1-	 =  case happyOut298 happy_x_1 of { happy_var_1 -> -	happyIn282-		 (happy_var_1-	)}--happyReduce_722 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_722 = happyMonadReduce 3# 266# happyReduction_722-happyReduction_722 (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 happyOut294 happy_x_2 of { 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 (happyIn282 r))--happyReduce_723 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_723 = happySpecReduce_1  267# happyReduction_723-happyReduction_723 happy_x_1-	 =  case happyOut286 happy_x_1 of { happy_var_1 -> -	happyIn283-		 (sL1 happy_var_1 $ HsVar 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  267# happyReduction_724-happyReduction_724 happy_x_1-	 =  case happyOut270 happy_x_1 of { happy_var_1 -> -	happyIn283-		 (sL1 happy_var_1 $ HsVar 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  267# happyReduction_725-happyReduction_725 happy_x_1-	 =  case happyOut285 happy_x_1 of { happy_var_1 -> -	happyIn283-		 (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  268# happyReduction_726-happyReduction_726 happy_x_1-	 =  case happyOut287 happy_x_1 of { happy_var_1 -> -	happyIn284-		 (sL1 happy_var_1 $ HsVar 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  268# happyReduction_727-happyReduction_727 happy_x_1-	 =  case happyOut270 happy_x_1 of { happy_var_1 -> -	happyIn284-		 (sL1 happy_var_1 $ HsVar happy_var_1-	)}--happyReduce_728 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_728 = happySpecReduce_1  268# happyReduction_728-happyReduction_728 happy_x_1-	 =  case happyOut285 happy_x_1 of { happy_var_1 -> -	happyIn284-		 (happy_var_1-	)}--happyReduce_729 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_729 = happyMonadReduce 3# 269# happyReduction_729-happyReduction_729 (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)-                                       [mj AnnBackquote happy_var_1,mj AnnVal happy_var_2-                                       ,mj AnnBackquote happy_var_3])}}})-	) (\r -> happyReturn (happyIn285 r))--happyReduce_730 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_730 = happySpecReduce_1  270# happyReduction_730-happyReduction_730 happy_x_1-	 =  case happyOut295 happy_x_1 of { happy_var_1 -> -	happyIn286-		 (happy_var_1-	)}--happyReduce_731 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_731 = happyMonadReduce 3# 270# happyReduction_731-happyReduction_731 (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 { 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_732 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_732 = happySpecReduce_1  271# happyReduction_732-happyReduction_732 happy_x_1-	 =  case happyOut296 happy_x_1 of { happy_var_1 -> -	happyIn287-		 (happy_var_1-	)}--happyReduce_733 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_733 = happyMonadReduce 3# 271# happyReduction_733-happyReduction_733 (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 { 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_734 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_734 = happySpecReduce_1  272# happyReduction_734-happyReduction_734 happy_x_1-	 =  case happyOut290 happy_x_1 of { happy_var_1 -> -	happyIn288-		 (happy_var_1-	)}--happyReduce_735 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_735 = happyMonadReduce 3# 273# happyReduction_735-happyReduction_735 (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 { 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 (happyIn289 r))--happyReduce_736 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_736 = happyMonadReduce 1# 273# happyReduction_736-happyReduction_736 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( hintExplicitForall' (getLoc happy_var_1))})-	) (\r -> happyReturn (happyIn289 r))--happyReduce_737 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_737 = happySpecReduce_1  274# happyReduction_737-happyReduction_737 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn290-		 (sL1 happy_var_1 $! mkUnqual tvName (getVARID 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  274# happyReduction_738-happyReduction_738 happy_x_1-	 =  case happyOut300 happy_x_1 of { happy_var_1 -> -	happyIn290-		 (sL1 happy_var_1 $! mkUnqual tvName (unLoc 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  274# happyReduction_739-happyReduction_739 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn290-		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "unsafe")-	)}--happyReduce_740 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_740 = happySpecReduce_1  274# happyReduction_740-happyReduction_740 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn290-		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "safe")-	)}--happyReduce_741 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_741 = happySpecReduce_1  274# happyReduction_741-happyReduction_741 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn290-		 (sL1 happy_var_1 $! mkUnqual tvName (fsLit "interruptible")-	)}--happyReduce_742 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_742 = happySpecReduce_1  275# happyReduction_742-happyReduction_742 happy_x_1-	 =  case happyOut294 happy_x_1 of { happy_var_1 -> -	happyIn291-		 (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# 275# 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 happyOut298 happy_x_2 of { 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 (happyIn291 r))--happyReduce_744 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_744 = happySpecReduce_1  276# happyReduction_744-happyReduction_744 happy_x_1-	 =  case happyOut293 happy_x_1 of { happy_var_1 -> -	happyIn292-		 (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# 276# 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 happyOut298 happy_x_2 of { 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 (happyIn292 r))--happyReduce_746 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_746 = happyMonadReduce 3# 276# happyReduction_746-happyReduction_746 (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 { 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 (happyIn292 r))--happyReduce_747 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_747 = happySpecReduce_1  277# happyReduction_747-happyReduction_747 happy_x_1-	 =  case happyOut294 happy_x_1 of { happy_var_1 -> -	happyIn293-		 (happy_var_1-	)}--happyReduce_748 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_748 = happySpecReduce_1  277# happyReduction_748-happyReduction_748 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn293-		 (sL1 happy_var_1 $! mkQual varName (getQVARID happy_var_1)-	)}--happyReduce_749 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_749 = happySpecReduce_1  278# happyReduction_749-happyReduction_749 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (getVARID happy_var_1)-	)}--happyReduce_750 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_750 = happySpecReduce_1  278# happyReduction_750-happyReduction_750 happy_x_1-	 =  case happyOut300 happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (unLoc 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  278# happyReduction_751-happyReduction_751 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "unsafe")-	)}--happyReduce_752 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_752 = happySpecReduce_1  278# happyReduction_752-happyReduction_752 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "safe")-	)}--happyReduce_753 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_753 = happySpecReduce_1  278# happyReduction_753-happyReduction_753 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "interruptible")-	)}--happyReduce_754 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_754 = happySpecReduce_1  278# happyReduction_754-happyReduction_754 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "forall")-	)}--happyReduce_755 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_755 = happySpecReduce_1  278# happyReduction_755-happyReduction_755 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "family")-	)}--happyReduce_756 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_756 = happySpecReduce_1  278# happyReduction_756-happyReduction_756 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn294-		 (sL1 happy_var_1 $! mkUnqual varName (fsLit "role")-	)}--happyReduce_757 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_757 = happySpecReduce_1  279# happyReduction_757-happyReduction_757 happy_x_1-	 =  case happyOut298 happy_x_1 of { happy_var_1 -> -	happyIn295-		 (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  279# happyReduction_758-happyReduction_758 happy_x_1-	 =  case happyOut297 happy_x_1 of { happy_var_1 -> -	happyIn295-		 (happy_var_1-	)}--happyReduce_759 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_759 = happySpecReduce_1  280# happyReduction_759-happyReduction_759 happy_x_1-	 =  case happyOut299 happy_x_1 of { happy_var_1 -> -	happyIn296-		 (happy_var_1-	)}--happyReduce_760 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_760 = happySpecReduce_1  280# happyReduction_760-happyReduction_760 happy_x_1-	 =  case happyOut297 happy_x_1 of { happy_var_1 -> -	happyIn296-		 (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  281# happyReduction_761-happyReduction_761 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn297-		 (sL1 happy_var_1 $ mkQual varName (getQVARSYM 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  282# happyReduction_762-happyReduction_762 happy_x_1-	 =  case happyOut299 happy_x_1 of { happy_var_1 -> -	happyIn298-		 (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  282# happyReduction_763-happyReduction_763 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn298-		 (sL1 happy_var_1 $ mkUnqual varName (fsLit "-")-	)}--happyReduce_764 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_764 = happySpecReduce_1  283# happyReduction_764-happyReduction_764 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $ mkUnqual varName (getVARSYM 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  283# happyReduction_765-happyReduction_765 happy_x_1-	 =  case happyOut301 happy_x_1 of { happy_var_1 -> -	happyIn299-		 (sL1 happy_var_1 $ mkUnqual varName (unLoc 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  284# happyReduction_766-happyReduction_766 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "as")-	)}--happyReduce_767 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_767 = happySpecReduce_1  284# happyReduction_767-happyReduction_767 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "qualified")-	)}--happyReduce_768 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_768 = happySpecReduce_1  284# happyReduction_768-happyReduction_768 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "hiding")-	)}--happyReduce_769 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_769 = happySpecReduce_1  284# happyReduction_769-happyReduction_769 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "export")-	)}--happyReduce_770 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_770 = happySpecReduce_1  284# happyReduction_770-happyReduction_770 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "label")-	)}--happyReduce_771 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_771 = happySpecReduce_1  284# happyReduction_771-happyReduction_771 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "dynamic")-	)}--happyReduce_772 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_772 = happySpecReduce_1  284# happyReduction_772-happyReduction_772 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "stdcall")-	)}--happyReduce_773 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_773 = happySpecReduce_1  284# happyReduction_773-happyReduction_773 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "ccall")-	)}--happyReduce_774 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_774 = happySpecReduce_1  284# happyReduction_774-happyReduction_774 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "capi")-	)}--happyReduce_775 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_775 = happySpecReduce_1  284# happyReduction_775-happyReduction_775 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "prim")-	)}--happyReduce_776 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_776 = happySpecReduce_1  284# happyReduction_776-happyReduction_776 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "javascript")-	)}--happyReduce_777 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_777 = happySpecReduce_1  284# happyReduction_777-happyReduction_777 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "group")-	)}--happyReduce_778 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_778 = happySpecReduce_1  284# happyReduction_778-happyReduction_778 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "stock")-	)}--happyReduce_779 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_779 = happySpecReduce_1  284# happyReduction_779-happyReduction_779 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "anyclass")-	)}--happyReduce_780 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_780 = happySpecReduce_1  284# happyReduction_780-happyReduction_780 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "unit")-	)}--happyReduce_781 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_781 = happySpecReduce_1  284# happyReduction_781-happyReduction_781 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "dependency")-	)}--happyReduce_782 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_782 = happySpecReduce_1  284# happyReduction_782-happyReduction_782 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn300-		 (sL1 happy_var_1 (fsLit "signature")-	)}--happyReduce_783 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_783 = happyMonadReduce 1# 285# happyReduction_783-happyReduction_783 (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 (happyIn301 r))--happyReduce_784 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_784 = happySpecReduce_1  285# happyReduction_784-happyReduction_784 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn301-		 (sL1 happy_var_1 (fsLit ".")-	)}--happyReduce_785 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_785 = happySpecReduce_1  286# happyReduction_785-happyReduction_785 happy_x_1-	 =  case happyOut303 happy_x_1 of { happy_var_1 -> -	happyIn302-		 (happy_var_1-	)}--happyReduce_786 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_786 = happySpecReduce_1  286# happyReduction_786-happyReduction_786 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn302-		 (sL1 happy_var_1 $! mkQual dataName (getQCONID happy_var_1)-	)}--happyReduce_787 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_787 = happySpecReduce_1  287# happyReduction_787-happyReduction_787 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn303-		 (sL1 happy_var_1 $ mkUnqual dataName (getCONID happy_var_1)-	)}--happyReduce_788 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_788 = happySpecReduce_1  288# happyReduction_788-happyReduction_788 happy_x_1-	 =  case happyOut305 happy_x_1 of { happy_var_1 -> -	happyIn304-		 (happy_var_1-	)}--happyReduce_789 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_789 = happySpecReduce_1  288# happyReduction_789-happyReduction_789 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn304-		 (sL1 happy_var_1 $ mkQual dataName (getQCONSYM happy_var_1)-	)}--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 $ mkUnqual dataName (getCONSYM happy_var_1)-	)}--happyReduce_791 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_791 = happySpecReduce_1  289# happyReduction_791-happyReduction_791 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn305-		 (sL1 happy_var_1 $ consDataCon_RDR-	)}--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 $ HsChar       (sst $ getCHARs happy_var_1) $ getCHAR happy_var_1-	)}--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 $ HsString     (sst $ getSTRINGs happy_var_1)-                                                         $ getSTRING 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  290# happyReduction_794-happyReduction_794 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 $ HsIntPrim    (sst $ getPRIMINTEGERs happy_var_1)-                                                         $ getPRIMINTEGER 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  290# happyReduction_795-happyReduction_795 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 $ HsWordPrim   (sst $ getPRIMWORDs happy_var_1)-                                                         $ getPRIMWORD 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  290# happyReduction_796-happyReduction_796 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 $ HsCharPrim   (sst $ getPRIMCHARs happy_var_1)-                                                         $ getPRIMCHAR 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  290# happyReduction_797-happyReduction_797 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 $ HsStringPrim (sst $ getPRIMSTRINGs happy_var_1)-                                                         $ getPRIMSTRING 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  290# happyReduction_798-happyReduction_798 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 $ HsFloatPrim  def  $ getPRIMFLOAT 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  290# happyReduction_799-happyReduction_799 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn306-		 (sL1 happy_var_1 $ HsDoublePrim def  $ getPRIMDOUBLE 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  291# happyReduction_800-happyReduction_800 happy_x_1-	 =  happyIn307-		 (()-	)--happyReduce_801 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_801 = happyMonadReduce 1# 291# happyReduction_801-happyReduction_801 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((( popContext))-	) (\r -> happyReturn (happyIn307 r))--happyReduce_802 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_802 = happySpecReduce_1  292# happyReduction_802-happyReduction_802 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn308-		 (sL1 happy_var_1 $ mkModuleNameFS (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  292# happyReduction_803-happyReduction_803 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn308-		 (sL1 happy_var_1 $ let (mod,c) = getQCONID happy_var_1 in-                                  mkModuleNameFS-                                   (mkFastString-                                     (unpackFS mod ++ '.':unpackFS c))-	)}--happyReduce_804 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_804 = happySpecReduce_2  293# happyReduction_804-happyReduction_804 happy_x_2-	happy_x_1-	 =  case happyOut309 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn309-		 (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)-	)}}--happyReduce_805 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_805 = happySpecReduce_1  293# happyReduction_805-happyReduction_805 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn309-		 (([gl happy_var_1],1)-	)}--happyReduce_806 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_806 = happySpecReduce_1  294# happyReduction_806-happyReduction_806 happy_x_1-	 =  case happyOut311 happy_x_1 of { happy_var_1 -> -	happyIn310-		 (happy_var_1-	)}--happyReduce_807 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_807 = happySpecReduce_0  294# happyReduction_807-happyReduction_807  =  happyIn310-		 (([], 0)-	)--happyReduce_808 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_808 = happySpecReduce_2  295# happyReduction_808-happyReduction_808 happy_x_2-	happy_x_1-	 =  case happyOut311 happy_x_1 of { happy_var_1 -> -	case happyOutTok happy_x_2 of { happy_var_2 -> -	happyIn311-		 (((fst happy_var_1)++[gl happy_var_2],snd happy_var_1 + 1)-	)}}--happyReduce_809 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_809 = happySpecReduce_1  295# happyReduction_809-happyReduction_809 happy_x_1-	 =  case happyOutTok happy_x_1 of { happy_var_1 -> -	happyIn311-		 (([gl happy_var_1],1)-	)}--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 ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( return (sL1 happy_var_1 (HsDocString (mkFastString (getDOCNEXT happy_var_1)))))})-	) (\r -> happyReturn (happyIn312 r))--happyReduce_811 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_811 = happyMonadReduce 1# 297# happyReduction_811-happyReduction_811 (happy_x_1 `HappyStk`-	happyRest) tk-	 = happyThen ((case happyOutTok happy_x_1 of { happy_var_1 -> -	( return (sL1 happy_var_1 (HsDocString (mkFastString (getDOCPREV happy_var_1)))))})-	) (\r -> happyReturn (happyIn313 r))--happyReduce_812 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_812 = happyMonadReduce 1# 298# happyReduction_812-happyReduction_812 (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, HsDocString (mkFastString rest))))})-	) (\r -> happyReturn (happyIn314 r))--happyReduce_813 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_813 = happyMonadReduce 1# 299# happyReduction_813-happyReduction_813 (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, HsDocString (mkFastString doc))))})-	) (\r -> happyReturn (happyIn315 r))--happyReduce_814 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_814 = happyMonadReduce 1# 300# happyReduction_814-happyReduction_814 (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 (HsDocString (mkFastString string)))))})-	) (\r -> happyReturn (happyIn316 r))--happyReduce_815 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_815 = happySpecReduce_1  301# happyReduction_815-happyReduction_815 happy_x_1-	 =  case happyOut313 happy_x_1 of { happy_var_1 -> -	happyIn317-		 (Just 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  301# happyReduction_816-happyReduction_816  =  happyIn317-		 (Nothing-	)--happyReduce_817 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_817 = happySpecReduce_1  302# happyReduction_817-happyReduction_817 happy_x_1-	 =  case happyOut312 happy_x_1 of { happy_var_1 -> -	happyIn318-		 (Just happy_var_1-	)}--happyReduce_818 :: () => Happy_GHC_Exts.Int# -> (Located Token) -> Happy_GHC_Exts.Int# -> Happy_IntList -> HappyStk (HappyAbsSyn ) -> P (HappyAbsSyn )-happyReduce_818 = happySpecReduce_0  302# happyReduction_818-happyReduction_818  =  happyIn318-		 (Nothing-	)--happyNewToken action sts stk-	= (lexer True)(\tk -> -	let cont i = happyDoAction i tk action sts stk in-	case tk of {-	L _ ITeof -> happyDoAction 155# 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 _ ITunit -> cont 51#;-	L _ ITsignature -> cont 52#;-	L _ ITdependency -> cont 53#;-	L _ (ITinline_prag _ _ _) -> cont 54#;-	L _ (ITspec_prag _) -> cont 55#;-	L _ (ITspec_inline_prag _ _) -> cont 56#;-	L _ (ITsource_prag _) -> cont 57#;-	L _ (ITrules_prag _) -> cont 58#;-	L _ (ITcore_prag _) -> cont 59#;-	L _ (ITscc_prag _) -> cont 60#;-	L _ (ITgenerated_prag _) -> cont 61#;-	L _ (ITdeprecated_prag _) -> cont 62#;-	L _ (ITwarning_prag _) -> cont 63#;-	L _ (ITunpack_prag _) -> cont 64#;-	L _ (ITnounpack_prag _) -> cont 65#;-	L _ (ITann_prag _) -> cont 66#;-	L _ (ITvect_prag _) -> cont 67#;-	L _ (ITvect_scalar_prag _) -> cont 68#;-	L _ (ITnovect_prag _) -> cont 69#;-	L _ (ITminimal_prag _) -> cont 70#;-	L _ (ITctype _) -> cont 71#;-	L _ (IToverlapping_prag _) -> cont 72#;-	L _ (IToverlappable_prag _) -> cont 73#;-	L _ (IToverlaps_prag _) -> cont 74#;-	L _ (ITincoherent_prag _) -> cont 75#;-	L _ (ITcomplete_prag _) -> cont 76#;-	L _ ITclose_prag -> cont 77#;-	L _ ITdotdot -> cont 78#;-	L _ ITcolon -> cont 79#;-	L _ (ITdcolon _) -> cont 80#;-	L _ ITequal -> cont 81#;-	L _ ITlam -> cont 82#;-	L _ ITlcase -> cont 83#;-	L _ ITvbar -> cont 84#;-	L _ (ITlarrow _) -> cont 85#;-	L _ (ITrarrow _) -> cont 86#;-	L _ ITat -> cont 87#;-	L _ ITtilde -> cont 88#;-	L _ ITtildehsh -> cont 89#;-	L _ (ITdarrow _) -> cont 90#;-	L _ ITminus -> cont 91#;-	L _ ITbang -> cont 92#;-	L _ (ITlarrowtail _) -> cont 93#;-	L _ (ITrarrowtail _) -> cont 94#;-	L _ (ITLarrowtail _) -> cont 95#;-	L _ (ITRarrowtail _) -> cont 96#;-	L _ ITdot -> cont 97#;-	L _ ITtypeApp -> cont 98#;-	L _ ITocurly -> cont 99#;-	L _ ITccurly -> cont 100#;-	L _ ITvocurly -> cont 101#;-	L _ ITvccurly -> cont 102#;-	L _ ITobrack -> cont 103#;-	L _ ITcbrack -> cont 104#;-	L _ ITopabrack -> cont 105#;-	L _ ITcpabrack -> cont 106#;-	L _ IToparen -> cont 107#;-	L _ ITcparen -> cont 108#;-	L _ IToubxparen -> cont 109#;-	L _ ITcubxparen -> cont 110#;-	L _ (IToparenbar _) -> cont 111#;-	L _ (ITcparenbar _) -> cont 112#;-	L _ ITsemi -> cont 113#;-	L _ ITcomma -> cont 114#;-	L _ ITbackquote -> cont 115#;-	L _ ITsimpleQuote -> cont 116#;-	L _ (ITvarid    _) -> cont 117#;-	L _ (ITconid    _) -> cont 118#;-	L _ (ITvarsym   _) -> cont 119#;-	L _ (ITconsym   _) -> cont 120#;-	L _ (ITqvarid   _) -> cont 121#;-	L _ (ITqconid   _) -> cont 122#;-	L _ (ITqvarsym  _) -> cont 123#;-	L _ (ITqconsym  _) -> cont 124#;-	L _ (ITdupipvarid   _) -> cont 125#;-	L _ (ITlabelvarid   _) -> cont 126#;-	L _ (ITchar   _ _) -> cont 127#;-	L _ (ITstring _ _) -> cont 128#;-	L _ (ITinteger _) -> cont 129#;-	L _ (ITrational _) -> cont 130#;-	L _ (ITprimchar   _ _) -> cont 131#;-	L _ (ITprimstring _ _) -> cont 132#;-	L _ (ITprimint    _ _) -> cont 133#;-	L _ (ITprimword   _ _) -> cont 134#;-	L _ (ITprimfloat  _) -> cont 135#;-	L _ (ITprimdouble _) -> cont 136#;-	L _ (ITdocCommentNext _) -> cont 137#;-	L _ (ITdocCommentPrev _) -> cont 138#;-	L _ (ITdocCommentNamed _) -> cont 139#;-	L _ (ITdocSection _ _) -> cont 140#;-	L _ (ITopenExpQuote _ _) -> cont 141#;-	L _ ITopenPatQuote -> cont 142#;-	L _ ITopenTypQuote -> cont 143#;-	L _ ITopenDecQuote -> cont 144#;-	L _ (ITcloseQuote _) -> cont 145#;-	L _ (ITopenTExpQuote _) -> cont 146#;-	L _ ITcloseTExpQuote -> cont 147#;-	L _ (ITidEscape _) -> cont 148#;-	L _ ITparenEscape -> cont 149#;-	L _ (ITidTyEscape _) -> cont 150#;-	L _ ITparenTyEscape -> cont 151#;-	L _ ITtyQuote -> cont 152#;-	L _ (ITquasiQuote _) -> cont 153#;-	L _ (ITqQuasiQuote _) -> cont 154#;-	_ -> happyError' (tk, [])-	})--happyError_ explist 155# 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 (happyOut34 x))--parseSignature = happySomeParser where- happySomeParser = happyThen (happyParse 1#) (\x -> happyReturn (happyOut33 x))--parseImport = happySomeParser where- happySomeParser = happyThen (happyParse 2#) (\x -> happyReturn (happyOut64 x))--parseStatement = happySomeParser where- happySomeParser = happyThen (happyParse 3#) (\x -> happyReturn (happyOut246 x))--parseDeclaration = happySomeParser where- happySomeParser = happyThen (happyParse 4#) (\x -> happyReturn (happyOut77 x))--parseExpression = happySomeParser where- happySomeParser = happyThen (happyParse 5#) (\x -> happyReturn (happyOut200 x))--parsePattern = happySomeParser where- happySomeParser = happyThen (happyParse 6#) (\x -> happyReturn (happyOut239 x))--parseTypeSignature = happySomeParser where- happySomeParser = happyThen (happyParse 7#) (\x -> happyReturn (happyOut196 x))--parseStmt = happySomeParser where- happySomeParser = happyThen (happyParse 8#) (\x -> happyReturn (happyOut245 x))--parseIdentifier = happySomeParser where- happySomeParser = happyThen (happyParse 9#) (\x -> happyReturn (happyOut16 x))--parseType = happySomeParser where- happySomeParser = happyThen (happyParse 10#) (\x -> happyReturn (happyOut151 x))--parseBackpack = happySomeParser where- happySomeParser = happyThen (happyParse 11#) (\x -> happyReturn (happyOut17 x))--parseHeader = happySomeParser where- happySomeParser = happyThen (happyParse 12#) (\x -> happyReturn (happyOut43 x))--happySeq = happyDoSeq---happyError :: P a-happyError = srcParseFail--getVARID        (L _ (ITvarid    x)) = x-getCONID        (L _ (ITconid    x)) = x-getVARSYM       (L _ (ITvarsym   x)) = x-getCONSYM       (L _ (ITconsym   x)) = x-getQVARID       (L _ (ITqvarid   x)) = x-getQCONID       (L _ (ITqconid   x)) = x-getQVARSYM      (L _ (ITqvarsym  x)) = x-getQCONSYM      (L _ (ITqconsym  x)) = x-getIPDUPVARID   (L _ (ITdupipvarid   x)) = x-getLABELVARID   (L _ (ITlabelvarid   x)) = x-getCHAR         (L _ (ITchar   _ x)) = x-getSTRING       (L _ (ITstring _ x)) = x-getINTEGER      (L _ (ITinteger x))  = x-getRATIONAL     (L _ (ITrational x)) = x-getPRIMCHAR     (L _ (ITprimchar _ x)) = x-getPRIMSTRING   (L _ (ITprimstring _ x)) = x-getPRIMINTEGER  (L _ (ITprimint  _ x)) = x-getPRIMWORD     (L _ (ITprimword _ x)) = x-getPRIMFLOAT    (L _ (ITprimfloat x)) = x-getPRIMDOUBLE   (L _ (ITprimdouble x)) = x-getTH_ID_SPLICE (L _ (ITidEscape x)) = x-getTH_ID_TY_SPLICE (L _ (ITidTyEscape x)) = x-getINLINE       (L _ (ITinline_prag _ inl conl)) = (inl,conl)-getSPEC_INLINE  (L _ (ITspec_inline_prag _ True))  = (Inline,  FunLike)-getSPEC_INLINE  (L _ (ITspec_inline_prag _ False)) = (NoInline,FunLike)-getCOMPLETE_PRAGs (L _ (ITcomplete_prag x)) = x--getDOCNEXT (L _ (ITdocCommentNext x)) = x-getDOCPREV (L _ (ITdocCommentPrev x)) = x-getDOCNAMED (L _ (ITdocCommentNamed x)) = x-getDOCSECTION (L _ (ITdocSection n x)) = (n, x)--getINTEGERs     (L _ (ITinteger (IL src _ _))) = src-getCHARs        (L _ (ITchar       src _)) = src-getSTRINGs      (L _ (ITstring     src _)) = src-getPRIMCHARs    (L _ (ITprimchar   src _)) = src-getPRIMSTRINGs  (L _ (ITprimstring src _)) = src-getPRIMINTEGERs (L _ (ITprimint    src _)) = src-getPRIMWORDs    (L _ (ITprimword   src _)) = src---- See Note [Pragma source text] in BasicTypes for the following-getINLINE_PRAGs       (L _ (ITinline_prag       src _ _)) = src-getSPEC_PRAGs         (L _ (ITspec_prag         src))     = src-getSPEC_INLINE_PRAGs  (L _ (ITspec_inline_prag  src _))   = src-getSOURCE_PRAGs       (L _ (ITsource_prag       src)) = src-getRULES_PRAGs        (L _ (ITrules_prag        src)) = src-getWARNING_PRAGs      (L _ (ITwarning_prag      src)) = src-getDEPRECATED_PRAGs   (L _ (ITdeprecated_prag   src)) = src-getSCC_PRAGs          (L _ (ITscc_prag          src)) = src-getGENERATED_PRAGs    (L _ (ITgenerated_prag    src)) = src-getCORE_PRAGs         (L _ (ITcore_prag         src)) = src-getUNPACK_PRAGs       (L _ (ITunpack_prag       src)) = src-getNOUNPACK_PRAGs     (L _ (ITnounpack_prag     src)) = src-getANN_PRAGs          (L _ (ITann_prag          src)) = src-getVECT_PRAGs         (L _ (ITvect_prag         src)) = src-getVECT_SCALAR_PRAGs  (L _ (ITvect_scalar_prag  src)) = src-getNOVECT_PRAGs       (L _ (ITnovect_prag       src)) = src-getMINIMAL_PRAGs      (L _ (ITminimal_prag      src)) = src-getOVERLAPPABLE_PRAGs (L _ (IToverlappable_prag src)) = src-getOVERLAPPING_PRAGs  (L _ (IToverlapping_prag  src)) = src-getOVERLAPS_PRAGs     (L _ (IToverlaps_prag     src)) = src-getINCOHERENT_PRAGs   (L _ (ITincoherent_prag   src)) = src-getCTYPEs             (L _ (ITctype             src)) = src--getStringLiteral l = StringLiteral (getSTRINGs l) (getSTRING l)--isUnicode :: Located Token -> Bool-isUnicode (L _ (ITforall         iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITdarrow         iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITdcolon         iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITlarrow         iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITrarrow         iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITlarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITrarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITLarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITRarrowtail     iu)) = iu == UnicodeSyntax-isUnicode (L _ (IToparenbar      iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITcparenbar      iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax-isUnicode (L _ (ITcloseQuote     iu)) = iu == UnicodeSyntax-isUnicode _                           = False--hasE :: Located Token -> Bool-hasE (L _ (ITopenExpQuote HasE _)) = True-hasE (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 :: Located a -> Located b -> SrcSpan-comb2 a b = a `seq` b `seq` combineLocs a b--comb3 :: Located a -> Located b -> Located c -> SrcSpan-comb3 a b c = a `seq` b `seq` c `seq`-    combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLoc c))--comb4 :: Located a -> Located b -> Located c -> Located 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 :: SrcSpan -> a -> Located a-sL span a = span `seq` a `seq` L 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 :: a -> Located a-sL0 = L noSrcSpan       -- #define L0   L noSrcSpan--{-# INLINE sL1 #-}-sL1 :: Located a -> b -> Located b-sL1 x = sL (getLoc x)   -- #define sL1   sL (getLoc $1)--{-# INLINE sLL #-}-sLL :: Located a -> Located b -> c -> Located 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 <- getSrcLoc;-  let loc = mkSrcLoc (srcLocFile l) 1 1;-  return (mkSrcSpan loc loc)---- Hint about the MultiWayIf extension-hintMultiWayIf :: SrcSpan -> P ()-hintMultiWayIf span = do-  mwiEnabled <- liftM ((LangExt.MultiWayIf `extopt`) . options) getPState-  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 <- liftM ((LangExt.MultiWayIf `extopt`) . options) getPState-  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, assuming UnicodeSyntax is on-hintExplicitForall :: SrcSpan -> P ()-hintExplicitForall span = do-    forall      <- extension explicitForallEnabled-    rulePrag    <- extension inRulePrag-    unless (forall || rulePrag) $ parseErrorSDoc span $ vcat-      [ text "Illegal symbol '\x2200' in type" -- U+2200 FOR ALL-      , text "Perhaps you intended to use RankNTypes or a similar language"-      , text "extension to enable explicit-forall syntax: \x2200 <tvs>. <type>"-      ]---- Hint about explicit-forall, assuming UnicodeSyntax is off-hintExplicitForall' :: SrcSpan -> P (GenLocated SrcSpan RdrName)-hintExplicitForall' span = do-    forall    <- extension explicitForallEnabled-    let illegalDot = "Illegal symbol '.' in type"-    if forall-      then parseErrorSDoc span $ vcat-        [ text illegalDot-        , text "Perhaps you meant to write 'forall <tvs>. <type>'?"-        ]-      else parseErrorSDoc span $ vcat-        [ text illegalDot-        , text "Perhaps you intended to use RankNTypes or a similar language"-        , text "extension to enable explicit-forall syntax: forall <tvs>. <type>"-        ]--{--%************************************************************************-%*                                                                      *-        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 :: AnnKeywordId -> Located e -> AddAnn-mj a l s = addAnnotation s a (gl 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@(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 = getLoc---- |Add an annotation to the located element, and return the located--- element as a pass through-aa :: Located a -> (AnnKeywordId,Located c) -> P (Located a)-aa a@(L l _) (b,s) = addAnnotation l b (gl s) >> return a---- |Add an annotation to a located element resulting from a monadic action-am :: P (Located a) -> (AnnKeywordId, Located b) -> P (Located a)-am a (b,s) = do-  av@(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@(L l _) bs = addAnnsAt l bs >> return a---- |Add all [AddAnn] to an AST element wrapped in a Just-aljs :: Located (Maybe a) -> [AddAnn] -> P (Located (Maybe a))-aljs a@(L l _) bs = addAnnsAt l bs >> return a---- |Add all [AddAnn] to an AST element wrapped in a Just-ajs a@(Just (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 :: P (Located a) -> [AddAnn] -> P (Located a)-amms a bs = do { av@(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 :: Located a -> [AddAnn] -> P (OrdList (Located a))-amsu a@(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 (\s -> mj AnnCommaTuple (L s ())) 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 (\s -> mj AnnVbar (L s ())) ss---- |Get the location of the last element of a OrdList, or noSrcSpan-oll :: OrdList (Located 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 :: [Located a] -> Located b -> Located a -> P()-asl [] (L ls _) (L l _) = addAnnotation l          AnnSemi ls-asl (x:_xs) (L ls _) _x = addAnnotation (getLoc x) AnnSemi ls--sst ::HasSourceText a => SourceText -> a-sst = setSourceText-{-# 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/akak0rxhbi4n87z3nx78ipv76frvj841-glibc-2.27-dev/include/stdc-predef.h" 1 3 4--# 17 "/nix/store/akak0rxhbi4n87z3nx78ipv76frvj841-glibc-2.27-dev/include/stdc-predef.h" 3 4-----------------------------------------------{-# LINE 11 "<command-line>" #-}-{-# LINE 1 "/nix/store/n5i1zdpmk2b1s3z96649xh8f9kr3g96s-ghc-8.4.3/lib/ghc-8.4.3/include/ghcversion.h" #-}----------------{-# LINE 11 "<command-line>" #-}-{-# LINE 1 "/build/ghc1653_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 ---------------- Do not remove this comment. Required to fix CPP parsing when using GCC and a clang-compiled alex.-#if __GLASGOW_HASKELL__ > 706-#define LT(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.<# m)) :: Bool)-#define GTE(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.>=# m)) :: Bool)-#define EQ(n,m) ((Happy_GHC_Exts.tagToEnum# (n Happy_GHC_Exts.==# m)) :: Bool)-#else-#define LT(n,m) (n Happy_GHC_Exts.<# m)-#define GTE(n,m) (n Happy_GHC_Exts.>=# m)-#define EQ(n,m) (n Happy_GHC_Exts.==# m)-#endif-{-# LINE 43 "templates/GenericTemplate.hs" #-}--data Happy_IntList = HappyCons Happy_GHC_Exts.Int# Happy_IntList--------{-# LINE 65 "templates/GenericTemplate.hs" #-}--{-# LINE 75 "templates/GenericTemplate.hs" #-}--{-# LINE 84 "templates/GenericTemplate.hs" #-}--infixr 9 `HappyStk`-data HappyStk a = HappyStk a (HappyStk a)---------------------------------------------------------------------------------- starting the parse--happyParse start_state = happyNewToken start_state notHappyAtAll notHappyAtAll---------------------------------------------------------------------------------- Accepting the parse---- If the current token is 0#, it means we've just accepted a partial--- parse (a %partial parser).  We must ignore the saved token on the top of--- the stack in this case.-happyAccept 0# tk st sts (_ `HappyStk` ans `HappyStk` _) =-        happyReturn1 ans-happyAccept j tk st sts (HappyStk ans _) = -        (happyTcHack j (happyTcHack st)) (happyReturn1 ans)---------------------------------------------------------------------------------- Arrays only: do the next action----happyDoAction i tk st-        = {- nothing -}---          case action of-                0#           -> {- nothing -}-                                     happyFail (happyExpListPerState ((Happy_GHC_Exts.I# (st)) :: Int)) i tk st-                -1#          -> {- nothing -}-                                     happyAccept i tk st-                n | LT(n,(0# :: Happy_GHC_Exts.Int#)) -> {- nothing -}--                                                   (happyReduceArr Happy_Data_Array.! rule) i tk st-                                                   where rule = (Happy_GHC_Exts.I# ((Happy_GHC_Exts.negateInt# ((n Happy_GHC_Exts.+# (1# :: Happy_GHC_Exts.Int#))))))-                n                 -> {- nothing -}---                                     happyShift new_state i tk st-                                     where new_state = (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#))-   where off    = happyAdjustOffset (indexShortOffAddr happyActOffsets st)-         off_i  = (off Happy_GHC_Exts.+#  i)-         check  = if GTE(off_i,(0# :: Happy_GHC_Exts.Int#))-                  then EQ(indexShortOffAddr happyCheck off_i, i)-                  else False-         action-          | check     = indexShortOffAddr happyTable off_i-          | otherwise = indexShortOffAddr happyDefActions st-----indexShortOffAddr (HappyA# arr) off =-        Happy_GHC_Exts.narrow16Int# i-  where-        i = Happy_GHC_Exts.word2Int# (Happy_GHC_Exts.or# (Happy_GHC_Exts.uncheckedShiftL# high 8#) low)-        high = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr (off' Happy_GHC_Exts.+# 1#)))-        low  = Happy_GHC_Exts.int2Word# (Happy_GHC_Exts.ord# (Happy_GHC_Exts.indexCharOffAddr# arr off'))-        off' = off Happy_GHC_Exts.*# 2#-----{-# INLINE happyLt #-}-happyLt x y = LT(x,y)---readArrayBit arr bit =-    Bits.testBit (Happy_GHC_Exts.I# (indexShortOffAddr arr ((unbox_int bit) `Happy_GHC_Exts.iShiftRA#` 4#))) (bit `mod` 16)-  where unbox_int (Happy_GHC_Exts.I# x) = x-------data HappyAddr = HappyA# Happy_GHC_Exts.Addr#----------------------------------------------------------------------------------- HappyState data type (not arrays)--{-# LINE 180 "templates/GenericTemplate.hs" #-}---------------------------------------------------------------------------------- Shifting a token--happyShift new_state 0# tk st sts stk@(x `HappyStk` _) =-     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in---     trace "shifting the error token" $-     happyDoAction i tk new_state (HappyCons (st) (sts)) (stk)--happyShift new_state i tk st sts stk =-     happyNewToken new_state (HappyCons (st) (sts)) ((happyInTok (tk))`HappyStk`stk)---- happyReduce is specialised for the common cases.--happySpecReduce_0 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_0 nt fn j tk st@((action)) sts stk-     = happyGoto nt j tk st (HappyCons (st) (sts)) (fn `HappyStk` stk)--happySpecReduce_1 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_1 nt fn j tk _ sts@((HappyCons (st@(action)) (_))) (v1`HappyStk`stk')-     = let r = fn v1 in-       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))--happySpecReduce_2 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_2 nt fn j tk _ (HappyCons (_) (sts@((HappyCons (st@(action)) (_))))) (v1`HappyStk`v2`HappyStk`stk')-     = let r = fn v1 v2 in-       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))--happySpecReduce_3 i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happySpecReduce_3 nt fn j tk _ (HappyCons (_) ((HappyCons (_) (sts@((HappyCons (st@(action)) (_))))))) (v1`HappyStk`v2`HappyStk`v3`HappyStk`stk')-     = let r = fn v1 v2 v3 in-       happySeq r (happyGoto nt j tk st sts (r `HappyStk` stk'))--happyReduce k i fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happyReduce k nt fn j tk st sts stk-     = case happyDrop (k Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) sts of-         sts1@((HappyCons (st1@(action)) (_))) ->-                let r = fn stk in  -- it doesn't hurt to always seq here...-                happyDoSeq r (happyGoto nt j tk st1 sts1 r)--happyMonadReduce k nt fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happyMonadReduce k nt fn j tk st sts stk =-      case happyDrop k (HappyCons (st) (sts)) of-        sts1@((HappyCons (st1@(action)) (_))) ->-          let drop_stk = happyDropStk k stk in-          happyThen1 (fn stk tk) (\r -> happyGoto nt j tk st1 sts1 (r `HappyStk` drop_stk))--happyMonad2Reduce k nt fn 0# tk st sts stk-     = happyFail [] 0# tk st sts stk-happyMonad2Reduce k nt fn j tk st sts stk =-      case happyDrop k (HappyCons (st) (sts)) of-        sts1@((HappyCons (st1@(action)) (_))) ->-         let drop_stk = happyDropStk k stk--             off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st1)-             off_i = (off Happy_GHC_Exts.+#  nt)-             new_state = indexShortOffAddr happyTable off_i-----          in-          happyThen1 (fn stk tk) (\r -> happyNewToken new_state sts1 (r `HappyStk` drop_stk))--happyDrop 0# l = l-happyDrop n (HappyCons (_) (t)) = happyDrop (n Happy_GHC_Exts.-# (1# :: Happy_GHC_Exts.Int#)) t--happyDropStk 0# l = l-happyDropStk n (x `HappyStk` xs) = happyDropStk (n Happy_GHC_Exts.-# (1#::Happy_GHC_Exts.Int#)) xs---------------------------------------------------------------------------------- Moving to a new state after a reduction---happyGoto nt j tk st = -   {- nothing -}-   happyDoAction j tk new_state-   where off = happyAdjustOffset (indexShortOffAddr happyGotoOffsets st)-         off_i = (off Happy_GHC_Exts.+#  nt)-         new_state = indexShortOffAddr happyTable off_i------------------------------------------------------------------------------------- Error recovery (0# is the error token)---- parse error if we are in recovery and we fail again-happyFail explist 0# tk old_st _ stk@(x `HappyStk` _) =-     let i = (case Happy_GHC_Exts.unsafeCoerce# x of { (Happy_GHC_Exts.I# (i)) -> i }) in---      trace "failing" $ -        happyError_ explist i tk--{-  We don't need state discarding for our restricted implementation of-    "error".  In fact, it can cause some bogus parses, so I've disabled it-    for now --SDM---- discard a state-happyFail  0# tk old_st (HappyCons ((action)) (sts)) -                                                (saved_tok `HappyStk` _ `HappyStk` stk) =---      trace ("discarding state, depth " ++ show (length stk))  $-        happyDoAction 0# tk action sts ((saved_tok`HappyStk`stk))--}---- Enter error recovery: generate an error token,---                       save the old token and carry on.-happyFail explist i tk (action) sts stk =---      trace "entering error recovery" $-        happyDoAction 0# tk action sts ( (Happy_GHC_Exts.unsafeCoerce# (Happy_GHC_Exts.I# (i))) `HappyStk` stk)---- Internal happy errors:--notHappyAtAll :: a-notHappyAtAll = error "Internal Happy error\n"---------------------------------------------------------------------------------- Hack to get the typechecker to accept our action functions---happyTcHack :: Happy_GHC_Exts.Int# -> a -> a-happyTcHack x y = y-{-# INLINE happyTcHack #-}----------------------------------------------------------------------------------- Seq-ing.  If the --strict flag is given, then Happy emits ---      happySeq = happyDoSeq--- otherwise it emits---      happySeq = happyDontSeq--happyDoSeq, happyDontSeq :: a -> b -> b-happyDoSeq   a b = a `seq` b-happyDontSeq a b = b---------------------------------------------------------------------------------- Don't inline any functions from the template.  GHC has a nasty habit--- of deciding to inline happyGoto everywhere, which increases the size of--- the generated parser quite a bit.---{-# NOINLINE happyDoAction #-}-{-# NOINLINE happyTable #-}-{-# NOINLINE happyCheck #-}-{-# NOINLINE happyActOffsets #-}-{-# NOINLINE happyGotoOffsets #-}-{-# NOINLINE happyDefActions #-}--{-# NOINLINE happyShift #-}-{-# NOINLINE happySpecReduce_0 #-}-{-# NOINLINE happySpecReduce_1 #-}-{-# NOINLINE happySpecReduce_2 #-}-{-# NOINLINE happySpecReduce_3 #-}-{-# NOINLINE happyReduce #-}-{-# NOINLINE happyMonadReduce #-}-{-# NOINLINE happyGoto #-}-{-# NOINLINE happyFail #-}---- end of Happy Template.
+ parser/Parser.y view
@@ -0,0 +1,3827 @@+--                                                              -*-haskell-*-+-- ---------------------------------------------------------------------------+-- (c) The University of Glasgow 1997-2003+---+-- The GHC grammar.+--+-- Author(s): Simon Marlow, Sven Panne 1997, 1998, 1999+-- ---------------------------------------------------------------------------++{+-- | 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 )+import GHC.Exts+import Data.Char+import Control.Monad    ( mplus )+import Control.Applicative ((<$))++-- 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 PrelNames        ( eqTyCon_RDR )+import TysWiredIn       ( unitTyCon, unitDataCon, tupleTyCon, tupleDataCon, nilDataCon,+                          unboxedUnitTyCon, unboxedUnitDataCon,+                          listTyCon_RDR, consDataCon_RDR )++-- compiler/utils+import Util             ( looksLikePackageName )+import GhcPrelude++import qualified GHC.LanguageExtensions as LangExt+}++%expect 235 -- shift/reduce conflicts++{- Last updated: 04 June 2018++If you modify this parser and add a conflict, please update this comment.+You can learn more about the conflicts by passing 'happy' the -i flag:++    happy -agc --strict compiler/parser/Parser.y -idetailed-info++How is this section formatted? Look up the state the conflict is+reported at, and copy the list of applicable rules (at the top, without the+rule numbers).  Mark *** for the rule that is the conflicting reduction (that+is, the interpretation which is NOT taken).  NB: Happy doesn't print a rule+in a state if it is empty, but you should include it in the list (you can+look these up in the Grammar section of the info file).++Obviously the state numbers are not stable across modifications to the parser,+the idea is to reproduce enough information on each conflict so you can figure+out what happened if the states were renumbered.  Try not to gratuitously move+productions around in this file.++-------------------------------------------------------------------------------++state 0 contains 1 shift/reduce conflicts.++    Conflicts: DOCNEXT (empty missing_module_keyword reduces)++Ambiguity when the source file starts with "-- | doc". We need another+token of lookahead to determine if a top declaration or the 'module' keyword+follows. Shift parses as if the 'module' keyword follows.++-------------------------------------------------------------------------------++state 57 contains 2 shift/reduce conflicts.++    *** strict_mark -> unpackedness .+        strict_mark -> unpackedness . strictness++    Conflicts: '~' '!'++-------------------------------------------------------------------------------++state 61 contains 1 shift/reduce conflict.++        context -> btype .+    *** type -> btype .+        type -> btype . '->' ctype++    Conflicts: '->'++-------------------------------------------------------------------------------++state 62 contains 46 shift/reduce conflicts.++    *** btype -> tyapps .+        tyapps -> tyapps . tyapp++    Conflicts: '_' ':' '~' '!' '.' '`' '{' '[' '[:' '(' '(#' '`' SIMPLEQUOTE+      VARID CONID VARSYM CONSYM QCONID QVARSYM QCONSYM+      STRING INTEGER TH_ID_SPLICE '$(' TH_QUASIQUOTE TH_QQUASIQUOTE+      and all the special ids.++Example ambiguity:+    'if x then y else z :: F a'++Shift parses as (per longest-parse rule):+    'if x then y else z :: (F a)'++-------------------------------------------------------------------------------++state 144 contains 15 shift/reduce conflicts.++        exp -> infixexp . '::' sigtype+        exp -> infixexp . '-<' exp+        exp -> infixexp . '>-' exp+        exp -> infixexp . '-<<' exp+        exp -> infixexp . '>>-' exp+    *** exp -> infixexp .+        infixexp -> infixexp . qop exp10++    Conflicts: ':' '::' '-' '!' '-<' '>-' '-<<' '>>-'+               '.' '`' '*' VARSYM CONSYM QVARSYM QCONSYM++Examples of ambiguity:+    'if x then y else z -< e'+    'if x then y else z :: T'+    'if x then y else z + 1' (NB: '+' is in VARSYM)++Shift parses as (per longest-parse rule):+    'if x then y else (z -< T)'+    'if x then y else (z :: T)'+    'if x then y else (z + 1)'++-------------------------------------------------------------------------------++state 149 contains 67 shift/reduce conflicts.++    *** exp10 -> fexp .+        fexp -> fexp . aexp+        fexp -> fexp . TYPEAPP atype++    Conflicts: TYPEAPP and all the tokens that can start an aexp++Examples of ambiguity:+    'if x then y else f z'+    'if x then y else f @ z'++Shift parses as (per longest-parse rule):+    'if x then y else (f z)'+    'if x then y else (f @ z)'++-------------------------------------------------------------------------------++state 204 contains 27 shift/reduce conflicts.++        aexp2 -> TH_TY_QUOTE . tyvar+        aexp2 -> TH_TY_QUOTE . gtycon+    *** aexp2 -> TH_TY_QUOTE .++    Conflicts: two single quotes is error syntax with specific error message.++Example of ambiguity:+    'x = '''+    'x = ''a'+    'x = ''T'++Shift parses as (per longest-parse rule):+    'x = ''a'+    'x = ''T'++-------------------------------------------------------------------------------++state 300 contains 1 shift/reduce conflicts.++        rule -> STRING . rule_activation rule_forall infixexp '=' exp++    Conflict: '[' (empty rule_activation reduces)++We don't know whether the '[' starts the activation or not: it+might be the start of the declaration with the activation being+empty.  --SDM 1/4/2002++Example ambiguity:+    '{-# RULE [0] f = ... #-}'++We parse this as having a [0] rule activation for rewriting 'f', rather+a rule instructing how to rewrite the expression '[0] f'.++-------------------------------------------------------------------------------++state 310 contains 1 shift/reduce conflict.++    *** type -> btype .+        type -> btype . '->' ctype++    Conflict: '->'++Same as state 61 but without contexts.++-------------------------------------------------------------------------------++state 354 contains 1 shift/reduce conflicts.++        tup_exprs -> commas . tup_tail+        sysdcon_nolist -> '(' commas . ')'+        commas -> commas . ','++    Conflict: ')' (empty tup_tail reduces)++A tuple section with NO free variables '(,,)' is indistinguishable+from the Haskell98 data constructor for a tuple.  Shift resolves in+favor of sysdcon, which is good because a tuple section will get rejected+if -XTupleSections is not specified.++-------------------------------------------------------------------------------++state 409 contains 1 shift/reduce conflicts.++        tup_exprs -> commas . tup_tail+        sysdcon_nolist -> '(#' commas . '#)'+        commas -> commas . ','++    Conflict: '#)' (empty tup_tail reduces)++Same as State 354 for unboxed tuples.++-------------------------------------------------------------------------------++state 417 contains 67 shift/reduce conflicts.++    *** exp10 -> '-' fexp .+        fexp -> fexp . aexp+        fexp -> fexp . TYPEAPP atype++Same as 149 but with a unary minus.++-------------------------------------------------------------------------------++state 481 contains 1 shift/reduce conflict.++        oqtycon -> '(' qtyconsym . ')'+    *** qtyconop -> qtyconsym .++    Conflict: ')'++Example ambiguity: 'foo :: (:%)'++Shift means '(:%)' gets parsed as a type constructor, rather than than a+parenthesized infix type expression of length 1.++-------------------------------------------------------------------------------++state 675 contains 1 shift/reduce conflicts.++    *** aexp2 -> ipvar .+        dbind -> ipvar . '=' exp++    Conflict: '='++Example ambiguity: 'let ?x ...'++The parser can't tell whether the ?x is the lhs of a normal binding or+an implicit binding.  Fortunately, resolving as shift gives it the only+sensible meaning, namely the lhs of an implicit binding.++-------------------------------------------------------------------------------++state 752 contains 1 shift/reduce conflicts.++        rule -> STRING rule_activation . rule_forall infixexp '=' exp++    Conflict: 'forall' (empty rule_forall reduces)++Example ambiguity: '{-# RULES "name" forall = ... #-}'++'forall' is a valid variable name---we don't know whether+to treat a forall on the input as the beginning of a quantifier+or the beginning of the rule itself.  Resolving to shift means+it's always treated as a quantifier, hence the above is disallowed.+This saves explicitly defining a grammar for the rule lhs that+doesn't include 'forall'.++-------------------------------------------------------------------------------++state 986 contains 1 shift/reduce conflicts.++        transformqual -> 'then' 'group' . 'using' exp+        transformqual -> 'then' 'group' . 'by' exp 'using' exp+    *** special_id -> 'group' .++    Conflict: 'by'++-------------------------------------------------------------------------------++state 1367 contains 1 shift/reduce conflict.++    *** atype -> tyvar .+        tv_bndr -> '(' tyvar . '::' kind ')'++    Conflict: '::'++Example ambiguity: 'class C a where type D a = ( a :: * ...'++Here the parser cannot tell whether this is specifying a default for the+associated type like:++'class C a where type D a = ( a :: * ); type D a'++or it is an injectivity signature like:++'class C a where type D a = ( r :: * ) | r -> a'++Shift means the parser only allows the latter.++-------------------------------------------------------------------------------+-- API Annotations+--++A lot of the productions are now cluttered with calls to+aa,am,ams,amms etc.++These are helper functions to make sure that the locations of the+various keywords such as do / let / in are captured for use by tools+that want to do source to source conversions, such as refactorers or+structured editors.++The helper functions are defined at the bottom of this file.++See+  https://ghc.haskell.org/trac/ghc/wiki/ApiAnnotations and+  https://ghc.haskell.org/trac/ghc/wiki/GhcAstAnnotations+for some background.++If you modify the parser and want to ensure that the API annotations are processed+correctly, see the README in (REPO)/utils/check-api-annotations for details on+how to set up a test using the check-api-annotations utility, and interpret the+output it generates.++Note [Parsing lists]+---------------------+You might be wondering why we spend so much effort encoding our lists this+way:++importdecls+        : importdecls ';' importdecl+        | importdecls ';'+        | importdecl+        | {- empty -}++This might seem like an awfully roundabout way to declare a list; plus, to add+insult to injury you have to reverse the results at the end.  The answer is that+left recursion prevents us from running out of stack space when parsing long+sequences.  See: https://www.haskell.org/happy/doc/html/sec-sequences.html for+more guidance.++By adding/removing branches, you can affect what lists are accepted.  Here+are the most common patterns, rewritten as regular expressions for clarity:++    -- Equivalent to: ';'* (x ';'+)* x?  (can be empty, permits leading/trailing semis)+    xs : xs ';' x+       | xs ';'+       | x+       | {- empty -}++    -- Equivalent to x (';' x)* ';'*  (non-empty, permits trailing semis)+    xs : xs ';' x+       | xs ';'+       | x++    -- Equivalent to ';'* alts (';' alts)* ';'* (non-empty, permits leading/trailing semis)+    alts : alts1+         | ';' alts+    alts1 : alts1 ';' alt+          | alts1 ';'+          | alt++    -- Equivalent to x (',' x)+ (non-empty, no trailing semis)+    xs : x+       | x ',' xs++-- -----------------------------------------------------------------------------++-}++%token+ '_'            { L _ ITunderscore }            -- Haskell keywords+ 'as'           { L _ ITas }+ 'case'         { L _ ITcase }+ 'class'        { L _ ITclass }+ 'data'         { L _ ITdata }+ 'default'      { L _ ITdefault }+ 'deriving'     { L _ ITderiving }+ 'do'           { L _ ITdo }+ 'else'         { L _ ITelse }+ 'hiding'       { L _ IThiding }+ 'if'           { L _ ITif }+ 'import'       { L _ ITimport }+ 'in'           { L _ ITin }+ 'infix'        { L _ ITinfix }+ 'infixl'       { L _ ITinfixl }+ 'infixr'       { L _ ITinfixr }+ 'instance'     { L _ ITinstance }+ 'let'          { L _ ITlet }+ 'module'       { L _ ITmodule }+ 'newtype'      { L _ ITnewtype }+ 'of'           { L _ ITof }+ 'qualified'    { L _ ITqualified }+ 'then'         { L _ ITthen }+ 'type'         { L _ ITtype }+ 'where'        { L _ ITwhere }++ 'forall'       { L _ (ITforall _) }                -- GHC extension keywords+ 'foreign'      { L _ ITforeign }+ 'export'       { L _ ITexport }+ 'label'        { L _ ITlabel }+ 'dynamic'      { L _ ITdynamic }+ 'safe'         { L _ ITsafe }+ 'interruptible' { L _ ITinterruptible }+ 'unsafe'       { L _ ITunsafe }+ 'mdo'          { L _ ITmdo }+ 'family'       { L _ ITfamily }+ 'role'         { L _ ITrole }+ 'stdcall'      { L _ ITstdcallconv }+ 'ccall'        { L _ ITccallconv }+ 'capi'         { L _ ITcapiconv }+ 'prim'         { L _ ITprimcallconv }+ 'javascript'   { L _ ITjavascriptcallconv }+ 'proc'         { L _ ITproc }          -- for arrow notation extension+ 'rec'          { L _ ITrec }           -- for arrow notation extension+ 'group'    { L _ ITgroup }     -- for list transform extension+ 'by'       { L _ ITby }        -- for list transform extension+ 'using'    { L _ ITusing }     -- for list transform extension+ 'pattern'      { L _ ITpattern } -- for pattern synonyms+ 'static'       { L _ ITstatic }  -- for static pointers extension+ 'stock'        { L _ ITstock }    -- for DerivingStrategies extension+ 'anyclass'     { L _ ITanyclass } -- for DerivingStrategies extension+ 'via'          { L _ ITvia }      -- for DerivingStrategies extension++ 'unit'         { L _ ITunit }+ 'signature'    { L _ ITsignature }+ 'dependency'   { L _ ITdependency }++ '{-# INLINE'             { L _ (ITinline_prag _ _ _) } -- INLINE or INLINABLE+ '{-# SPECIALISE'         { L _ (ITspec_prag _) }+ '{-# SPECIALISE_INLINE'  { L _ (ITspec_inline_prag _ _) }+ '{-# SOURCE'             { L _ (ITsource_prag _) }+ '{-# RULES'              { L _ (ITrules_prag _) }+ '{-# CORE'               { L _ (ITcore_prag _) }      -- hdaume: annotated core+ '{-# SCC'                { L _ (ITscc_prag _)}+ '{-# GENERATED'          { L _ (ITgenerated_prag _) }+ '{-# DEPRECATED'         { L _ (ITdeprecated_prag _) }+ '{-# WARNING'            { L _ (ITwarning_prag _) }+ '{-# UNPACK'             { L _ (ITunpack_prag _) }+ '{-# NOUNPACK'           { L _ (ITnounpack_prag _) }+ '{-# ANN'                { L _ (ITann_prag _) }+ '{-# MINIMAL'            { L _ (ITminimal_prag _) }+ '{-# CTYPE'              { L _ (ITctype _) }+ '{-# OVERLAPPING'        { L _ (IToverlapping_prag _) }+ '{-# OVERLAPPABLE'       { L _ (IToverlappable_prag _) }+ '{-# OVERLAPS'           { L _ (IToverlaps_prag _) }+ '{-# INCOHERENT'         { L _ (ITincoherent_prag _) }+ '{-# COMPLETE'           { L _ (ITcomplete_prag _)   }+ '#-}'                    { L _ ITclose_prag }++ '..'           { L _ ITdotdot }                        -- reserved symbols+ ':'            { L _ ITcolon }+ '::'           { L _ (ITdcolon _) }+ '='            { L _ ITequal }+ '\\'           { L _ ITlam }+ 'lcase'        { L _ ITlcase }+ '|'            { L _ ITvbar }+ '<-'           { L _ (ITlarrow _) }+ '->'           { L _ (ITrarrow _) }+ '@'            { L _ ITat }+ '~'            { L _ ITtilde }+ '=>'           { L _ (ITdarrow _) }+ '-'            { L _ ITminus }+ '!'            { L _ ITbang }+ '*'            { L _ (ITstar _) }+ '-<'           { L _ (ITlarrowtail _) }            -- for arrow notation+ '>-'           { L _ (ITrarrowtail _) }            -- for arrow notation+ '-<<'          { L _ (ITLarrowtail _) }            -- for arrow notation+ '>>-'          { L _ (ITRarrowtail _) }            -- for arrow notation+ '.'            { L _ ITdot }+ TYPEAPP        { L _ ITtypeApp }++ '{'            { L _ ITocurly }                        -- special symbols+ '}'            { L _ ITccurly }+ vocurly        { L _ ITvocurly } -- virtual open curly (from layout)+ vccurly        { L _ ITvccurly } -- virtual close curly (from layout)+ '['            { L _ ITobrack }+ ']'            { L _ ITcbrack }+ '[:'           { L _ ITopabrack }+ ':]'           { L _ ITcpabrack }+ '('            { L _ IToparen }+ ')'            { L _ ITcparen }+ '(#'           { L _ IToubxparen }+ '#)'           { L _ ITcubxparen }+ '(|'           { L _ (IToparenbar _) }+ '|)'           { L _ (ITcparenbar _) }+ ';'            { L _ ITsemi }+ ','            { L _ ITcomma }+ '`'            { L _ ITbackquote }+ SIMPLEQUOTE    { L _ ITsimpleQuote      }     -- 'x++ VARID          { L _ (ITvarid    _) }          -- identifiers+ CONID          { L _ (ITconid    _) }+ VARSYM         { L _ (ITvarsym   _) }+ CONSYM         { L _ (ITconsym   _) }+ QVARID         { L _ (ITqvarid   _) }+ QCONID         { L _ (ITqconid   _) }+ QVARSYM        { L _ (ITqvarsym  _) }+ QCONSYM        { L _ (ITqconsym  _) }++ IPDUPVARID     { L _ (ITdupipvarid   _) }              -- GHC extension+ LABELVARID     { L _ (ITlabelvarid   _) }++ CHAR           { L _ (ITchar   _ _) }+ STRING         { L _ (ITstring _ _) }+ INTEGER        { L _ (ITinteger _) }+ RATIONAL       { L _ (ITrational _) }++ PRIMCHAR       { L _ (ITprimchar   _ _) }+ PRIMSTRING     { L _ (ITprimstring _ _) }+ PRIMINTEGER    { L _ (ITprimint    _ _) }+ PRIMWORD       { L _ (ITprimword   _ _) }+ PRIMFLOAT      { L _ (ITprimfloat  _) }+ PRIMDOUBLE     { L _ (ITprimdouble _) }++ DOCNEXT        { L _ (ITdocCommentNext _) }+ DOCPREV        { L _ (ITdocCommentPrev _) }+ DOCNAMED       { L _ (ITdocCommentNamed _) }+ DOCSECTION     { L _ (ITdocSection _ _) }++-- Template Haskell+'[|'            { L _ (ITopenExpQuote _ _) }+'[p|'           { L _ ITopenPatQuote  }+'[t|'           { L _ ITopenTypQuote  }+'[d|'           { L _ ITopenDecQuote  }+'|]'            { L _ (ITcloseQuote _) }+'[||'           { L _ (ITopenTExpQuote _) }+'||]'           { L _ ITcloseTExpQuote  }+TH_ID_SPLICE    { L _ (ITidEscape _)  }     -- $x+'$('            { L _ ITparenEscape   }     -- $( exp )+TH_ID_TY_SPLICE { L _ (ITidTyEscape _)  }   -- $$x+'$$('           { L _ ITparenTyEscape   }   -- $$( exp )+TH_TY_QUOTE     { L _ ITtyQuote       }      -- ''T+TH_QUASIQUOTE   { L _ (ITquasiQuote _) }+TH_QQUASIQUOTE  { L _ (ITqQuasiQuote _) }++%monad { P } { >>= } { return }+%lexer { (lexer True) } { L _ ITeof }+%tokentype { (Located Token) }++-- Exported parsers+%name parseModule module+%name parseSignature signature+%name parseImport importdecl+%name parseStatement stmt+%name parseDeclaration topdecl+%name parseExpression exp+%name parsePattern pat+%name parseTypeSignature sigdecl+%name parseStmt   maybe_stmt+%name parseIdentifier  identifier+%name parseType ctype+%name parseBackpack backpack+%partial parseHeader header+%%++-----------------------------------------------------------------------------+-- Identifiers; one of the entry points+identifier :: { Located RdrName }+        : qvar                          { $1 }+        | qcon                          { $1 }+        | qvarop                        { $1 }+        | qconop                        { $1 }+    | '(' '->' ')'      {% ams (sLL $1 $> $ getRdrName funTyCon)+                               [mop $1,mu AnnRarrow $2,mcp $3] }+    | '(' '~' ')'       {% ams (sLL $1 $> $ eqTyCon_RDR)+                               [mop $1,mj AnnTilde $2,mcp $3] }++-----------------------------------------------------------------------------+-- Backpack stuff++backpack :: { [LHsUnit PackageName] }+         : implicit_top units close { fromOL $2 }+         | '{' units '}'            { fromOL $2 }++units :: { OrdList (LHsUnit PackageName) }+         : units ';' unit { $1 `appOL` unitOL $3 }+         | units ';'      { $1 }+         | unit           { unitOL $1 }++unit :: { LHsUnit PackageName }+        : 'unit' pkgname 'where' unitbody+            { sL1 $1 $ HsUnit { hsunitName = $2+                              , hsunitBody = fromOL $4 } }++unitid :: { LHsUnitId PackageName }+        : pkgname                  { sL1 $1 $ HsUnitId $1 [] }+        | pkgname '[' msubsts ']'  { sLL $1 $> $ HsUnitId $1 (fromOL $3) }++msubsts :: { OrdList (LHsModuleSubst PackageName) }+        : msubsts ',' msubst { $1 `appOL` unitOL $3 }+        | msubsts ','        { $1 }+        | msubst             { unitOL $1 }++msubst :: { LHsModuleSubst PackageName }+        : modid '=' moduleid { sLL $1 $> $ ($1, $3) }+        | modid VARSYM modid VARSYM { sLL $1 $> $ ($1, sLL $2 $> $ HsModuleVar $3) }++moduleid :: { LHsModuleId PackageName }+          : VARSYM modid VARSYM { sLL $1 $> $ HsModuleVar $2 }+          | unitid ':' modid    { sLL $1 $> $ HsModuleId $1 $3 }++pkgname :: { Located PackageName }+        : STRING     { sL1 $1 $ PackageName (getSTRING $1) }+        | litpkgname { sL1 $1 $ PackageName (unLoc $1) }++litpkgname_segment :: { Located FastString }+        : VARID  { sL1 $1 $ getVARID $1 }+        | CONID  { sL1 $1 $ getCONID $1 }+        | special_id { $1 }++litpkgname :: { Located FastString }+        : litpkgname_segment { $1 }+        -- a bit of a hack, means p - b is parsed same as p-b, enough for now.+        | litpkgname_segment '-' litpkgname  { sLL $1 $> $ appendFS (unLoc $1) (consFS '-' (unLoc $3)) }++mayberns :: { Maybe [LRenaming] }+        : {- empty -} { Nothing }+        | '(' rns ')' { Just (fromOL $2) }++rns :: { OrdList LRenaming }+        : rns ',' rn { $1 `appOL` unitOL $3 }+        | rns ','    { $1 }+        | rn         { unitOL $1 }++rn :: { LRenaming }+        : modid 'as' modid { sLL $1 $> $ Renaming $1 (Just $3) }+        | modid            { sL1 $1    $ Renaming $1 Nothing }++unitbody :: { OrdList (LHsUnitDecl PackageName) }+        : '{'     unitdecls '}'   { $2 }+        | vocurly unitdecls close { $2 }++unitdecls :: { OrdList (LHsUnitDecl PackageName) }+        : unitdecls ';' unitdecl { $1 `appOL` unitOL $3 }+        | unitdecls ';'         { $1 }+        | unitdecl              { unitOL $1 }++unitdecl :: { LHsUnitDecl PackageName }+        : maybedocheader 'module' modid maybemodwarning maybeexports 'where' body+             -- XXX not accurate+             { sL1 $2 $ DeclD ModuleD $3 (Just (sL1 $2 (HsModule (Just $3) $5 (fst $ snd $7) (snd $ snd $7) $4 $1))) }+        | maybedocheader 'signature' modid maybemodwarning maybeexports 'where' body+             { sL1 $2 $ DeclD SignatureD $3 (Just (sL1 $2 (HsModule (Just $3) $5 (fst $ snd $7) (snd $ snd $7) $4 $1))) }+        -- NB: MUST have maybedocheader here, otherwise shift-reduce conflict+        -- will prevent us from parsing both forms.+        | maybedocheader 'module' modid+             { sL1 $2 $ DeclD ModuleD $3 Nothing }+        | maybedocheader 'signature' modid+             { sL1 $2 $ DeclD SignatureD $3 Nothing }+        | 'dependency' unitid mayberns+             { sL1 $1 $ IncludeD (IncludeDecl { idUnitId = $2+                                              , idModRenaming = $3+                                              , idSignatureInclude = False }) }+        | 'dependency' 'signature' unitid+             { sL1 $1 $ IncludeD (IncludeDecl { idUnitId = $3+                                              , idModRenaming = Nothing+                                              , idSignatureInclude = True }) }++-----------------------------------------------------------------------------+-- Module Header++-- The place for module deprecation is really too restrictive, but if it+-- was allowed at its natural place just before 'module', we get an ugly+-- s/r conflict with the second alternative. Another solution would be the+-- introduction of a new pragma DEPRECATED_MODULE, but this is not very nice,+-- either, and DEPRECATED is only expected to be used by people who really+-- know what they are doing. :-)++signature :: { Located (HsModule GhcPs) }+       : maybedocheader 'signature' modid maybemodwarning maybeexports 'where' body+             {% fileSrcSpan >>= \ loc ->+                ams (L loc (HsModule (Just $3) $5 (fst $ snd $7)+                              (snd $ snd $7) $4 $1)+                    )+                    ([mj AnnSignature $2, mj AnnWhere $6] ++ fst $7) }++module :: { Located (HsModule GhcPs) }+       : maybedocheader 'module' modid maybemodwarning maybeexports 'where' body+             {% fileSrcSpan >>= \ loc ->+                ams (L loc (HsModule (Just $3) $5 (fst $ snd $7)+                              (snd $ snd $7) $4 $1)+                    )+                    ([mj AnnModule $2, mj AnnWhere $6] ++ fst $7) }+        | body2+                {% fileSrcSpan >>= \ loc ->+                   ams (L loc (HsModule Nothing Nothing+                               (fst $ snd $1) (snd $ snd $1) Nothing Nothing))+                       (fst $1) }++maybedocheader :: { Maybe LHsDocString }+        : moduleheader            { $1 }+        | {- empty -}             { Nothing }++missing_module_keyword :: { () }+        : {- empty -}                           {% pushModuleContext }++implicit_top :: { () }+        : {- empty -}                           {% pushModuleContext }++maybemodwarning :: { Maybe (Located WarningTxt) }+    : '{-# DEPRECATED' strings '#-}'+                      {% ajs (Just (sLL $1 $> $ DeprecatedTxt (sL1 $1 (getDEPRECATED_PRAGs $1)) (snd $ unLoc $2)))+                             (mo $1:mc $3: (fst $ unLoc $2)) }+    | '{-# WARNING' strings '#-}'+                         {% ajs (Just (sLL $1 $> $ WarningTxt (sL1 $1 (getWARNING_PRAGs $1)) (snd $ unLoc $2)))+                                (mo $1:mc $3 : (fst $ unLoc $2)) }+    |  {- empty -}                  { Nothing }++body    :: { ([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs])) }+        :  '{'            top '}'      { (moc $1:mcc $3:(fst $2)+                                         , snd $2) }+        |      vocurly    top close    { (fst $2, snd $2) }++body2   :: { ([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs])) }+        :  '{' top '}'                          { (moc $1:mcc $3+                                                   :(fst $2), snd $2) }+        |  missing_module_keyword top close     { ([],snd $2) }+++top     :: { ([AddAnn]+             ,([LImportDecl GhcPs], [LHsDecl GhcPs])) }+        : semis top1                            { ($1, $2) }++top1    :: { ([LImportDecl GhcPs], [LHsDecl GhcPs]) }+        : importdecls_semi topdecls_semi        { (reverse $1, cvTopDecls $2) }+        | importdecls_semi topdecls             { (reverse $1, cvTopDecls $2) }+        | importdecls                           { (reverse $1, []) }++-----------------------------------------------------------------------------+-- Module declaration & imports only++header  :: { Located (HsModule GhcPs) }+        : maybedocheader 'module' modid maybemodwarning maybeexports 'where' header_body+                {% fileSrcSpan >>= \ loc ->+                   ams (L loc (HsModule (Just $3) $5 $7 [] $4 $1+                          )) [mj AnnModule $2,mj AnnWhere $6] }+        | maybedocheader 'signature' modid maybemodwarning maybeexports 'where' header_body+                {% fileSrcSpan >>= \ loc ->+                   ams (L loc (HsModule (Just $3) $5 $7 [] $4 $1+                          )) [mj AnnModule $2,mj AnnWhere $6] }+        | header_body2+                {% fileSrcSpan >>= \ loc ->+                   return (L loc (HsModule Nothing Nothing $1 [] Nothing+                          Nothing)) }++header_body :: { [LImportDecl GhcPs] }+        :  '{'            header_top            { $2 }+        |      vocurly    header_top            { $2 }++header_body2 :: { [LImportDecl GhcPs] }+        :  '{' header_top                       { $2 }+        |  missing_module_keyword header_top    { $2 }++header_top :: { [LImportDecl GhcPs] }+        :  semis header_top_importdecls         { $2 }++header_top_importdecls :: { [LImportDecl GhcPs] }+        :  importdecls_semi                     { $1 }+        |  importdecls                          { $1 }++-----------------------------------------------------------------------------+-- The Export List++maybeexports :: { (Maybe (Located [LIE GhcPs])) }+        :  '(' exportlist ')'       {% ams (sLL $1 $> ()) [mop $1,mcp $3] >>+                                       return (Just (sLL $1 $> (fromOL $2))) }+        |  {- empty -}              { Nothing }++exportlist :: { OrdList (LIE GhcPs) }+        : expdoclist ',' expdoclist   {% addAnnotation (oll $1) AnnComma (gl $2)+                                         >> return ($1 `appOL` $3) }+        | exportlist1                 { $1 }++exportlist1 :: { OrdList (LIE GhcPs) }+        : expdoclist export expdoclist ',' exportlist1+                          {% (addAnnotation (oll ($1 `appOL` $2 `appOL` $3))+                                            AnnComma (gl $4) ) >>+                              return ($1 `appOL` $2 `appOL` $3 `appOL` $5) }+        | expdoclist export expdoclist             { $1 `appOL` $2 `appOL` $3 }+        | expdoclist                               { $1 }++expdoclist :: { OrdList (LIE GhcPs) }+        : exp_doc expdoclist                           { $1 `appOL` $2 }+        | {- empty -}                                  { nilOL }++exp_doc :: { OrdList (LIE GhcPs) }+        : docsection    { unitOL (sL1 $1 (case (unLoc $1) of (n, doc) -> IEGroup noExt n doc)) }+        | docnamed      { unitOL (sL1 $1 (IEDocNamed noExt ((fst . unLoc) $1))) }+        | docnext       { unitOL (sL1 $1 (IEDoc noExt (unLoc $1))) }+++   -- No longer allow things like [] and (,,,) to be exported+   -- They are built in syntax, always available+export  :: { OrdList (LIE GhcPs) }+        : qcname_ext export_subspec  {% mkModuleImpExp $1 (snd $ unLoc $2)+                                          >>= \ie -> amsu (sLL $1 $> ie) (fst $ unLoc $2) }+        |  'module' modid            {% amsu (sLL $1 $> (IEModuleContents noExt $2))+                                             [mj AnnModule $1] }+        |  'pattern' qcon            {% amsu (sLL $1 $> (IEVar noExt (sLL $1 $> (IEPattern $2))))+                                             [mj AnnPattern $1] }++export_subspec :: { Located ([AddAnn],ImpExpSubSpec) }+        : {- empty -}             { sL0 ([],ImpExpAbs) }+        | '(' qcnames ')'         {% mkImpExpSubSpec (reverse (snd $2))+                                      >>= \(as,ie) -> return $ sLL $1 $>+                                            (as ++ [mop $1,mcp $3] ++ fst $2, ie) }+++qcnames :: { ([AddAnn], [Located ImpExpQcSpec]) }+  : {- empty -}                   { ([],[]) }+  | qcnames1                      { $1 }++qcnames1 :: { ([AddAnn], [Located ImpExpQcSpec]) }     -- A reversed list+        :  qcnames1 ',' qcname_ext_w_wildcard  {% case (head (snd $1)) of+                                                    l@(L _ ImpExpQcWildcard) ->+                                                       return ([mj AnnComma $2, mj AnnDotdot l]+                                                               ,(snd (unLoc $3)  : snd $1))+                                                    l -> (ams (head (snd $1)) [mj AnnComma $2] >>+                                                          return (fst $1 ++ fst (unLoc $3),+                                                                  snd (unLoc $3) : snd $1)) }+++        -- Annotations re-added in mkImpExpSubSpec+        |  qcname_ext_w_wildcard                   { (fst (unLoc $1),[snd (unLoc $1)]) }++-- Variable, data constructor or wildcard+-- or tagged type constructor+qcname_ext_w_wildcard :: { Located ([AddAnn], Located ImpExpQcSpec) }+        :  qcname_ext               { sL1 $1 ([],$1) }+        |  '..'                     { sL1 $1 ([mj AnnDotdot $1], sL1 $1 ImpExpQcWildcard)  }++qcname_ext :: { Located ImpExpQcSpec }+        :  qcname                   { sL1 $1 (ImpExpQcName $1) }+        |  'type' oqtycon           {% do { n <- mkTypeImpExp $2+                                          ; ams (sLL $1 $> (ImpExpQcType n))+                                                [mj AnnType $1] } }++qcname  :: { Located RdrName }  -- Variable or type constructor+        :  qvar                 { $1 } -- Things which look like functions+                                       -- Note: This includes record selectors but+                                       -- also (-.->), see #11432+        |  oqtycon_no_varcon    { $1 } -- see Note [Type constructors in export list]++-----------------------------------------------------------------------------+-- Import Declarations++-- importdecls and topdecls must contain at least one declaration;+-- top handles the fact that these may be optional.++-- One or more semicolons+semis1  :: { [AddAnn] }+semis1  : semis1 ';'  { mj AnnSemi $2 : $1 }+        | ';'         { [mj AnnSemi $1] }++-- Zero or more semicolons+semis   :: { [AddAnn] }+semis   : semis ';'   { mj AnnSemi $2 : $1 }+        | {- empty -} { [] }++-- No trailing semicolons, non-empty+importdecls :: { [LImportDecl GhcPs] }+importdecls+        : importdecls_semi importdecl+                                { $2 : $1 }++-- May have trailing semicolons, can be empty+importdecls_semi :: { [LImportDecl GhcPs] }+importdecls_semi+        : importdecls_semi importdecl semis1+                                {% ams $2 $3 >> return ($2 : $1) }+        | {- empty -}           { [] }++importdecl :: { LImportDecl GhcPs }+        : 'import' maybe_src maybe_safe optqualified maybe_pkg modid maybeas maybeimpspec+                {% ams (L (comb4 $1 $6 (snd $7) $8) $+                  ImportDecl { ideclExt = noExt+                             , ideclSourceSrc = snd $ fst $2+                             , ideclName = $6, ideclPkgQual = snd $5+                             , ideclSource = snd $2, ideclSafe = snd $3+                             , ideclQualified = snd $4, ideclImplicit = False+                             , ideclAs = unLoc (snd $7)+                             , ideclHiding = unLoc $8 })+                   ((mj AnnImport $1 : (fst $ fst $2) ++ fst $3 ++ fst $4+                                    ++ fst $5 ++ fst $7)) }++maybe_src :: { (([AddAnn],SourceText),IsBootInterface) }+        : '{-# SOURCE' '#-}'        { (([mo $1,mc $2],getSOURCE_PRAGs $1)+                                      ,True) }+        | {- empty -}               { (([],NoSourceText),False) }++maybe_safe :: { ([AddAnn],Bool) }+        : 'safe'                                { ([mj AnnSafe $1],True) }+        | {- empty -}                           { ([],False) }++maybe_pkg :: { ([AddAnn],Maybe StringLiteral) }+        : STRING  {% let pkgFS = getSTRING $1 in+                     if looksLikePackageName (unpackFS pkgFS)+                        then return ([mj AnnPackageName $1], Just (StringLiteral (getSTRINGs $1) pkgFS))+                        else parseErrorSDoc (getLoc $1) $ vcat [+                             text "parse error" <> colon <+> quotes (ppr pkgFS),+                             text "Version number or non-alphanumeric" <+>+                             text "character in package name"] }+        | {- empty -}                           { ([],Nothing) }++optqualified :: { ([AddAnn],Bool) }+        : 'qualified'                           { ([mj AnnQualified $1],True)  }+        | {- empty -}                           { ([],False) }++maybeas :: { ([AddAnn],Located (Maybe (Located ModuleName))) }+        : 'as' modid                           { ([mj AnnAs $1]+                                                 ,sLL $1 $> (Just $2)) }+        | {- empty -}                          { ([],noLoc Nothing) }++maybeimpspec :: { Located (Maybe (Bool, Located [LIE GhcPs])) }+        : impspec                  {% let (b, ie) = unLoc $1 in+                                       checkImportSpec ie+                                        >>= \checkedIe ->+                                          return (L (gl $1) (Just (b, checkedIe)))  }+        | {- empty -}              { noLoc Nothing }++impspec :: { Located (Bool, Located [LIE GhcPs]) }+        :  '(' exportlist ')'               {% ams (sLL $1 $> (False,+                                                      sLL $1 $> $ fromOL $2))+                                                   [mop $1,mcp $3] }+        |  'hiding' '(' exportlist ')'      {% ams (sLL $1 $> (True,+                                                      sLL $1 $> $ fromOL $3))+                                               [mj AnnHiding $1,mop $2,mcp $4] }++-----------------------------------------------------------------------------+-- Fixity Declarations++prec    :: { Located (SourceText,Int) }+        : {- empty -}           { noLoc (NoSourceText,9) }+        | INTEGER+                 {% checkPrecP (sL1 $1 (getINTEGERs $1,fromInteger (il_value (getINTEGER $1)))) }++infix   :: { Located FixityDirection }+        : 'infix'                               { sL1 $1 InfixN  }+        | 'infixl'                              { sL1 $1 InfixL  }+        | 'infixr'                              { sL1 $1 InfixR }++ops     :: { Located (OrdList (Located RdrName)) }+        : ops ',' op       {% addAnnotation (oll $ unLoc $1) AnnComma (gl $2) >>+                              return (sLL $1 $> ((unLoc $1) `appOL` unitOL $3))}+        | op               { sL1 $1 (unitOL $1) }++-----------------------------------------------------------------------------+-- Top-Level Declarations++-- No trailing semicolons, non-empty+topdecls :: { OrdList (LHsDecl GhcPs) }+        : topdecls_semi topdecl        { $1 `snocOL` $2 }++-- May have trailing semicolons, can be empty+topdecls_semi :: { OrdList (LHsDecl GhcPs) }+        : topdecls_semi topdecl semis1 {% ams $2 $3 >> return ($1 `snocOL` $2) }+        | {- empty -}                  { nilOL }++topdecl :: { LHsDecl GhcPs }+        : cl_decl                               { sL1 $1 (TyClD noExt (unLoc $1)) }+        | ty_decl                               { sL1 $1 (TyClD noExt (unLoc $1)) }+        | inst_decl                             { sL1 $1 (InstD noExt (unLoc $1)) }+        | stand_alone_deriving                  { sLL $1 $> (DerivD noExt (unLoc $1)) }+        | role_annot                            { sL1 $1 (RoleAnnotD noExt (unLoc $1)) }+        | 'default' '(' comma_types0 ')'    {% ams (sLL $1 $> (DefD noExt (DefaultDecl noExt $3)))+                                                         [mj AnnDefault $1+                                                         ,mop $2,mcp $4] }+        | 'foreign' fdecl          {% ams (sLL $1 $> (snd $ unLoc $2))+                                           (mj AnnForeign $1:(fst $ unLoc $2)) }+        | '{-# DEPRECATED' deprecations '#-}'   {% ams (sLL $1 $> $ WarningD noExt (Warnings noExt (getDEPRECATED_PRAGs $1) (fromOL $2)))+                                                       [mo $1,mc $3] }+        | '{-# WARNING' warnings '#-}'          {% ams (sLL $1 $> $ WarningD noExt (Warnings noExt (getWARNING_PRAGs $1) (fromOL $2)))+                                                       [mo $1,mc $3] }+        | '{-# RULES' rules '#-}'               {% ams (sLL $1 $> $ RuleD noExt (HsRules noExt (getRULES_PRAGs $1) (fromOL $2)))+                                                       [mo $1,mc $3] }+        | annotation { $1 }+        | decl_no_th                            { $1 }++        -- Template Haskell Extension+        -- The $(..) form is one possible form of infixexp+        -- but we treat an arbitrary expression just as if+        -- it had a $(..) wrapped around it+        | infixexp_top                          { sLL $1 $> $ mkSpliceDecl $1 }++-- Type classes+--+cl_decl :: { LTyClDecl GhcPs }+        : 'class' tycl_hdr fds where_cls+                {% amms (mkClassDecl (comb4 $1 $2 $3 $4) $2 $3 (snd $ unLoc $4))+                        (mj AnnClass $1:(fst $ unLoc $3)++(fst $ unLoc $4)) }++-- Type declarations (toplevel)+--+ty_decl :: { LTyClDecl GhcPs }+           -- ordinary type synonyms+        : 'type' type '=' ctypedoc+                -- Note ctype, not sigtype, on the right of '='+                -- We allow an explicit for-all but we don't insert one+                -- in   type Foo a = (b,b)+                -- Instead we just say b is out of scope+                --+                -- Note the use of type for the head; this allows+                -- infix type constructors to be declared+                {% amms (mkTySynonym (comb2 $1 $4) $2 $4)+                        [mj AnnType $1,mj AnnEqual $3] }++           -- type family declarations+        | 'type' 'family' type opt_tyfam_kind_sig opt_injective_info+                          where_type_family+                -- Note the use of type for the head; this allows+                -- infix type constructors to be declared+                {% amms (mkFamDecl (comb4 $1 $3 $4 $5) (snd $ unLoc $6) $3+                                   (snd $ unLoc $4) (snd $ unLoc $5))+                        (mj AnnType $1:mj AnnFamily $2:(fst $ unLoc $4)+                           ++ (fst $ unLoc $5) ++ (fst $ unLoc $6)) }++          -- ordinary data type or newtype declaration+        | data_or_newtype capi_ctype tycl_hdr constrs maybe_derivings+                {% amms (mkTyData (comb4 $1 $3 $4 $5) (snd $ unLoc $1) $2 $3+                           Nothing (reverse (snd $ unLoc $4))+                                   (fmap reverse $5))+                                   -- We need the location on tycl_hdr in case+                                   -- constrs and deriving are both empty+                        ((fst $ unLoc $1):(fst $ unLoc $4)) }++          -- ordinary GADT declaration+        | data_or_newtype capi_ctype tycl_hdr opt_kind_sig+                 gadt_constrlist+                 maybe_derivings+            {% amms (mkTyData (comb4 $1 $3 $5 $6) (snd $ unLoc $1) $2 $3+                            (snd $ unLoc $4) (snd $ unLoc $5)+                            (fmap reverse $6) )+                                   -- We need the location on tycl_hdr in case+                                   -- constrs and deriving are both empty+                    ((fst $ unLoc $1):(fst $ unLoc $4)++(fst $ unLoc $5)) }++          -- data/newtype family+        | 'data' 'family' type opt_datafam_kind_sig+                {% amms (mkFamDecl (comb3 $1 $2 $4) DataFamily $3+                                   (snd $ unLoc $4) Nothing)+                        (mj AnnData $1:mj AnnFamily $2:(fst $ unLoc $4)) }++inst_decl :: { LInstDecl GhcPs }+        : 'instance' overlap_pragma inst_type where_inst+       {% do { (binds, sigs, _, ats, adts, _) <- cvBindsAndSigs (snd $ unLoc $4)+             ; let cid = ClsInstDecl { cid_ext = noExt+                                     , cid_poly_ty = $3, cid_binds = binds+                                     , cid_sigs = mkClassOpSigs sigs+                                     , cid_tyfam_insts = ats+                                     , cid_overlap_mode = $2+                                     , cid_datafam_insts = adts }+             ; ams (L (comb3 $1 (hsSigType $3) $4) (ClsInstD { cid_d_ext = noExt, cid_inst = cid }))+                   (mj AnnInstance $1 : (fst $ unLoc $4)) } }++           -- type instance declarations+        | 'type' 'instance' ty_fam_inst_eqn+                {% ams $3 (fst $ unLoc $3)+                >> amms (mkTyFamInst (comb2 $1 $3) (snd $ unLoc $3))+                    (mj AnnType $1:mj AnnInstance $2:(fst $ unLoc $3)) }++          -- data/newtype instance declaration+        | data_or_newtype 'instance' capi_ctype tycl_hdr constrs+                          maybe_derivings+            {% amms (mkDataFamInst (comb4 $1 $4 $5 $6) (snd $ unLoc $1) $3 $4+                                      Nothing (reverse (snd  $ unLoc $5))+                                              (fmap reverse $6))+                    ((fst $ unLoc $1):mj AnnInstance $2:(fst $ unLoc $5)) }++          -- GADT instance declaration+        | data_or_newtype 'instance' capi_ctype tycl_hdr opt_kind_sig+                 gadt_constrlist+                 maybe_derivings+            {% amms (mkDataFamInst (comb4 $1 $4 $6 $7) (snd $ unLoc $1) $3 $4+                                   (snd $ unLoc $5) (snd $ unLoc $6)+                                   (fmap reverse $7))+                    ((fst $ unLoc $1):mj AnnInstance $2+                       :(fst $ unLoc $5)++(fst $ unLoc $6)) }++overlap_pragma :: { Maybe (Located OverlapMode) }+  : '{-# OVERLAPPABLE'    '#-}' {% ajs (Just (sLL $1 $> (Overlappable (getOVERLAPPABLE_PRAGs $1))))+                                       [mo $1,mc $2] }+  | '{-# OVERLAPPING'     '#-}' {% ajs (Just (sLL $1 $> (Overlapping (getOVERLAPPING_PRAGs $1))))+                                       [mo $1,mc $2] }+  | '{-# OVERLAPS'        '#-}' {% ajs (Just (sLL $1 $> (Overlaps (getOVERLAPS_PRAGs $1))))+                                       [mo $1,mc $2] }+  | '{-# INCOHERENT'      '#-}' {% ajs (Just (sLL $1 $> (Incoherent (getINCOHERENT_PRAGs $1))))+                                       [mo $1,mc $2] }+  | {- empty -}                 { Nothing }++deriv_strategy_no_via :: { LDerivStrategy GhcPs }+  : 'stock'                     {% ams (sL1 $1 StockStrategy)+                                       [mj AnnStock $1] }+  | 'anyclass'                  {% ams (sL1 $1 AnyclassStrategy)+                                       [mj AnnAnyclass $1] }+  | 'newtype'                   {% ams (sL1 $1 NewtypeStrategy)+                                       [mj AnnNewtype $1] }++deriv_strategy_via :: { LDerivStrategy GhcPs }+  : 'via' type              {% ams (sLL $1 $> (ViaStrategy (mkLHsSigType $2)))+                                            [mj AnnVia $1] }++deriv_standalone_strategy :: { Maybe (LDerivStrategy GhcPs) }+  : 'stock'                     {% ajs (Just (sL1 $1 StockStrategy))+                                       [mj AnnStock $1] }+  | 'anyclass'                  {% ajs (Just (sL1 $1 AnyclassStrategy))+                                       [mj AnnAnyclass $1] }+  | 'newtype'                   {% ajs (Just (sL1 $1 NewtypeStrategy))+                                       [mj AnnNewtype $1] }+  | deriv_strategy_via          { Just $1 }+  | {- empty -}                 { Nothing }++-- Injective type families++opt_injective_info :: { Located ([AddAnn], Maybe (LInjectivityAnn GhcPs)) }+        : {- empty -}               { noLoc ([], Nothing) }+        | '|' injectivity_cond      { sLL $1 $> ([mj AnnVbar $1]+                                                , Just ($2)) }++injectivity_cond :: { LInjectivityAnn GhcPs }+        : tyvarid '->' inj_varids+           {% ams (sLL $1 $> (InjectivityAnn $1 (reverse (unLoc $3))))+                  [mu AnnRarrow $2] }++inj_varids :: { Located [Located RdrName] }+        : inj_varids tyvarid  { sLL $1 $> ($2 : unLoc $1) }+        | tyvarid             { sLL $1 $> [$1]            }++-- Closed type families++where_type_family :: { Located ([AddAnn],FamilyInfo GhcPs) }+        : {- empty -}                      { noLoc ([],OpenTypeFamily) }+        | 'where' ty_fam_inst_eqn_list+               { sLL $1 $> (mj AnnWhere $1:(fst $ unLoc $2)+                    ,ClosedTypeFamily (fmap reverse $ snd $ unLoc $2)) }++ty_fam_inst_eqn_list :: { Located ([AddAnn],Maybe [LTyFamInstEqn GhcPs]) }+        :     '{' ty_fam_inst_eqns '}'     { sLL $1 $> ([moc $1,mcc $3]+                                                ,Just (unLoc $2)) }+        | vocurly ty_fam_inst_eqns close   { let L loc _ = $2 in+                                             L loc ([],Just (unLoc $2)) }+        |     '{' '..' '}'                 { sLL $1 $> ([moc $1,mj AnnDotdot $2+                                                 ,mcc $3],Nothing) }+        | vocurly '..' close               { let L loc _ = $2 in+                                             L loc ([mj AnnDotdot $2],Nothing) }++ty_fam_inst_eqns :: { Located [LTyFamInstEqn GhcPs] }+        : ty_fam_inst_eqns ';' ty_fam_inst_eqn+                                      {% let L loc (anns, eqn) = $3 in+                                         asl (unLoc $1) $2 (L loc eqn)+                                         >> ams $3 anns+                                         >> return (sLL $1 $> (L loc eqn : unLoc $1)) }+        | ty_fam_inst_eqns ';'        {% addAnnotation (gl $1) AnnSemi (gl $2)+                                         >> return (sLL $1 $>  (unLoc $1)) }+        | ty_fam_inst_eqn             {% let L loc (anns, eqn) = $1 in+                                         ams $1 anns+                                         >> return (sLL $1 $> [L loc eqn]) }+        | {- empty -}                 { noLoc [] }++ty_fam_inst_eqn :: { Located ([AddAnn],TyFamInstEqn GhcPs) }+        : type '=' ctype+                -- Note the use of type for the head; this allows+                -- infix type constructors and type patterns+              {% do { (eqn,ann) <- mkTyFamInstEqn $1 $3+                    ; return (sLL $1 $> (mj AnnEqual $2:ann, eqn))  } }++-- Associated type family declarations+--+-- * They have a different syntax than on the toplevel (no family special+--   identifier).+--+-- * They also need to be separate from instances; otherwise, data family+--   declarations without a kind signature cause parsing conflicts with empty+--   data declarations.+--+at_decl_cls :: { LHsDecl GhcPs }+        :  -- data family declarations, with optional 'family' keyword+          'data' opt_family type opt_datafam_kind_sig+                {% amms (liftM mkTyClD (mkFamDecl (comb3 $1 $3 $4) DataFamily $3+                                                  (snd $ unLoc $4) Nothing))+                        (mj AnnData $1:$2++(fst $ unLoc $4)) }++           -- type family declarations, with optional 'family' keyword+           -- (can't use opt_instance because you get shift/reduce errors+        | 'type' type opt_at_kind_inj_sig+               {% amms (liftM mkTyClD+                        (mkFamDecl (comb3 $1 $2 $3) OpenTypeFamily $2+                                   (fst . snd $ unLoc $3)+                                   (snd . snd $ unLoc $3)))+                       (mj AnnType $1:(fst $ unLoc $3)) }+        | 'type' 'family' type opt_at_kind_inj_sig+               {% amms (liftM mkTyClD+                        (mkFamDecl (comb3 $1 $3 $4) OpenTypeFamily $3+                                   (fst . snd $ unLoc $4)+                                   (snd . snd $ unLoc $4)))+                       (mj AnnType $1:mj AnnFamily $2:(fst $ unLoc $4)) }++           -- default type instances, with optional 'instance' keyword+        | 'type' ty_fam_inst_eqn+                {% ams $2 (fst $ unLoc $2) >>+                   amms (liftM mkInstD (mkTyFamInst (comb2 $1 $2) (snd $ unLoc $2)))+                        (mj AnnType $1:(fst $ unLoc $2)) }+        | 'type' 'instance' ty_fam_inst_eqn+                {% ams $3 (fst $ unLoc $3) >>+                   amms (liftM mkInstD (mkTyFamInst (comb2 $1 $3) (snd $ unLoc $3)))+                        (mj AnnType $1:mj AnnInstance $2:(fst $ unLoc $3)) }++opt_family   :: { [AddAnn] }+              : {- empty -}   { [] }+              | 'family'      { [mj AnnFamily $1] }++opt_instance :: { [AddAnn] }+              : {- empty -} { [] }+              | 'instance'  { [mj AnnInstance $1] }++-- Associated type instances+--+at_decl_inst :: { LInstDecl GhcPs }+           -- type instance declarations, with optional 'instance' keyword+        : 'type' opt_instance ty_fam_inst_eqn+                -- Note the use of type for the head; this allows+                -- infix type constructors and type patterns+                {% ams $3 (fst $ unLoc $3) >>+                   amms (mkTyFamInst (comb2 $1 $3) (snd $ unLoc $3))+                        (mj AnnType $1:$2++(fst $ unLoc $3)) }++        -- data/newtype instance declaration, with optional 'instance' keyword+        -- (can't use opt_instance because you get reduce/reduce errors)+        | data_or_newtype capi_ctype tycl_hdr constrs maybe_derivings+               {% amms (mkDataFamInst (comb4 $1 $3 $4 $5) (snd $ unLoc $1) $2 $3+                                    Nothing (reverse (snd $ unLoc $4))+                                            (fmap reverse $5))+                       ((fst $ unLoc $1):(fst $ unLoc $4)) }++        | data_or_newtype 'instance' capi_ctype tycl_hdr constrs maybe_derivings+               {% amms (mkDataFamInst (comb4 $1 $4 $5 $6) (snd $ unLoc $1) $3 $4+                                    Nothing (reverse (snd $ unLoc $5))+                                            (fmap reverse $6))+                       ((fst $ unLoc $1):mj AnnInstance $2:(fst $ unLoc $5)) }++        -- GADT instance declaration, with optional 'instance' keyword+        -- (can't use opt_instance because you get reduce/reduce errors)+        | data_or_newtype capi_ctype tycl_hdr opt_kind_sig+                 gadt_constrlist+                 maybe_derivings+                {% amms (mkDataFamInst (comb4 $1 $3 $5 $6) (snd $ unLoc $1) $2+                                $3 (snd $ unLoc $4) (snd $ unLoc $5)+                                (fmap reverse $6))+                        ((fst $ unLoc $1):(fst $ unLoc $4)++(fst $ unLoc $5)) }++        | data_or_newtype 'instance' capi_ctype tycl_hdr opt_kind_sig+                 gadt_constrlist+                 maybe_derivings+                {% amms (mkDataFamInst (comb4 $1 $4 $6 $7) (snd $ unLoc $1) $3+                                $4 (snd $ unLoc $5) (snd $ unLoc $6)+                                (fmap reverse $7))+                        ((fst $ unLoc $1):mj AnnInstance $2:(fst $ unLoc $5)++(fst $ unLoc $6)) }++data_or_newtype :: { Located (AddAnn, NewOrData) }+        : 'data'        { sL1 $1 (mj AnnData    $1,DataType) }+        | 'newtype'     { sL1 $1 (mj AnnNewtype $1,NewType) }++-- Family result/return kind signatures++opt_kind_sig :: { Located ([AddAnn], Maybe (LHsKind GhcPs)) }+        :               { noLoc     ([]               , Nothing) }+        | '::' kind     { sLL $1 $> ([mu AnnDcolon $1], Just $2) }++opt_datafam_kind_sig :: { Located ([AddAnn], LFamilyResultSig GhcPs) }+        :               { noLoc     ([]               , noLoc (NoSig noExt)         )}+        | '::' kind     { sLL $1 $> ([mu AnnDcolon $1], sLL $1 $> (KindSig noExt $2))}++opt_tyfam_kind_sig :: { Located ([AddAnn], LFamilyResultSig GhcPs) }+        :              { noLoc     ([]               , noLoc     (NoSig    noExt)   )}+        | '::' kind    { sLL $1 $> ([mu AnnDcolon $1], sLL $1 $> (KindSig  noExt $2))}+        | '='  tv_bndr { sLL $1 $> ([mj AnnEqual $1] , sLL $1 $> (TyVarSig noExt $2))}++opt_at_kind_inj_sig :: { Located ([AddAnn], ( LFamilyResultSig GhcPs+                                            , Maybe (LInjectivityAnn GhcPs)))}+        :            { noLoc ([], (noLoc (NoSig noExt), Nothing)) }+        | '::' kind  { sLL $1 $> ( [mu AnnDcolon $1]+                                 , (sLL $2 $> (KindSig noExt $2), Nothing)) }+        | '='  tv_bndr '|' injectivity_cond+                { sLL $1 $> ([mj AnnEqual $1, mj AnnVbar $3]+                            , (sLL $1 $2 (TyVarSig noExt $2), Just $4))}++-- tycl_hdr parses the header of a class or data type decl,+-- which takes the form+--      T a b+--      Eq a => T a+--      (Eq a, Ord b) => T a b+--      T Int [a]                       -- for associated types+-- Rather a lot of inlining here, else we get reduce/reduce errors+tycl_hdr :: { Located (Maybe (LHsContext GhcPs), LHsType GhcPs) }+        : context '=>' type         {% addAnnotation (gl $1) (toUnicodeAnn AnnDarrow $2) (gl $2)+                                       >> (return (sLL $1 $> (Just $1, $3)))+                                    }+        | type                      { sL1 $1 (Nothing, $1) }++capi_ctype :: { Maybe (Located CType) }+capi_ctype : '{-# CTYPE' STRING STRING '#-}'+                       {% ajs (Just (sLL $1 $> (CType (getCTYPEs $1) (Just (Header (getSTRINGs $2) (getSTRING $2)))+                                        (getSTRINGs $3,getSTRING $3))))+                              [mo $1,mj AnnHeader $2,mj AnnVal $3,mc $4] }++           | '{-# CTYPE'        STRING '#-}'+                       {% ajs (Just (sLL $1 $> (CType (getCTYPEs $1) Nothing  (getSTRINGs $2, getSTRING $2))))+                              [mo $1,mj AnnVal $2,mc $3] }++           |           { Nothing }++-----------------------------------------------------------------------------+-- Stand-alone deriving++-- Glasgow extension: stand-alone deriving declarations+stand_alone_deriving :: { LDerivDecl GhcPs }+  : 'deriving' deriv_standalone_strategy 'instance' overlap_pragma inst_type+                {% do { let { err = text "in the stand-alone deriving instance"+                                    <> colon <+> quotes (ppr $5) }+                      ; ams (sLL $1 (hsSigType $>)+                                 (DerivDecl noExt (mkHsWildCardBndrs $5) $2 $4))+                            [mj AnnDeriving $1, mj AnnInstance $3] } }++-----------------------------------------------------------------------------+-- Role annotations++role_annot :: { LRoleAnnotDecl GhcPs }+role_annot : 'type' 'role' oqtycon maybe_roles+          {% amms (mkRoleAnnotDecl (comb3 $1 $3 $4) $3 (reverse (unLoc $4)))+                  [mj AnnType $1,mj AnnRole $2] }++-- Reversed!+maybe_roles :: { Located [Located (Maybe FastString)] }+maybe_roles : {- empty -}    { noLoc [] }+            | roles          { $1 }++roles :: { Located [Located (Maybe FastString)] }+roles : role             { sLL $1 $> [$1] }+      | roles role       { sLL $1 $> $ $2 : unLoc $1 }++-- read it in as a varid for better error messages+role :: { Located (Maybe FastString) }+role : VARID             { sL1 $1 $ Just $ getVARID $1 }+     | '_'               { sL1 $1 Nothing }++-- Pattern synonyms++-- Glasgow extension: pattern synonyms+pattern_synonym_decl :: { LHsDecl GhcPs }+        : 'pattern' pattern_synonym_lhs '=' pat+         {%      let (name, args,as ) = $2 in+                 ams (sLL $1 $> . ValD noExt $ mkPatSynBind name args $4+                                                    ImplicitBidirectional)+               (as ++ [mj AnnPattern $1, mj AnnEqual $3])+         }++        | 'pattern' pattern_synonym_lhs '<-' pat+         {%    let (name, args, as) = $2 in+               ams (sLL $1 $> . ValD noExt $ mkPatSynBind name args $4 Unidirectional)+               (as ++ [mj AnnPattern $1,mu AnnLarrow $3]) }++        | 'pattern' pattern_synonym_lhs '<-' pat where_decls+            {% do { let (name, args, as) = $2+                  ; mg <- mkPatSynMatchGroup name (snd $ unLoc $5)+                  ; ams (sLL $1 $> . ValD noExt $+                           mkPatSynBind name args $4 (ExplicitBidirectional mg))+                       (as ++ ((mj AnnPattern $1:mu AnnLarrow $3:(fst $ unLoc $5))) )+                   }}++pattern_synonym_lhs :: { (Located RdrName, HsPatSynDetails (Located RdrName), [AddAnn]) }+        : con vars0 { ($1, PrefixCon $2, []) }+        | varid conop varid { ($2, InfixCon $1 $3, []) }+        | con '{' cvars1 '}' { ($1, RecCon $3, [moc $2, mcc $4] ) }++vars0 :: { [Located RdrName] }+        : {- empty -}                 { [] }+        | varid vars0                 { $1 : $2 }++cvars1 :: { [RecordPatSynField (Located RdrName)] }+       : var                          { [RecordPatSynField $1 $1] }+       | var ',' cvars1               {% addAnnotation (getLoc $1) AnnComma (getLoc $2) >>+                                         return ((RecordPatSynField $1 $1) : $3 )}++where_decls :: { Located ([AddAnn]+                         , Located (OrdList (LHsDecl GhcPs))) }+        : 'where' '{' decls '}'       { sLL $1 $> ((mj AnnWhere $1:moc $2+                                           :mcc $4:(fst $ unLoc $3)),sL1 $3 (snd $ unLoc $3)) }+        | 'where' vocurly decls close { L (comb2 $1 $3) ((mj AnnWhere $1:(fst $ unLoc $3))+                                          ,sL1 $3 (snd $ unLoc $3)) }++pattern_synonym_sig :: { LSig GhcPs }+        : 'pattern' con_list '::' sigtypedoc+                   {% ams (sLL $1 $> $ PatSynSig noExt (unLoc $2) (mkLHsSigType $4))+                          [mj AnnPattern $1, mu AnnDcolon $3] }++-----------------------------------------------------------------------------+-- Nested declarations++-- Declaration in class bodies+--+decl_cls  :: { LHsDecl GhcPs }+decl_cls  : at_decl_cls                 { $1 }+          | decl                        { $1 }++          -- A 'default' signature used with the generic-programming extension+          | 'default' infixexp '::' sigtypedoc+                    {% do { v <- checkValSigLhs $2+                          ; let err = text "in default signature" <> colon <+>+                                      quotes (ppr $2)+                          ; ams (sLL $1 $> $ SigD noExt $ ClassOpSig noExt True [v] $ mkLHsSigType $4)+                                [mj AnnDefault $1,mu AnnDcolon $3] } }++decls_cls :: { Located ([AddAnn],OrdList (LHsDecl GhcPs)) }  -- Reversed+          : decls_cls ';' decl_cls      {% if isNilOL (snd $ unLoc $1)+                                             then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                                    , unitOL $3))+                                             else ams (lastOL (snd $ unLoc $1)) [mj AnnSemi $2]+                                           >> return (sLL $1 $> (fst $ unLoc $1+                                                                ,(snd $ unLoc $1) `appOL` unitOL $3)) }+          | decls_cls ';'               {% if isNilOL (snd $ unLoc $1)+                                             then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                                                   ,snd $ unLoc $1))+                                             else ams (lastOL (snd $ unLoc $1)) [mj AnnSemi $2]+                                           >> return (sLL $1 $>  (unLoc $1)) }+          | decl_cls                    { sL1 $1 ([], unitOL $1) }+          | {- empty -}                 { noLoc ([],nilOL) }++decllist_cls+        :: { Located ([AddAnn]+                     , OrdList (LHsDecl GhcPs)) }      -- Reversed+        : '{'         decls_cls '}'     { sLL $1 $> (moc $1:mcc $3:(fst $ unLoc $2)+                                             ,snd $ unLoc $2) }+        |     vocurly decls_cls close   { $2 }++-- Class body+--+where_cls :: { Located ([AddAnn]+                       ,(OrdList (LHsDecl GhcPs))) }    -- Reversed+                                -- No implicit parameters+                                -- May have type declarations+        : 'where' decllist_cls          { sLL $1 $> (mj AnnWhere $1:(fst $ unLoc $2)+                                             ,snd $ unLoc $2) }+        | {- empty -}                   { noLoc ([],nilOL) }++-- Declarations in instance bodies+--+decl_inst  :: { Located (OrdList (LHsDecl GhcPs)) }+decl_inst  : at_decl_inst               { sLL $1 $> (unitOL (sL1 $1 (InstD noExt (unLoc $1)))) }+           | decl                       { sLL $1 $> (unitOL $1) }++decls_inst :: { Located ([AddAnn],OrdList (LHsDecl GhcPs)) }   -- Reversed+           : decls_inst ';' decl_inst   {% if isNilOL (snd $ unLoc $1)+                                             then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                                    , unLoc $3))+                                             else ams (lastOL $ snd $ unLoc $1) [mj AnnSemi $2]+                                           >> return+                                            (sLL $1 $> (fst $ unLoc $1+                                                       ,(snd $ unLoc $1) `appOL` unLoc $3)) }+           | decls_inst ';'             {% if isNilOL (snd $ unLoc $1)+                                             then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                                                   ,snd $ unLoc $1))+                                             else ams (lastOL $ snd $ unLoc $1) [mj AnnSemi $2]+                                           >> return (sLL $1 $> (unLoc $1)) }+           | decl_inst                  { sL1 $1 ([],unLoc $1) }+           | {- empty -}                { noLoc ([],nilOL) }++decllist_inst+        :: { Located ([AddAnn]+                     , OrdList (LHsDecl GhcPs)) }      -- Reversed+        : '{'         decls_inst '}'    { sLL $1 $> (moc $1:mcc $3:(fst $ unLoc $2),snd $ unLoc $2) }+        |     vocurly decls_inst close  { L (gl $2) (unLoc $2) }++-- Instance body+--+where_inst :: { Located ([AddAnn]+                        , OrdList (LHsDecl GhcPs)) }   -- Reversed+                                -- No implicit parameters+                                -- May have type declarations+        : 'where' decllist_inst         { sLL $1 $> (mj AnnWhere $1:(fst $ unLoc $2)+                                             ,(snd $ unLoc $2)) }+        | {- empty -}                   { noLoc ([],nilOL) }++-- Declarations in binding groups other than classes and instances+--+decls   :: { Located ([AddAnn],OrdList (LHsDecl GhcPs)) }+        : decls ';' decl    {% if isNilOL (snd $ unLoc $1)+                                 then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                        , unitOL $3))+                                 else do ams (lastOL $ snd $ unLoc $1) [mj AnnSemi $2]+                                           >> return (+                                          let { this = unitOL $3;+                                                rest = snd $ unLoc $1;+                                                these = rest `appOL` this }+                                          in rest `seq` this `seq` these `seq`+                                             (sLL $1 $> (fst $ unLoc $1,these))) }+        | decls ';'          {% if isNilOL (snd $ unLoc $1)+                                  then return (sLL $1 $> ((mj AnnSemi $2:(fst $ unLoc $1)+                                                          ,snd $ unLoc $1)))+                                  else ams (lastOL $ snd $ unLoc $1) [mj AnnSemi $2]+                                           >> return (sLL $1 $> (unLoc $1)) }+        | decl                          { sL1 $1 ([], unitOL $1) }+        | {- empty -}                   { noLoc ([],nilOL) }++decllist :: { Located ([AddAnn],Located (OrdList (LHsDecl GhcPs))) }+        : '{'            decls '}'     { sLL $1 $> (moc $1:mcc $3:(fst $ unLoc $2)+                                                   ,sL1 $2 $ snd $ unLoc $2) }+        |     vocurly    decls close   { L (gl $2) (fst $ unLoc $2,sL1 $2 $ snd $ unLoc $2) }++-- Binding groups other than those of class and instance declarations+--+binds   ::  { Located ([AddAnn],Located (HsLocalBinds GhcPs)) }+                                         -- May have implicit parameters+                                                -- No type declarations+        : decllist          {% do { val_binds <- cvBindGroup (unLoc $ snd $ unLoc $1)+                                  ; return (sL1 $1 (fst $ unLoc $1+                                                    ,sL1 $1 $ HsValBinds noExt val_binds)) } }++        | '{'            dbinds '}'     { sLL $1 $> ([moc $1,mcc $3]+                                             ,sL1 $2 $ HsIPBinds noExt (IPBinds noExt (reverse $ unLoc $2))) }++        |     vocurly    dbinds close   { L (getLoc $2) ([]+                                            ,sL1 $2 $ HsIPBinds noExt (IPBinds noExt (reverse $ unLoc $2))) }+++wherebinds :: { Located ([AddAnn],Located (HsLocalBinds GhcPs)) }+                                                -- May have implicit parameters+                                                -- No type declarations+        : 'where' binds                 { sLL $1 $> (mj AnnWhere $1 : (fst $ unLoc $2)+                                             ,snd $ unLoc $2) }+        | {- empty -}                   { noLoc ([],noLoc emptyLocalBinds) }+++-----------------------------------------------------------------------------+-- Transformation Rules++rules   :: { OrdList (LRuleDecl GhcPs) }+        :  rules ';' rule              {% addAnnotation (oll $1) AnnSemi (gl $2)+                                          >> return ($1 `snocOL` $3) }+        |  rules ';'                   {% addAnnotation (oll $1) AnnSemi (gl $2)+                                          >> return $1 }+        |  rule                        { unitOL $1 }+        |  {- empty -}                 { nilOL }++rule    :: { LRuleDecl GhcPs }+        : STRING rule_activation rule_forall infixexp '=' exp+         {%ams (sLL $1 $> $ (HsRule noExt (L (gl $1) (getSTRINGs $1,getSTRING $1))+                                  ((snd $2) `orElse` AlwaysActive)+                                  (snd $3) $4 $6))+               (mj AnnEqual $5 : (fst $2) ++ (fst $3)) }++-- Rules can be specified to be NeverActive, unlike inline/specialize pragmas+rule_activation :: { ([AddAnn],Maybe Activation) }+        : {- empty -}                           { ([],Nothing) }+        | rule_explicit_activation              { (fst $1,Just (snd $1)) }++rule_explicit_activation :: { ([AddAnn]+                              ,Activation) }  -- In brackets+        : '[' INTEGER ']'       { ([mos $1,mj AnnVal $2,mcs $3]+                                  ,ActiveAfter  (getINTEGERs $2) (fromInteger (il_value (getINTEGER $2)))) }+        | '[' '~' INTEGER ']'   { ([mos $1,mj AnnTilde $2,mj AnnVal $3,mcs $4]+                                  ,ActiveBefore (getINTEGERs $3) (fromInteger (il_value (getINTEGER $3)))) }+        | '[' '~' ']'           { ([mos $1,mj AnnTilde $2,mcs $3]+                                  ,NeverActive) }++rule_forall :: { ([AddAnn],[LRuleBndr GhcPs]) }+        : 'forall' rule_var_list '.'     { ([mu AnnForall $1,mj AnnDot $3],$2) }+        | {- empty -}                    { ([],[]) }++rule_var_list :: { [LRuleBndr GhcPs] }+        : rule_var                              { [$1] }+        | rule_var rule_var_list                { $1 : $2 }++rule_var :: { LRuleBndr GhcPs }+        : varid                         { sLL $1 $> (RuleBndr noExt $1) }+        | '(' varid '::' ctype ')'      {% ams (sLL $1 $> (RuleBndrSig noExt $2+                                                       (mkLHsSigWcType $4)))+                                               [mop $1,mu AnnDcolon $3,mcp $5] }++-----------------------------------------------------------------------------+-- Warnings and deprecations (c.f. rules)++warnings :: { OrdList (LWarnDecl GhcPs) }+        : warnings ';' warning         {% addAnnotation (oll $1) AnnSemi (gl $2)+                                          >> return ($1 `appOL` $3) }+        | warnings ';'                 {% addAnnotation (oll $1) AnnSemi (gl $2)+                                          >> return $1 }+        | warning                      { $1 }+        | {- empty -}                  { nilOL }++-- SUP: TEMPORARY HACK, not checking for `module Foo'+warning :: { OrdList (LWarnDecl GhcPs) }+        : namelist strings+                {% amsu (sLL $1 $> (Warning noExt (unLoc $1) (WarningTxt (noLoc NoSourceText) $ snd $ unLoc $2)))+                     (fst $ unLoc $2) }++deprecations :: { OrdList (LWarnDecl GhcPs) }+        : deprecations ';' deprecation+                                       {% addAnnotation (oll $1) AnnSemi (gl $2)+                                          >> return ($1 `appOL` $3) }+        | deprecations ';'             {% addAnnotation (oll $1) AnnSemi (gl $2)+                                          >> return $1 }+        | deprecation                  { $1 }+        | {- empty -}                  { nilOL }++-- SUP: TEMPORARY HACK, not checking for `module Foo'+deprecation :: { OrdList (LWarnDecl GhcPs) }+        : namelist strings+             {% amsu (sLL $1 $> $ (Warning noExt (unLoc $1) (DeprecatedTxt (noLoc NoSourceText) $ snd $ unLoc $2)))+                     (fst $ unLoc $2) }++strings :: { Located ([AddAnn],[Located StringLiteral]) }+    : STRING { sL1 $1 ([],[L (gl $1) (getStringLiteral $1)]) }+    | '[' stringlist ']' { sLL $1 $> $ ([mos $1,mcs $3],fromOL (unLoc $2)) }++stringlist :: { Located (OrdList (Located StringLiteral)) }+    : stringlist ',' STRING {% addAnnotation (oll $ unLoc $1) AnnComma (gl $2) >>+                               return (sLL $1 $> (unLoc $1 `snocOL`+                                                  (L (gl $3) (getStringLiteral $3)))) }+    | STRING                { sLL $1 $> (unitOL (L (gl $1) (getStringLiteral $1))) }+    | {- empty -}           { noLoc nilOL }++-----------------------------------------------------------------------------+-- Annotations+annotation :: { LHsDecl GhcPs }+    : '{-# ANN' name_var aexp '#-}'      {% ams (sLL $1 $> (AnnD noExt $ HsAnnotation noExt+                                            (getANN_PRAGs $1)+                                            (ValueAnnProvenance $2) $3))+                                            [mo $1,mc $4] }++    | '{-# ANN' 'type' tycon aexp '#-}'  {% ams (sLL $1 $> (AnnD noExt $ HsAnnotation noExt+                                            (getANN_PRAGs $1)+                                            (TypeAnnProvenance $3) $4))+                                            [mo $1,mj AnnType $2,mc $5] }++    | '{-# ANN' 'module' aexp '#-}'      {% ams (sLL $1 $> (AnnD noExt $ HsAnnotation noExt+                                                (getANN_PRAGs $1)+                                                 ModuleAnnProvenance $3))+                                                [mo $1,mj AnnModule $2,mc $4] }+++-----------------------------------------------------------------------------+-- Foreign import and export declarations++fdecl :: { Located ([AddAnn],HsDecl GhcPs) }+fdecl : 'import' callconv safety fspec+               {% mkImport $2 $3 (snd $ unLoc $4) >>= \i ->+                 return (sLL $1 $> (mj AnnImport $1 : (fst $ unLoc $4),i))  }+      | 'import' callconv        fspec+               {% do { d <- mkImport $2 (noLoc PlaySafe) (snd $ unLoc $3);+                    return (sLL $1 $> (mj AnnImport $1 : (fst $ unLoc $3),d)) }}+      | 'export' callconv fspec+               {% mkExport $2 (snd $ unLoc $3) >>= \i ->+                  return (sLL $1 $> (mj AnnExport $1 : (fst $ unLoc $3),i) ) }++callconv :: { Located CCallConv }+          : 'stdcall'                   { sLL $1 $> StdCallConv }+          | 'ccall'                     { sLL $1 $> CCallConv   }+          | 'capi'                      { sLL $1 $> CApiConv    }+          | 'prim'                      { sLL $1 $> PrimCallConv}+          | 'javascript'                { sLL $1 $> JavaScriptCallConv }++safety :: { Located Safety }+        : 'unsafe'                      { sLL $1 $> PlayRisky }+        | 'safe'                        { sLL $1 $> PlaySafe }+        | 'interruptible'               { sLL $1 $> PlayInterruptible }++fspec :: { Located ([AddAnn]+                    ,(Located StringLiteral, Located RdrName, LHsSigType GhcPs)) }+       : STRING var '::' sigtypedoc     { sLL $1 $> ([mu AnnDcolon $3]+                                             ,(L (getLoc $1)+                                                    (getStringLiteral $1), $2, mkLHsSigType $4)) }+       |        var '::' sigtypedoc     { sLL $1 $> ([mu AnnDcolon $2]+                                             ,(noLoc (StringLiteral NoSourceText nilFS), $1, mkLHsSigType $3)) }+         -- if the entity string is missing, it defaults to the empty string;+         -- the meaning of an empty entity string depends on the calling+         -- convention++-----------------------------------------------------------------------------+-- Type signatures++opt_sig :: { ([AddAnn], Maybe (LHsType GhcPs)) }+        : {- empty -}                   { ([],Nothing) }+        | '::' sigtype                  { ([mu AnnDcolon $1],Just $2) }++opt_tyconsig :: { ([AddAnn], Maybe (Located RdrName)) }+             : {- empty -}              { ([], Nothing) }+             | '::' gtycon              { ([mu AnnDcolon $1], Just $2) }++sigtype :: { LHsType GhcPs }+        : ctype                            { $1 }++sigtypedoc :: { LHsType GhcPs }+        : ctypedoc                         { $1 }+++sig_vars :: { Located [Located RdrName] }    -- Returned in reversed order+         : sig_vars ',' var           {% addAnnotation (gl $ head $ unLoc $1)+                                                       AnnComma (gl $2)+                                         >> return (sLL $1 $> ($3 : unLoc $1)) }+         | var                        { sL1 $1 [$1] }++sigtypes1 :: { (OrdList (LHsSigType GhcPs)) }+   : sigtype                 { unitOL (mkLHsSigType $1) }+   | sigtype ',' sigtypes1   {% addAnnotation (gl $1) AnnComma (gl $2)+                                >> return (unitOL (mkLHsSigType $1) `appOL` $3) }++-----------------------------------------------------------------------------+-- Types++strict_mark :: { Located ([AddAnn],HsSrcBang) }+        : strictness { sL1 $1 (let (a, str) = unLoc $1 in (a, HsSrcBang NoSourceText NoSrcUnpack str)) }+        | unpackedness { sL1 $1 (let (a, prag, unpk) = unLoc $1 in (a, HsSrcBang prag unpk NoSrcStrict)) }+        | unpackedness strictness { sLL $1 $> (let { (a, prag, unpk) = unLoc $1+                                                   ; (a', str) = unLoc $2 }+                                                in (a ++ a', HsSrcBang prag unpk str)) }+        -- Although UNPACK with no '!' without StrictData and UNPACK with '~' are illegal,+        -- we get a better error message if we parse them here++strictness :: { Located ([AddAnn], SrcStrictness) }+        : '!' { sL1 $1 ([mj AnnBang $1], SrcStrict) }+        | '~' { sL1 $1 ([mj AnnTilde $1], SrcLazy) }++unpackedness :: { Located ([AddAnn], SourceText, SrcUnpackedness) }+        : '{-# UNPACK' '#-}'   { sLL $1 $> ([mo $1, mc $2], getUNPACK_PRAGs $1, SrcUnpack) }+        | '{-# NOUNPACK' '#-}' { sLL $1 $> ([mo $1, mc $2], getNOUNPACK_PRAGs $1, SrcNoUnpack) }++-- A ctype is a for-all type+ctype   :: { LHsType GhcPs }+        : 'forall' tv_bndrs '.' ctype   {% hintExplicitForall (getLoc $1) >>+                                           ams (sLL $1 $> $+                                                HsForAllTy { hst_bndrs = $2+                                                           , hst_xforall = noExt+                                                           , hst_body = $4 })+                                               [mu AnnForall $1, mj AnnDot $3] }+        | context '=>' ctype          {% addAnnotation (gl $1) (toUnicodeAnn AnnDarrow $2) (gl $2)+                                         >> return (sLL $1 $> $+                                            HsQualTy { hst_ctxt = $1+                                                     , hst_xqual = noExt+                                                     , hst_body = $3 }) }+        | ipvar '::' type             {% ams (sLL $1 $> (HsIParamTy noExt $1 $3))+                                             [mu AnnDcolon $2] }+        | type                        { $1 }++----------------------+-- Notes for 'ctypedoc'+-- It would have been nice to simplify the grammar by unifying `ctype` and+-- ctypedoc` into one production, allowing comments on types everywhere (and+-- rejecting them after parsing, where necessary).  This is however not possible+-- since it leads to ambiguity. The reason is the support for comments on record+-- fields:+--         data R = R { field :: Int -- ^ comment on the field }+-- If we allow comments on types here, it's not clear if the comment applies+-- to 'field' or to 'Int'. So we must use `ctype` to describe the type.++ctypedoc :: { LHsType GhcPs }+        : 'forall' tv_bndrs '.' ctypedoc {% hintExplicitForall (getLoc $1) >>+                                            ams (sLL $1 $> $+                                                 HsForAllTy { hst_bndrs = $2+                                                            , hst_xforall = noExt+                                                            , hst_body = $4 })+                                                [mu AnnForall $1,mj AnnDot $3] }+        | context '=>' ctypedoc       {% addAnnotation (gl $1) (toUnicodeAnn AnnDarrow $2) (gl $2)+                                         >> return (sLL $1 $> $+                                            HsQualTy { hst_ctxt = $1+                                                     , hst_xqual = noExt+                                                     , hst_body = $3 }) }+        | ipvar '::' type             {% ams (sLL $1 $> (HsIParamTy noExt $1 $3))+                                             [mu AnnDcolon $2] }+        | typedoc                     { $1 }++----------------------+-- Notes for 'context'+-- We parse a context as a btype so that we don't get reduce/reduce+-- errors in ctype.  The basic problem is that+--      (Eq a, Ord a)+-- looks so much like a tuple type.  We can't tell until we find the =>++-- We have the t1 ~ t2 form both in 'context' and in type,+-- to permit an individual equational constraint without parenthesis.+-- Thus for some reason we allow    f :: a~b => blah+-- but not                          f :: ?x::Int => blah+-- See Note [Parsing ~]+context :: { LHsContext GhcPs }+        :  btype                        {% do { (anns,ctx) <- checkContext $1+                                                ; if null (unLoc ctx)+                                                   then addAnnotation (gl $1) AnnUnit (gl $1)+                                                   else return ()+                                                ; ams ctx anns+                                                } }++context_no_ops :: { LHsContext GhcPs }+        : btype_no_ops                 {% do { ty <- splitTilde (reverse (unLoc $1))+                                             ; (anns,ctx) <- checkContext ty+                                             ; if null (unLoc ctx)+                                                   then addAnnotation (gl ty) AnnUnit (gl ty)+                                                   else return ()+                                             ; ams ctx anns+                                             } }++{- Note [GADT decl discards annotations]+~~~~~~~~~~~~~~~~~~~~~+The type production for++    btype `->`         ctypedoc+    btype docprev `->` ctypedoc++add the AnnRarrow annotation twice, in different places.++This is because if the type is processed as usual, it belongs on the annotations+for the type as a whole.++But if the type is passed to mkGadtDecl, it discards the top level SrcSpan, and+the top-level annotation will be disconnected. Hence for this specific case it+is connected to the first type too.+-}++type :: { LHsType GhcPs }+        : btype                        { $1 }+        | btype '->' ctype             {% ams $1 [mu AnnRarrow $2] -- See note [GADT decl discards annotations]+                                       >> ams (sLL $1 $> $ HsFunTy noExt $1 $3)+                                              [mu AnnRarrow $2] }+++typedoc :: { LHsType GhcPs }+        : btype                          { $1 }+        | btype docprev                  { sLL $1 $> $ HsDocTy noExt $1 $2 }+        | docnext btype                  { sLL $1 $> $ HsDocTy noExt $2 $1 }+        | btype '->'     ctypedoc        {% ams $1 [mu AnnRarrow $2] -- See note [GADT decl discards annotations]+                                         >> ams (sLL $1 $> $ HsFunTy noExt $1 $3)+                                                [mu AnnRarrow $2] }+        | btype docprev '->' ctypedoc    {% ams $1 [mu AnnRarrow $3] -- See note [GADT decl discards annotations]+                                         >> ams (sLL $1 $> $+                                                 HsFunTy noExt (L (comb2 $1 $2)+                                                            (HsDocTy noExt $1 $2))+                                                         $4)+                                                [mu AnnRarrow $3] }+        | docnext btype '->' ctypedoc    {% ams $2 [mu AnnRarrow $3] -- See note [GADT decl discards annotations]+                                         >> ams (sLL $1 $> $+                                                 HsFunTy noExt (L (comb2 $1 $2)+                                                            (HsDocTy noExt $2 $1))+                                                         $4)+                                                [mu AnnRarrow $3] }++++-- See Note [Parsing ~]+btype :: { LHsType GhcPs }+      : tyapps                      {%  mergeOps (unLoc $1) }++-- Used for parsing Haskell98-style data constructors,+-- in order to forbid the blasphemous+-- > data Foo = Int :+ Char :* Bool+-- See also Note [Parsing data constructors is hard] in RdrHsSyn+btype_no_ops :: { Located [LHsType GhcPs] } -- NB: This list is reversed+        : atype_docs                    { sL1 $1 [$1] }+        | btype_no_ops atype_docs       { sLL $1 $> $ $2 : (unLoc $1) }++tyapps :: { Located [Located TyEl] } -- NB: This list is reversed+        : tyapp                         { sL1 $1 [$1] }+        | tyapps tyapp                  { sLL $1 $> $ $2 : (unLoc $1) }++tyapp :: { Located TyEl }+        : atype                         { sL1 $1 $ TyElOpd (unLoc $1) }+        | qtyconop                      { sL1 $1 $ TyElOpr (unLoc $1) }+        | tyvarop                       { sL1 $1 $ TyElOpr (unLoc $1) }+        | SIMPLEQUOTE qconop            {% ams (sLL $1 $> $ TyElOpr (unLoc $2))+                                               [mj AnnSimpleQuote $1,mj AnnVal $2] }+        | SIMPLEQUOTE varop             {% ams (sLL $1 $> $ TyElOpr (unLoc $2))+                                               [mj AnnSimpleQuote $1,mj AnnVal $2] }++atype_docs :: { LHsType GhcPs }+        : atype docprev                 { sLL $1 $> $ HsDocTy noExt $1 $2 }+        | atype                         { $1 }++atype :: { LHsType GhcPs }+        : ntgtycon                       { sL1 $1 (HsTyVar noExt NotPromoted $1) }      -- Not including unit tuples+        | tyvar                          { sL1 $1 (HsTyVar noExt NotPromoted $1) }      -- (See Note [Unit tuples])+        | '*'                            {% do { warnStarIsType (getLoc $1)+                                               ; return $ sL1 $1 (HsStarTy noExt (isUnicode $1)) } }+        | strict_mark atype              {% ams (sLL $1 $> (HsBangTy noExt (snd $ unLoc $1) $2))+                                                (fst $ unLoc $1) }  -- Constructor sigs only+        | '{' fielddecls '}'             {% amms (checkRecordSyntax+                                                    (sLL $1 $> $ HsRecTy noExt $2))+                                                        -- Constructor sigs only+                                                 [moc $1,mcc $3] }+        | '(' ')'                        {% ams (sLL $1 $> $ HsTupleTy noExt+                                                    HsBoxedOrConstraintTuple [])+                                                [mop $1,mcp $2] }+        | '(' ctype ',' comma_types1 ')' {% addAnnotation (gl $2) AnnComma+                                                          (gl $3) >>+                                            ams (sLL $1 $> $ HsTupleTy noExt++                                             HsBoxedOrConstraintTuple ($2 : $4))+                                                [mop $1,mcp $5] }+        | '(#' '#)'                   {% ams (sLL $1 $> $ HsTupleTy noExt HsUnboxedTuple [])+                                             [mo $1,mc $2] }+        | '(#' comma_types1 '#)'      {% ams (sLL $1 $> $ HsTupleTy noExt HsUnboxedTuple $2)+                                             [mo $1,mc $3] }+        | '(#' bar_types2 '#)'        {% ams (sLL $1 $> $ HsSumTy noExt $2)+                                             [mo $1,mc $3] }+        | '[' ctype ']'               {% ams (sLL $1 $> $ HsListTy  noExt $2) [mos $1,mcs $3] }+        | '(' ctype ')'               {% ams (sLL $1 $> $ HsParTy   noExt $2) [mop $1,mcp $3] }+        | '(' ctype '::' kind ')'     {% ams (sLL $1 $> $ HsKindSig noExt $2 $4)+                                             [mop $1,mu AnnDcolon $3,mcp $5] }+        | quasiquote                  { sL1 $1 (HsSpliceTy noExt (unLoc $1) ) }+        | '$(' exp ')'                {% ams (sLL $1 $> $ mkHsSpliceTy HasParens $2)+                                             [mj AnnOpenPE $1,mj AnnCloseP $3] }+        | TH_ID_SPLICE                {%ams (sLL $1 $> $ mkHsSpliceTy HasDollar $ sL1 $1 $ HsVar noExt $+                                             (sL1 $1 (mkUnqual varName (getTH_ID_SPLICE $1))))+                                             [mj AnnThIdSplice $1] }+                                      -- see Note [Promotion] for the followings+        | SIMPLEQUOTE qcon_nowiredlist {% ams (sLL $1 $> $ HsTyVar noExt Promoted $2) [mj AnnSimpleQuote $1,mj AnnName $2] }+        | SIMPLEQUOTE  '(' ctype ',' comma_types1 ')'+                             {% addAnnotation (gl $3) AnnComma (gl $4) >>+                                ams (sLL $1 $> $ HsExplicitTupleTy noExt ($3 : $5))+                                    [mj AnnSimpleQuote $1,mop $2,mcp $6] }+        | SIMPLEQUOTE  '[' comma_types0 ']'     {% ams (sLL $1 $> $ HsExplicitListTy noExt Promoted $3)+                                                       [mj AnnSimpleQuote $1,mos $2,mcs $4] }+        | SIMPLEQUOTE var                       {% ams (sLL $1 $> $ HsTyVar noExt Promoted $2)+                                                       [mj AnnSimpleQuote $1,mj AnnName $2] }++        -- Two or more [ty, ty, ty] must be a promoted list type, just as+        -- if you had written '[ty, ty, ty]+        -- (One means a list type, zero means the list type constructor,+        -- so you have to quote those.)+        | '[' ctype ',' comma_types1 ']'  {% addAnnotation (gl $2) AnnComma+                                                           (gl $3) >>+                                             ams (sLL $1 $> $ HsExplicitListTy noExt NotPromoted ($2 : $4))+                                                 [mos $1,mcs $5] }+        | INTEGER              { sLL $1 $> $ HsTyLit noExt $ HsNumTy (getINTEGERs $1)+                                                           (il_value (getINTEGER $1)) }+        | STRING               { sLL $1 $> $ HsTyLit noExt $ HsStrTy (getSTRINGs $1)+                                                                     (getSTRING  $1) }+        | '_'                  { sL1 $1 $ mkAnonWildCardTy }++-- An inst_type is what occurs in the head of an instance decl+--      e.g.  (Foo a, Gaz b) => Wibble a b+-- It's kept as a single type for convenience.+inst_type :: { LHsSigType GhcPs }+        : sigtype                       { mkLHsSigType $1 }++deriv_types :: { [LHsSigType GhcPs] }+        : typedoc                       { [mkLHsSigType $1] }++        | typedoc ',' deriv_types       {% addAnnotation (gl $1) AnnComma (gl $2)+                                           >> return (mkLHsSigType $1 : $3) }++comma_types0  :: { [LHsType GhcPs] }  -- Zero or more:  ty,ty,ty+        : comma_types1                  { $1 }+        | {- empty -}                   { [] }++comma_types1    :: { [LHsType GhcPs] }  -- One or more:  ty,ty,ty+        : ctype                        { [$1] }+        | ctype  ',' comma_types1      {% addAnnotation (gl $1) AnnComma (gl $2)+                                          >> return ($1 : $3) }++bar_types2    :: { [LHsType GhcPs] }  -- Two or more:  ty|ty|ty+        : ctype  '|' ctype             {% addAnnotation (gl $1) AnnVbar (gl $2)+                                          >> return [$1,$3] }+        | ctype  '|' bar_types2        {% addAnnotation (gl $1) AnnVbar (gl $2)+                                          >> return ($1 : $3) }++tv_bndrs :: { [LHsTyVarBndr GhcPs] }+         : tv_bndr tv_bndrs             { $1 : $2 }+         | {- empty -}                  { [] }++tv_bndr :: { LHsTyVarBndr GhcPs }+        : tyvar                         { sL1 $1 (UserTyVar noExt $1) }+        | '(' tyvar '::' kind ')'       {% ams (sLL $1 $>  (KindedTyVar noExt $2 $4))+                                               [mop $1,mu AnnDcolon $3+                                               ,mcp $5] }++fds :: { Located ([AddAnn],[Located (FunDep (Located RdrName))]) }+        : {- empty -}                   { noLoc ([],[]) }+        | '|' fds1                      { (sLL $1 $> ([mj AnnVbar $1]+                                                 ,reverse (unLoc $2))) }++fds1 :: { Located [Located (FunDep (Located RdrName))] }+        : fds1 ',' fd   {% addAnnotation (gl $ head $ unLoc $1) AnnComma (gl $2)+                           >> return (sLL $1 $> ($3 : unLoc $1)) }+        | fd            { sL1 $1 [$1] }++fd :: { Located (FunDep (Located RdrName)) }+        : varids0 '->' varids0  {% ams (L (comb3 $1 $2 $3)+                                       (reverse (unLoc $1), reverse (unLoc $3)))+                                       [mu AnnRarrow $2] }++varids0 :: { Located [Located RdrName] }+        : {- empty -}                   { noLoc [] }+        | varids0 tyvar                 { sLL $1 $> ($2 : unLoc $1) }++{-+Note [Parsing ~]+~~~~~~~~~~~~~~~~++Due to parsing conflicts between laziness annotations in data type+declarations (see strict_mark) and equality types ~'s are always+parsed as laziness annotations, and turned into HsOpTy's in the+correct places using RdrHsSyn.splitTilde.++Since strict_mark is parsed as part of atype which is part of type,+typedoc and context (where HsEqTy previously appeared) it made most+sense and was simplest to parse ~ as part of strict_mark and later+turn them into HsOpTy's.++-}+++-----------------------------------------------------------------------------+-- Kinds++kind :: { LHsKind GhcPs }+        : ctype                  { $1 }++{- Note [Promotion]+   ~~~~~~~~~~~~~~~~++- Syntax of promoted qualified names+We write 'Nat.Zero instead of Nat.'Zero when dealing with qualified+names. Moreover ticks are only allowed in types, not in kinds, for a+few reasons:+  1. we don't need quotes since we cannot define names in kinds+  2. if one day we merge types and kinds, tick would mean look in DataName+  3. we don't have a kind namespace anyway++- Name resolution+When the user write Zero instead of 'Zero in types, we parse it a+HsTyVar ("Zero", TcClsName) instead of HsTyVar ("Zero", DataName). We+deal with this in the renamer. If a HsTyVar ("Zero", TcClsName) is not+bounded in the type level, then we look for it in the term level (we+change its namespace to DataName, see Note [Demotion] in OccName). And+both become a HsTyVar ("Zero", DataName) after the renamer.++-}+++-----------------------------------------------------------------------------+-- Datatype declarations++gadt_constrlist :: { Located ([AddAnn]+                          ,[LConDecl GhcPs]) } -- Returned in order++        : 'where' '{'        gadt_constrs '}'    {% checkEmptyGADTs $+                                                      L (comb2 $1 $3)+                                                        ([mj AnnWhere $1+                                                         ,moc $2+                                                         ,mcc $4]+                                                        , unLoc $3) }+        | 'where' vocurly    gadt_constrs close  {% checkEmptyGADTs $+                                                      L (comb2 $1 $3)+                                                        ([mj AnnWhere $1]+                                                        , unLoc $3) }+        | {- empty -}                            { noLoc ([],[]) }++gadt_constrs :: { Located [LConDecl GhcPs] }+        : gadt_constr_with_doc ';' gadt_constrs+                  {% addAnnotation (gl $1) AnnSemi (gl $2)+                     >> return (L (comb2 $1 $3) ($1 : unLoc $3)) }+        | gadt_constr_with_doc          { L (gl $1) [$1] }+        | {- empty -}                   { noLoc [] }++-- We allow the following forms:+--      C :: Eq a => a -> T a+--      C :: forall a. Eq a => !a -> T a+--      D { x,y :: a } :: T a+--      forall a. Eq a => D { x,y :: a } :: T a++gadt_constr_with_doc :: { LConDecl GhcPs }+gadt_constr_with_doc+        : maybe_docnext ';' gadt_constr+                {% return $ addConDoc $3 $1 }+        | gadt_constr+                {% return $1 }++gadt_constr :: { LConDecl GhcPs }+    -- see Note [Difference in parsing GADT and data constructors]+    -- Returns a list because of:   C,D :: ty+        : con_list '::' sigtypedoc+                {% let (gadt,anns) = mkGadtDecl (unLoc $1) $3+                   in ams (sLL $1 $> gadt)+                       (mu AnnDcolon $2:anns) }++{- Note [Difference in parsing GADT and data constructors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+GADT constructors have simpler syntax than usual data constructors:+in GADTs, types cannot occur to the left of '::', so they cannot be mixed+with constructor names (see Note [Parsing data constructors is hard]).++Due to simplified syntax, GADT constructor names (left-hand side of '::')+use simpler grammar production than usual data constructor names. As a+consequence, GADT constructor names are resticted (names like '(*)' are+allowed in usual data constructors, but not in GADTs).+-}++constrs :: { Located ([AddAnn],[LConDecl GhcPs]) }+        : maybe_docnext '=' constrs1    { L (comb2 $2 $3) ([mj AnnEqual $2]+                                                     ,addConDocs (unLoc $3) $1)}++constrs1 :: { Located [LConDecl GhcPs] }+        : constrs1 maybe_docnext '|' maybe_docprev constr+            {% addAnnotation (gl $ head $ unLoc $1) AnnVbar (gl $3)+               >> return (sLL $1 $> (addConDoc $5 $2 : addConDocFirst (unLoc $1) $4)) }+        | constr                                          { sL1 $1 [$1] }++constr :: { LConDecl GhcPs }+        : maybe_docnext forall context_no_ops '=>' constr_stuff+                {% ams (let (con,details,doc_prev) = unLoc $5 in+                  addConDoc (L (comb4 $2 $3 $4 $5) (mkConDeclH98 con+                                                       (snd $ unLoc $2)+                                                       (Just $3)+                                                       details))+                            ($1 `mplus` doc_prev))+                        (mu AnnDarrow $4:(fst $ unLoc $2)) }+        | maybe_docnext forall constr_stuff+                {% ams ( let (con,details,doc_prev) = unLoc $3 in+                  addConDoc (L (comb2 $2 $3) (mkConDeclH98 con+                                                      (snd $ unLoc $2)+                                                      Nothing   -- No context+                                                      details))+                            ($1 `mplus` doc_prev))+                       (fst $ unLoc $2) }++forall :: { Located ([AddAnn], Maybe [LHsTyVarBndr GhcPs]) }+        : 'forall' tv_bndrs '.'       { sLL $1 $> ([mu AnnForall $1,mj AnnDot $3], Just $2) }+        | {- empty -}                 { noLoc ([], Nothing) }++constr_stuff :: { Located (Located RdrName, HsConDeclDetails GhcPs, Maybe LHsDocString) }+    -- See Note [Parsing data constructors is hard] in RdrHsSyn+        : btype_no_ops                     {% do { c <- splitCon (unLoc $1)+                                                 ; return $ sL1 $1 c } }+        | btype_no_ops conop maybe_docprev btype_no_ops+            {% do { lhs <- splitTilde (reverse (unLoc $1))+                  ; (_, ds_l) <- checkInfixConstr lhs+                  ; let rhs1 = foldl1 mkHsAppTy (reverse (unLoc $4))+                  ; (rhs, ds_r) <- checkInfixConstr rhs1+                  ; return $ if isJust (ds_l `mplus` $3)+                               then sLL $1 $> ($2, InfixCon lhs rhs1, $3)+                               else sLL $1 $> ($2, InfixCon lhs rhs, ds_r) } }++fielddecls :: { [LConDeclField GhcPs] }+        : {- empty -}     { [] }+        | fielddecls1     { $1 }++fielddecls1 :: { [LConDeclField GhcPs] }+        : fielddecl maybe_docnext ',' maybe_docprev fielddecls1+            {% addAnnotation (gl $1) AnnComma (gl $3) >>+               return ((addFieldDoc $1 $4) : addFieldDocs $5 $2) }+        | fielddecl   { [$1] }++fielddecl :: { LConDeclField GhcPs }+                                              -- A list because of   f,g :: Int+        : maybe_docnext sig_vars '::' ctype maybe_docprev+            {% ams (L (comb2 $2 $4)+                      (ConDeclField noExt (reverse (map (\ln@(L l n) -> L l $ FieldOcc noExt ln) (unLoc $2))) $4 ($1 `mplus` $5)))+                   [mu AnnDcolon $3] }++-- Reversed!+maybe_derivings :: { HsDeriving GhcPs }+        : {- empty -}             { noLoc [] }+        | derivings               { $1 }++-- A list of one or more deriving clauses at the end of a datatype+derivings :: { HsDeriving GhcPs }+        : derivings deriving      { sLL $1 $> $ $2 : unLoc $1 }+        | deriving                { sLL $1 $> [$1] }++-- The outer Located is just to allow the caller to+-- know the rightmost extremity of the 'deriving' clause+deriving :: { LHsDerivingClause GhcPs }+        : 'deriving' deriv_clause_types+              {% let { full_loc = comb2 $1 $> }+                 in ams (L full_loc $ HsDerivingClause noExt Nothing $2)+                        [mj AnnDeriving $1] }++        | 'deriving' deriv_strategy_no_via deriv_clause_types+              {% let { full_loc = comb2 $1 $> }+                 in ams (L full_loc $ HsDerivingClause noExt (Just $2) $3)+                        [mj AnnDeriving $1] }++        | 'deriving' deriv_clause_types deriv_strategy_via+              {% let { full_loc = comb2 $1 $> }+                 in ams (L full_loc $ HsDerivingClause noExt (Just $3) $2)+                        [mj AnnDeriving $1] }++deriv_clause_types :: { Located [LHsSigType GhcPs] }+        : qtycondoc           { sL1 $1 [mkLHsSigType $1] }+        | '(' ')'             {% ams (sLL $1 $> [])+                                     [mop $1,mcp $2] }+        | '(' deriv_types ')' {% ams (sLL $1 $> $2)+                                     [mop $1,mcp $3] }+             -- Glasgow extension: allow partial+             -- applications in derivings++-----------------------------------------------------------------------------+-- Value definitions++{- Note [Declaration/signature overlap]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+There's an awkward overlap with a type signature.  Consider+        f :: Int -> Int = ...rhs...+   Then we can't tell whether it's a type signature or a value+   definition with a result signature until we see the '='.+   So we have to inline enough to postpone reductions until we know.+-}++{-+  ATTENTION: Dirty Hackery Ahead! If the second alternative of vars is var+  instead of qvar, we get another shift/reduce-conflict. Consider the+  following programs:++     { (^^) :: Int->Int ; }          Type signature; only var allowed++     { (^^) :: Int->Int = ... ; }    Value defn with result signature;+                                     qvar allowed (because of instance decls)++  We can't tell whether to reduce var to qvar until after we've read the signatures.+-}++docdecl :: { LHsDecl GhcPs }+        : docdecld { sL1 $1 (DocD noExt (unLoc $1)) }++docdecld :: { LDocDecl }+        : docnext                               { sL1 $1 (DocCommentNext (unLoc $1)) }+        | docprev                               { sL1 $1 (DocCommentPrev (unLoc $1)) }+        | docnamed                              { sL1 $1 (case (unLoc $1) of (n, doc) -> DocCommentNamed n doc) }+        | docsection                            { sL1 $1 (case (unLoc $1) of (n, doc) -> DocGroup n doc) }++decl_no_th :: { LHsDecl GhcPs }+        : sigdecl               { $1 }++        | '!' aexp rhs          {% do { let { e = sLL $1 $2 (SectionR noExt (sL1 $1 (HsVar noExt (sL1 $1 bang_RDR))) $2)+                                            ; l = comb2 $1 $> };+                                        (ann, r) <- checkValDef empty SrcStrict e Nothing $3 ;+                                        hintBangPat (comb2 $1 $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 _ _ _) ->+                                                ams (L l ()) [mj AnnFunId n] >> return () ;+                                          (PatBind _ (L lh _lhs) _rhs _) ->+                                                ams (L lh ()) [] >> return () } ;++                                        _ <- ams (L l ()) (ann ++ fst (unLoc $3) ++ [mj AnnBang $1]) ;+                                        return $! (sL l $ ValD noExt r) } }++        | infixexp_top opt_sig rhs  {% do { (ann,r) <- checkValDef empty NoSrcStrict $1 (snd $2) $3;+                                        let { l = comb2 $1 $> };+                                        -- 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 _ _ _) ->+                                                ams (L l ()) (mj AnnFunId n:(fst $2)) >> return () ;+                                          (PatBind _ (L lh _lhs) _rhs _) ->+                                                ams (L lh ()) (fst $2) >> return () } ;+                                        _ <- ams (L l ()) (ann ++ (fst $ unLoc $3));+                                        return $! (sL l $ ValD noExt r) } }+        | pattern_synonym_decl  { $1 }+        | docdecl               { $1 }++decl    :: { LHsDecl GhcPs }+        : decl_no_th            { $1 }++        -- Why do we only allow naked declaration splices in top-level+        -- declarations and not here? Short answer: because readFail009+        -- fails terribly with a panic in cvBindsAndSigs otherwise.+        | splice_exp            { sLL $1 $> $ mkSpliceDecl $1 }++rhs     :: { Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)) }+        : '=' exp wherebinds    { sL (comb3 $1 $2 $3)+                                    ((mj AnnEqual $1 : (fst $ unLoc $3))+                                    ,GRHSs noExt (unguardedRHS (comb3 $1 $2 $3) $2)+                                   (snd $ unLoc $3)) }+        | gdrhs wherebinds      { sLL $1 $>  (fst $ unLoc $2+                                    ,GRHSs noExt (reverse (unLoc $1))+                                                    (snd $ unLoc $2)) }++gdrhs :: { Located [LGRHS GhcPs (LHsExpr GhcPs)] }+        : gdrhs gdrh            { sLL $1 $> ($2 : unLoc $1) }+        | gdrh                  { sL1 $1 [$1] }++gdrh :: { LGRHS GhcPs (LHsExpr GhcPs) }+        : '|' guardquals '=' exp  {% ams (sL (comb2 $1 $>) $ GRHS noExt (unLoc $2) $4)+                                         [mj AnnVbar $1,mj AnnEqual $3] }++sigdecl :: { LHsDecl GhcPs }+        :+        -- See Note [Declaration/signature overlap] for why we need infixexp here+          infixexp_top '::' sigtypedoc+                        {% do v <- checkValSigLhs $1+                        ; _ <- ams (sLL $1 $> ()) [mu AnnDcolon $2]+                        ; return (sLL $1 $> $ SigD noExt $+                                  TypeSig noExt [v] (mkLHsSigWcType $3)) }++        | var ',' sig_vars '::' sigtypedoc+           {% do { let sig = TypeSig noExt ($1 : reverse (unLoc $3))+                                     (mkLHsSigWcType $5)+                 ; addAnnotation (gl $1) AnnComma (gl $2)+                 ; ams ( sLL $1 $> $ SigD noExt sig )+                       [mu AnnDcolon $4] } }++        | infix prec ops+              {% ams (sLL $1 $> $ SigD noExt+                        (FixSig noExt (FixitySig noExt (fromOL $ unLoc $3)+                                (Fixity (fst $ unLoc $2) (snd $ unLoc $2) (unLoc $1)))))+                     [mj AnnInfix $1,mj AnnVal $2] }++        | pattern_synonym_sig   { sLL $1 $> . SigD noExt . unLoc $ $1 }++        | '{-# COMPLETE' con_list opt_tyconsig  '#-}'+                {% let (dcolon, tc) = $3+                   in ams+                       (sLL $1 $>+                         (SigD noExt (CompleteMatchSig noExt (getCOMPLETE_PRAGs $1) $2 tc)))+                    ([ mo $1 ] ++ dcolon ++ [mc $4]) }++        -- This rule is for both INLINE and INLINABLE pragmas+        | '{-# INLINE' activation qvar '#-}'+                {% ams ((sLL $1 $> $ SigD noExt (InlineSig noExt $3+                            (mkInlinePragma (getINLINE_PRAGs $1) (getINLINE $1)+                                            (snd $2)))))+                       ((mo $1:fst $2) ++ [mc $4]) }++        | '{-# SCC' qvar '#-}'+          {% ams (sLL $1 $> (SigD noExt (SCCFunSig noExt (getSCC_PRAGs $1) $2 Nothing)))+                 [mo $1, mc $3] }++        | '{-# SCC' qvar STRING '#-}'+          {% do { scc <- getSCC $3+                ; let str_lit = StringLiteral (getSTRINGs $3) scc+                ; ams (sLL $1 $> (SigD noExt (SCCFunSig noExt (getSCC_PRAGs $1) $2 (Just ( sL1 $3 str_lit)))))+                      [mo $1, mc $4] } }++        | '{-# SPECIALISE' activation qvar '::' sigtypes1 '#-}'+             {% ams (+                 let inl_prag = mkInlinePragma (getSPEC_PRAGs $1)+                                             (NoUserInline, FunLike) (snd $2)+                  in sLL $1 $> $ SigD noExt (SpecSig noExt $3 (fromOL $5) inl_prag))+                    (mo $1:mu AnnDcolon $4:mc $6:(fst $2)) }++        | '{-# SPECIALISE_INLINE' activation qvar '::' sigtypes1 '#-}'+             {% ams (sLL $1 $> $ SigD noExt (SpecSig noExt $3 (fromOL $5)+                               (mkInlinePragma (getSPEC_INLINE_PRAGs $1)+                                               (getSPEC_INLINE $1) (snd $2))))+                       (mo $1:mu AnnDcolon $4:mc $6:(fst $2)) }++        | '{-# SPECIALISE' 'instance' inst_type '#-}'+                {% ams (sLL $1 $>+                                  $ SigD noExt (SpecInstSig noExt (getSPEC_PRAGs $1) $3))+                       [mo $1,mj AnnInstance $2,mc $4] }++        -- A minimal complete definition+        | '{-# MINIMAL' name_boolformula_opt '#-}'+            {% ams (sLL $1 $> $ SigD noExt (MinimalSig noExt (getMINIMAL_PRAGs $1) $2))+                   [mo $1,mc $3] }++activation :: { ([AddAnn],Maybe Activation) }+        : {- empty -}                           { ([],Nothing) }+        | explicit_activation                   { (fst $1,Just (snd $1)) }++explicit_activation :: { ([AddAnn],Activation) }  -- In brackets+        : '[' INTEGER ']'       { ([mj AnnOpenS $1,mj AnnVal $2,mj AnnCloseS $3]+                                  ,ActiveAfter  (getINTEGERs $2) (fromInteger (il_value (getINTEGER $2)))) }+        | '[' '~' INTEGER ']'   { ([mj AnnOpenS $1,mj AnnTilde $2,mj AnnVal $3+                                                 ,mj AnnCloseS $4]+                                  ,ActiveBefore (getINTEGERs $3) (fromInteger (il_value (getINTEGER $3)))) }++-----------------------------------------------------------------------------+-- Expressions++quasiquote :: { Located (HsSplice GhcPs) }+        : TH_QUASIQUOTE   { let { loc = getLoc $1+                                ; ITquasiQuote (quoter, quote, quoteSpan) = unLoc $1+                                ; quoterId = mkUnqual varName quoter }+                            in sL1 $1 (mkHsQuasiQuote quoterId (RealSrcSpan quoteSpan) quote) }+        | TH_QQUASIQUOTE  { let { loc = getLoc $1+                                ; ITqQuasiQuote (qual, quoter, quote, quoteSpan) = unLoc $1+                                ; quoterId = mkQual varName (qual, quoter) }+                            in sL (getLoc $1) (mkHsQuasiQuote quoterId (RealSrcSpan quoteSpan) quote) }++exp   :: { LHsExpr GhcPs }+        : infixexp '::' sigtype {% ams (sLL $1 $> $ ExprWithTySig (mkLHsSigWcType $3) $1)+                                       [mu AnnDcolon $2] }+        | infixexp '-<' exp     {% ams (sLL $1 $> $ HsArrApp noExt $1 $3+                                                        HsFirstOrderApp True)+                                       [mu Annlarrowtail $2] }+        | infixexp '>-' exp     {% ams (sLL $1 $> $ HsArrApp noExt $3 $1+                                                      HsFirstOrderApp False)+                                       [mu Annrarrowtail $2] }+        | infixexp '-<<' exp    {% ams (sLL $1 $> $ HsArrApp noExt $1 $3+                                                      HsHigherOrderApp True)+                                       [mu AnnLarrowtail $2] }+        | infixexp '>>-' exp    {% ams (sLL $1 $> $ HsArrApp noExt $3 $1+                                                      HsHigherOrderApp False)+                                       [mu AnnRarrowtail $2] }+        | infixexp              { $1 }++infixexp :: { LHsExpr GhcPs }+        : exp10 { $1 }+        | infixexp qop exp10  {% ams (sLL $1 $> (OpApp noExt $1 $2 $3))+                                     [mj AnnVal $2] }+                 -- AnnVal annotation for NPlusKPat, which discards the operator++infixexp_top :: { LHsExpr GhcPs }+        : exp10_top               { $1 }+        | infixexp_top qop exp10_top+                                  {% ams (sLL $1 $> (OpApp noExt $1 $2 $3))+                                         [mj AnnVal $2] }+++exp10_top :: { LHsExpr GhcPs }+        : '-' fexp                      {% ams (sLL $1 $> $ NegApp noExt $2 noSyntaxExpr)+                                               [mj AnnMinus $1] }+++        | hpc_annot exp        {% ams (sLL $1 $> $ HsTickPragma noExt (snd $ fst $ fst $ unLoc $1)+                                                                (snd $ fst $ unLoc $1) (snd $ unLoc $1) $2)+                                      (fst $ fst $ fst $ unLoc $1) }++        | '{-# CORE' STRING '#-}' exp  {% ams (sLL $1 $> $ HsCoreAnn noExt (getCORE_PRAGs $1) (getStringLiteral $2) $4)+                                              [mo $1,mj AnnVal $2+                                              ,mc $3] }+                                          -- hdaume: core annotation+        | fexp                         { $1 }++exp10 :: { LHsExpr GhcPs }+        : exp10_top            { $1 }+        | scc_annot exp        {% ams (sLL $1 $> $ HsSCC noExt (snd $ fst $ unLoc $1) (snd $ unLoc $1) $2)+                                      (fst $ fst $ unLoc $1) }++optSemi :: { ([Located a],Bool) }+        : ';'         { ([$1],True) }+        | {- empty -} { ([],False) }++scc_annot :: { Located (([AddAnn],SourceText),StringLiteral) }+        : '{-# SCC' STRING '#-}'      {% do scc <- getSCC $2+                                            ; return $ sLL $1 $>+                                               (([mo $1,mj AnnValStr $2+                                                ,mc $3],getSCC_PRAGs $1),(StringLiteral (getSTRINGs $2) scc)) }+        | '{-# SCC' VARID  '#-}'      { sLL $1 $> (([mo $1,mj AnnVal $2+                                         ,mc $3],getSCC_PRAGs $1)+                                        ,(StringLiteral NoSourceText (getVARID $2))) }++hpc_annot :: { Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,Int))),+                         ((SourceText,SourceText),(SourceText,SourceText))+                       ) }+      : '{-# GENERATED' STRING INTEGER ':' INTEGER '-' INTEGER ':' INTEGER '#-}'+                                      { sLL $1 $> $ ((([mo $1,mj AnnVal $2+                                              ,mj AnnVal $3,mj AnnColon $4+                                              ,mj AnnVal $5,mj AnnMinus $6+                                              ,mj AnnVal $7,mj AnnColon $8+                                              ,mj AnnVal $9,mc $10],+                                                getGENERATED_PRAGs $1)+                                              ,((getStringLiteral $2)+                                               ,( fromInteger $ il_value $ getINTEGER $3+                                                , fromInteger $ il_value $ getINTEGER $5+                                                )+                                               ,( fromInteger $ il_value $ getINTEGER $7+                                                , fromInteger $ il_value $ getINTEGER $9+                                                )+                                               ))+                                             , (( getINTEGERs $3+                                                , getINTEGERs $5+                                                )+                                               ,( getINTEGERs $7+                                                , getINTEGERs $9+                                                )))+                                         }++fexp    :: { LHsExpr GhcPs }+        : fexp aexp                  {% checkBlockArguments $1 >> checkBlockArguments $2 >>+                                        return (sLL $1 $> $ (HsApp noExt $1 $2)) }+        | fexp TYPEAPP atype         {% checkBlockArguments $1 >>+                                        ams (sLL $1 $> $ HsAppType (mkHsWildCardBndrs $3) $1)+                                            [mj AnnAt $2] }+        | 'static' aexp              {% ams (sLL $1 $> $ HsStatic noExt $2)+                                            [mj AnnStatic $1] }+        | aexp                       { $1 }++aexp    :: { LHsExpr GhcPs }+        : qvar '@' aexp         {% ams (sLL $1 $> $ EAsPat noExt $1 $3) [mj AnnAt $2] }+            -- If you change the parsing, make sure to understand+            -- Note [Lexing type applications] in Lexer.x++        | '~' aexp              {% ams (sLL $1 $> $ ELazyPat noExt $2) [mj AnnTilde $1] }++        | '\\' apat apats '->' exp+                   {% ams (sLL $1 $> $ HsLam noExt (mkMatchGroup FromSource+                            [sLL $1 $> $ Match { m_ext = noExt+                                               , m_ctxt = LambdaExpr+                                               , m_pats = $2:$3+                                               , m_grhss = unguardedGRHSs $5 }]))+                          [mj AnnLam $1, mu AnnRarrow $4] }+        | 'let' binds 'in' exp          {% ams (sLL $1 $> $ HsLet noExt (snd $ unLoc $2) $4)+                                               (mj AnnLet $1:mj AnnIn $3+                                                 :(fst $ unLoc $2)) }+        | '\\' 'lcase' altslist+            {% ams (sLL $1 $> $ HsLamCase noExt+                                   (mkMatchGroup FromSource (snd $ unLoc $3)))+                   (mj AnnLam $1:mj AnnCase $2:(fst $ unLoc $3)) }+        | 'if' exp optSemi 'then' exp optSemi 'else' exp+                           {% checkDoAndIfThenElse $2 (snd $3) $5 (snd $6) $8 >>+                              ams (sLL $1 $> $ mkHsIf $2 $5 $8)+                                  (mj AnnIf $1:mj AnnThen $4+                                     :mj AnnElse $7+                                     :(map (\l -> mj AnnSemi l) (fst $3))+                                    ++(map (\l -> mj AnnSemi l) (fst $6))) }+        | 'if' ifgdpats                 {% hintMultiWayIf (getLoc $1) >>+                                           ams (sLL $1 $> $ HsMultiIf noExt+                                                     (reverse $ snd $ unLoc $2))+                                               (mj AnnIf $1:(fst $ unLoc $2)) }+        | 'case' exp 'of' altslist      {% ams (L (comb3 $1 $3 $4) $+                                                   HsCase noExt $2 (mkMatchGroup+                                                   FromSource (snd $ unLoc $4)))+                                               (mj AnnCase $1:mj AnnOf $3+                                                  :(fst $ unLoc $4)) }+        | 'do' stmtlist              {% ams (L (comb2 $1 $2)+                                               (mkHsDo DoExpr (snd $ unLoc $2)))+                                               (mj AnnDo $1:(fst $ unLoc $2)) }+        | 'mdo' stmtlist            {% ams (L (comb2 $1 $2)+                                              (mkHsDo MDoExpr (snd $ unLoc $2)))+                                           (mj AnnMdo $1:(fst $ unLoc $2)) }+        | 'proc' aexp '->' exp+                       {% checkPattern empty $2 >>= \ p ->+                           checkCommand $4 >>= \ cmd ->+                           ams (sLL $1 $> $ HsProc noExt p (sLL $1 $> $ HsCmdTop noExt cmd))+                                            -- TODO: is LL right here?+                               [mj AnnProc $1,mu AnnRarrow $3] }++        | aexp1                 { $1 }++aexp1   :: { LHsExpr GhcPs }+        : aexp1 '{' fbinds '}' {% do { r <- mkRecConstrOrUpdate $1 (comb2 $2 $4)+                                                                   (snd $3)+                                     ; _ <- ams (sLL $1 $> ()) (moc $2:mcc $4:(fst $3))+                                     ; checkRecordSyntax (sLL $1 $> r) }}+        | aexp2                { $1 }++aexp2   :: { LHsExpr GhcPs }+        : qvar                          { sL1 $1 (HsVar noExt   $! $1) }+        | qcon                          { sL1 $1 (HsVar noExt   $! $1) }+        | ipvar                         { sL1 $1 (HsIPVar noExt $! unLoc $1) }+        | overloaded_label              { sL1 $1 (HsOverLabel noExt Nothing $! unLoc $1) }+        | literal                       { sL1 $1 (HsLit noExt  $! unLoc $1) }+-- This will enable overloaded strings permanently.  Normally the renamer turns HsString+-- into HsOverLit when -foverloaded-strings is on.+--      | STRING    { sL (getLoc $1) (HsOverLit $! mkHsIsString (getSTRINGs $1)+--                                       (getSTRING $1) noExt) }+        | INTEGER   { sL (getLoc $1) (HsOverLit noExt $! mkHsIntegral   (getINTEGER $1) ) }+        | RATIONAL  { sL (getLoc $1) (HsOverLit noExt $! mkHsFractional (getRATIONAL $1) ) }++        -- N.B.: sections get parsed by these next two productions.+        -- This allows you to write, e.g., '(+ 3, 4 -)', which isn't+        -- correct Haskell (you'd have to write '((+ 3), (4 -))')+        -- but the less cluttered version fell out of having texps.+        | '(' texp ')'                  {% ams (sLL $1 $> (HsPar noExt $2)) [mop $1,mcp $3] }+        | '(' tup_exprs ')'             {% do { e <- mkSumOrTuple Boxed (comb2 $1 $3) (snd $2)+                                              ; ams (sLL $1 $> e) ((mop $1:fst $2) ++ [mcp $3]) } }++        | '(#' texp '#)'                {% ams (sLL $1 $> (ExplicitTuple noExt [L (gl $2)+                                                         (Present noExt $2)] Unboxed))+                                               [mo $1,mc $3] }+        | '(#' tup_exprs '#)'           {% do { e <- mkSumOrTuple Unboxed (comb2 $1 $3) (snd $2)+                                              ; ams (sLL $1 $> e) ((mo $1:fst $2) ++ [mc $3]) } }++        | '[' list ']'      {% ams (sLL $1 $> (snd $2)) (mos $1:mcs $3:(fst $2)) }+        | '_'               { sL1 $1 $ EWildPat noExt }++        -- Template Haskell Extension+        | splice_exp            { $1 }++        | SIMPLEQUOTE  qvar     {% ams (sLL $1 $> $ HsBracket noExt (VarBr noExt True  (unLoc $2))) [mj AnnSimpleQuote $1,mj AnnName $2] }+        | SIMPLEQUOTE  qcon     {% ams (sLL $1 $> $ HsBracket noExt (VarBr noExt True  (unLoc $2))) [mj AnnSimpleQuote $1,mj AnnName $2] }+        | TH_TY_QUOTE tyvar     {% ams (sLL $1 $> $ HsBracket noExt (VarBr noExt False (unLoc $2))) [mj AnnThTyQuote $1,mj AnnName $2] }+        | TH_TY_QUOTE gtycon    {% ams (sLL $1 $> $ HsBracket noExt (VarBr noExt False (unLoc $2))) [mj AnnThTyQuote $1,mj AnnName $2] }+        | TH_TY_QUOTE {- nothing -} {% reportEmptyDoubleQuotes (getLoc $1) }+        | '[|' exp '|]'       {% ams (sLL $1 $> $ HsBracket noExt (ExpBr noExt $2))+                                      (if (hasE $1) then [mj AnnOpenE $1, mu AnnCloseQ $3]+                                                    else [mu AnnOpenEQ $1,mu AnnCloseQ $3]) }+        | '[||' exp '||]'     {% ams (sLL $1 $> $ HsBracket noExt (TExpBr noExt $2))+                                      (if (hasE $1) then [mj AnnOpenE $1,mc $3] else [mo $1,mc $3]) }+        | '[t|' ctype '|]'    {% ams (sLL $1 $> $ HsBracket noExt (TypBr noExt $2)) [mo $1,mu AnnCloseQ $3] }+        | '[p|' infixexp '|]' {% checkPattern empty $2 >>= \p ->+                                      ams (sLL $1 $> $ HsBracket noExt (PatBr noExt p))+                                          [mo $1,mu AnnCloseQ $3] }+        | '[d|' cvtopbody '|]' {% ams (sLL $1 $> $ HsBracket noExt (DecBrL noExt (snd $2)))+                                      (mo $1:mu AnnCloseQ $3:fst $2) }+        | quasiquote          { sL1 $1 (HsSpliceE noExt (unLoc $1)) }++        -- arrow notation extension+        | '(|' aexp2 cmdargs '|)'  {% ams (sLL $1 $> $ HsArrForm noExt $2+                                                           Nothing (reverse $3))+                                          [mu AnnOpenB $1,mu AnnCloseB $4] }++splice_exp :: { LHsExpr GhcPs }+        : TH_ID_SPLICE          {% ams (sL1 $1 $ mkHsSpliceE HasDollar+                                        (sL1 $1 $ HsVar noExt (sL1 $1 (mkUnqual varName+                                                           (getTH_ID_SPLICE $1)))))+                                       [mj AnnThIdSplice $1] }+        | '$(' exp ')'          {% ams (sLL $1 $> $ mkHsSpliceE HasParens $2)+                                       [mj AnnOpenPE $1,mj AnnCloseP $3] }+        | TH_ID_TY_SPLICE       {% ams (sL1 $1 $ mkHsSpliceTE HasDollar+                                        (sL1 $1 $ HsVar noExt (sL1 $1 (mkUnqual varName+                                                        (getTH_ID_TY_SPLICE $1)))))+                                       [mj AnnThIdTySplice $1] }+        | '$$(' exp ')'         {% ams (sLL $1 $> $ mkHsSpliceTE HasParens $2)+                                       [mj AnnOpenPTE $1,mj AnnCloseP $3] }++cmdargs :: { [LHsCmdTop GhcPs] }+        : cmdargs acmd                  { $2 : $1 }+        | {- empty -}                   { [] }++acmd    :: { LHsCmdTop GhcPs }+        : aexp2                 {% checkCommand $1 >>= \ cmd ->+                                    return (sL1 $1 $ HsCmdTop noExt cmd) }++cvtopbody :: { ([AddAnn],[LHsDecl GhcPs]) }+        :  '{'            cvtopdecls0 '}'      { ([mj AnnOpenC $1+                                                  ,mj AnnCloseC $3],$2) }+        |      vocurly    cvtopdecls0 close    { ([],$2) }++cvtopdecls0 :: { [LHsDecl GhcPs] }+        : topdecls_semi         { cvTopDecls $1 }+        | topdecls              { cvTopDecls $1 }++-----------------------------------------------------------------------------+-- Tuple expressions++-- "texp" is short for tuple expressions:+-- things that can appear unparenthesized as long as they're+-- inside parens or delimitted by commas+texp :: { LHsExpr GhcPs }+        : exp                           { $1 }++        -- Note [Parsing sections]+        -- ~~~~~~~~~~~~~~~~~~~~~~~+        -- We include left and right sections here, which isn't+        -- technically right according to the Haskell standard.+        -- For example (3 +, True) isn't legal.+        -- However, we want to parse bang patterns like+        --      (!x, !y)+        -- and it's convenient to do so here as a section+        -- Then when converting expr to pattern we unravel it again+        -- Meanwhile, the renamer checks that real sections appear+        -- inside parens.+        | infixexp qop        { sLL $1 $> $ SectionL noExt $1 $2 }+        | qopm infixexp       { sLL $1 $> $ SectionR noExt $1 $2 }++       -- View patterns get parenthesized above+        | exp '->' texp   {% ams (sLL $1 $> $ EViewPat noExt $1 $3) [mu AnnRarrow $2] }++-- Always at least one comma or bar.+tup_exprs :: { ([AddAnn],SumOrTuple) }+           : texp commas_tup_tail+                          {% do { addAnnotation (gl $1) AnnComma (fst $2)+                                ; return ([],Tuple ((sL1 $1 (Present noExt $1)) : snd $2)) } }++           | texp bars    { (mvbars (fst $2), Sum 1  (snd $2 + 1) $1) }++           | commas tup_tail+                {% do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (fst $1)+                      ; return+                           ([],Tuple (map (\l -> L l missingTupArg) (fst $1) ++ $2)) } }++           | bars texp bars0+                { (mvbars (fst $1) ++ mvbars (fst $3), Sum (snd $1 + 1) (snd $1 + snd $3 + 1) $2) }++-- Always starts with commas; always follows an expr+commas_tup_tail :: { (SrcSpan,[LHsTupArg GhcPs]) }+commas_tup_tail : commas tup_tail+       {% do { mapM_ (\ll -> addAnnotation ll AnnComma ll) (tail $ fst $1)+             ; return (+            (head $ fst $1+            ,(map (\l -> L l missingTupArg) (tail $ fst $1)) ++ $2)) } }++-- Always follows a comma+tup_tail :: { [LHsTupArg GhcPs] }+          : texp commas_tup_tail {% addAnnotation (gl $1) AnnComma (fst $2) >>+                                    return ((L (gl $1) (Present noExt $1)) : snd $2) }+          | texp                 { [L (gl $1) (Present noExt $1)] }+          | {- empty -}          { [noLoc missingTupArg] }++-----------------------------------------------------------------------------+-- List expressions++-- The rules below are little bit contorted to keep lexps left-recursive while+-- avoiding another shift/reduce-conflict.+list :: { ([AddAnn],HsExpr GhcPs) }+        : texp    { ([],ExplicitList noExt Nothing [$1]) }+        | lexps   { ([],ExplicitList noExt Nothing (reverse (unLoc $1))) }+        | texp '..'             { ([mj AnnDotdot $2],+                                      ArithSeq noExt Nothing (From $1)) }+        | texp ',' exp '..'     { ([mj AnnComma $2,mj AnnDotdot $4],+                                  ArithSeq noExt Nothing+                                                             (FromThen $1 $3)) }+        | texp '..' exp         { ([mj AnnDotdot $2],+                                   ArithSeq noExt Nothing+                                                               (FromTo $1 $3)) }+        | texp ',' exp '..' exp { ([mj AnnComma $2,mj AnnDotdot $4],+                                    ArithSeq noExt Nothing+                                                (FromThenTo $1 $3 $5)) }+        | texp '|' flattenedpquals+             {% checkMonadComp >>= \ ctxt ->+                return ([mj AnnVbar $2],+                        mkHsComp ctxt (unLoc $3) $1) }++lexps :: { Located [LHsExpr GhcPs] }+        : lexps ',' texp          {% addAnnotation (gl $ head $ unLoc $1)+                                                            AnnComma (gl $2) >>+                                      return (sLL $1 $> (((:) $! $3) $! unLoc $1)) }+        | texp ',' texp            {% addAnnotation (gl $1) AnnComma (gl $2) >>+                                      return (sLL $1 $> [$3,$1]) }++-----------------------------------------------------------------------------+-- List Comprehensions++flattenedpquals :: { Located [LStmt GhcPs (LHsExpr GhcPs)] }+    : pquals   { case (unLoc $1) of+                    [qs] -> sL1 $1 qs+                    -- We just had one thing in our "parallel" list so+                    -- we simply return that thing directly++                    qss -> sL1 $1 [sL1 $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+                }++pquals :: { Located [[LStmt GhcPs (LHsExpr GhcPs)]] }+    : squals '|' pquals+                     {% addAnnotation (gl $ head $ unLoc $1) AnnVbar (gl $2) >>+                        return (sLL $1 $> (reverse (unLoc $1) : unLoc $3)) }+    | squals         { L (getLoc $1) [reverse (unLoc $1)] }++squals :: { Located [LStmt GhcPs (LHsExpr GhcPs)] }   -- In reverse order, because the last+                                        -- one can "grab" the earlier ones+    : squals ',' transformqual+             {% addAnnotation (gl $ head $ unLoc $1) AnnComma (gl $2) >>+                ams (sLL $1 $> ()) (fst $ unLoc $3) >>+                return (sLL $1 $> [sLL $1 $> ((snd $ unLoc $3) (reverse (unLoc $1)))]) }+    | squals ',' qual+             {% addAnnotation (gl $ head $ unLoc $1) AnnComma (gl $2) >>+                return (sLL $1 $> ($3 : unLoc $1)) }+    | transformqual        {% ams $1 (fst $ unLoc $1) >>+                              return (sLL $1 $> [L (getLoc $1) ((snd $ unLoc $1) [])]) }+    | qual                                { sL1 $1 [$1] }+--  | transformquals1 ',' '{|' pquals '|}'   { sLL $1 $> ($4 : unLoc $1) }+--  | '{|' pquals '|}'                       { sL1 $1 [$2] }++-- It is possible to enable bracketing (associating) qualifier lists+-- by uncommenting the lines with {| |} above. Due to a lack of+-- consensus on the syntax, this feature is not being used until we+-- get user demand.++transformqual :: { Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)] -> Stmt GhcPs (LHsExpr GhcPs)) }+                        -- Function is applied to a list of stmts *in order*+    : 'then' exp               { sLL $1 $> ([mj AnnThen $1], \ss -> (mkTransformStmt ss $2)) }+    | 'then' exp 'by' exp      { sLL $1 $> ([mj AnnThen $1,mj AnnBy  $3],\ss -> (mkTransformByStmt ss $2 $4)) }+    | 'then' 'group' 'using' exp+             { sLL $1 $> ([mj AnnThen $1,mj AnnGroup $2,mj AnnUsing $3], \ss -> (mkGroupUsingStmt ss $4)) }++    | 'then' 'group' 'by' exp 'using' exp+             { sLL $1 $> ([mj AnnThen $1,mj AnnGroup $2,mj AnnBy $3,mj AnnUsing $5], \ss -> (mkGroupByUsingStmt ss $4 $6)) }++-- Note that 'group' is a special_id, which means that you can enable+-- TransformListComp while still using Data.List.group. However, this+-- introduces a shift/reduce conflict. Happy chooses to resolve the conflict+-- in by choosing the "group by" variant, which is what we want.++-----------------------------------------------------------------------------+-- Guards++guardquals :: { Located [LStmt GhcPs (LHsExpr GhcPs)] }+    : guardquals1           { L (getLoc $1) (reverse (unLoc $1)) }++guardquals1 :: { Located [LStmt GhcPs (LHsExpr GhcPs)] }+    : guardquals1 ',' qual  {% addAnnotation (gl $ head $ unLoc $1) AnnComma+                                             (gl $2) >>+                               return (sLL $1 $> ($3 : unLoc $1)) }+    | qual                  { sL1 $1 [$1] }++-----------------------------------------------------------------------------+-- Case alternatives++altslist :: { Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]) }+        : '{'            alts '}'  { sLL $1 $> ((moc $1:mcc $3:(fst $ unLoc $2))+                                               ,(reverse (snd $ unLoc $2))) }+        |     vocurly    alts  close { L (getLoc $2) (fst $ unLoc $2+                                        ,(reverse (snd $ unLoc $2))) }+        | '{'                 '}'    { sLL $1 $> ([moc $1,mcc $2],[]) }+        |     vocurly          close { noLoc ([],[]) }++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) }++alts1   :: { Located ([AddAnn],[LMatch GhcPs (LHsExpr GhcPs)]) }+        : alts1 ';' alt         {% if null (snd $ unLoc $1)+                                     then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                  ,[$3]))+                                     else (ams (head $ snd $ unLoc $1)+                                               (mj AnnSemi $2:(fst $ unLoc $1))+                                           >> return (sLL $1 $> ([],$3 : (snd $ unLoc $1))) ) }+        | alts1 ';'             {% if null (snd $ unLoc $1)+                                     then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                  ,snd $ unLoc $1))+                                     else (ams (head $ snd $ unLoc $1)+                                               (mj AnnSemi $2:(fst $ unLoc $1))+                                           >> return (sLL $1 $> ([],snd $ unLoc $1))) }+        | alt                   { sL1 $1 ([],[$1]) }++alt     :: { LMatch GhcPs (LHsExpr GhcPs) }+           : pat alt_rhs  {%ams (sLL $1 $> (Match { m_ext = noExt+                                                  , m_ctxt = CaseAlt+                                                  , m_pats = [$1]+                                                  , m_grhss = snd $ unLoc $2 }))+                                      (fst $ unLoc $2)}++alt_rhs :: { Located ([AddAnn],GRHSs GhcPs (LHsExpr GhcPs)) }+        : ralt wherebinds           { sLL $1 $> (fst $ unLoc $2,+                                            GRHSs noExt (unLoc $1) (snd $ unLoc $2)) }++ralt :: { Located [LGRHS GhcPs (LHsExpr GhcPs)] }+        : '->' exp            {% ams (sLL $1 $> (unguardedRHS (comb2 $1 $2) $2))+                                     [mu AnnRarrow $1] }+        | gdpats              { sL1 $1 (reverse (unLoc $1)) }++gdpats :: { Located [LGRHS GhcPs (LHsExpr GhcPs)] }+        : gdpats gdpat                  { sLL $1 $> ($2 : unLoc $1) }+        | gdpat                         { sL1 $1 [$1] }++-- layout for MultiWayIf doesn't begin with an open brace, because it's hard to+-- generate the open brace in addition to the vertical bar in the lexer, and+-- we don't need it.+ifgdpats :: { Located ([AddAnn],[LGRHS GhcPs (LHsExpr GhcPs)]) }+         : '{' gdpats '}'                 { sLL $1 $> ([moc $1,mcc $3],unLoc $2)  }+         |     gdpats close               { sL1 $1 ([],unLoc $1) }++gdpat   :: { LGRHS GhcPs (LHsExpr GhcPs) }+        : '|' guardquals '->' exp+                                  {% ams (sL (comb2 $1 $>) $ GRHS noExt (unLoc $2) $4)+                                         [mj AnnVbar $1,mu AnnRarrow $3] }++-- 'pat' recognises a pattern, including one with a bang at the top+--      e.g.  "!x" or "!(x,y)" or "C a b" etc+-- Bangs inside are parsed as infix operator applications, so that+-- we parse them right when bang-patterns are off+pat     :: { LPat GhcPs }+pat     :  exp          {% checkPattern empty $1 }+        | '!' aexp      {% amms (checkPattern empty (sLL $1 $> (SectionR noExt+                                                     (sL1 $1 (HsVar noExt (sL1 $1 bang_RDR))) $2)))+                                [mj AnnBang $1] }++bindpat :: { LPat GhcPs }+bindpat :  exp            {% checkPattern+                                (text "Possibly caused by a missing 'do'?") $1 }+        | '!' aexp        {% amms (checkPattern+                                     (text "Possibly caused by a missing 'do'?")+                                     (sLL $1 $> (SectionR noExt (sL1 $1 (HsVar noExt (sL1 $1 bang_RDR))) $2)))+                                  [mj AnnBang $1] }++apat   :: { LPat GhcPs }+apat    : aexp                  {% checkPattern empty $1 }+        | '!' aexp              {% amms (checkPattern empty+                                            (sLL $1 $> (SectionR noExt+                                                (sL1 $1 (HsVar noExt (sL1 $1 bang_RDR))) $2)))+                                        [mj AnnBang $1] }++apats  :: { [LPat GhcPs] }+        : apat apats            { $1 : $2 }+        | {- empty -}           { [] }++-----------------------------------------------------------------------------+-- Statement sequences++stmtlist :: { Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)]) }+        : '{'           stmts '}'       { sLL $1 $> ((moc $1:mcc $3:(fst $ unLoc $2))+                                             ,(reverse $ snd $ unLoc $2)) } -- AZ:performance of reverse?+        |     vocurly   stmts close     { L (gl $2) (fst $ unLoc $2+                                                    ,reverse $ snd $ unLoc $2) }++--      do { ;; s ; s ; ; s ;; }+-- The last Stmt should be an expression, but that's hard to enforce+-- here, because we need too much lookahead if we see do { e ; }+-- So we use BodyStmts throughout, and switch the last one over+-- in ParseUtils.checkDo instead++stmts :: { Located ([AddAnn],[LStmt GhcPs (LHsExpr GhcPs)]) }+        : stmts ';' stmt  {% if null (snd $ unLoc $1)+                              then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1)+                                                     ,$3 : (snd $ unLoc $1)))+                              else do+                               { ams (head $ snd $ unLoc $1) [mj AnnSemi $2]+                               ; return $ sLL $1 $> (fst $ unLoc $1,$3 :(snd $ unLoc $1)) }}++        | stmts ';'     {% if null (snd $ unLoc $1)+                             then return (sLL $1 $> (mj AnnSemi $2:(fst $ unLoc $1),snd $ unLoc $1))+                             else do+                               { ams (head $ snd $ unLoc $1)+                                               [mj AnnSemi $2]+                               ; return $1 } }+        | stmt                   { sL1 $1 ([],[$1]) }+        | {- empty -}            { noLoc ([],[]) }+++-- For typing stmts at the GHCi prompt, where+-- the input may consist of just comments.+maybe_stmt :: { Maybe (LStmt GhcPs (LHsExpr GhcPs)) }+        : stmt                          { Just $1 }+        | {- nothing -}                 { Nothing }++stmt  :: { LStmt GhcPs (LHsExpr GhcPs) }+        : qual                          { $1 }+        | 'rec' stmtlist                {% ams (sLL $1 $> $ mkRecStmt (snd $ unLoc $2))+                                               (mj AnnRec $1:(fst $ unLoc $2)) }++qual  :: { LStmt GhcPs (LHsExpr GhcPs) }+    : bindpat '<-' exp                  {% ams (sLL $1 $> $ mkBindStmt $1 $3)+                                               [mu AnnLarrow $2] }+    | exp                               { sL1 $1 $ mkBodyStmt $1 }+    | 'let' binds                       {% ams (sLL $1 $>$ LetStmt noExt (snd $ unLoc $2))+                                               (mj AnnLet $1:(fst $ unLoc $2)) }++-----------------------------------------------------------------------------+-- Record Field Update/Construction++fbinds  :: { ([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)) }+        : fbinds1                       { $1 }+        | {- empty -}                   { ([],([], False)) }++fbinds1 :: { ([AddAnn],([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)) }+        : fbind ',' fbinds1+                {% addAnnotation (gl $1) AnnComma (gl $2) >>+                   return (case $3 of (ma,(flds, dd)) -> (ma,($1 : flds, dd))) }+        | fbind                         { ([],([$1], False)) }+        | '..'                          { ([mj AnnDotdot $1],([],   True)) }++fbind   :: { LHsRecField GhcPs (LHsExpr GhcPs) }+        : qvar '=' texp {% ams  (sLL $1 $> $ HsRecField (sL1 $1 $ mkFieldOcc $1) $3 False)+                                [mj AnnEqual $2] }+                        -- RHS is a 'texp', allowing view patterns (Trac #6038)+                        -- and, incidentally, sections.  Eg+                        -- f (R { x = show -> s }) = ...++        | qvar          { sLL $1 $> $ HsRecField (sL1 $1 $ mkFieldOcc $1) placeHolderPunRhs True }+                        -- In the punning case, use a place-holder+                        -- The renamer fills in the final value++-----------------------------------------------------------------------------+-- Implicit Parameter Bindings++dbinds  :: { Located [LIPBind GhcPs] }+        : dbinds ';' dbind+                      {% addAnnotation (gl $ last $ unLoc $1) AnnSemi (gl $2) >>+                         return (let { this = $3; rest = unLoc $1 }+                              in rest `seq` this `seq` sLL $1 $> (this : rest)) }+        | dbinds ';'  {% addAnnotation (gl $ last $ unLoc $1) AnnSemi (gl $2) >>+                         return (sLL $1 $> (unLoc $1)) }+        | dbind                        { let this = $1 in this `seq` sL1 $1 [this] }+--      | {- empty -}                  { [] }++dbind   :: { LIPBind GhcPs }+dbind   : ipvar '=' exp                {% ams (sLL $1 $> (IPBind noExt (Left $1) $3))+                                              [mj AnnEqual $2] }++ipvar   :: { Located HsIPName }+        : IPDUPVARID            { sL1 $1 (HsIPName (getIPDUPVARID $1)) }++-----------------------------------------------------------------------------+-- Overloaded labels++overloaded_label :: { Located FastString }+        : LABELVARID          { sL1 $1 (getLABELVARID $1) }++-----------------------------------------------------------------------------+-- Warnings and deprecations++name_boolformula_opt :: { LBooleanFormula (Located RdrName) }+        : name_boolformula          { $1 }+        | {- empty -}               { noLoc mkTrue }++name_boolformula :: { LBooleanFormula (Located RdrName) }+        : name_boolformula_and                      { $1 }+        | name_boolformula_and '|' name_boolformula+                           {% aa $1 (AnnVbar, $2)+                              >> return (sLL $1 $> (Or [$1,$3])) }++name_boolformula_and :: { LBooleanFormula (Located RdrName) }+        : name_boolformula_and_list+                  { sLL (head $1) (last $1) (And ($1)) }++name_boolformula_and_list :: { [LBooleanFormula (Located RdrName)] }+        : name_boolformula_atom                               { [$1] }+        | name_boolformula_atom ',' name_boolformula_and_list+            {% aa $1 (AnnComma, $2) >> return ($1 : $3) }++name_boolformula_atom :: { LBooleanFormula (Located RdrName) }+        : '(' name_boolformula ')'  {% ams (sLL $1 $> (Parens $2)) [mop $1,mcp $3] }+        | name_var                  { sL1 $1 (Var $1) }++namelist :: { Located [Located RdrName] }+namelist : name_var              { sL1 $1 [$1] }+         | name_var ',' namelist {% addAnnotation (gl $1) AnnComma (gl $2) >>+                                    return (sLL $1 $> ($1 : unLoc $3)) }++name_var :: { Located RdrName }+name_var : var { $1 }+         | con { $1 }++-----------------------------------------+-- Data constructors+-- There are two different productions here as lifted list constructors+-- are parsed differently.++qcon_nowiredlist :: { Located RdrName }+        : gen_qcon                     { $1 }+        | sysdcon_nolist               { sL1 $1 $ nameRdrName (dataConName (unLoc $1)) }++qcon :: { Located RdrName }+  : gen_qcon              { $1}+  | sysdcon               { sL1 $1 $ nameRdrName (dataConName (unLoc $1)) }++gen_qcon :: { Located RdrName }+  : qconid                { $1 }+  | '(' qconsym ')'       {% ams (sLL $1 $> (unLoc $2))+                                   [mop $1,mj AnnVal $2,mcp $3] }++con     :: { Located RdrName }+        : conid                 { $1 }+        | '(' consym ')'        {% ams (sLL $1 $> (unLoc $2))+                                       [mop $1,mj AnnVal $2,mcp $3] }+        | sysdcon               { sL1 $1 $ nameRdrName (dataConName (unLoc $1)) }++con_list :: { Located [Located RdrName] }+con_list : con                  { sL1 $1 [$1] }+         | con ',' con_list     {% addAnnotation (gl $1) AnnComma (gl $2) >>+                                   return (sLL $1 $> ($1 : unLoc $3)) }++sysdcon_nolist :: { Located DataCon }  -- Wired in data constructors+        : '(' ')'               {% ams (sLL $1 $> unitDataCon) [mop $1,mcp $2] }+        | '(' commas ')'        {% ams (sLL $1 $> $ tupleDataCon Boxed (snd $2 + 1))+                                       (mop $1:mcp $3:(mcommas (fst $2))) }+        | '(#' '#)'             {% ams (sLL $1 $> $ unboxedUnitDataCon) [mo $1,mc $2] }+        | '(#' commas '#)'      {% ams (sLL $1 $> $ tupleDataCon Unboxed (snd $2 + 1))+                                       (mo $1:mc $3:(mcommas (fst $2))) }++sysdcon :: { Located DataCon }+        : sysdcon_nolist                 { $1 }+        | '[' ']'               {% ams (sLL $1 $> nilDataCon) [mos $1,mcs $2] }++conop :: { Located RdrName }+        : consym                { $1 }+        | '`' conid '`'         {% ams (sLL $1 $> (unLoc $2))+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }++qconop :: { Located RdrName }+        : qconsym               { $1 }+        | '`' qconid '`'        {% ams (sLL $1 $> (unLoc $2))+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }++----------------------------------------------------------------------------+-- Type constructors+++-- See Note [Unit tuples] in HsTypes for the distinction+-- between gtycon and ntgtycon+gtycon :: { Located RdrName }  -- A "general" qualified tycon, including unit tuples+        : ntgtycon                     { $1 }+        | '(' ')'                      {% ams (sLL $1 $> $ getRdrName unitTyCon)+                                              [mop $1,mcp $2] }+        | '(#' '#)'                    {% ams (sLL $1 $> $ getRdrName unboxedUnitTyCon)+                                              [mo $1,mc $2] }++ntgtycon :: { Located RdrName }  -- A "general" qualified tycon, excluding unit tuples+        : oqtycon               { $1 }+        | '(' commas ')'        {% ams (sLL $1 $> $ getRdrName (tupleTyCon Boxed+                                                        (snd $2 + 1)))+                                       (mop $1:mcp $3:(mcommas (fst $2))) }+        | '(#' commas '#)'      {% ams (sLL $1 $> $ getRdrName (tupleTyCon Unboxed+                                                        (snd $2 + 1)))+                                       (mo $1:mc $3:(mcommas (fst $2))) }+        | '(' '->' ')'          {% ams (sLL $1 $> $ getRdrName funTyCon)+                                       [mop $1,mu AnnRarrow $2,mcp $3] }+        | '[' ']'               {% ams (sLL $1 $> $ listTyCon_RDR) [mos $1,mcs $2] }++oqtycon :: { Located RdrName }  -- An "ordinary" qualified tycon;+                                -- These can appear in export lists+        : qtycon                        { $1 }+        | '(' qtyconsym ')'             {% ams (sLL $1 $> (unLoc $2))+                                               [mop $1,mj AnnVal $2,mcp $3] }+        | '(' '~' ')'                   {% ams (sLL $1 $> $ eqTyCon_RDR)+                                               [mop $1,mj AnnVal $2,mcp $3] }++oqtycon_no_varcon :: { Located RdrName }  -- Type constructor which cannot be mistaken+                                          -- for variable constructor in export lists+                                          -- see Note [Type constructors in export list]+        :  qtycon            { $1 }+        | '(' QCONSYM ')'    {% let name = sL1 $2 $! mkQual tcClsName (getQCONSYM $2)+                                in ams (sLL $1 $> (unLoc name)) [mop $1,mj AnnVal name,mcp $3] }+        | '(' CONSYM ')'     {% let name = sL1 $2 $! mkUnqual tcClsName (getCONSYM $2)+                                in ams (sLL $1 $> (unLoc name)) [mop $1,mj AnnVal name,mcp $3] }+        | '(' ':' ')'        {% let name = sL1 $2 $! consDataCon_RDR+                                in ams (sLL $1 $> (unLoc name)) [mop $1,mj AnnVal name,mcp $3] }+        | '(' '~' ')'        {% ams (sLL $1 $> $ eqTyCon_RDR) [mop $1,mj AnnTilde $2,mcp $3] }++{- Note [Type constructors in export list]+~~~~~~~~~~~~~~~~~~~~~+Mixing type constructors and data constructors in export lists introduces+ambiguity in grammar: e.g. (*) may be both a type constructor and a function.++-XExplicitNamespaces allows to disambiguate by explicitly prefixing type+constructors with 'type' keyword.++This ambiguity causes reduce/reduce conflicts in parser, which are always+resolved in favour of data constructors. To get rid of conflicts we demand+that ambiguous type constructors (those, which are formed by the same+productions as variable constructors) are always prefixed with 'type' keyword.+Unambiguous type constructors may occur both with or without 'type' keyword.++Note that in the parser we still parse data constructors as type+constructors. As such, they still end up in the type constructor namespace+until after renaming when we resolve the proper namespace for each exported+child.+-}++qtyconop :: { Located RdrName } -- Qualified or unqualified+        : qtyconsym                     { $1 }+        | '`' qtycon '`'                {% ams (sLL $1 $> (unLoc $2))+                                               [mj AnnBackquote $1,mj AnnVal $2+                                               ,mj AnnBackquote $3] }++qtycon :: { Located RdrName }   -- Qualified or unqualified+        : QCONID            { sL1 $1 $! mkQual tcClsName (getQCONID $1) }+        | tycon             { $1 }++qtycondoc :: { LHsType GhcPs } -- Qualified or unqualified+        : qtycon            { sL1 $1                           (HsTyVar noExt NotPromoted $1)      }+        | qtycon docprev    { sLL $1 $> (HsDocTy noExt (sL1 $1 (HsTyVar noExt NotPromoted $1)) $2) }++tycon   :: { Located RdrName }  -- Unqualified+        : CONID                   { sL1 $1 $! mkUnqual tcClsName (getCONID $1) }++qtyconsym :: { Located RdrName }+        : QCONSYM            { sL1 $1 $! mkQual tcClsName (getQCONSYM $1) }+        | QVARSYM            { sL1 $1 $! mkQual tcClsName (getQVARSYM $1) }+        | tyconsym           { $1 }++-- Does not include "!", because that is used for strictness marks+--               or ".", because that separates the quantified type vars from the rest+tyconsym :: { Located RdrName }+        : CONSYM                { sL1 $1 $! mkUnqual tcClsName (getCONSYM $1) }+        | VARSYM                { sL1 $1 $! mkUnqual tcClsName (getVARSYM $1) }+        | ':'                   { sL1 $1 $! consDataCon_RDR }+        | '-'                   { sL1 $1 $! mkUnqual tcClsName (fsLit "-") }+++-----------------------------------------------------------------------------+-- Operators++op      :: { Located RdrName }   -- used in infix decls+        : varop                 { $1 }+        | conop                 { $1 }++varop   :: { Located RdrName }+        : varsym                { $1 }+        | '`' varid '`'         {% ams (sLL $1 $> (unLoc $2))+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }++qop     :: { LHsExpr GhcPs }   -- used in sections+        : qvarop                { sL1 $1 $ HsVar noExt $1 }+        | qconop                { sL1 $1 $ HsVar noExt $1 }+        | hole_op               { $1 }++qopm    :: { LHsExpr GhcPs }   -- used in sections+        : qvaropm               { sL1 $1 $ HsVar noExt $1 }+        | qconop                { sL1 $1 $ HsVar noExt $1 }+        | hole_op               { $1 }++hole_op :: { LHsExpr GhcPs }   -- used in sections+hole_op : '`' '_' '`'           {% ams (sLL $1 $> $ EWildPat noExt)+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }++qvarop :: { Located RdrName }+        : qvarsym               { $1 }+        | '`' qvarid '`'        {% ams (sLL $1 $> (unLoc $2))+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }++qvaropm :: { Located RdrName }+        : qvarsym_no_minus      { $1 }+        | '`' qvarid '`'        {% ams (sLL $1 $> (unLoc $2))+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }++-----------------------------------------------------------------------------+-- Type variables++tyvar   :: { Located RdrName }+tyvar   : tyvarid               { $1 }++tyvarop :: { Located RdrName }+tyvarop : '`' tyvarid '`'       {% ams (sLL $1 $> (unLoc $2))+                                       [mj AnnBackquote $1,mj AnnVal $2+                                       ,mj AnnBackquote $3] }+        | '.'                   {% hintExplicitForall' (getLoc $1) }++tyvarid :: { Located RdrName }+        : VARID            { sL1 $1 $! mkUnqual tvName (getVARID $1) }+        | special_id       { sL1 $1 $! mkUnqual tvName (unLoc $1) }+        | 'unsafe'         { sL1 $1 $! mkUnqual tvName (fsLit "unsafe") }+        | 'safe'           { sL1 $1 $! mkUnqual tvName (fsLit "safe") }+        | 'interruptible'  { sL1 $1 $! mkUnqual tvName (fsLit "interruptible") }++-----------------------------------------------------------------------------+-- Variables++var     :: { Located RdrName }+        : varid                 { $1 }+        | '(' varsym ')'        {% ams (sLL $1 $> (unLoc $2))+                                       [mop $1,mj AnnVal $2,mcp $3] }++ -- Lexing type applications depends subtly on what characters can possibly+ -- end a qvar. Currently (June 2015), only $idchars and ")" can end a qvar.+ -- If you're changing this, please see Note [Lexing type applications] in+ -- Lexer.x.+qvar    :: { Located RdrName }+        : qvarid                { $1 }+        | '(' varsym ')'        {% ams (sLL $1 $> (unLoc $2))+                                       [mop $1,mj AnnVal $2,mcp $3] }+        | '(' qvarsym1 ')'      {% ams (sLL $1 $> (unLoc $2))+                                       [mop $1,mj AnnVal $2,mcp $3] }+-- We've inlined qvarsym here so that the decision about+-- whether it's a qvar or a var can be postponed until+-- *after* we see the close paren.++qvarid :: { Located RdrName }+        : varid               { $1 }+        | QVARID              { sL1 $1 $! mkQual varName (getQVARID $1) }++-- Note that 'role' and 'family' get lexed separately regardless of+-- the use of extensions. However, because they are listed here,+-- this is OK and they can be used as normal varids.+-- See Note [Lexing type pseudo-keywords] in Lexer.x+varid :: { Located RdrName }+        : VARID            { sL1 $1 $! mkUnqual varName (getVARID $1) }+        | special_id       { sL1 $1 $! mkUnqual varName (unLoc $1) }+        | 'unsafe'         { sL1 $1 $! mkUnqual varName (fsLit "unsafe") }+        | 'safe'           { sL1 $1 $! mkUnqual varName (fsLit "safe") }+        | 'interruptible'  { sL1 $1 $! mkUnqual varName (fsLit "interruptible")}+        | 'forall'         { sL1 $1 $! mkUnqual varName (fsLit "forall") }+        | 'family'         { sL1 $1 $! mkUnqual varName (fsLit "family") }+        | 'role'           { sL1 $1 $! mkUnqual varName (fsLit "role") }++qvarsym :: { Located RdrName }+        : varsym                { $1 }+        | qvarsym1              { $1 }++qvarsym_no_minus :: { Located RdrName }+        : varsym_no_minus       { $1 }+        | qvarsym1              { $1 }++qvarsym1 :: { Located RdrName }+qvarsym1 : QVARSYM              { sL1 $1 $ mkQual varName (getQVARSYM $1) }++varsym :: { Located RdrName }+        : varsym_no_minus       { $1 }+        | '-'                   { sL1 $1 $ mkUnqual varName (fsLit "-") }++varsym_no_minus :: { Located RdrName } -- varsym not including '-'+        : VARSYM               { sL1 $1 $ mkUnqual varName (getVARSYM $1) }+        | special_sym          { sL1 $1 $ mkUnqual varName (unLoc $1) }+++-- These special_ids are treated as keywords in various places,+-- but as ordinary ids elsewhere.   'special_id' collects all these+-- except 'unsafe', 'interruptible', 'forall', 'family', 'role', 'stock', and+-- 'anyclass', whose treatment differs depending on context+special_id :: { Located FastString }+special_id+        : 'as'                  { sL1 $1 (fsLit "as") }+        | 'qualified'           { sL1 $1 (fsLit "qualified") }+        | 'hiding'              { sL1 $1 (fsLit "hiding") }+        | 'export'              { sL1 $1 (fsLit "export") }+        | 'label'               { sL1 $1 (fsLit "label")  }+        | 'dynamic'             { sL1 $1 (fsLit "dynamic") }+        | 'stdcall'             { sL1 $1 (fsLit "stdcall") }+        | 'ccall'               { sL1 $1 (fsLit "ccall") }+        | 'capi'                { sL1 $1 (fsLit "capi") }+        | 'prim'                { sL1 $1 (fsLit "prim") }+        | 'javascript'          { sL1 $1 (fsLit "javascript") }+        | 'group'               { sL1 $1 (fsLit "group") }+        | 'stock'               { sL1 $1 (fsLit "stock") }+        | 'anyclass'            { sL1 $1 (fsLit "anyclass") }+        | 'via'                 { sL1 $1 (fsLit "via") }+        | 'unit'                { sL1 $1 (fsLit "unit") }+        | 'dependency'          { sL1 $1 (fsLit "dependency") }+        | 'signature'           { sL1 $1 (fsLit "signature") }++special_sym :: { Located FastString }+special_sym : '!'       {% ams (sL1 $1 (fsLit "!")) [mj AnnBang $1] }+            | '.'       { sL1 $1 (fsLit ".") }+            | '*'       { sL1 $1 (fsLit (if isUnicode $1 then "\x2605" else "*")) }++-----------------------------------------------------------------------------+-- Data constructors++qconid :: { Located RdrName }   -- Qualified or unqualified+        : conid              { $1 }+        | QCONID             { sL1 $1 $! mkQual dataName (getQCONID $1) }++conid   :: { Located RdrName }+        : CONID                { sL1 $1 $ mkUnqual dataName (getCONID $1) }++qconsym :: { Located RdrName }  -- Qualified or unqualified+        : consym               { $1 }+        | QCONSYM              { sL1 $1 $ mkQual dataName (getQCONSYM $1) }++consym :: { Located RdrName }+        : CONSYM              { sL1 $1 $ mkUnqual dataName (getCONSYM $1) }++        -- ':' means only list cons+        | ':'                { sL1 $1 $ consDataCon_RDR }+++-----------------------------------------------------------------------------+-- Literals++literal :: { Located (HsLit GhcPs) }+        : CHAR              { sL1 $1 $ HsChar       (getCHARs $1) $ getCHAR $1 }+        | STRING            { sL1 $1 $ HsString     (getSTRINGs $1)+                                                    $ getSTRING $1 }+        | PRIMINTEGER       { sL1 $1 $ HsIntPrim    (getPRIMINTEGERs $1)+                                                    $ getPRIMINTEGER $1 }+        | PRIMWORD          { sL1 $1 $ HsWordPrim   (getPRIMWORDs $1)+                                                    $ getPRIMWORD $1 }+        | PRIMCHAR          { sL1 $1 $ HsCharPrim   (getPRIMCHARs $1)+                                                    $ getPRIMCHAR $1 }+        | PRIMSTRING        { sL1 $1 $ HsStringPrim (getPRIMSTRINGs $1)+                                                    $ getPRIMSTRING $1 }+        | PRIMFLOAT         { sL1 $1 $ HsFloatPrim  noExt $ getPRIMFLOAT $1 }+        | PRIMDOUBLE        { sL1 $1 $ HsDoublePrim noExt $ getPRIMDOUBLE $1 }++-----------------------------------------------------------------------------+-- Layout++close :: { () }+        : vccurly               { () } -- context popped in lexer.+        | error                 {% popContext }++-----------------------------------------------------------------------------+-- Miscellaneous (mostly renamings)++modid   :: { Located ModuleName }+        : CONID                 { sL1 $1 $ mkModuleNameFS (getCONID $1) }+        | QCONID                { sL1 $1 $ let (mod,c) = getQCONID $1 in+                                  mkModuleNameFS+                                   (mkFastString+                                     (unpackFS mod ++ '.':unpackFS c))+                                }++commas :: { ([SrcSpan],Int) }   -- One or more commas+        : commas ','             { ((fst $1)++[gl $2],snd $1 + 1) }+        | ','                    { ([gl $1],1) }++bars0 :: { ([SrcSpan],Int) }     -- Zero or more bars+        : bars                   { $1 }+        |                        { ([], 0) }++bars :: { ([SrcSpan],Int) }     -- One or more bars+        : bars '|'               { ((fst $1)++[gl $2],snd $1 + 1) }+        | '|'                    { ([gl $1],1) }++-----------------------------------------------------------------------------+-- Documentation comments++docnext :: { LHsDocString }+  : DOCNEXT {% return (sL1 $1 (mkHsDocString (getDOCNEXT $1))) }++docprev :: { LHsDocString }+  : DOCPREV {% return (sL1 $1 (mkHsDocString (getDOCPREV $1))) }++docnamed :: { Located (String, HsDocString) }+  : DOCNAMED {%+      let string = getDOCNAMED $1+          (name, rest) = break isSpace string+      in return (sL1 $1 (name, mkHsDocString rest)) }++docsection :: { Located (Int, HsDocString) }+  : DOCSECTION {% let (n, doc) = getDOCSECTION $1 in+        return (sL1 $1 (n, mkHsDocString doc)) }++moduleheader :: { Maybe LHsDocString }+        : DOCNEXT {% let string = getDOCNEXT $1 in+                     return (Just (sL1 $1 (mkHsDocString string))) }++maybe_docprev :: { Maybe LHsDocString }+        : docprev                       { Just $1 }+        | {- empty -}                   { Nothing }++maybe_docnext :: { Maybe LHsDocString }+        : docnext                       { Just $1 }+        | {- empty -}                   { Nothing }++{+happyError :: P a+happyError = srcParseFail++getVARID        (L _ (ITvarid    x)) = x+getCONID        (L _ (ITconid    x)) = x+getVARSYM       (L _ (ITvarsym   x)) = x+getCONSYM       (L _ (ITconsym   x)) = x+getQVARID       (L _ (ITqvarid   x)) = x+getQCONID       (L _ (ITqconid   x)) = x+getQVARSYM      (L _ (ITqvarsym  x)) = x+getQCONSYM      (L _ (ITqconsym  x)) = x+getIPDUPVARID   (L _ (ITdupipvarid   x)) = x+getLABELVARID   (L _ (ITlabelvarid   x)) = x+getCHAR         (L _ (ITchar   _ x)) = x+getSTRING       (L _ (ITstring _ x)) = x+getINTEGER      (L _ (ITinteger x))  = x+getRATIONAL     (L _ (ITrational x)) = x+getPRIMCHAR     (L _ (ITprimchar _ x)) = x+getPRIMSTRING   (L _ (ITprimstring _ x)) = x+getPRIMINTEGER  (L _ (ITprimint  _ x)) = x+getPRIMWORD     (L _ (ITprimword _ x)) = x+getPRIMFLOAT    (L _ (ITprimfloat x)) = x+getPRIMDOUBLE   (L _ (ITprimdouble x)) = x+getTH_ID_SPLICE (L _ (ITidEscape x)) = x+getTH_ID_TY_SPLICE (L _ (ITidTyEscape x)) = x+getINLINE       (L _ (ITinline_prag _ inl conl)) = (inl,conl)+getSPEC_INLINE  (L _ (ITspec_inline_prag _ True))  = (Inline,  FunLike)+getSPEC_INLINE  (L _ (ITspec_inline_prag _ False)) = (NoInline,FunLike)+getCOMPLETE_PRAGs (L _ (ITcomplete_prag x)) = x++getDOCNEXT (L _ (ITdocCommentNext x)) = x+getDOCPREV (L _ (ITdocCommentPrev x)) = x+getDOCNAMED (L _ (ITdocCommentNamed x)) = x+getDOCSECTION (L _ (ITdocSection n x)) = (n, x)++getINTEGERs     (L _ (ITinteger (IL src _ _))) = src+getCHARs        (L _ (ITchar       src _)) = src+getSTRINGs      (L _ (ITstring     src _)) = src+getPRIMCHARs    (L _ (ITprimchar   src _)) = src+getPRIMSTRINGs  (L _ (ITprimstring src _)) = src+getPRIMINTEGERs (L _ (ITprimint    src _)) = src+getPRIMWORDs    (L _ (ITprimword   src _)) = src++-- See Note [Pragma source text] in BasicTypes for the following+getINLINE_PRAGs       (L _ (ITinline_prag       src _ _)) = src+getSPEC_PRAGs         (L _ (ITspec_prag         src))     = src+getSPEC_INLINE_PRAGs  (L _ (ITspec_inline_prag  src _))   = src+getSOURCE_PRAGs       (L _ (ITsource_prag       src)) = src+getRULES_PRAGs        (L _ (ITrules_prag        src)) = src+getWARNING_PRAGs      (L _ (ITwarning_prag      src)) = src+getDEPRECATED_PRAGs   (L _ (ITdeprecated_prag   src)) = src+getSCC_PRAGs          (L _ (ITscc_prag          src)) = src+getGENERATED_PRAGs    (L _ (ITgenerated_prag    src)) = src+getCORE_PRAGs         (L _ (ITcore_prag         src)) = src+getUNPACK_PRAGs       (L _ (ITunpack_prag       src)) = src+getNOUNPACK_PRAGs     (L _ (ITnounpack_prag     src)) = src+getANN_PRAGs          (L _ (ITann_prag          src)) = src+getMINIMAL_PRAGs      (L _ (ITminimal_prag      src)) = src+getOVERLAPPABLE_PRAGs (L _ (IToverlappable_prag src)) = src+getOVERLAPPING_PRAGs  (L _ (IToverlapping_prag  src)) = src+getOVERLAPS_PRAGs     (L _ (IToverlaps_prag     src)) = src+getINCOHERENT_PRAGs   (L _ (ITincoherent_prag   src)) = src+getCTYPEs             (L _ (ITctype             src)) = src++getStringLiteral l = StringLiteral (getSTRINGs l) (getSTRING l)++isUnicode :: Located Token -> Bool+isUnicode (L _ (ITforall         iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITdarrow         iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITdcolon         iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITlarrow         iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITrarrow         iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITlarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITrarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITLarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITRarrowtail     iu)) = iu == UnicodeSyntax+isUnicode (L _ (IToparenbar      iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITcparenbar      iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITopenExpQuote _ iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITcloseQuote     iu)) = iu == UnicodeSyntax+isUnicode (L _ (ITstar           iu)) = iu == UnicodeSyntax+isUnicode _                           = False++hasE :: Located Token -> Bool+hasE (L _ (ITopenExpQuote HasE _)) = True+hasE (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 :: Located a -> Located b -> SrcSpan+comb2 a b = a `seq` b `seq` combineLocs a b++comb3 :: Located a -> Located b -> Located c -> SrcSpan+comb3 a b c = a `seq` b `seq` c `seq`+    combineSrcSpans (getLoc a) (combineSrcSpans (getLoc b) (getLoc c))++comb4 :: Located a -> Located b -> Located c -> Located 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 :: SrcSpan -> a -> Located a+sL span a = span `seq` a `seq` L 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 :: a -> Located a+sL0 = L noSrcSpan       -- #define L0   L noSrcSpan++{-# INLINE sL1 #-}+sL1 :: Located a -> b -> Located b+sL1 x = sL (getLoc x)   -- #define sL1   sL (getLoc $1)++{-# INLINE sLL #-}+sLL :: Located a -> Located b -> c -> Located 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 <- getSrcLoc;+  let loc = mkSrcLoc (srcLocFile l) 1 1;+  return (mkSrcSpan loc loc)++-- Hint about the MultiWayIf extension+hintMultiWayIf :: SrcSpan -> P ()+hintMultiWayIf span = do+  mwiEnabled <- liftM ((LangExt.MultiWayIf `extopt`) . options) getPState+  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 <- liftM ((LangExt.MultiWayIf `extopt`) . options) getPState+  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, assuming UnicodeSyntax is on+hintExplicitForall :: SrcSpan -> P ()+hintExplicitForall span = do+    forall      <- extension explicitForallEnabled+    rulePrag    <- extension inRulePrag+    unless (forall || rulePrag) $ parseErrorSDoc span $ vcat+      [ text "Illegal symbol '\x2200' in type" -- U+2200 FOR ALL+      , text "Perhaps you intended to use RankNTypes or a similar language"+      , text "extension to enable explicit-forall syntax: \x2200 <tvs>. <type>"+      ]++-- Hint about explicit-forall, assuming UnicodeSyntax is off+hintExplicitForall' :: SrcSpan -> P (GenLocated SrcSpan RdrName)+hintExplicitForall' span = do+    forall    <- extension explicitForallEnabled+    let illegalDot = "Illegal symbol '.' in type"+    if forall+      then parseErrorSDoc span $ vcat+        [ text illegalDot+        , text "Perhaps you meant to write 'forall <tvs>. <type>'?"+        ]+      else parseErrorSDoc span $ vcat+        [ text illegalDot+        , text "Perhaps you intended to use RankNTypes or a similar language"+        , text "extension to enable explicit-forall syntax: forall <tvs>. <type>"+        ]++-- 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 (GenLocated SrcSpan (HsExpr GhcPs))+reportEmptyDoubleQuotes span = do+    thEnabled <- liftM ((LangExt.TemplateHaskellQuotes `extopt`) . options) getPState+    if thEnabled+      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 :: AnnKeywordId -> Located e -> AddAnn+mj a l s = addAnnotation s a (gl 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@(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 = getLoc++-- |Add an annotation to the located element, and return the located+-- element as a pass through+aa :: Located a -> (AnnKeywordId,Located c) -> P (Located a)+aa a@(L l _) (b,s) = addAnnotation l b (gl s) >> return a++-- |Add an annotation to a located element resulting from a monadic action+am :: P (Located a) -> (AnnKeywordId, Located b) -> P (Located a)+am a (b,s) = do+  av@(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@(L l _) bs = addAnnsAt l bs >> return a++-- |Add all [AddAnn] to an AST element wrapped in a Just+aljs :: Located (Maybe a) -> [AddAnn] -> P (Located (Maybe a))+aljs a@(L l _) bs = addAnnsAt l bs >> return a++-- |Add all [AddAnn] to an AST element wrapped in a Just+ajs a@(Just (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 :: P (Located a) -> [AddAnn] -> P (Located a)+amms a bs = do { av@(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 :: Located a -> [AddAnn] -> P (OrdList (Located a))+amsu a@(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 (\s -> mj AnnCommaTuple (L s ())) 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 (\s -> mj AnnVbar (L s ())) ss++-- |Get the location of the last element of a OrdList, or noSrcSpan+oll :: OrdList (Located 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 :: [Located a] -> Located b -> Located a -> P()+asl [] (L ls _) (L l _) = addAnnotation l          AnnSemi ls+asl (x:_xs) (L ls _) _x = addAnnotation (getLoc x) AnnSemi ls+}
parser/RdrHsSyn.hs view
@@ -7,6 +7,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE MagicHash #-}  module   RdrHsSyn (         mkHsOpApp,@@ -41,8 +42,10 @@          -- Bunch of functions in the parser monad for         -- checking and constructing values+        checkBlockArguments,         checkPrecP,           -- Int -> P Int         checkContext,         -- HsType -> P HsContext+        checkInfixConstr,         checkPattern,         -- HsExp -> P HsPat         bang_RDR,         checkPatterns,        -- SrcLoc -> [HsExp] -> P [HsPat]@@ -52,8 +55,10 @@         checkValSigLhs,         checkDoAndIfThenElse,         checkRecordSyntax,-        parseErrorSDoc,-        splitTilde, splitTildeApps,+        checkEmptyGADTs,+        parseErrorSDoc, hintBangPat,+        splitTilde,+        TyEl(..), mergeOps,          -- Help with processing exports         ImpExpSubSpec(..),@@ -63,12 +68,15 @@         mkImpExpSubSpec,         checkImportSpec, +        -- Warnings and errors+        warnStarIsType,+        failOpFewArgs,+         SumOrTuple (..), mkSumOrTuple      ) where  import GhcPrelude- import HsSyn            -- Lots of it import Class            ( FunDep ) import TyCon            ( TyCon, isTupleTyCon, tyConSingleDataCon_maybe )@@ -84,8 +92,7 @@ import Type             ( TyThing(..) ) import TysWiredIn       ( cTupleTyConName, tupleTyCon, tupleDataCon,                           nilDataConName, nilDataConKey,-                          listTyConName, listTyConKey,-                          starKindTyConName, unicodeStarKindTyConName )+                          listTyConName, listTyConKey ) import ForeignCall import PrelNames        ( forall_tv_RDR, eqTyCon_RDR, allNameStrings ) import SrcLoc@@ -97,9 +104,10 @@ import Maybes import Util import ApiAnnotation+import HsExtension      ( noExt ) import Data.List import qualified GHC.LanguageExtensions as LangExt-import MonadUtils+import DynFlags ( WarningFlag(..) )  import Control.Monad import Text.ParserCombinators.ReadP as ReadP@@ -126,11 +134,11 @@  --         *** See Note [The Naming story] in HsDecls **** -mkTyClD :: LTyClDecl n -> LHsDecl n-mkTyClD (L loc d) = L loc (TyClD d)+mkTyClD :: LTyClDecl (GhcPass p) -> LHsDecl (GhcPass p)+mkTyClD (L loc d) = L loc (TyClD noExt d) -mkInstD :: LInstDecl n -> LHsDecl n-mkInstD (L loc d) = L loc (InstD d)+mkInstD :: LInstDecl (GhcPass p) -> LHsDecl (GhcPass p)+mkInstD (L loc d) = L loc (InstD noExt d)  mkClassDecl :: SrcSpan             -> Located (Maybe (LHsContext GhcPs), LHsType GhcPs)@@ -145,13 +153,14 @@        ; mapM_ (\a -> a loc) ann -- Add any API Annotations to the top SrcSpan        ; tyvars <- checkTyVarsP (text "class") whereDots cls tparams        ; at_defs <- mapM (eitherToP . mkATDefault) at_insts-       ; return (L loc (ClassDecl { tcdCtxt = cxt, tcdLName = cls, tcdTyVars = tyvars+       ; return (L 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-                                  , tcdFVs = placeHolderNames })) }+                                  , tcdATs = ats, tcdATDefs = at_defs+                                  , tcdDocs  = docs })) }  mkATDefault :: LTyFamInstDecl GhcPs             -> Either (SrcSpan, SDoc) (LTyFamDefltEqn GhcPs)@@ -165,10 +174,13 @@       | FamEqn { feqn_tycon = tc, feqn_pats = pats, feqn_fixity = fixity                , feqn_rhs = rhs } <- e       = do { tvs <- checkTyVars (text "default") equalsDots tc pats-           ; return (L loc (FamEqn { feqn_tycon  = tc+           ; return (L loc (FamEqn { feqn_ext    = noExt+                                   , feqn_tycon  = tc                                    , feqn_pats   = tvs                                    , feqn_fixity = fixity                                    , feqn_rhs    = rhs })) }+mkATDefault (L _ (TyFamInstDecl (HsIB _ (XFamEqn _)))) = panic "mkATDefault"+mkATDefault (L _ (TyFamInstDecl (XHsImplicitBndrs _))) = panic "mkATDefault"  mkTyData :: SrcSpan          -> NewOrData@@ -183,11 +195,10 @@        ; mapM_ (\a -> a loc) ann -- Add any API Annotations to the top SrcSpan        ; tyvars <- checkTyVarsP (ppr new_or_data) equalsDots tc tparams        ; defn <- mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv-       ; return (L loc (DataDecl { tcdLName = tc, tcdTyVars = tyvars,+       ; return (L loc (DataDecl { tcdDExt = noExt,+                                   tcdLName = tc, tcdTyVars = tyvars,                                    tcdFixity = fixity,-                                   tcdDataDefn = defn,-                                   tcdDataCusk = PlaceHolder,-                                   tcdFVs = placeHolderNames })) }+                                   tcdDataDefn = defn })) }  mkDataDefn :: NewOrData            -> Maybe (Located CType)@@ -199,7 +210,8 @@ mkDataDefn new_or_data cType mcxt ksig data_cons maybe_deriv   = do { checkDatatypeContext mcxt        ; let cxt = fromMaybe (noLoc []) mcxt-       ; return (HsDataDefn { dd_ND = new_or_data, dd_cType = cType+       ; return (HsDataDefn { dd_ext = noExt+                            , dd_ND = new_or_data, dd_cType = cType                             , dd_ctxt = cxt                             , dd_cons = data_cons                             , dd_kindSig = ksig@@ -214,9 +226,10 @@   = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs        ; mapM_ (\a -> a loc) ann -- Add any API Annotations to the top SrcSpan        ; tyvars <- checkTyVarsP (text "type") equalsDots tc tparams-       ; return (L loc (SynDecl { tcdLName = tc, tcdTyVars = tyvars+       ; return (L loc (SynDecl { tcdSExt = noExt+                                , tcdLName = tc, tcdTyVars = tyvars                                 , tcdFixity = fixity-                                , tcdRhs = rhs, tcdFVs = placeHolderNames })) }+                                , tcdRhs = rhs })) }  mkTyFamInstEqn :: LHsType GhcPs                -> LHsType GhcPs@@ -224,7 +237,8 @@ mkTyFamInstEqn lhs rhs   = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs        ; return (mkHsImplicitBndrs-                  (FamEqn { feqn_tycon  = tc+                  (FamEqn { feqn_ext    = noExt+                          , feqn_tycon  = tc                           , feqn_pats   = tparams                           , feqn_fixity = fixity                           , feqn_rhs    = rhs }),@@ -242,17 +256,18 @@   = 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 (L loc (DataFamInstD (DataFamInstDecl (mkHsImplicitBndrs-                  (FamEqn { feqn_tycon = tc-                          , feqn_pats = tparams+       ; return (L loc (DataFamInstD noExt (DataFamInstDecl (mkHsImplicitBndrs+                  (FamEqn { feqn_ext    = noExt+                          , feqn_tycon  = tc+                          , feqn_pats   = tparams                           , feqn_fixity = fixity-                          , feqn_rhs = defn }))))) }+                          , feqn_rhs    = defn }))))) }  mkTyFamInst :: SrcSpan             -> TyFamInstEqn GhcPs             -> P (LInstDecl GhcPs) mkTyFamInst loc eqn-  = return (L loc (TyFamInstD (TyFamInstDecl eqn)))+  = return (L loc (TyFamInstD noExt (TyFamInstDecl eqn)))  mkFamDecl :: SrcSpan           -> FamilyInfo GhcPs@@ -264,7 +279,9 @@   = do { (tc, tparams, fixity, ann) <- checkTyClHdr False lhs        ; mapM_ (\a -> a loc) ann -- Add any API Annotations to the top SrcSpan        ; tyvars <- checkTyVarsP (ppr info) equals_or_where tc tparams-       ; return (L loc (FamDecl (FamilyDecl{ fdInfo      = info, fdLName = tc+       ; return (L loc (FamDecl noExt (FamilyDecl+                                           { fdExt       = noExt+                                           , fdInfo      = info, fdLName = tc                                            , fdTyVars    = tyvars                                            , fdFixity    = fixity                                            , fdResultSig = ksig@@ -286,14 +303,15 @@ -- Typed splices are not allowed at the top level, thus we do not represent them -- as spliced declaration.  See #10945 mkSpliceDecl lexpr@(L loc expr)-  | HsSpliceE splice@(HsUntypedSplice {}) <- expr-  = SpliceD (SpliceDecl (L loc splice) ExplicitSplice)+  | HsSpliceE _ splice@(HsUntypedSplice {}) <- expr+  = SpliceD noExt (SpliceDecl noExt (L loc splice) ExplicitSplice) -  | HsSpliceE splice@(HsQuasiQuote {}) <- expr-  = SpliceD (SpliceDecl (L loc splice) ExplicitSplice)+  | HsSpliceE _ splice@(HsQuasiQuote {}) <- expr+  = SpliceD noExt (SpliceDecl noExt (L loc splice) ExplicitSplice)    | otherwise-  = SpliceD (SpliceDecl (L loc (mkUntypedSplice NoParens lexpr)) ImplicitSplice)+  = SpliceD noExt (SpliceDecl noExt (L loc (mkUntypedSplice NoParens lexpr))+                              ImplicitSplice)  mkRoleAnnotDecl :: SrcSpan                 -> Located RdrName                -- type being annotated@@ -301,7 +319,7 @@                 -> P (LRoleAnnotDecl GhcPs) mkRoleAnnotDecl loc tycon roles   = do { roles' <- mapM parse_role roles-       ; return $ L loc $ RoleAnnotDecl tycon roles' }+       ; return $ L loc $ RoleAnnotDecl noExt tycon roles' }   where     role_data_type = dataTypeOf (undefined :: Role)     all_roles = map fromConstr $ dataTypeConstrs role_data_type@@ -339,17 +357,17 @@ cvTopDecls decls = go (fromOL decls)   where     go :: [LHsDecl GhcPs] -> [LHsDecl GhcPs]-    go []                   = []-    go (L l (ValD b) : ds)  = L l' (ValD b') : go ds'+    go []                     = []+    go (L l (ValD x b) : ds)  = L l' (ValD x b') : go ds'                             where (L l' b', ds') = getMonoBind (L l b) ds-    go (d : ds)             = d : go 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 $ ValBindsIn mbs sigs }+         return $ ValBinds noExt mbs sigs }  cvBindsAndSigs :: OrdList (LHsDecl GhcPs)   -> P (LHsBinds GhcPs, [LSig GhcPs], [LFamilyDecl GhcPs]@@ -360,7 +378,7 @@ cvBindsAndSigs fb = go (fromOL fb)   where     go []              = return (emptyBag, [], [], [], [], [])-    go (L l (ValD b) : ds)+    go (L l (ValD _ b) : ds)       = do { (bs, ss, ts, tfis, dfis, docs) <- go ds'            ; return (b' `consBag` bs, ss, ts, tfis, dfis, docs) }       where@@ -368,17 +386,17 @@     go (L l decl : ds)       = do { (bs, ss, ts, tfis, dfis, docs) <- go ds            ; case decl of-               SigD s+               SigD _ s                  -> return (bs, L l s : ss, ts, tfis, dfis, docs)-               TyClD (FamDecl t)+               TyClD _ (FamDecl _ t)                  -> return (bs, ss, L l t : ts, tfis, dfis, docs)-               InstD (TyFamInstD { tfid_inst = tfi })+               InstD _ (TyFamInstD { tfid_inst = tfi })                  -> return (bs, ss, ts, L l tfi : tfis, dfis, docs)-               InstD (DataFamInstD { dfid_inst = dfi })+               InstD _ (DataFamInstD { dfid_inst = dfi })                  -> return (bs, ss, ts, tfis, L l dfi : dfis, docs)-               DocD d+               DocD _ d                  -> return (bs, ss, ts, tfis, dfis, L l d : docs)-               SpliceD d+               SpliceD _ d                  -> parseErrorSDoc l $                     hang (text "Declaration splices are allowed only" <+>                           text "at the top level:")@@ -410,12 +428,12 @@   = go mtchs1 loc1 binds []   where     go mtchs loc-       (L loc2 (ValD (FunBind { fun_id = L _ f2,-                                fun_matches-                                  = MG { mg_alts = L _ mtchs2 } })) : binds) _+       (L loc2 (ValD _ (FunBind { fun_id = L _ f2,+                                  fun_matches+                                    = MG { mg_alts = L _ mtchs2 } })) : binds) _         | f1 == f2 = go (mtchs2 ++ mtchs)                         (combineSrcSpans loc loc2) binds []-    go mtchs loc (doc_decl@(L loc2 (DocD _)) : binds) doc_decls+    go mtchs loc (doc_decl@(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@@ -433,6 +451,7 @@         -- 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 ((L _ (XMatch _)) : _) = panic "has_args"  {- ********************************************************************** @@ -454,7 +473,8 @@  * Parse the data constructor declration as a type (actually btype_no_ops) -* Use 'splitCon' to rejig it into the data constructor and the args+* Use 'splitCon' to rejig it into the data constructor, the args, and possibly+  extract a docstring for the constructor  * In doing so, we use 'tyConToDataCon' to convert the RdrName for   the data con, which has been parsed as a tycon, back to a datacon.@@ -463,29 +483,59 @@      data T = (+++)   will parse ok (since tycons can be operators), but we should reject   it (Trac #12051).++'splitCon' takes a reversed list @apps@ of types as input, such that+@foldl1 mkHsAppTy (reverse apps)@ yields the original type. This is because+this is easy for the parser to produce and we avoid the overhead of unrolling+'HsAppTy'.+ -} -splitCon :: LHsType GhcPs-      -> P (Located RdrName, HsConDeclDetails GhcPs)+splitCon :: [LHsType GhcPs]+      -> P ( Located RdrName         -- constructor name+           , HsConDeclDetails GhcPs  -- constructor field information+           , Maybe LHsDocString      -- docstring to go on the constructor+           ) -- See Note [Parsing data constructors is hard] -- This gets given a "type" that should look like --      C Int Bool -- or   C { x::Int, y::Bool } -- and returns the pieces-splitCon ty- = split ty []+splitCon apps+ = split apps' []  where-   -- This is used somewhere where HsAppsTy is not used-   split (L _ (HsAppTy t u)) ts       = split t (u : ts)-   split (L l (HsTyVar _ (L _ tc)))  ts = do data_con <- tyConToDataCon l tc-                                             return (data_con, mk_rest ts)-   split (L l (HsTupleTy HsBoxedOrConstraintTuple ts)) []-      = return (L l (getRdrName (tupleDataCon Boxed (length ts))), PrefixCon ts)-   split (L l _) _ = parseErrorSDoc l (text "Cannot parse data constructor in a data/newtype declaration:" <+> ppr ty)+   oneDoc = [ () | L _ (HsDocTy{}) <- apps ] `lengthIs` 1+   ty = foldl1 mkHsAppTy (reverse apps) -   mk_rest [L l (HsRecTy flds)] = RecCon (L l flds)-   mk_rest ts                   = PrefixCon ts+   -- the trailing doc, if any, can be extracted first+   (apps', trailing_doc)+     = case apps of+         L _ (HsDocTy _ t ds) : ts | oneDoc -> (t : ts, Just ds)+         ts -> (ts, Nothing) +   -- A comment on the constructor is handled a bit differently - it doesn't+   -- remain an 'HsDocTy', but gets lifted out and returned as the third+   -- element of the tuple.+   split [ L _ (HsDocTy _ con con_doc) ] ts = do+     (data_con, con_details, con_doc') <- split [con] ts+     return (data_con, con_details, con_doc' `mplus` Just con_doc)+   split [ L l (HsTyVar _ _ (L _ tc)) ] ts = do+     data_con <- tyConToDataCon l tc+     return (data_con, mk_rest ts, trailing_doc)+   split [ L l (HsTupleTy _ HsBoxedOrConstraintTuple ts) ] []+     = return ( L l (getRdrName (tupleDataCon Boxed (length ts)))+              , PrefixCon ts+              , trailing_doc+              )+   split [ L l _ ] _ = parseErrorSDoc l (text msg <+> ppr ty)+     where msg = "Cannot parse data constructor in a data/newtype declaration:"+   split (u : us) ts = split us (u : ts)+   split _ _ = panic "RdrHsSyn:splitCon"++   mk_rest [L _ (HsDocTy _ t@(L _ HsRecTy{}) _)] = mk_rest [t]+   mk_rest [L l (HsRecTy _ flds)] = RecCon (L l flds)+   mk_rest ts                     = PrefixCon ts+ tyConToDataCon :: SrcSpan -> RdrName -> P (Located RdrName) -- See Note [Parsing data constructors is hard] -- Data constructor RHSs are parsed as types@@ -504,6 +554,22 @@           = text "Perhaps you intended to use ExistentialQuantification"           | otherwise = empty +-- | Split a type to extract the trailing doc string (if there is one) from a+-- type produced by the 'btype_no_ops' production.+splitDocTy :: LHsType GhcPs -> (LHsType GhcPs, Maybe LHsDocString)+splitDocTy (L l (HsAppTy x t1 t2)) = (L l (HsAppTy x t1 t2'), ds)+  where ~(t2', ds) = splitDocTy t2+splitDocTy (L _ (HsDocTy _ ty ds)) = (ty, Just ds)+splitDocTy ty = (ty, Nothing)++-- | Given a type that is a field to an infix data constructor, try to split+-- off a trailing docstring on the type, and check that there are no other+-- docstrings.+checkInfixConstr :: LHsType GhcPs -> P (LHsType GhcPs, Maybe LHsDocString)+checkInfixConstr ty = checkNoDocs msg ty' *> pure (ty', doc_string)+  where (ty', doc_string) = splitDocTy ty+        msg = text "infix constructor field"+ mkPatSynMatchGroup :: Located RdrName                    -> Located (OrdList (LHsDecl GhcPs))                    -> P (MatchGroup GhcPs (LHsExpr GhcPs))@@ -512,16 +578,21 @@        ; when (null matches) (wrongNumberErr loc)        ; return $ mkMatchGroup FromSource matches }   where-    fromDecl (L loc decl@(ValD (PatBind pat@(L _ (ConPatIn ln@(L _ name) details)) rhs _ _ _))) =+    fromDecl (L loc decl@(ValD _ (PatBind _+                                   pat@(L _ (ConPatIn ln@(L _ name) details))+                                   rhs _))) =         do { unless (name == patsyn_name) $                wrongNameBindingErr loc decl            ; match <- case details of-               PrefixCon pats -> return $ Match { m_ctxt = ctxt, m_pats = pats+               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_ctxt = ctxt, m_pats = [p1, p2]+               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 }@@ -552,25 +623,77 @@     ppr pat  mkConDeclH98 :: Located RdrName -> Maybe [LHsTyVarBndr GhcPs]-                -> LHsContext GhcPs -> HsConDeclDetails GhcPs+                -> Maybe (LHsContext GhcPs) -> HsConDeclDetails GhcPs                 -> ConDecl GhcPs -mkConDeclH98 name mb_forall cxt details-  = ConDeclH98 { con_name     = name-               , con_qvars    = fmap mkHsQTvs mb_forall-               , con_cxt      = Just cxt-                             -- AZ:TODO: when can cxt be Nothing?-                             --          remembering that () is a valid context.-               , con_details  = details-               , con_doc      = Nothing }+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]-           -> LHsSigType GhcPs     -- Always a HsForAllTy-           -> ConDecl GhcPs-mkGadtDecl names ty = ConDeclGADT { con_names = names-                                  , con_type  = ty-                                  , con_doc   = Nothing }+           -> LHsType GhcPs     -- Always a HsForAllTy+           -> (ConDecl GhcPs, [AddAnn])+mkGadtDecl names ty+  = (ConDeclGADT { con_g_ext  = noExt+                 , con_names  = names+                 , con_forall = L 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'@(L l _),anns1) = peel_parens ty []+    (tvs, rho) = splitLHsForAllTy ty'+    (mcxt, tau, anns2) = split_rho rho [] +    split_rho (L _ (HsQualTy { hst_ctxt = cxt, hst_body = tau })) ann+                                       = (Just cxt, tau, ann)+    split_rho (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 (L _ (HsFunTy _ (L loc (HsRecTy _ rf)) res_ty))+                                   = (RecCon (L loc rf), res_ty)+    split_tau tau                  = (PrefixCon [], tau)++    peel_parens (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 (L l (HsDocTy _ (L _ (HsBangTy _ s lty)) lds)) =+      L 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:@@ -656,23 +779,6 @@ really doesn't matter! -} --- | Note [Sorting out the result type]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--- In a GADT declaration which is not a record, we put the whole constr type--- into the res_ty for a ConDeclGADT for now; the renamer will unravel it once--- it has sorted out 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). On the other hand, for a record---         { x,y :: Int } -> a :*: b--- there is no doubt.  AND we need to sort records out so that--- we can bring x,y into scope.  So:---    * For PrefixCon we keep all the args in the res_ty---    * For RecCon we do not- checkTyVarsP :: SDoc -> SDoc -> Located RdrName -> [LHsType GhcPs]              -> P (LHsQTyVars GhcPs) -- Same as checkTyVars, but in the P monad@@ -694,16 +800,13 @@   = do { tvs <- mapM chk tparms        ; return (mkHsQTvs tvs) }   where--    chk (L _ (HsParTy ty)) = chk ty-    chk (L _ (HsAppsTy [L _ (HsAppPrefix ty)])) = chk ty+    chk (L _ (HsParTy _ ty)) = chk ty          -- Check that the name space is correct!-    chk (L l (HsKindSig-            (L _ (HsAppsTy [L _ (HsAppPrefix (L lv (HsTyVar _ (L _ tv))))])) k))-        | isRdrTyVar tv    = return (L l (KindedTyVar (L lv tv) k))-    chk (L l (HsTyVar _ (L ltv tv)))-        | isRdrTyVar tv    = return (L l (UserTyVar (L ltv tv)))+    chk (L l (HsKindSig _ (L lv (HsTyVar _ _ (L _ tv))) k))+        | isRdrTyVar tv    = return (L l (KindedTyVar noExt (L lv tv) k))+    chk (L l (HsTyVar _ _ (L ltv tv)))+        | isRdrTyVar tv    = return (L l (UserTyVar noExt (L ltv tv)))     chk t@(L loc _)         = Left (loc,                 vcat [ text "Unexpected type" <+> quotes (ppr t)@@ -736,6 +839,21 @@                       (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@(L span (_, []))               -- Empty GADT declaration.+    = do opts <- fmap options getPState+         if LangExt.GADTSyntax `extopt` opts         -- GADTs implies 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@@ -752,23 +870,20 @@   where     goL (L l ty) acc ann fix = go l ty acc ann fix -    go l (HsTyVar _ (L _ tc)) acc ann fix+    -- workaround to define '*' despite StarIsType+    go _ (HsParTy _ (L l (HsStarTy _ isUni))) acc ann fix+      = do { warnStarBndr l+           ; let name = mkOccName tcClsName (if isUni then "★" else "*")+           ; return (L l (Unqual name), acc, fix, ann) }++    go l (HsTyVar _ _ (L _ tc)) acc ann fix       | isRdrTc tc               = return (L l tc, acc, fix, ann)-    go _ (HsOpTy t1 ltc@(L _ tc) t2) acc ann _fix+    go _ (HsOpTy _ t1 ltc@(L _ tc) t2) acc ann _fix       | isRdrTc tc               = return (ltc, t1: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 (t2:acc) ann fix-    go _ (HsAppsTy ts)   acc ann _fix-      | Just (head, args, fixity) <- getAppsTyHead_maybe ts-      = goL head (args ++ acc) ann fixity--    go _ (HsAppsTy [L _ (HsAppInfix (L loc star))]) [] ann fix-      | isStar star-      = return (L loc (nameRdrName starKindTyConName), [], fix, ann)-      | isUniStar star-      = return (L loc (nameRdrName unicodeStarKindTyConName), [], fix, ann)+    go l (HsParTy _ ty)    acc ann fix = goL ty acc (ann ++mkParensApiAnn l) fix+    go _ (HsAppTy _ t1 t2) acc ann fix = goL t1 (t2:acc) ann fix -    go l (HsTupleTy HsBoxedOrConstraintTuple ts) [] ann fix+    go l (HsTupleTy _ HsBoxedOrConstraintTuple ts) [] ann fix       = return (L l (nameRdrName tup_name), ts, fix, ann)       where         arity = length ts@@ -779,6 +894,29 @@       = 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+      pState <- getPState+      unless (extopt LangExt.BlockArguments (options pState)) $+        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. --@@ -792,23 +930,33 @@ checkContext (L l orig_t)   = check [] (L l orig_t)  where-  check anns (L lp (HsTupleTy HsBoxedOrConstraintTuple ts))+  check anns (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,L l ts)                -- Ditto () -    -- don't let HsAppsTy get in the way-  check anns (L _ (HsAppsTy [L _ (HsAppPrefix ty)]))-    = check anns ty--  check anns (L lp1 (HsParTy ty))-- to be sure HsParTy doesn't get into the way+  check anns (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) -  check _anns _-    = return ([],L l [L l orig_t]) -- no need for anns, returning original+  -- no need for anns, returning original+  check _anns t = checkNoDocs msg t *> return ([],L l [L 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 (L _ (HsAppTy _ t1 t2)) = go t1 *> go t2+    go (L l (HsDocTy _ t ds)) = parseErrorSDoc l $ hsep+                                  [ text "Unexpected haddock", quotes (ppr ds)+                                  , text "on", msg, quotes (ppr t) ]+    go _ = pure ()+ -- ------------------------------------------------------------------------- -- Checking Patterns. @@ -826,7 +974,7 @@  checkPat :: SDoc -> SrcSpan -> LHsExpr GhcPs -> [LPat GhcPs]          -> P (LPat GhcPs)-checkPat _ loc (L l e@(HsVar (L _ c))) args+checkPat _ loc (L l e@(HsVar _ (L _ c))) args   | isRdrDataCon c = return (L loc (ConPatIn (L l c) (PrefixCon args)))   | not (null args) && patIsRec c =       patFail (text "Perhaps you intended to use RecursiveDo") l e@@ -836,7 +984,7 @@   | Just (e', args') <- splitBang e   = do  { args'' <- checkPatterns msg args'         ; checkPat msg loc e' (args'' ++ args) }-checkPat msg loc (L _ (HsApp f e)) args+checkPat msg loc (L _ (HsApp _ f e)) args   = do p <- checkLPat msg e        checkPat msg loc f (p : args) checkPat msg loc (L _ e) []@@ -850,77 +998,75 @@  pState <- getPState  let opts = options pState  case e0 of-   EWildPat -> return (WildPat placeHolderType)-   HsVar x  -> return (VarPat x)-   HsLit (HsStringPrim _ _) -- (#13260)+   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 l)+   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 (L loc pos_lit) Nothing)-   NegApp (L l (HsOverLit pos_lit)) _+   HsOverLit _ pos_lit          -> return (mkNPat (L loc pos_lit) Nothing)+   NegApp _ (L l (HsOverLit _ pos_lit)) _                         -> return (mkNPat (L l pos_lit) (Just noSyntaxExpr)) -   SectionR (L lb (HsVar (L _ bang))) e    -- (! x)+   SectionR _ (L lb (HsVar _ (L _ bang))) e    -- (! x)         | bang == bang_RDR-        -> do { bang_on <- extension bangPatEnabled-              ; if bang_on then do { e' <- checkLPat msg e-                                   ; addAnnotation loc AnnBang lb-                                   ; return  (BangPat e') }-                else parseErrorSDoc loc (text "Illegal bang-pattern (use BangPatterns):" $$ ppr e0) }+        -> do { hintBangPat loc e0+              ; e' <- checkLPat msg e+              ; addAnnotation loc AnnBang lb+              ; return  (BangPat noExt e') } -   ELazyPat e         -> checkLPat msg e >>= (return . LazyPat)-   EAsPat n e         -> checkLPat msg e >>= (return . AsPat n)+   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 expr p placeHolderType))-   ExprWithTySig e t   -> do e <- checkLPat msg e-                             return (SigPatIn e t)+   EViewPat _ expr patE -> checkLPat msg patE >>=+                            (return . (\p -> ViewPat noExt expr p))+   ExprWithTySig t e   -> do e <- checkLPat msg e+                             return (SigPat t e)     -- n+k patterns-   OpApp (L nloc (HsVar (L _ n))) (L _ (HsVar (L _ plus))) _-         (L lloc (HsOverLit lit@(OverLit {ol_val = HsIntegral {}})))+   OpApp _ (L nloc (HsVar _ (L _ n))) (L _ (HsVar _ (L _ plus)))+           (L lloc (HsOverLit _ lit@(OverLit {ol_val = HsIntegral {}})))                       | extopt LangExt.NPlusKPatterns opts && (plus == plus_RDR)                       -> return (mkNPlusKPat (L nloc n) (L lloc lit)) -   OpApp l (L cl (HsVar (L _ c))) _fix r+   OpApp _ l (L cl (HsVar _ (L _ c))) r      | isDataOcc (rdrNameOcc c) -> do          l <- checkLPat msg l          r <- checkLPat msg r          return (ConPatIn (L cl c) (InfixCon l r)) -   OpApp _l _op _fix _r -> patFail msg loc e0+   OpApp {}           -> patFail msg loc e0 -   HsPar e            -> checkLPat msg e >>= (return . ParPat)-   ExplicitList _ _ es  -> do ps <- mapM (checkLPat msg) es-                              return (ListPat ps placeHolderType Nothing)-   ExplicitPArr _ es  -> do ps <- mapM (checkLPat msg) es-                            return (PArrPat ps placeHolderType)+   ExplicitList _ _ es -> do ps <- mapM (checkLPat msg) es+                             return (ListPat noExt ps) -   ExplicitTuple es b+   HsPar _ e          -> checkLPat msg e >>= (return . (ParPat noExt))++   ExplicitTuple _ es b      | all tupArgPresent es  -> do ps <- mapM (checkLPat msg)-                                              [e | L _ (Present e) <- es]-                                   return (TuplePat ps b [])+                                              [e | 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+   ExplicitSum _ alt arity expr -> do      p <- checkLPat msg expr-     return (SumPat p alt arity placeHolderType)+     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 s)+   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 (noLoc pun_RDR))+placeHolderPunRhs = noLoc (HsVar noExt (noLoc pun_RDR))  plus_RDR, bang_RDR, pun_RDR :: RdrName plus_RDR = mkUnqual varName (fsLit "+") -- Hack@@ -954,7 +1100,7 @@ checkValDef msg _strictness lhs (Just sig) grhss         -- x :: ty = rhs  parses as a *pattern* binding   = checkPatBind msg (L (combineLocs lhs sig)-                        (ExprWithTySig lhs (mkLHsSigWcType sig))) grhss+                        (ExprWithTySig (mkLHsSigWcType sig) lhs)) grhss  checkValDef msg strictness lhs Nothing g@(L l (_,grhss))   = do  { mb_fun <- isFunLhs lhs@@ -979,7 +1125,8 @@         -- Add back the annotations stripped from any HsPar values in the lhs         -- mapM_ (\a -> a match_span) ann         return (ann, makeFunBind fun-                  [L match_span (Match { m_ctxt = FunRhs { mc_fun    = fun+                  [L match_span (Match { m_ext = noExt+                                       , m_ctxt = FunRhs { mc_fun    = fun                                                          , mc_fixity = is_infix                                                          , mc_strictness = strictness }                                        , m_pats = ps@@ -991,10 +1138,10 @@             -> HsBind GhcPs -- Like HsUtils.mkFunBind, but we need to be able to set the fixity too makeFunBind fn ms-  = FunBind { fun_id = fn,+  = FunBind { fun_ext = noExt,+              fun_id = fn,               fun_matches = mkMatchGroup FromSource ms,               fun_co_fn = idHsWrapper,-              bind_fvs = placeHolderNames,               fun_tick = [] }  checkPatBind :: SDoc@@ -1003,11 +1150,11 @@              -> P ([AddAnn],HsBind GhcPs) checkPatBind msg lhs (L _ (_,grhss))   = do  { lhs <- checkPattern msg lhs-        ; return ([],PatBind lhs grhss placeHolderType placeHolderNames+        ; return ([],PatBind noExt lhs grhss                     ([],[])) }  checkValSigLhs :: LHsExpr GhcPs -> P (Located RdrName)-checkValSigLhs (L _ (HsVar lrdr@(L _ v)))+checkValSigLhs (L _ (HsVar _ lrdr@(L _ v)))   | isUnqual v   , not (isDataOcc (rdrNameOcc v))   = return lrdr@@ -1029,9 +1176,9 @@     -- 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 (L _ (HsVar (L _ v))) = v == s-    looks_like s (L _ (HsApp lhs _))   = looks_like s lhs-    looks_like _ _                     = False+    looks_like s (L _ (HsVar _ (L _ v))) = v == s+    looks_like s (L _ (HsApp _ lhs _))   = looks_like s lhs+    looks_like _ _                       = False      foreign_RDR = mkUnqual varName (fsLit "foreign")     default_RDR = mkUnqual varName (fsLit "default")@@ -1064,13 +1211,13 @@         -- 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 (L _ (OpApp l_arg bang@(L _ (HsVar (L _ op))) _ r_arg))-  | op == bang_RDR = Just (l_arg, L l' (SectionR bang arg1) : argns)+splitBang (L _ (OpApp _ l_arg bang@(L _ (HsVar _ (L _ op))) r_arg))+  | op == bang_RDR = Just (l_arg, L l' (SectionR noExt bang arg1) : argns)   where     l' = combineLocs bang arg1     (arg1,argns) = split_bang r_arg []-    split_bang (L _ (HsApp f e)) es = split_bang f (e:es)-    split_bang e                 es = (e,es)+    split_bang (L _ (HsApp _ f e)) es = split_bang f (e:es)+    split_bang e                   es = (e,es) splitBang _ = Nothing  isFunLhs :: LHsExpr GhcPs@@ -1089,14 +1236,15 @@  isFunLhs e = go e [] []  where-   go (L loc (HsVar (L _ f))) es ann-        | not (isRdrDataCon f)       = return (Just (L loc f, Prefix, es, ann))-   go (L _ (HsApp f e)) es       ann = go f (e:es) ann-   go (L l (HsPar e))   es@(_:_) ann = go e es (ann ++ mkParensApiAnn l)+   go (L loc (HsVar _ (L _ f))) es ann+        | not (isRdrDataCon f)        = return (Just (L loc f, Prefix, es, ann))+   go (L _ (HsApp _ f e)) es       ann = go f (e:es) ann+   go (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 (L _ (SectionR (L _ (HsVar (L _ bang))) (L l (HsVar (L _ var))))) [] ann+   go (L _ (SectionR _ (L _ (HsVar _ (L _ bang))) (L l (HsVar _ (L _ var)))))+                                                                         [] ann         | bang == bang_RDR         , not (isRdrDataCon var)     = return (Just (L l var, Prefix, [], ann)) @@ -1113,7 +1261,7 @@         -- ToDo: what about this?         --              x + 1 `op` y = ... -   go e@(L loc (OpApp l (L loc' (HsVar (L _ op))) fix r)) es ann+   go e@(L loc (OpApp _ l (L loc' (HsVar _ (L _ op))) r)) es ann         | Just (e',es') <- splitBang e         = do { bang_on <- extension bangPatEnabled              ; if bang_on then go e' (es' ++ es) ann@@ -1127,59 +1275,83 @@                  Just (op', Infix, j : k : es', ann')                    -> return (Just (op', Infix, j : op_app : es', ann'))                    where-                     op_app = L loc (OpApp k (L loc' (HsVar (L loc' op))) fix r)+                     op_app = L loc (OpApp noExt k+                                       (L loc' (HsVar noExt (L loc' op))) r)                  _ -> return Nothing }    go _ _ _ = return Nothing ---- | Transform btype_no_ops with strict_mark's into HsEqTy's--- (((~a) ~b) c) ~d ==> ((~a) ~ (b c)) ~ d-splitTilde :: LHsType GhcPs -> P (LHsType GhcPs)-splitTilde t = go t-  where go (L loc (HsAppTy t1 t2))-          | L lo (HsBangTy (HsSrcBang NoSourceText NoSrcUnpack SrcLazy) t2')-                                                                          <- t2-          = do-              moveAnnotations lo loc-              t1' <- go t1-              return (L loc (HsEqTy t1' t2'))-          | otherwise-          = do-              t1' <- go t1-              case t1' of-                (L lo (HsEqTy tl tr)) -> do-                  let lr = combineLocs tr t2-                  moveAnnotations lo loc-                  return (L loc (HsEqTy tl (L lr (HsAppTy tr t2))))-                t -> do-                  return (L loc (HsAppTy t t2))--        go t = return t+-- | Transform a list of 'atype' with 'strict_mark' into+-- HsOpTy's of 'eqTyCon_RDR':+--+--   [~a, ~b, c, ~d] ==> (~a) ~ ((b c) ~ d)+--+-- See Note [Parsing ~]+splitTilde :: [LHsType GhcPs] -> P (LHsType GhcPs)+splitTilde [] = panic "splitTilde"+splitTilde (x:xs) = go x xs+  where+    -- We accumulate applications in the LHS until we encounter a laziness+    -- annotation. For example, if we have [Foo, x, y, ~Bar, z], the 'lhs'+    -- accumulator will become '(Foo x) y'. Then we strip the laziness+    -- annotation off 'Bar' and process the tail [Bar, z] recursively.+    --+    -- This leaves us with 'lhs = (Foo x) y' and 'rhs = Bar z'.+    -- In case the tail contained more laziness annotations, they would be+    -- processed similarly. This makes '~' right-associative.+    go lhs [] = return lhs+    go lhs (x:xs)+      | L loc (HsBangTy _ (HsSrcBang NoSourceText NoSrcUnpack SrcLazy) t) <- x+      = do { rhs <- splitTilde (t:xs)+           ; let r = mkLHsOpTy lhs (tildeOp loc) rhs+           ; moveAnnotations loc (getLoc r)+           ; return r }+      | otherwise+      = go (mkHsAppTy lhs x) xs +    tildeOp loc = L (srcSpanFirstCharacter loc) eqTyCon_RDR --- | Transform tyapps with strict_marks into uses of twiddle--- [~a, ~b, c, ~d] ==> (~a) ~ b c ~ d-splitTildeApps :: [LHsAppType GhcPs] -> P [LHsAppType GhcPs]-splitTildeApps []         = return []-splitTildeApps (t : rest) = do-  rest' <- concatMapM go rest-  return (t : rest')-  where go (L l (HsAppPrefix-            (L loc (HsBangTy-                    (HsSrcBang NoSourceText NoSrcUnpack SrcLazy)-                    ty))))-          = addAnnotation l AnnTilde tilde_loc >>-            return-              [L tilde_loc (HsAppInfix (L tilde_loc eqTyCon_RDR)),-               L l (HsAppPrefix ty)]-               -- NOTE: no annotation is attached to an HsAppPrefix, so the-               --       surrounding SrcSpan is not critical-          where-            tilde_loc = srcSpanFirstCharacter loc+-- | Either an operator or an operand.+data TyEl = TyElOpr RdrName | TyElOpd (HsType GhcPs) -        go t = return [t]+-- | 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.+mergeOps :: [Located TyEl] -> P (LHsType GhcPs)+mergeOps = go [] id+  where+    -- clause (a):+    -- when we encounter an operator, we must have accumulated+    -- something for its rhs, and there must be something left+    -- to build its lhs.+    go acc ops_acc (L l (TyElOpr op):xs) =+      if null acc || null xs+        then failOpFewArgs (L l op)+        else do { a <- splitTilde acc+                ; go [] (\c -> mkLHsOpTy c (L l op) (ops_acc a)) xs } +    -- clause (b):+    -- whenever an operand is encountered, it is added to the accumulator+    go acc ops_acc (L l (TyElOpd a):xs) = go (L l a:acc) ops_acc xs +    -- clause (c):+    -- at this point we know that 'acc' is non-empty because+    -- there are three options when 'acc' can be empty:+    -- 1. 'mergeOps' was called with an empty list, and this+    --    should never happen+    -- 2. 'mergeOps' was called with a list where the head is an+    --    operator, this is handled by clause (a)+    -- 3. 'mergeOps' was called with a list where the head is an+    --    operand, this is handled by clause (b)+    go acc ops_acc [] =+      do { a <- splitTilde acc+         ; return (ops_acc a) }  --------------------------------------------------------------------------- -- Check for monad comprehensions@@ -1207,34 +1379,35 @@ locMap f (L l a) = f l a >>= (\b -> return $ L l b)  checkCmd :: SrcSpan -> HsExpr GhcPs -> P (HsCmd GhcPs)-checkCmd _ (HsArrApp e1 e2 ptt haat b) =-    return $ HsCmdArrApp e1 e2 ptt haat b-checkCmd _ (HsArrForm e mf args) =-    return $ HsCmdArrForm e Prefix mf args-checkCmd _ (HsApp e1 e2) =-    checkCommand e1 >>= (\c -> return $ HsCmdApp c e2)-checkCmd _ (HsLam mg) =-    checkCmdMatchGroup mg >>= (\mg' -> return $ HsCmdLam mg')-checkCmd _ (HsPar e) =-    checkCommand e >>= (\c -> return $ HsCmdPar c)-checkCmd _ (HsCase e mg) =-    checkCmdMatchGroup mg >>= (\mg' -> return $ HsCmdCase e mg')-checkCmd _ (HsIf cf ep et ee) = do+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 cf ep pt pe-checkCmd _ (HsLet lb e) =-    checkCommand e >>= (\c -> return $ HsCmdLet lb c)-checkCmd _ (HsDo DoExpr (L l stmts) ty) =-    mapM checkCmdLStmt stmts >>= (\ss -> return $ HsCmdDo (L l ss) ty)+    return $ HsCmdIf noExt cf ep pt pe+checkCmd _ (HsLet _ lb e) =+    checkCommand e >>= (\c -> return $ HsCmdLet noExt lb c)+checkCmd _ (HsDo _ DoExpr (L l stmts)) =+    mapM checkCmdLStmt stmts >>=+    (\ss -> return $ HsCmdDo noExt (L l ss) ) -checkCmd _ (OpApp eLeft op _fixity eRight) = do+checkCmd _ (OpApp _ eLeft op eRight) = do     -- OpApp becomes a HsCmdArrForm with a (Just fixity) in it     c1 <- checkCommand eLeft     c2 <- checkCommand eRight-    let arg1 = L (getLoc c1) $ HsCmdTop c1 placeHolderType placeHolderType []-        arg2 = L (getLoc c2) $ HsCmdTop c2 placeHolderType placeHolderType []-    return $ HsCmdArrForm op Infix Nothing [arg1, arg2]+    let arg1 = L (getLoc c1) $ HsCmdTop noExt c1+        arg2 = L (getLoc c2) $ HsCmdTop noExt c2+    return $ HsCmdArrForm noExt op Infix Nothing [arg1, arg2]  checkCmd l e = cmdFail l e @@ -1242,39 +1415,44 @@ checkCmdLStmt = locMap checkCmdStmt  checkCmdStmt :: SrcSpan -> ExprStmt GhcPs -> P (CmdStmt GhcPs)-checkCmdStmt _ (LastStmt e s r) =-    checkCommand e >>= (\c -> return $ LastStmt c s r)-checkCmdStmt _ (BindStmt pat e b f t) =-    checkCommand e >>= (\c -> return $ BindStmt pat c b f t)-checkCmdStmt _ (BodyStmt e t g ty) =-    checkCommand e >>= (\c -> return $ BodyStmt c t g ty)-checkCmdStmt _ (LetStmt bnds) = return $ LetStmt bnds+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_stmts = ss }+    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 = L l ms }) = do     ms' <- mapM (locMap $ const convert) ms-    return $ mg { mg_alts = L l ms' }+    return $ mg { mg_ext = noExt, mg_alts = L l ms' }     where convert match@(Match { m_grhss = grhss }) = do             grhss' <- checkCmdGRHSs grhss-            return $ match { m_grhss = 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 grhss binds) = do+checkCmdGRHSs (GRHSs x grhss binds) = do     grhss' <- mapM checkCmdGRHS grhss-    return $ GRHSs grhss' binds+    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 stmts e) = do+    convert (GRHS x stmts e) = do         c <- checkCommand e --        cmdStmts <- mapM checkCmdLStmt stmts-        return $ GRHS {- cmdStmts -} stmts c+        return $ GRHS x {- cmdStmts -} stmts c+    convert (XGRHS _) = panic "checkCmdGRHS"   cmdFail :: SrcSpan -> HsExpr GhcPs -> P a@@ -1298,7 +1476,7 @@         -> ([LHsRecField GhcPs (LHsExpr GhcPs)], Bool)         -> P (HsExpr GhcPs) -mkRecConstrOrUpdate (L l (HsVar (L _ c))) _ (fs,dd)+mkRecConstrOrUpdate (L l (HsVar _ (L _ c))) _ (fs,dd)   | isRdrDataCon c   = return (mkRdrRecordCon (L l c) (mk_rec_fields fs dd)) mkRecConstrOrUpdate exp@(L l _) _ (fs,dd)@@ -1307,23 +1485,23 @@  mkRdrRecordUpd :: LHsExpr GhcPs -> [LHsRecUpdField GhcPs] -> HsExpr GhcPs mkRdrRecordUpd exp flds-  = RecordUpd { rupd_expr = exp-              , rupd_flds = flds-              , rupd_cons    = PlaceHolder, rupd_in_tys  = PlaceHolder-              , rupd_out_tys = PlaceHolder, rupd_wrap    = PlaceHolder }+  = RecordUpd { rupd_ext  = noExt+              , rupd_expr = exp+              , rupd_flds = flds }  mkRdrRecordCon :: Located RdrName -> HsRecordBinds GhcPs -> HsExpr GhcPs mkRdrRecordCon con flds-  = RecordCon { rcon_con_name = con, rcon_flds = flds-              , rcon_con_expr = noPostTcExpr, rcon_con_like = PlaceHolder }+  = 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 (L loc (FieldOcc rdr _)) arg pun)-  = HsRecField (L loc (Unambiguous rdr PlaceHolder)) arg pun+mk_rec_upd_field (HsRecField (L loc (FieldOcc _ rdr)) arg pun)+  = HsRecField (L loc (Unambiguous noExt rdr)) arg pun+mk_rec_upd_field (HsRecField (L _ (XFieldOcc _)) _ _)+  = panic "mk_rec_upd_field"  mkInlinePragma :: SourceText -> (InlineSpec, RuleMatchInfo) -> Maybe Activation                -> InlinePragma@@ -1380,10 +1558,10 @@         funcTarget = CFunction (StaticTarget esrc entity' Nothing True)         importSpec = CImport cconv safety Nothing funcTarget (L loc esrc) -    returnSpec spec = return $ ForD $ ForeignImport-          { fd_name   = v+    returnSpec spec = return $ ForD noExt $ ForeignImport+          { fd_i_ext  = noExt+          , fd_name   = v           , fd_sig_ty = ty-          , fd_co     = noForeignImportCoercionYet           , fd_fi     = spec           } @@ -1453,9 +1631,8 @@          -> (Located StringLiteral, Located RdrName, LHsSigType GhcPs)          -> P (HsDecl GhcPs) mkExport (L lc cconv) (L le (StringLiteral esrc entity), v, ty)- = return $ ForD $-   ForeignExport { fd_name = v, fd_sig_ty = ty-                 , fd_co = noForeignExportCoercionYet+ = return $ ForD noExt $+   ForeignExport { fd_e_ext = noExt, fd_name = v, fd_sig_ty = ty                  , fd_fe = CExport (L lc (CExportStatic esrc entity' cconv))                                    (L le esrc) }   where@@ -1488,11 +1665,11 @@   case subs of     ImpExpAbs       | isVarNameSpace (rdrNameSpace name)-                               -> return $ IEVar (L l (ieNameFromSpec specname))-      | otherwise              -> IEThingAbs . L l <$> nameT-    ImpExpAll                  -> IEThingAll . L l <$> nameT-    ImpExpList xs              ->-      (\newName -> IEThingWith (L l newName) NoIEWildcard (wrapped xs) [])+                         -> return $ IEVar noExt (L l (ieNameFromSpec specname))+      | otherwise        -> IEThingAbs noExt . L l <$> nameT+    ImpExpAll            -> IEThingAll noExt . L l <$> nameT+    ImpExpList xs        ->+      (\newName -> IEThingWith noExt (L l newName) NoIEWildcard (wrapped xs) [])         <$> nameT     ImpExpAllWith xs                       ->       do allowed <- extension patternSynonymsEnabled@@ -1502,7 +1679,8 @@                 pos   = maybe NoIEWildcard IEWildcard                           (findIndex isImpExpQcWildcard withs)                 ies   = wrapped $ filter (not . isImpExpQcWildcard . unLoc) xs-            in (\newName -> IEThingWith (L l newName) pos ies []) <$> nameT+            in (\newName+                        -> IEThingWith noExt (L l newName) pos ies []) <$> nameT           else parseErrorSDoc l             (text "Illegal export form (use PatternSynonyms to enable)")   where@@ -1539,7 +1717,7 @@  checkImportSpec :: Located [LIE GhcPs] -> P (Located [LIE GhcPs]) checkImportSpec ie@(L _ specs) =-    case [l | (L l (IEThingWith _ (IEWildcard _) _ _)) <- specs] of+    case [l | (L l (IEThingWith _ _ (IEWildcard _) _ _)) <- specs] of       [] -> return ie       (l:_) -> importSpecError l   where@@ -1563,11 +1741,49 @@ 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."+        $$ 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 (L loc op) =+  do { star_is_type <- extension starIsTypeEnabled+     ; let msg = too_few $$ starInfo star_is_type op+     ; parseErrorSDoc loc msg }+  where+    too_few = text "Operator applied to too few arguments:" <+> ppr op++----------------------------------------------------------------------------- -- 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 <- extension bangPatEnabled+    unless bang_on $+      parseErrorSDoc span+        (text "Illegal bang-pattern (use BangPatterns):" $$ ppr e)+ data SumOrTuple   = Sum ConTag Arity (LHsExpr GhcPs)   | Tuple [LHsTupArg GhcPs]@@ -1575,11 +1791,11 @@ mkSumOrTuple :: Boxity -> SrcSpan -> SumOrTuple -> P (HsExpr GhcPs)  -- Tuple-mkSumOrTuple boxity _ (Tuple es) = return (ExplicitTuple es boxity)+mkSumOrTuple boxity _ (Tuple es) = return (ExplicitTuple noExt es boxity)  -- Sum mkSumOrTuple Unboxed _ (Sum alt arity e) =-    return (ExplicitSum alt arity e PlaceHolder)+    return (ExplicitSum noExt alt arity e) mkSumOrTuple Boxed l (Sum alt arity (L _ e)) =     parseErrorSDoc l (hang (text "Boxed sums not supported:") 2 (ppr_boxed_sum alt arity e))   where@@ -1588,3 +1804,8 @@       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 L loc (mkHsOpTy x op y)
parser/cutils.c view
@@ -13,23 +13,6 @@ #include <unistd.h> #endif -/*-Calling 'strlen' and 'memcpy' directly gives problems with GCC's inliner,-and causes gcc to require too many registers on x84-*/--HsInt-ghc_strlen( HsPtr a )-{-    return (strlen((char *)a));-}--HsInt-ghc_memcmp( HsPtr a1, HsPtr a2, HsInt len )-{-    return (memcmp((char *)a1, a2, len));-}- void enableTimingStats( void )       /* called from the driver */ {
parser/cutils.h view
@@ -6,10 +6,5 @@  #include "HsFFI.h" -// Out-of-line string functions, see compiler/utils/FastString.hs-HsInt ghc_strlen( HsAddr a );-HsInt ghc_memcmp( HsAddr a1, HsAddr a2, HsInt len );-- void enableTimingStats( void ); void setHeapSize( HsInt size );
prelude/PrelInfo.hs view
@@ -252,7 +252,7 @@  = map (avail . idName) ghcPrimIds ++    map (avail . idName . primOpId) allThePrimOps ++    [ AvailTC n [n] []-   | tc <- funTyCon : primTyCons, let n = tyConName tc  ]+   | tc <- funTyCon : exposedPrimTyCons, let n = tyConName tc  ]  {- ************************************************************************
prelude/PrelNames.hs view
@@ -83,7 +83,6 @@  Note [Infinite families of known-key names] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- Infinite families of known-key things (e.g. tuples and sums) pose a tricky problem: we can't add them to the knownKeyNames finite map which we use to ensure that, e.g., a reference to (,) gets assigned the right unique (if this@@ -185,7 +184,7 @@ wired in ones are defined in TysWiredIn etc. -} -basicKnownKeyNames :: [Name]+basicKnownKeyNames :: [Name]  -- See Note [Known-key names] basicKnownKeyNames  = genericTyConNames  ++ [   --  Classes.  *Must* include:@@ -217,6 +216,7 @@         -- See Note [TyConRepNames for non-wired-in TyCons]         ioTyConName, ioDataConName,         runMainIOName,+        runRWName,          -- Type representation types         trModuleTyConName, trModuleDataConName,@@ -335,6 +335,7 @@         breakpointAutoName,  opaqueTyConName,         assertErrorName, traceName,         printName, fstName, sndName,+        dollarName,          -- Integer         integerTyConName, mkIntegerName,@@ -357,7 +358,9 @@          -- Natural         naturalTyConName,-        naturalFromIntegerName,+        naturalFromIntegerName, naturalToIntegerName,+        plusNaturalName, minusNaturalName, timesNaturalName, mkNaturalName,+        wordToNaturalName,          -- Float/Double         rationalToFloatName,@@ -434,7 +437,7 @@         , eqTyConName      ] ++ case cIntegerLibraryType of-           IntegerGMP    -> [integerSDataConName]+           IntegerGMP    -> [integerSDataConName,naturalSDataConName]            IntegerSimple -> []  genericTyConNames :: [Name]@@ -472,8 +475,8 @@  gHC_PRIM, gHC_TYPES, gHC_GENERICS, gHC_MAGIC,     gHC_CLASSES, gHC_BASE, gHC_ENUM, gHC_GHCI, gHC_CSTRING,-    gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER_TYPE, gHC_NATURAL, gHC_LIST,-    gHC_TUPLE, dATA_TUPLE, dATA_EITHER, dATA_STRING,+    gHC_SHOW, gHC_READ, gHC_NUM, gHC_MAYBE, gHC_INTEGER_TYPE, gHC_NATURAL,+    gHC_LIST, gHC_TUPLE, dATA_TUPLE, dATA_EITHER, 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,@@ -496,6 +499,7 @@ gHC_SHOW        = mkBaseModule (fsLit "GHC.Show") gHC_READ        = mkBaseModule (fsLit "GHC.Read") gHC_NUM         = mkBaseModule (fsLit "GHC.Num")+gHC_MAYBE       = mkBaseModule (fsLit "GHC.Maybe") gHC_INTEGER_TYPE= mkIntegerModule (fsLit "GHC.Integer.Type") gHC_NATURAL     = mkBaseModule (fsLit "GHC.Natural") gHC_LIST        = mkBaseModule (fsLit "GHC.List")@@ -542,9 +546,6 @@ dATA_COERCE     = mkBaseModule (fsLit "Data.Coerce") dEBUG_TRACE     = mkBaseModule (fsLit "Debug.Trace") -gHC_PARR' :: Module-gHC_PARR' = mkBaseModule (fsLit "GHC.PArr")- gHC_SRCLOC :: Module gHC_SRCLOC = mkBaseModule (fsLit "GHC.SrcLoc") @@ -884,8 +885,9 @@ wildCardName :: Name wildCardName = mkSystemVarName wildCardKey (fsLit "wild") -runMainIOName :: Name+runMainIOName, runRWName :: Name runMainIOName = varQual gHC_TOP_HANDLER (fsLit "runMainIO") runMainKey+runRWName     = varQual gHC_MAGIC       (fsLit "runRW#")    runRWKey  orderingTyConName, ltDataConName, eqDataConName, gtDataConName :: Name orderingTyConName = tcQual  gHC_TYPES (fsLit "Ordering") orderingTyConKey@@ -1058,8 +1060,8 @@ fromStringName, otherwiseIdName, foldrName, buildName, augmentName,     mapName, appendName, assertName,     breakpointName, breakpointCondName, breakpointAutoName,-    opaqueTyConName :: Name-fromStringName = varQual dATA_STRING (fsLit "fromString") fromStringClassOpKey+    opaqueTyConName, dollarName :: Name+dollarName        = varQual gHC_BASE (fsLit "$")          dollarIdKey otherwiseIdName   = varQual gHC_BASE (fsLit "otherwise")  otherwiseIdKey foldrName         = varQual gHC_BASE (fsLit "foldr")      foldrIdKey buildName         = varQual gHC_BASE (fsLit "build")      buildIdKey@@ -1071,6 +1073,7 @@ 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@@ -1121,7 +1124,7 @@     andIntegerName, orIntegerName, xorIntegerName, complementIntegerName,     shiftLIntegerName, shiftRIntegerName, bitIntegerName :: Name integerTyConName      = tcQual  gHC_INTEGER_TYPE (fsLit "Integer")           integerTyConKey-integerSDataConName   = dcQual gHC_INTEGER_TYPE (fsLit n)                   integerSDataConKey+integerSDataConName   = dcQual gHC_INTEGER_TYPE (fsLit n)                    integerSDataConKey   where n = case cIntegerLibraryType of             IntegerGMP    -> "S#"             IntegerSimple -> panic "integerSDataConName evaluated for integer-simple"@@ -1169,12 +1172,25 @@ bitIntegerName        = varQual gHC_INTEGER_TYPE (fsLit "bitInteger")        bitIntegerIdKey  -- GHC.Natural types-naturalTyConName :: Name+naturalTyConName, naturalSDataConName :: Name naturalTyConName     = tcQual gHC_NATURAL (fsLit "Natural") naturalTyConKey+naturalSDataConName  = dcQual gHC_NATURAL (fsLit n)         naturalSDataConKey+  where n = case cIntegerLibraryType of+            IntegerGMP    -> "NatS#"+            IntegerSimple -> panic "naturalSDataConName evaluated for integer-simple"  naturalFromIntegerName :: Name naturalFromIntegerName = varQual gHC_NATURAL (fsLit "naturalFromInteger") naturalFromIntegerIdKey +naturalToIntegerName, plusNaturalName, minusNaturalName, timesNaturalName,+   mkNaturalName, wordToNaturalName :: Name+naturalToIntegerName  = varQual gHC_NATURAL (fsLit "naturalToInteger")  naturalToIntegerIdKey+plusNaturalName       = varQual gHC_NATURAL (fsLit "plusNatural")       plusNaturalIdKey+minusNaturalName      = varQual gHC_NATURAL (fsLit "minusNatural")      minusNaturalIdKey+timesNaturalName      = varQual gHC_NATURAL (fsLit "timesNatural")      timesNaturalIdKey+mkNaturalName         = varQual gHC_NATURAL (fsLit "mkNatural")         mkNaturalIdKey+wordToNaturalName     = varQual gHC_NATURAL (fsLit "wordToNatural#")    wordToNaturalIdKey+ -- GHC.Real types and classes rationalTyConName, ratioTyConName, ratioDataConName, realClassName,     integralClassName, realFracClassName, fractionalClassName,@@ -1741,10 +1757,6 @@ tVarPrimTyConKey                        = mkPreludeTyConUnique 77 compactPrimTyConKey                     = mkPreludeTyConUnique 78 --- Parallel array type constructor-parrTyConKey :: Unique-parrTyConKey                            = mkPreludeTyConUnique 82- -- dotnet interop objectTyConKey :: Unique objectTyConKey                          = mkPreludeTyConUnique 83@@ -1754,14 +1766,11 @@  -- Kind constructors liftedTypeKindTyConKey, tYPETyConKey,-  constraintKindTyConKey,-  starKindTyConKey, unicodeStarKindTyConKey, runtimeRepTyConKey,+  constraintKindTyConKey, runtimeRepTyConKey,   vecCountTyConKey, vecElemTyConKey :: Unique liftedTypeKindTyConKey                  = mkPreludeTyConUnique 87 tYPETyConKey                            = mkPreludeTyConUnique 88 constraintKindTyConKey                  = mkPreludeTyConUnique 92-starKindTyConKey                        = mkPreludeTyConUnique 93-unicodeStarKindTyConKey                 = mkPreludeTyConUnique 94 runtimeRepTyConKey                      = mkPreludeTyConUnique 95 vecCountTyConKey                        = mkPreludeTyConUnique 96 vecElemTyConKey                         = mkPreludeTyConUnique 97@@ -1935,10 +1944,6 @@ inrDataConKey                           = mkPreludeDataConUnique 22 genUnitDataConKey                       = mkPreludeDataConUnique 23 --- Data constructor for parallel arrays-parrDataConKey :: Unique-parrDataConKey                          = mkPreludeDataConUnique 24- leftDataConKey, rightDataConKey :: Unique leftDataConKey                          = mkPreludeDataConUnique 25 rightDataConKey                         = mkPreludeDataConUnique 26@@ -2019,12 +2024,16 @@ sumRepDataConKey                        = mkPreludeDataConUnique 73  -- See Note [Wiring in RuntimeRep] in TysWiredIn-runtimeRepSimpleDataConKeys :: [Unique]+runtimeRepSimpleDataConKeys, unliftedSimpleRepDataConKeys, unliftedRepDataConKeys :: [Unique] liftedRepDataConKey :: Unique-runtimeRepSimpleDataConKeys@(-  liftedRepDataConKey : _)+runtimeRepSimpleDataConKeys@(liftedRepDataConKey : unliftedSimpleRepDataConKeys)   = map mkPreludeDataConUnique [74..82] +unliftedRepDataConKeys = vecRepDataConKey :+                         tupleRepDataConKey :+                         sumRepDataConKey :+                         unliftedSimpleRepDataConKeys+ -- See Note [Wiring in RuntimeRep] in TysWiredIn -- VecCount vecCountDataConKeys :: [Unique]@@ -2068,7 +2077,7 @@  wildCardKey, absentErrorIdKey, augmentIdKey, appendIdKey,     buildIdKey, errorIdKey, foldrIdKey, recSelErrorIdKey,-    seqIdKey, irrefutPatErrorIdKey, eqStringIdKey,+    seqIdKey, eqStringIdKey,     noMethodBindingErrorIdKey, nonExhaustiveGuardsErrorIdKey,     runtimeErrorIdKey, patErrorIdKey, voidPrimIdKey,     realWorldPrimIdKey, recConErrorIdKey,@@ -2086,7 +2095,6 @@ foldrIdKey                    = mkPreludeMiscIdUnique  6 recSelErrorIdKey              = mkPreludeMiscIdUnique  7 seqIdKey                      = mkPreludeMiscIdUnique  8-irrefutPatErrorIdKey          = mkPreludeMiscIdUnique  9 eqStringIdKey                 = mkPreludeMiscIdUnique 10 noMethodBindingErrorIdKey     = mkPreludeMiscIdUnique 11 nonExhaustiveGuardsErrorIdKey = mkPreludeMiscIdUnique 12@@ -2102,7 +2110,7 @@ typeErrorIdKey                = mkPreludeMiscIdUnique 22 divIntIdKey                   = mkPreludeMiscIdUnique 23 modIntIdKey                   = mkPreludeMiscIdUnique 24-absentSumFieldErrorIdKey      = mkPreludeMiscIdUnique 25+absentSumFieldErrorIdKey      = mkPreludeMiscIdUnique 9  unsafeCoerceIdKey, concatIdKey, filterIdKey, zipIdKey, bindIOIdKey,     returnIOIdKey, newStablePtrIdKey,@@ -2396,8 +2404,17 @@ makeStaticKey = mkPreludeMiscIdUnique 561  -- Natural-naturalFromIntegerIdKey :: Unique+naturalFromIntegerIdKey, naturalToIntegerIdKey, plusNaturalIdKey,+   minusNaturalIdKey, timesNaturalIdKey, mkNaturalIdKey,+   naturalSDataConKey, wordToNaturalIdKey :: Unique naturalFromIntegerIdKey = mkPreludeMiscIdUnique 562+naturalToIntegerIdKey   = mkPreludeMiscIdUnique 563+plusNaturalIdKey        = mkPreludeMiscIdUnique 564+minusNaturalIdKey       = mkPreludeMiscIdUnique 565+timesNaturalIdKey       = mkPreludeMiscIdUnique 566+mkNaturalIdKey          = mkPreludeMiscIdUnique 567+naturalSDataConKey      = mkPreludeMiscIdUnique 568+wordToNaturalIdKey      = mkPreludeMiscIdUnique 569  {- ************************************************************************@@ -2476,5 +2493,5 @@ pretendNameIsInScope :: Name -> Bool pretendNameIsInScope n   = any (n `hasKey`)-    [ starKindTyConKey, liftedTypeKindTyConKey, tYPETyConKey+    [ liftedTypeKindTyConKey, tYPETyConKey     , runtimeRepTyConKey, liftedRepDataConKey ]
prelude/PrelNames.hs-boot view
@@ -4,5 +4,4 @@ import Unique  mAIN :: Module-starKindTyConKey :: Unique-unicodeStarKindTyConKey :: Unique+liftedTypeKindTyConKey :: Unique
prelude/PrelRules.hs view
@@ -12,7 +12,7 @@    (i1 + i2) only if it results in a valid Float. -} -{-# LANGUAGE CPP, RankNTypes #-}+{-# LANGUAGE CPP, RankNTypes, PatternSynonyms, ViewPatterns, RecordWildCards #-} {-# OPTIONS_GHC -optc-DNON_POSIX_SOURCE #-}  module PrelRules@@ -41,7 +41,7 @@                    , isNewTyCon, unwrapNewTyCon_maybe, tyConDataCons                    , tyConFamilySize ) import DataCon     ( dataConTagZ, dataConTyCon, dataConWorkId )-import CoreUtils   ( cheapEqExpr, exprIsHNF )+import CoreUtils   ( cheapEqExpr, exprIsHNF, exprType ) import CoreUnfold  ( exprIsConApp_maybe ) import Type import OccName     ( occNameFS )@@ -91,13 +91,24 @@  -- Int operations primOpRules nm IntAddOp    = mkPrimOpRule nm 2 [ binaryLit (intOp2 (+))-                                               , identityDynFlags zeroi ]+                                               , identityDynFlags zeroi+                                               , numFoldingRules IntAddOp intPrimOps+                                               ] primOpRules nm IntSubOp    = mkPrimOpRule nm 2 [ binaryLit (intOp2 (-))                                                , rightIdentityDynFlags zeroi-                                               , equalArgs >> retLit zeroi ]+                                               , equalArgs >> retLit zeroi+                                               , numFoldingRules IntSubOp intPrimOps+                                               ]+primOpRules nm IntAddCOp   = mkPrimOpRule nm 2 [ binaryLit (intOpC2 (+))+                                               , identityCDynFlags zeroi ]+primOpRules nm IntSubCOp   = mkPrimOpRule nm 2 [ binaryLit (intOpC2 (-))+                                               , rightIdentityCDynFlags zeroi+                                               , equalArgs >> retLitNoC zeroi ] primOpRules nm IntMulOp    = mkPrimOpRule nm 2 [ binaryLit (intOp2 (*))                                                , zeroElem zeroi-                                               , identityDynFlags onei ]+                                               , identityDynFlags onei+                                               , numFoldingRules IntMulOp intPrimOps+                                               ] primOpRules nm IntQuotOp   = mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (intOp2 quot)                                                , leftZero zeroi                                                , rightIdentityDynFlags onei@@ -132,12 +143,23 @@  -- Word operations primOpRules nm WordAddOp   = mkPrimOpRule nm 2 [ binaryLit (wordOp2 (+))-                                               , identityDynFlags zerow ]+                                               , identityDynFlags zerow+                                               , numFoldingRules WordAddOp wordPrimOps+                                               ] primOpRules nm WordSubOp   = mkPrimOpRule nm 2 [ binaryLit (wordOp2 (-))                                                , rightIdentityDynFlags zerow-                                               , equalArgs >> retLit zerow ]+                                               , equalArgs >> retLit zerow+                                               , numFoldingRules WordSubOp wordPrimOps+                                               ]+primOpRules nm WordAddCOp  = mkPrimOpRule nm 2 [ binaryLit (wordOpC2 (+))+                                               , identityCDynFlags zerow ]+primOpRules nm WordSubCOp  = mkPrimOpRule nm 2 [ binaryLit (wordOpC2 (-))+                                               , rightIdentityCDynFlags zerow+                                               , equalArgs >> retLitNoC zerow ] primOpRules nm WordMulOp   = mkPrimOpRule nm 2 [ binaryLit (wordOp2 (*))-                                               , identityDynFlags onew ]+                                               , identityDynFlags onew+                                               , numFoldingRules WordMulOp wordPrimOps+                                               ] primOpRules nm WordQuotOp  = mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (wordOp2 quot)                                                , rightIdentityDynFlags onew ] primOpRules nm WordRemOp   = mkPrimOpRule nm 2 [ nonZeroLit 1 >> binaryLit (wordOp2 rem)@@ -362,12 +384,11 @@      -- These compares are at different types     go (MachChar i1)   (MachChar i2)   = done (i1 `cmp` i2)-    go (MachInt i1)    (MachInt i2)    = done (i1 `cmp` i2)-    go (MachInt64 i1)  (MachInt64 i2)  = done (i1 `cmp` i2)-    go (MachWord i1)   (MachWord i2)   = done (i1 `cmp` i2)-    go (MachWord64 i1) (MachWord64 i2) = done (i1 `cmp` i2)     go (MachFloat i1)  (MachFloat i2)  = done (i1 `cmp` i2)     go (MachDouble i1) (MachDouble i2) = done (i1 `cmp` i2)+    go (LitNumber nt1 i1 _) (LitNumber nt2 i2 _)+      | nt1 /= nt2 = Nothing+      | otherwise  = done (i1 `cmp` i2)     go _               _               = Nothing  --------------------------@@ -377,12 +398,13 @@ negOp dflags (MachFloat f)    = Just (mkFloatVal dflags (-f)) negOp _      (MachDouble 0.0) = Nothing negOp dflags (MachDouble d)   = Just (mkDoubleVal dflags (-d))-negOp dflags (MachInt i)      = intResult dflags (-i)+negOp dflags (LitNumber nt i t)+   | litNumIsSigned nt = Just (Lit (mkLitNumberWrap dflags nt (-i) t)) negOp _      _                = Nothing  complementOp :: DynFlags -> Literal -> Maybe CoreExpr  -- Binary complement-complementOp dflags (MachWord i) = wordResult dflags (complement i)-complementOp dflags (MachInt i)  = intResult  dflags (complement i)+complementOp dflags (LitNumber nt i t) =+   Just (Lit (mkLitNumberWrap dflags nt (complement i) t)) complementOp _      _            = Nothing  --------------------------@@ -394,11 +416,18 @@ intOp2' :: (Integral a, Integral b)         => (DynFlags -> a -> b -> Integer)         -> DynFlags -> Literal -> Literal -> Maybe CoreExpr-intOp2' op dflags (MachInt i1) (MachInt i2) =+intOp2' op dflags (LitNumber LitNumInt i1 _) (LitNumber LitNumInt i2 _) =   let o = op dflags   in  intResult dflags (fromInteger i1 `o` fromInteger i2) intOp2' _  _      _            _            = Nothing  -- Could find LitLit +intOpC2 :: (Integral a, Integral b)+        => (a -> b -> Integer)+        -> DynFlags -> Literal -> Literal -> Maybe CoreExpr+intOpC2 op dflags (LitNumber LitNumInt i1 _) (LitNumber LitNumInt i2 _) = do+  intCResult dflags (fromInteger i1 `op` fromInteger i2)+intOpC2 _  _      _            _            = Nothing  -- Could find LitLit+ shiftRightLogical :: DynFlags -> Integer -> Int -> Integer -- 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@@ -413,19 +442,32 @@ retLit l = do dflags <- getDynFlags               return $ Lit $ l dflags +retLitNoC :: (DynFlags -> Literal) -> RuleM CoreExpr+retLitNoC l = do dflags <- getDynFlags+                 let lit = l dflags+                 let ty = literalType lit+                 return $ mkCoreUbxTup [ty, ty] [Lit lit, Lit (zeroi dflags)]+ wordOp2 :: (Integral a, Integral b)         => (a -> b -> Integer)         -> DynFlags -> Literal -> Literal -> Maybe CoreExpr-wordOp2 op dflags (MachWord w1) (MachWord w2)+wordOp2 op dflags (LitNumber LitNumWord w1 _) (LitNumber LitNumWord w2 _)     = wordResult dflags (fromInteger w1 `op` fromInteger w2) wordOp2 _ _ _ _ = Nothing  -- Could find LitLit +wordOpC2 :: (Integral a, Integral b)+        => (a -> b -> Integer)+        -> DynFlags -> Literal -> Literal -> Maybe CoreExpr+wordOpC2 op dflags (LitNumber LitNumWord w1 _) (LitNumber LitNumWord w2 _) =+  wordCResult dflags (fromInteger w1 `op` fromInteger w2)+wordOpC2 _ _ _ _ = Nothing  -- Could find LitLit+ shiftRule :: (DynFlags -> Integer -> Int -> Integer) -> RuleM CoreExpr                  -- Shifts take an Int; hence third arg of op is Int -- See Note [Guarding against silly shifts] shiftRule shift_op   = do { dflags <- getDynFlags-       ; [e1, Lit (MachInt shift_len)] <- getArgs+       ; [e1, Lit (LitNumber LitNumInt shift_len _)] <- getArgs        ; case e1 of            _ | shift_len == 0              -> return e1@@ -434,13 +476,10 @@                                         ("Bad shift length" ++ show shift_len))             -- Do the shift at type Integer, but shift length is Int-           Lit (MachInt x)-             -> let op = shift_op dflags-                in  liftMaybe $ intResult dflags (x `op` fromInteger shift_len)--           Lit (MachWord x)+           Lit (LitNumber nt x t)              -> let op = shift_op dflags-                in  liftMaybe $ wordResult dflags (x `op` fromInteger shift_len)+                    y  = x `op` fromInteger shift_len+                in  liftMaybe $ Just (Lit (mkLitNumberWrap dflags nt y t))             _ -> mzero } @@ -531,31 +570,63 @@ mkRuleFn _ _ _ _                                       = Nothing  isMinBound :: DynFlags -> Literal -> Bool-isMinBound _      (MachChar c)   = c == minBound-isMinBound dflags (MachInt i)    = i == tARGET_MIN_INT dflags-isMinBound _      (MachInt64 i)  = i == toInteger (minBound :: Int64)-isMinBound _      (MachWord i)   = i == 0-isMinBound _      (MachWord64 i) = i == 0-isMinBound _      _              = False+isMinBound _      (MachChar c)       = c == minBound+isMinBound dflags (LitNumber nt i _) = case nt of+   LitNumInt     -> i == tARGET_MIN_INT dflags+   LitNumInt64   -> i == toInteger (minBound :: Int64)+   LitNumWord    -> i == 0+   LitNumWord64  -> i == 0+   LitNumNatural -> i == 0+   LitNumInteger -> False+isMinBound _      _                  = False  isMaxBound :: DynFlags -> Literal -> Bool-isMaxBound _      (MachChar c)   = c == maxBound-isMaxBound dflags (MachInt i)    = i == tARGET_MAX_INT dflags-isMaxBound _      (MachInt64 i)  = i == toInteger (maxBound :: Int64)-isMaxBound dflags (MachWord i)   = i == tARGET_MAX_WORD dflags-isMaxBound _      (MachWord64 i) = i == toInteger (maxBound :: Word64)-isMaxBound _      _              = False+isMaxBound _      (MachChar c)       = c == maxBound+isMaxBound dflags (LitNumber nt i _) = case nt of+   LitNumInt     -> i == tARGET_MAX_INT dflags+   LitNumInt64   -> i == toInteger (maxBound :: Int64)+   LitNumWord    -> i == tARGET_MAX_WORD dflags+   LitNumWord64  -> i == toInteger (maxBound :: Word64)+   LitNumNatural -> False+   LitNumInteger -> False+isMaxBound _      _                  = False  -- | Create an Int literal expression while ensuring the given Integer is in the -- target Int range intResult :: DynFlags -> Integer -> Maybe CoreExpr-intResult dflags result = Just (Lit (mkMachIntWrap dflags result))+intResult dflags result = Just (intResult' dflags result) +intResult' :: DynFlags -> Integer -> CoreExpr+intResult' dflags result = Lit (mkMachIntWrap dflags result)++-- | Create an unboxed pair of an Int literal expression, ensuring the given+-- Integer is in the target Int range and the corresponding overflow flag+-- (@0#@/@1#@) if it wasn't.+intCResult :: DynFlags -> Integer -> Maybe CoreExpr+intCResult dflags result = Just (mkPair [Lit lit, Lit c])+  where+    mkPair = mkCoreUbxTup [intPrimTy, intPrimTy]+    (lit, b) = mkMachIntWrapC dflags result+    c = if b then onei dflags else zeroi dflags+ -- | Create a Word literal expression while ensuring the given Integer is in the -- target Word range wordResult :: DynFlags -> Integer -> Maybe CoreExpr-wordResult dflags result = Just (Lit (mkMachWordWrap dflags result))+wordResult dflags result = Just (wordResult' dflags result) +wordResult' :: DynFlags -> Integer -> CoreExpr+wordResult' dflags result = Lit (mkMachWordWrap dflags result)++-- | Create an unboxed pair of a Word literal expression, ensuring the given+-- Integer is in the target Word range and the corresponding carry flag+-- (@0#@/@1#@) if it wasn't.+wordCResult :: DynFlags -> Integer -> Maybe CoreExpr+wordCResult dflags result = Just (mkPair [Lit lit, Lit c])+  where+    mkPair = mkCoreUbxTup [wordPrimTy, intPrimTy]+    (lit, b) = mkMachWordWrapC dflags result+    c = if b then onei dflags else zeroi dflags+ inversePrimOp :: PrimOp -> RuleM CoreExpr inversePrimOp primop = do   [Var primop_id `App` e] <- getArgs@@ -739,6 +810,16 @@   guard $ l1 == id_lit dflags   return e2 +-- | Left identity rule for PrimOps like 'IntAddC' and 'WordAddC', where, in+-- addition to the result, we have to indicate that no carry/overflow occured.+leftIdentityCDynFlags :: (DynFlags -> Literal) -> RuleM CoreExpr+leftIdentityCDynFlags id_lit = do+  dflags <- getDynFlags+  [Lit l1, e2] <- getArgs+  guard $ l1 == id_lit dflags+  let no_c = Lit (zeroi dflags)+  return (mkCoreUbxTup [exprType e2, intPrimTy] [e2, no_c])+ rightIdentityDynFlags :: (DynFlags -> Literal) -> RuleM CoreExpr rightIdentityDynFlags id_lit = do   dflags <- getDynFlags@@ -746,9 +827,26 @@   guard $ l2 == id_lit dflags   return e1 +-- | Right identity rule for PrimOps like 'IntSubC' and 'WordSubC', where, in+-- addition to the result, we have to indicate that no carry/overflow occured.+rightIdentityCDynFlags :: (DynFlags -> Literal) -> RuleM CoreExpr+rightIdentityCDynFlags id_lit = do+  dflags <- getDynFlags+  [e1, Lit l2] <- getArgs+  guard $ l2 == id_lit dflags+  let no_c = Lit (zeroi dflags)+  return (mkCoreUbxTup [exprType e1, intPrimTy] [e1, no_c])+ identityDynFlags :: (DynFlags -> Literal) -> RuleM CoreExpr-identityDynFlags lit = leftIdentityDynFlags lit `mplus` rightIdentityDynFlags lit+identityDynFlags lit =+  leftIdentityDynFlags lit `mplus` rightIdentityDynFlags lit +-- | Identity rule for PrimOps like 'IntAddC' and 'WordAddC', where, in addition+-- to the result, we have to indicate that no carry/overflow occured.+identityCDynFlags :: (DynFlags -> Literal) -> RuleM CoreExpr+identityCDynFlags lit =+  leftIdentityCDynFlags lit `mplus` rightIdentityCDynFlags lit+ leftZero :: (DynFlags -> Literal) -> RuleM CoreExpr leftZero zero = do   dflags <- getDynFlags@@ -885,7 +983,7 @@ -- If     data T a = A | B | C -- then   tag2Enum# (T ty) 2# -->  B ty tagToEnumRule = do-  [Type ty, Lit (MachInt i)] <- getArgs+  [Type ty, Lit (LitNumber LitNumInt i _)] <- getArgs   case splitTyConApp_maybe ty of     Just (tycon, tc_args) | isEnumerationTyCon tycon -> do       let tag = fromInteger i@@ -910,6 +1008,19 @@       guard $ ty1 `eqType` ty2       return tag +    -- Why don't we simplify tagToEnum# (dataToTag# x) to x? We would+    -- like to, but it seems tricky. See #14282. The trouble is that+    -- we never actually see tagToEnum# (dataToTag# x). Because dataToTag#+    -- is can_fail, this expression is immediately transformed into+    --+    --   case dataToTag# @T x of wild+    --     { __DEFAULT -> tagToEnum# @T wild }+    --+    -- and wild has no unfolding. Simon Peyton Jones speculates one way around+    -- might be to arrange to give unfoldings to case binders of CONLIKE+    -- applications and mark dataToTag# CONLIKE, but he doubts it's really+    -- worth the trouble.+     -- dataToTag (K e1 e2)  ==>   tag-of K     -- This also works (via exprIsConApp_maybe) for     --   dataToTag x@@ -978,13 +1089,17 @@  - CoreUtils.exprOkForSpeculation;   see Note [seq# and expr_ok] in CoreUtils++- Simplify.addEvals records evaluated-ness for the result; see+  Note [Adding evaluatedness info to pattern-bound variables]+  in Simplify -}  seqRule :: RuleM CoreExpr seqRule = do-  [Type ty_a, Type ty_s, a, s] <- getArgs+  [Type ty_a, Type _ty_s, a, s] <- getArgs   guard $ exprIsHNF a-  return $ mkCoreUbxTup [mkStatePrimTy ty_s, ty_a] [s, a]+  return $ mkCoreUbxTup [exprType s, ty_a] [s, a]  -- spark# :: forall a s . a -> State# s -> (# State# s, a #) sparkRule :: RuleM CoreExpr@@ -1042,7 +1157,7 @@         [ nonZeroLit 1 >> binaryLit (intOp2 div)         , leftZero zeroi         , do-          [arg, Lit (MachInt d)] <- getArgs+          [arg, Lit (LitNumber LitNumInt d _)] <- getArgs           Just n <- return $ exactLog2 d           dflags <- getDynFlags           return $ Var (mkPrimOpId ISraOp) `App` arg `App` mkIntVal dflags n@@ -1051,7 +1166,7 @@         [ nonZeroLit 1 >> binaryLit (intOp2 mod)         , leftZero zeroi         , do-          [arg, Lit (MachInt d)] <- getArgs+          [arg, Lit (LitNumber LitNumInt d _)] <- getArgs           Just _ <- return $ exactLog2 d           dflags <- getDynFlags           return $ Var (mkPrimOpId AndIOp)@@ -1059,6 +1174,7 @@         ]      ]  ++ builtinIntegerRules+ ++ builtinNaturalRules {-# NOINLINE builtinRules #-} -- there is no benefit to inlining these yet, despite this, GHC produces -- unfoldings for this regardless since the floated list entries look small.@@ -1175,6 +1291,31 @@            = BuiltinRule { ru_name = fsLit str, ru_fn = name, ru_nargs = 2,                            ru_try = match_rationalTo mkLit } +builtinNaturalRules :: [CoreRule]+builtinNaturalRules =+ [rule_binop              "plusNatural"        plusNaturalName         (+)+ ,rule_partial_binop      "minusNatural"       minusNaturalName        (\a b -> if a >= b then Just (a - b) else Nothing)+ ,rule_binop              "timesNatural"       timesNaturalName        (*)+ ,rule_NaturalFromInteger "naturalFromInteger" naturalFromIntegerName+ ,rule_NaturalToInteger   "naturalToInteger"   naturalToIntegerName+ ,rule_WordToNatural      "wordToNatural"      wordToNaturalName+ ]+    where rule_binop str name op+           = BuiltinRule { ru_name = fsLit str, ru_fn = name, ru_nargs = 2,+                           ru_try = match_Natural_binop op }+          rule_partial_binop str name op+           = BuiltinRule { ru_name = fsLit str, ru_fn = name, ru_nargs = 2,+                           ru_try = match_Natural_partial_binop op }+          rule_NaturalToInteger str name+           = BuiltinRule { ru_name = fsLit str, ru_fn = name, ru_nargs = 1,+                           ru_try = match_NaturalToInteger }+          rule_NaturalFromInteger str name+           = BuiltinRule { ru_name = fsLit str, ru_fn = name, ru_nargs = 1,+                           ru_try = match_NaturalFromInteger }+          rule_WordToNatural str name+           = BuiltinRule { ru_name = fsLit str, ru_fn = name, ru_nargs = 1,+                           ru_try = match_WordToNatural }+ --------------------------------------------------- -- The rule is this: --      unpackFoldrCString# "foo" c (unpackFoldrCString# "baz" c n)@@ -1266,34 +1407,65 @@  match_WordToInteger :: RuleFun match_WordToInteger _ id_unf id [xl]-  | Just (MachWord x) <- exprIsLiteral_maybe id_unf xl+  | Just (LitNumber LitNumWord x _) <- exprIsLiteral_maybe id_unf xl   = case splitFunTy_maybe (idType id) of     Just (_, integerTy) ->-        Just (Lit (LitInteger x integerTy))+        Just (Lit (mkLitInteger x integerTy))     _ ->         panic "match_WordToInteger: Id has the wrong type" match_WordToInteger _ _ _ _ = Nothing  match_Int64ToInteger :: RuleFun match_Int64ToInteger _ id_unf id [xl]-  | Just (MachInt64 x) <- exprIsLiteral_maybe id_unf xl+  | Just (LitNumber LitNumInt64 x _) <- exprIsLiteral_maybe id_unf xl   = case splitFunTy_maybe (idType id) of     Just (_, integerTy) ->-        Just (Lit (LitInteger x integerTy))+        Just (Lit (mkLitInteger x integerTy))     _ ->         panic "match_Int64ToInteger: Id has the wrong type" match_Int64ToInteger _ _ _ _ = Nothing  match_Word64ToInteger :: RuleFun match_Word64ToInteger _ id_unf id [xl]-  | Just (MachWord64 x) <- exprIsLiteral_maybe id_unf xl+  | Just (LitNumber LitNumWord64 x _) <- exprIsLiteral_maybe id_unf xl   = case splitFunTy_maybe (idType id) of     Just (_, integerTy) ->-        Just (Lit (LitInteger x integerTy))+        Just (Lit (mkLitInteger x integerTy))     _ ->         panic "match_Word64ToInteger: Id has the wrong type" match_Word64ToInteger _ _ _ _ = Nothing +match_NaturalToInteger :: RuleFun+match_NaturalToInteger _ id_unf id [xl]+  | Just (LitNumber LitNumNatural x _) <- exprIsLiteral_maybe id_unf xl+  = case splitFunTy_maybe (idType id) of+    Just (_, naturalTy) ->+        Just (Lit (LitNumber LitNumInteger x naturalTy))+    _ ->+        panic "match_NaturalToInteger: Id has the wrong type"+match_NaturalToInteger _ _ _ _ = Nothing++match_NaturalFromInteger :: RuleFun+match_NaturalFromInteger _ id_unf id [xl]+  | Just (LitNumber LitNumInteger x _) <- exprIsLiteral_maybe id_unf xl+  , x >= 0+  = case splitFunTy_maybe (idType id) of+    Just (_, naturalTy) ->+        Just (Lit (LitNumber LitNumNatural x naturalTy))+    _ ->+        panic "match_NaturalFromInteger: Id has the wrong type"+match_NaturalFromInteger _ _ _ _ = Nothing++match_WordToNatural :: RuleFun+match_WordToNatural _ id_unf id [xl]+  | Just (LitNumber LitNumWord x _) <- exprIsLiteral_maybe id_unf xl+  = case splitFunTy_maybe (idType id) of+    Just (_, naturalTy) ->+        Just (Lit (LitNumber LitNumNatural x naturalTy))+    _ ->+        panic "match_WordToNatural: Id has the wrong type"+match_WordToNatural _ _ _ _ = Nothing+ ------------------------------------------------- {- Note [Rewriting bitInteger] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1304,7 +1476,7 @@ specifically for this function.  There is, however, a bit of trickiness here when it comes to ranges. While the-AST encodes all integers (even MachInts) as Integers, `bit` expects the bit+AST encodes all integers as Integers, `bit` expects the bit index to be given as an Int. Hence we coerce to an Int in the rule definition. This will behave a bit funny for constants larger than the word size, but the user should expect some funniness given that they will have at very least ignored a@@ -1314,7 +1486,7 @@ match_bitInteger :: RuleFun -- Just for GHC.Integer.Type.bitInteger :: Int# -> Integer match_bitInteger dflags id_unf fn [arg]-  | Just (MachInt x) <- exprIsLiteral_maybe id_unf arg+  | Just (LitNumber LitNumInt x _) <- exprIsLiteral_maybe id_unf arg   , x >= 0   , x <= (wordSizeInBits dflags - 1)     -- Make sure x is small enough to yield a decently small iteger@@ -1324,7 +1496,7 @@   , let x_int = fromIntegral x :: Int   = case splitFunTy_maybe (idType fn) of     Just (_, integerTy)-      -> Just (Lit (LitInteger (bit x_int) integerTy))+      -> Just (Lit (LitNumber LitNumInteger (bit x_int) integerTy))     _ -> panic "match_IntToInteger_unop: Id has the wrong type"  match_bitInteger _ _ _ _ = Nothing@@ -1335,71 +1507,86 @@                       => (DynFlags -> a -> Expr CoreBndr)                       -> RuleFun match_Integer_convert convert dflags id_unf _ [xl]-  | Just (LitInteger x _) <- exprIsLiteral_maybe id_unf xl+  | Just (LitNumber LitNumInteger x _) <- exprIsLiteral_maybe id_unf xl   = Just (convert dflags (fromInteger x)) match_Integer_convert _ _ _ _ _ = Nothing  match_Integer_unop :: (Integer -> Integer) -> RuleFun match_Integer_unop unop _ id_unf _ [xl]-  | Just (LitInteger x i) <- exprIsLiteral_maybe id_unf xl-  = Just (Lit (LitInteger (unop x) i))+  | Just (LitNumber LitNumInteger x i) <- exprIsLiteral_maybe id_unf xl+  = Just (Lit (LitNumber LitNumInteger (unop x) i)) match_Integer_unop _ _ _ _ _ = Nothing  match_IntToInteger_unop :: (Integer -> Integer) -> RuleFun match_IntToInteger_unop unop _ id_unf fn [xl]-  | Just (MachInt x) <- exprIsLiteral_maybe id_unf xl+  | Just (LitNumber LitNumInt x _) <- exprIsLiteral_maybe id_unf xl   = case splitFunTy_maybe (idType fn) of     Just (_, integerTy) ->-        Just (Lit (LitInteger (unop x) integerTy))+        Just (Lit (LitNumber LitNumInteger (unop x) integerTy))     _ ->         panic "match_IntToInteger_unop: Id has the wrong type" match_IntToInteger_unop _ _ _ _ _ = Nothing  match_Integer_binop :: (Integer -> Integer -> Integer) -> RuleFun match_Integer_binop binop _ id_unf _ [xl,yl]-  | Just (LitInteger x i) <- exprIsLiteral_maybe id_unf xl-  , Just (LitInteger y _) <- exprIsLiteral_maybe id_unf yl-  = Just (Lit (LitInteger (x `binop` y) i))+  | Just (LitNumber LitNumInteger x i) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInteger y _) <- exprIsLiteral_maybe id_unf yl+  = Just (Lit (mkLitInteger (x `binop` y) i)) match_Integer_binop _ _ _ _ _ = Nothing +match_Natural_binop :: (Integer -> Integer -> Integer) -> RuleFun+match_Natural_binop binop _ id_unf _ [xl,yl]+  | Just (LitNumber LitNumNatural x i) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumNatural y _) <- exprIsLiteral_maybe id_unf yl+  = Just (Lit (mkLitNatural (x `binop` y) i))+match_Natural_binop _ _ _ _ _ = Nothing++match_Natural_partial_binop :: (Integer -> Integer -> Maybe Integer) -> RuleFun+match_Natural_partial_binop binop _ id_unf _ [xl,yl]+  | Just (LitNumber LitNumNatural x i) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumNatural y _) <- exprIsLiteral_maybe id_unf yl+  , Just z <- x `binop` y+  = Just (Lit (mkLitNatural z i))+match_Natural_partial_binop _ _ _ _ _ = Nothing+ -- This helper is used for the quotRem and divMod functions match_Integer_divop_both    :: (Integer -> Integer -> (Integer, Integer)) -> RuleFun match_Integer_divop_both divop _ id_unf _ [xl,yl]-  | Just (LitInteger x t) <- exprIsLiteral_maybe id_unf xl-  , Just (LitInteger y _) <- exprIsLiteral_maybe id_unf yl+  | Just (LitNumber LitNumInteger x t) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInteger y _) <- exprIsLiteral_maybe id_unf yl   , y /= 0   , (r,s) <- x `divop` y-  = Just $ mkCoreUbxTup [t,t] [Lit (LitInteger r t), Lit (LitInteger s t)]+  = Just $ mkCoreUbxTup [t,t] [Lit (mkLitInteger r t), Lit (mkLitInteger s t)] match_Integer_divop_both _ _ _ _ _ = Nothing  -- This helper is used for the quot and rem functions match_Integer_divop_one :: (Integer -> Integer -> Integer) -> RuleFun match_Integer_divop_one divop _ id_unf _ [xl,yl]-  | Just (LitInteger x i) <- exprIsLiteral_maybe id_unf xl-  , Just (LitInteger y _) <- exprIsLiteral_maybe id_unf yl+  | Just (LitNumber LitNumInteger x i) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInteger y _) <- exprIsLiteral_maybe id_unf yl   , y /= 0-  = Just (Lit (LitInteger (x `divop` y) i))+  = Just (Lit (mkLitInteger (x `divop` y) i)) match_Integer_divop_one _ _ _ _ _ = Nothing  match_Integer_Int_binop :: (Integer -> Int -> Integer) -> RuleFun match_Integer_Int_binop binop _ id_unf _ [xl,yl]-  | Just (LitInteger x i) <- exprIsLiteral_maybe id_unf xl-  , Just (MachInt y)      <- exprIsLiteral_maybe id_unf yl-  = Just (Lit (LitInteger (x `binop` fromIntegral y) i))+  | Just (LitNumber LitNumInteger x i) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInt y _)     <- exprIsLiteral_maybe id_unf yl+  = Just (Lit (mkLitInteger (x `binop` fromIntegral y) i)) match_Integer_Int_binop _ _ _ _ _ = Nothing  match_Integer_binop_Prim :: (Integer -> Integer -> Bool) -> RuleFun match_Integer_binop_Prim binop dflags id_unf _ [xl, yl]-  | Just (LitInteger x _) <- exprIsLiteral_maybe id_unf xl-  , Just (LitInteger y _) <- exprIsLiteral_maybe id_unf yl+  | Just (LitNumber LitNumInteger x _) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInteger y _) <- exprIsLiteral_maybe id_unf yl   = Just (if x `binop` y then trueValInt dflags else falseValInt dflags) match_Integer_binop_Prim _ _ _ _ _ = Nothing  match_Integer_binop_Ordering :: (Integer -> Integer -> Ordering) -> RuleFun match_Integer_binop_Ordering binop _ id_unf _ [xl, yl]-  | Just (LitInteger x _) <- exprIsLiteral_maybe id_unf xl-  , Just (LitInteger y _) <- exprIsLiteral_maybe id_unf yl+  | Just (LitNumber LitNumInteger x _) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInteger y _) <- exprIsLiteral_maybe id_unf yl   = Just $ case x `binop` y of              LT -> ltVal              EQ -> eqVal@@ -1410,8 +1597,8 @@                               => (a -> Expr CoreBndr)                               -> RuleFun match_Integer_Int_encodeFloat mkLit _ id_unf _ [xl,yl]-  | Just (LitInteger x _) <- exprIsLiteral_maybe id_unf xl-  , Just (MachInt y)      <- exprIsLiteral_maybe id_unf yl+  | Just (LitNumber LitNumInteger x _) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInt y _)     <- exprIsLiteral_maybe id_unf yl   = Just (mkLit $ encodeFloat x (fromInteger y)) match_Integer_Int_encodeFloat _ _ _ _ _ = Nothing @@ -1429,14 +1616,14 @@                  => (a -> Expr CoreBndr)                  -> RuleFun match_rationalTo mkLit _ id_unf _ [xl, yl]-  | Just (LitInteger x _) <- exprIsLiteral_maybe id_unf xl-  , Just (LitInteger y _) <- exprIsLiteral_maybe id_unf yl+  | Just (LitNumber LitNumInteger x _) <- exprIsLiteral_maybe id_unf xl+  , Just (LitNumber LitNumInteger y _) <- exprIsLiteral_maybe id_unf yl   , y /= 0   = Just (mkLit (fromRational (x % y))) match_rationalTo _ _ _ _ _ = Nothing  match_decodeDouble :: RuleFun-match_decodeDouble _ id_unf fn [xl]+match_decodeDouble dflags id_unf fn [xl]   | Just (MachDouble x) <- exprIsLiteral_maybe id_unf xl   = case splitFunTy_maybe (idType fn) of     Just (_, res)@@ -1444,8 +1631,8 @@       -> case decodeFloat (fromRational x :: Double) of            (y, z) ->              Just $ mkCoreUbxTup [integerTy, intHashTy]-                                 [Lit (LitInteger y integerTy),-                                  Lit (MachInt (toInteger z))]+                                 [Lit (mkLitInteger y integerTy),+                                  Lit (mkMachInt dflags (toInteger z))]     _ ->         pprPanic "match_decodeDouble: Id has the wrong type"           (ppr fn <+> dcolon <+> ppr (idType fn))@@ -1466,6 +1653,275 @@   --------------------------------------------------------+-- Note [Constant folding through nested expressions]+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+--+-- We use rewrites rules to perform constant folding. It means that we don't+-- have a global view of the expression we are trying to optimise. As a+-- consequence we only perform local (small-step) transformations that either:+--    1) reduce the number of operations+--    2) rearrange the expression to increase the odds that other rules will+--    match+--+-- We don't try to handle more complex expression optimisation cases that would+-- require a global view. For example, rewriting expressions to increase+-- sharing (e.g., Horner's method); optimisations that require local+-- transformations increasing the number of operations; rearrangements to+-- cancel/factorize terms (e.g., (a+b-a-b) isn't rearranged to reduce to 0).+--+-- We already have rules to perform constant folding on expressions with the+-- following shape (where a and/or b are literals):+--+--          D)    op+--                /\+--               /  \+--              /    \+--             a      b+--+-- To support nested expressions, we match three other shapes of expression+-- trees:+--+-- A)   op1          B)       op1       C)       op1+--      /\                    /\                 /\+--     /  \                  /  \               /  \+--    /    \                /    \             /    \+--   a     op2            op2     c          op2    op3+--          /\            /\                 /\      /\+--         /  \          /  \               /  \    /  \+--        b    c        a    b             a    b  c    d+--+--+-- R1) +/- simplification:+--    ops = + or -, two literals (not siblings)+--+--    Examples:+--       A: 5 + (10-x)  ==> 15-x+--       B: (10+x) + 5  ==> 15+x+--       C: (5+a)-(5-b) ==> 0+(a+b)+--+-- R2) * simplification+--    ops = *, two literals (not siblings)+--+--    Examples:+--       A: 5 * (10*x)  ==> 50*x+--       B: (10*x) * 5  ==> 50*x+--       C: (5*a)*(5*b) ==> 25*(a*b)+--+-- R3) * distribution over +/-+--    op1 = *, op2 = + or -, two literals (not siblings)+--+--    This transformation doesn't reduce the number of operations but switches+--    the outer and the inner operations so that the outer is (+) or (-) instead+--    of (*). It increases the odds that other rules will match after this one.+--+--    Examples:+--       A: 5 * (10-x)  ==> 50 - (5*x)+--       B: (10+x) * 5  ==> 50 + (5*x)+--       C: Not supported as it would increase the number of operations:+--          (5+a)*(5-b) ==> 25 - 5*b + 5*a - a*b+--+-- R4) Simple factorization+--+--    op1 = + or -, op2/op3 = *,+--    one literal for each innermost * operation (except in the D case),+--    the two other terms are equals+--+--    Examples:+--       A: x - (10*x)  ==> (-9)*x+--       B: (10*x) + x  ==> 11*x+--       C: (5*x)-(x*3) ==> 2*x+--       D: x+x         ==> 2*x+--+-- R5) +/- propagation+--+--    ops = + or -, one literal+--+--    This transformation doesn't reduce the number of operations but propagates+--    the constant to the outer level. It increases the odds that other rules+--    will match after this one.+--+--    Examples:+--       A: x - (10-y)  ==> (x+y) - 10+--       B: (10+x) - y  ==> 10 + (x-y)+--       C: N/A (caught by the A and B cases)+--+--------------------------------------------------------++-- | Rules to perform constant folding into nested expressions+--+--See Note [Constant folding through nested expressions]+numFoldingRules :: PrimOp -> (DynFlags -> PrimOps) -> RuleM CoreExpr+numFoldingRules op dict = do+  [e1,e2] <- getArgs+  dflags <- getDynFlags+  let PrimOps{..} = dict dflags+  if not (gopt Opt_NumConstantFolding dflags)+    then mzero+    else case BinOpApp e1 op e2 of+     -- R1) +/- simplification+     x    :++: (y :++: v)          -> return $ mkL (x+y)   `add` v+     x    :++: (L y :-: v)         -> return $ mkL (x+y)   `sub` v+     x    :++: (v   :-: L y)       -> return $ mkL (x-y)   `add` v+     L x  :-:  (y :++: v)          -> return $ mkL (x-y)   `sub` v+     L x  :-:  (L y :-: v)         -> return $ mkL (x-y)   `add` v+     L x  :-:  (v   :-: L y)       -> return $ mkL (x+y)   `sub` v++     (y :++: v)    :-: L x         -> return $ mkL (y-x)   `add` v+     (L y :-: v)   :-: L x         -> return $ mkL (y-x)   `sub` v+     (v   :-: L y) :-: L x         -> return $ mkL (0-y-x) `add` v++     (x :++: w)  :+: (y :++: v)    -> return $ mkL (x+y)   `add` (w `add` v)+     (w :-: L x) :+: (L y :-: v)   -> return $ mkL (y-x)   `add` (w `sub` v)+     (w :-: L x) :+: (v   :-: L y) -> return $ mkL (0-x-y) `add` (w `add` v)+     (L x :-: w) :+: (L y :-: v)   -> return $ mkL (x+y)   `sub` (w `add` v)+     (L x :-: w) :+: (v   :-: L y) -> return $ mkL (x-y)   `add` (v `sub` w)+     (w :-: L x) :+: (y :++: v)    -> return $ mkL (y-x)   `add` (w `add` v)+     (L x :-: w) :+: (y :++: v)    -> return $ mkL (x+y)   `add` (v `sub` w)+     (y :++: v)  :+: (w :-: L x)   -> return $ mkL (y-x)   `add` (w `add` v)+     (y :++: v)  :+: (L x :-: w)   -> return $ mkL (x+y)   `add` (v `sub` w)++     (v   :-: L y) :-: (w :-: L x) -> return $ mkL (x-y)   `add` (v `sub` w)+     (v   :-: L y) :-: (L x :-: w) -> return $ mkL (0-x-y) `add` (v `add` w)+     (L y :-:   v) :-: (w :-: L x) -> return $ mkL (x+y)   `sub` (v `add` w)+     (L y :-:   v) :-: (L x :-: w) -> return $ mkL (y-x)   `add` (w `sub` v)+     (x :++: w)    :-: (y :++: v)  -> return $ mkL (x-y)   `add` (w `sub` v)+     (w :-: L x)   :-: (y :++: v)  -> return $ mkL (0-y-x) `add` (w `sub` v)+     (L x :-: w)   :-: (y :++: v)  -> return $ mkL (x-y)   `sub` (v `add` w)+     (y :++: v)    :-: (w :-: L x) -> return $ mkL (y+x)   `add` (v `sub` w)+     (y :++: v)    :-: (L x :-: w) -> return $ mkL (y-x)   `add` (v `add` w)++     -- R2) * simplification+     x :**: (y :**: v)             -> return $ mkL (x*y)   `mul` v+     (x :**: w) :*: (y :**: v)     -> return $ mkL (x*y)   `mul` (w `mul` v)++     -- R3) * distribution over +/-+     x :**: (y :++: v)             -> return $ mkL (x*y)   `add` (mkL x `mul` v)+     x :**: (L y :-: v)            -> return $ mkL (x*y)   `sub` (mkL x `mul` v)+     x :**: (v   :-: L y)          -> return $ (mkL x `mul` v) `sub` mkL (x*y)++     -- R4) Simple factorization+     v :+: w+      | w `cheapEqExpr` v          -> return $ mkL 2       `mul` v+     w :+: (y :**: v)+      | w `cheapEqExpr` v          -> return $ mkL (1+y)   `mul` v+     w :-: (y :**: v)+      | w `cheapEqExpr` v          -> return $ mkL (1-y)   `mul` v+     (y :**: v) :+: w+      | w `cheapEqExpr` v          -> return $ mkL (y+1)   `mul` v+     (y :**: v) :-: w+      | w `cheapEqExpr` v          -> return $ mkL (y-1)   `mul` v+     (x :**: w) :+: (y :**: v)+      | w `cheapEqExpr` v          -> return $ mkL (x+y)   `mul` v+     (x :**: w) :-: (y :**: v)+      | w `cheapEqExpr` v          -> return $ mkL (x-y)   `mul` v++     -- R5) +/- propagation+     w  :+: (y :++: v)             -> return $ mkL y `add` (w `add` v)+     (y :++: v) :+: w              -> return $ mkL y       `add` (w `add` v)+     w  :-: (y :++: v)             -> return $ (w `sub` v) `sub` mkL y+     (y :++: v) :-: w              -> return $ mkL y       `add` (v `sub` w)+     w    :-: (L y :-: v)          -> return $ (w `add` v) `sub` mkL y+     (L y :-: v) :-: w             -> return $ mkL y       `sub` (w `add` v)+     w    :+: (L y :-: v)          -> return $ mkL y       `add` (w `sub` v)+     w    :+: (v :-: L y)          -> return $ (w `add` v) `sub` mkL y+     (L y :-: v) :+: w             -> return $ mkL y       `add` (w `sub` v)+     (v :-: L y) :+: w             -> return $ (w `add` v) `sub` mkL y++     _                             -> mzero++++-- | Match the application of a binary primop+pattern BinOpApp  :: Arg CoreBndr -> PrimOp -> Arg CoreBndr -> CoreExpr+pattern BinOpApp  x op y =  OpVal op `App` x `App` y++-- | Match a primop+pattern OpVal   :: PrimOp  -> Arg CoreBndr+pattern OpVal   op     <- Var (isPrimOpId_maybe -> Just op) where+   OpVal op = Var (mkPrimOpId op)++++-- | Match a literal+pattern L :: Integer -> Arg CoreBndr+pattern L l <- Lit (isLitValue_maybe -> Just l)++-- | Match an addition+pattern (:+:) :: Arg CoreBndr -> Arg CoreBndr -> CoreExpr+pattern x :+: y <- BinOpApp x (isAddOp -> True) y++-- | Match an addition with a literal (handle commutativity)+pattern (:++:) :: Integer -> Arg CoreBndr -> CoreExpr+pattern l :++: x <- (isAdd -> Just (l,x))++isAdd :: CoreExpr -> Maybe (Integer,CoreExpr)+isAdd e = case e of+   L l :+: x   -> Just (l,x)+   x   :+: L l -> Just (l,x)+   _           -> Nothing++-- | Match a multiplication+pattern (:*:) :: Arg CoreBndr -> Arg CoreBndr -> CoreExpr+pattern x :*: y <- BinOpApp x (isMulOp -> True) y++-- | Match a multiplication with a literal (handle commutativity)+pattern (:**:) :: Integer -> Arg CoreBndr -> CoreExpr+pattern l :**: x <- (isMul -> Just (l,x))++isMul :: CoreExpr -> Maybe (Integer,CoreExpr)+isMul e = case e of+   L l :*: x   -> Just (l,x)+   x   :*: L l -> Just (l,x)+   _           -> Nothing+++-- | Match a subtraction+pattern (:-:) :: Arg CoreBndr -> Arg CoreBndr -> CoreExpr+pattern x :-: y <- BinOpApp x (isSubOp -> True) y++isSubOp :: PrimOp -> Bool+isSubOp IntSubOp  = True+isSubOp WordSubOp = True+isSubOp _         = False++isAddOp :: PrimOp -> Bool+isAddOp IntAddOp  = True+isAddOp WordAddOp = True+isAddOp _         = False++isMulOp :: PrimOp -> Bool+isMulOp IntMulOp  = True+isMulOp WordMulOp = True+isMulOp _         = False++-- | Explicit "type-class"-like dictionary for numeric primops+--+-- Depends on DynFlags because creating a literal value depends on DynFlags+data PrimOps = PrimOps+   { add :: CoreExpr -> CoreExpr -> CoreExpr -- ^ Add two numbers+   , sub :: CoreExpr -> CoreExpr -> CoreExpr -- ^ Sub two numbers+   , mul :: CoreExpr -> CoreExpr -> CoreExpr -- ^ Multiply two numbers+   , mkL :: Integer -> CoreExpr              -- ^ Create a literal value+   }++intPrimOps :: DynFlags -> PrimOps+intPrimOps dflags = PrimOps+   { add = \x y -> BinOpApp x IntAddOp y+   , sub = \x y -> BinOpApp x IntSubOp y+   , mul = \x y -> BinOpApp x IntMulOp y+   , mkL = intResult' dflags+   }++wordPrimOps :: DynFlags -> PrimOps+wordPrimOps dflags = PrimOps+   { add = \x y -> BinOpApp x WordAddOp y+   , sub = \x y -> BinOpApp x WordSubOp y+   , mul = \x y -> BinOpApp x WordMulOp y+   , mkL = wordResult' dflags+   }+++-------------------------------------------------------- -- Constant folding through case-expressions -- -- cf Scrutinee Constant Folding in simplCore/SimplUtils@@ -1578,21 +2034,22 @@   = Just $ LitAlt $ mkMachInt dflags $ toInteger $ dataConTagZ dc  tx_con_dtt :: Type -> AltCon -> Maybe AltCon-tx_con_dtt _  DEFAULT              = Just DEFAULT-tx_con_dtt ty (LitAlt (MachInt i))-  | tag >= 0-  , tag < n_data_cons-  = Just (DataAlt (data_cons !! tag))   -- tag is zero-indexed, as is (!!)-  | otherwise-  = Nothing-  where-    tag         = fromInteger i :: ConTagZ-    tc          = tyConAppTyCon ty-    n_data_cons = tyConFamilySize tc-    data_cons   = tyConDataCons tc+tx_con_dtt _  DEFAULT = Just DEFAULT+tx_con_dtt ty (LitAlt (LitNumber LitNumInt i _))+   | tag >= 0+   , tag < n_data_cons+   = Just (DataAlt (data_cons !! tag))   -- tag is zero-indexed, as is (!!)+   | otherwise+   = Nothing+   where+     tag         = fromInteger i :: ConTagZ+     tc          = tyConAppTyCon ty+     n_data_cons = tyConFamilySize tc+     data_cons   = tyConDataCons tc -tx_con_dtt _  alt                  = pprPanic "caseRules" (ppr alt)+tx_con_dtt _ alt = pprPanic "caseRules" (ppr alt) + {- Note [caseRules for tagToEnum] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We want to transform@@ -1628,7 +2085,7 @@       DEFAULT -> e1       DEFAULT -> e2 -Instead, we deal with turning one branch into DEAFULT in SimplUtils+Instead, we deal with turning one branch into DEFAULT in SimplUtils (add_default in mkCase3).  Note [caseRules for dataToTag]
prelude/THNames.hs view
@@ -129,8 +129,8 @@     overlappableDataConName, overlappingDataConName, overlapsDataConName,     incoherentDataConName,     -- DerivStrategy-    stockStrategyDataConName, anyclassStrategyDataConName,-    newtypeStrategyDataConName,+    stockStrategyName, anyclassStrategyName,+    newtypeStrategyName, viaStrategyName,     -- TExp     tExpDataConName,     -- RuleBndr@@ -156,7 +156,7 @@     patQTyConName, fieldPatQTyConName, fieldExpQTyConName, funDepTyConName,     predQTyConName, decsQTyConName, ruleBndrQTyConName, tySynEqnQTyConName,     roleTyConName, tExpTyConName, injAnnTyConName, kindQTyConName,-    overlapTyConName, derivClauseQTyConName, derivStrategyTyConName,+    overlapTyConName, derivClauseQTyConName, derivStrategyQTyConName,      -- Quasiquoting     quoteDecName, quoteTypeName, quoteExpName, quotePatName]@@ -185,8 +185,7 @@ qTyConName, nameTyConName, fieldExpTyConName, patTyConName,     fieldPatTyConName, expTyConName, decTyConName, typeTyConName,     matchTyConName, clauseTyConName, funDepTyConName, predTyConName,-    tExpTyConName, injAnnTyConName, overlapTyConName,-    derivStrategyTyConName :: Name+    tExpTyConName, injAnnTyConName, overlapTyConName :: Name qTyConName             = thTc (fsLit "Q")              qTyConKey nameTyConName          = thTc (fsLit "Name")           nameTyConKey fieldExpTyConName      = thTc (fsLit "FieldExp")       fieldExpTyConKey@@ -202,7 +201,6 @@ tExpTyConName          = thTc (fsLit "TExp")           tExpTyConKey injAnnTyConName        = thTc (fsLit "InjectivityAnn") injAnnTyConKey overlapTyConName       = thTc (fsLit "Overlap")        overlapTyConKey-derivStrategyTyConName = thTc (fsLit "DerivStrategy")  derivStrategyTyConKey  returnQName, bindQName, sequenceQName, newNameName, liftName,     mkNameName, mkNameG_vName, mkNameG_dName, mkNameG_tcName,@@ -529,12 +527,21 @@ derivClauseName :: Name derivClauseName = libFun (fsLit "derivClause") derivClauseIdKey +-- data DerivStrategy = ...+stockStrategyName, anyclassStrategyName, newtypeStrategyName,+  viaStrategyName :: Name+stockStrategyName    = libFun (fsLit "stockStrategy")    stockStrategyIdKey+anyclassStrategyName = libFun (fsLit "anyclassStrategy") anyclassStrategyIdKey+newtypeStrategyName  = libFun (fsLit "newtypeStrategy")  newtypeStrategyIdKey+viaStrategyName      = libFun (fsLit "viaStrategy")      viaStrategyIdKey+ matchQTyConName, clauseQTyConName, expQTyConName, stmtQTyConName,     decQTyConName, conQTyConName, bangTypeQTyConName,     varBangTypeQTyConName, typeQTyConName, fieldExpQTyConName,     patQTyConName, fieldPatQTyConName, predQTyConName, decsQTyConName,     ruleBndrQTyConName, tySynEqnQTyConName, roleTyConName,-    derivClauseQTyConName, kindQTyConName, tyVarBndrQTyConName :: Name+    derivClauseQTyConName, kindQTyConName, tyVarBndrQTyConName,+    derivStrategyQTyConName :: Name matchQTyConName         = libTc (fsLit "MatchQ")         matchQTyConKey clauseQTyConName        = libTc (fsLit "ClauseQ")        clauseQTyConKey expQTyConName           = libTc (fsLit "ExpQ")           expQTyConKey@@ -555,6 +562,7 @@ derivClauseQTyConName   = libTc (fsLit "DerivClauseQ")   derivClauseQTyConKey kindQTyConName          = libTc (fsLit "KindQ")          kindQTyConKey tyVarBndrQTyConName     = libTc (fsLit "TyVarBndrQ")     tyVarBndrQTyConKey+derivStrategyQTyConName = libTc (fsLit "DerivStrategyQ") derivStrategyQTyConKey  -- quasiquoting quoteExpName, quotePatName, quoteDecName, quoteTypeName :: Name@@ -590,13 +598,6 @@ overlapsDataConName     = thCon (fsLit "Overlaps")     overlapsDataConKey incoherentDataConName   = thCon (fsLit "Incoherent")   incoherentDataConKey --- data DerivStrategy = ...-stockStrategyDataConName, anyclassStrategyDataConName,-  newtypeStrategyDataConName :: Name-stockStrategyDataConName    = thCon (fsLit "StockStrategy")    stockDataConKey-anyclassStrategyDataConName = thCon (fsLit "AnyclassStrategy") anyclassDataConKey-newtypeStrategyDataConName  = thCon (fsLit "NewtypeStrategy")  newtypeDataConKey- {- ********************************************************************* *                                                                      *                      Class keys@@ -626,7 +627,7 @@     fieldPatQTyConKey, fieldExpQTyConKey, funDepTyConKey, predTyConKey,     predQTyConKey, decsQTyConKey, ruleBndrQTyConKey, tySynEqnQTyConKey,     roleTyConKey, tExpTyConKey, injAnnTyConKey, kindQTyConKey,-    overlapTyConKey, derivClauseQTyConKey, derivStrategyTyConKey :: Unique+    overlapTyConKey, derivClauseQTyConKey, derivStrategyQTyConKey :: Unique expTyConKey             = mkPreludeTyConUnique 200 matchTyConKey           = mkPreludeTyConUnique 201 clauseTyConKey          = mkPreludeTyConUnique 202@@ -662,7 +663,7 @@ kindQTyConKey           = mkPreludeTyConUnique 232 overlapTyConKey         = mkPreludeTyConUnique 233 derivClauseQTyConKey    = mkPreludeTyConUnique 234-derivStrategyTyConKey   = mkPreludeTyConUnique 235+derivStrategyQTyConKey  = mkPreludeTyConUnique 235  {- ********************************************************************* *                                                                      *@@ -704,12 +705,6 @@ overlapsDataConKey     = mkPreludeDataConUnique 211 incoherentDataConKey   = mkPreludeDataConUnique 212 --- data DerivStrategy = ...-stockDataConKey, anyclassDataConKey, newtypeDataConKey :: Unique-stockDataConKey    = mkPreludeDataConUnique 213-anyclassDataConKey = mkPreludeDataConUnique 214-newtypeDataConKey  = mkPreludeDataConUnique 215- {- ********************************************************************* *                                                                      *                      Id keys@@ -1049,6 +1044,14 @@ -- type DerivPred = ... derivClauseIdKey :: Unique derivClauseIdKey = mkPreludeMiscIdUnique 493++-- data DerivStrategy = ...+stockStrategyIdKey, anyclassStrategyIdKey, newtypeStrategyIdKey,+  viaStrategyIdKey :: Unique+stockStrategyIdKey    = mkPreludeDataConUnique 494+anyclassStrategyIdKey = mkPreludeDataConUnique 495+newtypeStrategyIdKey  = mkPreludeDataConUnique 496+viaStrategyIdKey      = mkPreludeDataConUnique 497  {- ************************************************************************
prelude/TysPrim.hs view
@@ -30,7 +30,7 @@         tYPE, primRepToRuntimeRep,          funTyCon, funTyConName,-        primTyCons,+        unexposedPrimTyCons, exposedPrimTyCons, primTyCons,          charPrimTyCon,          charPrimTy, charPrimTyConName,         intPrimTyCon,           intPrimTy, intPrimTyConName,@@ -118,7 +118,22 @@ -}  primTyCons :: [TyCon]-primTyCons+primTyCons = unexposedPrimTyCons ++ exposedPrimTyCons++-- | 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).+unexposedPrimTyCons :: [TyCon]+unexposedPrimTyCons+  = [ eqPrimTyCon+    , eqReprPrimTyCon+    , eqPhantPrimTyCon+    ]++-- | Primitive 'TyCon's that are defined in, and exported from, "GHC.Prim".+exposedPrimTyCons :: [TyCon]+exposedPrimTyCons   = [ addrPrimTyCon     , arrayPrimTyCon     , byteArrayPrimTyCon@@ -150,9 +165,6 @@     , wordPrimTyCon     , word32PrimTyCon     , word64PrimTyCon-    , eqPrimTyCon-    , eqReprPrimTyCon-    , eqPhantPrimTyCon      , tYPETyCon @@ -328,7 +340,7 @@ -}  funTyConName :: Name-funTyConName = mkPrimTyConName (fsLit "(->)") funTyConKey funTyCon+funTyConName = mkPrimTyConName (fsLit "->") funTyConKey funTyCon  -- | The @(->)@ type constructor. --
prelude/TysWiredIn.hs view
@@ -91,14 +91,8 @@         -- * Kinds         typeNatKindCon, typeNatKind, typeSymbolKindCon, typeSymbolKind,         isLiftedTypeKindTyConName, liftedTypeKind, constraintKind,-        starKindTyCon, starKindTyConName,-        unicodeStarKindTyCon, unicodeStarKindTyConName,         liftedTypeKindTyCon, constraintKindTyCon,--        -- * Parallel arrays-        mkPArrTy,-        parrTyCon, parrFakeCon, isPArrTyCon, isPArrFakeCon,-        parrTyCon_RDR, parrTyConName,+        liftedTypeKindTyConName,          -- * Equality predicates         heqTyCon, heqClass, heqDataCon,@@ -150,7 +144,7 @@ import Class            ( Class, mkClass ) import RdrName import Name-import NameEnv          ( NameEnv, mkNameEnv, lookupNameEnv )+import NameEnv          ( NameEnv, mkNameEnv, lookupNameEnv, lookupNameEnv_NF ) import NameSet          ( NameSet, mkNameSet, elemNameSet ) import BasicTypes       ( Arity, Boxity(..), TupleSort(..), ConTagZ,                           SourceText(..) )@@ -220,7 +214,6 @@                 , word8TyCon                 , listTyCon                 , maybeTyCon-                , parrTyCon                 , heqTyCon                 , coercibleTyCon                 , typeNatKindCon@@ -230,8 +223,6 @@                 , vecElemTyCon                 , constraintKindTyCon                 , liftedTypeKindTyCon-                , starKindTyCon-                , unicodeStarKindTyCon                 ]  mkWiredInTyConName :: BuiltInSyntax -> Module -> FastString -> Unique -> TyCon -> Name@@ -255,13 +246,13 @@ heqTyConName, heqDataConName, heqSCSelIdName :: Name heqTyConName   = mkWiredInTyConName   UserSyntax gHC_TYPES (fsLit "~~")   heqTyConKey      heqTyCon heqDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "Eq#")  heqDataConKey heqDataCon-heqSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "HEq_sc") heqSCSelIdKey heqSCSelId+heqSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "heq_sel") heqSCSelIdKey heqSCSelId  -- See Note [Kind-changing of (~) and Coercible] in libraries/ghc-prim/GHC/Types.hs coercibleTyConName, coercibleDataConName, coercibleSCSelIdName :: Name coercibleTyConName   = mkWiredInTyConName   UserSyntax gHC_TYPES (fsLit "Coercible")  coercibleTyConKey   coercibleTyCon coercibleDataConName = mkWiredInDataConName UserSyntax gHC_TYPES (fsLit "MkCoercible") coercibleDataConKey coercibleDataCon-coercibleSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "Coercible_sc") coercibleSCSelIdKey coercibleSCSelId+coercibleSCSelIdName = mkWiredInIdName gHC_TYPES (fsLit "coercible_sel") coercibleSCSelIdKey coercibleSCSelId  charTyConName, charDataConName, intTyConName, intDataConName :: Name charTyConName     = mkWiredInTyConName   UserSyntax gHC_TYPES (fsLit "Char") charTyConKey charTyCon@@ -280,11 +271,11 @@ consDataConName   = mkWiredInDataConName BuiltInSyntax gHC_TYPES (fsLit ":") consDataConKey consDataCon  maybeTyConName, nothingDataConName, justDataConName :: Name-maybeTyConName     = mkWiredInTyConName   UserSyntax gHC_BASE (fsLit "Maybe")+maybeTyConName     = mkWiredInTyConName   UserSyntax gHC_MAYBE (fsLit "Maybe")                                           maybeTyConKey maybeTyCon-nothingDataConName = mkWiredInDataConName UserSyntax gHC_BASE (fsLit "Nothing")+nothingDataConName = mkWiredInDataConName UserSyntax gHC_MAYBE (fsLit "Nothing")                                           nothingDataConKey nothingDataCon-justDataConName    = mkWiredInDataConName UserSyntax gHC_BASE (fsLit "Just")+justDataConName    = mkWiredInDataConName UserSyntax gHC_MAYBE (fsLit "Just")                                           justDataConKey justDataCon  wordTyConName, wordDataConName, word8TyConName, word8DataConName :: Name@@ -395,11 +386,8 @@ constraintKindTyConName :: Name constraintKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Constraint") constraintKindTyConKey   constraintKindTyCon -liftedTypeKindTyConName, starKindTyConName, unicodeStarKindTyConName-  :: Name+liftedTypeKindTyConName :: Name liftedTypeKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "Type") liftedTypeKindTyConKey liftedTypeKindTyCon-starKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "*") starKindTyConKey starKindTyCon-unicodeStarKindTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "★") unicodeStarKindTyConKey unicodeStarKindTyCon  runtimeRepTyConName, vecRepDataConName, tupleRepDataConName, sumRepDataConName :: Name runtimeRepTyConName = mkWiredInTyConName UserSyntax gHC_TYPES (fsLit "RuntimeRep") runtimeRepTyConKey runtimeRepTyCon@@ -445,14 +433,8 @@ mk_special_dc_name :: FastString -> Unique -> DataCon -> Name mk_special_dc_name fs u dc = mkWiredInDataConName UserSyntax gHC_TYPES fs u dc -parrTyConName, parrDataConName :: Name-parrTyConName   = mkWiredInTyConName   BuiltInSyntax-                    gHC_PARR' (fsLit "[::]") parrTyConKey parrTyCon-parrDataConName = mkWiredInDataConName UserSyntax-                    gHC_PARR' (fsLit "PArr") parrDataConKey parrDataCon- boolTyCon_RDR, false_RDR, true_RDR, intTyCon_RDR, charTyCon_RDR,-    intDataCon_RDR, listTyCon_RDR, consDataCon_RDR, parrTyCon_RDR :: RdrName+    intDataCon_RDR, listTyCon_RDR, consDataCon_RDR :: RdrName boolTyCon_RDR   = nameRdrName boolTyConName false_RDR       = nameRdrName falseDataConName true_RDR        = nameRdrName trueDataConName@@ -461,7 +443,6 @@ intDataCon_RDR  = nameRdrName intDataConName listTyCon_RDR   = nameRdrName listTyConName consDataCon_RDR = nameRdrName consDataConName-parrTyCon_RDR   = nameRdrName parrTyConName  {- ************************************************************************@@ -471,21 +452,17 @@ ************************************************************************ -} -pcNonEnumTyCon :: Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon--- Not an enumeration-pcNonEnumTyCon = pcTyCon False- -- This function assumes that the types it creates have all parameters at -- Representational role, and that there is no kind polymorphism.-pcTyCon :: Bool -> Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon-pcTyCon is_enum name cType tyvars cons+pcTyCon :: Name -> Maybe CType -> [TyVar] -> [DataCon] -> TyCon+pcTyCon name cType tyvars cons   = mkAlgTyCon name                 (mkAnonTyConBinders tyvars)                 liftedTypeKind                 (map (const Representational) tyvars)                 cType                 []              -- No stupid theta-                (DataTyCon cons is_enum)+                (mkDataTyConRhs cons)                 (VanillaAlgTyCon (mkPrelTyConRepName name))                 False           -- Not in GADT syntax @@ -521,6 +498,13 @@                      tyvars ex_tyvars user_tyvars arg_tys tycon   = data_con   where+    tag_map = mkTyConTagMap tycon+    -- This constructs the constructor Name to ConTag map once per+    -- constructor, which is quadratic. It's OK here, because it's+    -- only called for wired in data types that don't have a lot of+    -- constructors. It's also likely that GHC will lift tag_map, since+    -- we call pcDataConWithFixity' with static TyCons in the same module.+    -- See Note [Constructor tag allocation] and #14657     data_con = mkDataCon dc_name declared_infix prom_info                 (map (const no_bang) arg_tys)                 []      -- No labelled fields@@ -531,6 +515,7 @@                 arg_tys (mkTyConApp tycon (mkTyVarTys tyvars))                 rri                 tycon+                (lookupNameEnv_NF tag_map dc_name)                 []      -- No stupid theta                 (mkDataConWorkId wrk_name data_con)                 NoDataConRep    -- Wired-in types are too simple to need wrappers@@ -569,16 +554,15 @@ typeNatKindCon, typeSymbolKindCon :: TyCon -- data Nat -- data Symbol-typeNatKindCon    = pcTyCon False typeNatKindConName    Nothing [] []-typeSymbolKindCon = pcTyCon False typeSymbolKindConName Nothing [] []+typeNatKindCon    = pcTyCon typeNatKindConName    Nothing [] []+typeSymbolKindCon = pcTyCon typeSymbolKindConName Nothing [] []  typeNatKind, typeSymbolKind :: Kind typeNatKind    = mkTyConTy typeNatKindCon typeSymbolKind = mkTyConTy typeSymbolKindCon  constraintKindTyCon :: TyCon-constraintKindTyCon = pcTyCon False constraintKindTyConName-                              Nothing [] []+constraintKindTyCon = pcTyCon constraintKindTyConName Nothing [] []  liftedTypeKind, constraintKind :: Kind liftedTypeKind   = tYPE liftedRepTy@@ -689,7 +673,8 @@       "[]" -> Just $ choose_ns listTyConName nilDataConName       ":"    -> Just consDataConName -      "[::]" -> Just parrTyConName+      -- equality tycon+      "~"    -> Just eqTyConName        -- boxed tuple data/tycon       "()"    -> Just $ tup_name Boxed 0@@ -1032,7 +1017,7 @@     -- Kind: forall k1 k2. k1 -> k2 -> Constraint     binders   = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] (\ks -> ks)     roles     = [Nominal, Nominal, Nominal, Nominal]-    rhs       = DataTyCon { data_cons = [datacon], is_enum = False }+    rhs       = mkDataTyConRhs [datacon]      tvs       = binderVars binders     sc_pred   = mkTyConApp eqPrimTyCon (mkTyVarTys tvs)@@ -1050,7 +1035,7 @@     -- Kind: forall k. k -> k -> Constraint     binders   = mkTemplateTyConBinders [liftedTypeKind] (\[k] -> [k,k])     roles     = [Nominal, Representational, Representational]-    rhs       = DataTyCon { data_cons = [datacon], is_enum = False }+    rhs       = mkDataTyConRhs [datacon]      tvs@[k,a,b] = binderVars binders     sc_pred     = mkTyConApp eqReprPrimTyCon (mkTyVarTys [k, k, a, b])@@ -1072,27 +1057,15 @@ runtimeRepTy :: Type runtimeRepTy = mkTyConTy runtimeRepTyCon -liftedTypeKindTyCon, starKindTyCon, unicodeStarKindTyCon :: TyCon- -- Type synonyms; see Note [TYPE and RuntimeRep] in TysPrim -- type Type = tYPE 'LiftedRep--- type *    = tYPE 'LiftedRep--- type *    = tYPE 'LiftedRep  -- Unicode variant-+liftedTypeKindTyCon :: TyCon liftedTypeKindTyCon   = buildSynTyCon liftedTypeKindTyConName                                        [] liftedTypeKind []                                        (tYPE liftedRepTy) -starKindTyCon         = buildSynTyCon starKindTyConName-                                       [] liftedTypeKind []-                                       (tYPE liftedRepTy)--unicodeStarKindTyCon  = buildSynTyCon unicodeStarKindTyConName-                                       [] liftedTypeKind []-                                       (tYPE liftedRepTy)- runtimeRepTyCon :: TyCon-runtimeRepTyCon = pcNonEnumTyCon runtimeRepTyConName Nothing []+runtimeRepTyCon = pcTyCon runtimeRepTyConName Nothing []                           (vecRepDataCon : tupleRepDataCon :                            sumRepDataCon : runtimeRepSimpleDataCons) @@ -1165,8 +1138,7 @@   = map (mkTyConTy . promoteDataCon) runtimeRepSimpleDataCons  vecCountTyCon :: TyCon-vecCountTyCon = pcTyCon True vecCountTyConName Nothing []-                        vecCountDataCons+vecCountTyCon = pcTyCon vecCountTyConName Nothing [] vecCountDataCons  -- See Note [Wiring in RuntimeRep] vecCountDataCons :: [DataCon]@@ -1184,7 +1156,7 @@   vec64DataConTy] = map (mkTyConTy . promoteDataCon) vecCountDataCons  vecElemTyCon :: TyCon-vecElemTyCon = pcTyCon True vecElemTyConName Nothing [] vecElemDataCons+vecElemTyCon = pcTyCon vecElemTyConName Nothing [] vecElemDataCons  -- See Note [Wiring in RuntimeRep] vecElemDataCons :: [DataCon]@@ -1249,7 +1221,7 @@ charTy = mkTyConTy charTyCon  charTyCon :: TyCon-charTyCon   = pcNonEnumTyCon charTyConName+charTyCon   = pcTyCon charTyConName                    (Just (CType NoSourceText Nothing                                   (NoSourceText,fsLit "HsChar")))                    [] [charDataCon]@@ -1263,7 +1235,7 @@ intTy = mkTyConTy intTyCon  intTyCon :: TyCon-intTyCon = pcNonEnumTyCon intTyConName+intTyCon = pcTyCon intTyConName                (Just (CType NoSourceText Nothing (NoSourceText,fsLit "HsInt")))                  [] [intDataCon] intDataCon :: DataCon@@ -1273,7 +1245,7 @@ wordTy = mkTyConTy wordTyCon  wordTyCon :: TyCon-wordTyCon = pcNonEnumTyCon wordTyConName+wordTyCon = pcTyCon wordTyConName             (Just (CType NoSourceText Nothing (NoSourceText, fsLit "HsWord")))                [] [wordDataCon] wordDataCon :: DataCon@@ -1283,10 +1255,10 @@ word8Ty = mkTyConTy word8TyCon  word8TyCon :: TyCon-word8TyCon = pcNonEnumTyCon word8TyConName-                      (Just (CType NoSourceText Nothing-                             (NoSourceText, fsLit "HsWord8"))) []-                      [word8DataCon]+word8TyCon = pcTyCon word8TyConName+                     (Just (CType NoSourceText Nothing+                            (NoSourceText, fsLit "HsWord8"))) []+                     [word8DataCon] word8DataCon :: DataCon word8DataCon = pcDataCon word8DataConName [] [wordPrimTy] word8TyCon @@ -1294,7 +1266,7 @@ floatTy = mkTyConTy floatTyCon  floatTyCon :: TyCon-floatTyCon   = pcNonEnumTyCon floatTyConName+floatTyCon   = pcTyCon floatTyConName                       (Just (CType NoSourceText Nothing                              (NoSourceText, fsLit "HsFloat"))) []                       [floatDataCon]@@ -1305,7 +1277,7 @@ doubleTy = mkTyConTy doubleTyCon  doubleTyCon :: TyCon-doubleTyCon = pcNonEnumTyCon doubleTyConName+doubleTyCon = pcTyCon doubleTyConName                       (Just (CType NoSourceText Nothing                              (NoSourceText,fsLit "HsDouble"))) []                       [doubleDataCon]@@ -1367,7 +1339,7 @@ boolTy = mkTyConTy boolTyCon  boolTyCon :: TyCon-boolTyCon = pcTyCon True boolTyConName+boolTyCon = pcTyCon boolTyConName                     (Just (CType NoSourceText Nothing                            (NoSourceText, fsLit "HsBool")))                     [] [falseDataCon, trueDataCon]@@ -1381,7 +1353,7 @@ trueDataConId  = dataConWorkId trueDataCon  orderingTyCon :: TyCon-orderingTyCon = pcTyCon True orderingTyConName Nothing+orderingTyCon = pcTyCon orderingTyConName Nothing                         [] [ltDataCon, eqDataCon, gtDataCon]  ltDataCon, eqDataCon, gtDataCon :: DataCon@@ -1410,11 +1382,12 @@ mkListTy ty = mkTyConApp listTyCon [ty]  listTyCon :: TyCon-listTyCon = buildAlgTyCon listTyConName alpha_tyvar [Representational]-                          Nothing []-                          (DataTyCon [nilDataCon, consDataCon] False )-                          False-                          (VanillaAlgTyCon $ mkPrelTyConRepName listTyConName)+listTyCon =+  buildAlgTyCon listTyConName alpha_tyvar [Representational]+                Nothing []+                (mkDataTyConRhs [nilDataCon, consDataCon])+                False+                (VanillaAlgTyCon $ mkPrelTyConRepName listTyConName)  nilDataCon :: DataCon nilDataCon  = pcDataCon nilDataConName alpha_tyvar [] listTyCon@@ -1431,7 +1404,7 @@ -- Wired-in type Maybe  maybeTyCon :: TyCon-maybeTyCon = pcTyCon False maybeTyConName Nothing alpha_tyvar+maybeTyCon = pcTyCon maybeTyConName Nothing alpha_tyvar                      [nothingDataCon, justDataCon]  nothingDataCon :: DataCon@@ -1514,78 +1487,6 @@ mkSumTy :: [Type] -> Type mkSumTy tys = mkTyConApp (sumTyCon (length tys))                          (map getRuntimeRep tys ++ tys)--{- *********************************************************************-*                                                                      *-        The parallel-array type,  [::]-*                                                                      *-************************************************************************--Special syntax for parallel arrays needs some wired in definitions.--}---- | Construct a type representing the application of the parallel array constructor-mkPArrTy    :: Type -> Type-mkPArrTy ty  = mkTyConApp parrTyCon [ty]---- | Represents the type constructor of parallel arrays------  * This must match the definition in @PrelPArr@------ NB: Although the constructor is given here, it will not be accessible in---     user code as it is not in the environment of any compiled module except---     @PrelPArr@.----parrTyCon :: TyCon-parrTyCon  = pcNonEnumTyCon parrTyConName Nothing alpha_tyvar [parrDataCon]--parrDataCon :: DataCon-parrDataCon  = pcDataCon-                 parrDataConName-                 alpha_tyvar            -- forall'ed type variables-                 [intTy,                -- 1st argument: Int-                  mkTyConApp            -- 2nd argument: Array# a-                    arrayPrimTyCon-                    alpha_ty]-                 parrTyCon---- | Check whether a type constructor is the constructor for parallel arrays-isPArrTyCon    :: TyCon -> Bool-isPArrTyCon tc  = tyConName tc == parrTyConName---- | Fake array constructors------ * These constructors are never really used to represent array values;---   however, they are very convenient during desugaring (and, in particular,---   in the pattern matching compiler) to treat array pattern just like---   yet another constructor pattern----parrFakeCon                        :: Arity -> DataCon-parrFakeCon i | i > mAX_TUPLE_SIZE  = mkPArrFakeCon  i  -- build one specially-parrFakeCon i                       = parrFakeConArr!i---- pre-defined set of constructors----parrFakeConArr :: Array Int DataCon-parrFakeConArr  = array (0, mAX_TUPLE_SIZE) [(i, mkPArrFakeCon i)-                                            | i <- [0..mAX_TUPLE_SIZE]]---- build a fake parallel array constructor for the given arity----mkPArrFakeCon       :: Int -> DataCon-mkPArrFakeCon arity  = data_con-  where-        data_con  = pcDataCon name [tyvar] tyvarTys parrTyCon-        tyvar     = head alphaTyVars-        tyvarTys  = replicate arity $ mkTyVarTy tyvar-        nameStr   = mkFastString ("MkPArr" ++ show arity)-        name      = mkWiredInName gHC_PARR' (mkDataOccFS nameStr) unique-                                  (AConLike (RealDataCon data_con)) UserSyntax-        unique      = mkPArrDataConUnique arity---- | Checks whether a data constructor is a fake constructor for parallel arrays-isPArrFakeCon      :: DataCon -> Bool-isPArrFakeCon dcon  = dcon == parrFakeCon (dataConSourceArity dcon)  -- Promoted Booleans 
prelude/TysWiredIn.hs-boot view
@@ -12,6 +12,8 @@ typeNatKind, typeSymbolKind :: Type mkBoxedTupleTy :: [Type] -> Type +coercibleTyCon, heqTyCon :: TyCon+ liftedTypeKind :: Kind constraintKind :: Kind 
profiling/CostCentre.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE DeriveDataTypeable #-} module CostCentre (-        CostCentre(..), CcName, IsCafCC(..),+        CostCentre(..), CcName, CCFlavour(..),                 -- All abstract except to friend: ParseIface.y          CostCentreStack,@@ -31,6 +31,7 @@ import SrcLoc import FastString import Util+import CostCentreState  import Data.Data @@ -41,21 +42,18 @@  data CostCentre   = NormalCC {-                cc_key  :: {-# UNPACK #-} !Int,+                cc_flavour  :: CCFlavour,                  -- ^ Two cost centres may have the same name and                  -- module but different SrcSpans, so we need a way to                  -- distinguish them easily and give them different-                 -- object-code labels.  So every CostCentre has a-                 -- Unique that is distinct from every other-                 -- CostCentre in the same module.-                 ---                 -- XXX: should really be using Unique here, but we-                 -- need to derive Data below and there's no Data-                 -- instance for Unique.+                 -- object-code labels.  So every CostCentre has an+                 -- associated flavour that indicates how it was+                 -- generated, and flavours that allow multiple instances+                 -- of the same name and module have a deterministic 0-based+                 -- index.                 cc_name :: CcName,      -- ^ Name of the cost centre itself                 cc_mod  :: Module,      -- ^ Name of module defining this CC.-                cc_loc  :: SrcSpan,-                cc_is_caf  :: IsCafCC   -- see below+                cc_loc  :: SrcSpan     }    | AllCafsCC {@@ -66,9 +64,22 @@  type CcName = FastString -data IsCafCC = NotCafCC | CafCC-  deriving (Eq, Ord, Data)+-- | The flavour of a cost centre.+--+-- Index fields represent 0-based indices giving source-code ordering of+-- centres with the same module, name, and flavour.+data CCFlavour = CafCC -- ^ Auto-generated top-level thunk+               | ExprCC !CostCentreIndex -- ^ Explicitly annotated expression+               | DeclCC !CostCentreIndex -- ^ Explicitly annotated declaration+               | HpcCC !CostCentreIndex -- ^ Generated by HPC for coverage+               deriving (Eq, Ord, Data) +-- | Extract the index from a flavour+flavourIndex :: CCFlavour -> Int+flavourIndex CafCC = 0+flavourIndex (ExprCC x) = unCostCentreIndex x+flavourIndex (DeclCC x) = unCostCentreIndex x+flavourIndex (HpcCC x) = unCostCentreIndex x  instance Eq CostCentre where         c1 == c2 = case c1 `cmpCostCentre` c2 of { EQ -> True; _ -> False }@@ -81,10 +92,10 @@ cmpCostCentre (AllCafsCC  {cc_mod = m1}) (AllCafsCC  {cc_mod = m2})   = m1 `compare` m2 -cmpCostCentre NormalCC {cc_key = n1, cc_mod =  m1}-              NormalCC {cc_key = n2, cc_mod =  m2}-    -- first key is module name, then the integer key-  = (m1 `compare` m2) `thenCmp` (n1 `compare` n2)+cmpCostCentre NormalCC {cc_flavour = f1, cc_mod =  m1, cc_name = n1}+              NormalCC {cc_flavour = f2, cc_mod =  m2, cc_name = n2}+    -- first key is module name, then centre name, then flavour+  = (m1 `compare` m2) `thenCmp` (n1 `compare` n2) `thenCmp` (f1 `compare` f2)  cmpCostCentre other_1 other_2   = let@@ -102,9 +113,9 @@ -- Predicates on CostCentre  isCafCC :: CostCentre -> Bool-isCafCC (AllCafsCC {})                 = True-isCafCC (NormalCC {cc_is_caf = CafCC}) = True-isCafCC _                              = False+isCafCC (AllCafsCC {})                  = True+isCafCC (NormalCC {cc_flavour = CafCC}) = True+isCafCC _                               = False  -- | Is this a cost-centre which records scc counts isSccCountCC :: CostCentre -> Bool@@ -123,18 +134,17 @@ ----------------------------------------------------------------------------- -- Building cost centres -mkUserCC :: FastString -> Module -> SrcSpan -> Unique -> CostCentre-mkUserCC cc_name mod loc key-  = NormalCC { cc_key = getKey key, cc_name = cc_name, cc_mod =  mod, cc_loc = loc,-               cc_is_caf = NotCafCC {-might be changed-}+mkUserCC :: FastString -> Module -> SrcSpan -> CCFlavour -> CostCentre+mkUserCC cc_name mod loc flavour+  = NormalCC { cc_name = cc_name, cc_mod =  mod, cc_loc = loc,+               cc_flavour = flavour     } -mkAutoCC :: Id -> Module -> IsCafCC -> CostCentre-mkAutoCC id mod is_caf-  = NormalCC { cc_key = getKey (getUnique id),-               cc_name = str, cc_mod =  mod,+mkAutoCC :: Id -> Module -> CostCentre+mkAutoCC id mod+  = NormalCC { cc_name = str, cc_mod =  mod,                cc_loc = nameSrcSpan (getName id),-               cc_is_caf = is_caf+               cc_flavour = CafCC     }   where         name = getName id@@ -249,27 +259,45 @@ pprCostCentreCore :: CostCentre -> SDoc pprCostCentreCore (AllCafsCC {cc_mod = m})   = text "__sccC" <+> braces (ppr m)-pprCostCentreCore (NormalCC {cc_key = key, cc_name = n, cc_mod = m, cc_loc = loc,-                             cc_is_caf = caf})+pprCostCentreCore (NormalCC {cc_flavour = flavour, cc_name = n,+                             cc_mod = m, cc_loc = loc})   = text "__scc" <+> braces (hsep [         ppr m <> char '.' <> ftext n,-        whenPprDebug (ppr key),-        pp_caf caf,+        pprFlavourCore flavour,         whenPprDebug (ppr loc)     ]) -pp_caf :: IsCafCC -> SDoc-pp_caf CafCC = text "__C"-pp_caf _     = empty+-- ^ Print a flavour in Core+pprFlavourCore :: CCFlavour -> SDoc+pprFlavourCore CafCC = text "__C"+pprFlavourCore f     = pprIdxCore $ flavourIndex f +-- ^ Print a flavour's index in Core+pprIdxCore :: Int -> SDoc+pprIdxCore 0 = empty+pprIdxCore idx = whenPprDebug $ ppr idx+ -- Printing as a C label ppCostCentreLbl :: CostCentre -> SDoc ppCostCentreLbl (AllCafsCC  {cc_mod = m}) = ppr m <> text "_CAFs_cc"-ppCostCentreLbl (NormalCC {cc_key = k, cc_name = n, cc_mod = m,-                           cc_is_caf = is_caf})+ppCostCentreLbl (NormalCC {cc_flavour = f, cc_name = n, cc_mod = m})   = ppr m <> char '_' <> ztext (zEncodeFS n) <> char '_' <>-        case is_caf of { CafCC -> text "CAF"; _ -> ppr (mkUniqueGrimily k)} <> text "_cc"+        ppFlavourLblComponent f <> text "_cc" +-- ^ Print the flavour component of a C label+ppFlavourLblComponent :: CCFlavour -> SDoc+ppFlavourLblComponent CafCC = text "CAF"+ppFlavourLblComponent (ExprCC i) = text "EXPR" <> ppIdxLblComponent i+ppFlavourLblComponent (DeclCC i) = text "DECL" <> ppIdxLblComponent i+ppFlavourLblComponent (HpcCC i) = text "HPC" <> ppIdxLblComponent i++-- ^ Print the flavour index component of a C label+ppIdxLblComponent :: CostCentreIndex -> SDoc+ppIdxLblComponent n =+  case unCostCentreIndex n of+    0 -> empty+    n -> ppr n+ -- This is the name to go in the user-displayed string, -- recorded in the cost centre declaration costCentreUserName :: CostCentre -> String@@ -277,7 +305,7 @@  costCentreUserNameFS :: CostCentre -> FastString costCentreUserNameFS (AllCafsCC {})  = mkFastString "CAF"-costCentreUserNameFS (NormalCC {cc_name = name, cc_is_caf = is_caf})+costCentreUserNameFS (NormalCC {cc_name = name, cc_flavour = is_caf})   =  case is_caf of       CafCC -> mkFastString "CAF:" `appendFS` name       _     -> name@@ -285,24 +313,32 @@ costCentreSrcSpan :: CostCentre -> SrcSpan costCentreSrcSpan = cc_loc -instance Binary IsCafCC where+instance Binary CCFlavour where     put_ bh CafCC = do             putByte bh 0-    put_ bh NotCafCC = do+    put_ bh (ExprCC i) = do             putByte bh 1+            put_ bh i+    put_ bh (DeclCC i) = do+            putByte bh 2+            put_ bh i+    put_ bh (HpcCC i) = do+            putByte bh 3+            put_ bh i     get bh = do             h <- getByte bh             case h of               0 -> do return CafCC-              _ -> do return NotCafCC+              1 -> ExprCC <$> get bh+              2 -> DeclCC <$> get bh+              _ -> HpcCC <$> get bh  instance Binary CostCentre where-    put_ bh (NormalCC aa ab ac _ad ae) = do+    put_ bh (NormalCC aa ab ac _ad) = do             putByte bh 0             put_ bh aa             put_ bh ab             put_ bh ac-            put_ bh ae     put_ bh (AllCafsCC ae _af) = do             putByte bh 1             put_ bh ae@@ -312,8 +348,7 @@               0 -> do aa <- get bh                       ab <- get bh                       ac <- get bh-                      ae <- get bh-                      return (NormalCC aa ab ac noSrcSpan ae)+                      return (NormalCC aa ab ac noSrcSpan)               _ -> do ae <- get bh                       return (AllCafsCC ae noSrcSpan) 
+ profiling/CostCentreState.hs view
@@ -0,0 +1,36 @@+{-# LANGUAGE DeriveDataTypeable #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+module CostCentreState ( CostCentreState, newCostCentreState+                       , CostCentreIndex, unCostCentreIndex, getCCIndex+                       ) where++import GhcPrelude+import FastString+import FastStringEnv++import Data.Data+import Binary++-- | Per-module state for tracking cost centre indices.+--+-- See documentation of 'CostCentre.cc_flavour' for more details.+newtype CostCentreState = CostCentreState (FastStringEnv Int)++-- | Initialize cost centre state.+newCostCentreState :: CostCentreState+newCostCentreState = CostCentreState emptyFsEnv++-- | An index into a given cost centre module,name,flavour set+newtype CostCentreIndex = CostCentreIndex { unCostCentreIndex :: Int }+  deriving (Eq, Ord, Data, Binary)++-- | Get a new index for a given cost centre name.+getCCIndex :: FastString+           -> CostCentreState+           -> (CostCentreIndex, CostCentreState)+getCCIndex nm (CostCentreState m) =+    (CostCentreIndex idx, CostCentreState m')+  where+    m_idx = lookupFsEnv m nm+    idx = maybe 0 id m_idx+    m' = extendFsEnv m nm (idx + 1)
rename/RnBinds.hs view
@@ -32,7 +32,6 @@  import HsSyn import TcRnMonad-import TcEvidence     ( emptyTcEvBinds ) import RnTypes import RnPat import RnNames@@ -183,10 +182,10 @@                -> RnM (HsValBinds GhcRn, DefUses) -- A hs-boot file has no bindings. -- Return a single HsBindGroup with empty binds and renamed signatures-rnTopBindsBoot bound_names (ValBindsIn mbinds sigs)+rnTopBindsBoot bound_names (ValBinds _ mbinds sigs)   = do  { checkErr (isEmptyLHsBinds mbinds) (bindsInHsBootFile mbinds)         ; (sigs', fvs) <- renameSigs (HsBootCtxt bound_names) sigs-        ; return (ValBindsOut [] sigs', usesOnly fvs) }+        ; return (XValBindsLR (NValBinds [] sigs'), usesOnly fvs) } rnTopBindsBoot _ b = pprPanic "rnTopBindsBoot" (ppr b)  {-@@ -203,27 +202,31 @@ -- This version (a) assumes that the binding vars are *not* already in scope --               (b) removes the binders from the free vars of the thing inside -- The parser doesn't produce ThenBinds-rnLocalBindsAndThen EmptyLocalBinds thing_inside =-  thing_inside EmptyLocalBinds emptyNameSet+rnLocalBindsAndThen (EmptyLocalBinds x) thing_inside =+  thing_inside (EmptyLocalBinds x) emptyNameSet -rnLocalBindsAndThen (HsValBinds val_binds) thing_inside+rnLocalBindsAndThen (HsValBinds x val_binds) thing_inside   = rnLocalValBindsAndThen val_binds $ \ val_binds' ->-      thing_inside (HsValBinds val_binds')+      thing_inside (HsValBinds x val_binds') -rnLocalBindsAndThen (HsIPBinds binds) thing_inside = do+rnLocalBindsAndThen (HsIPBinds x binds) thing_inside = do     (binds',fv_binds) <- rnIPBinds binds-    (thing, fvs_thing) <- thing_inside (HsIPBinds binds') fv_binds+    (thing, fvs_thing) <- thing_inside (HsIPBinds x binds') fv_binds     return (thing, fvs_thing `plusFV` fv_binds) +rnLocalBindsAndThen (XHsLocalBindsLR _) _ = panic "rnLocalBindsAndThen"+ rnIPBinds :: HsIPBinds GhcPs -> RnM (HsIPBinds GhcRn, FreeVars)-rnIPBinds (IPBinds ip_binds _no_dict_binds) = do+rnIPBinds (IPBinds _ ip_binds ) = do     (ip_binds', fvs_s) <- mapAndUnzipM (wrapLocFstM rnIPBind) ip_binds-    return (IPBinds ip_binds' emptyTcEvBinds, plusFVs fvs_s)+    return (IPBinds noExt ip_binds', plusFVs fvs_s)+rnIPBinds (XHsIPBinds _) = panic "rnIPBinds"  rnIPBind :: IPBind GhcPs -> RnM (IPBind GhcRn, FreeVars)-rnIPBind (IPBind ~(Left n) expr) = do+rnIPBind (IPBind _ ~(Left n) expr) = do     (expr',fvExpr) <- rnLExpr expr-    return (IPBind (Left n) expr', fvExpr)+    return (IPBind noExt (Left n) expr', fvExpr)+rnIPBind (XIPBind _) = panic "rnIPBind"  {- ************************************************************************@@ -274,9 +277,9 @@ rnValBindsLHS :: NameMaker               -> HsValBinds GhcPs               -> RnM (HsValBindsLR GhcRn GhcPs)-rnValBindsLHS topP (ValBindsIn mbinds sigs)+rnValBindsLHS topP (ValBinds x mbinds sigs)   = do { mbinds' <- mapBagM (wrapLocM (rnBindLHS topP doc)) mbinds-       ; return $ ValBindsIn mbinds' sigs }+       ; return $ ValBinds x mbinds' sigs }   where     bndrs = collectHsBindsBinders mbinds     doc   = text "In the binding group for:" <+> pprWithCommas ppr bndrs@@ -291,12 +294,12 @@               -> HsValBindsLR GhcRn GhcPs               -> RnM (HsValBinds GhcRn, DefUses) -rnValBindsRHS ctxt (ValBindsIn mbinds sigs)+rnValBindsRHS ctxt (ValBinds _ mbinds sigs)   = do { (sigs', sig_fvs) <- renameSigs ctxt sigs        ; binds_w_dus <- mapBagM (rnLBind (mkSigTvFn sigs')) mbinds        ; let !(anal_binds, anal_dus) = depAnalBinds binds_w_dus -       ; let patsyn_fvs = foldr (unionNameSet . psb_fvs) emptyNameSet $+       ; let patsyn_fvs = foldr (unionNameSet . psb_ext) emptyNameSet $                           getPatSynBinds anal_binds                 -- The uses in binds_w_dus for PatSynBinds do not include                 -- variables used in the patsyn builders; see@@ -311,7 +314,7 @@                             -- so that the binders are removed from                             -- the uses in the sigs -        ; return (ValBindsOut anal_binds sigs', valbind'_dus) }+        ; return (XValBindsLR (NValBinds anal_binds sigs'), valbind'_dus) }  rnValBindsRHS _ b = pprPanic "rnValBindsRHS" (ppr b) @@ -336,10 +339,10 @@   :: HsValBinds GhcPs   -> (HsValBinds GhcRn -> FreeVars -> RnM (result, FreeVars))   -> RnM (result, FreeVars)-rnLocalValBindsAndThen binds@(ValBindsIn _ sigs) thing_inside+rnLocalValBindsAndThen binds@(ValBinds _ _ sigs) thing_inside  = do   {     -- (A) Create the local fixity environment-          new_fixities <- makeMiniFixityEnv [L loc sig-                                                  | L loc (FixSig sig) <- sigs]+          new_fixities <- makeMiniFixityEnv [ L loc sig+                                            | L loc (FixSig _ sig) <- sigs]                -- (B) Rename the LHSes         ; (bound_names, new_lhs) <- rnLocalValBindsLHS new_fixities binds@@ -405,27 +408,27 @@   = do       -- we don't actually use the FV processing of rnPatsAndThen here       (pat',pat'_fvs) <- rnBindPat name_maker pat-      return (bind { pat_lhs = pat', bind_fvs = pat'_fvs })+      return (bind { pat_lhs = pat', pat_ext = pat'_fvs })                 -- We temporarily store the pat's FVs in bind_fvs;                 -- gets updated to the FVs of the whole bind                 -- when doing the RHS below  rnBindLHS name_maker _ bind@(FunBind { fun_id = rdr_name })   = do { name <- applyNameMaker name_maker rdr_name-       ; return (bind { fun_id   = name-                      , bind_fvs = placeHolderNamesTc }) }+       ; return (bind { fun_id = name+                      , fun_ext = noExt }) } -rnBindLHS name_maker _ (PatSynBind psb@PSB{ psb_id = rdrname })+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 psb{ psb_id = name }) }+       ; return (PatSynBind x psb{ psb_ext = noExt, 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 psb{ psb_id = name }) }+       ; return (PatSynBind x psb{ psb_ext = noExt, psb_id = name }) }   where     localPatternSynonymErr :: SDoc     localPatternSynonymErr@@ -450,7 +453,7 @@                        , pat_rhs = grhss                                    -- pat fvs were stored in bind_fvs                                    -- after processing the LHS-                       , bind_fvs = pat_fvs })+                       , pat_ext = pat_fvs })   = do  { mod <- getModule         ; (grhss', rhs_fvs) <- rnGRHSs PatBindRhs rnLExpr grhss @@ -462,14 +465,15 @@                 -- MonoLocalBinds test in TcBinds.decideGeneralisationPlan               bndrs = collectPatBinders pat               bind' = bind { pat_rhs  = grhss'-                           , pat_rhs_ty = placeHolderType, bind_fvs = fvs' }+                           , pat_ext = fvs' }                ok_nobind_pat                   = -- See Note [Pattern bindings that bind no variables]                     case pat of-                       L _ (WildPat {}) -> True-                       L _ (BangPat {}) -> True -- #9127, #13646-                       _                -> False+                       L _ (WildPat {})   -> True+                       L _ (BangPat {})   -> True -- #9127, #13646+                       L _ (SplicePat {}) -> True+                       _                  -> False          -- Warn if the pattern binds no variables         -- See Note [Pattern bindings that bind no variables]@@ -501,13 +505,13 @@          ; fvs' `seq` -- See Note [Free-variable space leak]           return (bind { fun_matches = matches'-                       , bind_fvs   = fvs' },+                       , fun_ext     = fvs' },                   [plain_name], rhs_fvs)       } -rnBind sig_fn (PatSynBind bind)+rnBind sig_fn (PatSynBind x bind)   = do  { (bind', name, fvs) <- rnPatSynBind sig_fn bind-        ; return (PatSynBind bind', name, fvs) }+        ; return (PatSynBind x bind', name, fvs) }  rnBind _ b = pprPanic "rnBind" (ppr b) @@ -515,7 +519,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Generally, we want to warn about pattern bindings like   Just _ = e-because they don't do anything!  But we have two exceptions:+because they don't do anything!  But we have three exceptions:  * A wildcard pattern        _ = rhs@@ -529,6 +533,12 @@   Moreover, Trac #13646 argues that even for single constructor   types, you might want to write the constructor.  See also #9127. +* A splice pattern+      $(th-lhs) = rhs+   It is impossible to determine whether or not th-lhs really+   binds any variable. We should disable the warning for any pattern+   which contain splices, but that is a more expensive check.+ Note [Free-variable space leak] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We have@@ -591,11 +601,11 @@      get_scoped_tvs :: LSig GhcRn -> Maybe ([Located Name], [Name])     -- Returns (binders, scoped tvs for those binders)-    get_scoped_tvs (L _ (ClassOpSig _ names sig_ty))+    get_scoped_tvs (L _ (ClassOpSig _ _ names sig_ty))       = Just (names, hsScopedTvs sig_ty)-    get_scoped_tvs (L _ (TypeSig names sig_ty))+    get_scoped_tvs (L _ (TypeSig _ names sig_ty))       = Just (names, hsWcScopedTvs sig_ty)-    get_scoped_tvs (L _ (PatSynSig names sig_ty))+    get_scoped_tvs (L _ (PatSynSig _ names sig_ty))       = Just (names, hsScopedTvs sig_ty)     get_scoped_tvs _ = Nothing @@ -610,9 +620,10 @@  makeMiniFixityEnv decls = foldlM add_one_sig emptyFsEnv decls  where-   add_one_sig env (L loc (FixitySig names fixity)) =+   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 env (loc, name_loc, name,fixity) = do      { -- this fixity decl is a duplicate iff@@ -704,7 +715,7 @@               bind' = bind{ psb_args = details'                           , psb_def = pat'                           , psb_dir = dir'-                          , psb_fvs = fvs' }+                          , psb_ext = fvs' }               selector_names = case details' of                                  RecCon names ->                                   map (unLoc . recordPatSynSelectorId) names@@ -723,6 +734,8 @@       = hang (text "Illegal pattern synonym declaration")            2 (text "Use -XPatternSynonyms to enable this extension") +rnPatSynBind _ (XPatSynBind _) = panic "rnPatSynBind"+ {- Note [Renaming pattern synonym variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -876,9 +889,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-                          , bind_fvs = placeHolderNamesTc }-+       ; let bind' = bind { fun_id = sel_name, fun_ext = noExt }        ; return (L loc bind' `consBag` rest ) }  -- Report error for all other forms of bindings@@ -941,41 +952,41 @@ -- Doesn't seem worth much trouble to sort this.  renameSig :: HsSigCtxt -> Sig GhcPs -> RnM (Sig GhcRn, FreeVars)-renameSig _ (IdSig x)-  = return (IdSig x, emptyFVs)    -- Actually this never occurs+renameSig _ (IdSig _ x)+  = return (IdSig noExt x, emptyFVs)    -- Actually this never occurs -renameSig ctxt sig@(TypeSig vs ty)+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 doc ty-        ; return (TypeSig new_vs new_ty, fvs) }+        ; return (TypeSig noExt new_vs new_ty, fvs) } -renameSig ctxt sig@(ClassOpSig is_deflt vs ty)+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 is_deflt new_v new_ty, fvs) }+        ; return (ClassOpSig noExt 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)+renameSig _ (SpecInstSig _ src ty)   = do  { (new_ty, fvs) <- rnHsSigType SpecInstSigCtx ty-        ; return (SpecInstSig src new_ty,fvs) }+        ; return (SpecInstSig noExt src new_ty,fvs) }  -- {-# SPECIALISE #-} pragmas can refer to imported Ids -- so, in the top-level case (when mb_names is Nothing) -- we use lookupOccRn.  If there's both an imported and a local 'f' -- then the SPECIALISE pragma is ambiguous, unlike all other signatures-renameSig ctxt sig@(SpecSig v tys inl)+renameSig ctxt sig@(SpecSig _ v tys inl)   = do  { new_v <- case ctxt of                      TopSigCtxt {} -> lookupLocatedOccRn v                      _             -> lookupSigOccRn ctxt sig v         ; (new_ty, fvs) <- foldM do_one ([],emptyFVs) tys-        ; return (SpecSig new_v new_ty inl, fvs) }+        ; return (SpecSig noExt new_v new_ty inl, fvs) }   where     ty_ctxt = GenericCtx (text "a SPECIALISE signature for"                           <+> quotes (ppr v))@@ -983,33 +994,33 @@       = do { (new_ty, fvs_ty) <- rnHsSigType ty_ctxt ty            ; return ( new_ty:tys, fvs_ty `plusFV` fvs) } -renameSig ctxt sig@(InlineSig v s)+renameSig ctxt sig@(InlineSig _ v s)   = do  { new_v <- lookupSigOccRn ctxt sig v-        ; return (InlineSig new_v s, emptyFVs) }+        ; return (InlineSig noExt new_v s, emptyFVs) } -renameSig ctxt (FixSig fsig)+renameSig ctxt (FixSig _ fsig)   = do  { new_fsig <- rnSrcFixityDecl ctxt fsig-        ; return (FixSig new_fsig, emptyFVs) }+        ; return (FixSig noExt new_fsig, emptyFVs) } -renameSig ctxt sig@(MinimalSig s (L l bf))+renameSig ctxt sig@(MinimalSig _ s (L l bf))   = do new_bf <- traverse (lookupSigOccRn ctxt sig) bf-       return (MinimalSig s (L l new_bf), emptyFVs)+       return (MinimalSig noExt s (L l new_bf), emptyFVs) -renameSig ctxt sig@(PatSynSig vs ty)+renameSig ctxt sig@(PatSynSig _ vs ty)   = do  { new_vs <- mapM (lookupSigOccRn ctxt sig) vs         ; (ty', fvs) <- rnHsSigType ty_ctxt ty-        ; return (PatSynSig new_vs ty', fvs) }+        ; return (PatSynSig noExt 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)+renameSig ctxt sig@(SCCFunSig _ st v s)   = do  { new_v <- lookupSigOccRn ctxt sig v-        ; return (SCCFunSig st new_v s, emptyFVs) }+        ; return (SCCFunSig noExt st new_v s, emptyFVs) }  -- COMPLETE Sigs can refer to imported IDs which is why we use -- lookupLocatedOccRn rather than lookupSigOccRn-renameSig _ctxt sig@(CompleteMatchSig s (L l bf) mty)+renameSig _ctxt sig@(CompleteMatchSig _ s (L l bf) mty)   = do new_bf <- traverse lookupLocatedOccRn bf        new_mty  <- traverse lookupLocatedOccRn mty @@ -1018,7 +1029,7 @@          -- Why 'any'? See Note [Orphan COMPLETE pragmas]          addErrCtxt (text "In" <+> ppr sig) $ failWithTc orphanError -       return (CompleteMatchSig s (L l new_bf) new_mty, emptyFVs)+       return (CompleteMatchSig noExt s (L l new_bf) new_mty, emptyFVs)   where     orphanError :: SDoc     orphanError =@@ -1026,6 +1037,8 @@       text "A COMPLETE pragma must mention at least one data constructor" $$       text "or pattern synonym defined in the same module." +renameSig _ (XSig _) = panic "renameSig"+ {- Note [Orphan COMPLETE pragmas] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1092,6 +1105,8 @@      (CompleteMatchSig {}, TopSigCtxt {} ) -> True      (CompleteMatchSig {}, _)              -> False +     (XSig _, _) -> panic "okHsSig"+ ------------------- findDupSigs :: [LSig GhcPs] -> [NonEmpty (Located RdrName, Sig GhcPs)] -- Check for duplicates on RdrName version,@@ -1105,20 +1120,20 @@ findDupSigs sigs   = findDupsEq matching_sig (concatMap (expand_sig . unLoc) sigs)   where-    expand_sig sig@(FixSig (FixitySig ns _)) = zip ns (repeat sig)-    expand_sig sig@(InlineSig n _)           = [(n,sig)]-    expand_sig sig@(TypeSig ns _)            = [(n,sig) | n <- ns]-    expand_sig sig@(ClassOpSig _ ns _)       = [(n,sig) | n <- ns]-    expand_sig sig@(PatSynSig ns  _ )        = [(n,sig) | n <- ns]-    expand_sig sig@(SCCFunSig _ n _)         = [(n,sig)]+    expand_sig sig@(FixSig _ (FixitySig _ ns _)) = zip ns (repeat sig)+    expand_sig sig@(InlineSig _ n _)             = [(n,sig)]+    expand_sig sig@(TypeSig _ ns _)              = [(n,sig) | n <- ns]+    expand_sig sig@(ClassOpSig _ _ ns _)         = [(n,sig) | n <- ns]+    expand_sig sig@(PatSynSig _ ns  _ )          = [(n,sig) | n <- ns]+    expand_sig sig@(SCCFunSig _ _ n _)           = [(n,sig)]     expand_sig _ = []      matching_sig (L _ n1,sig1) (L _ n2,sig2)       = n1 == n2 && mtch sig1 sig2     mtch (FixSig {})           (FixSig {})         = True     mtch (InlineSig {})        (InlineSig {})      = True     mtch (TypeSig {})          (TypeSig {})        = True-    mtch (ClassOpSig d1 _ _)   (ClassOpSig d2 _ _) = d1 == d2-    mtch (PatSynSig _ _)       (PatSynSig _ _)     = True+    mtch (ClassOpSig _ d1 _ _) (ClassOpSig _ d2 _ _) = d1 == d2+    mtch (PatSynSig _ _ _)     (PatSynSig _ _ _)   = True     mtch (SCCFunSig{})         (SCCFunSig{})       = True     mtch _ _ = False @@ -1146,6 +1161,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"  rnMatch :: Outputable (body GhcPs) => HsMatchContext Name         -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))@@ -1165,8 +1181,9 @@                       (FunRhs { mc_fun = L _ funid }, FunRhs { mc_fun = L lf _ })                                             -> mf { mc_fun = L lf funid }                       _                     -> ctxt-        ; return (Match { m_ctxt = mf', m_pats = pats'+        ; return (Match { m_ext = noExt, m_ctxt = mf', m_pats = pats'                         , m_grhss = grhss'}, grhss_fvs ) }}+rnMatch' _ _ (XMatch _) = panic "rnMatch'"  emptyCaseErr :: HsMatchContext Name -> SDoc emptyCaseErr ctxt = hang (text "Empty list of alternatives in" <+> pp_ctxt)@@ -1189,10 +1206,11 @@         -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))         -> GRHSs GhcPs (Located (body GhcPs))         -> RnM (GRHSs GhcRn (Located (body GhcRn)), FreeVars)-rnGRHSs ctxt rnBody (GRHSs grhss (L l binds))+rnGRHSs ctxt rnBody (GRHSs _ grhss (L l binds))   = rnLocalBindsAndThen binds   $ \ binds' _ -> do     (grhss', fvGRHSs) <- mapFvRn (rnGRHS ctxt rnBody) grhss-    return (GRHSs grhss' (L l binds'), fvGRHSs)+    return (GRHSs noExt grhss' (L l binds'), fvGRHSs)+rnGRHSs _ _ (XGRHSs _) = panic "rnGRHSs"  rnGRHS :: HsMatchContext Name        -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))@@ -1204,7 +1222,7 @@         -> (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))         -> GRHS GhcPs (Located (body GhcPs))         -> RnM (GRHS GhcRn (Located (body GhcRn)), FreeVars)-rnGRHS' ctxt rnBody (GRHS guards rhs)+rnGRHS' ctxt rnBody (GRHS _ guards rhs)   = do  { pattern_guards_allowed <- xoptM LangExt.PatternGuards         ; ((guards', rhs'), fvs) <- rnStmts (PatGuard ctxt) rnLExpr guards $ \ _ ->                                     rnBody rhs@@ -1212,14 +1230,15 @@         ; unless (pattern_guards_allowed || is_standard_guard guards')                  (addWarn NoReason (nonStdGuardErr guards')) -        ; return (GRHS guards' rhs', fvs) }+        ; return (GRHS noExt guards' rhs', fvs) }   where         -- Standard Haskell 1.4 guards are just a single boolean         -- expression, rather than a list of qualifiers as in the         -- Glasgow extension-    is_standard_guard []                       = True-    is_standard_guard [L _ (BodyStmt _ _ _ _)] = True-    is_standard_guard _                        = False+    is_standard_guard []                  = True+    is_standard_guard [L _ (BodyStmt {})] = True+    is_standard_guard _                   = False+rnGRHS' _ _ (XGRHS _) = panic "rnGRHS'"  {- *********************************************************@@ -1240,9 +1259,10 @@         -- for con-like things; hence returning a list         -- If neither are in scope, report an error; otherwise         -- return a fixity sig for each (slightly odd)-    rn_decl (FixitySig fnames fixity)+    rn_decl (FixitySig _ fnames fixity)       = do names <- concatMapM lookup_one fnames-           return (FixitySig names fixity)+           return (FixitySig noExt names fixity)+    rn_decl (XFixitySig _) = panic "rnSrcFixityDecl"      lookup_one :: Located RdrName -> RnM [Located Name]     lookup_one (L name_loc rdr_name)
rename/RnEnv.hs view
@@ -13,7 +13,7 @@         lookupLocatedOccRn, lookupOccRn, lookupOccRn_maybe,         lookupLocalOccRn_maybe, lookupInfoOccRn,         lookupLocalOccThLvl_maybe, lookupLocalOccRn,-        lookupTypeOccRn, lookupKindOccRn,+        lookupTypeOccRn,         lookupGlobalOccRn, lookupGlobalOccRn_maybe,         lookupOccRn_overloaded, lookupGlobalOccRn_overloaded, lookupExactOcc, @@ -79,6 +79,8 @@ import RnUtils import Data.Maybe (isJust) import qualified Data.Semigroup as Semi+import Data.Either      ( partitionEithers )+import Data.List        (find)  {- *********************************************************@@ -194,7 +196,7 @@   = do  { when (isQual rdr_name)                  (addErrAt loc (badQualBndrErr rdr_name))                 -- Binders should not be qualified; if they are, and with a different-                -- module name, we we get a confusing "M.T is not in scope" error later+                -- module name, we get a confusing "M.T is not in scope" error later          ; stage <- getStage         ; if isBrackStage stage then@@ -431,36 +433,124 @@   -------------------------------------------------- Used for record construction and pattern matching--- When the -XDisambiguateRecordFields flag is on, take account of the--- constructor name to disambiguate which field to use; it's just the--- same as for instance decls+-- | Look up an occurrence of a field in record construction or pattern+-- matching (but not update).  When the -XDisambiguateRecordFields+-- flag is on, take account of the data constructor name to+-- disambiguate which field to use. ----- NB: Consider this:---      module Foo where { data R = R { fld :: Int } }---      module Odd where { import Foo; fld x = x { fld = 3 } }--- Arguably this should work, because the reference to 'fld' is--- unambiguous because there is only one field id 'fld' in scope.--- But currently it's rejected.--lookupRecFieldOcc :: Maybe Name -- Nothing    => just look it up as usual-                                      -- Just tycon => use tycon to disambiguate-                  -> SDoc -> RdrName+-- See Note [DisambiguateRecordFields].+lookupRecFieldOcc :: Maybe Name -- Nothing  => just look it up as usual+                                -- Just con => use data con to disambiguate+                  -> RdrName                   -> RnM Name-lookupRecFieldOcc parent doc rdr_name-  | Just tc_name <- parent-  = do { mb_name <- lookupSubBndrOcc True tc_name doc rdr_name-       ; case mb_name of-           Left err -> do { addErr err; return (mkUnboundNameRdr rdr_name) }-           Right n  -> return n }-+lookupRecFieldOcc mb_con rdr_name+  | Just con <- mb_con+  , isUnboundName con  -- Avoid error cascade+  = return (mkUnboundNameRdr rdr_name)+  | Just con <- mb_con+  = do { flds <- lookupConstructorFields con+       ; env <- getGlobalRdrEnv+       ; let lbl      = occNameFS (rdrNameOcc rdr_name)+             mb_field = do fl <- find ((== lbl) . flLabel) flds+                           -- We have the label, now check it is in+                           -- scope (with the correct qualifier if+                           -- there is one, hence calling pickGREs).+                           gre <- lookupGRE_FieldLabel env fl+                           guard (not (isQual rdr_name+                                         && null (pickGREs rdr_name [gre])))+                           return (fl, gre)+       ; case mb_field of+           Just (fl, gre) -> do { addUsedGRE True gre+                                ; return (flSelector fl) }+           Nothing        -> lookupGlobalOccRn rdr_name }+             -- See Note [Fall back on lookupGlobalOccRn in lookupRecFieldOcc]   | otherwise   -- This use of Global is right as we are looking up a selector which   -- can only be defined at the top level.   = lookupGlobalOccRn rdr_name +{- Note [DisambiguateRecordFields]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When we are looking up record fields in record construction or pattern+matching, we can take advantage of the data constructor name to+resolve fields that would otherwise be ambiguous (provided the+-XDisambiguateRecordFields flag is on). +For example, consider: +   data S = MkS { x :: Int }+   data T = MkT { x :: Int }++   e = MkS { x = 3 }++When we are renaming the occurrence of `x` in `e`, instead of looking+`x` up directly (and finding both fields), lookupRecFieldOcc will+search the fields of `MkS` to find the only possible `x` the user can+mean.++Of course, we still have to check the field is in scope, using+lookupGRE_FieldLabel.  The handling of qualified imports is slightly+subtle: the occurrence may be unqualified even if the field is+imported only qualified (but if the occurrence is qualified, the+qualifier must be correct). For example:++   module A where+     data S = MkS { x :: Int }+     data T = MkT { x :: Int }++   module B where+     import qualified A (S(..))+     import A (T(MkT))++     e1 = MkT   { x = 3 }   -- x not in scope, so fail+     e2 = A.MkS { B.x = 3 } -- module qualifier is wrong, so fail+     e3 = A.MkS { x = 3 }   -- x in scope (lack of module qualifier permitted)++In case `e1`, lookupGRE_FieldLabel will return Nothing.  In case `e2`,+lookupGRE_FieldLabel will return the GRE for `A.x`, but then the guard+will fail because the field RdrName `B.x` is qualified and pickGREs+rejects the GRE.  In case `e3`, lookupGRE_FieldLabel will return the+GRE for `A.x` and the guard will succeed because the field RdrName `x`+is unqualified.+++Note [Fall back on lookupGlobalOccRn in lookupRecFieldOcc]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+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):++   data Test = Test { x :: Int }+   pattern Test wat = Test { x = wat }++Here there are multiple declarations of Test (as a data constructor+and as a pattern synonym), which will be reported as an error.  We+shouldn't also report an error about the occurrence of `x` in the+pattern synonym RHS.  However, if the pattern synonym gets added to+the environment first, we will try and fail to find `x` amongst the+(nonexistent) fields of the pattern synonym.++Alternatively, the scope check can fail due to Template Haskell.+Consider (Trac #12130):++   module Foo where+     import M+     b = $(funny)++   module M(funny) where+     data T = MkT { x :: Int }+     funny :: Q Exp+     funny = [| MkT { x = 3 } |]++When we splice, `MkT` is not lexically in scope, so+lookupGRE_FieldLabel will fail.  But there is no need for+disambiguation anyway, because `x` is an original name, and+lookupGlobalOccRn will find it.+-}+++ -- | Used in export lists to lookup the children. lookupSubBndrOcc_helper :: Bool -> Bool -> Name -> RdrName                         -> RnM ChildLookupResult@@ -650,8 +740,10 @@     NameNotFound -> return (Left (unknownSubordinateErr doc rdr_name))     FoundName _p n -> return (Right n)     FoundFL fl  ->  return (Right (flSelector fl))-    IncorrectParent {} -> return $ Left (unknownSubordinateErr doc rdr_name)-+    IncorrectParent {}+         -- See [Mismatched class methods and associated type families]+         -- in TcInstDecls.+      -> return $ Left (unknownSubordinateErr doc rdr_name)  {- Note [Family instance binders]@@ -821,20 +913,6 @@            Just name -> return name            Nothing   -> unboundName WL_LocalOnly rdr_name } -lookupKindOccRn :: RdrName -> RnM Name--- Looking up a name occurring in a kind-lookupKindOccRn rdr_name-  | isVarOcc (rdrNameOcc rdr_name)  -- See Note [Promoted variables in types]-  = badVarInType rdr_name-  | otherwise-  = do { typeintype <- xoptM LangExt.TypeInType-       ; if | typeintype           -> lookupTypeOccRn rdr_name-      -- With -XNoTypeInType, treat any usage of * in kinds as in scope-      -- this is a dirty hack, but then again so was the old * kind.-            | isStar rdr_name     -> return starKindTyConName-            | isUniStar rdr_name -> return unicodeStarKindTyConName-            | otherwise            -> lookupOccRn rdr_name }- -- lookupPromotedOccRn looks up an optionally promoted RdrName. lookupTypeOccRn :: RdrName -> RnM Name -- see Note [Demotion]@@ -843,16 +921,17 @@   = badVarInType rdr_name   | otherwise   = do { mb_name <- lookupOccRn_maybe rdr_name-       ; case mb_name of {-             Just name -> return name ;-             Nothing   -> do { dflags <- getDynFlags-                             ; lookup_demoted rdr_name dflags } } }+       ; case mb_name of+             Just name -> return name+             Nothing   -> lookup_demoted rdr_name } -lookup_demoted :: RdrName -> DynFlags -> RnM Name-lookup_demoted rdr_name dflags+lookup_demoted :: RdrName -> RnM Name+lookup_demoted rdr_name   | Just demoted_rdr <- demoteRdrName rdr_name     -- Maybe it's the name of a *data* constructor   = do { data_kinds <- xoptM LangExt.DataKinds+       ; star_is_type <- xoptM LangExt.StarIsType+       ; let star_info = starInfo star_is_type rdr_name        ; if data_kinds             then do { mb_demoted_name <- lookupOccRn_maybe demoted_rdr                     ; case mb_demoted_name of@@ -870,7 +949,7 @@                       mb_demoted_name <- discardErrs $                                          lookupOccRn_maybe demoted_rdr                     ; let suggestion | isJust mb_demoted_name = suggest_dk-                                     | otherwise              = star_info+                                     | otherwise = star_info                     ; unboundNameX WL_Any rdr_name suggestion } }    | otherwise@@ -886,17 +965,6 @@            , text "instead of"            , quotes (ppr name) <> dot ] -    star_info-      | isStar rdr_name || isUniStar rdr_name-      = if xopt LangExt.TypeInType dflags-        then text "NB: With TypeInType, you must import" <+>-             ppr rdr_name <+> text "from Data.Kind"-        else empty--      | otherwise-      = empty-- badVarInType :: RdrName -> RnM Name badVarInType rdr_name   = do { addErr (text "Illegal promoted term variable in a type:"@@ -1436,7 +1504,7 @@ -- See Note [Fixity signature lookup] lookupLocalTcNames ctxt what rdr_name   = do { mb_gres <- mapM lookup (dataTcOccs rdr_name)-       ; let (errs, names) = splitEithers mb_gres+       ; let (errs, names) = partitionEithers mb_gres        ; when (null names) $ addErr (head errs) -- Bleat about one only        ; return names }   where@@ -1557,10 +1625,10 @@ lookupSyntaxNames std_names   = do { rebindable_on <- xoptM LangExt.RebindableSyntax        ; if not rebindable_on then-             return (map (HsVar . noLoc) std_names, emptyFVs)+             return (map (HsVar noExt . noLoc) std_names, emptyFVs)         else           do { usr_names <- mapM (lookupOccRn . mkRdrUnqual . nameOccName) std_names-             ; return (map (HsVar . noLoc) usr_names, mkFVs usr_names) } }+             ; return (map (HsVar noExt . noLoc) usr_names, mkFVs usr_names) } }  -- Error messages 
rename/RnExpr.hs view
@@ -95,7 +95,7 @@  = do { this_mod <- getModule       ; when (nameIsLocalOrFrom this_mod name) $         checkThLocalName name-      ; return (HsVar (L l name), unitFV name) }+      ; return (HsVar noExt (L l name), unitFV name) }  rnUnboundVar :: RdrName -> RnM (HsExpr GhcRn, FreeVars) rnUnboundVar v@@ -107,13 +107,13 @@                 ; uv <- if startsWithUnderscore occ                         then return (TrueExprHole occ)                         else OutOfScope occ <$> getGlobalRdrEnv-                ; return (HsUnboundVar uv, emptyFVs) }+                ; return (HsUnboundVar noExt uv, emptyFVs) }          else -- Fail immediately (qualified name)              do { n <- reportUnboundName v-                ; return (HsVar (noLoc n), emptyFVs) } }+                ; return (HsVar noExt (noLoc n), emptyFVs) } } -rnExpr (HsVar (L l v))+rnExpr (HsVar _ (L l v))   = do { opt_DuplicateRecordFields <- xoptM LangExt.DuplicateRecordFields        ; mb_name <- lookupOccRn_overloaded opt_DuplicateRecordFields v        ; case mb_name of {@@ -121,58 +121,57 @@            Just (Left name)               | name == nilDataConName -- Treat [] as an ExplicitList, so that                                        -- OverloadedLists works correctly-              -> rnExpr (ExplicitList placeHolderType Nothing [])+              -> rnExpr (ExplicitList noExt Nothing [])                | otherwise               -> finishHsVar (L l name) ;             Just (Right [s]) ->-              return ( HsRecFld (ambiguousFieldOcc (FieldOcc (L l v) s))-                     , unitFV s) ;+              return ( HsRecFld noExt (Unambiguous s (L l v) ), unitFV s) ;            Just (Right fs@(_:_:_)) ->-              return ( HsRecFld (Ambiguous (L l v) PlaceHolder)+              return ( HsRecFld noExt (Ambiguous noExt (L l v))                      , mkFVs fs);            Just (Right [])         -> panic "runExpr/HsVar" } } -rnExpr (HsIPVar v)-  = return (HsIPVar v, emptyFVs)+rnExpr (HsIPVar x v)+  = return (HsIPVar x v, emptyFVs) -rnExpr (HsOverLabel _ v)+rnExpr (HsOverLabel x _ v)   = do { rebindable_on <- xoptM LangExt.RebindableSyntax        ; if rebindable_on          then do { fromLabel <- lookupOccRn (mkVarUnqual (fsLit "fromLabel"))-                 ; return (HsOverLabel (Just fromLabel) v, unitFV fromLabel) }-         else return (HsOverLabel Nothing v, emptyFVs) }+                 ; return (HsOverLabel x (Just fromLabel) v, unitFV fromLabel) }+         else return (HsOverLabel x Nothing v, emptyFVs) } -rnExpr (HsLit lit@(HsString src s))+rnExpr (HsLit x lit@(HsString src s))   = do { opt_OverloadedStrings <- xoptM LangExt.OverloadedStrings        ; if opt_OverloadedStrings then-            rnExpr (HsOverLit (mkHsIsString src s placeHolderType))+            rnExpr (HsOverLit x (mkHsIsString src s))          else do {             ; rnLit lit-            ; return (HsLit (convertLit lit), emptyFVs) } }+            ; return (HsLit x (convertLit lit), emptyFVs) } } -rnExpr (HsLit lit)+rnExpr (HsLit x lit)   = do { rnLit lit-       ; return (HsLit (convertLit lit), emptyFVs) }+       ; return (HsLit x(convertLit lit), emptyFVs) } -rnExpr (HsOverLit lit)+rnExpr (HsOverLit x lit)   = do { ((lit', mb_neg), fvs) <- rnOverLit lit -- See Note [Negative zero]        ; case mb_neg of-              Nothing -> return (HsOverLit lit', fvs)-              Just neg -> return ( HsApp (noLoc neg) (noLoc (HsOverLit lit'))+              Nothing -> return (HsOverLit x lit', fvs)+              Just neg -> return (HsApp x (noLoc neg) (noLoc (HsOverLit x lit'))                                  , fvs ) } -rnExpr (HsApp fun arg)+rnExpr (HsApp x fun arg)   = do { (fun',fvFun) <- rnLExpr fun        ; (arg',fvArg) <- rnLExpr arg-       ; return (HsApp fun' arg', fvFun `plusFV` fvArg) }+       ; return (HsApp x fun' arg', fvFun `plusFV` fvArg) } -rnExpr (HsAppType fun arg)+rnExpr (HsAppType arg fun)   = do { (fun',fvFun) <- rnLExpr fun        ; (arg',fvArg) <- rnHsWcType HsTypeCtx arg-       ; return (HsAppType fun' arg', fvFun `plusFV` fvArg) }+       ; return (HsAppType arg' fun', fvFun `plusFV` fvArg) } -rnExpr (OpApp e1 op  _ e2)+rnExpr (OpApp _ e1 op e2)   = do  { (e1', fv_e1) <- rnLExpr e1         ; (e2', fv_e2) <- rnLExpr e2         ; (op', fv_op) <- rnLExpr op@@ -183,15 +182,15 @@         -- more, so I've removed the test.  Adding HsPars in TcGenDeriv         -- should prevent bad things happening.         ; fixity <- case op' of-              L _ (HsVar (L _ n)) -> lookupFixityRn n-              L _ (HsRecFld f)    -> lookupFieldFixityRn f+              L _ (HsVar _ (L _ n)) -> lookupFixityRn n+              L _ (HsRecFld _ f)    -> lookupFieldFixityRn f               _ -> return (Fixity NoSourceText minPrecedence InfixL)                    -- c.f. lookupFixity for unbound          ; final_e <- mkOpAppRn e1' op' fixity e2'         ; return (final_e, fv_e1 `plusFV` fv_op `plusFV` fv_e2) } -rnExpr (NegApp e _)+rnExpr (NegApp _ e _)   = do { (e', fv_e)         <- rnLExpr e        ; (neg_name, fv_neg) <- lookupSyntaxName negateName        ; final_e            <- mkNegAppRn e' neg_name@@ -201,24 +200,24 @@ -- 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 e@(HsBracket _ br_body) = rnBracket e br_body -rnExpr (HsSpliceE splice) = rnSpliceExpr splice+rnExpr (HsSpliceE _ splice) = rnSpliceExpr splice  --------------------------------------------- --      Sections -- See Note [Parsing sections] in Parser.y-rnExpr (HsPar (L loc (section@(SectionL {}))))+rnExpr (HsPar x (L loc (section@(SectionL {}))))   = do  { (section', fvs) <- rnSection section-        ; return (HsPar (L loc section'), fvs) }+        ; return (HsPar x (L loc section'), fvs) } -rnExpr (HsPar (L loc (section@(SectionR {}))))+rnExpr (HsPar x (L loc (section@(SectionR {}))))   = do  { (section', fvs) <- rnSection section-        ; return (HsPar (L loc section'), fvs) }+        ; return (HsPar x (L loc section'), fvs) } -rnExpr (HsPar e)+rnExpr (HsPar x e)   = do  { (e', fvs_e) <- rnLExpr e-        ; return (HsPar e', fvs_e) }+        ; return (HsPar x e', fvs_e) }  rnExpr expr@(SectionL {})   = do  { addErr (sectionErr expr); rnSection expr }@@ -226,71 +225,68 @@   = do  { addErr (sectionErr expr); rnSection expr }  ----------------------------------------------rnExpr (HsCoreAnn src ann expr)+rnExpr (HsCoreAnn x src ann expr)   = do { (expr', fvs_expr) <- rnLExpr expr-       ; return (HsCoreAnn src ann expr', fvs_expr) }+       ; return (HsCoreAnn x src ann expr', fvs_expr) } -rnExpr (HsSCC src lbl expr)+rnExpr (HsSCC x src lbl expr)   = do { (expr', fvs_expr) <- rnLExpr expr-       ; return (HsSCC src lbl expr', fvs_expr) }-rnExpr (HsTickPragma src info srcInfo expr)+       ; return (HsSCC x src lbl expr', fvs_expr) }+rnExpr (HsTickPragma x src info srcInfo expr)   = do { (expr', fvs_expr) <- rnLExpr expr-       ; return (HsTickPragma src info srcInfo expr', fvs_expr) }+       ; return (HsTickPragma x src info srcInfo expr', fvs_expr) } -rnExpr (HsLam matches)+rnExpr (HsLam x matches)   = do { (matches', fvMatch) <- rnMatchGroup LambdaExpr rnLExpr matches-       ; return (HsLam matches', fvMatch) }+       ; return (HsLam x matches', fvMatch) } -rnExpr (HsLamCase matches)+rnExpr (HsLamCase x matches)   = do { (matches', fvs_ms) <- rnMatchGroup CaseAlt rnLExpr matches-       ; return (HsLamCase matches', fvs_ms) }+       ; return (HsLamCase x matches', fvs_ms) } -rnExpr (HsCase expr matches)+rnExpr (HsCase x expr matches)   = do { (new_expr, e_fvs) <- rnLExpr expr        ; (new_matches, ms_fvs) <- rnMatchGroup CaseAlt rnLExpr matches-       ; return (HsCase new_expr new_matches, e_fvs `plusFV` ms_fvs) }+       ; return (HsCase x new_expr new_matches, e_fvs `plusFV` ms_fvs) } -rnExpr (HsLet (L l binds) expr)+rnExpr (HsLet x (L l binds) expr)   = rnLocalBindsAndThen binds $ \binds' _ -> do       { (expr',fvExpr) <- rnLExpr expr-      ; return (HsLet (L l binds') expr', fvExpr) }+      ; return (HsLet x (L l binds') expr', fvExpr) } -rnExpr (HsDo do_or_lc (L l stmts) _)+rnExpr (HsDo x do_or_lc (L l stmts))   = do  { ((stmts', _), fvs) <-            rnStmtsWithPostProcessing do_or_lc rnLExpr              postProcessStmtsForApplicativeDo stmts              (\ _ -> return ((), emptyFVs))-        ; return ( HsDo do_or_lc (L l stmts') placeHolderType, fvs ) }+        ; return ( HsDo x do_or_lc (L l stmts'), fvs ) } -rnExpr (ExplicitList _ _  exps)+rnExpr (ExplicitList x _  exps)   = do  { opt_OverloadedLists <- xoptM LangExt.OverloadedLists         ; (exps', fvs) <- rnExprs exps         ; if opt_OverloadedLists            then do {             ; (from_list_n_name, fvs') <- lookupSyntaxName fromListNName-            ; return (ExplicitList placeHolderType (Just from_list_n_name) exps'+            ; return (ExplicitList x (Just from_list_n_name) exps'                      , fvs `plusFV` fvs') }            else-            return  (ExplicitList placeHolderType Nothing exps', fvs) }--rnExpr (ExplicitPArr _ exps)-  = do { (exps', fvs) <- rnExprs exps-       ; return  (ExplicitPArr placeHolderType exps', fvs) }+            return  (ExplicitList x Nothing exps', fvs) } -rnExpr (ExplicitTuple tup_args boxity)+rnExpr (ExplicitTuple x tup_args boxity)   = do { checkTupleSection tup_args        ; checkTupSize (length tup_args)        ; (tup_args', fvs) <- mapAndUnzipM rnTupArg tup_args-       ; return (ExplicitTuple tup_args' boxity, plusFVs fvs) }+       ; return (ExplicitTuple x tup_args' boxity, plusFVs fvs) }   where-    rnTupArg (L l (Present e)) = do { (e',fvs) <- rnLExpr e-                                    ; return (L l (Present e'), fvs) }-    rnTupArg (L l (Missing _)) = return (L l (Missing placeHolderType)+    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)                                         , emptyFVs)+    rnTupArg (L _ (XTupArg {})) = panic "rnExpr.XTupArg" -rnExpr (ExplicitSum alt arity expr _)+rnExpr (ExplicitSum x alt arity expr)   = do { (expr', fvs) <- rnLExpr expr-       ; return (ExplicitSum alt arity expr' PlaceHolder, fvs) }+       ; return (ExplicitSum x alt arity expr', fvs) }  rnExpr (RecordCon { rcon_con_name = con_id                   , rcon_flds = rec_binds@(HsRecFields { rec_dotdot = dd }) })@@ -298,53 +294,49 @@        ; (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_con_name = con_lname, rcon_flds = rec_binds'-                           , rcon_con_expr = noPostTcExpr, rcon_con_like = PlaceHolder }+       ; return (RecordCon { rcon_ext = noExt+                           , rcon_con_name = con_lname, rcon_flds = rec_binds' }                 , fvs `plusFV` plusFVs fvss `addOneFV` con_name) }   where-    mk_hs_var l n = HsVar (L l n)+    mk_hs_var l n = HsVar noExt (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_expr = expr', rupd_flds = rbinds'-                            , rupd_cons    = PlaceHolder, rupd_in_tys = PlaceHolder-                            , rupd_out_tys = PlaceHolder, rupd_wrap   = PlaceHolder }+        ; return (RecordUpd { rupd_ext = noExt, rupd_expr = expr'+                            , rupd_flds = rbinds' }                  , fvExpr `plusFV` fvRbinds) } -rnExpr (ExprWithTySig expr pty)+rnExpr (ExprWithTySig pty expr)   = do  { (pty', fvTy)    <- rnHsSigWcType ExprWithTySigCtx pty         ; (expr', fvExpr) <- bindSigTyVarsFV (hsWcScopedTvs pty') $                              rnLExpr expr-        ; return (ExprWithTySig expr' pty', fvExpr `plusFV` fvTy) }+        ; return (ExprWithTySig pty' expr', fvExpr `plusFV` fvTy) } -rnExpr (HsIf _ p b1 b2)+rnExpr (HsIf x _ p b1 b2)   = do { (p', fvP) <- rnLExpr p        ; (b1', fvB1) <- rnLExpr b1        ; (b2', fvB2) <- rnLExpr b2        ; (mb_ite, fvITE) <- lookupIfThenElse-       ; return (HsIf mb_ite p' b1' b2', plusFVs [fvITE, fvP, fvB1, fvB2]) }+       ; return (HsIf x mb_ite p' b1' b2', plusFVs [fvITE, fvP, fvB1, fvB2]) } -rnExpr (HsMultiIf _ty alts)+rnExpr (HsMultiIf x alts)   = do { (alts', fvs) <- mapFvRn (rnGRHS IfAlt rnLExpr) alts        -- ; return (HsMultiIf ty alts', fvs) }-       ; return (HsMultiIf placeHolderType alts', fvs) }+       ; return (HsMultiIf x alts', fvs) } -rnExpr (ArithSeq _ _ seq)+rnExpr (ArithSeq x _ seq)   = do { opt_OverloadedLists <- xoptM LangExt.OverloadedLists        ; (new_seq, fvs) <- rnArithSeq seq        ; if opt_OverloadedLists            then do {             ; (from_list_name, fvs') <- lookupSyntaxName fromListName-            ; return (ArithSeq noPostTcExpr (Just from_list_name) new_seq, fvs `plusFV` fvs') }+            ; return (ArithSeq x (Just from_list_name) new_seq+                     , fvs `plusFV` fvs') }            else-            return (ArithSeq noPostTcExpr Nothing new_seq, fvs) }--rnExpr (PArrSeq _ seq)-  = do { (new_seq, fvs) <- rnArithSeq seq-       ; return (PArrSeq noPostTcExpr new_seq, fvs) }+            return (ArithSeq x Nothing new_seq, fvs) }  {- These three are pattern syntax appearing in expressions.@@ -352,7 +344,7 @@ We return a (bogus) EWildPat in each case. -} -rnExpr EWildPat        = return (hsHoleExpr, emptyFVs)   -- "_" is just a hole+rnExpr (EWildPat _)  = return (hsHoleExpr, emptyFVs)   -- "_" is just a hole rnExpr e@(EAsPat {})   = do { opt_TypeApplications <- xoptM LangExt.TypeApplications        ; let msg | opt_TypeApplications@@ -407,11 +399,11 @@ ************************************************************************ -} -rnExpr (HsProc pat body)+rnExpr (HsProc x pat body)   = newArrowScope $     rnPat ProcExpr pat $ \ pat' -> do       { (body',fvBody) <- rnCmdTop body-      ; return (HsProc pat' body', fvBody) }+      ; 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@@ -420,8 +412,8 @@ rnExpr other = pprPanic "rnExpr: unexpected expression" (ppr other)         -- HsWrap -hsHoleExpr :: HsExpr id-hsHoleExpr = HsUnboundVar (TrueExprHole (mkVarOcc "_"))+hsHoleExpr :: HsExpr (GhcPass id)+hsHoleExpr = HsUnboundVar noExt (TrueExprHole (mkVarOcc "_"))  arrowFail :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars) arrowFail e@@ -434,17 +426,17 @@ ---------------------- -- See Note [Parsing sections] in Parser.y rnSection :: HsExpr GhcPs -> RnM (HsExpr GhcRn, FreeVars)-rnSection section@(SectionR op expr)+rnSection section@(SectionR x op expr)   = do  { (op', fvs_op)     <- rnLExpr op         ; (expr', fvs_expr) <- rnLExpr expr         ; checkSectionPrec InfixR section op' expr'-        ; return (SectionR op' expr', fvs_op `plusFV` fvs_expr) }+        ; return (SectionR x op' expr', fvs_op `plusFV` fvs_expr) } -rnSection section@(SectionL expr op)+rnSection section@(SectionL x expr op)   = do  { (expr', fvs_expr) <- rnLExpr expr         ; (op', fvs_op)     <- rnLExpr op         ; checkSectionPrec InfixL section op' expr'-        ; return (SectionL expr' op', fvs_op `plusFV` fvs_expr) }+        ; return (SectionL x expr' op', fvs_op `plusFV` fvs_expr) }  rnSection other = pprPanic "rnSection" (ppr other) @@ -466,26 +458,26 @@ rnCmdTop :: LHsCmdTop GhcPs -> RnM (LHsCmdTop GhcRn, FreeVars) rnCmdTop = wrapLocFstM rnCmdTop'  where-  rnCmdTop' (HsCmdTop cmd _ _ _)+  rnCmdTop' (HsCmdTop _ cmd)    = do { (cmd', fvCmd) <- rnLCmd cmd         ; let cmd_names = [arrAName, composeAName, firstAName] ++                           nameSetElemsStable (methodNamesCmd (unLoc cmd'))         -- Generate the rebindable syntax for the monad         ; (cmd_names', cmd_fvs) <- lookupSyntaxNames cmd_names -        ; return (HsCmdTop cmd' placeHolderType placeHolderType-                  (cmd_names `zip` cmd_names'),+        ; return (HsCmdTop (cmd_names `zip` cmd_names') cmd',                   fvCmd `plusFV` cmd_fvs) }+  rnCmdTop' (XCmdTop{}) = panic "rnCmdTop"  rnLCmd :: LHsCmd GhcPs -> RnM (LHsCmd GhcRn, FreeVars) rnLCmd = wrapLocFstM rnCmd  rnCmd :: HsCmd GhcPs -> RnM (HsCmd GhcRn, FreeVars) -rnCmd (HsCmdArrApp arrow arg _ ho rtl)+rnCmd (HsCmdArrApp x arrow arg ho rtl)   = do { (arrow',fvArrow) <- select_arrow_scope (rnLExpr arrow)        ; (arg',fvArg) <- rnLExpr arg-       ; return (HsCmdArrApp arrow' arg' placeHolderType ho rtl,+       ; return (HsCmdArrApp x arrow' arg' ho rtl,                  fvArrow `plusFV` fvArg) }   where     select_arrow_scope tc = case ho of@@ -498,9 +490,9 @@         -- inside 'arrow'.  In the higher-order case (-<<), they are.  -- infix form-rnCmd (HsCmdArrForm op _ (Just _) [arg1, arg2])+rnCmd (HsCmdArrForm _ op _ (Just _) [arg1, arg2])   = do { (op',fv_op) <- escapeArrowScope (rnLExpr op)-       ; let L _ (HsVar (L _ op_name)) = op'+       ; let L _ (HsVar _ (L _ op_name)) = op'        ; (arg1',fv_arg1) <- rnCmdTop arg1        ; (arg2',fv_arg2) <- rnCmdTop arg2         -- Deal with fixity@@ -508,47 +500,48 @@        ; final_e <- mkOpFormRn arg1' op' fixity arg2'        ; return (final_e, fv_arg1 `plusFV` fv_op `plusFV` fv_arg2) } -rnCmd (HsCmdArrForm op f fixity cmds)+rnCmd (HsCmdArrForm x op f fixity cmds)   = do { (op',fvOp) <- escapeArrowScope (rnLExpr op)        ; (cmds',fvCmds) <- rnCmdArgs cmds-       ; return (HsCmdArrForm op' f fixity cmds', fvOp `plusFV` fvCmds) }+       ; return (HsCmdArrForm x op' f fixity cmds', fvOp `plusFV` fvCmds) } -rnCmd (HsCmdApp fun arg)+rnCmd (HsCmdApp x fun arg)   = do { (fun',fvFun) <- rnLCmd  fun        ; (arg',fvArg) <- rnLExpr arg-       ; return (HsCmdApp fun' arg', fvFun `plusFV` fvArg) }+       ; return (HsCmdApp x fun' arg', fvFun `plusFV` fvArg) } -rnCmd (HsCmdLam matches)+rnCmd (HsCmdLam x matches)   = do { (matches', fvMatch) <- rnMatchGroup LambdaExpr rnLCmd matches-       ; return (HsCmdLam matches', fvMatch) }+       ; return (HsCmdLam x matches', fvMatch) } -rnCmd (HsCmdPar e)+rnCmd (HsCmdPar x e)   = do  { (e', fvs_e) <- rnLCmd e-        ; return (HsCmdPar e', fvs_e) }+        ; return (HsCmdPar x e', fvs_e) } -rnCmd (HsCmdCase expr matches)+rnCmd (HsCmdCase x expr matches)   = do { (new_expr, e_fvs) <- rnLExpr expr        ; (new_matches, ms_fvs) <- rnMatchGroup CaseAlt rnLCmd matches-       ; return (HsCmdCase new_expr new_matches, e_fvs `plusFV` ms_fvs) }+       ; return (HsCmdCase x new_expr new_matches, e_fvs `plusFV` ms_fvs) } -rnCmd (HsCmdIf _ p b1 b2)+rnCmd (HsCmdIf x _ p b1 b2)   = do { (p', fvP) <- rnLExpr p        ; (b1', fvB1) <- rnLCmd b1        ; (b2', fvB2) <- rnLCmd b2        ; (mb_ite, fvITE) <- lookupIfThenElse-       ; return (HsCmdIf mb_ite p' b1' b2', plusFVs [fvITE, fvP, fvB1, fvB2]) }+       ; return (HsCmdIf x mb_ite p' b1' b2', plusFVs [fvITE, fvP, fvB1, fvB2])} -rnCmd (HsCmdLet (L l binds) cmd)+rnCmd (HsCmdLet x (L l binds) cmd)   = rnLocalBindsAndThen binds $ \ binds' _ -> do       { (cmd',fvExpr) <- rnLCmd cmd-      ; return (HsCmdLet (L l binds') cmd', fvExpr) }+      ; return (HsCmdLet x (L l binds') cmd', fvExpr) } -rnCmd (HsCmdDo (L l stmts) _)+rnCmd (HsCmdDo x (L l stmts))   = do  { ((stmts', _), fvs) <-             rnStmts ArrowExpr rnLCmd stmts (\ _ -> return ((), emptyFVs))-        ; return ( HsCmdDo (L l stmts') placeHolderType, fvs ) }+        ; return ( HsCmdDo x (L l stmts'), fvs ) }  rnCmd cmd@(HsCmdWrap {}) = pprPanic "rnCmd" (ppr cmd)+rnCmd cmd@(XCmd {})      = pprPanic "rnCmd" (ppr cmd)  --------------------------------------------------- type CmdNeeds = FreeVars        -- Only inhabitants are@@ -560,26 +553,28 @@  methodNamesCmd :: HsCmd GhcRn -> CmdNeeds -methodNamesCmd (HsCmdArrApp _arrow _arg _ HsFirstOrderApp _rtl)+methodNamesCmd (HsCmdArrApp _ _arrow _arg HsFirstOrderApp _rtl)   = emptyFVs-methodNamesCmd (HsCmdArrApp _arrow _arg _ HsHigherOrderApp _rtl)+methodNamesCmd (HsCmdArrApp _ _arrow _arg HsHigherOrderApp _rtl)   = unitFV appAName methodNamesCmd (HsCmdArrForm {}) = emptyFVs-methodNamesCmd (HsCmdWrap _ cmd) = methodNamesCmd cmd+methodNamesCmd (HsCmdWrap _ _ cmd) = methodNamesCmd cmd -methodNamesCmd (HsCmdPar c) = methodNamesLCmd c+methodNamesCmd (HsCmdPar _ c) = methodNamesLCmd c -methodNamesCmd (HsCmdIf _ _ c1 c2)+methodNamesCmd (HsCmdIf _ _ _ c1 c2)   = methodNamesLCmd c1 `plusFV` methodNamesLCmd c2 `addOneFV` choiceAName -methodNamesCmd (HsCmdLet _ c)          = methodNamesLCmd c-methodNamesCmd (HsCmdDo (L _ stmts) _) = methodNamesStmts stmts-methodNamesCmd (HsCmdApp c _)          = methodNamesLCmd c-methodNamesCmd (HsCmdLam match)        = methodNamesMatch match+methodNamesCmd (HsCmdLet _ _ c)          = methodNamesLCmd c+methodNamesCmd (HsCmdDo _ (L _ stmts))   = methodNamesStmts stmts+methodNamesCmd (HsCmdApp _ c _)          = methodNamesLCmd c+methodNamesCmd (HsCmdLam _ match)        = methodNamesMatch match -methodNamesCmd (HsCmdCase _ matches)+methodNamesCmd (HsCmdCase _ _ matches)   = methodNamesMatch matches `addOneFV` choiceAName +methodNamesCmd (XCmd {}) = panic "methodNamesCmd"+ --methodNamesCmd _ = emptyFVs    -- Other forms can't occur in commands, but it's not convenient    -- to error here so we just do what's convenient.@@ -591,16 +586,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"  ------------------------------------------------- -- gaw 2004 methodNamesGRHSs :: GRHSs GhcRn (LHsCmd GhcRn) -> FreeVars-methodNamesGRHSs (GRHSs grhss _) = plusFVs (map methodNamesGRHS grhss)+methodNamesGRHSs (GRHSs _ grhss _) = plusFVs (map methodNamesGRHS grhss)+methodNamesGRHSs (XGRHSs _) = panic "methodNamesGRHSs"  -------------------------------------------------  methodNamesGRHS :: Located (GRHS GhcRn (LHsCmd GhcRn)) -> CmdNeeds-methodNamesGRHS (L _ (GRHS _ rhs)) = methodNamesLCmd rhs+methodNamesGRHS (L _ (GRHS _ _ rhs)) = methodNamesLCmd rhs+methodNamesGRHS (L _ (XGRHS _)) = panic "methodNamesGRHS"  --------------------------------------------------- methodNamesStmts :: [Located (StmtLR GhcRn GhcRn (LHsCmd GhcRn))] -> FreeVars@@ -611,17 +610,18 @@ methodNamesLStmt = methodNamesStmt . unLoc  methodNamesStmt :: StmtLR GhcRn GhcRn (LHsCmd GhcRn) -> FreeVars-methodNamesStmt (LastStmt cmd _ _)               = methodNamesLCmd cmd-methodNamesStmt (BodyStmt cmd _ _ _)             = methodNamesLCmd cmd-methodNamesStmt (BindStmt _ cmd _ _ _)           = methodNamesLCmd cmd+methodNamesStmt (LastStmt _ cmd _ _)           = methodNamesLCmd cmd+methodNamesStmt (BodyStmt _ cmd _ _)           = methodNamesLCmd cmd+methodNamesStmt (BindStmt _ _ cmd _ _)         = methodNamesLCmd cmd methodNamesStmt (RecStmt { recS_stmts = stmts }) =   methodNamesStmts stmts `addOneFV` loopAName-methodNamesStmt (LetStmt {})                     = emptyFVs-methodNamesStmt (ParStmt {})                     = emptyFVs-methodNamesStmt (TransStmt {})                   = emptyFVs-methodNamesStmt ApplicativeStmt{}            = emptyFVs+methodNamesStmt (LetStmt {})                   = emptyFVs+methodNamesStmt (ParStmt {})                   = emptyFVs+methodNamesStmt (TransStmt {})                 = emptyFVs+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"  {- ************************************************************************@@ -820,28 +820,27 @@ -- Variables bound by the Stmt, and mentioned in thing_inside, -- do not appear in the result FreeVars -rnStmt ctxt rnBody (L loc (LastStmt body noret _)) thing_inside+rnStmt ctxt rnBody (L loc (LastStmt _ body noret _)) thing_inside   = do  { (body', fv_expr) <- rnBody body         ; (ret_op, fvs1)   <- lookupStmtName ctxt returnMName         ; (thing,  fvs3)   <- thing_inside []-        ; return (([(L loc (LastStmt body' noret ret_op), fv_expr)], thing),-                  fv_expr `plusFV` fvs1 `plusFV` fvs3) }+        ; return (([(L loc (LastStmt noExt body' noret ret_op), fv_expr)]+                  , thing), fv_expr `plusFV` fvs1 `plusFV` fvs3) } -rnStmt ctxt rnBody (L loc (BodyStmt body _ _ _)) thing_inside+rnStmt ctxt rnBody (L loc (BodyStmt _ body _ _)) thing_inside   = do  { (body', fv_expr) <- rnBody body         ; (then_op, fvs1)  <- lookupStmtName ctxt thenMName         ; (guard_op, fvs2) <- if isListCompExpr ctxt                               then lookupStmtName ctxt guardMName                               else return (noSyntaxExpr, emptyFVs)-                              -- Only list/parr/monad comprehensions use 'guard'+                              -- Only list/monad comprehensions use 'guard'                               -- Also for sub-stmts of same eg [ e | x<-xs, gd | blah ]                               -- Here "gd" is a guard         ; (thing, fvs3)    <- thing_inside []-        ; return (([(L loc (BodyStmt body'-                     then_op guard_op placeHolderType), fv_expr)], thing),-                  fv_expr `plusFV` fvs1 `plusFV` fvs2 `plusFV` fvs3) }+        ; return ( ([(L loc (BodyStmt noExt 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+rnStmt ctxt rnBody (L loc (BindStmt _ pat body _ _)) thing_inside   = do  { (body', fv_expr) <- rnBody body                 -- The binders do not scope over the expression         ; (bind_op, fvs1) <- lookupStmtName ctxt bindMName@@ -863,17 +862,18 @@          ; rnPat (StmtCtxt ctxt) pat $ \ pat' -> do         { (thing, fvs3) <- thing_inside (collectPatBinders pat')-        ; return (( [( L loc (BindStmt pat' body' bind_op fail_op PlaceHolder)+        ; return (( [( L loc (BindStmt noExt pat' body' bind_op fail_op)                      , fv_expr )]                   , thing),                   fv_expr `plusFV` fvs1 `plusFV` fvs2 `plusFV` fvs3) }}        -- fv_expr shouldn't really be filtered by the rnPatsAndThen         -- but it does not matter because the names are unique -rnStmt _ _ (L loc (LetStmt (L l binds))) thing_inside+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 (L l binds')), bind_fvs)], thing), fvs) }  }+        ; return ( ([(L loc (LetStmt noExt (L l binds')), bind_fvs)], thing)+                 , fvs) }  }  rnStmt ctxt rnBody (L loc (RecStmt { recS_stmts = rec_stmts })) thing_inside   = do  { (return_op, fvs1)  <- lookupStmtName ctxt returnMName@@ -905,12 +905,12 @@         ; return ( ((zip rec_stmts' (repeat emptyNameSet)), thing)                  , fvs `plusFV` fvs1 `plusFV` fvs2 `plusFV` fvs3) } } -rnStmt ctxt _ (L loc (ParStmt segs _ _ _)) thing_inside+rnStmt ctxt _ (L loc (ParStmt _ segs _ _)) thing_inside   = do  { (mzip_op, fvs1)   <- lookupStmtNamePoly ctxt mzipName         ; (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 segs' mzip_op bind_op placeHolderType), fvs4)], thing)+        ; return (([(L loc (ParStmt noExt 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@@ -943,15 +943,18 @@              -- See Note [TransStmt binder map] in HsExpr         ; traceRn "rnStmt: implicitly rebound these used binders:" (ppr bndr_map)-       ; return (([(L loc (TransStmt { trS_stmts = stmts', trS_bndrs = bndr_map+       ; return (([(L loc (TransStmt { trS_ext = noExt+                                    , trS_stmts = stmts', trS_bndrs = bndr_map                                     , trS_by = by', trS_using = using', trS_form = form                                     , trS_ret = return_op, trS_bind = bind_op-                                    , trS_bind_arg_ty = PlaceHolder                                     , trS_fmap = fmap_op }), fvs2)], thing), all_fvs) }  rnStmt _ _ (L _ ApplicativeStmt{}) _ =   panic "rnStmt: ApplicativeStmt" +rnStmt _ _ (L _ XStmtLR{}) _ =+  panic "rnStmt: XStmtLR"+ rnParallelStmts :: forall thing. HsStmtContext Name                 -> SyntaxExpr GhcRn                 -> [ParStmtBlock GhcPs GhcPs]@@ -971,7 +974,7 @@            ; (thing, fvs) <- bindLocalNames bndrs' (thing_inside bndrs')            ; return (([], thing), fvs) } -    rn_segs env bndrs_so_far (ParStmtBlock stmts _ _ : segs)+    rn_segs env bndrs_so_far (ParStmtBlock x stmts _ _ : segs)       = do { ((stmts', (used_bndrs, segs', thing)), fvs)                     <- rnStmts ctxt rnLExpr stmts $ \ bndrs ->                        setLocalRdrEnv env       $ do@@ -979,8 +982,9 @@                        ; let used_bndrs = filter (`elemNameSet` fvs) bndrs                        ; return ((used_bndrs, segs', thing), fvs) } -           ; let seg' = ParStmtBlock stmts' used_bndrs return_op+           ; let seg' = ParStmtBlock x stmts' used_bndrs return_op            ; return ((seg':segs', thing), fvs) }+    rn_segs _ _ (XParStmtBlock{}:_) = panic "rnParallelStmts"      cmpByOcc n1 n2 = nameOccName n1 `compare` nameOccName n2     dupErr vs = addErr (text "Duplicate binding in parallel list comprehension for:"@@ -1000,20 +1004,19 @@   = do { rebindable_on <- xoptM LangExt.RebindableSyntax        ; if rebindable_on          then do { fm <- lookupOccRn (nameRdrName name)-                 ; return (HsVar (noLoc fm), unitFV fm) }+                 ; return (HsVar noExt (noLoc fm), unitFV fm) }          else not_rebindable }   | otherwise   = not_rebindable   where-    not_rebindable = return (HsVar (noLoc name), emptyFVs)+    not_rebindable = return (HsVar noExt (noLoc name), emptyFVs)  -- | Is this a context where we respect RebindableSyntax?--- but ListComp/PArrComp are never rebindable+-- but ListComp are never rebindable -- Neither is ArrowExpr, which has its own desugarer in DsArrows rebindableContext :: HsStmtContext Name -> Bool rebindableContext ctxt = case ctxt of   ListComp        -> False-  PArrComp        -> False   ArrowExpr       -> False   PatGuard {}     -> False @@ -1095,10 +1098,10 @@ collectRecStmtsFixities :: [LStmtLR GhcPs GhcPs body] -> [LFixitySig GhcPs] collectRecStmtsFixities l =     foldr (\ s -> \acc -> case s of-            (L _ (LetStmt (L _ (HsValBinds (ValBindsIn _ sigs))))) ->-                foldr (\ sig -> \ acc -> case sig of-                                           (L loc (FixSig s)) -> (L loc s) : acc-                                           _ -> acc) acc sigs+            (L _ (LetStmt _ (L _ (HsValBinds _ (ValBinds _ _ sigs))))) ->+              foldr (\ sig -> \ acc -> case sig of+                                         (L loc (FixSig _ s)) -> (L loc s) : acc+                                         _ -> acc) acc sigs             _ -> acc) [] l  -- left-hand sides@@ -1110,25 +1113,24 @@                    -- so we don't bother to compute it accurately in the other cases                 -> RnM [(LStmtLR GhcRn GhcPs body, FreeVars)] -rn_rec_stmt_lhs _ (L loc (BodyStmt body a b c))-  = return [(L loc (BodyStmt body a b c), emptyFVs)]+rn_rec_stmt_lhs _ (L loc (BodyStmt _ body a b))+  = return [(L loc (BodyStmt noExt body a b), emptyFVs)] -rn_rec_stmt_lhs _ (L loc (LastStmt body noret a))-  = return [(L loc (LastStmt body noret a), emptyFVs)]+rn_rec_stmt_lhs _ (L loc (LastStmt _ body noret a))+  = return [(L loc (LastStmt noExt body noret a), emptyFVs)] -rn_rec_stmt_lhs fix_env (L loc (BindStmt pat body a b t))+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 pat' body a b t),-               fv_pat)]+      return [(L loc (BindStmt noExt pat' body a b), fv_pat)] -rn_rec_stmt_lhs _ (L _ (LetStmt (L _ binds@(HsIPBinds _))))+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 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 (L l (HsValBinds binds'))),+         return [(L loc (LetStmt noExt (L l (HsValBinds x binds'))),                  -- Warning: this is bogus; see function invariant                  emptyFVs                  )]@@ -1146,8 +1148,12 @@ rn_rec_stmt_lhs _ stmt@(L _ (ApplicativeStmt {})) -- Shouldn't appear yet   = pprPanic "rn_rec_stmt" (ppr stmt) -rn_rec_stmt_lhs _ (L _ (LetStmt (L _ EmptyLocalBinds)))+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_stmts_lhs :: Outputable body => MiniFixityEnv                  -> [LStmt GhcPs body]@@ -1172,19 +1178,19 @@         -- Rename a Stmt that is inside a RecStmt (or mdo)         -- Assumes all binders are already in scope         -- Turns each stmt into a singleton Stmt-rn_rec_stmt rnBody _ (L loc (LastStmt body noret _), _)+rn_rec_stmt rnBody _ (L loc (LastStmt _ body noret _), _)   = do  { (body', fv_expr) <- rnBody body         ; (ret_op, fvs1)   <- lookupSyntaxName returnMName         ; return [(emptyNameSet, fv_expr `plusFV` fvs1, emptyNameSet,-                   L loc (LastStmt body' noret ret_op))] }+                   L loc (LastStmt noExt body' noret ret_op))] } -rn_rec_stmt rnBody _ (L loc (BodyStmt body _ _ _), _)+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 body' then_op noSyntaxExpr placeHolderType))] }+                 L loc (BodyStmt noExt body' then_op noSyntaxExpr))] } -rn_rec_stmt rnBody _ (L loc (BindStmt pat' body _ _ _), fv_pat)+rn_rec_stmt rnBody _ (L loc (BindStmt _ pat' body _ _), fv_pat)   = do { (body', fv_expr) <- rnBody body        ; (bind_op, fvs1) <- lookupSyntaxName bindMName @@ -1196,17 +1202,17 @@        ; let bndrs = mkNameSet (collectPatBinders pat')              fvs   = fv_expr `plusFV` fv_pat `plusFV` fvs1 `plusFV` fvs2        ; return [(bndrs, fvs, bndrs `intersectNameSet` fvs,-                  L loc (BindStmt pat' body' bind_op fail_op PlaceHolder))] }+                  L loc (BindStmt noExt pat' body' bind_op fail_op))] } -rn_rec_stmt _ _ (L _ (LetStmt (L _ binds@(HsIPBinds _))), _)+rn_rec_stmt _ _ (L _ (LetStmt _ (L _ binds@(HsIPBinds {}))), _)   = failWith (badIpBinds (text "an mdo expression") binds) -rn_rec_stmt _ all_bndrs (L loc (LetStmt (L l (HsValBinds binds'))), _)+rn_rec_stmt _ all_bndrs (L loc (LetStmt _ (L l (HsValBinds x binds'))), _)   = do { (binds', du_binds) <- rnLocalValBindsRHS (mkNameSet all_bndrs) binds'            -- fixities and unused are handled above in rnRecStmtsAndThen        ; let fvs = allUses du_binds        ; return [(duDefs du_binds, fvs, emptyNameSet,-                 L loc (LetStmt (L l (HsValBinds binds'))))] }+                 L loc (LetStmt noExt (L l (HsValBinds x binds'))))] }  -- no RecStmt case because they get flattened above when doing the LHSes rn_rec_stmt _ _ stmt@(L _ (RecStmt {}), _)@@ -1218,12 +1224,18 @@ rn_rec_stmt _ _ stmt@(L _ (TransStmt {}), _)     -- Syntactically illegal in mdo   = pprPanic "rn_rec_stmt: TransStmt" (ppr stmt) -rn_rec_stmt _ _ (L _ (LetStmt (L _ EmptyLocalBinds)), _)+rn_rec_stmt _ _ (L _ (LetStmt _ (L _ (XHsLocalBindsLR _))), _)+  = panic "rn_rec_stmt: LetStmt XHsLocalBindsLR"++rn_rec_stmt _ _ (L _ (LetStmt _ (L _ (EmptyLocalBinds _))), _)   = panic "rn_rec_stmt: LetStmt EmptyLocalBinds"  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_stmts :: Outputable (body GhcPs) =>                 (Located (body GhcPs) -> RnM (Located (body GhcRn), FreeVars))              -> [Name]@@ -1655,16 +1667,16 @@ -- 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 _ _), _))                 tail _tail_fvs   | not (isStrictPattern pat), (False,tail') <- needJoin monad_names tail   -- See Note [ApplicativeDo and strict patterns]-  = mkApplicativeStmt ctxt [ApplicativeArgOne pat rhs False] False tail'-stmtTreeToStmts monad_names ctxt (StmtTreeOne (L _ (BodyStmt rhs _ _ _),_))+  = mkApplicativeStmt ctxt [ApplicativeArgOne noExt pat rhs False] False tail'+stmtTreeToStmts monad_names ctxt (StmtTreeOne (L _ (BodyStmt _ rhs _ _),_))                 tail _tail_fvs   | (False,tail') <- needJoin monad_names tail   = mkApplicativeStmt ctxt-      [ApplicativeArgOne nlWildPatName rhs True] False tail'+      [ApplicativeArgOne noExt nlWildPatName rhs True] False tail'  stmtTreeToStmts _monad_names _ctxt (StmtTreeOne (s,_)) tail _tail_fvs =   return (s : tail, emptyNameSet)@@ -1682,10 +1694,10 @@    (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 pat exp False, emptyFVs)-   stmtTreeArg _ctxt _tail_fvs (StmtTreeOne (L _ (BodyStmt exp _ _ _), _)) =-     return (ApplicativeArgOne nlWildPatName exp True, emptyFVs)+   stmtTreeArg _ctxt _tail_fvs (StmtTreeOne (L _ (BindStmt _ pat exp _ _), _))+     = return (ApplicativeArgOne noExt pat exp False, emptyFVs)+   stmtTreeArg _ctxt _tail_fvs (StmtTreeOne (L _ (BodyStmt _ exp _ _), _)) =+     return (ApplicativeArgOne noExt nlWildPatName exp True, emptyFVs)    stmtTreeArg ctxt tail_fvs tree = do      let stmts = flattenStmtTree tree          pvarset = mkNameSet (concatMap (collectStmtBinders.unLoc.fst) stmts)@@ -1700,8 +1712,8 @@              return (unLoc tup, emptyNameSet)            | otherwise -> do              (ret,fvs) <- lookupStmtNamePoly ctxt returnMName-             return (HsApp (noLoc ret) tup, fvs)-     return ( ApplicativeArgMany stmts' mb_ret pat+             return (HsApp noExt (noLoc ret) tup, fvs)+     return ( ApplicativeArgMany noExt stmts' mb_ret pat             , fvs1 `plusFV` fvs2)  @@ -1755,7 +1767,7 @@             pvars = mkNameSet (collectStmtBinders (unLoc stmt))      isStrictPatternBind :: ExprLStmt GhcRn -> Bool-    isStrictPatternBind (L _ (BindStmt pat _ _ _ _)) = isStrictPattern pat+    isStrictPatternBind (L _ (BindStmt _ pat _ _ _)) = isStrictPattern pat     isStrictPatternBind _ = False  {-@@ -1786,25 +1798,23 @@ isStrictPattern :: LPat id -> Bool isStrictPattern (L _ pat) =   case pat of-    WildPat{} -> False-    VarPat{}  -> False-    LazyPat{} -> False-    AsPat _ p -> isStrictPattern p-    ParPat p  -> isStrictPattern p-    ViewPat _ p _ -> isStrictPattern p-    SigPatIn p _ -> isStrictPattern p-    SigPatOut p _ -> isStrictPattern p-    BangPat{} -> True-    ListPat{} -> True-    TuplePat{} -> True-    SumPat{} -> True-    PArrPat{} -> True-    ConPatIn{} -> True-    ConPatOut{} -> True-    LitPat{} -> True-    NPat{} -> True-    NPlusKPat{} -> True-    SplicePat{} -> True+    WildPat{}       -> False+    VarPat{}        -> False+    LazyPat{}       -> False+    AsPat _ _ p     -> isStrictPattern p+    ParPat _ p      -> isStrictPattern p+    ViewPat _ _ p   -> isStrictPattern p+    SigPat _ p      -> isStrictPattern p+    BangPat{}       -> True+    ListPat{}       -> True+    TuplePat{}      -> True+    SumPat{}        -> True+    ConPatIn{}      -> True+    ConPatOut{}     -> True+    LitPat{}        -> True+    NPat{}          -> True+    NPlusKPat{}     -> True+    SplicePat{}     -> True     _otherwise -> panic "isStrictPattern"  isLetStmt :: LStmt a b -> Bool@@ -1844,9 +1854,9 @@   -- strict patterns though; splitSegments expects that if we return Just   -- then we have actually done some splitting. Otherwise it will go into   -- an infinite loop (#14163).-  go lets indep bndrs ((L loc (BindStmt pat body bind_op fail_op ty), fvs) : rest)+  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 pat body bind_op fail_op ty), fvs) : indep)+    = go lets ((L loc (BindStmt noExt 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@@ -1854,9 +1864,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 binds), fvs) : rest)+  go lets indep bndrs ((L loc (LetStmt noExt binds), fvs) : rest)     | isEmptyNameSet (bndrs `intersectNameSet` fvs)-    = go ((L loc (LetStmt binds), fvs) : lets) indep bndrs rest+    = go ((L loc (LetStmt noExt binds), fvs) : lets) indep bndrs rest   go _ []  _ _ = Nothing   go _ [_] _ _ = Nothing   go lets indep _ stmts = Just (reverse lets, reverse indep, stmts)@@ -1876,7 +1886,7 @@ -- typechecker and the desugarer (I tried it that way first!). mkApplicativeStmt   :: HsStmtContext Name-  -> [ApplicativeArg GhcRn GhcRn]         -- ^ The args+  -> [ApplicativeArg GhcRn]             -- ^ The args   -> Bool                               -- ^ True <=> need a join   -> [ExprLStmt GhcRn]        -- ^ The body statements   -> RnM ([ExprLStmt GhcRn], FreeVars)@@ -1889,10 +1899,9 @@                 ; return (Just join_op, fvs) }            else              return (Nothing, emptyNameSet)-       ; let applicative_stmt = noLoc $ ApplicativeStmt+       ; let applicative_stmt = noLoc $ ApplicativeStmt noExt                (zip (fmap_op : repeat ap_op) args)                mb_join-               placeHolderType        ; return ( applicative_stmt : body_stmts                 , fvs1 `plusFV` fvs2 `plusFV` fvs3) } @@ -1902,9 +1911,9 @@          -> [ExprLStmt GhcRn]          -> (Bool, [ExprLStmt GhcRn]) needJoin _monad_names [] = (False, [])  -- we're in an ApplicativeArg-needJoin monad_names  [L loc (LastStmt e _ t)]+needJoin monad_names  [L loc (LastStmt _ e _ t)]  | Just arg <- isReturnApp monad_names e =-       (False, [L loc (LastStmt arg True t)])+       (False, [L loc (LastStmt noExt arg True t)]) needJoin _monad_names stmts = (True, stmts)  -- | @Just e@, if the expression is @return e@ or @return $ e@,@@ -1912,15 +1921,15 @@ isReturnApp :: MonadNames             -> LHsExpr GhcRn             -> Maybe (LHsExpr GhcRn)-isReturnApp monad_names (L _ (HsPar expr)) = isReturnApp monad_names expr+isReturnApp monad_names (L _ (HsPar _ expr)) = isReturnApp monad_names expr isReturnApp monad_names (L _ e) = case e of-  OpApp l op _ r | is_return l, is_dollar op -> Just r-  HsApp f arg    | is_return f               -> Just arg+  OpApp _ l op r | is_return l, is_dollar op -> Just r+  HsApp _ f arg  | is_return f               -> Just arg   _otherwise -> Nothing  where-  is_var f (L _ (HsPar e)) = is_var f e-  is_var f (L _ (HsAppType e _)) = is_var f e-  is_var f (L _ (HsVar (L _ r))) = f r+  is_var f (L _ (HsPar _ e)) = is_var f e+  is_var f (L _ (HsAppType _ e)) = is_var f e+  is_var f (L _ (HsVar _ (L _ r))) = f r        -- TODO: I don't know how to get this right for rebindable syntax   is_var _ _ = False @@ -1958,7 +1967,6 @@   = case ctxt of       ListComp  -> check_comp       MonadComp -> check_comp-      PArrComp  -> check_comp       ArrowExpr -> check_do       DoExpr    -> check_do       MDoExpr   -> check_do@@ -1966,7 +1974,7 @@   where     check_do    -- Expect BodyStmt, and change it to LastStmt       = case stmt of-          BodyStmt e _ _ _ -> return (L loc (mkLastStmt e))+          BodyStmt _ e _ _ -> return (L loc (mkLastStmt e))           LastStmt {}      -> return lstmt   -- "Deriving" clauses may generate a                                              -- LastStmt directly (unlike the parser)           _                -> do { addErr (hang last_error 2 (ppr stmt)); return lstmt }@@ -2003,12 +2011,13 @@ pprStmtCat (RecStmt {})       = text "rec" pprStmtCat (ParStmt {})       = text "parallel" pprStmtCat (ApplicativeStmt {}) = panic "pprStmtCat: ApplicativeStmt"+pprStmtCat (XStmtLR {})         = panic "pprStmtCat: XStmtLR"  ------------ emptyInvalid :: Validity  -- Payload is the empty document emptyInvalid = NotValid Outputable.empty -okStmt, okDoStmt, okCompStmt, okParStmt, okPArrStmt+okStmt, okDoStmt, okCompStmt, okParStmt    :: DynFlags -> HsStmtContext Name    -> Stmt GhcPs (Located (body GhcPs)) -> Validity -- Return Nothing if OK, (Just extra) if not ok@@ -2024,7 +2033,6 @@       GhciStmtCtxt       -> okDoStmt   dflags ctxt stmt       ListComp           -> okCompStmt dflags ctxt stmt       MonadComp          -> okCompStmt dflags ctxt stmt-      PArrComp           -> okPArrStmt dflags ctxt stmt       TransStmtCtxt ctxt -> okStmt dflags ctxt stmt  -------------@@ -2039,8 +2047,8 @@ ------------- okParStmt dflags ctxt stmt   = case stmt of-      LetStmt (L _ (HsIPBinds {})) -> emptyInvalid-      _                            -> okStmt dflags ctxt stmt+      LetStmt _ (L _ (HsIPBinds {})) -> emptyInvalid+      _                              -> okStmt dflags ctxt stmt  ---------------- okDoStmt dflags ctxt stmt@@ -2069,20 +2077,7 @@        RecStmt {}  -> emptyInvalid        LastStmt {} -> emptyInvalid  -- Should not happen (dealt with by checkLastStmt)        ApplicativeStmt {} -> emptyInvalid-------------------okPArrStmt dflags _ stmt-  = case stmt of-       BindStmt {} -> IsValid-       LetStmt {}  -> IsValid-       BodyStmt {} -> IsValid-       ParStmt {}-         | LangExt.ParallelListComp `xopt` dflags -> IsValid-         | otherwise -> NotValid (text "Use ParallelListComp")-       TransStmt {} -> emptyInvalid-       RecStmt {}   -> emptyInvalid-       LastStmt {}  -> emptyInvalid  -- Should not happen (dealt with by checkLastStmt)-       ApplicativeStmt {} -> emptyInvalid+       XStmtLR{} -> panic "okCompStmt"  --------- checkTupleSection :: [LHsTupArg GhcPs] -> RnM ()@@ -2102,7 +2097,7 @@ patSynErr e explanation = do { addErr (sep [text "Pattern syntax in expression context:",                                 nest 4 (ppr e)] $$                                   explanation)-                 ; return (EWildPat, emptyFVs) }+                 ; return (EWildPat noExt, emptyFVs) }  badIpBinds :: Outputable a => SDoc -> a -> SDoc badIpBinds what binds
rename/RnFixity.hs view
@@ -179,9 +179,9 @@ -- 'Name' if @DuplicateRecordFields@ is in use (Trac #1173). If there are -- multiple possible selectors with different fixities, generate an error. lookupFieldFixityRn :: AmbiguousFieldOcc GhcRn -> RnM Fixity-lookupFieldFixityRn (Unambiguous (L _ rdr) n)+lookupFieldFixityRn (Unambiguous n (L _ rdr))   = lookupFixityRn' n (rdrNameOcc rdr)-lookupFieldFixityRn (Ambiguous   (L _ rdr) _) = get_ambiguous_fixity rdr+lookupFieldFixityRn (Ambiguous _ (L _ rdr)) = get_ambiguous_fixity rdr   where     get_ambiguous_fixity :: RdrName -> RnM Fixity     get_ambiguous_fixity rdr_name = do@@ -209,3 +209,4 @@      format_ambig (elt, fix) = hang (ppr fix)                                  2 (pprNameProvenance elt)+lookupFieldFixityRn (XAmbiguousFieldOcc{}) = panic "lookupFieldFixityRn"
rename/RnHsDoc.hs view
@@ -21,5 +21,5 @@   return (L pos doc')  rnHsDoc :: HsDocString -> RnM HsDocString-rnHsDoc (HsDocString s) = return (HsDocString s)+rnHsDoc = pure 
rename/RnNames.hs view
@@ -20,7 +20,11 @@         mkChildEnv,         findChildren,         dodgyMsg,-        dodgyMsgInsert+        dodgyMsgInsert,+        findImportUsage,+        getMinimalImports,+        printMinimalImports,+        ImportDeclUsage     ) where  #include "HsVersions.h"@@ -134,7 +138,7 @@ checking. Say I have a module B compiled with -XSafe. B is dependent on a bunch of modules and packages, some packages it requires to be trusted as its using -XTrustworthy modules from them. Now if I have a module A that doesn't use safe-haskell at all and simply imports B, should A inherit all the the trust+haskell at all and simply imports B, should A inherit all the trust requirements from B? Should A now also require that a package p is trusted since B required it? @@ -177,17 +181,72 @@     return (decls, rdr_env, imp_avails, hpc_usage)    where+    -- See Note [Combining ImportAvails]     combine :: [(LImportDecl GhcRn,  GlobalRdrEnv, ImportAvails, AnyHpcUsage)]             -> ([LImportDecl GhcRn], GlobalRdrEnv, ImportAvails, AnyHpcUsage)-    combine = foldr plus ([], emptyGlobalRdrEnv, emptyImportAvails, False)+    combine ss =+      let (decls, rdr_env, imp_avails, hpc_usage, finsts) = foldr+            plus+            ([], emptyGlobalRdrEnv, emptyImportAvails, False, emptyModuleSet)+            ss+      in (decls, rdr_env, imp_avails { imp_finsts = moduleSetElts finsts },+            hpc_usage) -    plus (decl,  gbl_env1, imp_avails1,hpc_usage1)-         (decls, gbl_env2, imp_avails2,hpc_usage2)+    plus (decl,  gbl_env1, imp_avails1, hpc_usage1)+         (decls, gbl_env2, imp_avails2, hpc_usage2, finsts_set)       = ( decl:decls,           gbl_env1 `plusGlobalRdrEnv` gbl_env2,-          imp_avails1 `plusImportAvails` imp_avails2,-          hpc_usage1 || hpc_usage2 )+          imp_avails1' `plusImportAvails` imp_avails2,+          hpc_usage1 || hpc_usage2,+          extendModuleSetList finsts_set new_finsts )+      where+      imp_avails1' = imp_avails1 { imp_finsts = [] }+      new_finsts = imp_finsts imp_avails1 +{-+Note [Combining ImportAvails]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+imp_finsts in ImportAvails is a list of family instance modules+transitively depended on by an import. imp_finsts for a currently+compiled module is a union of all the imp_finsts of imports.+Computing the union of two lists of size N is O(N^2) and if we+do it to M imports we end up with O(M*N^2). That can get very+expensive for bigger module hierarchies.++Union can be optimized to O(N log N) if we use a Set.+imp_finsts is converted back and forth between dep_finsts, so+changing a type of imp_finsts means either paying for the conversions+or changing the type of dep_finsts as well.++I've measured that the conversions would cost 20% of allocations on my+test case, so that can be ruled out.++Changing the type of dep_finsts forces checkFamInsts to+get the module lists in non-deterministic order. If we wanted to restore+the deterministic order, we'd have to sort there, which is an additional+cost. As far as I can tell, using a non-deterministic order is fine there,+but that's a brittle nonlocal property which I'd like to avoid.++Additionally, dep_finsts is read from an interface file, so its "natural"+type is a list. Which makes it a natural type for imp_finsts.++Since rnImports.combine is really the only place that would benefit from+it being a Set, it makes sense to optimize the hot loop in rnImports.combine+without changing the representation.++So here's what we do: instead of naively merging ImportAvails with+plusImportAvails in a loop, we make plusImportAvails merge empty imp_finsts+and compute the union on the side using Sets. When we're done, we can+convert it back to a list. One nice side effect of this approach is that+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+23s before, and 11s after.+-}+++ -- | Given a located import declaration @decl@ from @this_mod@, -- calculate the following pieces of information: --@@ -206,7 +265,9 @@ rnImportDecl  :: Module -> LImportDecl GhcPs              -> RnM (LImportDecl GhcRn, GlobalRdrEnv, ImportAvails, AnyHpcUsage) rnImportDecl this_mod-             (L loc decl@(ImportDecl { ideclName = loc_imp_mod_name, ideclPkgQual = mb_pkg+             (L loc decl@(ImportDecl { ideclExt = noExt+                                     , ideclName = loc_imp_mod_name+                                     , ideclPkgQual = mb_pkg                                      , ideclSource = want_boot, ideclSafe = mod_safe                                      , ideclQualified = qual_only, ideclImplicit = implicit                                      , ideclAs = as_mod, ideclHiding = imp_details }))@@ -315,10 +376,11 @@           _           -> return ()      ) -    let new_imp_decl = L loc (decl { ideclSafe = mod_safe'+    let new_imp_decl = L loc (decl { ideclExt = noExt, ideclSafe = mod_safe'                                    , ideclHiding = new_imp_details })      return (new_imp_decl, gbl_env, imports, mi_hpc iface)+rnImportDecl _ (L _ (XImportDecl _)) = panic "rnImportDecl"  -- | Calculate the 'ImportAvails' induced by an import of a particular -- interface, but without 'imp_mods'.@@ -604,7 +666,7 @@         ; traceRn "getLocalNonValBinders 3" (vcat [ppr flds, ppr field_env])         ; return (envs, new_bndrs) } }   where-    ValBindsIn _val_binds val_sigs = binds+    ValBinds _ _val_binds val_sigs = binds      for_hs_bndrs :: [Located RdrName]     for_hs_bndrs = hsForeignDeclsBinders foreign_decls@@ -612,7 +674,7 @@     -- In a hs-boot file, the value binders come from the     --  *signatures*, and there should be no foreign binders     hs_boot_sig_bndrs = [ L decl_loc (unLoc n)-                        | L decl_loc (TypeSig ns _) <- val_sigs, n <- ns]+                        | L decl_loc (TypeSig _ ns _) <- val_sigs, n <- ns]        -- the SrcSpan attached to the input should be the span of the       -- declaration, not just the name@@ -639,24 +701,16 @@                -> [(Name, [FieldLabel])]     mk_fld_env d names flds = concatMap find_con_flds (dd_cons d)       where-        find_con_flds (L _ (ConDeclH98 { con_name    = L _ rdr-                                       , con_details = RecCon cdflds }))+        find_con_flds (L _ (ConDeclH98 { con_name = L _ rdr+                                       , con_args = RecCon cdflds }))             = [( find_con_name rdr                , concatMap find_con_decl_flds (unLoc cdflds) )]-        find_con_flds (L _ (ConDeclGADT-                              { con_names = rdrs-                              , con_type = (HsIB { hsib_body = res_ty})}))-            = map (\ (L _ rdr) -> ( find_con_name rdr-                                  , concatMap find_con_decl_flds cdflds))-                  rdrs-            where-              (_tvs, _cxt, tau) = splitLHsSigmaTy res_ty-              cdflds = case tau of-                 L _ (HsFunTy-                      (L _ (HsAppsTy-                        [L _ (HsAppPrefix (L _ (HsRecTy flds)))])) _) -> flds-                 L _ (HsFunTy (L _ (HsRecTy flds)) _) -> flds-                 _                                    -> []+        find_con_flds (L _ (ConDeclGADT { con_names = rdrs+                                        , con_args = RecCon flds }))+            = [ ( find_con_name rdr+                 , concatMap find_con_decl_flds (unLoc flds))+              | L _ rdr <- rdrs ]+         find_con_flds _ = []          find_con_name rdr@@ -664,20 +718,22 @@               find (\ n -> nameOccName n == rdrNameOcc rdr) names         find_con_decl_flds (L _ x)           = map find_con_decl_fld (cd_fld_names x)-        find_con_decl_fld  (L _ (FieldOcc (L _ rdr) _))++        find_con_decl_fld  (L _ (FieldOcc _ (L _ rdr)))           = 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"      new_assoc :: Bool -> LInstDecl GhcPs               -> RnM ([AvailInfo], [(Name, [FieldLabel])])     new_assoc _ (L _ (TyFamInstD {})) = return ([], [])       -- type instances don't bind new names -    new_assoc overload_ok (L _ (DataFamInstD d))+    new_assoc overload_ok (L _ (DataFamInstD _ d))       = do { (avail, flds) <- new_di overload_ok Nothing d            ; return ([avail], flds) }-    new_assoc overload_ok (L _ (ClsInstD (ClsInstDecl { cid_poly_ty = inst_ty+    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@@ -687,6 +743,8 @@       | 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"      new_di :: Bool -> Maybe Name -> DataFamInstDecl GhcPs                    -> RnM (AvailInfo, [(Name, [FieldLabel])])@@ -700,14 +758,17 @@                                   -- 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_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"  newRecordSelector :: Bool -> [Name] -> LFieldOcc GhcPs -> RnM FieldLabel newRecordSelector _ [] _ = error "newRecordSelector: datatype has no constructors!"-newRecordSelector overload_ok (dc:_) (L loc (FieldOcc (L _ fld) _))+newRecordSelector _ _ (L _ (XFieldOcc _)) = panic "newRecordSelector"+newRecordSelector overload_ok (dc:_) (L loc (FieldOcc _ (L _ fld)))   = do { selName <- newTopSrcBinder $ L loc $ field        ; return $ qualFieldLbl { flSelector = selName } }   where@@ -806,7 +867,7 @@                 -- NB the AvailInfo may have duplicates, and several items                 --    for the same parent; e.g N(x) and N(y) -            names  = availsToNameSet (map snd items2)+            names  = availsToNameSetWithSelectors (map snd items2)             keep n = not (n `elemNameSet` names)             pruned_avails = filterAvails keep all_avails             hiding_spec = ImpSpec { is_decl = decl_spec, is_item = ImpAll }@@ -822,8 +883,9 @@     imp_occ_env :: OccEnv (Name,    -- the name                            AvailInfo,   -- the export item providing the name                            Maybe Name)  -- the parent of associated types-    imp_occ_env = mkOccEnv_C combine [ (nameOccName n, (n, a, Nothing))-                                     | a <- all_avails, n <- availNames a]+    imp_occ_env = mkOccEnv_C combine [ (occ, (n, a, Nothing))+                                     | a <- all_avails+                                     , (n, occ) <- availNamesWithOccs a]       where         -- See Note [Dealing with imports]         -- 'combine' is only called for associated data types which appear@@ -885,12 +947,12 @@               -> IELookupM ([(IE GhcRn, AvailInfo)], [IELookupWarning])     lookup_ie ie = handle_bad_import $ do       case ie of-        IEVar (L l n) -> do+        IEVar _ (L l n) -> do             (name, avail, _) <- lookup_name $ ieWrappedName n-            return ([(IEVar (L l (replaceWrappedName n name)),+            return ([(IEVar noExt (L l (replaceWrappedName n name)),                                                   trimAvail avail name)], []) -        IEThingAll (L l tc) -> do+        IEThingAll _ (L l tc) -> do             (name, avail, mb_parent) <- lookup_name $ ieWrappedName tc             let warns = case avail of                           Avail {}                     -- e.g. f(..)@@ -906,7 +968,7 @@                             | otherwise                             -> [] -                renamed_ie = IEThingAll (L l (replaceWrappedName tc name))+                renamed_ie = IEThingAll noExt (L l (replaceWrappedName tc name))                 sub_avails = case avail of                                Avail {}              -> []                                AvailTC name2 subs fs -> [(renamed_ie, AvailTC name2 (subs \\ [name]) fs)]@@ -916,7 +978,7 @@               Just parent -> return ((renamed_ie, AvailTC parent [name] []) : sub_avails, warns)                              -- associated type -        IEThingAbs (L l tc')+        IEThingAbs _ (L l tc')             | want_hiding   -- hiding ( C )                        -- Here the 'C' can be a data constructor                        --  *or* a type/class, or even both@@ -932,11 +994,14 @@                   return ([mkIEThingAbs tc' l nameAvail]                          , []) -        IEThingWith (L l rdr_tc) wc rdr_ns' rdr_fs ->+        IEThingWith _ (L l rdr_tc) wc rdr_ns' rdr_fs ->           ASSERT2(null rdr_fs, ppr rdr_fs) do-           (name, AvailTC _ ns subflds, mb_parent)-                                         <- lookup_name (ieWrappedName rdr_tc)+           (name, avail, mb_parent) <- lookup_name (ieWrappedName rdr_tc) +           let (ns,subflds) = case avail of+                                AvailTC _ ns' subflds' -> (ns',subflds')+                                Avail _                -> panic "filterImports"+            -- Look up the children in the sub-names of the parent            let subnames = case ns of   -- The tc is first in ns,                             [] -> []   -- if it is there at all@@ -950,8 +1015,8 @@                case mb_parent of                  -- non-associated ty/cls                  Nothing-                   -> return ([(IEThingWith (L l name') wc childnames'-                                                           childflds,+                   -> return ([(IEThingWith noExt (L l name') wc childnames'+                                                                 childflds,                                AvailTC name (name:map unLoc childnames) (map unLoc childflds))],                               [])                    where name' = replaceWrappedName rdr_tc name@@ -959,10 +1024,10 @@                          -- childnames' = postrn_ies childnames                  -- associated ty                  Just parent-                   -> return ([(IEThingWith (L l name') wc childnames'+                   -> return ([(IEThingWith noExt (L l name') wc childnames'                                                            childflds,                                 AvailTC name (map unLoc childnames) (map unLoc childflds)),-                               (IEThingWith (L l name') wc childnames'+                               (IEThingWith noExt (L l name') wc childnames'                                                            childflds,                                 AvailTC parent [name] [])],                               [])@@ -975,9 +1040,10 @@        where         mkIEThingAbs tc l (n, av, Nothing    )-          = (IEThingAbs (L l (replaceWrappedName tc n)), trimAvail av n)+          = (IEThingAbs noExt (L l (replaceWrappedName tc n)), trimAvail av n)         mkIEThingAbs tc l (n, _,  Just parent)-          = (IEThingAbs (L l (replaceWrappedName tc n)), AvailTC parent [n] [])+          = (IEThingAbs noExt (L l (replaceWrappedName tc n))+             , AvailTC parent [n] [])          handle_bad_import m = catchIELookup m $ \err -> case err of           BadImport | want_hiding -> return ([], [BadImportW])@@ -1021,8 +1087,8 @@   = gresFromAvail prov_fn avail   where     is_explicit = case ie of-                    IEThingAll (L _ name) -> \n -> n == ieWrappedName name-                    _                     -> \_ -> True+                    IEThingAll _ (L _ name) -> \n -> n == ieWrappedName name+                    _                       -> \_ -> True     prov_fn name       = Just (ImpSpec { is_decl = decl_spec, is_item = item_spec })       where@@ -1184,7 +1250,7 @@              pat_syns = tcg_patsyns gbl_env           -- Warn about missing signatures-         -- Do this only when we we have a type to offer+         -- Do this only when we have a type to offer        ; warn_missing_sigs  <- woptM Opt_WarnMissingSignatures        ; warn_only_exported <- woptM Opt_WarnMissingExportedSignatures        ; warn_pat_syns      <- woptM Opt_WarnMissingPatternSynonymSignatures@@ -1278,13 +1344,13 @@               _other -> emptyNameSet -- No explicit import list => no unused-name list          add_unused :: IE GhcRn -> NameSet -> NameSet-        add_unused (IEVar (L _ n))      acc+        add_unused (IEVar _ (L _ n))      acc                                        = add_unused_name (ieWrappedName n) acc-        add_unused (IEThingAbs (L _ n)) acc+        add_unused (IEThingAbs _ (L _ n)) acc                                        = add_unused_name (ieWrappedName n) acc-        add_unused (IEThingAll (L _ n)) acc+        add_unused (IEThingAll _ (L _ n)) acc                                        = add_unused_all  (ieWrappedName n) acc-        add_unused (IEThingWith (L _ p) wc ns fs) acc =+        add_unused (IEThingWith _ (L _ p) wc ns fs) acc =           add_wc_all (add_unused_with (ieWrappedName p) xs acc)           where xs = map (ieWrappedName . unLoc) ns                           ++ map (flSelector . unLoc) fs@@ -1308,6 +1374,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"  extendImportMap :: GlobalRdrElt -> ImportMap -> ImportMap -- For each of a list of used GREs, find all the import decls that brought@@ -1353,9 +1420,12 @@     pp_mod      = ppr (unLoc (ideclName decl))     pp_not_used = text "is redundant" +    -- In warning message, pretty-print identifiers unqualified unconditionally+    -- to improve the consistent for ambiguous/unambiguous identifiers.+    -- See trac#14881.     ppr_possible_field n = case lookupNameEnv fld_env n of-                               Just (fld, p) -> ppr p <> parens (ppr fld)-                               Nothing  -> ppr n+                               Just (fld, p) -> pprNameUnqualified p <> parens (ppr fld)+                               Nothing  -> pprNameUnqualified n      -- Print unused names in a deterministic (lexicographic) order     sort_unused = pprWithCommas ppr_possible_field $@@ -1384,28 +1454,9 @@     from it.  Instead we just trim to an empty import list -} -printMinimalImports :: [ImportDeclUsage] -> RnM ()--- See Note [Printing minimal imports]-printMinimalImports imports_w_usage-  = do { imports' <- mapM mk_minimal imports_w_usage-       ; this_mod <- getModule-       ; dflags   <- getDynFlags-       ; liftIO $-         do { h <- openFile (mkFilename dflags this_mod) WriteMode-            ; printForUser dflags h neverQualify (vcat (map ppr imports')) }-              -- The neverQualify is important.  We are printing Names-              -- but they are in the context of an 'import' decl, and-              -- we never qualify things inside there-              -- E.g.   import Blag( f, b )-              -- not    import Blag( Blag.f, Blag.g )!-       }+getMinimalImports :: [ImportDeclUsage] -> RnM [LImportDecl GhcRn]+getMinimalImports = mapM mk_minimal   where-    mkFilename dflags this_mod-      | Just d <- dumpDir dflags = d </> basefn-      | otherwise                = basefn-      where-        basefn = moduleNameString (moduleName this_mod) ++ ".imports"-     mk_minimal (L l decl, used, unused)       | null unused       , Just (False, _) <- ideclHiding decl@@ -1425,25 +1476,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 (to_ie_post_rn $ noLoc n)]+       = [IEVar noExt (to_ie_post_rn $ noLoc n)]     to_ie _ (AvailTC n [m] [])-       | n==m = [IEThingAbs (to_ie_post_rn $ noLoc n)]+       | n==m = [IEThingAbs noExt (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 (to_ie_post_rn $ noLoc n)]+           [xs] | all_used xs -> [IEThingAll noExt (to_ie_post_rn $ noLoc n)]                 | otherwise   ->-                   [IEThingWith (to_ie_post_rn $ noLoc n) NoIEWildcard+                   [IEThingWith noExt (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 . to_ie_post_rn_var . noLoc) $ ns+                           -> map (IEVar noExt . to_ie_post_rn_var . noLoc) $ ns                                  ++ map flSelector fs                   | otherwise ->-                      [IEThingWith (to_ie_post_rn $ noLoc n) NoIEWildcard+                      [IEThingWith noExt (to_ie_post_rn $ noLoc n) NoIEWildcard                                 (map (to_ie_post_rn . noLoc) (filter (/= n) ns))                                 (map noLoc fs)]         where@@ -1456,6 +1507,29 @@            all_non_overloaded = all (not . flIsOverloaded) +printMinimalImports :: [ImportDeclUsage] -> RnM ()+-- See Note [Printing minimal imports]+printMinimalImports imports_w_usage+  = do { imports' <- getMinimalImports imports_w_usage+       ; this_mod <- getModule+       ; dflags   <- getDynFlags+       ; liftIO $+         do { h <- openFile (mkFilename dflags this_mod) WriteMode+            ; printForUser dflags h neverQualify (vcat (map ppr imports')) }+              -- The neverQualify is important.  We are printing Names+              -- but they are in the context of an 'import' decl, and+              -- we never qualify things inside there+              -- E.g.   import Blag( f, b )+              -- not    import Blag( Blag.f, Blag.g )!+       }+  where+    mkFilename dflags this_mod+      | Just d <- dumpDir dflags = d </> basefn+      | otherwise                = basefn+      where+        basefn = moduleNameString (moduleName this_mod) ++ ".imports"++ to_ie_post_rn_var :: (HasOccName name) => Located name -> LIEWrappedName name to_ie_post_rn_var (L l n)   | isDataOcc $ occName n = L l (IEPattern (L l n))@@ -1584,10 +1658,10 @@           quotes (ppr tc) <+> text "has (in-scope) constructors or class methods,",           text "but it has none" ] -dodgyMsgInsert :: forall p . IdP p -> IE p-dodgyMsgInsert tc = IEThingAll ii+dodgyMsgInsert :: forall p . IdP (GhcPass p) -> IE (GhcPass p)+dodgyMsgInsert tc = IEThingAll noExt ii   where-    ii :: LIEWrappedName (IdP p)+    ii :: LIEWrappedName (IdP (GhcPass p))     ii = noLoc (IEName $ noLoc tc)  
rename/RnPat.hs view
@@ -11,6 +11,8 @@ -}  {-# LANGUAGE CPP, RankNTypes, ScopedTypeVariables #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeFamilies #-}  module RnPat (-- main entry points               rnPat, rnPats, rnBindPat, rnPatAndThen,@@ -51,15 +53,10 @@                            , warnUnusedMatches, newLocalBndrRn                            , checkDupNames, checkDupAndShadowedNames                            , checkTupSize , unknownSubordinateErr )-import RnUnbound           ( mkUnboundName ) import RnTypes import PrelNames-import TyCon               ( tyConName )-import ConLike-import Type                ( TyThing(..) ) import Name import NameSet-import OccName             ( setOccNameSpace, tcName ) import RdrName import BasicTypes import Util@@ -71,7 +68,7 @@ import DataCon import qualified GHC.LanguageExtensions as LangExt -import Control.Monad       ( when, liftM, ap )+import Control.Monad       ( when, liftM, ap, guard ) import qualified Data.List.NonEmpty as NE import Data.Ratio @@ -383,17 +380,20 @@ rnLPatAndThen nm lpat = wrapSrcSpanCps (rnPatAndThen nm) lpat  rnPatAndThen :: NameMaker -> Pat GhcPs -> CpsRn (Pat GhcRn)-rnPatAndThen _  (WildPat _)   = return (WildPat placeHolderType)-rnPatAndThen mk (ParPat pat)  = do { pat' <- rnLPatAndThen mk pat; return (ParPat pat') }-rnPatAndThen mk (LazyPat pat) = do { pat' <- rnLPatAndThen mk pat; return (LazyPat pat') }-rnPatAndThen mk (BangPat pat) = do { pat' <- rnLPatAndThen mk pat; return (BangPat pat') }-rnPatAndThen mk (VarPat (L l rdr)) = do { loc <- liftCps getSrcSpanM-                                        ; name <- newPatName mk (L loc rdr)-                                        ; return (VarPat (L l name)) }+rnPatAndThen _  (WildPat _)   = return (WildPat noExt)+rnPatAndThen mk (ParPat x pat)  = do { pat' <- rnLPatAndThen mk pat+                                     ; return (ParPat x pat') }+rnPatAndThen mk (LazyPat x pat) = do { pat' <- rnLPatAndThen mk pat+                                     ; return (LazyPat x pat') }+rnPatAndThen mk (BangPat x pat) = do { pat' <- rnLPatAndThen mk pat+                                     ; return (BangPat x pat') }+rnPatAndThen mk (VarPat x (L l rdr)) = do { loc <- liftCps getSrcSpanM+                                          ; name <- newPatName mk (L loc rdr)+                                          ; return (VarPat x (L l name)) }      -- we need to bind pattern variables for view pattern expressions      -- (e.g. in the pattern (x, x -> y) x needs to be bound in the rhs of the tuple) -rnPatAndThen mk (SigPatIn pat sig)+rnPatAndThen mk (SigPat sig pat )   -- When renaming a pattern type signature (e.g. f (a :: T) = ...), it is   -- important to rename its type signature _before_ renaming the rest of the   -- pattern, so that type variables are first bound by the _outermost_ pattern@@ -405,21 +405,21 @@   -- ~~~~~~~~~~~~~~~^                   the same `a' then used here   = do { sig' <- rnHsSigCps sig        ; pat' <- rnLPatAndThen mk pat-       ; return (SigPatIn pat' sig') }+       ; return (SigPat sig' pat' ) } -rnPatAndThen mk (LitPat lit)+rnPatAndThen mk (LitPat x lit)   | HsString src s <- lit   = do { ovlStr <- liftCps (xoptM LangExt.OverloadedStrings)        ; if ovlStr          then rnPatAndThen mk-                           (mkNPat (noLoc (mkHsIsString src s placeHolderType))+                           (mkNPat (noLoc (mkHsIsString src s))                                       Nothing)          else normal_lit }   | otherwise = normal_lit   where-    normal_lit = do { liftCps (rnLit lit); return (LitPat (convertLit lit)) }+    normal_lit = do { liftCps (rnLit lit); return (LitPat x (convertLit lit)) } -rnPatAndThen _ (NPat (L l lit) mb_neg _eq _)+rnPatAndThen _ (NPat x (L l lit) mb_neg _eq)   = do { (lit', mb_neg') <- liftCpsFV $ rnOverLit lit        ; mb_neg' -- See Note [Negative zero]            <- let negative = do { (neg, fvs) <- lookupSyntaxName negateName@@ -431,9 +431,9 @@                                   (Nothing, Nothing) -> positive                                   (Just _ , Just _ ) -> positive        ; eq' <- liftCpsFV $ lookupSyntaxName eqName-       ; return (NPat (L l lit') mb_neg' eq' placeHolderType) }+       ; return (NPat x (L l lit') mb_neg' eq') } -rnPatAndThen mk (NPlusKPat rdr (L l lit) _ _ _ _)+rnPatAndThen mk (NPlusKPat x rdr (L l lit) _ _ _ )   = do { new_name <- newPatName mk rdr        ; (lit', _) <- liftCpsFV $ rnOverLit lit -- See Note [Negative zero]                                                 -- We skip negateName as@@ -441,16 +441,16 @@                                                 -- sense in n + k patterns        ; minus <- liftCpsFV $ lookupSyntaxName minusName        ; ge    <- liftCpsFV $ lookupSyntaxName geName-       ; return (NPlusKPat (L (nameSrcSpan new_name) new_name)-                           (L l lit') lit' ge minus placeHolderType) }+       ; return (NPlusKPat x (L (nameSrcSpan new_name) new_name)+                             (L l lit') lit' ge minus) }                 -- The Report says that n+k patterns must be in Integral -rnPatAndThen mk (AsPat rdr pat)+rnPatAndThen mk (AsPat x rdr pat)   = do { new_name <- newPatLName mk rdr        ; pat' <- rnLPatAndThen mk pat-       ; return (AsPat new_name pat') }+       ; return (AsPat x new_name pat') } -rnPatAndThen mk p@(ViewPat expr pat _ty)+rnPatAndThen mk p@(ViewPat x expr pat)   = do { liftCps $ do { vp_flag <- xoptM LangExt.ViewPatterns                       ; checkErr vp_flag (badViewPat p) }          -- Because of the way we're arranging the recursive calls,@@ -459,45 +459,40 @@        ; pat' <- rnLPatAndThen mk pat        -- Note: at this point the PreTcType in ty can only be a placeHolder        -- ; return (ViewPat expr' pat' ty) }-       ; return (ViewPat expr' pat' placeHolderType) }+       ; return (ViewPat x expr' pat') }  rnPatAndThen mk (ConPatIn con stuff)    -- rnConPatAndThen takes care of reconstructing the pattern    -- 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 [] placeHolderType Nothing)+                    ; if ol_flag then rnPatAndThen mk (ListPat noExt [])                                  else rnConPatAndThen mk con stuff}       False   -> rnConPatAndThen mk con stuff -rnPatAndThen mk (ListPat pats _ _)+rnPatAndThen mk (ListPat _ pats)   = do { opt_OverloadedLists <- liftCps $ xoptM LangExt.OverloadedLists        ; pats' <- rnLPatsAndThen mk pats        ; case opt_OverloadedLists of           True -> do { (to_list_name,_) <- liftCps $ lookupSyntaxName toListName-                     ; return (ListPat pats' placeHolderType-                                       (Just (placeHolderType, to_list_name)))}-          False -> return (ListPat pats' placeHolderType Nothing) }--rnPatAndThen mk (PArrPat pats _)-  = do { pats' <- rnLPatsAndThen mk pats-       ; return (PArrPat pats' placeHolderType) }+                     ; return (ListPat (Just to_list_name) pats')}+          False -> return (ListPat Nothing pats') } -rnPatAndThen mk (TuplePat pats boxed _)+rnPatAndThen mk (TuplePat x pats boxed)   = do { liftCps $ checkTupSize (length pats)        ; pats' <- rnLPatsAndThen mk pats-       ; return (TuplePat pats' boxed []) }+       ; return (TuplePat x pats' boxed) } -rnPatAndThen mk (SumPat pat alt arity _)+rnPatAndThen mk (SumPat x pat alt arity)   = do { pat <- rnLPatAndThen mk pat-       ; return (SumPat pat alt arity PlaceHolder)+       ; return (SumPat x pat alt arity)        }  -- If a splice has been run already, just rename the result.-rnPatAndThen mk (SplicePat (HsSpliced mfs (HsSplicedPat pat)))-  = SplicePat . HsSpliced mfs . HsSplicedPat <$> rnPatAndThen mk pat+rnPatAndThen mk (SplicePat x (HsSpliced x2 mfs (HsSplicedPat pat)))+  = SplicePat x . HsSpliced x2 mfs . HsSplicedPat <$> rnPatAndThen mk pat -rnPatAndThen mk (SplicePat splice)+rnPatAndThen mk (SplicePat _ splice)   = do { eith <- liftCpsFV $ rnSplicePat splice        ; case eith of   -- See Note [rnSplicePat] in RnSplice            Left  not_yet_renamed -> rnPatAndThen mk not_yet_renamed@@ -540,7 +535,7 @@        ; flds' <- mapM rn_field (flds `zip` [1..])        ; return (HsRecFields { rec_flds = flds', rec_dotdot = dd }) }   where-    mkVarPat l n = VarPat (L l n)+    mkVarPat l n = VarPat noExt (L l n)     rn_field (L l fld, n') = do { arg' <- rnLPatAndThen (nested_mk dd mk n')                                                         (hsRecFieldArg fld)                                 ; return (L l (fld { hsRecFieldArg = arg' })) }@@ -574,7 +569,7 @@ -- This surprisingly complicated pass --   a) looks up the field name (possibly using disambiguation) --   b) fills in puns and dot-dot stuff--- When we we've finished, we've renamed the LHS, but not the RHS,+-- When we've finished, we've renamed the LHS, but not the RHS, -- of each x=e binding -- -- This is used for record construction and pattern-matching, but not updates.@@ -582,7 +577,7 @@ rnHsRecFields ctxt mk_arg (HsRecFields { rec_flds = flds, rec_dotdot = dotdot })   = do { pun_ok      <- xoptM LangExt.RecordPuns        ; disambig_ok <- xoptM LangExt.DisambiguateRecordFields-       ; parent <- check_disambiguation disambig_ok mb_con+       ; let parent = guard disambig_ok >> mb_con        ; flds1  <- mapM (rn_fld pun_ok parent) flds        ; mapM_ (addErr . dupFieldErr ctxt) dup_flds        ; dotdot_flds <- rn_dotdot dotdot mb_con flds1@@ -595,17 +590,13 @@                 HsRecFieldPat con  -> Just con                 _ {- update -}     -> Nothing -    doc = case mb_con of-            Nothing  -> text "constructor field name"-            Just con -> text "field of constructor" <+> quotes (ppr con)-     rn_fld :: Bool -> Maybe Name -> LHsRecField GhcPs (Located arg)            -> RnM (LHsRecField GhcRn (Located arg))     rn_fld pun_ok parent (L l (HsRecField { hsRecFieldLbl-                                              = L loc (FieldOcc (L ll lbl) _)+                                              = L loc (FieldOcc _ (L ll lbl))                                           , hsRecFieldArg = arg                                           , hsRecPun      = pun }))-      = do { sel <- setSrcSpan loc $ lookupRecFieldOcc parent doc lbl+      = do { sel <- setSrcSpan loc $ lookupRecFieldOcc parent lbl            ; arg' <- if pun                      then do { checkErr pun_ok (badPun (L loc lbl))                                -- Discard any module qualifier (#11662)@@ -613,9 +604,11 @@                              ; return (L loc (mk_arg loc arg_rdr)) }                      else return arg            ; return (L l (HsRecField { hsRecFieldLbl-                                         = L loc (FieldOcc (L ll lbl) sel)+                                         = L loc (FieldOcc sel (L ll lbl))                                      , hsRecFieldArg = arg'                                      , hsRecPun      = pun })) }+    rn_fld _ _ (L _ (HsRecField (L _ (XFieldOcc _)) _ _))+      = panic "rnHsRecFields"      rn_dotdot :: Maybe Int      -- See Note [DotDot fields] in HsPat               -> Maybe Name -- The constructor (Nothing for an@@ -656,7 +649,7 @@             ; addUsedGREs dot_dot_gres            ; return [ L loc (HsRecField-                        { hsRecFieldLbl = L loc (FieldOcc (L loc arg_rdr) sel)+                        { hsRecFieldLbl = L loc (FieldOcc sel (L loc arg_rdr))                         , hsRecFieldArg = L loc (mk_arg loc arg_rdr)                         , hsRecPun      = False })                     | fl <- dot_dot_fields@@ -669,41 +662,6 @@       -- _mb_con = Nothing => Record update       -- _mb_con = Just unbound => Out of scope data constructor -    check_disambiguation :: Bool -> Maybe Name -> RnM (Maybe Name)-    -- When disambiguation is on, return name of parent tycon.-    check_disambiguation disambig_ok mb_con-      | disambig_ok, Just con <- mb_con-      = do { env <- getGlobalRdrEnv; return (find_tycon env con) }-      | otherwise = return Nothing--    find_tycon :: GlobalRdrEnv -> Name {- DataCon -}-               -> Maybe Name {- TyCon -}-    -- Return the parent *type constructor* of the data constructor-    -- (that is, the parent of the data constructor),-    -- or 'Nothing' if it is a pattern synonym or not in scope.-    -- That's the parent to use for looking up record fields.-    find_tycon env con_name-      | isUnboundName con_name-      = Just (mkUnboundName (setOccNameSpace tcName (getOccName con_name)))-        -- If the data con is not in scope, return an unboundName tycon-        -- That way the calls to lookupRecFieldOcc in rn_fld won't generate-        -- an error cascade; see Trac #14307--      | Just (AConLike (RealDataCon dc)) <- wiredInNameTyThing_maybe con_name-      = Just (tyConName (dataConTyCon dc))-        -- Special case for [], which is built-in syntax-        -- and not in the GlobalRdrEnv (Trac #8448)--      | Just gre <- lookupGRE_Name env con_name-      = case gre_par gre of-          ParentIs p -> Just p-          _          -> Nothing   -- Can happen if the con_name-                                  -- is for a pattern synonym--      | otherwise = Nothing-        -- Data constructor not lexically in scope at all-        -- See Note [Disambiguation and Template Haskell]-     dup_flds :: [NE.NonEmpty RdrName]         -- Each list represents a RdrName that occurred more than once         -- (the list contains all occurrences)@@ -711,21 +669,12 @@     (_, dup_flds) = removeDups compare (getFieldLbls flds)  -{- Note [Disambiguation and Template Haskell]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider (Trac #12130)-   module Foo where-     import M-     b = $(funny)--   module M(funny) where-     data T = MkT { x :: Int }-     funny :: Q Exp-     funny = [| MkT { x = 3 } |]--When we splice, neither T nor MkT are lexically in scope, so find_tycon will-fail.  But there is no need for disambiguation anyway, so we just return Nothing--}+-- NB: Consider this:+--      module Foo where { data R = R { fld :: Int } }+--      module Odd where { import Foo; fld x = x { fld = 3 } }+-- Arguably this should work, because the reference to 'fld' is+-- unambiguous because there is only one field id 'fld' in scope.+-- But currently it's rejected.  rnHsRecUpdFields     :: [LHsRecUpdField GhcPs]@@ -764,7 +713,7 @@                      then do { checkErr pun_ok (badPun (L loc lbl))                                -- Discard any module qualifier (#11662)                              ; let arg_rdr = mkRdrUnqual (rdrNameOcc lbl)-                             ; return (L loc (HsVar (L loc arg_rdr))) }+                             ; return (L loc (HsVar noExt (L loc arg_rdr))) }                      else return arg            ; (arg'', fvs) <- rnLExpr arg' @@ -774,10 +723,10 @@                           Right _       -> fvs                  lbl' = case sel of                           Left sel_name ->-                                     L loc (Unambiguous (L loc lbl) sel_name)+                                     L loc (Unambiguous sel_name  (L loc lbl))                           Right [sel_name] ->-                                     L loc (Unambiguous (L loc lbl) sel_name)-                          Right _ -> L loc (Ambiguous   (L loc lbl) PlaceHolder)+                                     L loc (Unambiguous sel_name  (L loc lbl))+                          Right _ -> L loc (Ambiguous   noExt     (L loc lbl))             ; return (L l (HsRecField { hsRecFieldLbl = lbl'                                      , hsRecFieldArg = arg''@@ -798,7 +747,7 @@ getFieldLbls flds   = map (unLoc . rdrNameFieldOcc . unLoc . hsRecFieldLbl . unLoc) flds -getFieldUpdLbls :: [LHsRecUpdField id] -> [RdrName]+getFieldUpdLbls :: [LHsRecUpdField GhcPs] -> [RdrName] getFieldUpdLbls flds = map (rdrNameAmbiguousFieldOcc . unLoc . hsRecFieldLbl . unLoc) flds  needFlagDotDot :: HsRecFieldContext -> SDoc@@ -882,11 +831,10 @@         ; (SyntaxExpr { syn_expr = from_thing_name }, fvs1)             <- lookupSyntaxName std_name         ; let rebindable = case from_thing_name of-                                HsVar (L _ v) -> v /= std_name-                                _             -> panic "rnOverLit"+                                HsVar _ (L _ v) -> v /= std_name+                                _               -> panic "rnOverLit"         ; let lit' = lit { ol_witness = from_thing_name-                         , ol_rebindable = rebindable-                         , ol_type = placeHolderType }+                         , ol_ext = rebindable }         ; if isNegativeZeroOverLit lit'           then do { (SyntaxExpr { syn_expr = negate_name }, fvs2)                       <- lookupSyntaxName negateName
rename/RnSource.hs view
@@ -51,8 +51,7 @@ import Avail import Outputable import Bag-import BasicTypes       ( DerivStrategy, RuleName, pprRuleName )-import Maybes           ( orElse )+import BasicTypes       ( RuleName, pprRuleName ) import FastString import SrcLoc import DynFlags@@ -69,7 +68,6 @@ import Data.List ( mapAccumL ) import qualified Data.List.NonEmpty as NE import Data.List.NonEmpty ( NonEmpty(..) )-import Data.Maybe ( isJust ) import qualified Data.Set as Set ( difference, fromList, toList, null )  {- | @rnSourceDecl@ "renames" declarations.@@ -100,7 +98,6 @@                             hs_fords   = foreign_decls,                             hs_defds   = default_decls,                             hs_ruleds  = rule_decls,-                            hs_vects   = vect_decls,                             hs_docs    = docs })  = do {    -- (A) Process the fixity declarations, creating a mapping from@@ -114,7 +111,6 @@    --    --        * Class ops, data constructors, and record fields,    --          because they do not have value declarations.-   --          Aso step (C) depends on datacons and record fields    --    --        * For hs-boot files, include the value signatures    --          Again, they have no value declarations@@ -133,8 +129,7 @@    extendPatSynEnv val_decls local_fix_env $ \pat_syn_bndrs -> do {     -- (D2) Rename the left-hand sides of the value bindings.-   --     This depends on everything from (B) being in scope,-   --     and on (C) for resolving record wild cards.+   --     This depends on everything from (B) being in scope.    --     It uses the fixity env from (A) to bind fixities for view patterns.    new_lhs <- rnTopBindsLHS local_fix_env val_decls ; @@ -190,18 +185,18 @@    (rn_rule_decls,    src_fvs2) <- setXOptM LangExt.ScopedTypeVariables $                                    rnList rnHsRuleDecls rule_decls ;                            -- Inside RULES, scoped type variables are on-   (rn_vect_decls,    src_fvs3) <- rnList rnHsVectDecl    vect_decls ;-   (rn_foreign_decls, src_fvs4) <- rnList rnHsForeignDecl foreign_decls ;-   (rn_ann_decls,     src_fvs5) <- rnList rnAnnDecl       ann_decls ;-   (rn_default_decls, src_fvs6) <- rnList rnDefaultDecl   default_decls ;-   (rn_deriv_decls,   src_fvs7) <- rnList rnSrcDerivDecl  deriv_decls ;-   (rn_splice_decls,  src_fvs8) <- rnList rnSpliceDecl    splice_decls ;+   (rn_foreign_decls, src_fvs3) <- rnList rnHsForeignDecl foreign_decls ;+   (rn_ann_decls,     src_fvs4) <- rnList rnAnnDecl       ann_decls ;+   (rn_default_decls, src_fvs5) <- rnList rnDefaultDecl   default_decls ;+   (rn_deriv_decls,   src_fvs6) <- rnList rnSrcDerivDecl  deriv_decls ;+   (rn_splice_decls,  src_fvs7) <- rnList rnSpliceDecl    splice_decls ;       -- Haddock docs; no free vars    rn_docs <- mapM (wrapLocM rnDocDecl) docs ;     last_tcg_env <- getGblEnv ;    -- (I) Compute the results and return-   let {rn_group = HsGroup { hs_valds   = rn_val_decls,+   let {rn_group = HsGroup { hs_ext     = noExt,+                             hs_valds   = rn_val_decls,                              hs_splcds  = rn_splice_decls,                              hs_tyclds  = rn_tycl_decls,                              hs_derivds = rn_deriv_decls,@@ -212,13 +207,12 @@                              hs_annds  = rn_ann_decls,                              hs_defds  = rn_default_decls,                              hs_ruleds = rn_rule_decls,-                             hs_vects  = rn_vect_decls,                              hs_docs   = rn_docs } ;          tcf_bndrs = hsTyClForeignBinders rn_tycl_decls rn_foreign_decls ;         other_def  = (Just (mkNameSet tcf_bndrs), emptyNameSet) ;-        other_fvs  = plusFVs [src_fvs1, src_fvs2, src_fvs3, src_fvs4, src_fvs5,-                              src_fvs6, src_fvs7, src_fvs8] ;+        other_fvs  = plusFVs [src_fvs1, src_fvs2, src_fvs3, src_fvs4,+                              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 ;@@ -233,6 +227,7 @@    traceRn "finish Dus" (ppr src_dus ) ;    return (final_tcg_env, rn_group)                     }}}}+rnSrcDecls (XHsGroup _) = panic "rnSrcDecls"  addTcgDUs :: TcGblEnv -> DefUses -> TcGblEnv -- This function could be defined lower down in the module hierarchy,@@ -295,15 +290,16 @@     sig_ctxt = TopSigCtxt bndr_set -   rn_deprec (Warning rdr_names txt)+   rn_deprec (Warning _ rdr_names txt)        -- ensures that the names are defined locally      = do { names <- concatMapM (lookupLocalTcNames sig_ctxt what . unLoc)                                 rdr_names           ; return [(rdrNameOcc rdr, txt) | (rdr, _) <- names] }+   rn_deprec (XWarnDecl _) = panic "rnSrcWarnDecls"     what = text "deprecation" -   warn_rdr_dups = findDupRdrNames $ concatMap (\(L _ (Warning ns _)) -> ns)+   warn_rdr_dups = findDupRdrNames $ concatMap (\(L _ (Warning _ ns _)) -> ns)                                                decls  findDupRdrNames :: [Located RdrName] -> [NonEmpty (Located RdrName)]@@ -328,13 +324,14 @@ -}  rnAnnDecl :: AnnDecl GhcPs -> RnM (AnnDecl GhcRn, FreeVars)-rnAnnDecl ann@(HsAnnotation s provenance expr)+rnAnnDecl ann@(HsAnnotation _ s provenance expr)   = addErrCtxt (annCtxt ann) $     do { (provenance', provenance_fvs) <- rnAnnProvenance provenance        ; (expr', expr_fvs) <- setStage (Splice Untyped) $                               rnLExpr expr-       ; return (HsAnnotation s provenance' expr',+       ; return (HsAnnotation noExt s provenance' expr',                  provenance_fvs `plusFV` expr_fvs) }+rnAnnDecl (XAnnDecl _) = panic "rnAnnDecl"  rnAnnProvenance :: AnnProvenance RdrName                 -> RnM (AnnProvenance Name, FreeVars)@@ -351,11 +348,12 @@ -}  rnDefaultDecl :: DefaultDecl GhcPs -> RnM (DefaultDecl GhcRn, FreeVars)-rnDefaultDecl (DefaultDecl tys)+rnDefaultDecl (DefaultDecl _ tys)   = do { (tys', fvs) <- rnLHsTypes doc_str tys-       ; return (DefaultDecl tys', fvs) }+       ; return (DefaultDecl noExt tys', fvs) }   where     doc_str = DefaultDeclCtx+rnDefaultDecl (XDefaultDecl _) = panic "rnDefaultDecl"  {- *********************************************************@@ -375,24 +373,26 @@        ; let unitId = thisPackage $ hsc_dflags topEnv              spec'      = patchForeignImport unitId spec -       ; return (ForeignImport { fd_name = name', fd_sig_ty = ty'-                               , fd_co = noForeignImportCoercionYet+       ; return (ForeignImport { fd_i_ext = noExt+                               , 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_name = name', fd_sig_ty = ty'-                               , fd_co = noForeignExportCoercionYet+       ; return (ForeignExport { fd_e_ext = noExt+                               , fd_name = name', fd_sig_ty = ty'                                , fd_fe = spec }                 , fvs `addOneFV` unLoc name') }         -- NB: a foreign export is an *occurrence site* for name, so         --     we add it to the free-variable list.  It might, for example,         --     be imported from another module +rnHsForeignDecl (XForeignDecl _) = panic "rnHsForeignDecl"+ -- | For Windows DLLs we need to know what packages imported symbols are from --      to generate correct calls. Imported symbols are tagged with the current---      package, so if they get inlined across a package boundry we'll still+--      package, so if they get inlined across a package boundary we'll still --      know where they're from. -- patchForeignImport :: UnitId -> ForeignImport -> ForeignImport@@ -423,18 +423,20 @@ rnSrcInstDecl :: InstDecl GhcPs -> RnM (InstDecl GhcRn, FreeVars) rnSrcInstDecl (TyFamInstD { tfid_inst = tfi })   = do { (tfi', fvs) <- rnTyFamInstDecl Nothing tfi-       ; return (TyFamInstD { tfid_inst = tfi' }, fvs) }+       ; return (TyFamInstD { tfid_ext = noExt, tfid_inst = tfi' }, fvs) }  rnSrcInstDecl (DataFamInstD { dfid_inst = dfi })   = do { (dfi', fvs) <- rnDataFamInstDecl Nothing dfi-       ; return (DataFamInstD { dfid_inst = dfi' }, fvs) }+       ; return (DataFamInstD { dfid_ext = noExt, 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_inst = cid' }, fvs) }+       ; return (ClsInstD { cid_d_ext = noExt, cid_inst = cid' }, fvs) } +rnSrcInstDecl (XInstDecl _) = panic "rnSrcInstDecl"+ -- | Warn about non-canonical typeclass instance declarations -- -- A "non-canonical" instance definition can occur for instances of a@@ -580,9 +582,9 @@     -- binding, and return @Just rhsName@ if this is the case     isAliasMG :: MatchGroup GhcRn (LHsExpr GhcRn) -> Maybe Name     isAliasMG MG {mg_alts = L _ [L _ (Match { m_pats = [], m_grhss = grhss })]}-        | GRHSs [L _ (GRHS [] body)] lbinds <- grhss-        , L _ EmptyLocalBinds <- lbinds-        , L _ (HsVar (L _ rhsName)) <- body  = Just rhsName+        | GRHSs _ [L _ (GRHS _ [] body)] lbinds <- grhss+        , L _ (EmptyLocalBinds _) <- lbinds+        , L _ (HsVar _ (L _ rhsName)) <- body  = Just rhsName     isAliasMG _ = Nothing      -- got "lhs = rhs" but expected something different@@ -663,7 +665,8 @@         ; let all_fvs = meth_fvs `plusFV` more_fvs                                 `plusFV` inst_fvs-       ; return (ClsInstDecl { cid_poly_ty = inst_ty', cid_binds = mbinds'+       ; return (ClsInstDecl { cid_ext = noExt+                             , cid_poly_ty = inst_ty', cid_binds = mbinds'                              , cid_sigs = uprags', cid_tyfam_insts = ats'                              , cid_overlap_mode = oflag                              , cid_datafam_insts = adts' },@@ -678,6 +681,7 @@              --     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"  rnFamInstEqn :: HsDocContext              -> Maybe (Name, [Name]) -- Nothing => not associated@@ -761,14 +765,17 @@              all_fvs  = fvs `addOneFV` unLoc tycon'                         -- type instance => use, hence addOneFV -       ; return (HsIB { hsib_vars = all_ibs-                      , hsib_closed = True+       ; return (HsIB { hsib_ext = HsIBRn { hsib_vars = all_ibs+                                          , hsib_closed = True }                       , hsib_body-                          = FamEqn { feqn_tycon  = tycon'+                          = FamEqn { feqn_ext    = noExt+                                   , feqn_tycon  = tycon'                                    , feqn_pats   = pats'                                    , feqn_fixity = fixity                                    , feqn_rhs    = payload' } },                  all_fvs) }+rnFamInstEqn _ _ _ (HsIB _ (XFamEqn _)) _ = panic "rnFamInstEqn"+rnFamInstEqn _ _ _ (XHsImplicitBndrs _) _ = panic "rnFamInstEqn"  rnTyFamInstDecl :: Maybe (Name, [Name])                 -> TyFamInstDecl GhcPs@@ -784,6 +791,8 @@                                                      , feqn_rhs   = rhs }})   = do { rhs_kvs <- extractHsTyRdrTyVarsKindVars rhs        ; rnFamInstEqn (TySynCtx tycon) mb_cls rhs_kvs eqn rnTySyn }+rnTyFamInstEqn _ (HsIB _ (XFamEqn _)) = panic "rnTyFamInstEqn"+rnTyFamInstEqn _ (XHsImplicitBndrs _) = panic "rnTyFamInstEqn"  rnTyFamDefltEqn :: Name                 -> TyFamDefltEqn GhcPs@@ -796,12 +805,14 @@        ; bindHsQTyVars ctx Nothing (Just cls) kvs tyvars $ \ tyvars' _ ->     do { tycon'      <- lookupFamInstName (Just cls) tycon        ; (rhs', fvs) <- rnLHsType ctx rhs-       ; return (FamEqn { feqn_tycon  = tycon'+       ; return (FamEqn { feqn_ext    = noExt+                        , feqn_tycon  = tycon'                         , feqn_pats   = tyvars'                         , feqn_fixity = fixity                         , feqn_rhs    = rhs' }, fvs) } }   where     ctx = TyFamilyCtx tycon+rnTyFamDefltEqn _ (XFamEqn _) = panic "rnTyFamDefltEqn"  rnDataFamInstDecl :: Maybe (Name, [Name])                   -> DataFamInstDecl GhcPs@@ -813,6 +824,10 @@        ; (eqn', fvs) <-            rnFamInstEqn (TyDataCtx tycon) mb_cls rhs_kvs eqn rnDataDefn        ; return (DataFamInstDecl { dfid_eqn = eqn' }, fvs) }+rnDataFamInstDecl _ (DataFamInstDecl (HsIB _ (XFamEqn _)))+  = panic "rnDataFamInstDecl"+rnDataFamInstDecl _ (DataFamInstDecl (XHsImplicitBndrs _))+  = panic "rnDataFamInstDecl"  -- Renaming of the associated types in instances. @@ -881,7 +896,7 @@             type T (a,_) = a    would be rejected.  So we should not complain about an unused variable b -As usual, the warnings are not reported for for type variables with names+As usual, the warnings are not reported for type variables with names beginning with an underscore.  Extra-constraints wild cards are not supported in type/data family@@ -940,14 +955,17 @@ -}  rnSrcDerivDecl :: DerivDecl GhcPs -> RnM (DerivDecl GhcRn, FreeVars)-rnSrcDerivDecl (DerivDecl ty deriv_strat overlap)+rnSrcDerivDecl (DerivDecl _ ty mds overlap)   = do { standalone_deriv_ok <- xoptM LangExt.StandaloneDeriving-       ; deriv_strats_ok     <- xoptM LangExt.DerivingStrategies        ; unless standalone_deriv_ok (addErr standaloneDerivErr)-       ; failIfTc (isJust deriv_strat && not deriv_strats_ok) $-           illegalDerivStrategyErr $ fmap unLoc deriv_strat-       ; (ty', fvs) <- rnLHsInstType (text "a deriving declaration") ty-       ; return (DerivDecl ty' deriv_strat overlap, fvs) }+       ; (mds', ty', fvs)+           <- rnLDerivStrategy DerivDeclCtx mds $ \strat_tvs ppr_via_ty ->+              rnAndReportFloatingViaTvs strat_tvs loc ppr_via_ty "instance" $+              rnHsSigWcType DerivDeclCtx ty+       ; return (DerivDecl noExt ty' mds' overlap, fvs) }+  where+    loc = getLoc $ hsib_body $ hswc_body ty+rnSrcDerivDecl (XDerivDecl _) = panic "rnSrcDerivDecl"  standaloneDerivErr :: SDoc standaloneDerivErr@@ -963,12 +981,13 @@ -}  rnHsRuleDecls :: RuleDecls GhcPs -> RnM (RuleDecls GhcRn, FreeVars)-rnHsRuleDecls (HsRules src rules)+rnHsRuleDecls (HsRules _ src rules)   = do { (rn_rules,fvs) <- rnList rnHsRuleDecl rules-       ; return (HsRules src rn_rules,fvs) }+       ; return (HsRules noExt src rn_rules,fvs) }+rnHsRuleDecls (XRuleDecls _) = panic "rnHsRuleDecls"  rnHsRuleDecl :: RuleDecl GhcPs -> RnM (RuleDecl GhcRn, FreeVars)-rnHsRuleDecl (HsRule rule_name act vars lhs _fv_lhs rhs _fv_rhs)+rnHsRuleDecl (HsRule _ rule_name act vars lhs rhs)   = do { let rdr_names_w_loc = map get_var vars        ; checkDupRdrNames rdr_names_w_loc        ; checkShadowedRdrNames rdr_names_w_loc@@ -977,11 +996,14 @@     do { (lhs', fv_lhs') <- rnLExpr lhs        ; (rhs', fv_rhs') <- rnLExpr rhs        ; checkValidRule (snd $ unLoc rule_name) names lhs' fv_lhs'-       ; return (HsRule rule_name act vars' lhs' fv_lhs' rhs' fv_rhs',+       ; return (HsRule (HsRuleRn fv_lhs' fv_rhs') rule_name act vars'+                                                                     lhs' rhs',                  fv_lhs' `plusFV` fv_rhs') } }   where-    get_var (L _ (RuleBndrSig v _)) = v-    get_var (L _ (RuleBndr v)) = v+    get_var (L _ (RuleBndrSig _ v _)) = v+    get_var (L _ (RuleBndr _ v)) = v+    get_var (L _ (XRuleBndr _)) = panic "rnHsRuleDecl"+rnHsRuleDecl (XRuleDecl _) = panic "rnHsRuleDecl"  bindHsRuleVars :: RuleName -> [LRuleBndr GhcPs] -> [Name]                -> ([LRuleBndr GhcRn] -> RnM (a, FreeVars))@@ -992,14 +1014,14 @@   where     doc = RuleCtx rule_name -    go (L l (RuleBndr (L loc _)) : vars) (n : ns) thing_inside+    go (L l (RuleBndr _ (L loc _)) : vars) (n : ns) thing_inside       = go vars ns $ \ vars' ->-        thing_inside (L l (RuleBndr (L loc n)) : vars')+        thing_inside (L l (RuleBndr noExt (L loc n)) : vars') -    go (L l (RuleBndrSig (L loc _) bsig) : vars) (n : ns) thing_inside+    go (L l (RuleBndrSig _ (L loc _) bsig) : vars) (n : ns) thing_inside       = rnHsSigWcTypeScoped doc bsig $ \ bsig' ->         go vars ns $ \ vars' ->-        thing_inside (L l (RuleBndrSig (L loc n) bsig') : vars')+        thing_inside (L l (RuleBndrSig noExt (L loc n) bsig') : vars')      go [] [] thing_inside = thing_inside []     go vars names _ = pprPanic "bindRuleVars" (ppr vars $$ ppr names)@@ -1039,10 +1061,11 @@   where     checkl (L _ e) = check e -    check (OpApp e1 op _ e2)              = checkl op `mplus` checkl_e e1 `mplus` checkl_e e2-    check (HsApp e1 e2)                   = checkl e1 `mplus` checkl_e e2-    check (HsAppType e _)                 = checkl e-    check (HsVar (L _ v)) | v `notElem` foralls = Nothing+    check (OpApp _ e1 op e2)              = checkl op `mplus` checkl_e e1+                                                      `mplus` checkl_e e2+    check (HsApp _ e1 e2)                 = checkl e1 `mplus` checkl_e e2+    check (HsAppType _ e)                 = checkl e+    check (HsVar _ (L _ v)) | v `notElem` foralls = Nothing     check other                           = Just other  -- Failure          -- Check an argument@@ -1078,59 +1101,9 @@     text "LHS must be of form (f e1 .. en) where f is not forall'd"   where     err = case bad_e of-            HsUnboundVar uv -> text "Not in scope:" <+> ppr uv+            HsUnboundVar _ uv -> text "Not in scope:" <+> ppr uv             _ -> text "Illegal expression:" <+> ppr bad_e -{--*********************************************************-*                                                      *-\subsection{Vectorisation declarations}-*                                                      *-*********************************************************--}--rnHsVectDecl :: VectDecl GhcPs -> RnM (VectDecl GhcRn, FreeVars)--- FIXME: For the moment, the right-hand side is restricted to be a variable as we cannot properly---        typecheck a complex right-hand side without invoking 'vectType' from the vectoriser.-rnHsVectDecl (HsVect s var rhs@(L _ (HsVar _)))-  = do { var' <- lookupLocatedOccRn var-       ; (rhs', fv_rhs) <- rnLExpr rhs-       ; return (HsVect s var' rhs', fv_rhs `addOneFV` unLoc var')-       }-rnHsVectDecl (HsVect _ _var _rhs)-  = failWith $ vcat-               [ text "IMPLEMENTATION RESTRICTION: right-hand side of a VECTORISE pragma"-               , text "must be an identifier"-               ]-rnHsVectDecl (HsNoVect s var)-  = do { var' <- lookupLocatedTopBndrRn var           -- only applies to local (not imported) names-       ; return (HsNoVect s var', unitFV (unLoc var'))-       }-rnHsVectDecl (HsVectTypeIn s isScalar tycon Nothing)-  = do { tycon' <- lookupLocatedOccRn tycon-       ; return (HsVectTypeIn s isScalar tycon' Nothing, unitFV (unLoc tycon'))-       }-rnHsVectDecl (HsVectTypeIn s isScalar tycon (Just rhs_tycon))-  = do { tycon'     <- lookupLocatedOccRn tycon-       ; rhs_tycon' <- lookupLocatedOccRn rhs_tycon-       ; return ( HsVectTypeIn s isScalar tycon' (Just rhs_tycon')-                , mkFVs [unLoc tycon', unLoc rhs_tycon'])-       }-rnHsVectDecl (HsVectTypeOut _ _ _)-  = panic "RnSource.rnHsVectDecl: Unexpected 'HsVectTypeOut'"-rnHsVectDecl (HsVectClassIn s cls)-  = do { cls' <- lookupLocatedOccRn cls-       ; return (HsVectClassIn s cls', unitFV (unLoc cls'))-       }-rnHsVectDecl (HsVectClassOut _)-  = panic "RnSource.rnHsVectDecl: Unexpected 'HsVectClassOut'"-rnHsVectDecl (HsVectInstIn instTy)-  = do { (instTy', fvs) <- rnLHsInstType (text "a VECTORISE pragma") instTy-       ; return (HsVectInstIn instTy', fvs)-       }-rnHsVectDecl (HsVectInstOut _)-  = panic "RnSource.rnHsVectDecl: Unexpected 'HsVectInstOut'"- {- **************************************************************          *                                                      *       Renaming type, class, instance and role declarations@@ -1293,7 +1266,8 @@               first_group                | null init_inst_ds = []-               | otherwise = [TyClGroup { group_tyclds = []+               | otherwise = [TyClGroup { group_ext    = noExt+                                        , group_tyclds = []                                         , group_roles  = []                                         , group_instds = init_inst_ds }] @@ -1324,7 +1298,8 @@         bndrs                = map (tcdName . unLoc) tycl_ds         (inst_ds, inst_map') = getInsts      bndrs inst_map         (roles,   role_env') = getRoleAnnots bndrs role_env-        group = TyClGroup { group_tyclds = tycl_ds+        group = TyClGroup { group_ext    = noExt+                          , group_tyclds = tycl_ds                           , group_roles  = roles                           , group_instds = inst_ds } @@ -1384,13 +1359,14 @@        ; mapM_ dupRoleAnnotErr dup_annots        ; mapM (wrapLocM rn_role_annot1) no_dups }   where-    rn_role_annot1 (RoleAnnotDecl tycon roles)+    rn_role_annot1 (RoleAnnotDecl _ tycon roles)       = do {  -- the name is an *occurrence*, but look it up only in the               -- decls defined in this group (see #10263)              tycon' <- lookupSigCtxtOccRn (RoleAnnotCtxt tc_names)                                           (text "role annotation")                                           tycon-           ; return $ RoleAnnotDecl tycon' roles }+           ; return $ RoleAnnotDecl noExt tycon' roles }+    rn_role_annot1 (XRoleAnnotDecl _) = panic "rnRoleAnnots"  dupRoleAnnotErr :: NonEmpty (LRoleAnnotDecl GhcPs) -> RnM () dupRoleAnnotErr list@@ -1508,7 +1484,7 @@ -- in a class decl rnTyClDecl (FamDecl { tcdFam = decl })   = do { (decl', fvs) <- rnFamDecl Nothing decl-       ; return (FamDecl decl', fvs) }+       ; return (FamDecl noExt decl', fvs) }  rnTyClDecl (SynDecl { tcdLName = tycon, tcdTyVars = tyvars,                       tcdFixity = fixity, tcdRhs = rhs })@@ -1520,7 +1496,7 @@     do { (rhs', fvs) <- rnTySyn doc rhs        ; return (SynDecl { tcdLName = tycon', tcdTyVars = tyvars'                          , tcdFixity = fixity-                         , tcdRhs = rhs', tcdFVs = fvs }, fvs) } }+                         , tcdRhs = rhs', tcdSExt = fvs }, fvs) } }  -- "data", "newtype" declarations -- both top level and (for an associated type) in an instance decl@@ -1533,13 +1509,15 @@        ; 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-       ; typeintype <- xoptM LangExt.TypeInType-       ; let cusk = hsTvbAllKinded tyvars' &&-                    (not typeintype || no_rhs_kvs)-       ; return (DataDecl { tcdLName = tycon', tcdTyVars = tyvars'-                          , tcdFixity = fixity-                          , tcdDataDefn = defn', tcdDataCusk = cusk-                          , tcdFVs = fvs }, fvs) } }+       ; let cusk = hsTvbAllKinded tyvars' && no_rhs_kvs+             rn_info = DataDeclRn { tcdDataCusk = cusk+                                  , tcdFVs      = fvs }+       ; traceRn "rndata" (ppr tycon <+> ppr cusk <+> ppr no_rhs_kvs)+       ; return (DataDecl { tcdLName    = tycon'+                          , tcdTyVars   = tyvars'+                          , tcdFixity   = fixity+                          , tcdDataDefn = defn'+                          , tcdDExt     = rn_info }, fvs) } }  rnTyClDecl (ClassDecl { tcdCtxt = context, tcdLName = lcls,                         tcdTyVars = tyvars, tcdFixity = fixity,@@ -1570,7 +1548,7 @@          -- Check the signatures         -- First process the class op sigs (op_sigs), then the fixity sigs (non_op_sigs).-        ; let sig_rdr_names_w_locs = [op | L _ (ClassOpSig False ops _) <- sigs+        ; let sig_rdr_names_w_locs = [op |L _ (ClassOpSig _ False ops _) <- sigs                                          , op <- ops]         ; checkDupRdrNames sig_rdr_names_w_locs                 -- Typechecker is responsible for checking that we only@@ -1600,11 +1578,13 @@                               tcdTyVars = tyvars', tcdFixity = fixity,                               tcdFDs = fds', tcdSigs = sigs',                               tcdMeths = mbinds', tcdATs = ats', tcdATDefs = at_defs',-                              tcdDocs = docs', tcdFVs = all_fvs },+                              tcdDocs = docs', tcdCExt = all_fvs },                   all_fvs ) }   where     cls_doc  = ClassDeclCtx lcls +rnTyClDecl (XTyClDecl _) = panic "rnTyClDecl"+ -- "type" and "type instance" declarations rnTySyn :: HsDocContext -> LHsType GhcPs -> RnM (LHsType GhcRn, FreeVars) rnTySyn doc rhs = rnLHsType doc rhs@@ -1635,7 +1615,8 @@          ; let all_fvs = fvs1 `plusFV` fvs3 `plusFV`                         con_fvs `plusFV` sig_fvs-        ; return ( HsDataDefn { dd_ND = new_or_data, dd_cType = cType+        ; return ( HsDataDefn { dd_ext = noExt+                              , dd_ND = new_or_data, dd_cType = cType                               , dd_ctxt = context', dd_kindSig = m_sig'                               , dd_cons = condecls'                               , dd_derivs = derivs' }@@ -1650,31 +1631,149 @@       = do { deriv_strats_ok <- xoptM LangExt.DerivingStrategies            ; failIfTc (lengthExceeds ds 1 && not deriv_strats_ok)                multipleDerivClausesErr-           ; (ds', fvs) <- mapFvRn (rnLHsDerivingClause deriv_strats_ok doc) ds+           ; (ds', fvs) <- mapFvRn (rnLHsDerivingClause doc) ds            ; return (L loc ds', fvs) }+rnDataDefn _ (XHsDataDefn _) = panic "rnDataDefn" -rnLHsDerivingClause :: Bool -> HsDocContext -> LHsDerivingClause GhcPs+rnLHsDerivingClause :: HsDocContext -> LHsDerivingClause GhcPs                     -> RnM (LHsDerivingClause GhcRn, FreeVars)-rnLHsDerivingClause deriv_strats_ok doc-                (L loc (HsDerivingClause { deriv_clause_strategy = dcs+rnLHsDerivingClause doc+                (L loc (HsDerivingClause { deriv_clause_ext = noExt+                                         , deriv_clause_strategy = dcs                                          , deriv_clause_tys = L loc' dct }))-  = do { failIfTc (isJust dcs && not deriv_strats_ok) $-           illegalDerivStrategyErr $ fmap unLoc dcs-       ; (dct', fvs) <- mapFvRn (rnHsSigType doc) dct-       ; return ( L loc (HsDerivingClause { deriv_clause_strategy = dcs-                                          , deriv_clause_tys = L loc' dct' })-                , fvs ) }+  = do { (dcs', dct', fvs)+           <- rnLDerivStrategy doc dcs $ \strat_tvs ppr_via_ty ->+              mapFvRn (rn_deriv_ty strat_tvs ppr_via_ty) dct+       ; pure ( L loc (HsDerivingClause { deriv_clause_ext = noExt+                                        , deriv_clause_strategy = dcs'+                                        , deriv_clause_tys = L 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 = L loc _}) =+      rnAndReportFloatingViaTvs strat_tvs loc ppr_via_ty "class" $+      rnHsSigType doc deriv_ty+    rn_deriv_ty _ _ (XHsImplicitBndrs _) = panic "rn_deriv_ty"+rnLHsDerivingClause _ (L _ (XHsDerivingClause _))+  = panic "rnLHsDerivingClause" +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 (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)+  where+    rn_deriv_strat :: LDerivStrategy GhcPs+                   -> RnM (LDerivStrategy GhcRn, a, FreeVars)+    rn_deriv_strat (L loc ds) = do+      let extNeeded :: LangExt.Extension+          extNeeded+            | ViaStrategy{} <- ds+            = LangExt.DerivingVia+            | otherwise+            = LangExt.DerivingStrategies++      unlessXOptM extNeeded $+        failWith $ illegalDerivStrategyErr ds++      case ds of+        StockStrategy    -> boring_case (L loc StockStrategy)+        AnyclassStrategy -> boring_case (L loc AnyclassStrategy)+        NewtypeStrategy  -> boring_case (L loc NewtypeStrategy)+        ViaStrategy via_ty ->+          do (via_ty', fvs1) <- rnHsSigType doc via_ty+             let HsIB { hsib_ext  = HsIBRn { hsib_vars = 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_tvs = via_imp_tvs ++ via_exp_tvs+             (thing, fvs2) <- extendTyVarEnvFVRn via_tvs $+                              thing_inside via_tvs (ppr via_ty')+             pure (L 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".++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.+-}+ badGadtStupidTheta :: HsDocContext -> SDoc badGadtStupidTheta _   = vcat [text "No context is allowed on a GADT-style data declaration",           text "(You can put a context on each constructor, though.)"] -illegalDerivStrategyErr :: Maybe DerivStrategy -> SDoc+illegalDerivStrategyErr :: DerivStrategy GhcPs -> SDoc illegalDerivStrategyErr ds-  = vcat [ text "Illegal deriving strategy" <> colon <+> maybe empty ppr ds-         , text "Use DerivingStrategies to enable this extension" ]+  = vcat [ text "Illegal deriving strategy" <> colon <+> derivStrategyName ds+         , text enableStrategy ] +  where+    enableStrategy :: String+    enableStrategy+      | ViaStrategy{} <- ds+      = "Use DerivingVia to enable this extension"+      | otherwise+      = "Use DerivingStrategies to enable this extension"+ multipleDerivClausesErr :: SDoc multipleDerivClausesErr   = vcat [ text "Illegal use of multiple, consecutive deriving clauses"@@ -1699,7 +1798,8 @@                                           injectivity                ; return ( (tyvars', res_sig', injectivity') , fv_kind ) }        ; (info', fv2) <- rn_info info-       ; return (FamilyDecl { fdLName = tycon', fdTyVars = tyvars'+       ; return (FamilyDecl { fdExt = noExt+                            , fdLName = tycon', fdTyVars = tyvars'                             , fdFixity = fixity                             , fdInfo = info', fdResultSig = res_sig'                             , fdInjectivityAnn = injectivity' }@@ -1716,16 +1816,17 @@        = return (ClosedTypeFamily Nothing, emptyFVs)      rn_info OpenTypeFamily = return (OpenTypeFamily, emptyFVs)      rn_info DataFamily     = return (DataFamily, emptyFVs)+rnFamDecl _ (XFamilyDecl _) = panic "rnFamDecl"  rnFamResultSig :: HsDocContext                -> FamilyResultSig GhcPs                -> RnM (FamilyResultSig GhcRn, FreeVars)-rnFamResultSig _ NoSig-   = return (NoSig, emptyFVs)-rnFamResultSig doc (KindSig kind)+rnFamResultSig _ (NoSig _)+   = return (NoSig noExt, emptyFVs)+rnFamResultSig doc (KindSig _ kind)    = do { (rndKind, ftvs) <- rnLHsKind doc kind-        ;  return (KindSig rndKind, ftvs) }-rnFamResultSig doc (TyVarSig tvbndr)+        ;  return (KindSig noExt 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           -- be sure that the supplied result name is not identical to an@@ -1746,7 +1847,8 @@        ; bindLHsTyVarBndr doc Nothing -- This might be a lie, but it's used for                                       -- scoping checks that are irrelevant here                           tvbndr $ \ tvbndr' ->-         return (TyVarSig tvbndr', unitFV (hsLTyVarName tvbndr')) }+         return (TyVarSig noExt tvbndr', unitFV (hsLTyVarName tvbndr')) }+rnFamResultSig _ (XFamilyResultSig _) = panic "rnFamResultSig"  -- Note [Renaming injectivity annotation] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1787,7 +1889,7 @@                  -> LFamilyResultSig GhcRn     -- ^ Result signature                  -> LInjectivityAnn GhcPs      -- ^ Injectivity annotation                  -> RnM (LInjectivityAnn GhcRn)-rnInjectivityAnn tvBndrs (L _ (TyVarSig resTv))+rnInjectivityAnn tvBndrs (L _ (TyVarSig _ resTv))                  (L srcSpan (InjectivityAnn injFrom injTo))  = do    { (injDecl'@(L _ (InjectivityAnn injFrom' injTo')), noRnErrors)@@ -1872,53 +1974,102 @@ rnConDecls = mapFvRn (wrapLocFstM rnConDecl)  rnConDecl :: ConDecl GhcPs -> RnM (ConDecl GhcRn, FreeVars)-rnConDecl decl@(ConDeclH98 { con_name = name, con_qvars = qtvs-                           , con_cxt = mcxt, con_details = details+rnConDecl decl@(ConDeclH98 { con_name = name, con_ex_tvs = ex_tvs+                           , con_mb_cxt = mcxt, con_args = args                            , con_doc = mb_doc })-  = do  { _ <- addLocM checkConName name-        ; new_name     <- lookupLocatedTopBndrRn name-        ; mb_doc'      <- rnMbLHsDoc mb_doc+  = do  { _        <- addLocM checkConName name+        ; new_name <- lookupLocatedTopBndrRn name+        ; mb_doc'  <- rnMbLHsDoc mb_doc -        ; let doc      = ConDeclCtx [new_name]-              qtvs'    = qtvs `orElse` mkHsQTvs []-              body_kvs = []  -- Consider   data T a = forall (b::k). MkT (...)-                             -- The 'k' will already be in scope from the-                             -- bindHsQTyVars for the entire DataDecl-                             -- So there can be no new body_kvs here-        ; bindHsQTyVars doc (Just $ inHsDocContext doc) Nothing body_kvs qtvs' $-          \new_tyvars _ -> do-        { (new_context, fvs1) <- case mcxt of-                             Nothing   -> return (Nothing,emptyFVs)-                             Just lcxt -> do { (lctx',fvs) <- rnContext doc lcxt-                                             ; return (Just lctx',fvs) }-        ; (new_details, fvs2) <- rnConDeclDetails (unLoc new_name) doc details-        ; let (new_details',fvs3) = (new_details,emptyFVs)+        -- We bind no implicit binders here; this is just like+        -- a nested HsForAllTy.  E.g. consider+        --         data T a = forall (b::k). MkT (...)+        -- The 'k' will already be in scope from the bindHsQTyVars+        -- for the data decl itself. So we'll get+        --         data T {k} a = ...+        -- And indeed we may later discover (a::k).  But that's the+        -- scoping we get.  So no implicit binders at the existential forall++        ; let ctxt = ConDeclCtx [new_name]+        ; bindLHsTyVarBndrs ctxt (Just (inHsDocContext ctxt))+                            Nothing ex_tvs $ \ new_ex_tvs ->+    do  { (new_context, fvs1) <- rnMbContext ctxt mcxt+        ; (new_args,    fvs2) <- rnConDeclDetails (unLoc new_name) ctxt args+        ; let all_fvs  = fvs1 `plusFV` fvs2         ; traceRn "rnConDecl" (ppr name <+> vcat-             [ text "qtvs:" <+> ppr qtvs-             , text "qtvs':" <+> ppr qtvs' ])-        ; let all_fvs = fvs1 `plusFV` fvs2 `plusFV` fvs3-              new_tyvars' = case qtvs of-                Nothing -> Nothing-                Just _ -> Just new_tyvars-        ; return (decl { con_name = new_name, con_qvars = new_tyvars'-                       , con_cxt = new_context, con_details = new_details'+             [ text "ex_tvs:" <+> ppr ex_tvs+             , text "new_ex_dqtvs':" <+> ppr new_ex_tvs ])++        ; return (decl { con_ext = noExt+                       , con_name = new_name, con_ex_tvs = new_ex_tvs+                       , con_mb_cxt = new_context, con_args = new_args                        , con_doc = mb_doc' },                   all_fvs) }} -rnConDecl decl@(ConDeclGADT { con_names = names, con_type = ty+rnConDecl decl@(ConDeclGADT { con_names   = names+                            , con_forall  = L _ explicit_forall+                            , con_qvars   = qtvs+                            , con_mb_cxt  = mcxt+                            , con_args    = args+                            , con_res_ty  = res_ty                             , con_doc = mb_doc })   = do  { mapM_ (addLocM checkConName) names-        ; new_names    <- mapM lookupLocatedTopBndrRn names-        ; let doc = ConDeclCtx new_names-        ; mb_doc'      <- rnMbLHsDoc mb_doc+        ; new_names <- mapM lookupLocatedTopBndrRn names+        ; mb_doc'   <- rnMbLHsDoc mb_doc -        ; (ty', fvs) <- rnHsSigType doc ty-        ; traceRn "rnConDecl" (ppr names <+> vcat-             [ text "fvs:" <+> ppr fvs ])-        ; return (decl { con_names = new_names, con_type = ty'+        ; let explicit_tkvs = hsQTvExplicit qtvs+              theta         = hsConDeclTheta mcxt+              arg_tys       = hsConDeclArgTys args++          -- We must ensure that we extract the free tkvs in left-to-right+          -- 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.+        ; free_tkvs <- extractHsTysRdrTyVarsDups (theta ++ arg_tys ++ [res_ty])+        ; free_tkvs <- extractHsTvBndrs explicit_tkvs free_tkvs++        ; let ctxt    = ConDeclCtx new_names+              mb_ctxt = Just (inHsDocContext ctxt)++        ; traceRn "rnConDecl" (ppr names $$ ppr free_tkvs $$ ppr explicit_forall )+        ; rnImplicitBndrs (not explicit_forall) free_tkvs $ \ implicit_tkvs ->+          bindLHsTyVarBndrs ctxt mb_ctxt Nothing explicit_tkvs $ \ explicit_tkvs ->+    do  { (new_cxt, fvs1)    <- rnMbContext ctxt mcxt+        ; (new_args, fvs2)   <- rnConDeclDetails (unLoc (head new_names)) ctxt args+        ; (new_res_ty, fvs3) <- rnLHsType ctxt res_ty++        ; let all_fvs = fvs1 `plusFV` fvs2 `plusFV` fvs3+              (args', res_ty')+                  = case args of+                      InfixCon {}  -> pprPanic "rnConDecl" (ppr names)+                      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+                                      (PrefixCon arg_tys, final_res_ty)++              new_qtvs =  HsQTvs { hsq_ext = HsQTvsRn+                                     { hsq_implicit  = implicit_tkvs+                                     , hsq_dependent = emptyNameSet }+                                 , hsq_explicit  = explicit_tkvs }++        ; traceRn "rnConDecl2" (ppr names $$ ppr implicit_tkvs $$ ppr explicit_tkvs)+        ; return (decl { con_g_ext = noExt, 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' },-                  fvs) }+                  all_fvs) } } +rnConDecl (XConDecl _) = panic "rnConDecl"+++rnMbContext :: HsDocContext -> Maybe (LHsContext GhcPs)+            -> RnM (Maybe (LHsContext GhcRn), FreeVars)+rnMbContext _    Nothing    = return (Nothing, emptyFVs)+rnMbContext doc (Just cxt) = do { (ctx',fvs) <- rnContext doc cxt+                                ; return (Just ctx',fvs) }+ rnConDeclDetails    :: Name    -> HsDocContext@@ -1959,24 +2110,24 @@    ; setEnvs (final_gbl_env, lcl_env) (thing pat_syn_bndrs) }   where     new_ps :: HsValBinds GhcPs -> TcM [(Name, [FieldLabel])]-    new_ps (ValBindsIn binds _) = foldrBagM new_ps' [] binds+    new_ps (ValBinds _ binds _) = foldrBagM new_ps' [] binds     new_ps _ = panic "new_ps"      new_ps' :: LHsBindLR GhcPs GhcPs             -> [(Name, [FieldLabel])]             -> TcM [(Name, [FieldLabel])]     new_ps' bind names-      | L bind_loc (PatSynBind (PSB { psb_id = L _ n-                                    , psb_args = RecCon as })) <- bind+      | L bind_loc (PatSynBind _ (PSB { psb_id = L _ n+                                      , psb_args = RecCon as })) <- bind       = do           bnd_name <- newTopSrcBinder (L bind_loc n)           let rnames = map recordPatSynSelectorId as               mkFieldOcc :: Located RdrName -> LFieldOcc GhcPs-              mkFieldOcc (L l name) = L l (FieldOcc (L l name) PlaceHolder)+              mkFieldOcc (L l name) = L l (FieldOcc noExt (L l name))               field_occs =  map mkFieldOcc rnames           flds     <- mapM (newRecordSelector False [bnd_name]) field_occs           return ((bnd_name, flds): names)-      | L bind_loc (PatSynBind (PSB { psb_id = L _ n})) <- bind+      | L bind_loc (PatSynBind _ (PSB { psb_id = L _ n})) <- bind       = do         bnd_name <- newTopSrcBinder (L bind_loc n)         return ((bnd_name, []): names)@@ -2038,12 +2189,12 @@  -- #10047: Declaration QuasiQuoters are expanded immediately, without --         causing a group split-add gp _ (SpliceD (SpliceDecl (L _ qq@HsQuasiQuote{}) _)) ds+add gp _ (SpliceD _ (SpliceDecl _ (L _ qq@HsQuasiQuote{}) _)) ds   = do { (ds', _) <- rnTopSpliceDecls qq        ; addl gp (ds' ++ ds)        } -add gp loc (SpliceD splice@(SpliceDecl _ flag)) ds+add gp loc (SpliceD _ splice@(SpliceDecl _ _ flag)) ds   = do { -- We've found a top-level splice.  If it is an *implicit* one          -- (i.e. a naked top level expression)          case flag of@@ -2058,82 +2209,92 @@                      $$ text "or top-level declaration expected."  -- Class declarations: pull out the fixity signatures to the top-add gp@(HsGroup {hs_tyclds = ts, hs_fixds = fs}) l (TyClD d) ds+add gp@(HsGroup {hs_tyclds = ts, hs_fixds = fs}) l (TyClD _ d) ds   | isClassDecl d-  = let fsigs = [ L l f | L l (FixSig f) <- tcdSigs d ] in+  = let fsigs = [ L l f | L l (FixSig _ f) <- tcdSigs d ] in     addl (gp { hs_tyclds = add_tycld (L l d) ts, hs_fixds = fsigs ++ fs}) ds   | otherwise   = addl (gp { hs_tyclds = add_tycld (L l d) ts }) ds  -- Signatures: fixity sigs go a different place than all others-add gp@(HsGroup {hs_fixds = ts}) l (SigD (FixSig f)) ds+add gp@(HsGroup {hs_fixds = ts}) l (SigD _ (FixSig _ f)) ds   = addl (gp {hs_fixds = L l f : ts}) ds-add gp@(HsGroup {hs_valds = ts}) l (SigD d) ds+add gp@(HsGroup {hs_valds = ts}) l (SigD _ d) ds   = addl (gp {hs_valds = add_sig (L l d) ts}) ds  -- Value declarations: use add_bind-add gp@(HsGroup {hs_valds  = ts}) l (ValD d) ds+add gp@(HsGroup {hs_valds  = ts}) l (ValD _ d) ds   = addl (gp { hs_valds = add_bind (L l d) ts }) ds  -- Role annotations: added to the TyClGroup-add gp@(HsGroup {hs_tyclds = ts}) l (RoleAnnotD d) ds+add gp@(HsGroup {hs_tyclds = ts}) l (RoleAnnotD _ d) ds   = addl (gp { hs_tyclds = add_role_annot (L l d) ts }) ds  -- NB instance declarations go into TyClGroups. We throw them into the first -- group, just as we do for the TyClD case. The renamer will go on to group -- and order them later.-add gp@(HsGroup {hs_tyclds = ts})  l (InstD d) ds+add gp@(HsGroup {hs_tyclds = ts})  l (InstD _ d) ds   = addl (gp { hs_tyclds = add_instd (L l d) ts }) ds  -- The rest are routine-add gp@(HsGroup {hs_derivds = ts})  l (DerivD d) ds+add gp@(HsGroup {hs_derivds = ts})  l (DerivD _ d) ds   = addl (gp { hs_derivds = L l d : ts }) ds-add gp@(HsGroup {hs_defds  = ts})  l (DefD d) ds+add gp@(HsGroup {hs_defds  = ts})  l (DefD _ d) ds   = addl (gp { hs_defds = L l d : ts }) ds-add gp@(HsGroup {hs_fords  = ts}) l (ForD d) ds+add gp@(HsGroup {hs_fords  = ts}) l (ForD _ d) ds   = addl (gp { hs_fords = L l d : ts }) ds-add gp@(HsGroup {hs_warnds  = ts})  l (WarningD d) ds+add gp@(HsGroup {hs_warnds  = ts})  l (WarningD _ d) ds   = addl (gp { hs_warnds = L l d : ts }) ds-add gp@(HsGroup {hs_annds  = ts}) l (AnnD d) ds+add gp@(HsGroup {hs_annds  = ts}) l (AnnD _ d) ds   = addl (gp { hs_annds = L l d : ts }) ds-add gp@(HsGroup {hs_ruleds  = ts}) l (RuleD d) ds+add gp@(HsGroup {hs_ruleds  = ts}) l (RuleD _ d) ds   = addl (gp { hs_ruleds = L l d : ts }) ds-add gp@(HsGroup {hs_vects  = ts}) l (VectD d) ds-  = addl (gp { hs_vects = L l d : ts }) ds-add gp l (DocD d) ds+add gp l (DocD _ d) ds   = addl (gp { hs_docs = (L 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_tycld :: LTyClDecl a -> [TyClGroup a] -> [TyClGroup a]-add_tycld d []       = [TyClGroup { group_tyclds = [d]-                                  , group_roles = []+add_tycld :: LTyClDecl (GhcPass p) -> [TyClGroup (GhcPass p)]+          -> [TyClGroup (GhcPass p)]+add_tycld d []       = [TyClGroup { group_ext    = noExt+                                  , group_tyclds = [d]+                                  , 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_instd :: LInstDecl a -> [TyClGroup a] -> [TyClGroup a]-add_instd d []       = [TyClGroup { group_tyclds = []-                                  , group_roles = []+add_instd :: LInstDecl (GhcPass p) -> [TyClGroup (GhcPass p)]+          -> [TyClGroup (GhcPass p)]+add_instd d []       = [TyClGroup { group_ext    = noExt+                                  , group_tyclds = []+                                  , 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_role_annot :: LRoleAnnotDecl a -> [TyClGroup a] -> [TyClGroup a]-add_role_annot d [] = [TyClGroup { group_tyclds = []-                                 , group_roles = [d]+add_role_annot :: LRoleAnnotDecl (GhcPass p) -> [TyClGroup (GhcPass p)]+               -> [TyClGroup (GhcPass p)]+add_role_annot d [] = [TyClGroup { group_ext    = noExt+                                 , group_tyclds = []+                                 , 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_bind :: LHsBind a -> HsValBinds a -> HsValBinds a-add_bind b (ValBindsIn bs sigs) = ValBindsIn (bs `snocBag` b) sigs-add_bind _ (ValBindsOut {})     = panic "RdrHsSyn:add_bind"+add_bind b (ValBinds x bs sigs) = ValBinds x (bs `snocBag` b) sigs+add_bind _ (XValBindsLR {})     = panic "RdrHsSyn:add_bind" -add_sig :: LSig a -> HsValBinds a -> HsValBinds a-add_sig s (ValBindsIn bs sigs) = ValBindsIn bs (s:sigs)-add_sig _ (ValBindsOut {})     = panic "RdrHsSyn:add_sig"+add_sig :: LSig (GhcPass a) -> HsValBinds (GhcPass a) -> HsValBinds (GhcPass a)+add_sig s (ValBinds x bs sigs) = ValBinds x bs (s:sigs)+add_sig _ (XValBindsLR {})     = panic "RdrHsSyn:add_sig"
rename/RnSplice.hs view
@@ -18,7 +18,6 @@ import HsSyn import RdrName import TcRnMonad-import Kind  import RnEnv import RnUtils          ( HsDocContext(..), newLocalBndrRn )@@ -103,7 +102,7 @@                         ; (body', fvs_e) <-                           setStage (Brack cur_stage RnPendingTyped) $                                    rn_bracket cur_stage br_body-                        ; return (HsBracket body', fvs_e) }+                        ; return (HsBracket noExt body', fvs_e) }              False -> do { traceRn "Renaming untyped TH bracket" empty                         ; ps_var <- newMutVar []@@ -111,11 +110,11 @@                           setStage (Brack cur_stage (RnPendingUntyped ps_var)) $                                    rn_bracket cur_stage br_body                         ; pendings <- readMutVar ps_var-                        ; return (HsRnBracketOut body' pendings, fvs_e) }+                        ; return (HsRnBracketOut noExt body' pendings, fvs_e) }        }  rn_bracket :: ThStage -> HsBracket GhcPs -> RnM (HsBracket GhcRn, FreeVars)-rn_bracket outer_stage br@(VarBr flg rdr_name)+rn_bracket outer_stage br@(VarBr x flg rdr_name)   = do { name <- lookupOccRn rdr_name        ; this_mod <- getModule @@ -137,17 +136,18 @@                                              (quotedNameStageErr br) }                         }                     }-       ; return (VarBr flg name, unitFV name) }+       ; return (VarBr x flg name, unitFV name) } -rn_bracket _ (ExpBr e) = do { (e', fvs) <- rnLExpr e-                            ; return (ExpBr e', fvs) }+rn_bracket _ (ExpBr x e) = do { (e', fvs) <- rnLExpr e+                            ; return (ExpBr x e', fvs) } -rn_bracket _ (PatBr p) = rnPat ThPatQuote p $ \ p' -> return (PatBr p', emptyFVs)+rn_bracket _ (PatBr x p)+  = rnPat ThPatQuote p $ \ p' -> return (PatBr x p', emptyFVs) -rn_bracket _ (TypBr t) = do { (t', fvs) <- rnLHsType TypBrCtx t-                            ; return (TypBr t', fvs) }+rn_bracket _ (TypBr x t) = do { (t', fvs) <- rnLHsType TypBrCtx t+                              ; return (TypBr x t', fvs) } -rn_bracket _ (DecBrL decls)+rn_bracket _ (DecBrL x decls)   = do { group <- groupDecls decls        ; gbl_env  <- getGblEnv        ; let new_gbl_env = gbl_env { tcg_dus = emptyDUs }@@ -159,7 +159,7 @@               -- Discard the tcg_env; it contains only extra info about fixity         ; traceRn "rn_bracket dec" (ppr (tcg_dus tcg_env) $$                    ppr (duUses (tcg_dus tcg_env)))-        ; return (DecBrG group', duUses (tcg_dus tcg_env)) }+        ; return (DecBrG x group', duUses (tcg_dus tcg_env)) }   where     groupDecls :: [LHsDecl GhcPs] -> RnM (HsGroup GhcPs)     groupDecls decls@@ -173,11 +173,13 @@                   }            }} -rn_bracket _ (DecBrG _) = panic "rn_bracket: unexpected DecBrG"+rn_bracket _ (DecBrG {}) = panic "rn_bracket: unexpected DecBrG" -rn_bracket _ (TExpBr e) = do { (e', fvs) <- rnLExpr e-                             ; return (TExpBr e', fvs) }+rn_bracket _ (TExpBr x e) = do { (e', fvs) <- rnLExpr e+                               ; return (TExpBr x e', fvs) } +rn_bracket _ (XBracket {}) = panic "rn_bracket: unexpected XBracket"+ quotationCtxtDoc :: HsBracket GhcPs -> SDoc quotationCtxtDoc br_body   = hang (text "In the Template Haskell quotation")@@ -294,10 +296,11 @@   = do { splice' <- getHooked runRnSpliceHook return >>= ($ splice)         ; let the_expr = case splice' of-                  HsUntypedSplice _ _ e   ->  e-                  HsQuasiQuote _ q qs str -> mkQuasiQuoteExpr flavour q qs str-                  HsTypedSplice {}        -> pprPanic "runRnSplice" (ppr splice)-                  HsSpliced {}            -> pprPanic "runRnSplice" (ppr splice)+                HsUntypedSplice _ _ _ e   ->  e+                HsQuasiQuote _ _ q qs str -> mkQuasiQuoteExpr flavour q qs str+                HsTypedSplice {}          -> pprPanic "runRnSplice" (ppr splice)+                HsSpliced {}              -> pprPanic "runRnSplice" (ppr splice)+                XSplice {}                -> pprPanic "runRnSplice" (ppr splice)               -- Typecheck the expression        ; meta_exp_ty   <- tcMetaTy meta_ty_name@@ -335,14 +338,16 @@ makePending :: UntypedSpliceFlavour             -> HsSplice GhcRn             -> PendingRnSplice-makePending flavour (HsUntypedSplice _ n e)+makePending flavour (HsUntypedSplice _ _ n e)   = PendingRnSplice flavour n e-makePending flavour (HsQuasiQuote n quoter q_span quote)+makePending flavour (HsQuasiQuote _ n quoter q_span quote)   = PendingRnSplice flavour n (mkQuasiQuoteExpr flavour quoter q_span quote) makePending _ splice@(HsTypedSplice {})   = pprPanic "makePending" (ppr splice) makePending _ splice@(HsSpliced {})   = pprPanic "makePending" (ppr splice)+makePending _ splice@(XSplice {})+  = pprPanic "makePending" (ppr splice)  ------------------ mkQuasiQuoteExpr :: UntypedSpliceFlavour -> Name -> SrcSpan -> FastString@@ -350,13 +355,13 @@ -- Return the expression (quoter "...quote...") -- which is what we must run in a quasi-quote mkQuasiQuoteExpr flavour quoter q_span quote-  = L q_span $ HsApp (L q_span $-                      HsApp (L q_span (HsVar (L q_span quote_selector)))+  = L q_span $ HsApp noExt (L q_span $+                  HsApp noExt (L q_span (HsVar noExt (L q_span quote_selector)))                             quoterExpr)                      quoteExpr   where-    quoterExpr = L q_span $! HsVar $! (L q_span quoter)-    quoteExpr  = L q_span $! HsLit $! HsString NoSourceText quote+    quoterExpr = L q_span $! HsVar noExt $! (L q_span quoter)+    quoteExpr  = L q_span $! HsLit noExt $! HsString NoSourceText quote     quote_selector = case flavour of                        UntypedExpSplice  -> quoteExpName                        UntypedPatSplice  -> quotePatName@@ -366,21 +371,21 @@ --------------------- rnSplice :: HsSplice GhcPs -> RnM (HsSplice GhcRn, FreeVars) -- Not exported...used for all-rnSplice (HsTypedSplice hasParen splice_name expr)+rnSplice (HsTypedSplice x hasParen splice_name expr)   = do  { checkTH expr "Template Haskell typed splice"         ; loc  <- getSrcSpanM         ; n' <- newLocalBndrRn (L loc splice_name)         ; (expr', fvs) <- rnLExpr expr-        ; return (HsTypedSplice hasParen n' expr', fvs) }+        ; return (HsTypedSplice x hasParen n' expr', fvs) } -rnSplice (HsUntypedSplice hasParen splice_name expr)+rnSplice (HsUntypedSplice x hasParen splice_name expr)   = do  { checkTH expr "Template Haskell untyped splice"         ; loc  <- getSrcSpanM         ; n' <- newLocalBndrRn (L loc splice_name)         ; (expr', fvs) <- rnLExpr expr-        ; return (HsUntypedSplice hasParen n' expr', fvs) }+        ; return (HsUntypedSplice x hasParen n' expr', fvs) } -rnSplice (HsQuasiQuote splice_name quoter q_loc quote)+rnSplice (HsQuasiQuote x splice_name quoter q_loc quote)   = do  { checkTH quoter "Template Haskell quasi-quote"         ; loc  <- getSrcSpanM         ; splice_name' <- newLocalBndrRn (L loc splice_name)@@ -391,9 +396,11 @@         ; when (nameIsLocalOrFrom this_mod quoter') $           checkThLocalName quoter' -        ; return (HsQuasiQuote splice_name' quoter' q_loc quote, unitFV quoter') }+        ; return (HsQuasiQuote x splice_name' quoter' q_loc quote+                                                             , unitFV quoter') }  rnSplice splice@(HsSpliced {}) = pprPanic "rnSplice" (ppr splice)+rnSplice splice@(XSplice {})   = pprPanic "rnSplice" (ppr splice)  --------------------- rnSpliceExpr :: HsSplice GhcPs -> RnM (HsExpr GhcRn, FreeVars)@@ -402,7 +409,7 @@   where     pend_expr_splice :: HsSplice GhcRn -> (PendingRnSplice, HsExpr GhcRn)     pend_expr_splice rn_splice-        = (makePending UntypedExpSplice rn_splice, HsSpliceE rn_splice)+        = (makePending UntypedExpSplice rn_splice, HsSpliceE noExt rn_splice)      run_expr_splice :: HsSplice GhcRn -> RnM (HsExpr GhcRn, FreeVars)     run_expr_splice rn_splice@@ -415,7 +422,7 @@                                                      , isLocalGRE gre]                  lcl_names = mkNameSet (localRdrEnvElts lcl_rdr) -           ; return (HsSpliceE rn_splice, lcl_names `plusFV` gbl_names) }+           ; return (HsSpliceE noExt 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@@ -423,8 +430,8 @@                 runRnSplice UntypedExpSplice runMetaE ppr rn_splice            ; (lexpr3, fvs) <- checkNoErrs (rnLExpr rn_expr)              -- See Note [Delaying modFinalizers in untyped splices].-           ; return ( HsPar $ HsSpliceE-                            . HsSpliced (ThModFinalizers mod_finalizers)+           ; return ( HsPar noExt $ HsSpliceE noExt+                            . HsSpliced noExt (ThModFinalizers mod_finalizers)                             . HsSplicedExpr <$>                             lexpr3                     , fvs)@@ -521,13 +528,13 @@ -}  -----------------------rnSpliceType :: HsSplice GhcPs -> PostTc GhcRn Kind-             -> RnM (HsType GhcRn, FreeVars)-rnSpliceType splice k+rnSpliceType :: HsSplice GhcPs -> RnM (HsType GhcRn, FreeVars)+rnSpliceType splice   = rnSpliceGen run_type_splice pend_type_splice splice   where     pend_type_splice rn_splice-       = (makePending UntypedTypeSplice rn_splice, HsSpliceTy rn_splice k)+       = ( makePending UntypedTypeSplice rn_splice+         , HsSpliceTy noExt rn_splice)      run_type_splice rn_splice       = do { traceRn "rnSpliceType: untyped type splice" empty@@ -537,8 +544,8 @@                                  ; checkNoErrs $ rnLHsType doc hs_ty2 }                                     -- checkNoErrs: see Note [Renamer errors]              -- See Note [Delaying modFinalizers in untyped splices].-           ; return ( HsParTy $ flip HsSpliceTy k-                              . HsSpliced (ThModFinalizers mod_finalizers)+           ; return ( HsParTy noExt $ HsSpliceTy noExt+                              . HsSpliced noExt (ThModFinalizers mod_finalizers)                               . HsSplicedTy <$>                               hs_ty3                     , fvs@@ -594,17 +601,18 @@   = rnSpliceGen run_pat_splice pend_pat_splice splice   where     pend_pat_splice rn_splice-      = (makePending UntypedPatSplice rn_splice, Right (SplicePat rn_splice))+      = (makePending UntypedPatSplice rn_splice+        , Right (SplicePat noExt rn_splice))      run_pat_splice rn_splice       = do { traceRn "rnSplicePat: untyped pattern splice" empty            ; (pat, mod_finalizers) <-                 runRnSplice UntypedPatSplice runMetaP ppr rn_splice              -- See Note [Delaying modFinalizers in untyped splices].-           ; return ( Left $ ParPat $ SplicePat-                                    . HsSpliced (ThModFinalizers mod_finalizers)-                                    . HsSplicedPat <$>-                                    pat+           ; return ( Left $ ParPat noExt $ (SplicePat noExt)+                              . HsSpliced noExt (ThModFinalizers mod_finalizers)+                              . HsSplicedPat <$>+                              pat                     , emptyFVs                     ) }               -- Wrap the result of the quasi-quoter in parens so that we don't@@ -612,13 +620,15 @@  ---------------------- rnSpliceDecl :: SpliceDecl GhcPs -> RnM (SpliceDecl GhcRn, FreeVars)-rnSpliceDecl (SpliceDecl (L loc splice) flg)+rnSpliceDecl (SpliceDecl _ (L loc splice) flg)   = rnSpliceGen run_decl_splice pend_decl_splice splice   where     pend_decl_splice rn_splice-       = (makePending UntypedDeclSplice rn_splice, SpliceDecl (L loc rn_splice) flg)+       = ( makePending UntypedDeclSplice rn_splice+         , SpliceDecl noExt (L loc rn_splice) flg)      run_decl_splice rn_splice = pprPanic "rnSpliceDecl" (ppr rn_splice)+rnSpliceDecl (XSpliceDecl _) = panic "rnSpliceDecl"  rnTopSpliceDecls :: HsSplice GhcPs -> RnM ([LHsDecl GhcPs], FreeVars) -- Declaration splice at the very top level of the module@@ -687,6 +697,7 @@              HsTypedSplice   {} -> text "typed splice:"              HsQuasiQuote    {} -> text "quasi-quotation:"              HsSpliced       {} -> text "spliced expression:"+             XSplice         {} -> text "spliced expression:"  -- | The splice data to be logged data SpliceInfo
rename/RnSplice.hs-boot view
@@ -4,11 +4,9 @@ import HsSyn import TcRnMonad import NameSet-import Kind  -rnSpliceType :: HsSplice GhcPs   -> PostTc GhcRn Kind-             -> RnM (HsType GhcRn, FreeVars)+rnSpliceType :: HsSplice GhcPs   -> RnM (HsType GhcRn, FreeVars) rnSplicePat  :: HsSplice GhcPs   -> RnM ( Either (Pat GhcPs) (Pat GhcRn)                                           , FreeVars ) rnSpliceDecl :: SpliceDecl GhcPs -> RnM (SpliceDecl GhcRn, FreeVars)
rename/RnTypes.hs view
@@ -23,13 +23,14 @@         checkPrecMatch, checkSectionPrec,          -- Binding related stuff-        bindLHsTyVarBndr,+        bindLHsTyVarBndr, bindLHsTyVarBndrs, rnImplicitBndrs,         bindSigTyVarsFV, bindHsQTyVars, bindLRdrNames,         extractFilteredRdrTyVars, extractFilteredRdrTyVarsDups,         extractHsTyRdrTyVars, extractHsTyRdrTyVarsKindVars,         extractHsTyRdrTyVarsDups, extractHsTysRdrTyVars,         extractHsTysRdrTyVarsDups, rmDupsInRdrTyVars,         extractRdrKindSigVars, extractDataDefnKindVars,+        extractHsTvBndrs,         freeKiTyVarsAllVars, freeKiTyVarsKindVars, freeKiTyVarsTypeVars,         elemRdr   ) where@@ -52,13 +53,13 @@ import RdrName import PrelNames import TysPrim          ( funTyConName )-import TysWiredIn       ( starKindTyConName, unicodeStarKindTyConName ) import Name import SrcLoc import NameSet import FieldLabel  import Util+import ListSetOps       ( deleteBys ) import BasicTypes       ( compareFixity, funTyFixity, negateFixity,                           Fixity(..), FixityDirection(..), LexicalFixity(..) ) import Outputable@@ -66,7 +67,7 @@ import Maybes import qualified GHC.LanguageExtensions as LangExt -import Data.List          ( nubBy, partition )+import Data.List          ( nubBy, partition, (\\) ) import Control.Monad      ( unless, when )  #include "HsVersions.h"@@ -85,7 +86,7 @@ rnHsSigWcType :: HsDocContext -> LHsSigWcType GhcPs             -> RnM (LHsSigWcType GhcRn, FreeVars) rnHsSigWcType doc sig_ty-  = rn_hs_sig_wc_type True doc sig_ty $ \sig_ty' ->+  = rn_hs_sig_wc_type False doc sig_ty $ \sig_ty' ->     return (sig_ty', emptyFVs)  rnHsSigWcTypeScoped :: HsDocContext -> LHsSigWcType GhcPs@@ -99,39 +100,49 @@ rnHsSigWcTypeScoped ctx sig_ty thing_inside   = do { ty_sig_okay <- xoptM LangExt.ScopedTypeVariables        ; checkErr ty_sig_okay (unexpectedTypeSigErr sig_ty)-       ; rn_hs_sig_wc_type False ctx sig_ty thing_inside+       ; rn_hs_sig_wc_type True ctx sig_ty thing_inside        }-    -- False: for pattern type sigs and rules we /do/ want-    --        to bring those type variables into scope+    -- True: for pattern type sigs and rules we /do/ want+    --       to bring those type variables into scope, even+    --       if there's a forall at the top which usually+    --       stops that happening     -- e.g  \ (x :: forall a. a-> b) -> e     -- Here we do bring 'b' into scope -rn_hs_sig_wc_type :: Bool   -- see rnImplicitBndrs+rn_hs_sig_wc_type :: Bool   -- True <=> always bind any free tyvars of the+                            --          type, regardless of whether it has+                            --          a forall at the top                   -> HsDocContext                   -> LHsSigWcType GhcPs                   -> (LHsSigWcType GhcRn -> RnM (a, FreeVars))                   -> RnM (a, FreeVars) -- rn_hs_sig_wc_type is used for source-language type signatures-rn_hs_sig_wc_type no_implicit_if_forall ctxt+rn_hs_sig_wc_type always_bind_free_tvs ctxt                   (HsWC { hswc_body = HsIB { hsib_body = hs_ty }})                   thing_inside   = do { free_vars <- extractFilteredRdrTyVarsDups hs_ty        ; (tv_rdrs, nwc_rdrs') <- partition_nwcs free_vars        ; let nwc_rdrs = nubL nwc_rdrs'-       ; rnImplicitBndrs no_implicit_if_forall ctxt hs_ty tv_rdrs $ \ vars ->+             bind_free_tvs = always_bind_free_tvs || not (isLHsForAllTy hs_ty)+       ; rnImplicitBndrs bind_free_tvs tv_rdrs $ \ vars ->     do { (wcs, hs_ty', fvs1) <- rnWcBody ctxt nwc_rdrs hs_ty-       ; let sig_ty' = HsWC { hswc_wcs = wcs, hswc_body = ib_ty' }+       ; let sig_ty' = HsWC { hswc_ext = wcs, hswc_body = ib_ty' }              ib_ty'  = mk_implicit_bndrs vars hs_ty' fvs1        ; (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"  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        ; (wcs, hs_ty', fvs) <- rnWcBody ctxt nwc_rdrs hs_ty-       ; let sig_ty' = HsWC { hswc_wcs = wcs, hswc_body = hs_ty' }+       ; let sig_ty' = HsWC { hswc_ext = wcs, hswc_body = hs_ty' }        ; return (sig_ty', fvs) }+rnHsWcType _ (XHsWildCardBndrs _) = panic "rnHsWcType"  rnWcBody :: HsDocContext -> [Located RdrName] -> LHsType GhcPs          -> RnM ([Name], LHsType GhcRn, FreeVars)@@ -156,24 +167,27 @@     rn_ty env hs_ty@(HsForAllTy { 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_bndrs = tvs', hst_body = hs_body' }, fvs) }+           ; return (HsForAllTy { hst_xforall = noExt, hst_bndrs = tvs'+                                , hst_body = hs_body' }, fvs) }      rn_ty env (HsQualTy { hst_ctxt = L cx hs_ctxt, hst_body = hs_ty })       | Just (hs_ctxt1, hs_ctxt_last) <- snocView hs_ctxt-      , L lx (HsWildCardTy wc) <- ignoreParens hs_ctxt_last+      , L lx (HsWildCardTy _)  <- ignoreParens hs_ctxt_last       = do { (hs_ctxt1', fvs1) <- mapFvRn (rn_top_constraint env) hs_ctxt1            ; wc' <- setSrcSpan lx $-                    do { checkExtraConstraintWildCard env wc-                       ; rnAnonWildCard wc }+                    do { checkExtraConstraintWildCard env hs_ctxt1+                       ; rnAnonWildCard }            ; let hs_ctxt' = hs_ctxt1' ++ [L lx (HsWildCardTy wc')]            ; (hs_ty', fvs2) <- rnLHsTyKi env hs_ty-           ; return (HsQualTy { hst_ctxt = L cx hs_ctxt', hst_body = hs_ty' }+           ; return (HsQualTy { hst_xqual = noExt+                              , hst_ctxt = L 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_ctxt = L cx hs_ctxt', hst_body = hs_ty' }+           ; return (HsQualTy { hst_xqual = noExt+                              , hst_ctxt = L cx hs_ctxt', hst_body = hs_ty' }                     , fvs1 `plusFV` fvs2) }      rn_ty env hs_ty = rnHsTyKi env hs_ty@@ -181,26 +195,45 @@     rn_top_constraint env = rnLHsTyKi (env { rtke_what = RnTopConstraint })  -checkExtraConstraintWildCard :: RnTyKiEnv -> HsWildCardInfo GhcPs-                             -> RnM ()+checkExtraConstraintWildCard :: RnTyKiEnv -> HsContext GhcPs -> RnM () -- Rename the extra-constraint spot in a type signature --    (blah, _) => type -- Check that extra-constraints are allowed at all, and -- if so that it's an anonymous wildcard-checkExtraConstraintWildCard env wc+checkExtraConstraintWildCard env hs_ctxt   = checkWildCard env mb_bad   where     mb_bad | not (extraConstraintWildCardsAllowed env)-           = Just (text "Extra-constraint wildcard" <+> quotes (ppr wc)-                   <+> text "not allowed")+           = Just base_msg+             -- Currently, we do not allow wildcards in their full glory in+             -- standalone deriving declarations. We only allow a single+             -- extra-constraints wildcard à la:+             --+             --   deriving instance _ => Eq (Foo a)+             --+             -- i.e., we don't support things like+             --+             --   deriving instance (Eq a, _) => Eq (Foo a)+           | DerivDeclCtx {} <- rtke_ctxt env+           , not (null hs_ctxt)+           = Just deriv_decl_msg            | otherwise            = Nothing +    base_msg = text "Extra-constraint wildcard" <+> quotes pprAnonWildCard+                   <+> text "not allowed"++    deriv_decl_msg+      = hang base_msg+           2 (vcat [ text "except as the sole constraint"+                   , nest 2 (text "e.g., deriving instance _ => Eq (Foo a)") ])+ extraConstraintWildCardsAllowed :: RnTyKiEnv -> Bool extraConstraintWildCardsAllowed env   = case rtke_ctxt env of       TypeSigCtx {}       -> True       ExprWithTySigCtx {} -> True+      DerivDeclCtx {}     -> True       _                   -> False  -- | Finds free type and kind variables in a type,@@ -265,32 +298,31 @@ rnHsSigType ctx (HsIB { hsib_body = hs_ty })   = do { traceRn "rnHsSigType" (ppr hs_ty)        ; vars <- extractFilteredRdrTyVarsDups hs_ty-       ; rnImplicitBndrs True ctx hs_ty vars $ \ vars ->+       ; rnImplicitBndrs (not (isLHsForAllTy hs_ty)) vars $ \ vars ->     do { (body', fvs) <- rnLHsType ctx hs_ty        ; return ( mk_implicit_bndrs vars body' fvs, fvs ) } }+rnHsSigType _ (XHsImplicitBndrs _) = panic "rnHsSigType" -rnImplicitBndrs :: Bool    -- True <=> no implicit quantification-                           --          if type is headed by a forall+rnImplicitBndrs :: Bool    -- True <=> bring into scope any free type variables                            -- E.g.  f :: forall a. a->b-                           -- Do not quantify over 'b' too.-                -> HsDocContext-                -> LHsType GhcPs   -- hs_ty: the type over which the-                                   -- implicit binders will scope+                           --  we do not want to bring 'b' into scope, hence False+                           -- But   f :: a -> b+                           --  we want to bring both 'a' and 'b' into scope                 -> FreeKiTyVarsWithDups                                    -- Free vars of hs_ty (excluding wildcards)                                    -- May have duplicates, which is                                    -- checked here                 -> ([Name] -> RnM (a, FreeVars))                 -> RnM (a, FreeVars)-rnImplicitBndrs no_implicit_if_forall doc (L loc hs_ty)+rnImplicitBndrs bind_free_tvs                 fvs_with_dups@(FKTV { fktv_kis = kvs_with_dups                                     , fktv_tys = tvs_with_dups })                 thing_inside   = do { let FKTV kvs tvs = rmDupsInRdrTyVars fvs_with_dups-             real_tvs | no_implicit_if_forall-                      , HsForAllTy {} <- hs_ty = []-                      | otherwise              = tvs-             -- Quantify over type variables only if there is no+             real_tvs | bind_free_tvs = tvs+                      | 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}@@ -300,50 +332,51 @@              -- but, rather arbitrarily, we switch off the type-quantification              -- if there is an explicit forall -       ; traceRn "rnImplicitBndrs" (vcat [ ppr hs_ty, ppr kvs, ppr tvs, ppr real_tvs ])+       ; traceRn "rnImplicitBndrs" (vcat [ ppr kvs, ppr tvs, ppr real_tvs ]) -       ; vars <- mapM (newLocalBndrRn . L loc . unLoc) (kvs ++ real_tvs)+       ; whenWOptM Opt_WarnImplicitKindVars $+         unless (bind_free_tvs || null kvs) $+         addWarnAt (Reason Opt_WarnImplicitKindVars) (getLoc (head kvs)) $+         implicit_kind_vars_msg kvs -       ; checkBadKindBndrs doc kvs+       ; loc <- getSrcSpanM+       ; vars <- mapM (newLocalBndrRn . L loc . unLoc) (kvs ++ real_tvs)         ; traceRn "checkMixedVars2" $            vcat [ text "kvs_with_dups" <+> ppr kvs_with_dups                 , text "tvs_with_dups" <+> ppr tvs_with_dups ]-       ; checkMixedVars kvs_with_dups tvs_with_dups-           -- E.g.  Either (Proxy (a :: k)) k-           -- Here 'k' is used at kind level and type level         ; 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 '.') ]  rnLHsInstType :: SDoc -> LHsSigType GhcPs -> RnM (LHsSigType GhcRn, FreeVars)--- Rename the type in an instance or standalone deriving decl--- The 'doc_str' is "an instance declaration" or "a VECTORISE pragma"-rnLHsInstType doc_str inst_ty-  | Just cls <- getLHsInstDeclClass_maybe inst_ty-  , isTcOcc (rdrNameOcc (unLoc cls))-         -- The guards check that the instance type looks like-         --   blah => C ty1 .. tyn-  = do { let full_doc = doc_str <+> text "for" <+> quotes (ppr cls)-       ; rnHsSigType (GenericCtx full_doc) inst_ty }--  | otherwise  -- The instance is malformed, but we'd still like-               -- to make progress rather than failing outright, so-               -- we report more errors.  So we rename it anyway.-  = do { addErrAt (getLoc (hsSigType inst_ty)) $-         text "Malformed instance:" <+> ppr inst_ty-       ; rnHsSigType (GenericCtx doc_str) inst_ty }+-- Rename the type in an instance.+-- The 'doc_str' is "an instance declaration".+-- Do not try to decompose the inst_ty in case it is malformed+rnLHsInstType doc inst_ty = rnHsSigType (GenericCtx doc) inst_ty  mk_implicit_bndrs :: [Name]  -- implicitly bound                   -> a           -- payload                   -> FreeVars    -- FreeVars of payload                   -> HsImplicitBndrs GhcRn a mk_implicit_bndrs vars body fvs-  = HsIB { hsib_vars = vars-         , hsib_body = body-         , hsib_closed = nameSetAll (not . isTyVarName) (vars `delFVs` fvs) }+  = HsIB { hsib_ext = HsIBRn+           { hsib_vars = vars+           , hsib_closed = nameSetAll (not . isTyVarName) (vars `delFVs` fvs) }+         , hsib_body = body }  + {- ****************************************************** *                                                       *            LHsType and HsType@@ -373,35 +406,6 @@ This situation is now considered to be an error. See rnHsTyKi for case HsForAllTy Qualified. -Note [Dealing with *]-~~~~~~~~~~~~~~~~~~~~~-As a legacy from the days when types and kinds were different, we use-the type * to mean what we now call GHC.Types.Type. The problem is that-* should associate just like an identifier, *not* a symbol.-Running example: the user has written--  T (Int, Bool) b + c * d--At this point, we have a bunch of stretches of types--  [[T, (Int, Bool), b], [c], [d]]--these are the [[LHsType Name]] and a bunch of operators--  [GHC.TypeLits.+, GHC.Types.*]--Note that the * is GHC.Types.*. So, we want to rearrange to have--  [[T, (Int, Bool), b], [c, *, d]]--and--  [GHC.TypeLits.+]--as our lists. We can then do normal fixity resolution on these. The fixities-must come along for the ride just so that the list stays in sync with the-operators.- Note [QualTy in kinds] ~~~~~~~~~~~~~~~~~~~~~~ I was wondering whether QualTy could occur only at TypeLevel.  But no,@@ -503,47 +507,56 @@ rnHsTyKi :: RnTyKiEnv -> HsType GhcPs -> RnM (HsType GhcRn, FreeVars)  rnHsTyKi env ty@(HsForAllTy { hst_bndrs = tyvars, hst_body  = tau })-  = do { checkTypeInType env ty+  = do { checkPolyKinds env ty        ; bindLHsTyVarBndrs (rtke_ctxt env) (Just $ inTypeDoc ty)                            Nothing tyvars $ \ tyvars' ->     do { (tau',  fvs) <- rnLHsTyKi env tau-       ; return ( HsForAllTy { hst_bndrs = tyvars', hst_body =  tau' }+       ; return ( HsForAllTy { hst_xforall = noExt, hst_bndrs = tyvars'+                             , hst_body =  tau' }                 , fvs) } }  rnHsTyKi env ty@(HsQualTy { hst_ctxt = lctxt, hst_body = tau })-  = do { checkTypeInType env ty  -- See Note [QualTy in kinds]+  = do { checkPolyKinds env ty  -- See Note [QualTy in kinds]        ; (ctxt', fvs1) <- rnTyKiContext env lctxt        ; (tau',  fvs2) <- rnLHsTyKi env tau-       ; return (HsQualTy { hst_ctxt = ctxt', hst_body =  tau' }+       ; return (HsQualTy { hst_xqual = noExt, hst_ctxt = ctxt'+                          , hst_body =  tau' }                 , fvs1 `plusFV` fvs2) } -rnHsTyKi env (HsTyVar ip (L loc rdr_name))-  = do { name <- rnTyVar env rdr_name-       ; return (HsTyVar ip (L loc name), unitFV name) }+rnHsTyKi env (HsTyVar _ ip (L loc rdr_name))+  = do { when (isRnKindLevel env && isRdrTyVar rdr_name) $+         unlessXOptM LangExt.PolyKinds $ addErr $+         withHsDocContext (rtke_ctxt env) $+         vcat [ text "Unexpected kind variable" <+> quotes (ppr rdr_name)+              , text "Perhaps you intended to use PolyKinds" ]+           -- 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 (L loc name), unitFV name) } -rnHsTyKi env ty@(HsOpTy ty1 l_op ty2)+rnHsTyKi env ty@(HsOpTy _ ty1 l_op ty2)   = setSrcSpan (getLoc l_op) $     do  { (l_op', fvs1) <- rnHsTyOp env ty l_op         ; fix   <- lookupTyFixityRn l_op'         ; (ty1', fvs2) <- rnLHsTyKi env ty1         ; (ty2', fvs3) <- rnLHsTyKi env ty2-        ; res_ty <- mkHsOpTyRn (\t1 t2 -> HsOpTy t1 l_op' t2)+        ; res_ty <- mkHsOpTyRn (\t1 t2 -> HsOpTy noExt t1 l_op' t2)                                (unLoc l_op') fix ty1' ty2'         ; return (res_ty, plusFVs [fvs1, fvs2, fvs3]) } -rnHsTyKi env (HsParTy ty)+rnHsTyKi env (HsParTy _ ty)   = do { (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsParTy ty', fvs) }+       ; return (HsParTy noExt ty', fvs) } -rnHsTyKi env (HsBangTy b ty)+rnHsTyKi env (HsBangTy _ b ty)   = do { (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsBangTy b ty', fvs) }+       ; return (HsBangTy noExt b ty', fvs) } -rnHsTyKi env ty@(HsRecTy flds)+rnHsTyKi env ty@(HsRecTy _ flds)   = do { let ctxt = rtke_ctxt env        ; fls          <- get_fields ctxt        ; (flds', fvs) <- rnConDeclFields ctxt fls flds-       ; return (HsRecTy flds', fvs) }+       ; return (HsRecTy noExt flds', fvs) }   where     get_fields (ConDeclCtx names)       = concatMapM (lookupConstructorFields . unLoc) names@@ -552,7 +565,7 @@                                    2 (ppr ty))            ; return [] } -rnHsTyKi env (HsFunTy ty1 ty2)+rnHsTyKi env (HsFunTy _ ty1 ty2)   = do { (ty1', fvs1) <- rnLHsTyKi env ty1         -- Might find a for-all as the arg of a function type        ; (ty2', fvs2) <- rnLHsTyKi env ty2@@ -560,160 +573,95 @@         -- when we find return :: forall m. Monad m -> forall a. a -> m a          -- Check for fixity rearrangements-       ; res_ty <- mkHsOpTyRn HsFunTy funTyConName funTyFixity ty1' ty2'+       ; res_ty <- mkHsOpTyRn (HsFunTy noExt) funTyConName funTyFixity ty1' ty2'        ; return (res_ty, fvs1 `plusFV` fvs2) } -rnHsTyKi env listTy@(HsListTy ty)+rnHsTyKi env listTy@(HsListTy _ ty)   = do { data_kinds <- xoptM LangExt.DataKinds        ; when (not data_kinds && isRnKindLevel env)               (addErr (dataKindsErr env listTy))        ; (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsListTy ty', fvs) }+       ; return (HsListTy noExt ty', fvs) } -rnHsTyKi env t@(HsKindSig ty k)-  = do { checkTypeInType env t+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 ty' k', fvs1 `plusFV` fvs2) }--rnHsTyKi env t@(HsPArrTy ty)-  = do { notInKinds env t-       ; (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsPArrTy ty', fvs) }+       ; return (HsKindSig noExt ty' k', fvs1 `plusFV` fvs2) }  -- Unboxed tuples are allowed to have poly-typed arguments.  These -- sometimes crop up as a result of CPR worker-wrappering dictionaries.-rnHsTyKi env tupleTy@(HsTupleTy tup_con tys)+rnHsTyKi env tupleTy@(HsTupleTy _ tup_con tys)   = do { data_kinds <- xoptM LangExt.DataKinds        ; when (not data_kinds && isRnKindLevel env)               (addErr (dataKindsErr env tupleTy))        ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys-       ; return (HsTupleTy tup_con tys', fvs) }+       ; return (HsTupleTy noExt tup_con tys', fvs) } -rnHsTyKi env sumTy@(HsSumTy tys)+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 tys', fvs) }+       ; return (HsSumTy noExt tys', fvs) }  -- Ensure that a type-level integer is nonnegative (#8306, #8412)-rnHsTyKi env tyLit@(HsTyLit t)+rnHsTyKi env tyLit@(HsTyLit _ t)   = do { data_kinds <- xoptM LangExt.DataKinds        ; unless data_kinds (addErr (dataKindsErr env tyLit))        ; when (negLit t) (addErr negLitErr)-       ; checkTypeInType env tyLit-       ; return (HsTyLit t, emptyFVs) }+       ; checkPolyKinds env tyLit+       ; return (HsTyLit noExt t, emptyFVs) }   where     negLit (HsStrTy _ _) = False     negLit (HsNumTy _ i) = i < 0     negLitErr = text "Illegal literal in type (type literals must not be negative):" <+> ppr tyLit -rnHsTyKi env overall_ty@(HsAppsTy tys)-  = do { -- Step 1: Break up the HsAppsTy into symbols and non-symbol regions-         let (non_syms, syms) = splitHsAppsTy tys--             -- Step 2: rename the pieces-       ; (syms1, fvs1)      <- mapFvRn (rnHsTyOp env overall_ty) syms-       ; (non_syms1, fvs2)  <- (mapFvRn . mapFvRn) (rnLHsTyKi env) non_syms--             -- Step 3: deal with *. See Note [Dealing with *]-       ; let (non_syms2, syms2) = deal_with_star [] [] non_syms1 syms1--             -- Step 4: collapse the non-symbol regions with HsAppTy-       ; non_syms3 <- mapM deal_with_non_syms non_syms2--             -- Step 5: assemble the pieces, using mkHsOpTyRn-       ; L _ res_ty <- build_res_ty non_syms3 syms2--        -- all done. Phew.-       ; return (res_ty, fvs1 `plusFV` fvs2) }-  where-    -- See Note [Dealing with *]-    deal_with_star :: [[LHsType GhcRn]] -> [Located Name]-                   -> [[LHsType GhcRn]] -> [Located Name]-                   -> ([[LHsType GhcRn]], [Located Name])-    deal_with_star acc1 acc2-                   (non_syms1 : non_syms2 : non_syms) (L loc star : ops)-      | star `hasKey` starKindTyConKey || star `hasKey` unicodeStarKindTyConKey-      = deal_with_star acc1 acc2-                       ((non_syms1 ++ L loc (HsTyVar NotPromoted (L loc star))-                            : non_syms2) : non_syms)-                       ops-    deal_with_star acc1 acc2 (non_syms1 : non_syms) (op1 : ops)-      = deal_with_star (non_syms1 : acc1) (op1 : acc2) non_syms ops-    deal_with_star acc1 acc2 [non_syms] []-      = (reverse (non_syms : acc1), reverse acc2)-    deal_with_star _ _ _ _-      = pprPanic "deal_with_star" (ppr overall_ty)--    -- collapse [LHsType GhcRn] to LHsType GhcRn by making applications-    -- monadic only for failure-    deal_with_non_syms :: [LHsType GhcRn] -> RnM (LHsType GhcRn)-    deal_with_non_syms (non_sym : non_syms) = return $ mkHsAppTys non_sym non_syms-    deal_with_non_syms []                   = failWith (emptyNonSymsErr overall_ty)--    -- assemble a right-biased OpTy for use in mkHsOpTyRn-    build_res_ty :: [LHsType GhcRn] -> [Located Name] -> RnM (LHsType GhcRn)-    build_res_ty (arg1 : args) (op1 : ops)-      = do { rhs <- build_res_ty args ops-           ; fix <- lookupTyFixityRn op1-           ; res <--               mkHsOpTyRn (\t1 t2 -> HsOpTy t1 op1 t2) (unLoc op1) fix arg1 rhs-           ; let loc = combineSrcSpans (getLoc arg1) (getLoc rhs)-           ; return (L loc res)-           }-    build_res_ty [arg] [] = return arg-    build_res_ty _ _ = pprPanic "build_op_ty" (ppr overall_ty)--rnHsTyKi env (HsAppTy ty1 ty2)+rnHsTyKi env (HsAppTy _ ty1 ty2)   = do { (ty1', fvs1) <- rnLHsTyKi env ty1        ; (ty2', fvs2) <- rnLHsTyKi env ty2-       ; return (HsAppTy ty1' ty2', fvs1 `plusFV` fvs2) }+       ; return (HsAppTy noExt ty1' ty2', fvs1 `plusFV` fvs2) } -rnHsTyKi env t@(HsIParamTy n ty)+rnHsTyKi env t@(HsIParamTy _ n ty)   = do { notInKinds env t        ; (ty', fvs) <- rnLHsTyKi env ty-       ; return (HsIParamTy n ty', fvs) }+       ; return (HsIParamTy noExt n ty', fvs) } -rnHsTyKi env t@(HsEqTy ty1 ty2)-  = do { checkTypeInType env t-       ; (ty1', fvs1) <- rnLHsTyKi env ty1-       ; (ty2', fvs2) <- rnLHsTyKi env ty2-       ; return (HsEqTy ty1' ty2', fvs1 `plusFV` fvs2) }+rnHsTyKi _ (HsStarTy _ isUni)+  = return (HsStarTy noExt isUni, emptyFVs) -rnHsTyKi _ (HsSpliceTy sp k)-  = rnSpliceType sp k+rnHsTyKi _ (HsSpliceTy _ sp)+  = rnSpliceType sp -rnHsTyKi env (HsDocTy ty haddock_doc)+rnHsTyKi env (HsDocTy _ ty haddock_doc)   = do { (ty', fvs) <- rnLHsTyKi env ty        ; haddock_doc' <- rnLHsDoc haddock_doc-       ; return (HsDocTy ty' haddock_doc', fvs) }+       ; return (HsDocTy noExt ty' haddock_doc', fvs) } -rnHsTyKi _ (HsCoreTy ty)-  = return (HsCoreTy ty, emptyFVs)+rnHsTyKi _ (XHsType (NHsCoreTy ty))+  = return (XHsType (NHsCoreTy ty), emptyFVs)     -- The emptyFVs probably isn't quite right     -- but I don't think it matters -rnHsTyKi env ty@(HsExplicitListTy ip k tys)-  = do { checkTypeInType env ty+rnHsTyKi env ty@(HsExplicitListTy _ ip tys)+  = do { checkPolyKinds env ty        ; data_kinds <- xoptM LangExt.DataKinds        ; unless data_kinds (addErr (dataKindsErr env ty))        ; (tys', fvs) <- mapFvRn (rnLHsTyKi env) tys-       ; return (HsExplicitListTy ip k tys', fvs) }+       ; return (HsExplicitListTy noExt ip tys', fvs) } -rnHsTyKi env ty@(HsExplicitTupleTy kis tys)-  = do { checkTypeInType env ty+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 kis tys', fvs) }+       ; return (HsExplicitTupleTy noExt tys', fvs) } -rnHsTyKi env (HsWildCardTy wc)-  = do { checkAnonWildCard env wc-       ; wc' <- rnAnonWildCard wc+rnHsTyKi env (HsWildCardTy _)+  = do { checkAnonWildCard env+       ; wc' <- rnAnonWildCard        ; return (HsWildCardTy wc', emptyFVs) }          -- emptyFVs: this occurrence does not refer to a          --           user-written binding site, so don't treat@@ -722,9 +670,7 @@ -------------- rnTyVar :: RnTyKiEnv -> RdrName -> RnM Name rnTyVar env rdr_name-  = do { name <- if   isRnKindLevel env-                 then lookupKindOccRn rdr_name-                 else lookupTypeOccRn rdr_name+  = do { name <- lookupTypeOccRn rdr_name        ; checkNamedWildCard env name        ; return name } @@ -741,10 +687,7 @@ rnHsTyOp env overall_ty (L loc op)   = do { ops_ok <- xoptM LangExt.TypeOperators        ; op' <- rnTyVar env op-       ; unless (ops_ok-                 || op' == starKindTyConName-                 || op' == unicodeStarKindTyConName-                 || op' `hasKey` eqTyConKey) $+       ; unless (ops_ok || op' `hasKey` eqTyConKey) $            addErr (opTyErr op overall_ty)        ; let l_op' = L loc op'        ; return (l_op', unitFV op') }@@ -760,21 +703,22 @@ checkWildCard _ Nothing   = return () -checkAnonWildCard :: RnTyKiEnv -> HsWildCardInfo GhcPs -> RnM ()+checkAnonWildCard :: RnTyKiEnv -> RnM () -- Report an error if an anonymous wildcard is illegal here-checkAnonWildCard env wc+checkAnonWildCard env   = checkWildCard env mb_bad   where     mb_bad :: Maybe SDoc     mb_bad | not (wildCardsAllowed env)-           = Just (notAllowed (ppr wc))+           = Just (notAllowed pprAnonWildCard)            | otherwise            = case rtke_what env of                RnTypeBody      -> Nothing                RnConstraint    -> Just constraint_msg                RnTopConstraint -> Just constraint_msg -    constraint_msg = hang (notAllowed (ppr wc) <+> text "in a constraint")+    constraint_msg = hang+                         (notAllowed pprAnonWildCard <+> text "in a constraint")                         2 hint_msg     hint_msg = vcat [ text "except as the last top-level constraint of a type signature"                     , nest 2 (text "e.g  f :: (Eq a, _) => blah") ]@@ -810,26 +754,26 @@        HsTypeCtx {}        -> True        _                   -> False -rnAnonWildCard :: HsWildCardInfo GhcPs -> RnM (HsWildCardInfo GhcRn)-rnAnonWildCard (AnonWildCard _)+rnAnonWildCard :: RnM HsWildCardInfo+rnAnonWildCard   = do { loc <- getSrcSpanM        ; uniq <- newUnique        ; let name = mkInternalName uniq (mkTyVarOcc "_") loc        ; return (AnonWildCard (L loc name)) }  ------------------ | Ensures either that we're in a type or that -XTypeInType is set-checkTypeInType :: Outputable ty+-- | Ensures either that we're in a type or that -XPolyKinds is set+checkPolyKinds :: Outputable ty                 => RnTyKiEnv                 -> ty      -- ^ type                 -> RnM ()-checkTypeInType env ty+checkPolyKinds env ty   | isRnKindLevel env-  = do { type_in_type <- xoptM LangExt.TypeInType-       ; unless type_in_type $+  = do { polykinds <- xoptM LangExt.PolyKinds+       ; unless polykinds $          addErr (text "Illegal kind:" <+> ppr ty $$-                 text "Did you mean to enable TypeInType?") }-checkTypeInType _ _ = return ()+                 text "Did you mean to enable PolyKinds?") }+checkPolyKinds _ _ = return ()  notInKinds :: Outputable ty            => RnTyKiEnv@@ -837,7 +781,7 @@            -> RnM () notInKinds env ty   | isRnKindLevel env-  = addErr (text "Illegal kind (even with TypeInType enabled):" <+> ppr ty)+  = addErr (text "Illegal kind:" <+> ppr ty) notInKinds _ _ = return ()  {- *****************************************************@@ -898,25 +842,24 @@         ; let -- See Note [bindHsQTyVars examples] for what              -- all these various things are doing-             bndrs, kv_occs, implicit_bndr_kvs,-                    implicit_body_kvs, implicit_kvs :: [Located RdrName]-             bndrs             = map hsLTyVarLocName hs_tv_bndrs-             kv_occs           = body_kv_occs ++ bndr_kv_occs-             implicit_bndr_kvs = filter_occs rdr_env bndrs bndr_kv_occs-             implicit_body_kvs = filter_occs rdr_env (implicit_bndr_kvs ++ bndrs) body_kv_occs+             bndrs, kv_occs, implicit_kvs :: [Located RdrName]+             bndrs        = map hsLTyVarLocName hs_tv_bndrs+             kv_occs      = nubL (body_kv_occs ++ bndr_kv_occs)+             implicit_kvs = filter_occs rdr_env bndrs kv_occs                                  -- Deleting bndrs: See Note [Kind-variable ordering]-             implicit_kvs      = implicit_bndr_kvs ++ implicit_body_kvs-              -- 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+             all_bound_on_lhs = null ((body_kv_occs `del` bndrs) `del` bndr_kv_occs)         ; traceRn "checkMixedVars3" $            vcat [ text "kv_occs" <+> ppr kv_occs-                , text "bndrs"   <+> ppr bndrs ]-       ; checkBadKindBndrs doc implicit_kvs-       ; checkMixedVars kv_occs bndrs+                , text "bndrs"   <+> ppr hs_tv_bndrs+                , text "bndr_kv_occs"   <+> ppr bndr_kv_occs+                , text "wubble" <+> ppr ((kv_occs \\ bndrs) \\ bndr_kv_occs)+                ]         ; implicit_kv_nms <- mapM (newTyVarNameRn mb_assoc) implicit_kvs @@ -924,10 +867,11 @@          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_implicit  = implicit_kv_nms-                              , hsq_explicit  = rn_bndrs-                              , hsq_dependent = mkNameSet dep_bndr_nms })-                      (null implicit_body_kvs) } }+       ; thing_inside (HsQTvs { hsq_ext = HsQTvsRn+                                   { hsq_implicit  = implicit_kv_nms+                                   , hsq_dependent = mkNameSet dep_bndr_nms }+                              , hsq_explicit  = rn_bndrs })+                      all_bound_on_lhs } }    where     filter_occs :: LocalRdrEnv         -- In scope@@ -957,15 +901,10 @@   body_kv_occs = [k2,k1], kind variables free in the                           result kind signature -  implicit_bndr_kvs = [k1], kind variables free in kind signatures-                            of hs_tv_bndrs, and not bound by bndrs--  implicit_body_kvs = [k2], kind variables free in the result kind-                            signature, and not bound either by-                            bndrs or by implicit_bndr_kvs+  implicit_kvs = [k1,k2], kind variables free in kind signatures+                          of hs_tv_bndrs, and not bound by bndrs -* We want to quantify add implicit bindings for-  implicit_bndr_kvs and implicit_body_kvs+* 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@@ -1007,7 +946,7 @@  Note that in the denerate case   data T (a :: a) = blah-we get a complaint the the second 'a' is not in scope.+we get a complaint the second 'a' is not in scope.  That applies to foralls too: e.g.    forall (a :: k) k . blah@@ -1025,6 +964,27 @@   scope in the kind of 'a'.  * Similarly in extract_hs_tv_bndrs++Note [Variables used as both types and kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We bind the type variables tvs, and kvs is the set of free variables of the+kinds in the scope of the binding. Here is one typical example:++   forall a b. a -> (b::k) -> (c::a)++Here, tvs will be {a,b}, and kvs {k,a}.++We must make sure that kvs includes all of variables in the kinds of type+variable bindings. For instance:++   forall k (a :: k). Proxy a++If we only look in the body of the `forall` type, we will mistakenly conclude+that kvs is {}. But in fact, the type variable `k` is also used as a kind+variable in (a :: k), later in the binding. (This mistake lead to #14710.)+So tvs is {k,a} and kvs is {k}.++NB: we do this only at the binding site of 'tvs'. -}  bindLHsTyVarBndrs :: HsDocContext@@ -1057,20 +1017,23 @@                  -> LHsTyVarBndr GhcPs                  -> (LHsTyVarBndr GhcRn -> RnM (b, FreeVars))                  -> RnM (b, FreeVars)-bindLHsTyVarBndr _doc mb_assoc (L loc (UserTyVar lrdr@(L lv _))) thing_inside+bindLHsTyVarBndr _doc mb_assoc (L loc (UserTyVar x lrdr@(L lv _))) thing_inside   = do { nm <- newTyVarNameRn mb_assoc lrdr        ; bindLocalNamesFV [nm] $-         thing_inside (L loc (UserTyVar (L lv nm))) }+         thing_inside (L loc (UserTyVar x (L lv nm))) } -bindLHsTyVarBndr doc mb_assoc (L loc (KindedTyVar lrdr@(L lv _) kind)) thing_inside+bindLHsTyVarBndr doc mb_assoc (L loc (KindedTyVar x lrdr@(L lv _) kind))+                 thing_inside   = do { sig_ok <- xoptM LangExt.KindSignatures            ; unless sig_ok (badKindSigErr doc kind)            ; (kind', fvs1) <- rnLHsKind doc kind            ; tv_nm  <- newTyVarNameRn mb_assoc lrdr            ; (b, fvs2) <- bindLocalNamesFV [tv_nm] $-                          thing_inside (L loc (KindedTyVar (L lv tv_nm) kind'))+                         thing_inside (L loc (KindedTyVar x (L lv tv_nm) kind'))            ; return (b, fvs1 `plusFV` fvs2) } +bindLHsTyVarBndr _ _ (L _ (XTyVarBndr{})) _ = panic "bindLHsTyVarBndr"+ newTyVarNameRn :: Maybe a -> Located RdrName -> RnM Name newTyVarNameRn mb_assoc (L loc rdr)   = do { rdr_env <- getLocalRdrEnv@@ -1087,44 +1050,40 @@   where     go (L _ ty) = case ty of       HsWildCardTy (AnonWildCard (L _ wc)) -> [wc]-      HsAppsTy tys                 -> gos (mapMaybe (prefix_types_only . unLoc) tys)-      HsAppTy ty1 ty2              -> go ty1 `mappend` go ty2-      HsFunTy ty1 ty2              -> go ty1 `mappend` go ty2-      HsListTy ty                  -> go ty-      HsPArrTy ty                  -> go ty-      HsTupleTy _ tys              -> gos tys-      HsSumTy tys                  -> gos tys-      HsOpTy ty1 _ ty2             -> go ty1 `mappend` go ty2-      HsParTy ty                   -> go ty-      HsIParamTy _ ty              -> go ty-      HsEqTy ty1 ty2               -> go ty1 `mappend` go ty2-      HsKindSig ty kind            -> go ty `mappend` go kind-      HsDocTy ty _                 -> go ty-      HsBangTy _ ty                -> go ty-      HsRecTy flds                 -> gos $ map (cd_fld_type . unLoc) flds-      HsExplicitListTy _ _ tys     -> gos tys-      HsExplicitTupleTy _ tys      -> gos tys+      HsAppTy _ ty1 ty2              -> go ty1 `mappend` go ty2+      HsFunTy _ ty1 ty2              -> go ty1 `mappend` go ty2+      HsListTy _ ty                  -> go ty+      HsTupleTy _ _ tys              -> gos tys+      HsSumTy _ tys                  -> gos tys+      HsOpTy _ ty1 _ ty2             -> go ty1 `mappend` go ty2+      HsParTy _ ty                   -> go ty+      HsIParamTy _ _ ty              -> go ty+      HsKindSig _ ty kind            -> go ty `mappend` go kind+      HsDocTy _ ty _                 -> go ty+      HsBangTy _ _ ty                -> go ty+      HsRecTy _ flds                 -> gos $ map (cd_fld_type . unLoc) flds+      HsExplicitListTy _ _ tys       -> gos tys+      HsExplicitTupleTy _ tys        -> gos tys       HsForAllTy { hst_bndrs = bndrs                  , hst_body = ty } -> collectAnonWildCardsBndrs bndrs                                       `mappend` go ty       HsQualTy { hst_ctxt = L _ ctxt                , hst_body = ty }  -> gos ctxt `mappend` go ty-      HsSpliceTy (HsSpliced _ (HsSplicedTy ty)) _ -> go $ L noSrcSpan ty+      HsSpliceTy _ (HsSpliced _ _ (HsSplicedTy ty)) -> go $ L noSrcSpan ty       HsSpliceTy{} -> mempty-      HsCoreTy{} -> mempty       HsTyLit{} -> mempty       HsTyVar{} -> mempty+      HsStarTy{} -> mempty+      XHsType{} -> mempty      gos = mconcat . map go -    prefix_types_only (HsAppPrefix ty) = Just ty-    prefix_types_only (HsAppInfix _)   = Nothing- collectAnonWildCardsBndrs :: [LHsTyVarBndr GhcRn] -> [Name] collectAnonWildCardsBndrs ltvs = concatMap (go . unLoc) ltvs   where-    go (UserTyVar _)      = []-    go (KindedTyVar _ ki) = collectAnonWildCards ki+    go (UserTyVar _ _)      = []+    go (KindedTyVar _ _ ki) = collectAnonWildCards ki+    go (XTyVarBndr{})       = []  {- *********************************************************@@ -1152,17 +1111,20 @@  rnField :: FastStringEnv FieldLabel -> RnTyKiEnv -> LConDeclField GhcPs         -> RnM (LConDeclField GhcRn, FreeVars)-rnField fl_env env (L l (ConDeclField names ty haddock_doc))+rnField fl_env env (L l (ConDeclField _ names ty haddock_doc))   = do { let new_names = map (fmap lookupField) names        ; (new_ty, fvs) <- rnLHsTyKi env ty        ; new_haddock_doc <- rnMbLHsDoc haddock_doc-       ; return (L l (ConDeclField new_names new_ty new_haddock_doc), fvs) }+       ; return (L l (ConDeclField noExt new_names new_ty new_haddock_doc)+                , fvs) }   where     lookupField :: FieldOcc GhcPs -> FieldOcc GhcRn-    lookupField (FieldOcc (L lr rdr) _) = FieldOcc (L lr rdr) (flSelector fl)+    lookupField (FieldOcc _ (L lr rdr)) = FieldOcc (flSelector fl) (L lr rdr)       where         lbl = occNameFS $ rdrNameOcc rdr         fl  = expectJust "rnField" $ lookupFsEnv fl_env lbl+    lookupField (XFieldOcc{}) = panic "rnField"+rnField _ _ (L _ (XConDeclField _)) = panic "rnField"  {- ************************************************************************@@ -1196,15 +1158,15 @@            -> Name -> Fixity -> LHsType GhcRn -> LHsType GhcRn            -> RnM (HsType GhcRn) -mkHsOpTyRn mk1 pp_op1 fix1 ty1 (L loc2 (HsOpTy ty21 op2 ty22))+mkHsOpTyRn mk1 pp_op1 fix1 ty1 (L loc2 (HsOpTy noExt ty21 op2 ty22))   = do  { fix2 <- lookupTyFixityRn op2         ; mk_hs_op_ty mk1 pp_op1 fix1 ty1-                      (\t1 t2 -> HsOpTy t1 op2 t2)+                      (\t1 t2 -> HsOpTy noExt t1 op2 t2)                       (unLoc op2) fix2 ty21 ty22 loc2 } -mkHsOpTyRn mk1 pp_op1 fix1 ty1 (L loc2 (HsFunTy ty21 ty22))+mkHsOpTyRn mk1 pp_op1 fix1 ty1 (L loc2 (HsFunTy _ ty21 ty22))   = mk_hs_op_ty mk1 pp_op1 fix1 ty1-                HsFunTy funTyConName funTyFixity ty21 ty22 loc2+                (HsFunTy noExt) funTyConName funTyFixity ty21 ty22 loc2  mkHsOpTyRn mk1 _ _ ty1 ty2              -- Default case, no rearrangment   = return (mk1 ty1 ty2)@@ -1235,38 +1197,38 @@           -> RnM (HsExpr GhcRn)  -- (e11 `op1` e12) `op2` e2-mkOpAppRn e1@(L _ (OpApp e11 op1 fix1 e12)) op2 fix2 e2+mkOpAppRn e1@(L _ (OpApp fix1 e11 op1 e12)) op2 fix2 e2   | nofix_error   = do precParseErr (get_op op1,fix1) (get_op op2,fix2)-       return (OpApp e1 op2 fix2 e2)+       return (OpApp fix2 e1 op2 e2)    | associate_right = do     new_e <- mkOpAppRn e12 op2 fix2 e2-    return (OpApp e11 op1 fix1 (L loc' new_e))+    return (OpApp fix1 e11 op1 (L loc' new_e))   where     loc'= combineLocs e12 e2     (nofix_error, associate_right) = compareFixity fix1 fix2  --------------------------- --      (- neg_arg) `op` e2-mkOpAppRn e1@(L _ (NegApp neg_arg neg_name)) op2 fix2 e2+mkOpAppRn e1@(L _ (NegApp _ neg_arg neg_name)) op2 fix2 e2   | nofix_error   = do precParseErr (NegateOp,negateFixity) (get_op op2,fix2)-       return (OpApp e1 op2 fix2 e2)+       return (OpApp fix2 e1 op2 e2)    | associate_right   = do new_e <- mkOpAppRn neg_arg op2 fix2 e2-       return (NegApp (L loc' new_e) neg_name)+       return (NegApp noExt (L loc' new_e) neg_name)   where     loc' = combineLocs neg_arg e2     (nofix_error, associate_right) = compareFixity negateFixity fix2  --------------------------- --      e1 `op` - neg_arg-mkOpAppRn e1 op1 fix1 e2@(L _ (NegApp _ _))     -- NegApp can occur on the right+mkOpAppRn e1 op1 fix1 e2@(L _ (NegApp {}))     -- NegApp can occur on the right   | not associate_right                 -- We *want* right association   = do precParseErr (get_op op1, fix1) (NegateOp, negateFixity)-       return (OpApp e1 op1 fix1 e2)+       return (OpApp fix1 e1 op1 e2)   where     (_, associate_right) = compareFixity fix1 negateFixity @@ -1276,7 +1238,7 @@   = ASSERT2( right_op_ok fix (unLoc e2),              ppr e1 $$ text "---" $$ ppr op $$ text "---" $$ ppr fix $$ text "---" $$ ppr e2     )-    return (OpApp e1 op fix e2)+    return (OpApp fix e1 op e2)  ---------------------------- @@ -1296,16 +1258,16 @@ get_op :: LHsExpr GhcRn -> OpName -- An unbound name could be either HsVar or HsUnboundVar -- See RnExpr.rnUnboundVar-get_op (L _ (HsVar (L _ n)))   = NormalOp n-get_op (L _ (HsUnboundVar uv)) = UnboundOp uv-get_op (L _ (HsRecFld fld))    = RecFldOp fld-get_op other                   = pprPanic "get_op" (ppr other)+get_op (L _ (HsVar _ (L _ n)))   = NormalOp n+get_op (L _ (HsUnboundVar _ uv)) = UnboundOp uv+get_op (L _ (HsRecFld _ fld))    = RecFldOp fld+get_op other                     = pprPanic "get_op" (ppr other)  -- Parser left-associates everything, but -- derived instances may have correctly-associated things to -- in the right operand.  So we just check that the right operand is OK right_op_ok :: Fixity -> HsExpr GhcRn -> Bool-right_op_ok fix1 (OpApp _ _ fix2 _)+right_op_ok fix1 (OpApp fix2 _ _ _)   = not error_please && associate_right   where     (error_please, associate_right) = compareFixity fix1 fix2@@ -1314,14 +1276,15 @@  -- Parser initially makes negation bind more tightly than any other operator -- And "deriving" code should respect this (use HsPar if not)-mkNegAppRn :: LHsExpr id -> SyntaxExpr id -> RnM (HsExpr id)+mkNegAppRn :: LHsExpr (GhcPass id) -> SyntaxExpr (GhcPass id)+           -> RnM (HsExpr (GhcPass id)) mkNegAppRn neg_arg neg_name   = ASSERT( not_op_app (unLoc neg_arg) )-    return (NegApp neg_arg neg_name)+    return (NegApp noExt neg_arg neg_name)  not_op_app :: HsExpr id -> Bool-not_op_app (OpApp _ _ _ _) = False-not_op_app _               = True+not_op_app (OpApp {}) = False+not_op_app _          = True  --------------------------- mkOpFormRn :: LHsCmdTop GhcRn            -- Left operand; already rearranged@@ -1330,25 +1293,24 @@           -> RnM (HsCmd GhcRn)  -- (e11 `op1` e12) `op2` e2-mkOpFormRn a1@(L loc (HsCmdTop (L _ (HsCmdArrForm op1 f (Just fix1)-                                     [a11,a12])) _ _ _))+mkOpFormRn a1@(L loc (HsCmdTop _ (L _ (HsCmdArrForm x op1 f (Just fix1)+                                     [a11,a12]))))         op2 fix2 a2   | nofix_error   = do precParseErr (get_op op1,fix1) (get_op op2,fix2)-       return (HsCmdArrForm op2 f (Just fix2) [a1, a2])+       return (HsCmdArrForm x op2 f (Just fix2) [a1, a2])    | associate_right   = do new_c <- mkOpFormRn a12 op2 fix2 a2-       return (HsCmdArrForm op1 f (Just fix1)-               [a11, L loc (HsCmdTop (L loc new_c)-               placeHolderType placeHolderType [])])+       return (HsCmdArrForm noExt op1 f (Just fix1)+               [a11, L loc (HsCmdTop [] (L loc new_c))])         -- TODO: locs are wrong   where     (nofix_error, associate_right) = compareFixity fix1 fix2  --      Default case mkOpFormRn arg1 op fix arg2                     -- Default case, no rearrangment-  = return (HsCmdArrForm op Infix (Just fix) [arg1, arg2])+  = return (HsCmdArrForm noExt op Infix (Just fix) [arg1, arg2])   --------------------------------------@@ -1399,6 +1361,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"  checkPrec :: Name -> Pat GhcRn -> Bool -> IOEnv (Env TcGblEnv TcLclEnv) () checkPrec op (ConPatIn op1 (InfixCon _ _)) right = do@@ -1426,8 +1389,8 @@         -> LHsExpr GhcRn -> LHsExpr GhcRn -> RnM () checkSectionPrec direction section op arg   = case unLoc arg of-        OpApp _ op' fix _ -> go_for_it (get_op op') fix-        NegApp _ _        -> go_for_it NegateOp     negateFixity+        OpApp fix _ op' _ -> go_for_it (get_op op') fix+        NegApp _ _ _      -> go_for_it NegateOp     negateFixity         _                 -> return ()   where     op_name = get_op op@@ -1493,15 +1456,6 @@   = hang (text "Illegal type signature:" <+> quotes (ppr ty))        2 (text "Type signatures are only allowed in patterns with ScopedTypeVariables") -checkBadKindBndrs :: HsDocContext -> [Located RdrName] -> RnM ()-checkBadKindBndrs doc kvs-  = unless (null kvs)             $-    unlessXOptM LangExt.PolyKinds $-    addErr (withHsDocContext doc  $-            hang (text "Unexpected kind variable" <> plural kvs-                  <+> pprQuotedList kvs)-               2 (text "Perhaps you intended to use PolyKinds"))- badKindSigErr :: HsDocContext -> LHsType GhcPs -> TcM () badKindSigErr doc (L loc ty)   = setSrcSpan loc $ addErr $@@ -1538,10 +1492,6 @@           | otherwise           = text "Use TypeOperators to allow operators in types" -emptyNonSymsErr :: HsType GhcPs -> SDoc-emptyNonSymsErr overall_ty-  = text "Operator applied to too few arguments:" <+> ppr overall_ty- {- ************************************************************************ *                                                                      *@@ -1712,8 +1662,8 @@  extractRdrKindSigVars :: LFamilyResultSig GhcPs -> RnM [Located RdrName] extractRdrKindSigVars (L _ resultSig)-    | KindSig k                        <- resultSig = kindRdrNameFromSig k-    | TyVarSig (L _ (KindedTyVar _ k)) <- resultSig = kindRdrNameFromSig k+    | KindSig _ k                          <- resultSig = kindRdrNameFromSig k+    | TyVarSig _ (L _ (KindedTyVar _ _ k)) <- resultSig = kindRdrNameFromSig k     | otherwise = return []     where kindRdrNameFromSig k = freeKiTyVarsAllVars <$> extractHsTyRdrTyVars k @@ -1739,84 +1689,87 @@      foldrM (extract_con . unLoc) emptyFKTV cons)   where     extract_con (ConDeclGADT { }) acc = return acc-    extract_con (ConDeclH98 { con_qvars = qvs-                            , con_cxt = ctxt, con_details = details }) acc-      = extract_hs_tv_bndrs (maybe [] hsQTvExplicit qvs) 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 details) emptyFKTV+        extract_ltys TypeLevel (hsConDeclArgTys args) emptyFKTV+    extract_con (XConDecl { }) _ = panic "extractDataDefnKindVars"+extractDataDefnKindVars (XHsDataDefn _) = panic "extractDataDefnKindVars" -extract_mlctxt :: Maybe (LHsContext GhcPs) -> FreeKiTyVars -> RnM FreeKiTyVars+extract_mlctxt :: Maybe (LHsContext GhcPs)+               -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups extract_mlctxt Nothing     acc = return acc extract_mlctxt (Just ctxt) acc = extract_lctxt TypeLevel ctxt acc  extract_lctxt :: TypeOrKind-              -> LHsContext GhcPs -> FreeKiTyVars -> RnM FreeKiTyVars+              -> LHsContext GhcPs+              -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups extract_lctxt t_or_k ctxt = extract_ltys t_or_k (unLoc ctxt)  extract_ltys :: TypeOrKind-             -> [LHsType GhcPs] -> FreeKiTyVars -> RnM FreeKiTyVars+             -> [LHsType GhcPs]+             -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups extract_ltys t_or_k tys acc = foldrM (extract_lty t_or_k) acc tys -extract_mb :: (a -> FreeKiTyVars -> RnM FreeKiTyVars)-           -> Maybe a -> FreeKiTyVars -> RnM FreeKiTyVars+extract_mb :: (a -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups)+           -> Maybe a+           -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups extract_mb _ Nothing  acc = return acc extract_mb f (Just x) acc = f x acc  extract_lkind :: LHsType GhcPs -> FreeKiTyVars -> RnM FreeKiTyVars extract_lkind = extract_lty KindLevel -extract_lty :: TypeOrKind -> LHsType GhcPs -> FreeKiTyVars -> RnM FreeKiTyVars+extract_lty :: TypeOrKind -> LHsType GhcPs+            -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups extract_lty t_or_k (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              -> foldrM (extract_lty t_or_k-                                           . cd_fld_type . unLoc) acc-                                         flds-      HsAppsTy tys              -> extract_apps t_or_k tys acc-      HsAppTy ty1 ty2           -> extract_lty t_or_k ty1 =<<-                                   extract_lty t_or_k ty2 acc-      HsListTy ty               -> extract_lty t_or_k ty acc-      HsPArrTy 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-      HsEqTy ty1 ty2            -> extract_lty t_or_k ty1 =<<-                                   extract_lty t_or_k ty2 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-      HsCoreTy {}               -> return acc  -- The type is closed-      HsSpliceTy {}             -> return 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-      HsTyLit _                 -> return acc-      HsKindSig ty ki           -> extract_lty t_or_k ty =<<-                                   extract_lkind ki acc+      HsTyVar _ _  ltv            -> extract_tv t_or_k ltv acc+      HsBangTy _ _ ty             -> extract_lty t_or_k ty acc+      HsRecTy _ flds              -> foldrM (extract_lty t_or_k+                                             . cd_fld_type . unLoc) acc+                                           flds+      HsAppTy _ ty1 ty2           -> extract_lty t_or_k ty1 =<<+                                     extract_lty t_or_k ty2 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+      HsSpliceTy {}               -> return 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+      HsTyLit _ _                 -> return acc+      HsStarTy _ _                -> return acc+      HsKindSig _ ty ki           -> extract_lty t_or_k ty =<<+                                     extract_lkind ki acc       HsForAllTy { hst_bndrs = tvs, hst_body = ty }-                                -> extract_hs_tv_bndrs tvs acc =<<-                                   extract_lty t_or_k ty emptyFKTV+                                  -> extract_hs_tv_bndrs tvs acc =<<+                                     extract_lty t_or_k ty emptyFKTV       HsQualTy { hst_ctxt = ctxt, hst_body = ty }-                                -> extract_lctxt t_or_k ctxt   =<<-                                   extract_lty t_or_k ty acc+                                  -> extract_lctxt t_or_k ctxt   =<<+                                     extract_lty t_or_k ty acc+      XHsType {}                  -> return acc       -- We deal with these separately in rnLHsTypeWithWildCards-      HsWildCardTy {}           -> return acc--extract_apps :: TypeOrKind-             -> [LHsAppType GhcPs] -> FreeKiTyVars -> RnM FreeKiTyVars-extract_apps t_or_k tys acc = foldrM (extract_app t_or_k) acc tys+      HsWildCardTy {}             -> return acc -extract_app :: TypeOrKind -> LHsAppType GhcPs -> FreeKiTyVars-            -> RnM FreeKiTyVars-extract_app t_or_k (L _ (HsAppInfix tv))  acc = extract_tv t_or_k tv acc-extract_app t_or_k (L _ (HsAppPrefix ty)) acc = extract_lty t_or_k ty acc+extractHsTvBndrs :: [LHsTyVarBndr GhcPs]+                 -> FreeKiTyVarsWithDups           -- Free in body+                 -> RnM FreeKiTyVarsWithDups       -- Free in result+extractHsTvBndrs tv_bndrs body_fvs+  = extract_hs_tv_bndrs tv_bndrs emptyFKTV body_fvs -extract_hs_tv_bndrs :: [LHsTyVarBndr GhcPs] -> FreeKiTyVars-                    -> FreeKiTyVars -> RnM FreeKiTyVars+extract_hs_tv_bndrs :: [LHsTyVarBndr GhcPs]+                    -> FreeKiTyVarsWithDups  -- Accumulator+                    -> FreeKiTyVarsWithDups  -- Free in body+                    -> RnM FreeKiTyVarsWithDups -- In (forall (a :: Maybe e). a -> b) we have --     'a' is bound by the forall --     'b' is a free type variable@@ -1830,16 +1783,21 @@   | otherwise   = do { bndr_kvs <- extract_hs_tv_bndrs_kvs tv_bndrs -       ; let tv_bndr_rdrs :: [Located RdrName]+       ; let tv_bndr_rdrs, all_kv_occs :: [Located RdrName]              tv_bndr_rdrs = map hsLTyVarLocName tv_bndrs+             -- 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].+             all_kv_occs = bndr_kvs ++ body_kvs         ; traceRn "checkMixedVars1" $-           vcat [ text "body_kvs"     <+> ppr body_kvs+           vcat [ text "bndr_kvs"     <+> ppr bndr_kvs+                , text "body_kvs"     <+> ppr body_kvs+                , text "all_kv_occs"  <+> ppr all_kv_occs                 , text "tv_bndr_rdrs" <+> ppr tv_bndr_rdrs ]-       ; checkMixedVars body_kvs tv_bndr_rdrs         ; return $-         FKTV (filterOut (`elemRdr` tv_bndr_rdrs) (bndr_kvs ++ body_kvs)+         FKTV (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)@@ -1853,12 +1811,12 @@ --          the function returns [k1,k2], even though k1 is bound here extract_hs_tv_bndrs_kvs tv_bndrs   = do { fktvs <- foldrM extract_lkind emptyFKTV-                  [k | L _ (KindedTyVar _ k) <- tv_bndrs]+                  [k | L _ (KindedTyVar _ _ k) <- tv_bndrs]        ; return (freeKiTyVarsKindVars fktvs) }          -- There will /be/ no free tyvars! -extract_tv :: TypeOrKind -> Located RdrName -> FreeKiTyVars-           -> RnM FreeKiTyVars+extract_tv :: TypeOrKind -> Located RdrName+           -> FreeKiTyVarsWithDups -> RnM FreeKiTyVarsWithDups extract_tv t_or_k ltv@(L _ tv) acc@(FKTV kvs tvs)   | not (isRdrTyVar tv) = return acc   | isTypeLevel t_or_k  = return (FKTV kvs (ltv : tvs))@@ -1870,27 +1828,3 @@  elemRdr :: Located RdrName -> [Located RdrName] -> Bool elemRdr x = any (eqLocated x)--checkMixedVars :: [Located RdrName] -> [Located RdrName] -> RnM ()--- In (checkMixedVars kvs tvs) we are about to bind the type--- variables tvs, and kvs is the set of free variables of the kinds--- in the scope of the binding.  E.g.---    forall a b. a -> (b::k) -> (c::a)--- Here tv will be {a,b}, and kvs {k,a}.--- Without -XTypeInType we want to complain that 'a' is used both--- as a type and a kind.------ Specifically, check that there is no overlap between kvs and tvs--- See typecheck/should_fail/T11963 for examples------ NB: we do this only at the binding site of 'tvs'.-checkMixedVars kvs tvs-  = do { type_in_type <- xoptM LangExt.TypeInType-       ; unless type_in_type $-         mapM_ check kvs }-  where-    check kv = when (kv `elemRdr` tvs) $-               addErrAt (getLoc kv) $-               vcat [ text "Variable" <+> quotes (ppr kv)-                      <+> text "used as both a kind and a type"-                    , text "Did you intend to use TypeInType?" ]
rename/RnUtils.hs view
@@ -374,7 +374,6 @@   | GHCiCtx   | SpliceTypeCtx (LHsType GhcPs)   | ClassInstanceCtx-  | VectDeclCtx (Located RdrName)   | GenericCtx SDoc   -- Maybe we want to use this more!  withHsDocContext :: HsDocContext -> SDoc -> SDoc@@ -409,5 +408,3 @@    = text "the definition of data constructor" <+> quotes (ppr name) pprHsDocContext (ConDeclCtx names)    = text "the definition of data constructors" <+> interpp'SP names-pprHsDocContext (VectDeclCtx tycon)-   = text "the VECTORISE pragma for type constructor" <+> quotes (ppr tycon)
simplCore/CSE.hs view
@@ -28,7 +28,7 @@ import BasicTypes       ( TopLevelFlag(..), isTopLevel                         , isAlwaysActive, isAnyInlinePragma,                           inlinePragmaSpec, noUserInlineSpec )-import TrieMap+import CoreMap import Util             ( filterOut ) import Data.List        ( mapAccumL ) @@ -276,8 +276,8 @@ each subexpression, but since join points aren't allocated or shared, there's less to gain by trying to CSE them. (#13219) -Note [Don’t tryForCSE the RHS of a Join Point]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [Look inside join-point binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Another way how CSE for joint points is tricky is    let join foo x = (x, 42)@@ -293,9 +293,9 @@ but now bar is a join point that claims arity one, but its right-hand side is not a lambda, breaking the join-point invariant (this was #15002). -Therefore, `cse_bind` will zoom past the lambdas of a join point (using-`collectNBinders`) and resume searching for CSE opportunities only in the body-of the join point.+So `cse_bind` must zoom past the lambdas of a join point (using+`collectNBinders`) and resume searching for CSE opportunities only in+the body of the join point.  Note [CSE for recursive bindings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -372,10 +372,10 @@ cse_bind toplevel env (in_id, in_rhs) out_id   | isTopLevel toplevel, exprIsTickedString in_rhs       -- See Note [Take care with literal strings]-  = (env', (out_id, in_rhs))+  = (env', (out_id', in_rhs))    | Just arity <- isJoinId_maybe in_id-      -- See Note [Don’t tryForCSE the RHS of a Join Point]+      -- See Note [Look inside join-point binders]   = let (params, in_body) = collectNBinders arity in_rhs         (env', params') = addBinders env params         out_body = tryForCSE env' in_body@@ -384,8 +384,8 @@   | otherwise   = (env', (out_id', out_rhs))   where-    out_rhs         = tryForCSE env in_rhs     (env', out_id') = addBinding env in_id out_id out_rhs+    out_rhs         = tryForCSE env in_rhs  addBinding :: CSEnv                      -- Includes InId->OutId cloning            -> InVar                      -- Could be a let-bound type@@ -574,9 +574,9 @@    W y z   -> e2  In the simplifier we use cheapEqExpr, because it is called a lot.-But here in CSE we use the full eqExpr.  After all, two alterantives usually+But here in CSE we use the full eqExpr.  After all, two alternatives usually differ near the root, so it probably isn't expensive to compare the full-alternative.  It seems like the the same kind of thing that CSE is supposed+alternative.  It seems like the same kind of thing that CSE is supposed to be doing, which is why I put it here.  I acutally saw some examples in the wild, where some inlining made e1 too
simplCore/CallArity.hs view
@@ -342,7 +342,7 @@  3. We combine the analysis result from the body and the memoized results for     the arguments (if already present).  4. For each variable, we find out the incoming arity and whether it is called-    once, based on the the current analysis result. If this differs from the+    once, based on the current analysis result. If this differs from the     memoized results, we re-analyse the rhs and update the memoized table.  5. If nothing had to be reanalyzed, we are done.     Otherwise, repeat from step 3.@@ -406,7 +406,7 @@  In practice, there are thunks that do a just little work, such as pattern-matching on a variable, and the benefits of eta-expansion likely-oughtweigh the cost of doing that repeatedly. Therefore, this implementation of+outweigh the cost of doing that repeatedly. Therefore, this implementation of Call Arity considers everything that is not cheap (`exprIsCheap`) as a thunk.  Note [Call Arity and Join Points]@@ -735,7 +735,7 @@ lookupCallArityRes :: CallArityRes -> Var -> (Arity, Bool) lookupCallArityRes (g, ae) v     = case lookupVarEnv ae v of-        Just a -> (a, not (v `elemUnVarSet` (neighbors g v)))+        Just a -> (a, not (g `hasLoopAt` v))         Nothing -> (0, False)  calledWith :: CallArityRes -> Var -> UnVarSet
simplCore/CoreMonad.hs view
@@ -14,7 +14,7 @@     pprPassDetails,      -- * Plugins-    PluginPass, bindsOnlyPass,+    CorePluginPass, bindsOnlyPass,      -- * Counting     SimplCount, doSimplTick, doFreeSimplTick, simplCountN,@@ -55,8 +55,9 @@  import GhcPrelude hiding ( read ) -import Name( Name )-import TcRnMonad        ( initTcForLookup )+import Convert+import RdrName+import Name import CoreSyn import HscTypes import Module@@ -81,6 +82,7 @@ import Data.Ord import Data.Dynamic import Data.IORef+import Data.Maybe import Data.Map (Map) import qualified Data.Map as Map import qualified Data.Map.Strict as MapStrict@@ -88,7 +90,6 @@ import Control.Monad import Control.Applicative ( Alternative(..) ) -import {-# SOURCE #-} TcSplice ( lookupThName_maybe ) import qualified Language.Haskell.TH as TH  {-@@ -107,7 +108,7 @@   = CoreDoSimplify      -- The core-to-core simplifier.         Int                    -- Max iterations         SimplMode-  | CoreDoPluginPass String PluginPass+  | CoreDoPluginPass String CorePluginPass   | CoreDoFloatInwards   | CoreDoFloatOutwards FloatOutSwitches   | CoreLiberateCase@@ -122,7 +123,6 @@   | CoreCSE   | CoreDoRuleCheck CompilerPhase String   -- Check for non-application of rules                                            -- matching this string-  | CoreDoVectorisation   | CoreDoNothing                -- Useful when building up   | CoreDoPasses [CoreToDo]      -- lists of these things @@ -148,7 +148,6 @@   ppr CoreDoSpecialising       = text "Specialise"   ppr CoreDoSpecConstr         = text "SpecConstr"   ppr CoreCSE                  = text "Common sub-expression"-  ppr CoreDoVectorisation      = text "Vectorisation"   ppr CoreDesugar              = text "Desugar (before optimization)"   ppr CoreDesugarOpt           = text "Desugar (after optimization)"   ppr CoreTidy                 = text "Tidy Core"@@ -238,7 +237,7 @@ -}  -- | A description of the plugin pass itself-type PluginPass = ModGuts -> CoreM ModGuts+type CorePluginPass = ModGuts -> CoreM ModGuts  bindsOnlyPass :: (CoreProgram -> CoreM CoreProgram) -> ModGuts -> CoreM ModGuts bindsOnlyPass pass guts@@ -811,6 +810,17 @@ -- to names in the module being compiled, if possible. Exact TH names -- will be bound to the name they represent, exactly. thNameToGhcName :: TH.Name -> CoreM (Maybe Name)-thNameToGhcName th_name = do-    hsc_env <- getHscEnv-    liftIO $ initTcForLookup hsc_env (lookupThName_maybe th_name)+thNameToGhcName th_name+  =  do { names <- mapMaybeM lookup (thRdrNameGuesses th_name)+          -- Pick the first that works+          -- E.g. reify (mkName "A") will pick the class A in preference+          -- to the data constructor A+        ; return (listToMaybe names) }+  where+    lookup rdr_name+      | Just n <- isExact_maybe rdr_name   -- This happens in derived code+      = return $ if isExternalName n then Just n else Nothing+      | Just (rdr_mod, rdr_occ) <- isOrig_maybe rdr_name+      = do { cache <- getOrigNameCache+           ; return $ lookupOrigNameCache cache rdr_mod rdr_occ }+      | otherwise = return Nothing
+ simplCore/CoreMonad.hs-boot view
@@ -0,0 +1,37 @@+-- Created this hs-boot file to remove circular dependencies from the use of+-- Plugins. Plugins needs CoreToDo and CoreM types to define core-to-core+-- transformations.+-- However CoreMonad does much more than defining these, and because Plugins are+-- activated in various modules, the imports become circular. To solve this I+-- extracted CoreToDo and CoreM into this file.+-- I needed to write the whole definition of these types, otherwise it created+-- a data-newtype conflict.++module CoreMonad ( CoreToDo, CoreM ) where++import GhcPrelude++import IOEnv ( IOEnv )+import UniqSupply ( UniqSupply )++newtype CoreState = CoreState {+        cs_uniq_supply :: UniqSupply+}++type CoreIOEnv = IOEnv CoreReader++data CoreReader++newtype CoreWriter = CoreWriter {+        cw_simpl_count :: SimplCount+}++data SimplCount++newtype CoreM a+          = CoreM { unCoreM :: CoreState+                                 -> CoreIOEnv (a, CoreState, CoreWriter) }++instance Monad CoreM++data CoreToDo
simplCore/Exitify.hs view
@@ -48,59 +48,66 @@ import CoreFVs import FastString import Type-import MkCore           ( sortQuantVars )+import Util( mapSnd )  import Data.Bifunctor import Control.Monad  -- | Traverses the AST, simply to find all joinrecs and call 'exitify' on them.+-- The really interesting function is exitifyRec exitifyProgram :: CoreProgram -> CoreProgram exitifyProgram binds = map goTopLvl binds   where     goTopLvl (NonRec v e) = NonRec v (go in_scope_toplvl e)     goTopLvl (Rec pairs) = Rec (map (second (go in_scope_toplvl)) pairs)+      -- Top-level bindings are never join points      in_scope_toplvl = emptyInScopeSet `extendInScopeSetList` bindersOfBinds binds      go :: InScopeSet -> CoreExpr -> CoreExpr-    go _ e@(Var{})       = e-    go _ e@(Lit {})      = e-    go _ e@(Type {})     = e-    go _ e@(Coercion {}) = e+    go _    e@(Var{})       = e+    go _    e@(Lit {})      = e+    go _    e@(Type {})     = e+    go _    e@(Coercion {}) = e+    go in_scope (Cast e' c) = Cast (go in_scope e') c+    go in_scope (Tick t e') = Tick t (go in_scope e')+    go in_scope (App e1 e2) = App (go in_scope e1) (go in_scope e2) -    go in_scope (Lam v e')  = Lam v (go in_scope' e')+    go in_scope (Lam v e')+      = Lam v (go in_scope' e')       where in_scope' = in_scope `extendInScopeSet` v-    go in_scope (App e1 e2) = App (go in_scope e1) (go in_scope e2)+     go in_scope (Case scrut bndr ty alts)-        = Case (go in_scope scrut) bndr ty (map (goAlt in_scope') alts)-      where in_scope' = in_scope `extendInScopeSet` bndr-    go in_scope (Cast e' c) = Cast (go in_scope e') c-    go in_scope (Tick t e') = Tick t (go in_scope e')-    go in_scope (Let bind body) = goBind in_scope bind (go in_scope' body)-      where in_scope' = in_scope `extendInScopeSetList` bindersOf bind+      = Case (go in_scope scrut) bndr ty (map go_alt alts)+      where+        in_scope1 = in_scope `extendInScopeSet` bndr+        go_alt (dc, pats, rhs) = (dc, pats, go in_scope' rhs)+           where in_scope' = in_scope1 `extendInScopeSetList` pats -    goAlt :: InScopeSet -> CoreAlt -> CoreAlt-    goAlt in_scope (dc, pats, rhs) = (dc, pats, go in_scope' rhs)-      where in_scope' = in_scope `extendInScopeSetList` pats+    go in_scope (Let (NonRec bndr rhs) body)+      = Let (NonRec bndr (go in_scope rhs)) (go in_scope' body)+      where+        in_scope' = in_scope `extendInScopeSet` bndr -    goBind :: InScopeSet -> CoreBind -> (CoreExpr -> CoreExpr)-    goBind in_scope (NonRec v rhs) = Let (NonRec v (go in_scope rhs))-    goBind in_scope (Rec pairs)-        | is_join_rec = exitify in_scope' pairs'-        | otherwise   = Let (Rec pairs')-      where pairs' = map (second (go in_scope')) pairs-            is_join_rec = any (isJoinId . fst) pairs-            in_scope' = in_scope `extendInScopeSetList` bindersOf (Rec pairs)+    go in_scope (Let (Rec pairs) body)+      | is_join_rec = mkLets (exitifyRec in_scope' pairs') body'+      | otherwise   = Let (Rec pairs') body'+      where+        is_join_rec = any (isJoinId . fst) pairs+        in_scope'   = in_scope `extendInScopeSetList` bindersOf (Rec pairs)+        pairs'      = mapSnd (go in_scope') pairs+        body'       = go in_scope' body ++-- | State Monad used inside `exitify`+type ExitifyM =  State [(JoinId, CoreExpr)]+ -- | Given a recursive group of a joinrec, identifies “exit paths” and binds them as --   join-points outside the joinrec.-exitify :: InScopeSet -> [(Var,CoreExpr)] -> (CoreExpr -> CoreExpr)-exitify in_scope pairs =-    \body ->mkExitLets exits (mkLetRec pairs' body)+exitifyRec :: InScopeSet -> [(Var,CoreExpr)] -> [CoreBind]+exitifyRec in_scope pairs+  = [ NonRec xid rhs | (xid,rhs) <- exits ] ++ [Rec pairs']   where-    mkExitLets ((exitId, exitRhs):exits') = mkLetNonRec exitId exitRhs . mkExitLets exits'-    mkExitLets [] = id-     -- We need the set of free variables of many subexpressions here, so     -- annotate the AST with them     -- see Note [Calculating free variables]@@ -117,71 +124,31 @@             let rhs' = mkLams args body'             return (x, rhs') -    -- main working function. Goes through the RHS (tail-call positions only),+    ---------------------+    -- 'go' is the main working function.+    -- It goes through the RHS (tail-call positions only),     -- checks if there are no more recursive calls, if so, abstracts over     -- variables bound on the way and lifts it out as a join point.     ---    -- It uses a state monad to keep track of floated binds-    go :: [Var]           -- ^ variables to abstract over-       -> CoreExprWithFVs -- ^ current expression in tail position-       -> State [(Id, CoreExpr)] CoreExpr+    -- ExitifyM is a state monad to keep track of floated binds+    go :: [Var]           -- ^ Variables that are in-scope here, but+                          -- not in scope at the joinrec; that is,+                          -- we must potentially abstract over them.+                          -- Invariant: they are kept in dependency order+       -> CoreExprWithFVs -- ^ Current expression in tail position+       -> ExitifyM CoreExpr +    -- We first look at the expression (no matter what it shape is)+    -- and determine if we can turn it into a exit join point     go captured ann_e-        -- Do not touch an expression that is already a join jump where all arguments-        -- are captured variables. See Note [Idempotency]-        -- But _do_ float join jumps with interesting arguments.-        -- See Note [Jumps can be interesting]-        | (Var f, args) <- collectArgs e-        , isJoinId f-        , all isCapturedVarArg args-        = return e--        -- Do not touch a boring expression (see Note [Interesting expression])-        | is_exit, not is_interesting = return e--        -- Cannot float out if local join points are used, as-        -- we cannot abstract over them-        | is_exit, captures_join_points = return e--        -- We have something to float out!-        | is_exit = do-            -- Assemble the RHS of the exit join point-            let rhs = mkLams args e-                ty = exprType rhs-            let avoid = in_scope `extendInScopeSetList` captured-            -- Remember this binding under a suitable name-            v <- addExit avoid ty (length args) rhs-            -- And jump to it from here-            return $ mkVarApps (Var v) args-      where-        -- An exit expression has no recursive calls-        is_exit = disjointVarSet fvs recursive_calls--        -- Used to detect exit expressoins that are already proper exit jumps-        isCapturedVarArg (Var v) = v `elem` captured-        isCapturedVarArg _ = False--        -- An interesting exit expression has free, non-imported-        -- variables from outside the recursive group-        -- See Note [Interesting expression]-        is_interesting = anyVarSet isLocalId (fvs `minusVarSet` mkVarSet captured)--        -- The possible arguments of this exit join point-        args =-            map zap $-            sortQuantVars $-            filter (`elemVarSet` fvs) captured--        -- cf. SetLevels.abstractVars-        zap v | isId v = setIdInfo v vanillaIdInfo-              | otherwise = v--        -- We cannot abstract over join points-        captures_join_points = any isJoinId args--        e = deAnnotate ann_e-        fvs = dVarSetToVarSet (freeVarsOf ann_e)+        | -- An exit expression has no recursive calls+          let fvs = dVarSetToVarSet (freeVarsOf ann_e)+        , disjointVarSet fvs recursive_calls+        = go_exit captured (deAnnotate ann_e) fvs +    -- We could not turn it into a exit joint point. So now recurse+    -- into all expression where eligible exit join points might sit,+    -- i.e. into all tail-call positions:      -- Case right hand sides are in tail-call position     go captured (_, AnnCase scrut bndr ty alts) = do@@ -219,9 +186,74 @@              return $ Let bind body'       where bind = deAnnBind ann_bind +    -- Cannot be turned into an exit join point, but also has no+    -- tail-call subexpression. Nothing to do here.     go _ ann_e = return (deAnnotate ann_e) +    ---------------------+    go_exit :: [Var]      -- Variables captured locally+            -> CoreExpr   -- An exit expression+            -> VarSet     -- Free vars of the expression+            -> ExitifyM CoreExpr+    -- go_exit deals with a tail expression that is floatable+    -- out as an exit point; that is, it mentions no recursive calls+    go_exit captured e fvs+      -- Do not touch an expression that is already a join jump where all arguments+      -- are captured variables. See Note [Idempotency]+      -- But _do_ float join jumps with interesting arguments.+      -- See Note [Jumps can be interesting]+      | (Var f, args) <- collectArgs e+      , isJoinId f+      , all isCapturedVarArg args+      = return e +      -- Do not touch a boring expression (see Note [Interesting expression])+      | not is_interesting+      = return e++      -- Cannot float out if local join points are used, as+      -- we cannot abstract over them+      | captures_join_points+      = return e++      -- We have something to float out!+      | otherwise+      = do { -- Assemble the RHS of the exit join point+             let rhs   = mkLams abs_vars e+                 avoid = in_scope `extendInScopeSetList` captured+             -- Remember this binding under a suitable name+           ; v <- addExit avoid (length abs_vars) rhs+             -- And jump to it from here+           ; return $ mkVarApps (Var v) abs_vars }++      where+        -- Used to detect exit expressoins that are already proper exit jumps+        isCapturedVarArg (Var v) = v `elem` captured+        isCapturedVarArg _ = False++        -- An interesting exit expression has free, non-imported+        -- variables from outside the recursive group+        -- See Note [Interesting expression]+        is_interesting = anyVarSet isLocalId $+                         fvs `minusVarSet` mkVarSet captured++        -- The arguments of this exit join point+        -- See Note [Picking arguments to abstract over]+        abs_vars = snd $ foldr pick (fvs, []) captured+          where+            pick v (fvs', acc) | v `elemVarSet` fvs' = (fvs' `delVarSet` v, zap v : acc)+                               | otherwise           = (fvs',               acc)++        -- We are going to abstract over these variables, so we must+        -- zap any IdInfo they have; see Trac #15005+        -- cf. SetLevels.abstractVars+        zap v | isId v = setIdInfo v vanillaIdInfo+              | otherwise = v++        -- We cannot abstract over join points+        captures_join_points = any isJoinId abs_vars++ -- Picks a new unique, which is disjoint from --  * the free variables of the whole joinrec --  * any bound variables (captured)@@ -235,30 +267,19 @@   where     exit_id_tmpl = mkSysLocal (fsLit "exit") initExitJoinUnique ty                     `asJoinId` join_arity-                    `setIdOccInfo` exit_occ_info -    -- See Note [Do not inline exit join points]-    exit_occ_info =-        OneOcc { occ_in_lam = True-               , occ_one_br = True-               , occ_int_cxt = False-               , occ_tail = AlwaysTailCalled join_arity }--addExit :: InScopeSet -> Type -> JoinArity -> CoreExpr -> ExitifyM JoinId-addExit in_scope ty join_arity rhs = do+addExit :: InScopeSet -> JoinArity -> CoreExpr -> ExitifyM JoinId+addExit in_scope join_arity rhs = do     -- Pick a suitable name+    let ty = exprType rhs     v <- mkExitJoinId in_scope ty join_arity     fs <- get     put ((v,rhs):fs)     return v --type ExitifyM =  State [(JoinId, CoreExpr)]- {- Note [Interesting expression] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- We do not want this to happen:    joinrec go 0     x y = x@@ -299,7 +320,6 @@  Note [Jumps can be interesting] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- A jump to a join point can be interesting, if its arguments contain free non-exported variables (z in the following example): @@ -312,16 +332,34 @@           go (n-1) x y = jump go (n-1) (x+y)  -The join point itself can be interesting, even if none if-its arguments are (assume `g` to be an imported function that, on its own, does-not make this interesting):+The join point itself can be interesting, even if none if its+arguments have free variables free in the joinrec.  For example +  join j p = case p of (x,y) -> x+y+  joinrec go 0     x y = jump j (x,y)+          go (n-1) x y = jump go (n-1) (x+y) y+  in …++Here, `j` would not be inlined because we do not inline something that looks+like an exit join point (see Note [Do not inline exit join points]). But+if we exitify the 'jump j (x,y)' we get++  join j p = case p of (x,y) -> x+y+  join exit x y = jump j (x,y)+  joinrec go 0     x y = jump exit x y+          go (n-1) x y = jump go (n-1) (x+y) y+  in …++and now 'j' can inline, and we get rid of the pair. Here's another+example (assume `g` to be an imported function that, on its own,+does not make this interesting):+   join j y = map f y   joinrec go 0     x y = jump j (map g x)           go (n-1) x y = jump go (n-1) (x+y)   in … -Here, `j` would not be inlined because we do not inline something that looks+Again, `j` would not be inlined because we do not inline something that looks like an exit join point (see Note [Do not inline exit join points]).  But after exitification we have@@ -361,7 +399,6 @@  Note [Calculating free variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- We have two options where to annotate the tree with free variables:   A) The whole tree.@@ -374,10 +411,11 @@ Further downside of A: If the exitify function returns annotated expressions, it would have to ensure that the annotations are correct. +We therefore choose B, and calculate the free variables in `exitify`. + Note [Do not inline exit join points] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- When we have    let t = foo bar@@ -393,7 +431,8 @@ inlining.  Exit join points, recognizeable using `isExitJoinId` are join points with an-occurence in a recursive group, and can be recognized using `isExitJoinId`.+occurence in a recursive group, and can be recognized (after the occurence+analyzer ran!) using `isExitJoinId`. This function detects joinpoints with `occ_in_lam (idOccinfo id) == True`, because the lambdas of a non-recursive join point are not considered for `occ_in_lam`.  For example, in the following code, `j1` is /not/ marked@@ -402,16 +441,13 @@   join j1 x = x+1   join j2 y = join j1 (y+2) -We create exit join point ids with such an `OccInfo`, see `exit_occ_info`.--To prevent inlining, we check for that in `preInlineUnconditionally` directly.-For `postInlineUnconditionally` and unfolding-based inlining, the function-`simplLetUnfolding` simply gives exit join points no unfolding, which prevents-this kind of inlining.+To prevent inlining, we check for isExitJoinId+* In `preInlineUnconditionally` directly.+* In `simplLetUnfolding` we simply give exit join points no unfolding, which+  prevents inlining in `postInlineUnconditionally` and call sites.  Note [Placement of the exitification pass] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- I (Joachim) experimented with multiple positions for the Exitification pass in the Core2Core pipeline: @@ -446,5 +482,18 @@  Assuming we have a budget of _one_ run of Exitification, then C wins (but we could get more from running it multiple times, as seen in fish).++Note [Picking arguments to abstract over]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++When we create an exit join point, so we need to abstract over those of its+free variables that are be out-of-scope at the destination of the exit join+point. So we go through the list `captured` and pick those that are actually+free variables of the join point.++We do not just `filter (`elemVarSet` fvs) captured`, as there might be+shadowing, and `captured` may contain multiple variables with the same Unique. I+these cases we want to abstract only over the last occurence, hence the `foldr`+(with emphasis on the `r`). This is #15110.  -}
simplCore/LiberateCase.hs view
@@ -14,6 +14,7 @@ import DynFlags import CoreSyn import CoreUnfold       ( couldBeSmallEnoughToInline )+import TysWiredIn       ( unitDataConId ) import Id import VarEnv import Util             ( notNull )@@ -68,24 +69,6 @@ despite the cast.  See mk_alt_env in the Case branch of libCase.  -Note [Only functions!]-~~~~~~~~~~~~~~~~~~~~~~-Consider the following code--       f = g (case v of V a b -> a : t f)--where g is expensive. If we aren't careful, liberate case will turn this into--       f = g (case v of-               V a b -> a : t (letrec f = g (case v of V a b -> a : f t)-                                in f)-             )--Yikes! We evaluate g twice. This leads to a O(2^n) explosion-if g calls back to the same code recursively.--Solution: make sure that we only do the liberate-case thing on *functions*- To think about (Apr 94) ~~~~~~~~~~~~~~ Main worry: duplicating code excessively.  At the moment we duplicate@@ -156,18 +139,63 @@         -- We extend the rec-env by binding each Id to its rhs, first         -- processing the rhs with an *un-extended* environment, so         -- that the same process doesn't occur for ever!-    env_rhs = addRecBinds env [ (localiseId binder, libCase env_body rhs)-                              | (binder, rhs) <- pairs-                              , rhs_small_enough binder rhs ]+    env_rhs | is_dupable_bind = addRecBinds env dup_pairs+            | otherwise       = env++    dup_pairs = [ (localiseId binder, libCase env_body rhs)+                | (binder, rhs) <- pairs ]         -- localiseID : see Note [Need to localiseId in libCaseBind] +    is_dupable_bind = small_enough && all ok_pair pairs -    rhs_small_enough id rhs     -- Note [Small enough]-        =  idArity id > 0       -- Note [Only functions!]-        && maybe True (\size -> couldBeSmallEnoughToInline (lc_dflags env) size rhs)-                      (bombOutSize env)+    -- Size: we are going to duplicate dup_pairs; to find their+    --       size, build a fake binding (let { dup_pairs } in (),+    --       and find the size of that+    -- See Note [Small enough]+    small_enough = case bombOutSize env of+                      Nothing   -> True   -- Infinity+                      Just size -> couldBeSmallEnoughToInline (lc_dflags env) size $+                                   Let (Rec dup_pairs) (Var unitDataConId) -{-+    ok_pair (id,_)+        =  idArity id > 0          -- Note [Only functions!]+        && not (isBottomingId id)  -- Note [Not bottoming ids]++{- Note [Not bottoming Ids]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Do not specialise error-functions (this is unusual, but I once saw it,+(acually in Data.Typable.Internal)++Note [Only functions!]+~~~~~~~~~~~~~~~~~~~~~~+Consider the following code++       f = g (case v of V a b -> a : t f)++where g is expensive. If we aren't careful, liberate case will turn this into++       f = g (case v of+               V a b -> a : t (letrec f = g (case v of V a b -> a : f t)+                                in f)+             )++Yikes! We evaluate g twice. This leads to a O(2^n) explosion+if g calls back to the same code recursively.++Solution: make sure that we only do the liberate-case thing on *functions*++Note [Small enough]+~~~~~~~~~~~~~~~~~~~+Consider+  \fv. letrec+         f = \x. BIG...(case fv of { (a,b) -> ...g.. })...+         g = \y. SMALL...f...++Then we *can* in principle do liberate-case on 'g' (small RHS) but not+for 'f' (too big).  But doing so is not profitable, because duplicating+'g' at its call site in 'f' doesn't get rid of any cases.  So we just+ask for the whole group to be small enough.+ Note [Need to localiseId in libCaseBind] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The call to localiseId is needed for two subtle reasons@@ -180,16 +208,6 @@ (b)  Make the name an Internal one.  External Names should never be         nested; if it were floated to the top level, we'd get a name         clash at code generation time.--Note [Small enough]-~~~~~~~~~~~~~~~~~~~-Consider-  \fv. letrec-         f = \x. BIG...(case fv of { (a,b) -> ...g.. })...-         g = \y. SMALL...f...-Then we *can* do liberate-case on g (small RHS) but not for f (too big).-But we can choose on a item-by-item basis, and that's what the-rhs_small_enough call in the comprehension for env_rhs does.  Expressions ~~~~~~~~~~~
simplCore/OccurAnal.hs view
@@ -59,11 +59,12 @@ Here's the externally-callable interface: -} -occurAnalysePgm :: Module       -- Used only in debug output-                -> (Activation -> Bool)-                -> [CoreRule] -> [CoreVect] -> VarSet+occurAnalysePgm :: Module         -- Used only in debug output+                -> (Id -> Bool)         -- Active unfoldings+                -> (Activation -> Bool) -- Active rules+                -> [CoreRule]                 -> CoreProgram -> CoreProgram-occurAnalysePgm this_mod active_rule imp_rules vects vectVars binds+occurAnalysePgm this_mod active_unf active_rule imp_rules binds   | isEmptyDetails final_usage   = occ_anald_binds @@ -72,7 +73,9 @@                    2 (ppr final_usage ) )     occ_anald_glommed_binds   where-    init_env = initOccEnv active_rule+    init_env = initOccEnv { occ_rule_act = active_rule+                          , occ_unf_act  = active_unf }+     (final_usage, occ_anald_binds) = go init_env binds     (_, occ_anald_glommed_binds)   = occAnalRecBind init_env TopLevel                                                     imp_rule_edges@@ -83,12 +86,8 @@           -- we can easily create an infinite loop (Trac #9583 is an example)      initial_uds = addManyOccsSet emptyDetails-                            (rulesFreeVars imp_rules `unionVarSet`-                             vectsFreeVars vects `unionVarSet`-                             vectVars)-    -- The RULES and VECTORISE declarations keep things alive! (For VECTORISE declarations,-    -- we only get them *until* the vectoriser runs. Afterwards, these dependencies are-    -- reflected in 'vectors' — see Note [Vectorisation declarations and occurrences].)+                            (rulesFreeVars imp_rules)+    -- The RULES declarations keep things alive!      -- Note [Preventing loops due to imported functions rules]     imp_rule_edges = foldr (plusVarEnv_C unionVarSet) emptyVarEnv@@ -121,9 +120,7 @@ occurAnalyseExpr' enable_binder_swap expr   = snd (occAnal env expr)   where-    env = (initOccEnv all_active_rules) {occ_binder_swap = enable_binder_swap}-    -- To be conservative, we say that all inlines and rules are active-    all_active_rules = \_ -> True+    env = initOccEnv { occ_binder_swap = enable_binder_swap }  {- Note [Plugin rules] ~~~~~~~~~~~~~~~~~~~~~~@@ -701,39 +698,6 @@ This appears to be very rare in practice. TODO Perhaps we should gather statistics to be sure. -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 x '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' x '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' x '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.- ------------------------------------------------------------ Note [Adjusting right-hand sides] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -804,7 +768,7 @@   = (body_usage, [])    | otherwise                   -- It's mentioned in the body-  = (body_usage' +++ rhs_usage', [NonRec tagged_binder rhs'])+  = (body_usage' `andUDs` rhs_usage', [NonRec tagged_binder rhs'])   where     (body_usage', tagged_binder) = tagNonRecBinder lvl body_usage binder     mb_join_arity = willBeJoinId_maybe tagged_binder@@ -819,16 +783,17 @@     -- Unfoldings     -- See Note [Unfoldings and join points]     rhs_usage2 = case occAnalUnfolding env NonRecursive binder of-                   Just unf_usage -> rhs_usage1 +++ unf_usage+                   Just unf_usage -> rhs_usage1 `andUDs` unf_usage                    Nothing        -> rhs_usage1      -- Rules     -- See Note [Rules are extra RHSs] and Note [Rule dependency info]     rules_w_uds = occAnalRules env mb_join_arity NonRecursive tagged_binder-    rhs_usage3 = rhs_usage2 +++ combineUsageDetailsList-                                  (map (\(_, l, r) -> l +++ r) rules_w_uds)-    rhs_usage4 = maybe rhs_usage3 (addManyOccsSet rhs_usage3) $-                 lookupVarEnv imp_rule_edges binder+    rule_uds    = map (\(_, l, r) -> l `andUDs` r) rules_w_uds+    rhs_usage3 = foldr andUDs rhs_usage2 rule_uds+    rhs_usage4 = case lookupVarEnv imp_rule_edges binder of+                   Nothing -> rhs_usage3+                   Just vs -> addManyOccsSet rhs_usage3 vs        -- See Note [Preventing loops due to imported functions rules]      -- Final adjustment@@ -838,7 +803,7 @@ occAnalRecBind :: OccEnv -> TopLevelFlag -> ImpRuleEdges -> [(Var,CoreExpr)]                -> UsageDetails -> (UsageDetails, [CoreBind]) occAnalRecBind env lvl imp_rule_edges pairs body_usage-  = foldr (occAnalRec lvl) (body_usage, []) sccs+  = foldr (occAnalRec env lvl) (body_usage, []) sccs         -- For a recursive group, we         --      * occ-analyse all the RHSs         --      * compute strongly-connected components@@ -865,20 +830,20 @@ -}  ------------------------------occAnalRec :: TopLevelFlag+occAnalRec :: OccEnv -> TopLevelFlag            -> SCC Details            -> (UsageDetails, [CoreBind])            -> (UsageDetails, [CoreBind])          -- The NonRec case is just like a Let (NonRec ...) above-occAnalRec lvl (AcyclicSCC (ND { nd_bndr = bndr, nd_rhs = rhs-                               , nd_uds = rhs_uds, nd_rhs_bndrs = rhs_bndrs }))+occAnalRec _ lvl (AcyclicSCC (ND { nd_bndr = bndr, nd_rhs = rhs+                                 , nd_uds = rhs_uds, nd_rhs_bndrs = rhs_bndrs }))            (body_uds, binds)   | not (bndr `usedIn` body_uds)   = (body_uds, binds)           -- See Note [Dead code]    | otherwise                   -- It's mentioned in the body-  = (body_uds' +++ rhs_uds',+  = (body_uds' `andUDs` rhs_uds',      NonRec tagged_bndr rhs : binds)   where     (body_uds', tagged_bndr) = tagNonRecBinder lvl body_uds bndr@@ -888,7 +853,7 @@         -- The Rec case is the interesting one         -- See Note [Recursive bindings: the grand plan]         -- See Note [Loop breaking]-occAnalRec lvl (CyclicSCC details_s) (body_uds, binds)+occAnalRec env lvl (CyclicSCC details_s) (body_uds, binds)   | not (any (`usedIn` body_uds) bndrs) -- NB: look at body_uds, not total_uds   = (body_uds, binds)                   -- See Note [Dead code] @@ -907,7 +872,7 @@     final_uds :: UsageDetails     loop_breaker_nodes :: [LetrecNode]     (final_uds, loop_breaker_nodes)-      = mkLoopBreakerNodes lvl bndr_set body_uds details_s+      = mkLoopBreakerNodes env lvl bndr_set body_uds details_s      ------------------------------     weak_fvs :: VarSet@@ -1247,11 +1212,11 @@     (bndrs, body) = collectBinders rhs     (rhs_usage1, bndrs', body') = occAnalRecRhs env bndrs body     rhs' = mkLams bndrs' body'-    rhs_usage2 = rhs_usage1 +++ all_rule_uds+    rhs_usage2 = foldr andUDs rhs_usage1 rule_uds                    -- Note [Rules are extra RHSs]                    -- Note [Rule dependency info]     rhs_usage3 = case mb_unf_uds of-                   Just unf_uds -> rhs_usage2 +++ unf_uds+                   Just unf_uds -> rhs_usage2 `andUDs` unf_uds                    Nothing      -> rhs_usage2     node_fvs = udFreeVars bndr_set rhs_usage3 @@ -1267,8 +1232,7 @@       -- See Note [Preventing loops due to imported functions rules]                       [ (ru_act rule, udFreeVars bndr_set rhs_uds)                       | (rule, _, rhs_uds) <- rules_w_uds ]-    all_rule_uds = combineUsageDetailsList $-                     concatMap (\(_, l, r) -> [l, r]) rules_w_uds+    rule_uds = map (\(_, l, r) -> l `andUDs` r) rules_w_uds     active_rule_fvs = unionVarSets [fvs | (a,fvs) <- rules_w_rhs_fvs                                         , is_active a] @@ -1284,7 +1248,7 @@                       -- isn't the right thing (it tells about                       -- RULE activation), so we'd need more plumbing -mkLoopBreakerNodes :: TopLevelFlag+mkLoopBreakerNodes :: OccEnv -> TopLevelFlag                    -> VarSet                    -> UsageDetails   -- for BODY of let                    -> [Details]@@ -1297,7 +1261,7 @@ --      the loop-breaker SCC analysis --   d) adjust each RHS's usage details according to --      the binder's (new) shotness and join-point-hood-mkLoopBreakerNodes lvl bndr_set body_uds details_s+mkLoopBreakerNodes env lvl bndr_set body_uds details_s   = (final_uds, zipWith mk_lb_node details_s bndrs')   where     (final_uds, bndrs') = tagRecBinders lvl body_uds@@ -1313,7 +1277,7 @@               -- Note [Deterministic SCC] in Digraph.       where         nd'     = nd { nd_bndr = bndr', nd_score = score }-        score   = nodeScore bndr bndr' rhs lb_deps+        score   = nodeScore env bndr bndr' rhs lb_deps         lb_deps = extendFvs_ rule_fv_env inl_fvs      rule_fv_env :: IdEnv IdSet@@ -1329,18 +1293,22 @@   -------------------------------------------nodeScore :: Id        -- Binder has old occ-info (just for loop-breaker-ness)+nodeScore :: OccEnv+          -> Id        -- Binder has old occ-info (just for loop-breaker-ness)           -> Id        -- Binder with new occ-info           -> CoreExpr  -- RHS           -> VarSet    -- Loop-breaker dependencies           -> NodeScore-nodeScore old_bndr new_bndr bind_rhs lb_deps+nodeScore env old_bndr new_bndr bind_rhs lb_deps   | not (isId old_bndr)     -- A type or cercion variable is never a loop breaker   = (100, 0, False)    | old_bndr `elemVarSet` lb_deps  -- Self-recursive things are great loop breakers   = (0, 0, True)                   -- See Note [Self-recursion and loop breakers] +  | not (occ_unf_act env old_bndr) -- A binder whose inlining is inactive (e.g. has+  = (0, 0, True)                   -- a NOINLINE pragam) makes a great loop breaker+   | exprIsTrivial rhs   = mk_score 10  -- Practically certain to be inlined     -- Used to have also: && not (isExportedId bndr)@@ -1600,7 +1568,7 @@       DFunUnfolding { df_bndrs = bndrs, df_args = args }         -> Just $ zapDetails (delDetailsList usage bndrs)         where-          usage = foldr (+++) emptyDetails (map (fst . occAnal env) args)+          usage = andUDsList (map (fst . occAnal env) args)        _ -> Nothing @@ -1736,7 +1704,7 @@   = (markAllNonTailCalled usage, Tick tickish body')    | Breakpoint _ ids <- tickish-  = (usage_lam +++ foldr addManyOccs emptyDetails ids, Tick tickish body')+  = (usage_lam `andUDs` foldr addManyOccs emptyDetails ids, Tick tickish body')     -- never substitute for any of the Ids in a Breakpoint    | otherwise@@ -1756,12 +1724,12 @@ occAnal env (Cast expr co)   = case occAnal env expr of { (usage, expr') ->     let usage1 = zapDetailsIf (isRhsEnv env) usage+          -- usage1: if we see let x = y `cast` co+          -- then mark y as 'Many' so that we don't+          -- immediately inline y again.         usage2 = addManyOccsSet usage1 (coVarsOfCo co)-          -- See Note [Gather occurrences of coercion variables]+          -- usage2: see Note [Gather occurrences of coercion variables]     in (markAllNonTailCalled usage2, Cast expr' co)-        -- If we see let x = y `cast` co-        -- then mark y as 'Many' so that we don't-        -- immediately inline y again.     }  occAnal env app@(App _ _)@@ -1803,30 +1771,13 @@   = case occ_anal_scrut scrut alts     of { (scrut_usage, scrut') ->     case mapAndUnzip occ_anal_alt alts of { (alts_usage_s, alts')   ->     let-        alts_usage  = foldr combineAltsUsageDetails emptyDetails alts_usage_s-        (alts_usage1, tagged_bndr) = tag_case_bndr alts_usage bndr-        total_usage = markAllNonTailCalled scrut_usage +++ alts_usage1+        alts_usage  = foldr orUDs emptyDetails alts_usage_s+        (alts_usage1, tagged_bndr) = tagLamBinder alts_usage bndr+        total_usage = markAllNonTailCalled scrut_usage `andUDs` alts_usage1                         -- Alts can have tail calls, but the scrutinee can't     in     total_usage `seq` (total_usage, Case scrut' tagged_bndr ty alts') }}   where-        -- Note [Case binder usage]-        -- ~~~~~~~~~~~~~~~~~~~~~~~~-        -- The case binder gets a usage of either "many" or "dead", never "one".-        -- Reason: we like to inline single occurrences, to eliminate a binding,-        -- but inlining a case binder *doesn't* eliminate a binding.-        -- We *don't* want to transform-        --      case x of w { (p,q) -> f w }-        -- into-        --      case x of w { (p,q) -> f (p,q) }-    tag_case_bndr usage bndr-      = (usage', setIdOccInfo bndr final_occ_info)-      where-        occ_info       = lookupDetails usage bndr-        usage'         = usage `delDetails` bndr-        final_occ_info = case occ_info of IAmDead -> IAmDead-                                          _       -> noOccInfo-     alt_env = mkAltEnv env scrut bndr     occ_anal_alt = occAnalAlt alt_env @@ -1865,7 +1816,7 @@   = case argCtxt env one_shots           of { (arg_env, one_shots') ->     case occAnal arg_env arg             of { (uds1, arg') ->     case occAnalArgs env args one_shots' of { (uds2, args') ->-    (uds1 +++ uds2, arg':args') }}}+    (uds1 `andUDs` uds2, arg':args') }}}  {- Applications are dealt with specially because we want@@ -1891,7 +1842,7 @@   | null ticks = (uds, mkApps (Var fun) args')   | otherwise  = (uds, mkTicks ticks $ mkApps (Var fun) args')   where-    uds = fun_uds +++ final_args_uds+    uds = fun_uds `andUDs` final_args_uds      !(args_uds, args') = occAnalArgs env args one_shots     !final_args_uds@@ -1921,7 +1872,7 @@         -- See Note [Sources of one-shot information], bullet point A']  occAnalApp env (fun, args, ticks)-  = (markAllNonTailCalled (fun_uds +++ args_uds),+  = (markAllNonTailCalled (fun_uds `andUDs` args_uds),      mkTicks ticks $ mkApps fun' args')   where     !(fun_uds, fun') = occAnal (addAppCtxt env args) fun@@ -2055,10 +2006,9 @@ occAnalAlt (env, scrut_bind) (con, bndrs, rhs)   = case occAnal env rhs of { (rhs_usage1, rhs1) ->     let-        (alt_usg, tagged_bndrs) = tagLamBinders rhs_usage1 bndrs-                                  -- See Note [Binders in case alternatives]-        (alt_usg', rhs2) =-          wrapAltRHS env scrut_bind alt_usg tagged_bndrs rhs1+      (alt_usg, tagged_bndrs) = tagLamBinders rhs_usage1 bndrs+                                -- See Note [Binders in case alternatives]+      (alt_usg', rhs2) = wrapAltRHS env scrut_bind alt_usg tagged_bndrs rhs1     in     (alt_usg', (con, tagged_bndrs, rhs2)) } @@ -2073,16 +2023,20 @@   , scrut_var `usedIn` alt_usg -- bndrs are not be present in alt_usg so this                                -- handles condition (a) in Note [Binder swap]   , not captured               -- See condition (b) in Note [Binder swap]-  = ( alt_usg' +++ let_rhs_usg+  = ( alt_usg' `andUDs` let_rhs_usg     , Let (NonRec tagged_scrut_var let_rhs') alt_rhs )   where-    captured = any (`usedIn` let_rhs_usg) bndrs+    captured = any (`usedIn` let_rhs_usg) bndrs  -- Check condition (b)+     -- The rhs of the let may include coercion variables     -- if the scrutinee was a cast, so we must gather their     -- usage. See Note [Gather occurrences of coercion variables]+    -- Moreover, the rhs of the let may mention the case-binder, and+    -- we want to gather its occ-info as well     (let_rhs_usg, let_rhs') = occAnal env let_rhs-    (alt_usg', [tagged_scrut_var]) = tagLamBinders alt_usg [scrut_var] +    (alt_usg', tagged_scrut_var) = tagLamBinder alt_usg scrut_var+ wrapAltRHS _ _ alt_usg _ alt_rhs   = (alt_usg, alt_rhs) @@ -2098,8 +2052,12 @@   = OccEnv { occ_encl       :: !OccEncl      -- Enclosing context information            , occ_one_shots  :: !OneShots     -- See Note [OneShots]            , occ_gbl_scrut  :: GlobalScruts++           , occ_unf_act   :: Id -> Bool   -- Which Id unfoldings are active+            , occ_rule_act   :: Activation -> Bool   -- Which rules are active              -- See Note [Finding rule RHS free vars]+            , occ_binder_swap :: !Bool -- enable the binder_swap              -- See CorePrep Note [Dead code in CorePrep]     }@@ -2112,7 +2070,7 @@ --      x = (p,q)               -- Don't inline p or q --      y = /\a -> (p a, q a)   -- Still don't inline p or q --      z = f (p,q)             -- Do inline p,q; it may make a rule fire--- So OccEncl tells enought about the context to know what to do when+-- So OccEncl tells enough about the context to know what to do when -- we encounter a constructor application or PAP.  data OccEncl@@ -2128,12 +2086,15 @@ -- See note [OneShots] type OneShots = [OneShotInfo] -initOccEnv :: (Activation -> Bool) -> OccEnv-initOccEnv active_rule+initOccEnv :: OccEnv+initOccEnv   = OccEnv { occ_encl      = OccVanilla            , occ_one_shots = []            , occ_gbl_scrut = emptyVarSet-           , occ_rule_act  = active_rule+                 -- To be conservative, we say that all+                 -- inlines and rules are active+           , occ_unf_act   = \_ -> True+           , occ_rule_act  = \_ -> True            , occ_binder_swap = True }  vanillaCtxt :: OccEnv -> OccEnv@@ -2191,7 +2152,12 @@       Just n  -> go n bndrs  where    go 0 bndrs  = bndrs-   go _ []     = WARN( True, ppr mb_join_arity <+> ppr bndrs ) []+   go _ []     = [] -- This can legitimately happen.+                    -- e.g.    let j = case ... in j True+                    -- This will become an arity-1 join point after the+                    -- simplifier has eta-expanded it; but it may not have+                    -- enough lambdas /yet/. (Lint checks that JoinIds do+                    -- have enough lambdas.)    go n (b:bs) = b' : go (n-1) bs      where        b' | isId b    = setOneShotLambda b@@ -2392,10 +2358,10 @@ -}  mkAltEnv :: OccEnv -> CoreExpr -> Id -> (OccEnv, Maybe (Id, CoreExpr))--- Does two things: a) makes the occ_one_shots = OccVanilla---                  b) extends the GlobalScruts if possible---                  c) returns a proxy mapping, binding the scrutinee---                     to the case binder, if possible+-- Does three things: a) makes the occ_one_shots = OccVanilla+--                    b) extends the GlobalScruts if possible+--                    c) returns a proxy mapping, binding the scrutinee+--                       to the case binder, if possible mkAltEnv env@(OccEnv { occ_gbl_scrut = pe }) scrut case_bndr   = case stripTicksTopE (const True) scrut of       Var v           -> add_scrut v case_bndr'@@ -2404,16 +2370,20 @@       _               -> (env { occ_encl = OccVanilla }, Nothing)    where-    add_scrut v rhs = ( env { occ_encl = OccVanilla, occ_gbl_scrut = pe `extendVarSet` v }+    add_scrut v rhs = ( env { occ_encl = OccVanilla+                            , occ_gbl_scrut = pe `extendVarSet` v }                       , Just (localise v, rhs) ) -    case_bndr' = Var (zapIdOccInfo case_bndr) -- See Note [Zap case binders in proxy bindings]-    localise scrut_var = mkLocalIdOrCoVar (localiseName (idName scrut_var)) (idType scrut_var)-        -- Localise the scrut_var before shadowing it; we're making a-        -- new binding for it, and it might have an External Name, or-        -- even be a GlobalId; Note [Binder swap on GlobalId scrutinees]-        -- Also we don't want any INLINE or NOINLINE pragmas!+    case_bndr' = Var (zapIdOccInfo case_bndr)+                   -- See Note [Zap case binders in proxy bindings] +    -- Localise the scrut_var before shadowing it; we're making a+    -- new binding for it, and it might have an External Name, or+    -- even be a GlobalId; Note [Binder swap on GlobalId scrutinees]+    -- Also we don't want any INLINE or NOINLINE pragmas!+    localise scrut_var = mkLocalIdOrCoVar (localiseName (idName scrut_var))+                                          (idType scrut_var)+ {- ************************************************************************ *                                                                      *@@ -2457,13 +2427,13 @@ ------------------- -- UsageDetails API -(+++), combineAltsUsageDetails+andUDs, orUDs         :: UsageDetails -> UsageDetails -> UsageDetails-(+++) = combineUsageDetailsWith addOccInfo-combineAltsUsageDetails = combineUsageDetailsWith orOccInfo+andUDs = combineUsageDetailsWith addOccInfo+orUDs  = combineUsageDetailsWith orOccInfo -combineUsageDetailsList :: [UsageDetails] -> UsageDetails-combineUsageDetailsList = foldl (+++) emptyDetails+andUDsList :: [UsageDetails] -> UsageDetails+andUDsList = foldl andUDs emptyDetails  mkOneOcc :: OccEnv -> Id -> InterestingCxt -> JoinArity -> UsageDetails mkOneOcc env id int_cxt arity@@ -2612,14 +2582,21 @@               -> [Id]                  -- Binders               -> (UsageDetails,        -- Details with binders removed                  [IdWithOccInfo])    -- Tagged binders+tagLamBinders usage binders+  = usage' `seq` (usage', bndrs')+  where+    (usage', bndrs') = mapAccumR tagLamBinder usage binders++tagLamBinder :: UsageDetails       -- Of scope+             -> Id                 -- Binder+             -> (UsageDetails,     -- Details with binder removed+                 IdWithOccInfo)    -- Tagged binders -- Used for lambda and case binders -- It copes with the fact that lambda bindings can have a -- stable unfolding, used for join points-tagLamBinders usage binders = usage' `seq` (usage', bndrs')+tagLamBinder usage bndr+  = (usage2, bndr')   where-    (usage', bndrs') = mapAccumR tag_lam usage binders-    tag_lam usage bndr = (usage2, bndr')-      where         occ    = lookupDetails usage bndr         bndr'  = setBinderOcc (markNonTailCalled occ) bndr                    -- Don't try to make an argument into a join point@@ -2664,7 +2641,7 @@       -- 1. Determine join-point-hood of whole group, as determined by      --    the *unadjusted* usage details-     unadj_uds     = body_uds +++ combineUsageDetailsList rhs_udss+     unadj_uds     = foldr andUDs body_uds rhs_udss      will_be_joins = decideJoinPointHood lvl unadj_uds bndrs       -- 2. Adjust usage details of each RHS, taking into account the@@ -2685,7 +2662,7 @@              Nothing                   -- we are making join points!       -- 3. Compute final usage details from adjusted RHS details-     adj_uds   = body_uds +++ combineUsageDetailsList rhs_udss'+     adj_uds   = foldr andUDs body_uds rhs_udss'       -- 4. Tag each binder with its adjusted details      bndrs'    = [ setBinderOcc (lookupDetails adj_uds bndr) bndr@@ -2740,14 +2717,18 @@     ok bndr       | -- Invariant 1: Only tail calls, all same join arity         AlwaysTailCalled arity <- tailCallInfo (lookupDetails usage bndr)+       , -- Invariant 1 as applied to LHSes of rules         all (ok_rule arity) (idCoreRules bndr)+         -- Invariant 2a: stable unfoldings         -- See Note [Join points and INLINE pragmas]       , ok_unfolding arity (realIdUnfolding bndr)+         -- Invariant 4: Satisfies polymorphism rule       , isValidJoinPointType arity (idType bndr)       = True+       | otherwise       = False @@ -2835,10 +2816,11 @@                   , occ_tail   = tail1 })           (OneOcc { occ_in_lam = in_lam2, occ_int_cxt = int_cxt2                   , occ_tail   = tail2 })-  = OneOcc { occ_in_lam  = in_lam1 || in_lam2-           , occ_one_br  = False -- False, because it occurs in both branches+  = OneOcc { occ_one_br  = False -- False, because it occurs in both branches+           , occ_in_lam  = in_lam1 || in_lam2            , occ_int_cxt = int_cxt1 && int_cxt2            , occ_tail    = tail1 `andTailCallInfo` tail2 }+ orOccInfo a1 a2 = ASSERT( not (isDeadOcc a1 || isDeadOcc a2) )                   ManyOccs { occ_tail = tailCallInfo a1 `andTailCallInfo`                                         tailCallInfo a2 }
simplCore/SetLevels.hs view
@@ -88,6 +88,7 @@ import Name             ( getOccName, mkSystemVarName ) import OccName          ( occNameString ) import Type             ( Type, mkLamTypes, splitTyConApp_maybe, tyCoVarsOfType )+import TyCoRep          ( closeOverKindsDSet ) import BasicTypes       ( Arity, RecFlag(..), isRec ) import DataCon          ( dataConOrigResTy ) import TysWiredIn@@ -1558,17 +1559,14 @@         -- Uniques are not deterministic. abstractVars dest_lvl (LE { le_subst = subst, le_lvl_env = lvl_env }) in_fvs   =  -- NB: sortQuantVars might not put duplicates next to each other-    map zap $ sortQuantVars $ uniq-    [out_var | out_fv  <- dVarSetElems (substDVarSet subst in_fvs)-             , out_var <- dVarSetElems (close out_fv)-             , abstract_me out_var ]+    map zap $ sortQuantVars $+    filter abstract_me      $+    dVarSetElems            $+    closeOverKindsDSet      $+    substDVarSet subst in_fvs         -- NB: it's important to call abstract_me only on the OutIds the         -- come from substDVarSet (not on fv, which is an InId)   where-    uniq :: [Var] -> [Var]-        -- Remove duplicates, preserving order-    uniq = dVarSetElems . mkDVarSet-     abstract_me v = case lookupVarEnv lvl_env v of                         Just lvl -> dest_lvl `ltLvl` lvl                         Nothing  -> False@@ -1581,12 +1579,6 @@                      setIdInfo v vanillaIdInfo           | otherwise = v -    close :: Var -> DVarSet  -- Close over variables free in the type-                             -- Result includes the input variable itself-    close v = foldDVarSet (unionDVarSet . close)-                          (unitDVarSet v)-                          (fvDVarSet $ varTypeTyCoFVs v)- type LvlM result = UniqSM result  initLvl :: UniqSupply -> UniqSM a -> a@@ -1648,7 +1640,7 @@       = mkExportedVanillaId (mkSystemVarName uniq (mkFastString "static_ptr"))                             rhs_ty       | otherwise-      = mkLocalIdOrCoVar (mkSystemVarName uniq (mkFastString "lvl")) rhs_ty+      = mkSysLocalOrCoVar (mkFastString "lvl") uniq rhs_ty  cloneCaseBndrs :: LevelEnv -> Level -> [Var] -> LvlM (LevelEnv, [Var]) cloneCaseBndrs env@(LE { le_subst = subst, le_lvl_env = lvl_env, le_env = id_env })
simplCore/SimplCore.hs view
@@ -17,7 +17,8 @@ import HscTypes import CSE              ( cseProgram ) import Rules            ( mkRuleBase, unionRuleBase,-                          extendRuleBaseList, ruleCheckProgram, addRuleInfo, )+                          extendRuleBaseList, ruleCheckProgram, addRuleInfo,+                          getRules ) import PprCore          ( pprCoreBindings, pprCoreExpr ) import OccurAnal        ( occurAnalysePgm, occurAnalyseExpr ) import IdInfo@@ -26,7 +27,7 @@ import CoreLint         ( endPass, lintPassResult, dumpPassResult,                           lintAnnots ) import Simplify         ( simplTopBinds, simplExpr, simplRules )-import SimplUtils       ( simplEnvForGHCi, activeRule )+import SimplUtils       ( simplEnvForGHCi, activeRule, activeUnfolding ) import SimplEnv import SimplMonad import CoreMonad@@ -36,7 +37,7 @@ import FamInstEnv import Id import ErrUtils         ( withTiming )-import BasicTypes       ( CompilerPhase(..), isDefaultInlinePragma )+import BasicTypes       ( CompilerPhase(..), isDefaultInlinePragma, defaultInlinePragma ) import VarSet import VarEnv import LiberateCase     ( liberateCase )@@ -47,25 +48,17 @@ import CallArity        ( callArityAnalProgram ) import Exitify          ( exitifyProgram ) import WorkWrap         ( wwTopBinds )-import Vectorise        ( vectorise ) import SrcLoc import Util import Module+import Plugins          ( withPlugins, installCoreToDos )+import DynamicLoading  -- ( initializePlugins ) -import Maybes import UniqSupply       ( UniqSupply, mkSplitUniqSupply, splitUniqSupply ) import UniqFM import Outputable import Control.Monad import qualified GHC.LanguageExtensions as LangExt--#if defined(GHCI)-import DynamicLoading   ( loadPlugins )-import Plugins          ( installCoreToDos )-#else-import DynamicLoading   ( pluginError )-#endif- {- ************************************************************************ *                                                                      *@@ -87,7 +80,12 @@        ;        ; (guts2, stats) <- runCoreM hsc_env hpt_rule_base us mod                                     orph_mods print_unqual loc $-                           do { all_passes <- addPluginPasses builtin_passes+                           do { hsc_env' <- getHscEnv+                              ; dflags' <- liftIO $ initializePlugins hsc_env'+                                                      (hsc_dflags hsc_env')+                              ; all_passes <- withPlugins dflags'+                                                installCoreToDos+                                                builtin_passes                               ; runCorePasses all_passes guts }         ; Err.dumpIfSet_dyn dflags Opt_D_dump_simpl_stats@@ -132,11 +130,11 @@     spec_constr   = gopt Opt_SpecConstr                   dflags     liberate_case = gopt Opt_LiberateCase                 dflags     late_dmd_anal = gopt Opt_LateDmdAnal                  dflags+    late_specialise = gopt Opt_LateSpecialise             dflags     static_args   = gopt Opt_StaticArgumentTransformation dflags     rules_on      = gopt Opt_EnableRewriteRules           dflags     eta_expand_on = gopt Opt_DoLambdaEtaExpansion         dflags     ww_on         = gopt Opt_WorkerWrapper                dflags-    vectorise_on  = gopt Opt_Vectorise                    dflags     static_ptrs   = xopt LangExt.StaticPointers           dflags      maybe_rule_check phase = runMaybe rule_check (CoreDoRuleCheck phase)@@ -161,30 +159,6 @@            , maybe_rule_check (Phase phase) ] -          -- Vectorisation can introduce a fair few common sub expressions involving-          --  DPH primitives. For example, see the Reverse test from dph-examples.-          --  We need to eliminate these common sub expressions before their definitions-          --  are inlined in phase 2. The CSE introduces lots of  v1 = v2 bindings,-          --  so we also run simpl_gently to inline them.-      ++  (if vectorise_on && phase == 3-            then [CoreCSE, simpl_gently]-            else [])--    vectorisation-      = runWhen vectorise_on $-          CoreDoPasses [ simpl_gently, CoreDoVectorisation ]--                -- By default, we have 2 phases before phase 0.--                -- Want to run with inline phase 2 after the specialiser to give-                -- maximum chance for fusion to work before we inline build/augment-                -- in phase 1.  This made a difference in 'ansi' where an-                -- overloaded function wasn't inlined till too late.--                -- Need phase 1 so that build/augment get-                -- inlined.  I found that spectral/hartel/genfft lost some useful-                -- strictness in the function sumcode' if augment is not inlined-                -- before strictness analysis runs     simpl_phases = CoreDoPasses [ simpl_phase phase ["main"] max_iter                                 | phase <- [phases, phases-1 .. 1] ] @@ -194,7 +168,7 @@                        (base_mode { sm_phase = InitialPhase                                   , sm_names = ["Gentle"]                                   , sm_rules = rules_on   -- Note [RULEs enabled in SimplGently]-                                  , sm_inline = not vectorise_on+                                  , sm_inline = True                                               -- See Note [Inline in InitialPhase]                                   , sm_case_case = False })                           -- Don't do case-of-case transformations.@@ -227,8 +201,7 @@      core_todo =      if opt_level == 0 then-       [ vectorisation,-         static_ptrs_float_outwards,+       [ static_ptrs_float_outwards,          CoreDoSimplify max_iter              (base_mode { sm_phase = Phase 0                         , sm_names = ["Non-opt simplification"] })@@ -242,10 +215,6 @@     -- after this before anything else         runWhen static_args (CoreDoPasses [ simpl_gently, CoreDoStaticArgs ]), -        -- We run vectorisation here for now, but we might also try to run-        -- it later-        vectorisation,-         -- initial simplify: mk specialiser happy: minimum effort please         simpl_gently, @@ -348,6 +317,16 @@          maybe_rule_check (Phase 0), +        runWhen late_specialise+          (CoreDoPasses [ CoreDoSpecialising+                        , simpl_phase 0 ["post-late-spec"] max_iter]),++        -- LiberateCase can yield new CSE opportunities because it peels+        -- off one layer of a recursive function (concretely, I saw this+        -- in wheel-sieve1), and I'm guessing that SpecConstr can too+        -- And CSE is a very cheap pass. So it seems worth doing here.+        runWhen ((liberate_case || spec_constr) && cse) CoreCSE,+         -- Final clean-up simplification:         simpl_phase 0 ["final"] max_iter, @@ -373,24 +352,6 @@       flatten_todos passes ++ flatten_todos rest     flatten_todos (todo : rest) = todo : flatten_todos rest --- Loading plugins--addPluginPasses :: [CoreToDo] -> CoreM [CoreToDo]-#if !defined(GHCI)-addPluginPasses builtin_passes-  = do { dflags <- getDynFlags-       ; let pluginMods = pluginModNames dflags-       ; unless (null pluginMods) (pluginError pluginMods)-       ; return builtin_passes }-#else-addPluginPasses builtin_passes-  = do { hsc_env <- getHscEnv-       ; named_plugins <- liftIO (loadPlugins hsc_env)-       ; foldM query_plug builtin_passes named_plugins }-  where-    query_plug todos (_, plug, options) = installCoreToDos plug options todos-#endif- {- Note [Inline in InitialPhase] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In GHC 8 and earlier we did not inline anything in the InitialPhase. But that is@@ -496,9 +457,6 @@ doCorePass CoreDoSpecConstr          = {-# SCC "SpecConstr" #-}                                        specConstrProgram -doCorePass CoreDoVectorisation       = {-# SCC "Vectorise" #-}-                                       vectorise- doCorePass CoreDoPrintCore              = observe   printCore doCorePass (CoreDoRuleCheck phase pat)  = ruleCheckPass phase pat doCorePass CoreDoNothing                = return@@ -506,9 +464,15 @@  #if defined(GHCI) doCorePass (CoreDoPluginPass _ pass) = {-# SCC "Plugin" #-} pass+#else+doCorePass pass@CoreDoPluginPass {}  = pprPanic "doCorePass" (ppr pass) #endif -doCorePass pass = pprPanic "doCorePass" (ppr pass)+doCorePass pass@CoreDesugar          = pprPanic "doCorePass" (ppr pass)+doCorePass pass@CoreDesugarOpt       = pprPanic "doCorePass" (ppr pass)+doCorePass pass@CoreTidy             = pprPanic "doCorePass" (ppr pass)+doCorePass pass@CorePrep             = pprPanic "doCorePass" (ppr pass)+doCorePass pass@CoreOccurAnal        = pprPanic "doCorePass" (ppr pass)  {- ************************************************************************@@ -530,10 +494,12 @@     { rb <- getRuleBase     ; dflags <- getDynFlags     ; vis_orphs <- getVisibleOrphanMods+    ; let rule_fn fn = getRules (RuleEnv rb vis_orphs) fn+                        ++ (mg_rules guts)     ; liftIO $ putLogMsg dflags NoReason Err.SevDump noSrcSpan                    (defaultDumpStyle dflags)                    (ruleCheckProgram current_phase pat-                      (RuleEnv rb vis_orphs) (mg_binds guts))+                      rule_fn (mg_binds guts))     ; return guts }  doPassDUM :: (DynFlags -> UniqSupply -> CoreProgram -> IO CoreProgram) -> ModGuts -> CoreM ModGuts@@ -690,7 +656,8 @@     dflags       = hsc_dflags hsc_env     print_unqual = mkPrintUnqualified dflags rdr_env     simpl_env    = mkSimplEnv mode-    active_rule  = activeRule simpl_env+    active_rule  = activeRule mode+    active_unf   = activeUnfolding mode      do_iteration :: UniqSupply                  -> Int          -- Counts iterations@@ -722,30 +689,9 @@       , () <- sz `seq` ()     -- Force it       = do {                 -- Occurrence analysis-           let {   -- Note [Vectorisation declarations and occurrences]-                   -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-                   -- During the 'InitialPhase' (i.e., before vectorisation), we need to make sure-                   -- that the right-hand sides of vectorisation declarations are taken into-                   -- account during occurrence analysis. After the 'InitialPhase', we need to ensure-                   -- that the binders representing variable vectorisation declarations are kept alive.-                   -- (In contrast to automatically vectorised variables, their unvectorised versions-                   -- don't depend on them.)-                 vectVars = mkVarSet $-                              catMaybes [ fmap snd $ lookupDVarEnv (vectInfoVar (mg_vect_info guts)) bndr-                                        | Vect bndr _ <- mg_vect_decls guts]-                              ++-                              catMaybes [ fmap snd $ lookupDVarEnv (vectInfoVar (mg_vect_info guts)) bndr-                                        | bndr <- bindersOfBinds binds]-                                        -- FIXME: This second comprehensions is only needed as long as we-                                        --        have vectorised bindings where we get "Could NOT call-                                        --        vectorised from original version".-              ;  (maybeVects, maybeVectVars)-                   = case sm_phase mode of-                       InitialPhase -> (mg_vect_decls guts, vectVars)-                       _            -> ([], vectVars)-               ; tagged_binds = {-# SCC "OccAnal" #-}-                     occurAnalysePgm this_mod active_rule rules-                                     maybeVects maybeVectVars binds+           let { tagged_binds = {-# SCC "OccAnal" #-}+                     occurAnalysePgm this_mod active_unf active_rule rules+                                     binds                } ;            Err.dumpIfSet_dyn dflags Opt_D_dump_occur_anal "Occurrence analysis"                      (pprCoreBindings tagged_binds);@@ -772,7 +718,7 @@                       -- for imported Ids.  Eg  RULE map my_f = blah                       -- If we have a substitution my_f :-> other_f, we'd better                       -- apply it to the rule to, or it'll never match-                  ; rules1 <- simplRules env1 Nothing rules+                  ; rules1 <- simplRules env1 Nothing rules Nothing                    ; return (getTopFloatBinds floats, rules1) } ; @@ -849,16 +795,6 @@ makes strictness information propagate better.  This used to happen in the final phase, but it's tidier to do it here. -Note [Transferring IdInfo]-~~~~~~~~~~~~~~~~~~~~~~~~~~-We want to propagage any useful IdInfo on x_local to x_exported.--STRICTNESS: if we have done strictness analysis, we want the strictness info on-x_local to transfer to x_exported.  Hence the copyIdInfo call.--RULES: we want to *add* any RULES for x_local to x_exported.-- Note [Messing up the exported Id's RULES] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We must be careful about discarding (obviously) or even merging the@@ -952,7 +888,6 @@  Note [Indirection zapping and ticks] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- Unfortunately this is another place where we need a special case for ticks. The following happens quite regularly: @@ -992,13 +927,19 @@     zap (Rec pairs)       = [Rec (concatMap zapPair pairs)]      zapPair (bndr, rhs)-        | bndr `elemVarSet` exp_id_set = []+        | bndr `elemVarSet` exp_id_set+        = []   -- Kill the exported-id binding+         | Just (exp_id, ticks) <- lookupVarEnv ind_env bndr-                                       = [(transferIdInfo exp_id bndr,-                                           mkTicks ticks rhs),-                                          (bndr, Var exp_id)]-        | otherwise                    = [(bndr,rhs)]+        , (exp_id', lcl_id') <- transferIdInfo exp_id bndr+        =      -- Turn a local-id binding into two bindings+               --    exp_id = rhs; lcl_id = exp_id+          [ (exp_id', mkTicks ticks rhs),+            (lcl_id', Var exp_id') ] +        | otherwise+        = [(bndr,rhs)]+ makeIndEnv :: [CoreBind] -> IndEnv makeIndEnv binds   = foldr add_bind emptyVarEnv binds@@ -1050,16 +991,32 @@      info = idInfo id  ------------------transferIdInfo :: Id -> Id -> Id+{- Note [Transferring IdInfo]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we have+     lcl_id = e; exp_id = lcl_id++and lcl_id has useful IdInfo, we don't want to discard it by going+     gbl_id = e; lcl_id = gbl_id++Instead, transfer IdInfo from lcl_id to exp_id, specifically+* (Stable) unfolding+* Strictness+* Rules+* Inline pragma++Overwriting, rather than merging, seems to work ok.++We also zap the InlinePragma on the lcl_id. It might originally+have had a NOINLINE, which we have now transferred; and we really+want the lcl_id to inline now that its RHS is trivial!+-}++transferIdInfo :: Id -> Id -> (Id, Id) -- See Note [Transferring IdInfo]--- If we have---      lcl_id = e; exp_id = lcl_id--- and lcl_id has useful IdInfo, we don't want to discard it by going---      gbl_id = e; lcl_id = gbl_id--- Instead, transfer IdInfo from lcl_id to exp_id--- Overwriting, rather than merging, seems to work ok. transferIdInfo exported_id local_id-  = modifyIdInfo transfer exported_id+  = ( modifyIdInfo transfer exported_id+    , local_id `setInlinePragma` defaultInlinePragma )   where     local_info = idInfo local_id     transfer exp_info = exp_info `setStrictnessInfo`    strictnessInfo local_info
simplCore/SimplEnv.hs view
@@ -319,7 +319,7 @@  extendTvSubst :: SimplEnv -> TyVar -> Type -> SimplEnv extendTvSubst env@(SimplEnv {seTvSubst = tsubst}) var res-  = ASSERT( isTyVar var )+  = ASSERT2( isTyVar var, ppr var $$ ppr res )     env {seTvSubst = extendVarEnv tsubst var res}  extendCvSubst :: SimplEnv -> CoVar -> Coercion -> SimplEnv
simplCore/SimplUtils.hs view
@@ -30,7 +30,10 @@         addValArgTo, addCastTo, addTyArgTo,         argInfoExpr, argInfoAppArgs, pushSimplifiedArgs, -        abstractFloats+        abstractFloats,++        -- Utilities+        isExitJoinId     ) where  #include "HsVersions.h"@@ -446,23 +449,25 @@   --------------------mkArgInfo :: Id+mkArgInfo :: SimplEnv+          -> Id           -> [CoreRule] -- Rules for function           -> Int        -- Number of value args           -> SimplCont  -- Context of the call           -> ArgInfo -mkArgInfo fun rules n_val_args call_cont+mkArgInfo env fun rules n_val_args call_cont   | n_val_args < idArity fun            -- Note [Unsaturated functions]   = ArgInfo { ai_fun = fun, ai_args = [], ai_type = fun_ty-            , ai_rules = fun_rules, ai_encl = False+            , ai_rules = fun_rules+            , ai_encl = False             , ai_strs = vanilla_stricts             , ai_discs = vanilla_discounts }   | otherwise   = ArgInfo { ai_fun = fun, ai_args = [], ai_type = fun_ty             , ai_rules = fun_rules-            , ai_encl = interestingArgContext rules call_cont-            , ai_strs  = add_type_str fun_ty arg_stricts+            , ai_encl  = interestingArgContext rules call_cont+            , ai_strs  = arg_stricts             , ai_discs = arg_discounts }   where     fun_ty = idType fun@@ -480,7 +485,11 @@     vanilla_stricts  = repeat False      arg_stricts-      = case splitStrictSig (idStrictness fun) of+      | not (sm_inline (seMode env))+      = vanilla_stricts -- See Note [Do not expose strictness if sm_inline=False]+      | otherwise+      = add_type_str fun_ty $+        case splitStrictSig (idStrictness fun) of           (demands, result_info)                 | not (demands `lengthExceeds` n_val_args)                 ->      -- Enough args, use the strictness given.@@ -502,27 +511,26 @@     add_type_str :: Type -> [Bool] -> [Bool]     -- If the function arg types are strict, record that in the 'strictness bits'     -- No need to instantiate because unboxed types (which dominate the strict-    -- types) can't instantiate type variables.-    -- add_type_str is done repeatedly (for each call); might be better-    -- once-for-all in the function+    --   types) can't instantiate type variables.+    -- add_type_str is done repeatedly (for each call);+    --   might be better once-for-all in the function     -- But beware primops/datacons with no strictness -    add_type_str-      = go-      where-        go _ [] = []-        go fun_ty strs            -- Look through foralls-            | Just (_, fun_ty') <- splitForAllTy_maybe fun_ty       -- Includes coercions-            = go fun_ty' strs-        go fun_ty (str:strs)      -- Add strict-type info-            | Just (arg_ty, fun_ty') <- splitFunTy_maybe fun_ty-            = (str || Just False == isLiftedType_maybe arg_ty) : go fun_ty' strs-               -- If the type is levity-polymorphic, we can't know whether it's-               -- strict. isLiftedType_maybe will return Just False only when-               -- we're sure the type is unlifted.-        go _ strs-            = strs+    add_type_str _ [] = []+    add_type_str fun_ty all_strs@(str:strs)+      | Just (arg_ty, fun_ty') <- splitFunTy_maybe fun_ty        -- Add strict-type info+      = (str || Just False == isLiftedType_maybe arg_ty)+        : add_type_str fun_ty' strs+          -- If the type is levity-polymorphic, we can't know whether it's+          -- strict. isLiftedType_maybe will return Just False only when+          -- we're sure the type is unlifted. +      | Just (_, fun_ty') <- splitForAllTy_maybe fun_ty+      = add_type_str fun_ty' all_strs     -- Look through foralls++      | otherwise+      = all_strs+ {- Note [Unsaturated functions]   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider (test eyeball/inline4)@@ -531,6 +539,28 @@ where f has arity 2.  Then we do not want to inline 'x', because it'll just be floated out again.  Even if f has lots of discounts on its first argument -- it must be saturated for these to kick in++Note [Do not expose strictness if sm_inline=False]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Trac #15163 showed a case in which we had++  {-# INLINE [1] zip #-}+  zip = undefined++  {-# RULES "foo" forall as bs. stream (zip as bs) = ..blah... #-}++If we expose zip's bottoming nature when simplifing the LHS of the+RULE we get+  {-# RULES "foo" forall as bs.+                   stream (case zip of {}) = ..blah... #-}+discarding the arguments to zip.  Usually this is fine, but on the+LHS of a rule it's not, because 'as' and 'bs' are now not bound on+the LHS.++This is a pretty pathalogical example, so I'm not losing sleep over+it, but the simplest solution was to check sm_inline; if it is False,+which it is on the LHS of a rule (see updModeForRules), then don't+make use of the strictness info for the function. -}  @@ -781,9 +811,9 @@ updModeForRules :: SimplMode -> SimplMode -- See Note [Simplifying rules] updModeForRules current_mode-  = current_mode { sm_phase  = InitialPhase-                 , sm_inline = False-                 , sm_rules  = False+  = current_mode { sm_phase      = InitialPhase+                 , sm_inline     = False  -- See Note [Do not expose strictness if sm_inline=False]+                 , sm_rules      = False                  , sm_eta_expand = False }  {- Note [Simplifying rules]@@ -935,8 +965,8 @@ continuation. -} -activeUnfolding :: SimplEnv -> Id -> Bool-activeUnfolding env id+activeUnfolding :: SimplMode -> Id -> Bool+activeUnfolding mode id   | isCompulsoryUnfolding (realIdUnfolding id)   = True   -- Even sm_inline can't override compulsory unfoldings   | otherwise@@ -947,8 +977,6 @@       --  (a) they are active       --  (b) sm_inline says so, except that for stable unfoldings       --                         (ie pragmas) we inline anyway-  where-    mode = getMode env  getUnfoldingInRuleMatch :: SimplEnv -> InScopeEnv -- When matching in RULE, we want to "look through" an unfolding@@ -973,13 +1001,11 @@      | otherwise           = isActive (sm_phase mode) (idInlineActivation id)  -----------------------activeRule :: SimplEnv -> Activation -> Bool+activeRule :: SimplMode -> Activation -> Bool -- Nothing => No rules at all-activeRule env+activeRule mode   | not (sm_rules mode) = \_ -> False     -- Rewriting is off   | otherwise           = isActive (sm_phase mode)-  where-    mode = getMode env  {- ************************************************************************@@ -1062,7 +1088,7 @@ let-float if you inline windowToViewport  However, as usual for Gentle mode, do not inline things that are-inactive in the intial stages.  See Note [Gentle mode].+inactive in the initial stages.  See Note [Gentle mode].  Note [Stable unfoldings and preInlineUnconditionally] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1086,6 +1112,11 @@ Trac #3736.     c.f. Note [Stable unfoldings and postInlineUnconditionally] +NB: if the pragama is INLINEABLE, then we don't want to behave int+this special way -- an INLINEABLE pragam just says to GHC "inline this+if you like".  But if there is a unique occurrence, we want to inline+the stable unfolding, not the RHS.+ Note [Top-level bottoming Ids] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Don't inline top-level Ids that are bottoming, even if they are used just@@ -1099,33 +1130,45 @@ the former. -} -preInlineUnconditionally :: SimplEnv -> TopLevelFlag -> InId -> InExpr -> Bool+preInlineUnconditionally+    :: SimplEnv -> TopLevelFlag -> InId+    -> InExpr -> StaticEnv  -- These two go together+    -> Maybe SimplEnv       -- Returned env has extended substitution -- Precondition: rhs satisfies the let/app invariant -- See Note [CoreSyn let/app invariant] in CoreSyn -- Reason: we don't want to inline single uses, or discard dead bindings, --         for unlifted, side-effect-ful bindings-preInlineUnconditionally env top_lvl bndr rhs-  | not pre_inline_unconditionally           = False-  | not active                               = False-  | isStableUnfolding (idUnfolding bndr)     = False -- Note [Stable unfoldings and preInlineUnconditionally]-  | isTopLevel top_lvl && isBottomingId bndr = False -- Note [Top-level bottoming Ids]-  | isCoVar bndr                             = False -- Note [Do not inline CoVars unconditionally]-  | isExitJoinId bndr                        = False-  | otherwise = case idOccInfo bndr of-                  IAmDead                    -> True -- Happens in ((\x.1) v)-                  occ@OneOcc { occ_one_br = True }-                                             -> try_once (occ_in_lam occ)-                                                         (occ_int_cxt occ)-                  _                          -> False+preInlineUnconditionally env top_lvl bndr rhs rhs_env+  | not pre_inline_unconditionally           = Nothing+  | not active                               = Nothing+  | isTopLevel top_lvl && isBottomingId bndr = Nothing -- Note [Top-level bottoming Ids]+  | isCoVar bndr                             = Nothing -- Note [Do not inline CoVars unconditionally]+  | isExitJoinId bndr                        = Nothing -- Note [Do not inline exit join points]+                                                       -- in module Exitify+  | not (one_occ (idOccInfo bndr))           = Nothing+  | not (isStableUnfolding unf)              = Just (extend_subst_with rhs)++  -- Note [Stable unfoldings and preInlineUnconditionally]+  | isInlinablePragma inline_prag+  , Just inl <- maybeUnfoldingTemplate unf   = Just (extend_subst_with inl)+  | otherwise                                = Nothing   where+    unf = idUnfolding bndr+    extend_subst_with inl_rhs = extendIdSubst env bndr (mkContEx rhs_env inl_rhs)++    one_occ IAmDead = True -- Happens in ((\x.1) v)+    one_occ (OneOcc { occ_one_br = True      -- One textual occurrence+                    , occ_in_lam = in_lam+                    , occ_int_cxt = int_cxt })+        | not in_lam = isNotTopLevel top_lvl || early_phase+        | otherwise  = int_cxt && canInlineInLam rhs+    one_occ _        = False+     pre_inline_unconditionally = gopt Opt_SimplPreInlining (seDynFlags env)     mode   = getMode env-    active = isActive (sm_phase mode) act+    active = isActive (sm_phase mode) (inlinePragmaActivation inline_prag)              -- See Note [pre/postInlineUnconditionally in gentle mode]-    act = idInlineActivation bndr-    try_once in_lam int_cxt     -- There's one textual occurrence-        | not in_lam = isNotTopLevel top_lvl || early_phase-        | otherwise  = int_cxt && canInlineInLam rhs+    inline_prag = idInlinePragma bndr  -- Be very careful before inlining inside a lambda, because (a) we must not -- invalidate occurrence information, and (b) we want to avoid pushing a@@ -1468,9 +1511,12 @@ --   (a) rhs' has manifest arity --   (b) if is_bot is True then rhs' applied to n args is guaranteed bottom tryEtaExpandRhs mode bndr rhs-  | isJoinId bndr-  = return (manifestArity rhs, False, rhs)-    -- Note [Do not eta-expand join points]+  | Just join_arity <- isJoinId_maybe bndr+  = do { let (join_bndrs, join_body) = collectNBinders join_arity rhs+       ; 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)    | otherwise   = do { (new_arity, is_bot, new_rhs) <- try_expand@@ -2097,7 +2143,7 @@  mkCase2 dflags scrut bndr alts_ty alts   | -- See Note [Scrutinee Constant Folding]-    case alts of  -- Not if there is just a DEFAULT alterantive+    case alts of  -- Not if there is just a DEFAULT alternative       [(DEFAULT,_,_)] -> False       _               -> True   , gopt Opt_CaseFolding dflags@@ -2195,6 +2241,13 @@ -------------------------------------------------- mkCase3 _dflags scrut bndr alts_ty alts   = return (Case scrut bndr alts_ty alts)++-- See Note [Exitification] and Note [Do not inline exit join points] in Exitify.hs+-- This lives here (and not in Id) because occurrence info is only valid on+-- InIds, so it's crucial that isExitJoinId is only called on freshly+-- occ-analysed code. It's not a generic function you can call anywhere.+isExitJoinId :: Var -> Bool+isExitJoinId id = isJoinId id && isOneOcc (idOccInfo id) && occ_in_lam (idOccInfo id)  {- Note [Dead binders]
simplCore/Simplify.hs view
@@ -24,11 +24,13 @@ import MkId             ( seqId ) import MkCore           ( mkImpossibleExpr, castBottomExpr ) import IdInfo-import Name             ( Name, mkSystemVarName, isExternalName, getOccFS )+import Name             ( mkSystemVarName, isExternalName, getOccFS ) import Coercion hiding  ( substCo, substCoVar ) import OptCoercion      ( optCoercion ) import FamInstEnv       ( topNormaliseType_maybe )-import DataCon          ( DataCon, dataConWorkId, dataConRepStrictness, dataConRepArgTys )+import DataCon          ( DataCon, dataConWorkId, dataConRepStrictness+                        , dataConRepArgTys, isUnboxedTupleCon+                        , StrictnessMark (..) ) import CoreMonad        ( Tick(..), SimplMode(..) ) import CoreSyn import Demand           ( StrictSig(..), dmdTypeDepth, isStrictDmd )@@ -50,6 +52,7 @@ import Util import ErrUtils import Module          ( moduleName, pprModuleName )+import PrimOp          ( PrimOp (SeqOp) )   {-@@ -128,8 +131,8 @@                 -- anything into scope, then we don't get a complaint about that.                 -- It's rather as if the top-level binders were imported.                 -- See note [Glomming] in OccurAnal.-        ; env1 <- simplRecBndrs env0 (bindersOfBinds binds0)-        ; (floats, env2) <- simpl_binds env1 binds0+        ; env1 <- {-#SCC "simplTopBinds-simplRecBndrs" #-} simplRecBndrs env0 (bindersOfBinds binds0)+        ; (floats, env2) <- {-#SCC "simplTopBinds-simpl_binds" #-} simpl_binds env1 binds0         ; freeTick SimplifierDone         ; return (floats, env2) }   where@@ -143,11 +146,11 @@                                       ; (floats, env2) <- simpl_binds env1 binds                                       ; return (float `addFloats` floats, env2) } -    simpl_bind env (Rec pairs)  = simplRecBind env TopLevel Nothing pairs-    simpl_bind env (NonRec b r) = do { (env', b') <- addBndrRules env b (lookupRecBndr env b)-                                     ; simplRecOrTopPair env' TopLevel-                                                         NonRecursive Nothing-                                                         b b' r }+    simpl_bind env (Rec pairs)+      = simplRecBind env TopLevel Nothing pairs+    simpl_bind env (NonRec b r)+      = do { (env', b') <- addBndrRules env b (lookupRecBndr env b) Nothing+           ; simplRecOrTopPair env' TopLevel NonRecursive Nothing b b' r }  {- ************************************************************************@@ -160,7 +163,7 @@         * recursive bindings only -} -simplRecBind :: SimplEnv -> TopLevelFlag -> Maybe SimplCont+simplRecBind :: SimplEnv -> TopLevelFlag -> MaybeJoinCont              -> [(InId, InExpr)]              -> SimplM (SimplFloats, SimplEnv) simplRecBind env0 top_lvl mb_cont pairs0@@ -171,7 +174,7 @@     add_rules :: SimplEnv -> (InBndr,InExpr) -> SimplM (SimplEnv, (InBndr, OutBndr, InExpr))         -- Add the (substituted) rules to the binder     add_rules env (bndr, rhs)-        = do { (env', bndr') <- addBndrRules env bndr (lookupRecBndr env bndr)+        = do { (env', bndr') <- addBndrRules env bndr (lookupRecBndr env bndr) mb_cont              ; return (env', (bndr, bndr', rhs)) }      go env [] = return (emptyFloats env, env)@@ -191,24 +194,26 @@ -}  simplRecOrTopPair :: SimplEnv-                  -> TopLevelFlag -> RecFlag -> Maybe SimplCont+                  -> TopLevelFlag -> RecFlag -> MaybeJoinCont                   -> InId -> OutBndr -> InExpr  -- Binder and rhs                   -> SimplM (SimplFloats, SimplEnv)  simplRecOrTopPair env top_lvl is_rec mb_cont old_bndr new_bndr rhs-  | preInlineUnconditionally env top_lvl old_bndr rhs-  = trace_bind "pre-inline-uncond" $+  | Just env' <- preInlineUnconditionally env top_lvl old_bndr rhs env+  = {-#SCC "simplRecOrTopPair-pre-inline-uncond" #-}+    trace_bind "pre-inline-uncond" $     do { tick (PreInlineUnconditionally old_bndr)-       ; return ( emptyFloats env-                , extendIdSubst env old_bndr (mkContEx env rhs)) }+       ; return ( emptyFloats env, env' ) }    | Just cont <- mb_cont-  = ASSERT( isNotTopLevel top_lvl && isJoinId new_bndr )+  = {-#SCC "simplRecOrTopPair-join" #-}+    ASSERT( isNotTopLevel top_lvl && isJoinId new_bndr )     trace_bind "join" $     simplJoinBind env cont old_bndr new_bndr rhs env    | otherwise-  = trace_bind "normal" $+  = {-#SCC "simplRecOrTopPair-normal" #-}+    trace_bind "normal" $     simplLazyBind env top_lvl is_rec old_bndr new_bndr rhs env    where@@ -255,12 +260,12 @@                         -- should eta-reduce.  -        ; (body_env, tvs') <- simplBinders rhs_env tvs+        ; (body_env, tvs') <- {-#SCC "simplBinders" #-} simplBinders rhs_env tvs                 -- See Note [Floating and type abstraction] in SimplUtils          -- Simplify the RHS         ; let rhs_cont = mkRhsStop (substTy body_env (exprType body))-        ; (body_floats0, body0) <- simplExprF body_env body rhs_cont+        ; (body_floats0, body0) <- {-#SCC "simplExprF" #-} simplExprF body_env body rhs_cont                -- Never float join-floats out of a non-join let-binding               -- So wrap the body in the join-floats right now@@ -269,21 +274,24 @@          -- ANF-ise a constructor or PAP rhs         -- We get at most one float per argument here-        ; (let_floats, body2) <- prepareRhs (getMode env) top_lvl+        ; (let_floats, body2) <- {-#SCC "prepareRhs" #-} prepareRhs (getMode env) top_lvl                                             (getOccFS bndr1) (idInfo bndr1) body1         ; let body_floats2 = body_floats1 `addLetFloats` let_floats          ; (rhs_floats, rhs')             <-  if not (doFloatFromRhs top_lvl is_rec False body_floats2 body2)                 then                    -- No floating, revert to body1+                     {-#SCC "simplLazyBind-no-floating" #-}                      do { rhs' <- mkLam env tvs' (wrapFloats body_floats2 body1) rhs_cont                         ; return (emptyFloats env, rhs') }                  else if null tvs then   -- Simple floating+                     {-#SCC "simplLazyBind-simple-floating" #-}                      do { tick LetFloatFromLet                         ; return (body_floats2, body2) }                  else                    -- Do type-abstraction first+                     {-#SCC "simplLazyBind-type-abstraction-first" #-}                      do { tick LetFloatFromLet                         ; (poly_binds, body3) <- abstractFloats (seDynFlags env) top_lvl                                                                 tvs' body_floats2 body2@@ -617,7 +625,7 @@  completeBind :: SimplEnv              -> TopLevelFlag            -- Flag stuck into unfolding-             -> Maybe SimplCont         -- Required only for join point+             -> MaybeJoinCont           -- Required only for join point              -> InId                    -- Old binder              -> OutId -> OutExpr        -- New binder and RHS              -> SimplM (SimplFloats, SimplEnv)@@ -646,7 +654,7 @@          -- Simplify the unfolding       ; new_unfolding <- simplLetUnfolding env top_lvl mb_cont old_bndr-                                           final_rhs old_unf+                                           final_rhs (idType new_bndr) old_unf        ; let final_bndr = addLetBndrInfo new_bndr new_arity is_bot new_unfolding @@ -851,14 +859,14 @@     -- The (Type ty) case is handled separately by simplExpr     -- and by the other callers of simplExprF -simplExprF1 env (Var v)        cont = simplIdF env v cont-simplExprF1 env (Lit lit)      cont = rebuild env (Lit lit) cont-simplExprF1 env (Tick t expr)  cont = simplTick env t expr cont-simplExprF1 env (Cast body co) cont = simplCast env body co cont-simplExprF1 env (Coercion co)  cont = simplCoercionF env co cont+simplExprF1 env (Var v)        cont = {-#SCC "simplIdF" #-} simplIdF env v cont+simplExprF1 env (Lit lit)      cont = {-#SCC "rebuild" #-} rebuild env (Lit lit) cont+simplExprF1 env (Tick t expr)  cont = {-#SCC "simplTick" #-} simplTick env t expr cont+simplExprF1 env (Cast body co) cont = {-#SCC "simplCast" #-} simplCast env body co cont+simplExprF1 env (Coercion co)  cont = {-#SCC "simplCoercionF" #-} simplCoercionF env co cont  simplExprF1 env (App fun arg) cont-  = case arg of+  = {-#SCC "simplExprF1-App" #-} case arg of       Type ty -> do { -- The argument type will (almost) certainly be used                       -- in the output program, so just force it now.                       -- See Note [Avoiding space leaks in OutType]@@ -878,7 +886,8 @@                             , sc_dup = NoDup, sc_cont = cont }  simplExprF1 env expr@(Lam {}) cont-  = simplLam env zapped_bndrs body cont+  = {-#SCC "simplExprF1-Lam" #-}+    simplLam env zapped_bndrs body cont         -- The main issue here is under-saturated lambdas         --   (\x1. \x2. e) arg1         -- Here x1 might have "occurs-once" occ-info, because occ-info@@ -900,28 +909,30 @@           | otherwise = zapLamIdInfo b  simplExprF1 env (Case scrut bndr _ alts) cont-  = simplExprF env scrut (Select { sc_dup = NoDup, sc_bndr = bndr+  = {-#SCC "simplExprF1-Case" #-}+    simplExprF env scrut (Select { sc_dup = NoDup, sc_bndr = bndr                                  , sc_alts = alts                                  , sc_env = env, sc_cont = cont })  simplExprF1 env (Let (Rec pairs) body) cont   | Just pairs' <- joinPointBindings_maybe pairs-  = simplRecJoinPoint env pairs' body cont+  = {-#SCC "simplRecJoinPoin" #-} simplRecJoinPoint env pairs' body cont    | otherwise-  = simplRecE env pairs body cont+  = {-#SCC "simplRecE" #-} simplRecE env pairs body cont  simplExprF1 env (Let (NonRec bndr rhs) body) cont   | Type ty <- rhs    -- First deal with type lets (let a = Type ty in e)-  = ASSERT( isTyVar bndr )+  = {-#SCC "simplExprF1-NonRecLet-Type" #-}+    ASSERT( isTyVar bndr )     do { ty' <- simplType env ty        ; simplExprF (extendTvSubst env bndr ty') body cont }    | Just (bndr', rhs') <- joinPointBinding_maybe bndr rhs-  = simplNonRecJoinPoint env bndr' rhs' body cont+  = {-#SCC "simplNonRecJoinPoint" #-} simplNonRecJoinPoint env bndr' rhs' body cont    | otherwise-  = simplNonRecE env bndr (rhs, env) ([], body) cont+  = {-#SCC "simplNonRecE" #-} simplNonRecE env bndr (rhs, env) ([], body) cont  {- Note [Avoiding space leaks in OutType] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1004,8 +1015,9 @@  simplCoercion :: SimplEnv -> InCoercion -> SimplM OutCoercion simplCoercion env co-  = let opt_co = optCoercion (getTCvSubst env) co-    in seqCo opt_co `seq` return opt_co+  = do { dflags <- getDynFlags+       ; let opt_co = optCoercion dflags (getTCvSubst env) co+       ; seqCo opt_co `seq` return opt_co }  ----------------------------------- -- | Push a TickIt context outwards past applications and cases, as@@ -1201,55 +1213,95 @@ ************************************************************************ -} +{- 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.++In particular, we want to behave well on++ *  e |> co1 |> co2+    where the two happen to cancel out entirely. That is quite common;+    e.g. a newtype wrapping and unwrapping cancel.+++ * (f |> co) @t1 @t2 ... @tn x1 .. xm+   Here we wil use pushCoTyArg and pushCoValArg successively, which+   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).++A good compromise (determined experimentally) seems to be to call+isReflexiveCo+ * when composing casts, and+ * at the end++In investigating this I saw missed opportunities for on-the-fly+coercion shrinkage. See Trac #15090.+-}++ simplCast :: SimplEnv -> InExpr -> Coercion -> SimplCont           -> SimplM (SimplFloats, OutExpr) simplCast env body co0 cont0-  = do  { co1   <- simplCoercion env co0-        ; cont1 <- addCoerce co1 cont0-        ; simplExprF env body cont1 }+  = do  { co1   <- {-#SCC "simplCast-simplCoercion" #-} simplCoercion env co0+        ; cont1 <- {-#SCC "simplCast-addCoerce" #-}+                   if isReflCo co1+                   then return cont0  -- See Note [Optimising reflexivity]+                   else addCoerce co1 cont0+        ; {-#SCC "simplCast-simplExprF" #-} simplExprF env body cont1 }   where-       addCoerce :: OutCoercion -> SimplCont -> SimplM SimplCont-       addCoerce co1 (CastIt co2 cont)-         = addCoerce (mkTransCo co1 co2) cont+        -- If the first parameter is MRefl, then simplifying revealed a+        -- reflexive coercion. Omit.+        addCoerceM :: MOutCoercion -> SimplCont -> SimplM SimplCont+        addCoerceM MRefl   cont = return cont+        addCoerceM (MCo co) cont = addCoerce co cont -       addCoerce co cont@(ApplyToTy { sc_arg_ty = arg_ty, sc_cont = tail })-         | Just (arg_ty', co') <- pushCoTyArg co arg_ty-         = do { tail' <- addCoerce co' tail-              ; return (cont { sc_arg_ty = arg_ty', sc_cont = tail' }) }+        addCoerce :: OutCoercion -> SimplCont -> SimplM SimplCont+        addCoerce co1 (CastIt co2 cont)  -- See Note [Optimising reflexivity]+          | isReflexiveCo co' = return cont+          | otherwise         = addCoerce co' cont+          where+            co' = mkTransCo co1 co2 -       addCoerce co cont@(ApplyToVal { sc_arg = arg, sc_env = arg_se-                                , sc_dup = dup, sc_cont = tail })-         | Just (co1, co2) <- pushCoValArg co-         , Pair _ new_ty <- coercionKind co1-         , not (isTypeLevPoly new_ty)  -- without this check, we get a lev-poly arg-                                       -- See Note [Levity polymorphism invariants] in CoreSyn-                                       -- test: typecheck/should_run/EtaExpandLevPoly-         = do { tail' <- addCoerce co2 tail-              ; if isReflCo co1-                then return (cont { sc_cont = tail' })-                     -- Avoid simplifying if possible;-                     -- See Note [Avoiding exponential behaviour]-                else do-              { (dup', arg_se', arg') <- simplArg env dup arg_se arg-                   -- When we build the ApplyTo we can't mix the OutCoercion-                   -- '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-              ; return (ApplyToVal { sc_arg  = mkCast arg' co1-                                   , sc_env  = arg_se'-                                   , sc_dup  = dup'-                                   , sc_cont = tail' }) } }+        addCoerce co cont@(ApplyToTy { sc_arg_ty = arg_ty, sc_cont = tail })+          | Just (arg_ty', m_co') <- pushCoTyArg co arg_ty+          = {-#SCC "addCoerce-pushCoTyArg" #-}+            do { tail' <- addCoerceM m_co' tail+               ; return (cont { sc_arg_ty = arg_ty', sc_cont = tail' }) } -       addCoerce co cont-         | isReflexiveCo co = return cont-         | otherwise        = return (CastIt co cont)-                -- It's worth checking isReflexiveCo.-                -- For example, in the initial form of a worker-                -- we may find  (coerce T (coerce S (\x.e))) y-                -- and we'd like it to simplify to e[y/x] in one round-                -- of simplification+        addCoerce co cont@(ApplyToVal { sc_arg = arg, sc_env = arg_se+                                      , sc_dup = dup, sc_cont = tail })+          | Just (co1, m_co2) <- pushCoValArg co+          , Pair _ new_ty <- coercionKind co1+          , not (isTypeLevPoly new_ty)  -- Without this check, we get a lev-poly arg+                                        -- See Note [Levity polymorphism invariants] in CoreSyn+                                        -- test: typecheck/should_run/EtaExpandLevPoly+          = {-#SCC "addCoerce-pushCoValArg" #-}+            do { tail' <- addCoerceM m_co2 tail+               ; if isReflCo co1+                 then return (cont { sc_cont = tail' })+                      -- Avoid simplifying if possible;+                      -- See Note [Avoiding exponential behaviour]+                 else do+               { (dup', arg_se', arg') <- simplArg env dup arg_se arg+                    -- When we build the ApplyTo we can't mix the OutCoercion+                    -- '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+               ; return (ApplyToVal { sc_arg  = mkCast arg' co1+                                    , sc_env  = arg_se'+                                    , sc_dup  = dup'+                                    , sc_cont = tail' }) } } +        addCoerce co cont+          | isReflexiveCo co = return cont  -- Having this at the end makes a huge+                                            -- difference in T12227, for some reason+                                            -- See Note [Optimising reflexivity]+          | otherwise        = return (CastIt co cont)+ simplArg :: SimplEnv -> DupFlag -> StaticEnv -> CoreExpr          -> SimplM (DupFlag, StaticEnv, OutExpr) simplArg env dup_flag arg_env arg@@ -1320,7 +1372,8 @@ simplLamBndr env bndr   | isId bndr && isFragileUnfolding old_unf   -- Special case   = do { (env1, bndr1) <- simplBinder env bndr-       ; unf'          <- simplStableUnfolding env1 NotTopLevel Nothing bndr old_unf+       ; unf'          <- simplStableUnfolding env1 NotTopLevel Nothing bndr+                                               old_unf (idType bndr1)        ; let bndr2 = bndr1 `setIdUnfolding` unf'        ; return (modifyInScope env1 bndr2, bndr2) } @@ -1362,11 +1415,11 @@ --       the call to simplLam in simplExprF (Lam ...)  simplNonRecE env bndr (rhs, rhs_se) (bndrs, body) cont-  | ASSERT( isId bndr && not (isJoinId bndr) )-    preInlineUnconditionally env NotTopLevel bndr rhs+  | ASSERT( isId bndr && not (isJoinId bndr) ) True+  , Just env' <- preInlineUnconditionally env NotTopLevel bndr rhs rhs_se   = do { tick (PreInlineUnconditionally bndr)        ; -- pprTrace "preInlineUncond" (ppr bndr <+> ppr rhs) $-         simplLam (extendIdSubst env bndr (mkContEx rhs_se rhs)) bndrs body cont }+         simplLam env' bndrs body cont }    -- Deal with strict bindings   | isStrictId bndr          -- Includes coercions@@ -1379,7 +1432,7 @@   | otherwise   = ASSERT( not (isTyVar bndr) )     do { (env1, bndr1) <- simplNonRecBndr env bndr-       ; (env2, bndr2) <- addBndrRules env1 bndr bndr1+       ; (env2, bndr2) <- addBndrRules env1 bndr bndr1 Nothing        ; (floats1, env3) <- simplLazyBind env2 NotTopLevel NonRecursive bndr bndr2 rhs rhs_se        ; (floats2, expr') <- simplLam env3 bndrs body cont        ; return (floats1 `addFloats` floats2, expr') }@@ -1451,14 +1504,41 @@ *                                                                      * ********************************************************************* -} +{- Note [Rules and unfolding for join points]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have++   simplExpr (join j x = rhs                         ) cont+             (      {- RULE j (p:ps) = blah -}       )+             (      {- StableUnfolding j = blah -}   )+             (in blah                                )++Then we will push 'cont' into the rhs of 'j'.  But we should *also* push+'cont' into the RHS of+  * Any RULEs for j, e.g. generated by SpecConstr+  * Any stable unfolding for j, e.g. the result of an INLINE pragma++Simplifying rules and stable-unfoldings happens a bit after+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+of a SpecConstr-generated RULE for a join point.+-}++type MaybeJoinCont = Maybe SimplCont+  -- Nothing => Not a join point+  -- Just k  => This is a join binding with continuation k+  -- See Note [Rules and unfolding for join points]+ simplNonRecJoinPoint :: SimplEnv -> InId -> InExpr                      -> InExpr -> SimplCont                      -> SimplM (SimplFloats, OutExpr) simplNonRecJoinPoint env bndr rhs body cont-  | ASSERT( isJoinId bndr )-    preInlineUnconditionally env NotTopLevel bndr rhs+  | ASSERT( isJoinId bndr ) True+  , Just env' <- preInlineUnconditionally env NotTopLevel bndr rhs env   = do { tick (PreInlineUnconditionally bndr)-       ; simplExprF (extendIdSubst env bndr (mkContEx env rhs)) body cont }+       ; simplExprF env' body cont }     | otherwise    = wrapJoinCont env cont $ \ env cont ->@@ -1466,7 +1546,7 @@           -- and wrap wrap_cont around the whole thing         ; let res_ty = contResultType cont         ; (env1, bndr1)    <- simplNonRecJoinBndr env res_ty bndr-        ; (env2, bndr2)    <- addBndrRules env1 bndr bndr1+        ; (env2, bndr2)    <- addBndrRules env1 bndr bndr1 (Just cont)         ; (floats1, env3)  <- simplJoinBind env2 cont bndr bndr2 rhs env         ; (floats2, body') <- simplExprF env3 body cont         ; return (floats1 `addFloats` floats2, body') }@@ -1648,7 +1728,7 @@  completeCall :: SimplEnv -> OutId -> SimplCont -> SimplM (SimplFloats, OutExpr) completeCall env var cont-  | Just expr <- callSiteInline dflags var unfolding+  | Just expr <- callSiteInline dflags var active_unf                                 lone_variable arg_infos interesting_cont   -- Inline the variable's RHS   = do { checkedTick (UnfoldingDone var)@@ -1658,7 +1738,7 @@   | otherwise   -- Don't inline; instead rebuild the call   = do { rule_base <- getSimplRules-       ; let info = mkArgInfo var (getRules rule_base var)+       ; let info = mkArgInfo env var (getRules rule_base var)                               n_val_args call_cont        ; rebuildCall env info cont } @@ -1667,7 +1747,7 @@     (lone_variable, arg_infos, call_cont) = contArgs cont     n_val_args       = length arg_infos     interesting_cont = interestingCallContext env call_cont-    unfolding        = activeUnfolding env var+    active_unf       = activeUnfolding (getMode env) var      dump_inline unfolding cont       | not (dopt Opt_D_dump_inlinings dflags) = return ()@@ -1892,7 +1972,7 @@ -}    | Just (rule, rule_rhs) <- lookupRule dflags (getUnfoldingInRuleMatch env)-                                        (activeRule env) fn+                                        (activeRule (getMode env)) fn                                         (argInfoAppArgs args) rules   -- Fire a rule for the function   = do { checkedTick (RuleFired (ruleName rule))@@ -2523,11 +2603,8 @@         ; return (LitAlt lit, [], rhs') }  simplAlt env scrut' _ case_bndr' cont' (DataAlt con, vs, rhs)-  = do  {       -- Deal with the pattern-bound variables-                -- Mark the ones that are in ! positions in the-                -- data constructor as certainly-evaluated.-                -- NB: simplLamBinders preserves this eval info-        ; let vs_with_evals = add_evals (dataConRepStrictness con)+  = do  { -- See Note [Adding evaluatedness info to pattern-bound variables]+          let vs_with_evals = addEvals scrut' con vs         ; (env', vs') <- simplLamBndrs env vs_with_evals                  -- Bind the case-binder to (con args)@@ -2538,37 +2615,75 @@         ; env'' <- addAltUnfoldings env' scrut' case_bndr' con_app         ; rhs' <- simplExprC env'' rhs cont'         ; return (DataAlt con, vs', rhs') }-  where-        -- add_evals records the evaluated-ness of the bound variables of-        -- a case pattern.  This is *important*.  Consider-        --      data T = T !Int !Int-        ---        --      case x of { T a b -> T (a+1) b }-        ---        -- We really must record that b is already evaluated so that we don't-        -- go and re-evaluate it when constructing the result.-        -- See Note [Data-con worker strictness] in MkId.hs-    add_evals the_strs-        = go vs the_strs++{- Note [Adding evaluatedness info to pattern-bound variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+addEvals records the evaluated-ness of the bound variables of+a case pattern.  This is *important*.  Consider++     data T = T !Int !Int++     case x of { T a b -> T (a+1) b }++We really must record that b is already evaluated so that we don't+go and re-evaluate it when constructing the result.+See Note [Data-con worker strictness] in MkId.hs++NB: simplLamBinders preserves this eval info++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):++  case seq# v s of+    (# s', v' #) -> E++we want the compiler to be aware that v' is in WHNF in E.++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.+-}++addEvals :: Maybe OutExpr -> DataCon -> [Id] -> [Id]+-- See Note [Adding evaluatedness info to pattern-bound variables]+addEvals scrut con vs+  -- Deal with seq# applications+  | Just scr <- scrut+  , isUnboxedTupleCon con+  , [s,x] <- vs+    -- Use stripNArgs rather than collectArgsTicks to avoid building+    -- a list of arguments only to throw it away immediately.+  , Just (Var f) <- stripNArgs 4 scr+  , Just SeqOp <- isPrimOpId_maybe f+  , let x' = zapIdOccInfoAndSetEvald MarkedStrict x+  = [s, x']++  -- Deal with banged datacon fields+addEvals _scrut con vs = go vs the_strs+    where+      the_strs = dataConRepStrictness con++      go [] [] = []+      go (v:vs') strs | isTyVar v = v : go vs' strs+      go (v:vs') (str:strs) = zapIdOccInfoAndSetEvald str v : go vs' strs+      go _ _ = pprPanic "Simplify.addEvals"+                (ppr con $$+                 ppr vs  $$+                 ppr_with_length (map strdisp the_strs) $$+                 ppr_with_length (dataConRepArgTys con) $$+                 ppr_with_length (dataConRepStrictness con))         where-          go [] [] = []-          go (v:vs') strs | isTyVar v = v : go vs' strs-          go (v:vs') (str:strs) = zap str v : go vs' strs-          go _ _ = pprPanic "cat_evals"-                    (ppr con $$-                     ppr vs  $$-                     ppr_with_length the_strs $$-                     ppr_with_length (dataConRepArgTys con) $$-                     ppr_with_length (dataConRepStrictness con))-            where-              ppr_with_length list-                = ppr list <+> parens (text "length =" <+> ppr (length list))-                                    -- NB: If this panic triggers, note that-                                    -- NoStrictnessMark doesn't print!+          ppr_with_length list+            = ppr list <+> parens (text "length =" <+> ppr (length list))+          strdisp MarkedStrict = "MarkedStrict"+          strdisp NotMarkedStrict = "NotMarkedStrict" -          zap str v = setCaseBndrEvald str $ -- Add eval'dness info-                      zapIdOccInfo v         -- And kill occ info;-                                             -- see Note [Case alternative occ info]+zapIdOccInfoAndSetEvald :: StrictnessMark -> Id -> Id+zapIdOccInfoAndSetEvald str v =+  setCaseBndrEvald str $ -- Add eval'dness info+  zapIdOccInfo v         -- And kill occ info;+                         -- see Note [Case alternative occ info]  addAltUnfoldings :: SimplEnv -> Maybe OutExpr -> OutId -> OutExpr -> SimplM SimplEnv addAltUnfoldings env scrut case_bndr con_app@@ -3236,15 +3351,15 @@ -}  simplLetUnfolding :: SimplEnv-> TopLevelFlag-                  -> Maybe SimplCont+                  -> MaybeJoinCont                   -> InId-                  -> OutExpr+                  -> OutExpr -> OutType                   -> Unfolding -> SimplM Unfolding-simplLetUnfolding env top_lvl cont_mb id new_rhs unf+simplLetUnfolding env top_lvl cont_mb id new_rhs rhs_ty unf   | isStableUnfolding unf-  = simplStableUnfolding env top_lvl cont_mb id unf+  = simplStableUnfolding env top_lvl cont_mb id unf rhs_ty   | isExitJoinId id-  = return noUnfolding -- see Note [Do not inline exit join points]+  = return noUnfolding -- See Note [Do not inline exit join points] in Exitify   | otherwise   = mkLetUnfolding (seDynFlags env) top_lvl InlineRhs id new_rhs @@ -3266,26 +3381,26 @@  ------------------- simplStableUnfolding :: SimplEnv -> TopLevelFlag-                     -> Maybe SimplCont  -- Just k => a join point with continuation k+                     -> MaybeJoinCont  -- Just k => a join point with continuation k                      -> InId-                     -> Unfolding -> SimplM Unfolding+                     -> Unfolding -> OutType -> SimplM Unfolding -- Note [Setting the new unfolding]-simplStableUnfolding env top_lvl mb_cont id unf+simplStableUnfolding env top_lvl mb_cont id unf rhs_ty   = case unf of       NoUnfolding   -> return unf       BootUnfolding -> return unf       OtherCon {}   -> return unf        DFunUnfolding { df_bndrs = bndrs, df_con = con, df_args = args }-        -> do { (env', bndrs') <- simplBinders rule_env bndrs+        -> do { (env', bndrs') <- simplBinders unf_env bndrs               ; args' <- mapM (simplExpr env') args               ; return (mkDFunUnfolding bndrs' con args') }        CoreUnfolding { uf_tmpl = expr, uf_src = src, uf_guidance = guide }         | isStableSource src-        -> do { expr' <- case mb_cont of-                           Just cont -> simplJoinRhs rule_env id expr cont-                           Nothing   -> simplExpr rule_env expr+        -> do { expr' <- case mb_cont of -- See Note [Rules and unfolding for join points]+                           Just cont -> simplJoinRhs unf_env id expr cont+                           Nothing   -> simplExprC unf_env expr (mkBoringStop rhs_ty)               ; case guide of                   UnfWhen { ug_arity = arity, ug_unsat_ok = sat_ok }  -- Happens for INLINE things                      -> let guide' = UnfWhen { ug_arity = arity, ug_unsat_ok = sat_ok@@ -3309,7 +3424,7 @@     dflags     = seDynFlags env     is_top_lvl = isTopLevel top_lvl     act        = idInlineActivation id-    rule_env   = updMode (updModeForStableUnfoldings act) env+    unf_env    = updMode (updModeForStableUnfoldings act) env          -- See Note [Simplifying inside stable unfoldings] in SimplUtils  {-@@ -3351,20 +3466,24 @@ See Note [Forming Rec groups] in OccurAnal -} -addBndrRules :: SimplEnv -> InBndr -> OutBndr -> SimplM (SimplEnv, OutBndr)+addBndrRules :: SimplEnv -> InBndr -> OutBndr+             -> MaybeJoinCont   -- Just k for a join point binder+                                -- Nothing otherwise+             -> SimplM (SimplEnv, OutBndr) -- Rules are added back into the bin-addBndrRules env in_id out_id+addBndrRules env in_id out_id mb_cont   | null old_rules   = return (env, out_id)   | otherwise-  = do { new_rules <- simplRules env (Just (idName out_id)) old_rules+  = do { new_rules <- simplRules env (Just out_id) old_rules mb_cont        ; let final_id  = out_id `setIdSpecialisation` mkRuleInfo new_rules        ; return (modifyInScope env final_id, final_id) }   where     old_rules = ruleInfoRules (idSpecialisation in_id) -simplRules :: SimplEnv -> Maybe Name -> [CoreRule] -> SimplM [CoreRule]-simplRules env mb_new_nm rules+simplRules :: SimplEnv -> Maybe OutId -> [CoreRule]+           -> MaybeJoinCont -> SimplM [CoreRule]+simplRules env mb_new_id rules mb_cont   = mapM simpl_rule rules   where     simpl_rule rule@(BuiltinRule {})@@ -3374,11 +3493,29 @@                           , ru_fn = fn_name, ru_rhs = rhs })       = do { (env', bndrs') <- simplBinders env bndrs            ; let rhs_ty = substTy env' (exprType rhs)-                 rule_cont = mkBoringStop rhs_ty-                 rule_env  = updMode updModeForRules env'+                 rhs_cont = case mb_cont of  -- See Note [Rules and unfolding for join points]+                                Nothing   -> mkBoringStop rhs_ty+                                Just cont -> ASSERT2( join_ok, bad_join_msg )+                                             cont+                 rule_env = updMode updModeForRules env'+                 fn_name' = case mb_new_id of+                              Just id -> idName id+                              Nothing -> fn_name++                 -- join_ok is an assertion check that the join-arity of the+                 -- binder matches that of the rule, so that pushing the+                 -- continuation into the RHS makes sense+                 join_ok = case mb_new_id of+                             Just id | Just join_arity <- isJoinId_maybe id+                                     -> length args == join_arity+                             _ -> False+                 bad_join_msg = vcat [ ppr mb_new_id, ppr rule+                                     , ppr (fmap isJoinId_maybe mb_new_id) ]+            ; args' <- mapM (simplExpr rule_env) args-           ; rhs'  <- simplExprC rule_env rhs rule_cont+           ; rhs'  <- simplExprC rule_env rhs rhs_cont            ; return (rule { ru_bndrs = bndrs'-                          , ru_fn    = mb_new_nm `orElse` fn_name+                          , ru_fn    = fn_name'                           , ru_args  = args'                           , ru_rhs   = rhs' }) }+
simplStg/SimplStg.hs view
@@ -21,7 +21,6 @@  import DynFlags import ErrUtils-import SrcLoc import UniqSupply       ( mkSplitUniqSupply ) import Outputable import Control.Monad@@ -34,38 +33,30 @@   = do  { showPass dflags "Stg2Stg"         ; us <- mkSplitUniqSupply 'g' -        ; when (dopt Opt_D_verbose_stg2stg dflags)-               (putLogMsg dflags NoReason SevDump noSrcSpan-                  (defaultDumpStyle dflags) (text "VERBOSE STG-TO-STG:"))--        ; binds' <- end_pass "Stg2Stg" binds-                 -- Do the main business!-        ; processed_binds <- foldM do_stg_pass binds' (getStgToDo dflags)-         ; dumpIfSet_dyn dflags Opt_D_dump_stg "Pre unarise:"-                        (pprStgTopBindings processed_binds)+                        (pprStgTopBindings binds) -        ; let un_binds = stg_linter True "Unarise"-                         $ unarise us processed_binds+        ; stg_linter False "Pre-unarise" binds+        ; let un_binds = unarise us binds+        ; stg_linter True "Unarise" un_binds          ; dumpIfSet_dyn dflags Opt_D_dump_stg "STG syntax:"                         (pprStgTopBindings un_binds) -        ; return un_binds-   }+        ; foldM do_stg_pass un_binds (getStgToDo dflags)+        }    where     stg_linter unarised-      | gopt Opt_DoStgLinting dflags = lintStgTopBindings unarised-      | otherwise                    = \ _whodunnit binds -> binds+      | gopt Opt_DoStgLinting dflags = lintStgTopBindings dflags unarised+      | otherwise                    = \ _whodunnit _binds -> return ()      -------------------------------------------     do_stg_pass binds to_do       = case to_do of           D_stg_stats ->-             trace (showStgStats binds)-             end_pass "StgStats" binds+             trace (showStgStats binds) (return binds)            StgCSE ->              {-# SCC "StgCse" #-}@@ -77,8 +68,9 @@     end_pass what binds2       = do -- report verbosely, if required            dumpIfSet_dyn dflags Opt_D_verbose_stg2stg what-              (vcat (map ppr binds2))-           return (stg_linter False what binds2)+              (pprStgTopBindings binds2)+           stg_linter True what binds2+           return binds2  -- ----------------------------------------------------------------------------- -- StgToDo:  abstraction of stg-to-stg passes to run.
simplStg/StgCse.hs view
@@ -80,7 +80,7 @@ import CoreSyn (AltCon(..)) import Data.List (mapAccumL) import Data.Maybe (fromMaybe)-import TrieMap+import CoreMap import NameEnv import Control.Monad( (>=>) ) @@ -302,7 +302,7 @@     env2 | StgApp trivial_scrut [] <- scrut' = addTrivCaseBndr bndr trivial_scrut env1                  -- See Note [Trivial case scrutinee]          | otherwise                         = env1-    alts' = map (stgCseAlt env2 bndr') alts+    alts' = map (stgCseAlt env2 ty bndr') alts   -- A constructor application.@@ -329,14 +329,24 @@  -- Case alternatives -- Extend the CSE environment-stgCseAlt :: CseEnv -> OutId -> InStgAlt -> OutStgAlt-stgCseAlt env case_bndr (DataAlt dataCon, args, rhs)+stgCseAlt :: CseEnv -> AltType -> OutId -> InStgAlt -> OutStgAlt+stgCseAlt env ty case_bndr (DataAlt dataCon, args, rhs)     = let (env1, args') = substBndrs env args-          env2 = addDataCon case_bndr dataCon (map StgVarArg args') env1+          env2+            -- To avoid dealing with unboxed sums StgCse runs after unarise and+            -- should maintain invariants listed in Note [Post-unarisation+            -- invariants]. One of the invariants is that some binders are not+            -- used (unboxed tuple case binders) which is what we check with+            -- `stgCaseBndrInScope` here. If the case binder is not in scope we+            -- don't add it to the CSE env. See also #15300.+            | stgCaseBndrInScope ty True -- CSE runs after unarise+            = addDataCon case_bndr dataCon (map StgVarArg args') env1+            | otherwise+            = env1             -- see note [Case 2: CSEing case binders]           rhs' = stgCseExpr env2 rhs       in (DataAlt dataCon, args', rhs')-stgCseAlt env _ (altCon, args, rhs)+stgCseAlt env _ _ (altCon, args, rhs)     = let (env1, args') = substBndrs env args           rhs' = stgCseExpr env1 rhs       in (altCon, args', rhs')
simplStg/UnariseStg.hs view
@@ -203,7 +203,7 @@ import DataCon import FastString (FastString, mkFastString) import Id-import Literal (Literal (..))+import Literal import MkCore (aBSENT_SUM_FIELD_ERROR_ID) import MkId (voidPrimId, voidArgId) import MonadUtils (mapAccumLM)@@ -211,7 +211,7 @@ import RepType import StgSyn import Type-import TysPrim (intPrimTy)+import TysPrim (intPrimTy,wordPrimTy,word64PrimTy) import TysWiredIn import UniqSupply import Util@@ -478,7 +478,7 @@ unariseSumAlt rho args (DataAlt sumCon, bs, e)   = do let rho' = mapSumIdBinders bs args rho        e' <- unariseExpr rho' e-       return ( LitAlt (MachInt (fromIntegral (dataConTag sumCon))), [], e' )+       return ( LitAlt (LitNumber LitNumInt (fromIntegral (dataConTag sumCon)) intPrimTy), [], e' )  unariseSumAlt _ scrt alt   = pprPanic "unariseSumAlt" (ppr scrt $$ ppr alt)@@ -564,7 +564,7 @@       tag = dataConTag dc        layout'  = layoutUbxSum sum_slots (mapMaybe (typeSlotTy . stgArgType) args0)-      tag_arg  = StgLitArg (MachInt (fromIntegral tag))+      tag_arg  = StgLitArg (LitNumber LitNumInt (fromIntegral tag) intPrimTy)       arg_idxs = IM.fromList (zipEqual "mkUbxSum" layout' args0)        mkTupArgs :: Int -> [SlotTy] -> IM.IntMap StgArg -> [StgArg]@@ -579,8 +579,8 @@       slotRubbishArg :: SlotTy -> StgArg       slotRubbishArg PtrSlot    = StgVarArg aBSENT_SUM_FIELD_ERROR_ID                          -- See Note [aBSENT_SUM_FIELD_ERROR_ID] in MkCore-      slotRubbishArg WordSlot   = StgLitArg (MachWord 0)-      slotRubbishArg Word64Slot = StgLitArg (MachWord64 0)+      slotRubbishArg WordSlot   = StgLitArg (LitNumber LitNumWord 0 wordPrimTy)+      slotRubbishArg Word64Slot = StgLitArg (LitNumber LitNumWord64 0 word64PrimTy)       slotRubbishArg FloatSlot  = StgLitArg (MachFloat 0)       slotRubbishArg DoubleSlot = StgLitArg (MachDouble 0)     in@@ -644,6 +644,35 @@                          in argument position of a DataCon application. -} +unariseArgBinder+    :: Bool -- data con arg?+    -> UnariseEnv -> Id -> UniqSM (UnariseEnv, [Id])+unariseArgBinder is_con_arg rho x =+  case typePrimRep (idType x) of+    []+      | is_con_arg+      -> return (extendRho rho x (MultiVal []), [])+      | otherwise -- fun arg, do not remove void binders+      -> return (extendRho rho x (MultiVal []), [voidArgId])++    [rep]+      -- Arg represented as single variable, but original type may still be an+      -- unboxed sum/tuple, e.g. (# Void# | Void# #).+      --+      -- While not unarising the binder in this case does not break any programs+      -- (because it unarises to a single variable), it triggers StgLint as we+      -- break the the post-unarisation invariant that says unboxed tuple/sum+      -- binders should vanish. See Note [Post-unarisation invariants].+      | isUnboxedSumType (idType x) || isUnboxedTupleType (idType x)+      -> do x' <- mkId (mkFastString "us") (primRepToType rep)+            return (extendRho rho x (MultiVal [StgVarArg x']), [x'])+      | otherwise+      -> return (rho, [x])++    reps -> do+      xs <- mkIds (mkFastString "us") (map primRepToType reps)+      return (extendRho rho x (MultiVal (map StgVarArg xs)), xs)+ --------------------------------------------------------------------------------  -- | MultiVal a function argument. Never returns an empty list.@@ -662,16 +691,9 @@ unariseFunArgBinders :: UnariseEnv -> [Id] -> UniqSM (UnariseEnv, [Id]) unariseFunArgBinders rho xs = second concat <$> mapAccumLM unariseFunArgBinder rho xs -unariseFunArgBinder :: UnariseEnv -> Id -> UniqSM (UnariseEnv, [Id]) -- Result list of binders is never empty-unariseFunArgBinder rho x  =-  case typePrimRep (idType x) of-    []   -> return (extendRho rho x (MultiVal []), [voidArgId])-                           -- NB: do not remove void binders-    [_]  -> return (rho, [x])-    reps -> do-      xs <- mkIds (mkFastString "us") (map primRepToType reps)-      return (extendRho rho x (MultiVal (map StgVarArg xs)), xs)+unariseFunArgBinder :: UnariseEnv -> Id -> UniqSM (UnariseEnv, [Id])+unariseFunArgBinder = unariseArgBinder False  -------------------------------------------------------------------------------- @@ -686,7 +708,9 @@                                   -- Here realWorld# is not in the envt, but                                   -- is a void, and so should be eliminated       | otherwise -> [StgVarArg x]-unariseConArg _ arg = [arg]       -- We have no void literals+unariseConArg _ arg@(StgLitArg lit) =+    ASSERT(not (isVoidTy (literalType lit)))  -- We have no void literals+    [arg]  unariseConArgs :: UnariseEnv -> [InStgArg] -> [OutStgArg] unariseConArgs = concatMap . unariseConArg@@ -694,13 +718,10 @@ unariseConArgBinders :: UnariseEnv -> [Id] -> UniqSM (UnariseEnv, [Id]) unariseConArgBinders rho xs = second concat <$> mapAccumLM unariseConArgBinder rho xs +-- Different from `unariseFunArgBinder`: result list of binders may be empty.+-- See DataCon applications case in Note [Post-unarisation invariants]. unariseConArgBinder :: UnariseEnv -> Id -> UniqSM (UnariseEnv, [Id])-unariseConArgBinder rho x =-  case typePrimRep (idType x) of-    [_]  -> return (rho, [x])-    reps -> do-      xs <- mkIds (mkFastString "us") (map primRepToType reps)-      return (extendRho rho x (MultiVal (map StgVarArg xs)), xs)+unariseConArgBinder = unariseArgBinder True  unariseFreeVars :: UnariseEnv -> [InId] -> [OutId] unariseFreeVars rho fvs
specialise/Rules.hs view
@@ -40,7 +40,7 @@                           stripTicksTopT, stripTicksTopE,                           isJoinBind ) import PprCore          ( pprRules )-import Type             ( Type, substTy, mkTCvSubst )+import Type             ( Type, Kind, substTy, mkTCvSubst ) import TcType           ( tcSplitTyConApp_maybe ) import TysWiredIn       ( anyTypeOfKind ) import Coercion@@ -413,7 +413,7 @@ findBest :: (Id, [CoreExpr])          -> (CoreRule,CoreExpr) -> [(CoreRule,CoreExpr)] -> (CoreRule,CoreExpr) -- All these pairs matched the expression--- Return the pair the the most specific rule+-- Return the pair the most specific rule -- The (fn,args) is just for overlap reporting  findBest _      (rule,ans)   [] = (rule,ans)@@ -518,7 +518,7 @@   | ruleCantMatch tpl_tops rough_args = Nothing   | otherwise   = case matchN in_scope rule_name tpl_vars tpl_args args of-        Nothing                        -> Nothing+        Nothing                       -> Nothing         Just (bind_wrapper, tpl_vals) -> Just (bind_wrapper $                                                rule_fn `mkApps` tpl_vals)   where@@ -536,59 +536,83 @@  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 tmpl_vars+        ; let (_, matched_es) = mapAccumL lookup_tmpl subst $+                                tmpl_vars `zip` tmpl_vars1         ; return (rs_binds subst, matched_es) }   where-    init_rn_env = mkRnEnv2 (extendInScopeSetList in_scope tmpl_vars)-                  -- See Note [Template binders]+    (init_rn_env, tmpl_vars1) = mapAccumL rnBndrL (mkRnEnv2 in_scope) tmpl_vars+                  -- See Note [Cloning the template binders] -    init_menv = RV { rv_tmpls = mkVarSet tmpl_vars, rv_lcl = init_rn_env-                   , rv_fltR = mkEmptySubst (rnInScopeSet init_rn_env)-                   , rv_unf = id_unf }+    init_menv = RV { rv_tmpls = mkVarSet tmpl_vars1+                   , rv_lcl   = init_rn_env+                   , rv_fltR  = mkEmptySubst (rnInScopeSet init_rn_env)+                   , rv_unf   = id_unf }      go _    subst []     _      = Just subst     go _    _     _      []     = Nothing       -- Fail if too few actual args     go menv subst (t:ts) (e:es) = do { subst1 <- match menv subst t e                                      ; go menv subst1 ts es } -    lookup_tmpl :: RuleSubst -> Var -> (RuleSubst, CoreExpr)-    lookup_tmpl rs@(RS { rs_tv_subst = tv_subst, rs_id_subst = id_subst }) tmpl_var-        | isId tmpl_var-        = case lookupVarEnv id_subst tmpl_var of+    lookup_tmpl :: RuleSubst -> (InVar,OutVar) -> (RuleSubst, 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)+        | isId tmpl_var1+        = case lookupVarEnv id_subst tmpl_var1 of              Just e -> (rs, e)-             Nothing | Just refl_co <- isReflCoVar_maybe tmpl_var-                     , let co_expr = Coercion refl_co-                     -> (rs { rs_id_subst = extendVarEnv id_subst tmpl_var co_expr }, co_expr)+             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         | otherwise-        = case lookupVarEnv tv_subst tmpl_var of+        = case lookupVarEnv tv_subst tmpl_var1 of              Just ty -> (rs, Type ty)-             Nothing -> (rs { rs_tv_subst = extendVarEnv tv_subst tmpl_var fake_ty }, Type fake_ty)-                        -- See Note [Unbound RULE binders]+             Nothing -> (rs', Type fake_ty) -- See Note [Unbound RULE binders]         where-          fake_ty = anyTypeOfKind kind-          cv_subst = to_co_env id_subst-          kind = Type.substTy (mkTCvSubst in_scope (tv_subst, cv_subst))-                              (tyVarKind tmpl_var)+          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 -          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-            | Just co <- exprToCoercion_maybe expr-            = extendVarEnv_Directly env uniq co+    unbound tmpl_var+       = pprPanic "Template variable unbound in rewrite rule" $+         vcat [ text "Variable:" <+> ppr tmpl_var <+> dcolon <+> ppr (varType tmpl_var)+              , text "Rule" <+> pprRuleName rule_name+              , text "Rule bndrs:" <+> ppr tmpl_vars+              , text "LHS args:" <+> ppr tmpl_es+              , text "Actual args:" <+> ppr target_es ] -            | otherwise-            = env -    unbound var = pprPanic "Template variable unbound in rewrite rule" $-                  vcat [ text "Variable:" <+> ppr var <+> dcolon <+> ppr (varType var)-                       , text "Rule" <+> pprRuleName rule_name-                       , text "Rule bndrs:" <+> ppr tmpl_vars-                       , text "LHS args:" <+> ppr tmpl_es-                       , 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@@ -632,8 +656,8 @@   in Trac #13410, and also in test T10602.  -Note [Template binders]-~~~~~~~~~~~~~~~~~~~~~~~+Note [Cloning the template binders]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider the following match (example 1):         Template:  forall x.  f x         Target:               f (x+1)@@ -644,21 +668,19 @@         Template:  forall x. f (\x.x)         Target:              f (\y.y) -We achieve this simply by:-  * Adding forall'd template binders to the in-scope set--This works even if the template binder are already in scope-(in the target) because--  * The RuleSubst rs_tv_subst, rs_id_subst maps LHS template vars to-    the target world.  It is not applied recursively.--  * Having the template vars in the in-scope set ensures that in-    example 2 above, the (\x.x) is cloned to (\x'. x').+We achieve this simply by using rnBndrL to clone the template+binders if they are already in scope. -In the past we used rnBndrL to clone the template variables if-they were already in scope.  But (a) that's not necessary and (b)-it complicate the fancy footwork for Note [Unbound template type variables]+------ 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+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+into a type variable, and then crashed when we wanted its idInfo.+------ End of historical note -------   ************************************************************************@@ -674,11 +696,12 @@ --   from nested matches; see the Let case of match, below -- data RuleMatchEnv-  = RV { rv_tmpls :: VarSet          -- Template variables-       , rv_lcl   :: RnEnv2          -- Renamings for *local bindings*+  = RV { rv_lcl   :: RnEnv2          -- Renamings for *local bindings*                                      --   (lambda/case)+       , rv_tmpls :: VarSet          -- Template variables+                                     --   (after applying envL of rv_lcl)        , rv_fltR  :: Subst           -- Renamings for floated let-bindings-                                     --   domain disjoint from envR of rv_lcl+                                     --   (domain disjoint from envR of rv_lcl)                                      -- See Note [Matching lets]        , rv_unf :: IdUnfoldingFun        }@@ -708,7 +731,6 @@ --      For a start, in general eta expansion wastes work. --      SLPJ July 99 - match :: RuleMatchEnv       -> RuleSubst       -> CoreExpr               -- Template@@ -739,7 +761,8 @@ -- succeed in matching what looks like the template variable 'a' against 3.  -- The Var case follows closely what happens in Unify.match-match renv subst (Var v1)    e2 = match_var renv subst v1 e2+match renv subst (Var v1) e2+  = match_var renv subst v1 e2  match renv subst e1 (Var v2)      -- Note [Expanding variables]   | not (inRnEnvR rn_env v2) -- Note [Do not expand locally-bound variables]@@ -1111,19 +1134,19 @@           Data.Maybe.Nothing -> lvl_smf;           Data.Maybe.Just n_acT [Just S(L)] ->             case n_acT of wild1_ams [Just A] { GHC.Base.I# y_amr [Just L] ->-            \$wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf+              $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf             }};  and correctly generates the rule          RULES: "SC:$wfoo1" [0] __forall {y_amr [Just L] :: GHC.Prim.Int#                                           sc_snn :: GHC.Prim.Int#}-          \$wfoo_smW sc_snn (Data.Maybe.Just @ GHC.Base.Int (GHC.Base.I# y_amr))-          = \$s\$wfoo_sno y_amr sc_snn ;]+          $wfoo_smW sc_snn (Data.Maybe.Just @ GHC.Base.Int (GHC.Base.I# y_amr))+          = $s$wfoo_sno y_amr sc_snn ;]  BUT we must ensure that this rule matches in the original function!-Note that the call to \$wfoo is-            \$wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf+Note that the call to $wfoo is+            $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf  During matching we expand wild_Xf to (Just n_acT).  But then we must also expand n_acT to (I# y_amr).  And we can only do that if we look up n_acT@@ -1148,10 +1171,10 @@ -- string for the purposes of error reporting ruleCheckProgram :: CompilerPhase               -- ^ Rule activation test                  -> String                      -- ^ Rule pattern-                 -> RuleEnv                     -- ^ Database of rules+                 -> (Id -> [CoreRule])          -- ^ Rules for an Id                  -> CoreProgram                 -- ^ Bindings to check in                  -> SDoc                        -- ^ Resulting check message-ruleCheckProgram phase rule_pat rule_base binds+ruleCheckProgram phase rule_pat rules binds   | isEmptyBag results   = text "Rule check results: no rule application sites"   | otherwise@@ -1164,7 +1187,7 @@                        , rc_id_unf    = idUnfolding     -- Not quite right                                                         -- Should use activeUnfolding                        , rc_pattern   = rule_pat-                       , rc_rule_base = rule_base }+                       , rc_rules = rules }     results = unionManyBags (map (ruleCheckBind env) binds)     line = text (replicate 20 '-') @@ -1172,7 +1195,7 @@     rc_is_active :: Activation -> Bool,     rc_id_unf  :: IdUnfoldingFun,     rc_pattern :: String,-    rc_rule_base :: RuleEnv+    rc_rules :: Id -> [CoreRule] }  ruleCheckBind :: RuleCheckEnv -> CoreBind -> Bag SDoc@@ -1206,7 +1229,7 @@   | null name_match_rules = emptyBag   | otherwise             = unitBag (ruleAppCheck_help env fn args name_match_rules)   where-    name_match_rules = filter match (getRules (rc_rule_base env) fn)+    name_match_rules = filter match (rc_rules env fn)     match rule = (rc_pattern env) `isPrefixOf` unpackFS (ruleName rule)  ruleAppCheck_help :: RuleCheckEnv -> Id -> [CoreExpr] -> [CoreRule] -> SDoc
specialise/SpecConstr.hs view
@@ -611,7 +611,7 @@ before we had ForceSpecConstr.  Lacking ForceSpecConstr we specialised regardless of size; and then we needed a way to turn that *off*.  Now that we have ForceSpecConstr, this NoSpecConstr is probably redundant.-(Used only for PArray.)+(Used only for PArray, TODO: remove?)  -----------------------------------------------------                 Stuff not yet handled
specialise/Specialise.hs view
@@ -1346,7 +1346,7 @@                   = (inl_prag { inl_inline = NoUserInline }, noUnfolding)                    | otherwise-                  = (inl_prag, specUnfolding poly_tyvars spec_app+                  = (inl_prag, specUnfolding dflags poly_tyvars spec_app                                              arity_decrease fn_unf)                  arity_decrease = length spec_dict_args@@ -2011,6 +2011,7 @@             EqPred {}       -> True             IrredPred {}    -> True   -- Things like (D []) where D is a                                       -- Constraint-ranged family; Trac #7785+            ForAllPred {}   -> True  {- Note [Type determines value]
stgSyn/CoreToStg.hs view
@@ -49,6 +49,7 @@ import UniqFM import SrcLoc           ( mkGeneralSrcSpan ) +import Data.List.NonEmpty (nonEmpty, toList) import Data.Maybe    (isJust, fromMaybe) import Control.Monad (liftM, ap) @@ -130,15 +131,6 @@ -- -- The CafInfo has already been calculated during the CoreTidy pass. ----- During CoreToStg, we then pin onto each binding and case expression, a--- list of Ids which represents the "live" CAFs at that point.  The meaning--- of "live" here is the same as for live variables, see above (which is--- why it's convenient to collect CAF information here rather than elsewhere).------ The later SRT pass takes these lists of Ids and uses them to construct--- the actual nested SRTs, and replaces the lists of Ids with (offset,length)--- pairs.- -- Note [What is a non-escaping let] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --@@ -398,9 +390,10 @@ -- on these components, but it in turn is not scrutinised as the basis for any -- decisions.  Hence no black holes. --- No LitInteger's should be left by the time this is called. CorePrep--- should have converted them all to a real core representation.-coreToStgExpr (Lit (LitInteger {})) = panic "coreToStgExpr: LitInteger"+-- No LitInteger's or LitNatural's should be left by the time this is called.+-- CorePrep should have converted them all to a real core representation.+coreToStgExpr (Lit (LitNumber LitNumInteger _ _)) = panic "coreToStgExpr: LitInteger"+coreToStgExpr (Lit (LitNumber LitNumNatural _ _)) = panic "coreToStgExpr: LitNatural" coreToStgExpr (Lit l)      = return (StgLit l, emptyFVInfo) coreToStgExpr (Var v)      = coreToStgApp Nothing v               [] [] coreToStgExpr (Coercion _) = coreToStgApp Nothing coercionTokenId [] []@@ -418,9 +411,10 @@     extendVarEnvCts [ (a, LambdaBound) | a <- args' ] $ do     (body, body_fvs) <- coreToStgExpr body     let-        fvs             = args' `minusFVBinders` body_fvs-        result_expr | null args' = body-                    | otherwise  = StgLam args' body+        fvs         = args' `minusFVBinders` body_fvs+        result_expr = case nonEmpty args' of+          Nothing     -> body+          Just args'' -> StgLam args'' body      return (result_expr, fvs) @@ -771,11 +765,10 @@ mkTopStgRhs dflags this_mod ccs rhs_fvs bndr binder_info rhs   | StgLam bndrs body <- rhs   = -- StgLam can't have empty arguments, so not CAF-    ASSERT(not (null bndrs))     ( StgRhsClosure dontCareCCS binder_info                     (getFVs rhs_fvs)                     ReEntrant-                    bndrs body+                    (toList bndrs) body     , ccs )    | StgConApp con args _ <- unticked_rhs@@ -806,7 +799,7 @@              | otherwise                      = Updatable      -- CAF cost centres generated for -fcaf-all-    caf_cc = mkAutoCC bndr modl CafCC+    caf_cc = mkAutoCC bndr modl     caf_ccs = mkSingletonCCS caf_cc            -- careful: the binder might be :Main.main,            -- which doesn't belong to module mod_name.@@ -825,7 +818,7 @@   = StgRhsClosure currentCCS binder_info                   (getFVs rhs_fvs)                   ReEntrant-                  bndrs body+                  (toList bndrs) body    | isJoinId bndr -- must be a nullary join point   = ASSERT(idJoinArity bndr == 0)
stgSyn/StgLint.hs view
@@ -1,77 +1,80 @@-{-+{- | (c) The GRASP/AQUA Project, Glasgow University, 1993-1998 -\section[StgLint]{A ``lint'' pass to check for Stg correctness}--}+A lint pass to check basic STG invariants: -{-# LANGUAGE CPP #-}+- Variables should be defined before used. +- Let bindings should not have unboxed types (unboxed bindings should only+  appear in case), except when they're join points (see Note [CoreSyn let/app+  invariant] and #14117).++- If linting after unarisation, invariants listed in Note [Post-unarisation+  invariants].++Because we don't have types and coercions in STG we can't really check types+here.++Some history:++StgLint used to check types, but it never worked and so it was disabled in 2000+with this note:++    WARNING:+    ~~~~~~~~++    This module has suffered bit-rot; it is likely to yield lint errors+    for Stg code that is currently perfectly acceptable for code+    generation.  Solution: don't use it!  (KSW 2000-05).++Since then there were some attempts at enabling it again, as summarised in+#14787. It's finally decided that we remove all type checking and only look for+basic properties listed above.+-}+ module StgLint ( lintStgTopBindings ) where  import GhcPrelude  import StgSyn +import DynFlags import Bag              ( Bag, emptyBag, isEmptyBag, snocBag, bagToList ) import Id               ( Id, idType, isLocalId, isJoinId ) import VarSet import DataCon import CoreSyn          ( AltCon(..) )-import PrimOp           ( primOpType )-import Literal          ( literalType )-import Maybes import Name             ( getSrcLoc ) import ErrUtils         ( MsgDoc, Severity(..), mkLocMessage ) import Type import RepType-import TyCon-import Util import SrcLoc import Outputable+import qualified ErrUtils as Err+import Control.Applicative ((<|>)) import Control.Monad -#include "HsVersions.h"--{--Checks for-        (a) *some* type errors-        (b) locally-defined variables used but not defined---Note: unless -dverbose-stg is on, display of lint errors will result-in "panic: bOGUS_LVs".--WARNING:-~~~~~~~~--This module has suffered bit-rot; it is likely to yield lint errors-for Stg code that is currently perfectly acceptable for code-generation.  Solution: don't use it!  (KSW 2000-05).---************************************************************************-*                                                                      *-\subsection{``lint'' for various constructs}-*                                                                      *-************************************************************************--@lintStgTopBindings@ is the top-level interface function.--}--lintStgTopBindings :: Bool  -- ^ have we run Unarise yet?-                   -> String -> [StgTopBinding] -> [StgTopBinding]+lintStgTopBindings :: DynFlags+                   -> Bool   -- ^ have we run Unarise yet?+                   -> String -- ^ who produced the STG?+                   -> [StgTopBinding]+                   -> IO () -lintStgTopBindings unarised whodunnit binds+lintStgTopBindings dflags unarised whodunnit binds   = {-# SCC "StgLint" #-}-    case (initL unarised (lint_binds binds)) of-      Nothing  -> binds-      Just msg -> pprPanic "" (vcat [-                        text "*** Stg Lint ErrMsgs: in" <+>-                              text whodunnit <+> text "***",-                        msg,-                        text "*** Offending Program ***",-                        pprStgTopBindings binds,-                        text "*** End of Offense ***"])+    case initL unarised (lint_binds binds) of+      Nothing  ->+        return ()+      Just msg -> do+        putLogMsg dflags NoReason Err.SevDump noSrcSpan+          (defaultDumpStyle dflags)+          (vcat [ text "*** Stg Lint ErrMsgs: in" <+>+                        text whodunnit <+> text "***",+                  msg,+                  text "*** Offending Program ***",+                  pprStgTopBindings binds,+                  text "*** End of Offense ***"])+        Err.ghcExit dflags 1   where     lint_binds :: [StgTopBinding] -> LintM () @@ -84,13 +87,12 @@     lint_bind (StgTopLifted bind) = lintStgBinds bind     lint_bind (StgTopStringLit v _) = return [v] -lintStgArg :: StgArg -> LintM (Maybe Type)-lintStgArg (StgLitArg lit) = return (Just (literalType lit))-lintStgArg (StgVarArg v)   = lintStgVar v+lintStgArg :: StgArg -> LintM ()+lintStgArg (StgLitArg _) = return ()+lintStgArg (StgVarArg v) = lintStgVar v -lintStgVar :: Id -> LintM (Maybe Kind)-lintStgVar v = do checkInScope v-                  return (Just (idType v))+lintStgVar :: Id -> LintM ()+lintStgVar id = checkInScope id  lintStgBinds :: StgBinding -> LintM [Id] -- Returns the binders lintStgBinds (StgNonRec binder rhs) = do@@ -107,80 +109,50 @@ lint_binds_help :: (Id, StgRhs) -> LintM () lint_binds_help (binder, rhs)   = addLoc (RhsOf binder) $ do-        -- Check the rhs-        _maybe_rhs_ty <- lintStgRhs rhs--        -- Check binder doesn't have unlifted type-        checkL (isJoinId binder || not (isUnliftedType binder_ty))+        lintStgRhs rhs+        -- Check binder doesn't have unlifted type or it's a join point+        checkL (isJoinId binder || not (isUnliftedType (idType binder)))                (mkUnliftedTyMsg binder rhs) -        -- Check match to RHS type-        -- Actually we *can't* check the RHS type, because-        -- unsafeCoerce means it really might not match at all-        -- notably;  eg x::Int = (error @Bool "urk") |> unsafeCoerce...-        -- case maybe_rhs_ty of-        --  Nothing     -> return ()-        --    Just rhs_ty -> checkTys binder_ty-        --                          rhs_ty-        ---                         (mkRhsMsg binder rhs_ty)--        return ()-  where-    binder_ty = idType binder--lintStgRhs :: StgRhs -> LintM (Maybe Type)   -- Just ty => type is exact+lintStgRhs :: StgRhs -> LintM ()  lintStgRhs (StgRhsClosure _ _ _ _ [] expr)   = lintStgExpr expr  lintStgRhs (StgRhsClosure _ _ _ _ binders expr)   = addLoc (LambdaBodyOf binders) $-      addInScopeVars binders $ runMaybeT $ do-        body_ty <- MaybeT $ lintStgExpr expr-        return (mkFunTys (map idType binders) body_ty)+      addInScopeVars binders $+        lintStgExpr expr  lintStgRhs rhs@(StgRhsCon _ con args) = do-    -- TODO: Check arg_tys     when (isUnboxedTupleCon con || isUnboxedSumCon con) $       addErrL (text "StgRhsCon is an unboxed tuple or sum application" $$                ppr rhs)-    runMaybeT $ do-      arg_tys <- mapM (MaybeT . lintStgArg) args-      MaybeT $ checkFunApp con_ty arg_tys (mkRhsConMsg con_ty arg_tys)-  where-    con_ty = dataConRepType con--lintStgExpr :: StgExpr -> LintM (Maybe Type) -- Just ty => type is exact+    mapM_ lintStgArg args+    mapM_ checkPostUnariseConArg args -lintStgExpr (StgLit l) = return (Just (literalType l))+lintStgExpr :: StgExpr -> LintM () -lintStgExpr e@(StgApp fun args) = runMaybeT $ do-    fun_ty <- MaybeT $ lintStgVar fun-    arg_tys <- mapM (MaybeT . lintStgArg) args-    MaybeT $ checkFunApp fun_ty arg_tys (mkFunAppMsg fun_ty arg_tys e)+lintStgExpr (StgLit _) = return () -lintStgExpr e@(StgConApp con args _arg_tys) = runMaybeT $ do-    -- TODO: Check arg_tys-    arg_tys <- mapM (MaybeT . lintStgArg) args-    MaybeT $ checkFunApp con_ty arg_tys (mkFunAppMsg con_ty arg_tys e)-  where-    con_ty = dataConRepType con+lintStgExpr (StgApp fun args) = do+    lintStgVar fun+    mapM_ lintStgArg args -lintStgExpr e@(StgOpApp (StgPrimOp op) args _) = runMaybeT $ do-    arg_tys <- mapM (MaybeT . lintStgArg) args-    MaybeT $ checkFunApp op_ty arg_tys (mkFunAppMsg op_ty arg_tys e)-  where-    op_ty = primOpType op+lintStgExpr app@(StgConApp con args _arg_tys) = do+    -- unboxed sums should vanish during unarise+    lf <- getLintFlags+    when (lf_unarised lf && isUnboxedSumCon con) $+      addErrL (text "Unboxed sum after unarise:" $$+               ppr app)+    mapM_ lintStgArg args+    mapM_ checkPostUnariseConArg args -lintStgExpr (StgOpApp _ args res_ty) = runMaybeT $ do-        -- We don't have enough type information to check-        -- the application for StgFCallOp and StgPrimCallOp; ToDo-    _maybe_arg_tys <- mapM (MaybeT . lintStgArg) args-    return res_ty+lintStgExpr (StgOpApp _ args _) =+    mapM_ lintStgArg args -lintStgExpr (StgLam bndrs _) = do-    addErrL (text "Unexpected StgLam" <+> ppr bndrs)-    return Nothing+lintStgExpr lam@(StgLam _ _) =+    addErrL (text "Unexpected StgLam" <+> ppr lam)  lintStgExpr (StgLet binds body) = do     binders <- lintStgBinds binds@@ -196,83 +168,25 @@  lintStgExpr (StgTick _ expr) = lintStgExpr expr -lintStgExpr (StgCase scrut bndr alts_type alts) = runMaybeT $ do-    _ <- MaybeT $ lintStgExpr scrut--    lf <- liftMaybeT getLintFlags-    in_scope <- MaybeT $ liftM Just $-     case alts_type of-        AlgAlt tc     -> check_bndr (tyConPrimRep tc) >> return True-        PrimAlt rep   -> check_bndr [rep]             >> return True-        -- Case binders of unboxed tuple or unboxed sum type always dead-        -- after the unariser has run. See Note [Post-unarisation invariants].-        MultiValAlt _-          | lf_unarised lf -> return False-          | otherwise      -> return True-        PolyAlt       -> return True--    MaybeT $ addInScopeVars [bndr | in_scope] $-             lintStgAlts alts scrut_ty-  where-    scrut_ty        = idType bndr-    scrut_reps      = typePrimRep scrut_ty-    check_bndr reps = checkL (scrut_reps == reps) bad_bndr-                  where-                     bad_bndr = mkDefltMsg bndr reps--lintStgAlts :: [StgAlt]-            -> Type               -- Type of scrutinee-            -> LintM (Maybe Type) -- Just ty => type is accurage--lintStgAlts alts scrut_ty = do-    maybe_result_tys <- mapM (lintAlt scrut_ty) alts--    -- Check the result types-    case catMaybes (maybe_result_tys) of-      []             -> return Nothing--      (first_ty:_tys) -> do -- mapM_ check tys-                           return (Just first_ty)-        where-          -- check ty = checkTys first_ty ty (mkCaseAltMsg alts)-          -- We can't check that the alternatives have the-          -- same type, because they don't, with unsafeCoerce#+lintStgExpr (StgCase scrut bndr alts_type alts) = do+    lintStgExpr scrut -lintAlt :: Type -> (AltCon, [Id], StgExpr) -> LintM (Maybe Type)-lintAlt _ (DEFAULT, _, rhs)- = lintStgExpr rhs+    lf <- getLintFlags+    let in_scope = stgCaseBndrInScope alts_type (lf_unarised lf) -lintAlt scrut_ty (LitAlt lit, _, rhs) = do-   checkTys (literalType lit) scrut_ty (mkAltMsg1 scrut_ty)-   lintStgExpr rhs+    addInScopeVars [bndr | in_scope] (mapM_ lintAlt alts) -lintAlt scrut_ty (DataAlt con, args, rhs) = do-    case splitTyConApp_maybe scrut_ty of-      Just (tycon, tys_applied) | isAlgTyCon tycon &&-                                  not (isNewTyCon tycon) -> do-         let-           cons    = tyConDataCons tycon-           arg_tys = dataConInstArgTys con tys_applied-                -- This does not work for existential constructors+lintAlt :: (AltCon, [Id], StgExpr) -> LintM () -         checkL (con `elem` cons) (mkAlgAltMsg2 scrut_ty con)-         checkL (args `lengthIs` dataConRepArity con) (mkAlgAltMsg3 con args)-         when (isVanillaDataCon con) $-           mapM_ check (zipEqual "lintAlgAlt:stg" arg_tys args)-         return ()-      _ ->-         addErrL (mkAltMsg1 scrut_ty)+lintAlt (DEFAULT, _, rhs) =+    lintStgExpr rhs -    addInScopeVars args $-         lintStgExpr rhs-  where-    check (ty, arg) = checkTys ty (idType arg) (mkAlgAltMsg4 ty arg)+lintAlt (LitAlt _, _, rhs) =+    lintStgExpr rhs -    -- elem: yes, the elem-list here can sometimes be long-ish,-    -- but as it's use-once, probably not worth doing anything different-    -- We give it its own copy, so it isn't overloaded.-    elem _ []       = False-    elem x (y:ys)   = x==y || elem x ys+lintAlt (DataAlt _, bndrs, rhs) = do+    mapM_ checkPostUnariseBndr bndrs+    addInScopeVars bndrs (lintStgExpr rhs)  {- ************************************************************************@@ -353,6 +267,44 @@ checkL True  _   = return () checkL False msg = addErrL msg +-- Case alts shouldn't have unboxed sum, unboxed tuple, or void binders.+checkPostUnariseBndr :: Id -> LintM ()+checkPostUnariseBndr bndr = do+    lf <- getLintFlags+    when (lf_unarised lf) $+      forM_ (checkPostUnariseId bndr) $ \unexpected ->+        addErrL $+          text "After unarisation, binder " <>+          ppr bndr <> text " has " <> text unexpected <> text " type " <>+          ppr (idType bndr)++-- Arguments shouldn't have sum, tuple, or void types.+checkPostUnariseConArg :: StgArg -> LintM ()+checkPostUnariseConArg arg = case arg of+    StgLitArg _ ->+      return ()+    StgVarArg id -> do+      lf <- getLintFlags+      when (lf_unarised lf) $+        forM_ (checkPostUnariseId id) $ \unexpected ->+          addErrL $+            text "After unarisation, arg " <>+            ppr id <> text " has " <> text unexpected <> text " type " <>+            ppr (idType id)++-- Post-unarisation args and case alt binders should not have unboxed tuple,+-- unboxed sum, or void types. Return what the binder is if it is one of these.+checkPostUnariseId :: Id -> Maybe String+checkPostUnariseId id =+    let+      id_ty = idType id+      is_sum, is_tuple, is_void :: Maybe String+      is_sum = guard (isUnboxedSumType id_ty) >> return "unboxed sum"+      is_tuple = guard (isUnboxedTupleType id_ty) >> return "unboxed tuple"+      is_void = guard (isVoidTy id_ty) >> return "void"+    in+      is_sum <|> is_tuple <|> is_void+ addErrL :: MsgDoc -> LintM () addErrL msg = LintM $ \_lf loc _scope errs -> ((), addErr errs msg loc) @@ -377,67 +329,6 @@ getLintFlags :: LintM LintFlags getLintFlags = LintM $ \lf _loc _scope errs -> (lf, errs) -{--Checking function applications: we only check that the type has the-right *number* of arrows, we don't actually compare the types.  This-is because we can't expect the types to be equal - the type-applications and type lambdas that we use to calculate accurate types-have long since disappeared.--}--checkFunApp :: Type                 -- The function type-            -> [Type]               -- The arg type(s)-            -> MsgDoc               -- Error message-            -> LintM (Maybe Type)   -- Just ty => result type is accurate--checkFunApp fun_ty arg_tys msg- = do { case mb_msg of-          Just msg -> addErrL msg-          Nothing  -> return ()-      ; return mb_ty }- where-  (mb_ty, mb_msg) = cfa True fun_ty arg_tys--  cfa :: Bool -> Type -> [Type] -> (Maybe Type          -- Accurate result?-                                   , Maybe MsgDoc)      -- Errors?--  cfa accurate fun_ty []      -- Args have run out; that's fine-      = (if accurate then Just fun_ty else Nothing, Nothing)--  cfa accurate fun_ty arg_tys@(arg_ty':arg_tys')-      | Just (arg_ty, res_ty) <- splitFunTy_maybe fun_ty-      = if accurate && not (arg_ty `stgEqType` arg_ty')-        then (Nothing, Just msg)       -- Arg type mismatch-        else cfa accurate res_ty arg_tys'--      | Just (_, fun_ty') <- splitForAllTy_maybe fun_ty-      = cfa False fun_ty' arg_tys--      | Just (tc,tc_args) <- splitTyConApp_maybe fun_ty-      , isNewTyCon tc-      = if tc_args `lengthLessThan` tyConArity tc-        then WARN( True, text "cfa: unsaturated newtype" <+> ppr fun_ty $$ msg )-             (Nothing, Nothing)   -- This is odd, but I've seen it-        else cfa False (newTyConInstRhs tc tc_args) arg_tys--      | Just tc <- tyConAppTyCon_maybe fun_ty-      , not (isTypeFamilyTyCon tc)      -- Definite error-      = (Nothing, Just msg)             -- Too many args--      | otherwise-      = (Nothing, Nothing)---- | "Compare" types. We used to try a crude comparison of the type themselves,--- but this is essentially impossible in STG as we have discarded both casts--- and type applications, so types might look different but be the same. Now we--- simply compare their runtime representations. See #14120.-stgEqType :: Type -> Type -> Bool-stgEqType ty1 ty2-  = reps1 == reps2-  where-    reps1 = typePrimRep ty1-    reps2 = typePrimRep ty2- checkInScope :: Id -> LintM () checkInScope id = LintM $ \_lf loc scope errs  -> if isLocalId id && not (id `elemVarSet` scope) then@@ -445,72 +336,6 @@                                 text "is out of scope"]) loc)     else         ((), errs)--checkTys :: Type -> Type -> MsgDoc -> LintM ()-checkTys ty1 ty2 msg = LintM $ \_lf loc _scope errs-  -> if (ty1 `stgEqType` ty2)-     then ((), errs)-     else ((), addErr errs msg loc)--_mkCaseAltMsg :: [StgAlt] -> MsgDoc-_mkCaseAltMsg _alts-  = ($$) (text "In some case alternatives, type of alternatives not all same:")-            (Outputable.empty) -- LATER: ppr alts--mkDefltMsg :: Id -> [PrimRep] -> MsgDoc-mkDefltMsg bndr reps-  = ($$) (text "Binder of a case expression doesn't match representation of scrutinee:")-         (ppr bndr $$ ppr (idType bndr) $$ ppr reps)--mkFunAppMsg :: Type -> [Type] -> StgExpr -> MsgDoc-mkFunAppMsg fun_ty arg_tys expr-  = vcat [text "In a function application, function type doesn't match arg types:",-              hang (text "Function type:") 4 (ppr fun_ty),-              hang (text "Arg types:") 4 (vcat (map (ppr) arg_tys)),-              hang (text "Expression:") 4 (ppr expr)]--mkRhsConMsg :: Type -> [Type] -> MsgDoc-mkRhsConMsg fun_ty arg_tys-  = vcat [text "In a RHS constructor application, con type doesn't match arg types:",-              hang (text "Constructor type:") 4 (ppr fun_ty),-              hang (text "Arg types:") 4 (vcat (map (ppr) arg_tys))]--mkAltMsg1 :: Type -> MsgDoc-mkAltMsg1 ty-  = ($$) (text "In a case expression, type of scrutinee does not match patterns")-         (ppr ty)--mkAlgAltMsg2 :: Type -> DataCon -> MsgDoc-mkAlgAltMsg2 ty con-  = vcat [-        text "In some algebraic case alternative, constructor is not a constructor of scrutinee type:",-        ppr ty,-        ppr con-    ]--mkAlgAltMsg3 :: DataCon -> [Id] -> MsgDoc-mkAlgAltMsg3 con alts-  = vcat [-        text "In some algebraic case alternative, number of arguments doesn't match constructor:",-        ppr con <+> parens (text "arity" <+> ppr (dataConRepArity con)),-        ppr alts-    ]--mkAlgAltMsg4 :: Type -> Id -> MsgDoc-mkAlgAltMsg4 ty arg-  = vcat [-        text "In some algebraic case alternative, type of argument doesn't match data constructor:",-        ppr ty,-        ppr arg-    ]--_mkRhsMsg :: Id -> Type -> MsgDoc-_mkRhsMsg binder ty-  = vcat [hsep [text "The type of this binder doesn't match the type of its RHS:",-                     ppr binder],-              hsep [text "Binder's type:", ppr (idType binder)],-              hsep [text "Rhs type:", ppr ty]-             ]  mkUnliftedTyMsg :: Id -> StgRhs -> SDoc mkUnliftedTyMsg binder rhs
stgSyn/StgSyn.hs view
@@ -39,6 +39,7 @@         isDllConApp,         stgArgType,         stripStgTicksTop,+        stgCaseBndrInScope,          pprStgBinding, pprStgTopBindings     ) where@@ -70,6 +71,8 @@ import Unique      ( Unique ) import Util +import Data.List.NonEmpty ( NonEmpty, toList )+ {- ************************************************************************ *                                                                      *@@ -153,6 +156,18 @@    where go ts (StgTick t e) | p t = go (t:ts) e          go ts other               = (reverse ts, other) +-- | Given an alt type and whether the program is unarised, return whether the+-- case binder is in scope.+--+-- Case binders of unboxed tuple or unboxed sum type always dead after the+-- unariser has run. See Note [Post-unarisation invariants].+stgCaseBndrInScope :: AltType -> Bool {- ^ unarised? -} -> Bool+stgCaseBndrInScope alt_ty unarised =+    case alt_ty of+      AlgAlt _      -> True+      PrimAlt _     -> True+      MultiValAlt _ -> not unarised+      PolyAlt       -> True  {- ************************************************************************@@ -221,7 +236,7 @@ -}    | StgLam-        [bndr]+        (NonEmpty bndr)         StgExpr    -- Body of lambda  {-@@ -549,6 +564,7 @@   = PolyAlt             -- Polymorphic (a lifted type variable)   | MultiValAlt Int     -- Multi value of this arity (unboxed tuple or sum)                         -- the arity could indeed be 1 for unary unboxed tuple+                        -- or enum-like unboxed sums   | AlgAlt      TyCon   -- Algebraic data type; the AltCons will be DataAlts   | PrimAlt     PrimRep -- Primitive data type; the AltCons (if any) will be LitAlts @@ -720,7 +736,7 @@   = hsep [ pprStgOp op, brackets (interppSP args)]  pprStgExpr (StgLam bndrs body)-  = sep [ char '\\' <+> ppr_list (map (pprBndr LambdaBind) bndrs)+  = sep [ char '\\' <+> ppr_list (map (pprBndr LambdaBind) (toList bndrs))             <+> text "->",          pprStgExpr body ]   where ppr_list = brackets . fsep . punctuate comma
stranal/WorkWrap.hs view
@@ -242,8 +242,8 @@  (See Trac #13143 for a real-world example.) -Note [Activation for workers]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [Worker activation]+~~~~~~~~~~~~~~~~~~~~~~~~ Follows on from Note [Worker-wrapper for INLINABLE functions]  It is *vital* that if the worker gets an INLINABLE pragma (from the@@ -260,7 +260,9 @@    f y = let z = expensive y in ... -If expensive's worker inherits the wrapper's activation, we'll get+If expensive's worker inherits the wrapper's activation,+we'll get this (because of the compromise in point (2) of+Note [Wrapper activation])    {-# NOINLINE[0] $wexpensive #-}   $wexpensive x = x + 1@@ -346,40 +348,63 @@  Note [Wrapper activation] ~~~~~~~~~~~~~~~~~~~~~~~~~-When should the wrapper inlining be active?  It must not be active-earlier than the current Activation of the Id (eg it might have a-NOINLINE pragma).  But in fact strictness analysis happens fairly-late in the pipeline, and we want to prioritise specialisations over-strictness.  Eg if we have-  module Foo where-    f :: Num a => a -> Int -> a-    f n 0 = n              -- Strict in the Int, hence wrapper-    f n x = f (n+n) (x-1)+When should the wrapper inlining be active? -    g :: Int -> Int-    g x = f x x            -- Provokes a specialisation for f+1. It must not be active earlier than the current Activation of the+   Id -  module Bar where-    import Foo+2. It should be active at some point, despite (1) because of+   Note [Worker-wrapper for NOINLINE functions] -    h :: Int -> Int-    h x = f 3 x+3. For ordinary functions with no pragmas we want to inline the+   wrapper as early as possible (Trac #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.+   But if f is w/w'd (which it might be), we want the inlining to+   occur just as if it hadn't been. -Then we want the specialisation for 'f' to kick in before the wrapper does.+   (This only matters if f's RHS is big enough to w/w, but small+   enough to inline given the call site, but that can happen.) -Now in fact the 'gentle' simplification pass encourages this, by-having rules on, but inlinings off.  But that's kind of lucky. It seems-more robust to give the wrapper an Activation of (ActiveAfter 0),-so that it becomes active in an importing module at the same time that-it appears in the first place in the defining module.+4. We do not want to inline the wrapper before specialisation.+         module Foo where+           f :: Num a => a -> Int -> a+           f n 0 = n              -- Strict in the Int, hence wrapper+           f n x = f (n+n) (x-1) -At one stage I tried making the wrapper inlining always-active, and-that had a very bad effect on nofib/imaginary/x2n1; a wrapper was-inlined before the specialisation fired.+           g :: Int -> Int+           g x = f x x            -- Provokes a specialisation for f -The use an inl_inline of NoUserInline to distinguish this pragma from one-that was given by the user. In particular, CSE will not happen if there is a-user-specified pragma, but should happen for w/w’ed things (#14186).+         module Bar where+           import Foo++           h :: Int -> Int+           h x = f 3 x++   In module Bar we want to give specialisations a chance to fire+   before inlining f's wrapper.++Reminder: Note [Don't w/w INLINE things], so we don't need to worry+          about INLINE things here.++Conclusion:+  - If the user said NOINLINE[n], respect that+  - If the user said NOINLINE, inline the wrapper as late as+    poss (phase 0). This is a compromise driven by (2) above+  - Otherwise inline wrapper in phase 2.  That allows the+    'gentle' simplification pass to apply specialisation rules++Historical note: At one stage I tried making the wrapper inlining+always-active, and that had a very bad effect on nofib/imaginary/x2n1;+a wrapper was inlined before the specialisation fired.++Note [Wrapper NoUserInline]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+The use an inl_inline of NoUserInline on the wrapper distinguishes+this pragma from one that was given by the user. In particular, CSE+will not happen if there is a user-specified pragma, but should happen+for w/w’ed things (#14186). -}  tryWW   :: DynFlags@@ -469,29 +494,29 @@ splitFun dflags fam_envs fn_id fn_info wrap_dmds res_info rhs   = WARN( not (wrap_dmds `lengthIs` arity), ppr fn_id <+> (ppr arity $$ ppr wrap_dmds $$ ppr res_info) ) do     -- The arity should match the signature-    stuff <- mkWwBodies dflags fam_envs rhs_fvs mb_join_arity fun_ty-                        wrap_dmds use_res_info+    stuff <- mkWwBodies dflags fam_envs rhs_fvs fn_id wrap_dmds use_res_info     case stuff of       Just (work_demands, join_arity, wrap_fn, work_fn) -> do         work_uniq <- getUniqueM         let work_rhs = work_fn rhs-            work_inline = inl_inline inl_prag-            work_act = case work_inline of-              -- See Note [Activation for workers]-              NoInline -> inl_act inl_prag-              _        -> wrap_act+            work_act = case fn_inline_spec of  -- See Note [Worker activation]+                          NoInline -> fn_act+                          _        -> wrap_act+             work_prag = InlinePragma { inl_src = SourceText "{-# INLINE"-                                     , inl_inline = work_inline+                                     , inl_inline = fn_inline_spec                                      , inl_sat    = Nothing                                      , inl_act    = work_act                                      , inl_rule   = FunLike }-              -- idl_inline: copy from fn_id; see Note [Worker-wrapper for INLINABLE functions]-              -- idl_act: see Note [Activation for workers]-              -- inl_rule: it does not make sense for workers to be constructorlike.+              -- inl_inline: copy from fn_id; see Note [Worker-wrapper for INLINABLE functions]+              -- inl_act:    see Note [Worker activation]+              -- inl_rule:   it does not make sense for workers to be constructorlike.+             work_join_arity | isJoinId fn_id = Just join_arity                             | otherwise      = Nothing               -- worker is join point iff wrapper is join point               -- (see Note [Don't CPR join points])+             work_id  = mkWorkerId work_uniq fn_id (exprType work_rhs)                         `setIdOccInfo` occInfo fn_info                                 -- Copy over occurrence info from parent@@ -501,7 +526,7 @@                          `setInlinePragma` work_prag -                        `setIdUnfolding` mkWorkerUnfolding dflags work_fn (unfoldingInfo fn_info)+                        `setIdUnfolding` mkWorkerUnfolding dflags work_fn fn_unfolding                                 -- See Note [Worker-wrapper for INLINABLE functions]                          `setIdStrictness` mkClosedStrictSig work_demands work_res_info@@ -523,18 +548,21 @@             worker_demand | single_call = mkWorkerDemand work_arity                           | otherwise   = topDmd --            wrap_act  = ActiveAfter NoSourceText 0             wrap_rhs  = wrap_fn work_id-            wrap_prag = InlinePragma { inl_src = SourceText "{-# INLINE"+            wrap_act  = case fn_act of  -- See Note [Wrapper activation]+                           ActiveAfter {} -> fn_act+                           NeverActive    -> ActiveAfter NoSourceText 0+                           _              -> ActiveAfter NoSourceText 2+            wrap_prag = InlinePragma { inl_src    = SourceText "{-# INLINE"                                      , inl_inline = NoUserInline                                      , inl_sat    = Nothing                                      , inl_act    = wrap_act                                      , inl_rule   = rule_match_info }-                -- See Note [Wrapper activation]-                -- The RuleMatchInfo is (and must be) unaffected+                -- inl_act:    see Note [Wrapper activation]+                -- inl_inline: see Note [Wrapper NoUserInline]+                -- inl_rule:   RuleMatchInfo is (and must be) unaffected -            wrap_id   = fn_id `setIdUnfolding`  mkWwInlineRule wrap_rhs arity+            wrap_id   = fn_id `setIdUnfolding`  mkWwInlineRule dflags wrap_rhs arity                               `setInlinePragma` wrap_prag                               `setIdOccInfo`    noOccInfo                                 -- Zap any loop-breaker-ness, to avoid bleating from Lint@@ -547,11 +575,12 @@        Nothing -> return [(fn_id, rhs)]   where-    mb_join_arity   = isJoinId_maybe fn_id     rhs_fvs         = exprFreeVars rhs-    fun_ty          = idType fn_id-    inl_prag        = inlinePragInfo fn_info-    rule_match_info = inlinePragmaRuleMatchInfo inl_prag+    fn_inl_prag     = inlinePragInfo fn_info+    fn_inline_spec  = inl_inline fn_inl_prag+    fn_act          = inl_act fn_inl_prag+    rule_match_info = inlinePragmaRuleMatchInfo fn_inl_prag+    fn_unfolding    = unfoldingInfo fn_info     arity           = arityInfo fn_info                     -- The arity is set by the simplifier using exprEtaExpandArity                     -- So it may be more than the number of top-level-visible lambdas@@ -660,7 +689,7 @@ splitThunk :: DynFlags -> FamInstEnvs -> RecFlag -> Var -> Expr Var -> UniqSM [(Var, Expr Var)] splitThunk dflags fam_envs is_rec fn_id rhs   = ASSERT(not (isJoinId fn_id))-    do { (useful,_, wrap_fn, work_fn) <- mkWWstr dflags fam_envs [fn_id]+    do { (useful,_, wrap_fn, work_fn) <- mkWWstr dflags fam_envs False [fn_id]        ; let res = [ (fn_id, Let (NonRec fn_id rhs) (wrap_fn (work_fn (Var fn_id)))) ]        ; if useful then ASSERT2( isNonRec is_rec, ppr fn_id ) -- The thunk must be non-recursive                    return res
stranal/WwLib.hs view
@@ -123,8 +123,7 @@            -> FamInstEnvs            -> VarSet         -- Free vars of RHS                              -- See Note [Freshen WW arguments]-           -> Maybe JoinArity -- Just ar <=> is join point with join arity ar-           -> Type           -- Type of original function+           -> Id             -- The original function            -> [Demand]       -- Strictness of original function            -> DmdResult      -- Info about function result            -> UniqSM (Maybe WwResult)@@ -140,12 +139,14 @@ --                        let x = (a,b) in --                        E -mkWwBodies dflags fam_envs rhs_fvs mb_join_arity fun_ty demands res_info+mkWwBodies dflags fam_envs rhs_fvs fun_id demands res_info   = do  { let empty_subst = mkEmptyTCvSubst (mkInScopeSet rhs_fvs)                 -- See Note [Freshen WW arguments] -        ; (wrap_args, wrap_fn_args, work_fn_args, res_ty) <- mkWWargs empty_subst fun_ty demands-        ; (useful1, work_args, wrap_fn_str, work_fn_str) <- mkWWstr dflags fam_envs wrap_args+        ; (wrap_args, wrap_fn_args, work_fn_args, res_ty)+             <- mkWWargs empty_subst fun_ty demands+        ; (useful1, work_args, wrap_fn_str, work_fn_str)+             <- mkWWstr dflags fam_envs has_inlineable_prag wrap_args          -- Do CPR w/w.  See Note [Always do CPR w/w]         ; (useful2, wrap_fn_cpr, work_fn_cpr, cpr_res_ty)@@ -158,7 +159,7 @@          ; if isWorkerSmallEnough dflags work_args              && not (too_many_args_for_join_point wrap_args)-             && (useful1 && not only_one_void_argument || useful2)+             && ((useful1 && not only_one_void_argument) || useful2)           then return (Just (worker_args_dmds, length work_call_args,                        wrapper_body, worker_body))           else return Nothing@@ -171,6 +172,11 @@         -- f's RHS is now trivial (size 1) we still want the __inline__ to prevent         -- fw from being inlined into f's RHS   where+    fun_ty        = idType fun_id+    mb_join_arity = isJoinId_maybe fun_id+    has_inlineable_prag = isStableUnfolding (realIdUnfolding fun_id)+                          -- See Note [Do not unpack class dictionaries]+     -- Note [Do not split void functions]     only_one_void_argument       | [d] <- demands@@ -263,11 +269,21 @@     | otherwise     = (args ++ [voidArgId], args ++ [voidPrimId])     where+      -- See "Making wrapper args" section above       needsAValueLambda =-        isUnliftedType res_ty+        lifted+        -- We may encounter a levity-polymorphic result, in which case we+        -- conservatively assume that we have laziness that needs preservation.+        -- See #15186.         || not (gopt Opt_FunToThunk dflags)            -- see Note [Protecting the last value argument] +      -- Might the result be lifted?+      lifted =+        case isLiftedType_maybe res_ty of+          Just lifted -> lifted+          Nothing     -> True+ {- Note [Protecting the last value argument] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -490,6 +506,8 @@  mkWWstr :: DynFlags         -> FamInstEnvs+        -> Bool    -- True <=> INLINEABLE pragama on this function defn+                   -- See Note [Do not unpack class dictionaries]         -> [Var]                                -- Wrapper args; have their demand info on them                                                 --  *Includes type variables*         -> UniqSM (Bool,                        -- Is this useful@@ -501,13 +519,18 @@                    CoreExpr -> CoreExpr)        -- Worker body, lacking the original body of the function,                                                 -- and lacking its lambdas.                                                 -- This fn does the reboxing-mkWWstr _ _ []-  = return (False, [], nop_fn, nop_fn)+mkWWstr dflags fam_envs has_inlineable_prag args+  = go args+  where+    go_one arg = mkWWstr_one dflags fam_envs has_inlineable_prag arg -mkWWstr dflags fam_envs (arg : args) = do-    (useful1, args1, wrap_fn1, work_fn1) <- mkWWstr_one dflags fam_envs arg-    (useful2, args2, wrap_fn2, work_fn2) <- mkWWstr dflags fam_envs args-    return (useful1 || useful2, args1 ++ args2, wrap_fn1 . wrap_fn2, work_fn1 . work_fn2)+    go []           = return (False, [], nop_fn, nop_fn)+    go (arg : args) = do { (useful1, args1, wrap_fn1, work_fn1) <- go_one arg+                         ; (useful2, args2, wrap_fn2, work_fn2) <- go args+                         ; return ( useful1 || useful2+                                  , args1 ++ args2+                                  , wrap_fn1 . wrap_fn2+                                  , work_fn1 . work_fn2) }  {- Note [Unpacking arguments with product and polymorphic demands]@@ -544,9 +567,12 @@ --        brings into scope work_args (via cases) --   * work_fn assumes work_args are in scope, a --        brings into scope wrap_arg (via lets)-mkWWstr_one :: DynFlags -> FamInstEnvs -> Var-    -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)-mkWWstr_one dflags fam_envs arg+mkWWstr_one :: DynFlags -> FamInstEnvs+            -> Bool    -- True <=> INLINEABLE pragama on this function defn+                       -- See Note [Do not unpack class dictionaries]+            -> Var+            -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr)+mkWWstr_one dflags fam_envs has_inlineable_prag arg   | isTyVar arg   = return (False, [arg],  nop_fn, nop_fn) @@ -581,8 +607,10 @@   | isStrictDmd dmd   , Just cs <- splitProdDmd_maybe dmd       -- See Note [Unpacking arguments with product and polymorphic demands]+  , not (has_inlineable_prag && isClassPred arg_ty)+      -- See Note [Do not unpack class dictionaries]   , Just (data_con, inst_tys, inst_con_arg_tys, co)-             <- deepSplitProductType_maybe fam_envs (idType arg)+             <- deepSplitProductType_maybe fam_envs arg_ty   , cs `equalLength` inst_con_arg_tys       -- See Note [mkWWstr and unsafeCoerce]   = do { (uniq1:uniqs) <- getUniquesM@@ -594,7 +622,7 @@                              -- in Simplify.hs; and see Trac #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 unpk_args+         ; (_, worker_args, wrap_fn, work_fn) <- mkWWstr dflags fam_envs False unpk_args          ; return (True, worker_args, unbox_fn . wrap_fn, work_fn . rebox_fn) }                            -- Don't pass the arg, rebox instead @@ -602,7 +630,8 @@   = return (False, [arg], nop_fn, nop_fn)    where-    dmd = idDemandInfo arg+    arg_ty = idType arg+    dmd    = idDemandInfo arg     mk_ww_arg uniq ty sub_dmd = setIdDemandInfo (mk_ww_local uniq ty) sub_dmd  ----------------------@@ -680,10 +709,12 @@ and the type-class specialiser can't specialise that.  An example is Trac #6056. -Moreover, dictionaries can have a lot of fields, so unpacking them can-increase closure sizes.+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). -Conclusion: don't unpack dictionaries.+Historical note: Trac #14955 describes how I got this fix wrong+the first time. -}  deepSplitProductType_maybe@@ -699,7 +730,6 @@                     `orElse` (mkRepReflCo ty, ty)   , Just (tc, tc_args) <- splitTyConApp_maybe ty1   , Just con <- isDataProductTyCon_maybe tc-  , not (isClassTyCon tc)  -- See Note [Do not unpack class dictionaries]   , let arg_tys = dataConInstArgTys con tc_args         strict_marks = dataConRepStrictness con   = Just (con, tc_args, zipEqual "dspt" arg_tys strict_marks, co)
typecheck/FamInst.hs view
@@ -19,6 +19,7 @@ import FamInstEnv import InstEnv( roughMatchTcs ) import Coercion+import CoreLint import TcEvidence import LoadIface import TcRnMonad@@ -45,10 +46,8 @@  #include "HsVersions.h" -{---Note [The type family instance consistency story]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [The type family instance consistency story]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  To preserve type safety we must ensure that for any given module, all the type family instances used either in that module or in any module@@ -153,20 +152,30 @@  newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcRnIf gbl lcl FamInst -- Freshen the type variables of the FamInst branches--- Called from the vectoriser monad too, hence the rather general type 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 )     do { (subst, tvs') <- freshenTyVarBndrs tvs        ; (subst, cvs') <- freshenCoVarBndrsX subst cvs+       ; dflags <- getDynFlags+       ; let lhs'     = substTys subst lhs+             rhs'     = substTy  subst rhs+             tcvs'    = tvs' ++ cvs'+       ; when (gopt Opt_DoCoreLinting dflags) $+           -- Check that the types involved in this instance are well formed.+           -- Do /not/ expand type synonyms, for the reasons discussed in+           -- Note [Linting type synonym applications].+           case lintTypes dflags tcvs' (rhs':lhs') of+             Nothing       -> pure ()+             Just fail_msg -> pprPanic "Core Lint error" fail_msg        ; return (FamInst { fi_fam      = tyConName fam_tc                          , fi_flavor   = flavor                          , fi_tcs      = roughMatchTcs lhs                          , fi_tvs      = tvs'                          , fi_cvs      = cvs'-                         , fi_tys      = substTys subst lhs-                         , fi_rhs      = substTy  subst rhs+                         , fi_tys      = lhs'+                         , fi_rhs      = rhs'                          , fi_axiom    = axiom }) }   where     lhs_kind = typeKind (mkTyConApp fam_tc lhs)@@ -394,7 +403,7 @@            --   type family F a            --            -- When typechecking A, we are NOT allowed to poke the TyThing-           -- for for F until we have typechecked the family.  Thus, we+           -- for F until we have typechecked the family.  Thus, we            -- can't do consistency checking for the instance in B            -- (checkFamInstConsistency is called during renaming).            -- Failing to defer the consistency check lead to #11062.@@ -434,7 +443,7 @@            -- as quickly as possible, so that we aren't typechecking            -- values with inconsistent axioms in scope.            ---           -- See also Note [Tying the knot] and Note [Type-checking inside the knot]+           -- See also Note [Tying the knot]            -- for why we are doing this at all.            ; let check_now = famInstEnvElts env1            ; mapM_ (checkForConflicts (emptyFamInstEnv, env2))           check_now@@ -576,37 +585,56 @@  -- Otherwise proceed... tcExtendLocalFamInstEnv fam_insts thing_inside- = do { env <- getGblEnv-      ; let this_mod = tcg_mod env-            imports = tcg_imports env+ = do { -- Load family-instance modules "below" this module, so that+        -- allLocalFamInst can check for consistency with them+        -- See Note [The type family instance consistency story]+        loadDependentFamInstModules fam_insts -            -- Optimization: If we're only defining type family instances-            -- for type families *defined in the home package*, then we-            -- only have to load interface files that belong to the home-            -- package. The reason is that there's no recursion between-            -- packages, so modules in other packages can't possibly define-            -- instances for our type families.-            ---            -- (Within the home package, we could import a module M that-            -- imports us via an hs-boot file, and thereby defines an-            -- instance of a type family defined in this module. So we can't-            -- apply the same logic to avoid reading any interface files at-            -- all, when we define an instances for type family defined in-            -- the current module.)-            home_fams_only = all (nameIsHomePackage this_mod . fi_fam) fam_insts-            want_module mod-              | mod == this_mod = False-              | home_fams_only  = moduleUnitId mod == moduleUnitId this_mod-              | otherwise       = True-      ; loadModuleInterfaces (text "Loading family-instance modules")-                             (filter want_module (imp_finsts imports))+        -- Now add the instances one by one+      ; env <- getGblEnv       ; (inst_env', fam_insts') <- foldlM addLocalFamInst                                        (tcg_fam_inst_env env, tcg_fam_insts env)                                        fam_insts+       ; let env' = env { tcg_fam_insts    = fam_insts'                        , tcg_fam_inst_env = inst_env' }       ; setGblEnv env' thing_inside       }++loadDependentFamInstModules :: [FamInst] -> TcM ()+-- Load family-instance modules "below" this module, so that+-- allLocalFamInst can check for consistency with them+-- See Note [The type family instance consistency story]+loadDependentFamInstModules fam_insts+ = do { env <- getGblEnv+      ; let this_mod = tcg_mod env+            imports  = tcg_imports env++            want_module mod  -- See Note [Home package family instances]+              | mod == this_mod = False+              | home_fams_only  = moduleUnitId mod == moduleUnitId this_mod+              | otherwise       = True+            home_fams_only = all (nameIsHomePackage this_mod . fi_fam) fam_insts++      ; loadModuleInterfaces (text "Loading family-instance modules") $+        filter want_module (imp_finsts imports) }++{- Note [Home package family instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Optimization: If we're only defining type family instances+for type families *defined in the home package*, then we+only have to load interface files that belong to the home+package. The reason is that there's no recursion between+packages, so modules in other packages can't possibly define+instances for our type families.++(Within the home package, we could import a module M that+imports us via an hs-boot file, and thereby defines an+instance of a type family defined in this module. So we can't+apply the same logic to avoid reading any interface files at+all, when we define an instances for type family defined in+the current module.+-}  -- Check that the proposed new instance is OK, -- and then add it to the home inst env
typecheck/Inst.hs view
@@ -15,7 +15,7 @@        instCall, instDFunType, instStupidTheta, instTyVarsWith,        newWanted, newWanteds, -       tcInstBinders, tcInstBinder,+       tcInstTyBinders, tcInstTyBinder,         newOverloadedLit, mkOverLit, @@ -45,7 +45,7 @@ import TcEnv import TcEvidence import InstEnv-import TysWiredIn  ( heqDataCon, coercibleDataCon )+import TysWiredIn  ( heqDataCon ) import CoreSyn     ( isOrphan ) import FunDeps import TcMType@@ -55,6 +55,7 @@ import HscTypes import Class( Class ) import MkId( mkDictFunId )+import CoreSyn( Expr(..) )  -- For the Coercion constructor import Id import Name import Var      ( EvVar, mkTyVar, tyVarName, TyVarBndr(..) )@@ -97,7 +98,7 @@        ; wrap <- ASSERT( not (isForAllTy ty) && isSingleton theta )                  instCall origin [inst_ty] theta -       ; return (mkHsWrap wrap (HsVar (noLoc id))) }+       ; return (mkHsWrap wrap (HsVar noExt (noLoc id))) }  {- ************************************************************************@@ -352,16 +353,17 @@        ; traceTc "instCallConstraints" (ppr evs)        ; return (mkWpEvApps evs) }   where+    go :: TcPredType -> TcM EvTerm     go pred      | Just (Nominal, ty1, ty2) <- getEqPredTys_maybe pred -- Try short-cut #1      = do  { co <- unifyType Nothing ty1 ty2-           ; return (EvCoercion co) }+           ; return (evCoercion co) }         -- Try short-cut #2      | Just (tc, args@[_, _, ty1, ty2]) <- splitTyConApp_maybe pred      , tc `hasKey` heqTyConKey      = do { co <- unifyType Nothing ty1 ty2-          ; return (EvDFunApp (dataConWrapId heqDataCon) args [EvCoercion co]) }+          ; return (evDFunApp (dataConWrapId heqDataCon) args [Coercion co]) }       | otherwise      = emitWanted orig pred@@ -371,10 +373,14 @@                     , TcThetaType ) -- instantiated constraint -- See Note [DFunInstType: instantiating types] in InstEnv instDFunType dfun_id dfun_inst_tys-  = do { (subst, inst_tys) <- go emptyTCvSubst dfun_tvs dfun_inst_tys+  = do { (subst, inst_tys) <- go empty_subst dfun_tvs dfun_inst_tys        ; return (inst_tys, substTheta subst dfun_theta) }   where-    (dfun_tvs, dfun_theta, _) = tcSplitSigmaTy (idType dfun_id)+    dfun_ty = idType dfun_id+    (dfun_tvs, dfun_theta, _) = tcSplitSigmaTy dfun_ty+    empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfType dfun_ty))+                  -- With quantified constraints, the+                  -- type of a dfun may not be closed      go :: TCvSubst -> [TyVar] -> [DFunInstType] -> TcM (TCvSubst, [TcType])     go subst [] [] = return (subst, [])@@ -404,25 +410,97 @@ *                                                                      * ************************************************************************ +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.+ -}  --------------------------- -- | This is used to instantiate binders when type-checking *types* only. -- The @VarEnv Kind@ gives some known instantiations. -- See also Note [Bidirectional type checking]-tcInstBinders :: TCvSubst -> Maybe (VarEnv Kind)-               -> [TyBinder] -> TcM (TCvSubst, [TcType])-tcInstBinders subst mb_kind_info bndrs-  = do { (subst, args) <- mapAccumLM (tcInstBinder mb_kind_info) subst bndrs+tcInstTyBinders :: TCvSubst -> Maybe (VarEnv Kind)+                -> [TyBinder] -> TcM (TCvSubst, [TcType])+tcInstTyBinders subst mb_kind_info bndrs+  = do { (subst, args) <- mapAccumLM (tcInstTyBinder mb_kind_info) subst bndrs        ; traceTc "instantiating tybinders:"            (vcat $ zipWith (\bndr arg -> ppr bndr <+> text ":=" <+> ppr arg)                            bndrs args)        ; return (subst, args) }  -- | Used only in *types*-tcInstBinder :: Maybe (VarEnv Kind)-              -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)-tcInstBinder mb_kind_info subst (Named (TvBndr tv _))+tcInstTyBinder :: Maybe (VarEnv Kind)+               -> TCvSubst -> TyBinder -> TcM (TCvSubst, TcType)+tcInstTyBinder mb_kind_info subst (Named (TvBndr tv _))   = case lookup_tv tv of       Just ki -> return (extendTvSubstAndInScope subst tv ki, ki)       Nothing -> do { (subst', tv') <- newMetaTyVarX subst tv@@ -432,23 +510,16 @@                       ; lookupVarEnv env tv }  -tcInstBinder _ subst (Anon ty)+tcInstTyBinder _ subst (Anon ty)      -- This is the *only* constraint currently handled in types.-  | Just (mk, role, k1, k2) <- get_pred_tys_maybe substed_ty-  = do { let origin = TypeEqOrigin { uo_actual   = k1-                                   , uo_expected = k2-                                   , uo_thing    = Nothing-                                   , uo_visible  = True }-       ; co <- case role of-                 Nominal          -> unifyKind Nothing k1 k2-                 Representational -> emitWantedEq origin KindLevel role k1 k2-                 Phantom          -> pprPanic "tcInstBinder Phantom" (ppr ty)-       ; arg' <- mk co k1 k2+  | Just (mk, k1, k2) <- get_eq_tys_maybe substed_ty+  = 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 type:" <+> ppr tidy_ty)+       ; addErrTcM (env, text "Illegal constraint in a kind:" <+> ppr tidy_ty)           -- just invent a new variable so that we can continue        ; u <- newUnique@@ -463,22 +534,33 @@   where     substed_ty = substTy subst ty -      -- handle boxed equality constraints, because it's so easy-    get_pred_tys_maybe ty-      | Just (r, k1, k2) <- getEqPredTys_maybe ty-      = Just (\co _ _ -> return $ mkCoercionTy co, r, k1, k2)+      -- 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 (mkHEqBoxTy, Nominal, k1, k2)+             -> 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 (mkEqBoxTy, Nominal, k1, k2)-           | tc `hasKey` coercibleTyConKey-             -> Just (mkCoercibleBoxTy, Representational, k1, k2)+             -> Just (\co -> mkEqBoxTy co k1 k2, k1, k2)            | otherwise              -> Nothing+       | otherwise       = Nothing @@ -501,15 +583,6 @@        ; return $ mkTyConApp (promoteDataCon datacon) [k, ty1, ty2, hetero] }   where k = typeKind ty1 --- | This takes @a ~R# b@ and returns @Coercible a b@.-mkCoercibleBoxTy :: TcCoercion -> Type -> Type -> TcM Type--- monadic just for convenience with mkEqBoxTy-mkCoercibleBoxTy co ty1 ty2-  = do { return $-         mkTyConApp (promoteDataCon coercibleDataCon)-                    [k, ty1, ty2, mkCoercionTy co] }-  where k = typeKind ty1- {- ************************************************************************ *                                                                      *@@ -531,7 +604,7 @@                  -> ExpRhoType                  -> TcM (HsOverLit GhcTcId) newOverloadedLit-  lit@(OverLit { ol_val = val, ol_rebindable = rebindable }) res_ty+  lit@(OverLit { ol_val = val, ol_ext = rebindable }) res_ty   | not rebindable     -- all built-in overloaded lits are tau-types, so we can just     -- tauify the ExpType@@ -542,8 +615,8 @@         -- Reason: If we do, tcSimplify will call lookupInst, which         --         will call tcSyntaxName, which does unification,         --         which tcSimplify doesn't like-           Just expr -> return (lit { ol_witness = expr, ol_type = res_ty-                                    , ol_rebindable = False })+           Just expr -> return (lit { ol_witness = expr+                                    , ol_ext = OverLitTc False res_ty })            Nothing   -> newNonTrivialOverloadedLit orig lit                                                    (mkCheckExpType res_ty) } @@ -551,6 +624,7 @@   = newNonTrivialOverloadedLit orig lit res_ty   where     orig = LiteralOrigin lit+newOverloadedLit XOverLit{} _ = panic "newOverloadedLit"  -- Does not handle things that 'shortCutLit' can handle. See also -- newOverloadedLit in TcUnify@@ -559,8 +633,8 @@                            -> ExpRhoType                            -> TcM (HsOverLit GhcTcId) newNonTrivialOverloadedLit orig-  lit@(OverLit { ol_val = val, ol_witness = HsVar (L _ meth_name)-               , ol_rebindable = rebindable }) res_ty+  lit@(OverLit { ol_val = val, ol_witness = HsVar _ (L _ meth_name)+               , ol_ext = rebindable }) res_ty   = do  { hs_lit <- mkOverLit val         ; let lit_ty = hsLitType hs_lit         ; (_, fi') <- tcSyntaxOp orig (mkRnSyntaxExpr meth_name)@@ -569,23 +643,22 @@         ; let L _ witness = nlHsSyntaxApps fi' [nlHsLit hs_lit]         ; res_ty <- readExpType res_ty         ; return (lit { ol_witness = witness-                      , ol_type = res_ty-                      , ol_rebindable = rebindable }) }+                      , ol_ext = OverLitTc rebindable res_ty }) } newNonTrivialOverloadedLit _ lit _   = pprPanic "newNonTrivialOverloadedLit" (ppr lit)  -------------mkOverLit ::(HasDefaultX p, SourceTextX p) => OverLitVal -> TcM (HsLit p)+mkOverLit ::OverLitVal -> TcM (HsLit GhcTc) mkOverLit (HsIntegral i)   = do  { integer_ty <- tcMetaTy integerTyConName-        ; return (HsInteger (setSourceText $ il_text i)+        ; return (HsInteger (il_text i)                             (il_value i) integer_ty) }  mkOverLit (HsFractional r)   = do  { rat_ty <- tcMetaTy rationalTyConName-        ; return (HsRat def r rat_ty) }+        ; return (HsRat noExt r rat_ty) } -mkOverLit (HsIsString src s) = return (HsString (setSourceText src) s)+mkOverLit (HsIsString src s) = return (HsString src s)  {- ************************************************************************@@ -627,7 +700,7 @@ -- USED ONLY FOR CmdTop (sigh) *** -- See Note [CmdSyntaxTable] in HsExpr -tcSyntaxName orig ty (std_nm, HsVar (L _ user_nm))+tcSyntaxName orig ty (std_nm, HsVar _ (L _ user_nm))   | std_nm == user_nm   = do rhs <- newMethodFromName orig std_nm ty        return (std_nm, rhs)
typecheck/TcAnnotations.hs view
@@ -51,7 +51,7 @@ tcAnnotations' anns = mapM tcAnnotation anns  tcAnnotation :: LAnnDecl GhcRn -> TcM Annotation-tcAnnotation (L loc ann@(HsAnnotation _ provenance expr)) = do+tcAnnotation (L loc ann@(HsAnnotation _ _ provenance expr)) = do     -- Work out what the full target of this annotation was     mod <- getModule     let target = annProvenanceToTarget mod provenance@@ -65,6 +65,7 @@     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"  annProvenanceToTarget :: Module -> AnnProvenance Name                       -> AnnTarget Name@@ -72,6 +73,6 @@ annProvenanceToTarget _   (TypeAnnProvenance (L _ name))  = NamedTarget name annProvenanceToTarget mod ModuleAnnProvenance             = ModuleTarget mod -annCtxt :: (SourceTextX p, OutputableBndrId p) => AnnDecl p -> SDoc+annCtxt :: (OutputableBndrId (GhcPass p)) => AnnDecl (GhcPass p) -> SDoc annCtxt ann   = hang (text "In the annotation:") 2 (ppr ann)
typecheck/TcArrows.hs view
@@ -121,11 +121,13 @@          -> CmdType          -> TcM (LHsCmdTop GhcTcId) -tcCmdTop env (L loc (HsCmdTop cmd _ _ names)) cmd_ty@(cmd_stk, res_ty)+tcCmdTop env (L loc (HsCmdTop names cmd)) cmd_ty@(cmd_stk, res_ty)   = setSrcSpan loc $     do  { cmd'   <- tcCmd env cmd cmd_ty         ; names' <- mapM (tcSyntaxName ProcOrigin (cmd_arr env)) names-        ; return (L loc $ HsCmdTop cmd' cmd_stk res_ty names') }+        ; return (L loc $ HsCmdTop (CmdTopTc cmd_stk res_ty names') cmd') }+tcCmdTop _ (L _ XCmdTop{}) _ = panic "tcCmdTop"+ ---------------------------------------- tcCmd  :: CmdEnv -> LHsCmd GhcRn -> CmdType -> TcM (LHsCmd GhcTcId)         -- The main recursive function@@ -135,35 +137,35 @@         ; return (L loc cmd') }  tc_cmd :: CmdEnv -> HsCmd GhcRn  -> CmdType -> TcM (HsCmd GhcTcId)-tc_cmd env (HsCmdPar cmd) res_ty+tc_cmd env (HsCmdPar x cmd) res_ty   = do  { cmd' <- tcCmd env cmd res_ty-        ; return (HsCmdPar cmd') }+        ; return (HsCmdPar x cmd') } -tc_cmd env (HsCmdLet (L l binds) (L body_loc body)) res_ty+tc_cmd env (HsCmdLet x (L l binds) (L body_loc body)) res_ty   = do  { (binds', body') <- tcLocalBinds binds         $                              setSrcSpan body_loc        $                              tc_cmd env body res_ty-        ; return (HsCmdLet (L l binds') (L body_loc body')) }+        ; return (HsCmdLet x (L l binds') (L body_loc body')) } -tc_cmd env in_cmd@(HsCmdCase scrut matches) (stk, res_ty)+tc_cmd env in_cmd@(HsCmdCase x scrut matches) (stk, res_ty)   = addErrCtxt (cmdCtxt in_cmd) $ do       (scrut', scrut_ty) <- tcInferRho scrut       matches' <- tcMatchesCase match_ctxt scrut_ty matches (mkCheckExpType res_ty)-      return (HsCmdCase scrut' matches')+      return (HsCmdCase x scrut' matches')   where     match_ctxt = MC { mc_what = CaseAlt,                       mc_body = mc_body }     mc_body body res_ty' = do { res_ty' <- expTypeToType res_ty'                               ; tcCmd env body (stk, res_ty') } -tc_cmd env (HsCmdIf Nothing pred b1 b2) res_ty    -- Ordinary 'if'+tc_cmd env (HsCmdIf x Nothing pred b1 b2) res_ty    -- Ordinary 'if'   = do  { pred' <- tcMonoExpr pred (mkCheckExpType boolTy)         ; b1'   <- tcCmd env b1 res_ty         ; b2'   <- tcCmd env b2 res_ty-        ; return (HsCmdIf Nothing pred' b1' b2')+        ; return (HsCmdIf x Nothing pred' b1' b2')     } -tc_cmd env (HsCmdIf (Just fun) pred b1 b2) res_ty -- Rebindable syntax for if+tc_cmd env (HsCmdIf x (Just fun) pred b1 b2) res_ty -- Rebindable syntax for if   = do  { pred_ty <- newOpenFlexiTyVarTy         -- For arrows, need ifThenElse :: forall r. T -> r -> r -> r         -- because we're going to apply it to the environment, not@@ -179,7 +181,7 @@          ; b1'   <- tcCmd env b1 res_ty         ; b2'   <- tcCmd env b2 res_ty-        ; return (HsCmdIf (Just fun') pred' b1' b2')+        ; return (HsCmdIf x (Just fun') pred' b1' b2')     }  -------------------------------------------@@ -198,7 +200,7 @@ -- -- (plus -<< requires ArrowApply) -tc_cmd env cmd@(HsCmdArrApp fun arg _ ho_app lr) (_, res_ty)+tc_cmd env cmd@(HsCmdArrApp _ fun arg ho_app lr) (_, res_ty)   = addErrCtxt (cmdCtxt cmd)    $     do  { arg_ty <- newOpenFlexiTyVarTy         ; let fun_ty = mkCmdArrTy env arg_ty res_ty@@ -206,7 +208,7 @@          ; arg' <- tcMonoExpr arg (mkCheckExpType arg_ty) -        ; return (HsCmdArrApp fun' arg' fun_ty ho_app lr) }+        ; return (HsCmdArrApp fun_ty fun' arg' ho_app lr) }   where        -- Before type-checking f, use the environment of the enclosing        -- proc for the (-<) case.@@ -225,12 +227,12 @@ -- ----------------------------- -- D;G |-a cmd exp : stk --> res -tc_cmd env cmd@(HsCmdApp fun arg) (cmd_stk, res_ty)+tc_cmd env cmd@(HsCmdApp x fun arg) (cmd_stk, res_ty)   = addErrCtxt (cmdCtxt cmd)    $     do  { arg_ty <- newOpenFlexiTyVarTy         ; fun'   <- tcCmd env fun (mkPairTy arg_ty cmd_stk, res_ty)         ; arg'   <- tcMonoExpr arg (mkCheckExpType arg_ty)-        ; return (HsCmdApp fun' arg') }+        ; return (HsCmdApp x fun' arg') }  ------------------------------------------- --              Lambda@@ -240,9 +242,9 @@ -- D;G |-a (\x.cmd) : (t,stk) --> res  tc_cmd env-       (HsCmdLam (MG { mg_alts = L l [L mtch_loc+       (HsCmdLam x (MG { mg_alts = L l [L mtch_loc                                    (match@(Match { m_pats = pats, m_grhss = grhss }))],-                       mg_origin = origin }))+                         mg_origin = origin }))        (cmd_stk, res_ty)   = addErrCtxt (pprMatchInCtxt match)        $     do  { (co, arg_tys, cmd_stk') <- matchExpectedCmdArgs n_pats cmd_stk@@ -252,35 +254,39 @@                              tcPats LambdaExpr pats (map mkCheckExpType arg_tys) $                              tc_grhss grhss cmd_stk' (mkCheckExpType res_ty) -        ; let match' = L mtch_loc (Match { m_ctxt = LambdaExpr, m_pats = pats'+        ; let match' = L mtch_loc (Match { m_ext = noExt+                                         , m_ctxt = LambdaExpr, m_pats = pats'                                          , m_grhss = grhss' })               arg_tys = map hsLPatType pats'-              cmd' = HsCmdLam (MG { mg_alts = L l [match'], mg_arg_tys = arg_tys-                                  , mg_res_ty = res_ty, mg_origin = origin })+              cmd' = HsCmdLam x (MG { mg_alts = L l [match']+                                    , mg_ext = MatchGroupTc arg_tys res_ty+                                    , mg_origin = origin })         ; return (mkHsCmdWrap (mkWpCastN co) cmd') }   where     n_pats     = length pats     match_ctxt = (LambdaExpr :: HsMatchContext Name)    -- Maybe KappaExpr?     pg_ctxt    = PatGuard match_ctxt -    tc_grhss (GRHSs grhss (L l binds)) stk_ty res_ty+    tc_grhss (GRHSs x grhss (L l binds)) stk_ty res_ty         = do { (binds', grhss') <- tcLocalBinds binds $                                    mapM (wrapLocM (tc_grhs stk_ty res_ty)) grhss-             ; return (GRHSs grhss' (L l binds')) }+             ; return (GRHSs x grhss' (L l binds')) }+    tc_grhss (XGRHSs _) _ _ = panic "tc_grhss" -    tc_grhs stk_ty res_ty (GRHS guards body)+    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 guards' rhs') }+             ; return (GRHS x guards' rhs') }+    tc_grhs _ _ (XGRHS _) = panic "tc_grhs"  ------------------------------------------- --              Do notation -tc_cmd env (HsCmdDo (L l stmts) _) (cmd_stk, res_ty)+tc_cmd env (HsCmdDo _ (L l stmts) ) (cmd_stk, res_ty)   = do  { co <- unifyType Nothing unitTy cmd_stk  -- Expecting empty argument stack         ; stmts' <- tcStmts ArrowExpr (tcArrDoStmt env) stmts res_ty-        ; return (mkHsCmdWrap (mkWpCastN co) (HsCmdDo (L l stmts') res_ty)) }+        ; return (mkHsCmdWrap (mkWpCastN co) (HsCmdDo res_ty (L l stmts') )) }   -----------------------------------------------------------------@@ -297,7 +303,7 @@ --      ---------------------------------------------- --      D; G |-a  (| e c1 ... cn |)  :  stk --> t -tc_cmd env cmd@(HsCmdArrForm expr f fixity cmd_args) (cmd_stk, res_ty)+tc_cmd env cmd@(HsCmdArrForm x expr f fixity cmd_args) (cmd_stk, res_ty)   = addErrCtxt (cmdCtxt cmd)    $     do  { (cmd_args', cmd_tys) <- mapAndUnzipM tc_cmd_arg cmd_args                               -- We use alphaTyVar for 'w'@@ -305,7 +311,7 @@                      mkFunTys cmd_tys $                      mkCmdArrTy env (mkPairTy alphaTy cmd_stk) res_ty         ; expr' <- tcPolyExpr expr e_ty-        ; return (HsCmdArrForm expr' f fixity cmd_args') }+        ; return (HsCmdArrForm x expr' f fixity cmd_args') }    where     tc_cmd_arg :: LHsCmdTop GhcRn -> TcM (LHsCmdTop GhcTcId, TcType)@@ -317,6 +323,8 @@             ; cmd' <- tcCmdTop env' cmd (stk_ty, res_ty)             ; return (cmd',  mkCmdArrTy env' (mkPairTy alphaTy stk_ty) res_ty) } +tc_cmd _ (XCmd {}) _ = panic "tc_cmd"+ ----------------------------------------------------------------- --              Base case for illegal commands -- This is where expressions that aren't commands get rejected@@ -349,17 +357,17 @@ --      (b) no rebindable syntax  tcArrDoStmt :: CmdEnv -> TcCmdStmtChecker-tcArrDoStmt env _ (LastStmt rhs noret _) res_ty thing_inside+tcArrDoStmt env _ (LastStmt x rhs noret _) res_ty thing_inside   = do  { rhs' <- tcCmd env rhs (unitTy, res_ty)         ; thing <- thing_inside (panic "tcArrDoStmt")-        ; return (LastStmt rhs' noret noSyntaxExpr, thing) }+        ; return (LastStmt x rhs' noret noSyntaxExpr, thing) } -tcArrDoStmt env _ (BodyStmt rhs _ _ _) res_ty thing_inside+tcArrDoStmt env _ (BodyStmt _ rhs _ _) res_ty thing_inside   = do  { (rhs', elt_ty) <- tc_arr_rhs env rhs         ; thing          <- thing_inside res_ty-        ; return (BodyStmt rhs' noSyntaxExpr noSyntaxExpr elt_ty, thing) }+        ; return (BodyStmt elt_ty rhs' noSyntaxExpr noSyntaxExpr, thing) } -tcArrDoStmt env ctxt (BindStmt pat rhs _ _ _) res_ty thing_inside+tcArrDoStmt env ctxt (BindStmt _ pat rhs _ _) res_ty thing_inside   = do  { (rhs', pat_ty) <- tc_arr_rhs env rhs         ; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat (mkCheckExpType pat_ty) $                             thing_inside res_ty@@ -391,10 +399,11 @@          ; return (emptyRecStmtId { recS_stmts = stmts'                                  , recS_later_ids = later_ids-                                 , recS_later_rets = later_rets                                  , recS_rec_ids = rec_ids-                                 , recS_rec_rets = rec_rets-                                 , recS_ret_ty = res_ty }, thing)+                                 , recS_ext = unitRecStmtTc+                                     { recS_later_rets = later_rets+                                     , recS_rec_rets = rec_rets+                                     , recS_ret_ty = res_ty} }, thing)         }}  tcArrDoStmt _ _ stmt _ _
typecheck/TcBinds.hs view
@@ -9,9 +9,9 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -module TcBinds ( tcLocalBinds, tcTopBinds, tcRecSelBinds,+module TcBinds ( tcLocalBinds, tcTopBinds, tcValBinds,                  tcHsBootSigs, tcPolyCheck,-                 tcVectDecls, addTypecheckedBinds,+                 addTypecheckedBinds,                  chooseInferredQuantifiers,                  badBootDeclErr ) where @@ -19,10 +19,9 @@  import {-# SOURCE #-} TcMatches ( tcGRHSsPat, tcMatchesFun ) import {-# SOURCE #-} TcExpr  ( tcMonoExpr )-import {-# SOURCE #-} TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl-                               , tcPatSynBuilderBind )+import {-# SOURCE #-} TcPatSyn ( tcPatSynDecl, tcPatSynBuilderBind ) import CoreSyn (Tickish (..))-import CostCentre (mkUserCC)+import CostCentre (mkUserCC, CCFlavour(DeclCC)) import DynFlags import FastString import HsSyn@@ -40,7 +39,7 @@ import FamInst( tcGetFamInstEnvs ) import TyCon import TcType-import Type( mkStrLitTy, tidyOpenType, splitTyConApp_maybe)+import Type( mkStrLitTy, tidyOpenType, splitTyConApp_maybe, mkCastTy) import TysPrim import TysWiredIn( mkBoxedTupleTy ) import Id@@ -53,7 +52,6 @@ import NameEnv import SrcLoc import Bag-import ListSetOps import ErrUtils import Digraph import Maybes@@ -62,14 +60,12 @@ import Outputable import PrelNames( ipClassName ) import TcValidity (checkValidType)-import Unique (getUnique) import UniqFM import UniqSet import qualified GHC.LanguageExtensions as LangExt import ConLike  import Control.Monad-import Data.List.NonEmpty ( NonEmpty(..) )  #include "HsVersions.h" @@ -140,7 +136,7 @@                                in                                \ys:[a] -> ...f'... -Notice the the stupid construction of (f a d), which is of course+Notice the stupid construction of (f a d), which is of course identical to the function we're executing.  In this case, the polymorphic recursion isn't being used (but that's a very common case). This can lead to a massive space leak, from the following top-level defn@@ -236,7 +232,7 @@ tcCompleteSigs sigs =   let       doOne :: Sig GhcRn -> TcM (Maybe CompleteMatch)-      doOne c@(CompleteMatchSig _ lns mtc)+      doOne c@(CompleteMatchSig _ _ lns mtc)         = fmap Just $ do            addErrCtxt (text "In" <+> ppr c) $             case mtc of@@ -307,15 +303,6 @@                                <+> quotes (ppr tc'))   in  mapMaybeM (addLocM doOne) sigs -tcRecSelBinds :: HsValBinds GhcRn -> TcM TcGblEnv-tcRecSelBinds (ValBindsOut binds sigs)-  = tcExtendGlobalValEnv [sel_id | L _ (IdSig sel_id) <- sigs] $-    do { (rec_sel_binds, tcg_env) <- discardWarnings $-                                     tcValBinds TopLevel binds sigs getGblEnv-       ; let tcg_env' = tcg_env `addTypecheckedBinds` map snd rec_sel_binds-       ; return tcg_env' }-tcRecSelBinds (ValBindsIn {}) = panic "tcRecSelBinds"- tcHsBootSigs :: [(RecFlag, LHsBinds GhcRn)] -> [LSig GhcRn] -> TcM [Id] -- A hs-boot file has only one BindGroup, and it only has type -- signatures in it.  The renamer checked all this@@ -323,7 +310,7 @@   = do  { checkTc (null binds) badBootDeclErr         ; concat <$> mapM (addLocM tc_boot_sig) (filter isTypeLSig sigs) }   where-    tc_boot_sig (TypeSig lnames hs_ty) = mapM f lnames+    tc_boot_sig (TypeSig _ lnames hs_ty) = mapM f lnames       where         f (L _ name)           = do { sigma_ty <- tcHsSigWcType (FunSigCtxt name False) hs_ty@@ -338,16 +325,16 @@ tcLocalBinds :: HsLocalBinds GhcRn -> TcM thing              -> TcM (HsLocalBinds GhcTcId, thing) -tcLocalBinds EmptyLocalBinds thing_inside+tcLocalBinds (EmptyLocalBinds x) thing_inside   = do  { thing <- thing_inside-        ; return (EmptyLocalBinds, thing) }+        ; return (EmptyLocalBinds x, thing) } -tcLocalBinds (HsValBinds (ValBindsOut binds sigs)) thing_inside+tcLocalBinds (HsValBinds x (XValBindsLR (NValBinds binds sigs))) thing_inside   = do  { (binds', thing) <- tcValBinds NotTopLevel binds sigs thing_inside-        ; return (HsValBinds (ValBindsOut binds' sigs), thing) }-tcLocalBinds (HsValBinds (ValBindsIn {})) _ = panic "tcLocalBinds"+        ; return (HsValBinds x (XValBindsLR (NValBinds binds' sigs)), thing) }+tcLocalBinds (HsValBinds _ (ValBinds {})) _ = panic "tcLocalBinds" -tcLocalBinds (HsIPBinds (IPBinds ip_binds _)) thing_inside+tcLocalBinds (HsIPBinds x (IPBinds _ ip_binds)) thing_inside   = do  { ipClass <- tcLookupClass ipClassName         ; (given_ips, ip_binds') <-             mapAndUnzipM (wrapLocSndM (tc_ip_bind ipClass)) ip_binds@@ -358,27 +345,31 @@         ; (ev_binds, result) <- checkConstraints (IPSkol ips)                                   [] given_ips thing_inside -        ; return (HsIPBinds (IPBinds ip_binds' ev_binds), result) }+        ; return (HsIPBinds x (IPBinds ev_binds ip_binds') , result) }   where-    ips = [ip | L _ (IPBind (Left (L _ ip)) _) <- ip_binds]+    ips = [ip | L _ (IPBind _ (Left (L _ ip)) _) <- ip_binds]          -- I wonder if we should do these one at at time         -- Consider     ?x = 4         --              ?y = ?x + 1-    tc_ip_bind ipClass (IPBind (Left (L _ ip)) expr)+    tc_ip_bind ipClass (IPBind _ (Left (L _ ip)) expr)        = do { ty <- newOpenFlexiTyVarTy             ; let p = mkStrLitTy $ hsIPNameFS ip             ; ip_id <- newDict ipClass [ p, ty ]             ; expr' <- tcMonoExpr expr (mkCheckExpType ty)             ; let d = toDict ipClass p ty `fmap` expr'-            ; return (ip_id, (IPBind (Right ip_id) d)) }-    tc_ip_bind _ (IPBind (Right {}) _) = panic "tc_ip_bind"+            ; return (ip_id, (IPBind noExt (Right ip_id) d)) }+    tc_ip_bind _ (IPBind _ (Right {}) _) = panic "tc_ip_bind"+    tc_ip_bind _ (XIPBind _) = panic "tc_ip_bind"      -- 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"+ {- Note [Implicit parameter untouchables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We add the type variables in the types of the implicit parameters@@ -532,18 +523,12 @@           -> LHsBind GhcRn -> IsGroupClosed -> TcM thing           -> TcM (LHsBinds GhcTcId, thing) tc_single _top_lvl sig_fn _prag_fn-          (L _ (PatSynBind psb@PSB{ psb_id = L _ name }))+          (L _ (PatSynBind _ psb@PSB{ psb_id = L _ name }))           _ thing_inside-  = do { (aux_binds, tcg_env) <- tc_pat_syn_decl+  = do { (aux_binds, tcg_env) <- tcPatSynDecl psb (sig_fn name)        ; thing <- setGblEnv tcg_env thing_inside        ; return (aux_binds, thing)        }-  where-    tc_pat_syn_decl :: TcM (LHsBinds GhcTcId, TcGblEnv)-    tc_pat_syn_decl = case sig_fn name of-        Nothing                 -> tcInferPatSynDecl psb-        Just (TcPatSynSig tpsi) -> tcCheckPatSynDecl psb tpsi-        Just                 _  -> panic "tc_single"  tc_single top_lvl sig_fn prag_fn lbind closed thing_inside   = do { (binds1, ids) <- tcPolyBinds sig_fn prag_fn@@ -567,6 +552,10 @@     -- is still deterministic even if the edges are in nondeterministic order     -- as explained in Note [Deterministic SCC] in Digraph.   where+    bind_fvs (FunBind { fun_ext = fvs }) = fvs+    bind_fvs (PatBind { pat_ext = fvs }) = fvs+    bind_fvs _                           = emptyNameSet+     no_sig :: Name -> Bool     no_sig n = not (hasCompleteSig sig_fn n) @@ -641,7 +630,13 @@       = mkLocalId name forall_a_a  forall_a_a :: TcType-forall_a_a = mkSpecForAllTys [runtimeRep1TyVar, openAlphaTyVar] openAlphaTy+-- At one point I had (forall r (a :: TYPE r). a), but of course+-- that type is ill-formed: its mentions 'r' which escapes r's scope.+-- 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+forall_a_a = mkSpecForAllTys [alphaTyVar] alphaTy  {- ********************************************************************* *                                                                      *@@ -705,7 +700,7 @@        ; (ev_binds, (co_fn, matches'))             <- checkConstraints skol_info skol_tvs ev_vars $                tcExtendBinderStack [TcIdBndr mono_id NotTopLevel]  $-               tcExtendTyVarEnv2 tv_prs $+               tcExtendNameTyVarEnv tv_prs $                setSrcSpan loc           $                tcMatchesFun (L nm_loc mono_name) matches (mkCheckExpType tau) @@ -714,19 +709,22 @@        ; poly_id    <- addInlinePrags poly_id prag_sigs         ; mod <- getModule+       ; tick <- funBindTicks nm_loc mono_id mod prag_sigs        ; let bind' = FunBind { fun_id      = L nm_loc mono_id                              , fun_matches = matches'                              , fun_co_fn   = co_fn-                             , bind_fvs    = placeHolderNamesTc-                             , fun_tick    = funBindTicks nm_loc mono_id mod prag_sigs }+                             , fun_ext     = placeHolderNamesTc+                             , fun_tick    = tick } -             export = ABE { abe_wrap = idHsWrapper+             export = ABE { abe_ext = noExt+                          , abe_wrap = idHsWrapper                           , abe_poly  = poly_id                           , abe_mono  = mono_id                           , abe_prags = SpecPrags spec_prags }               abs_bind = L loc $-                        AbsBinds { abs_tvs      = skol_tvs+                        AbsBinds { abs_ext = noExt+                                 , abs_tvs      = skol_tvs                                  , abs_ev_vars  = ev_vars                                  , abs_ev_binds = [ev_binds]                                  , abs_exports  = [export]@@ -739,9 +737,9 @@   = pprPanic "tcPolyCheck" (ppr sig $$ ppr bind)  funBindTicks :: SrcSpan -> TcId -> Module -> [LSig GhcRn]-             -> [Tickish TcId]+             -> TcM [Tickish TcId] funBindTicks loc fun_id mod sigs-  | (mb_cc_str : _) <- [ cc_name | L _ (SCCFunSig _ _ cc_name) <- sigs ]+  | (mb_cc_str : _) <- [ cc_name | L _ (SCCFunSig _ _ _ cc_name) <- sigs ]       -- this can only be a singleton list, as duplicate pragmas are rejected       -- by the renamer   , let cc_str@@ -750,10 +748,12 @@           | otherwise           = getOccFS (Var.varName fun_id)         cc_name = moduleNameFS (moduleName mod) `appendFS` consFS '.' cc_str-        cc = mkUserCC cc_name mod loc (getUnique fun_id)-  = [ProfNote cc True True]+  = do+      flavour <- DeclCC <$> getCCIndexM cc_name+      let cc = mkUserCC cc_name mod loc flavour+      return [ProfNote cc True True]   | otherwise-  = []+  = return []  {- Note [Instantiate sig with fresh variables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -805,7 +805,8 @@        ; loc <- getSrcSpanM        ; let poly_ids = map abe_poly exports              abs_bind = L loc $-                        AbsBinds { abs_tvs = qtvs+                        AbsBinds { abs_ext = noExt+                                 , abs_tvs = qtvs                                  , abs_ev_vars = givens, abs_ev_binds = [ev_binds]                                  , abs_exports = exports, abs_binds = binds'                                  , abs_sig = False }@@ -865,7 +866,8 @@         ; when warn_missing_sigs $               localSigWarn Opt_WarnMissingLocalSignatures poly_id mb_sig -        ; return (ABE { abe_wrap = wrap+        ; return (ABE { abe_ext = noExt+                      , abe_wrap = wrap                         -- abe_wrap :: idType poly_id ~ (forall qtvs. theta => mono_ty)                       , abe_poly  = poly_id                       , abe_mono  = mono_id@@ -985,14 +987,14 @@       | otherwise -- Can't happen; by now we know it's a partial sig       = pprPanic "report_sig_tv_err" (ppr sig) -    choose_psig_context :: VarSet -> TcThetaType -> Maybe TcTyVar+    choose_psig_context :: VarSet -> TcThetaType -> Maybe TcType                         -> TcM (VarSet, TcThetaType)     choose_psig_context _ annotated_theta Nothing       = do { let free_tvs = closeOverKinds (tyCoVarsOfTypes annotated_theta                                             `unionVarSet` tau_tvs)            ; return (free_tvs, annotated_theta) } -    choose_psig_context psig_qtvs annotated_theta (Just wc_var)+    choose_psig_context psig_qtvs annotated_theta (Just wc_var_ty)       = do { let free_tvs = closeOverKinds (growThetaTyVars inferred_theta seed_tvs)                             -- growThetaVars just like the no-type-sig case                             -- Omitting this caused #12844@@ -1010,8 +1012,14 @@                                  | pred <- my_theta                                  , all (not . (`eqType` pred)) annotated_theta ]            ; ctuple <- mk_ctuple inferred_diff-           ; writeMetaTyVar wc_var ctuple +           ; 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+               -- 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)+            ; traceTc "completeTheta" $                 vcat [ ppr sig                      , ppr annotated_theta, ppr inferred_theta@@ -1195,83 +1203,7 @@ where F is a non-injective type function. -} -{- *********************************************************************-*                                                                      *-                         Vectorisation-*                                                                      *-********************************************************************* -} -tcVectDecls :: [LVectDecl GhcRn] -> TcM ([LVectDecl GhcTcId])-tcVectDecls decls-  = do { decls' <- mapM (wrapLocM tcVect) decls-       ; let ids  = [lvectDeclName decl | decl <- decls', not $ lvectInstDecl decl]-             dups = findDupsEq (==) ids-       ; mapM_ reportVectDups dups-       ; traceTcConstraints "End of tcVectDecls"-       ; return decls'-       }-  where-    reportVectDups (first :| (_second:_more))-      = addErrAt (getSrcSpan first) $-          text "Duplicate vectorisation declarations for" <+> ppr first-    reportVectDups _ = return ()-----------------tcVect :: VectDecl GhcRn -> TcM (VectDecl GhcTcId)--- FIXME: We can't typecheck the expression of a vectorisation declaration against the vectorised---   type of the original definition as this requires internals of the vectoriser not available---   during type checking.  Instead, constrain the rhs of a vectorisation declaration to be a single---   identifier (this is checked in 'rnHsVectDecl').  Fix this by enabling the use of 'vectType'---   from the vectoriser here.-tcVect (HsVect s name rhs)-  = addErrCtxt (vectCtxt name) $-    do { var <- wrapLocM tcLookupId name-       ; let L rhs_loc (HsVar (L lv rhs_var_name)) = rhs-       ; rhs_id <- tcLookupId rhs_var_name-       ; return $ HsVect s var (L rhs_loc (HsVar (L lv rhs_id)))-       }--tcVect (HsNoVect s name)-  = addErrCtxt (vectCtxt name) $-    do { var <- wrapLocM tcLookupId name-       ; return $ HsNoVect s var-       }-tcVect (HsVectTypeIn _ isScalar lname rhs_name)-  = addErrCtxt (vectCtxt lname) $-    do { tycon <- tcLookupLocatedTyCon lname-       ; checkTc (   not isScalar             -- either    we have a non-SCALAR declaration-                 || isJust rhs_name           -- or        we explicitly provide a vectorised type-                 || tyConArity tycon == 0     -- otherwise the type constructor must be nullary-                 )-                 scalarTyConMustBeNullary--       ; rhs_tycon <- fmapMaybeM (tcLookupTyCon . unLoc) rhs_name-       ; return $ HsVectTypeOut isScalar tycon rhs_tycon-       }-tcVect (HsVectTypeOut _ _ _)-  = panic "TcBinds.tcVect: Unexpected 'HsVectTypeOut'"-tcVect (HsVectClassIn _ lname)-  = addErrCtxt (vectCtxt lname) $-    do { cls <- tcLookupLocatedClass lname-       ; return $ HsVectClassOut cls-       }-tcVect (HsVectClassOut _)-  = panic "TcBinds.tcVect: Unexpected 'HsVectClassOut'"-tcVect (HsVectInstIn linstTy)-  = addErrCtxt (vectCtxt linstTy) $-    do { (cls, tys) <- tcHsVectInst linstTy-       ; inst       <- tcLookupInstance cls tys-       ; return $ HsVectInstOut inst-       }-tcVect (HsVectInstOut _)-  = panic "TcBinds.tcVect: Unexpected 'HsVectInstOut'"--vectCtxt :: Outputable thing => thing -> SDoc-vectCtxt thing = text "When checking the vectorisation declaration for" <+> ppr thing--scalarTyConMustBeNullary :: MsgDoc-scalarTyConMustBeNullary = text "VECTORISE SCALAR type constructor must be nullary"- {- Note [SPECIALISE pragmas] ~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1316,7 +1248,7 @@             -> TcM (LHsBinds GhcTcId, [MonoBindInfo]) tcMonoBinds is_rec sig_fn no_gen            [ L b_loc (FunBind { fun_id = L nm_loc name,-                                fun_matches = matches, bind_fvs = fvs })]+                                fun_matches = matches, fun_ext = fvs })]                              -- Single function binding,   | NonRecursive <- is_rec   -- ...binder isn't mentioned in RHS   , Nothing <- sig_fn name   -- ...with no type signature@@ -1341,7 +1273,7 @@         ; mono_id <- newLetBndr no_gen name rhs_ty         ; return (unitBag $ L b_loc $                      FunBind { fun_id = L nm_loc mono_id,-                               fun_matches = matches', bind_fvs = fvs,+                               fun_matches = matches', fun_ext = fvs,                                fun_co_fn = co_fn, fun_tick = [] },                   [MBI { mbi_poly_name = name                        , mbi_sig       = Nothing@@ -1489,7 +1421,7 @@         ; return ( FunBind { fun_id = L loc mono_id                            , fun_matches = matches'                            , fun_co_fn = co_fn-                           , bind_fvs = placeHolderNamesTc+                           , fun_ext = placeHolderNamesTc                            , fun_tick = [] } ) }  tcRhs (TcPatBind infos pat' grhss pat_ty)@@ -1502,8 +1434,7 @@         ; grhss' <- addErrCtxt (patMonoBindsCtxt pat' grhss) $                     tcGRHSsPat grhss pat_ty         ; return ( PatBind { pat_lhs = pat', pat_rhs = grhss'-                           , pat_rhs_ty = pat_ty-                           , bind_fvs = placeHolderNamesTc+                           , pat_ext = NPatBindTc placeHolderNamesTc pat_ty                            , pat_ticks = ([],[]) } )}  tcExtendTyVarEnvForRhs :: Maybe TcIdSigInst -> TcM a -> TcM a@@ -1515,8 +1446,9 @@ tcExtendTyVarEnvFromSig :: TcIdSigInst -> TcM a -> TcM a tcExtendTyVarEnvFromSig sig_inst thing_inside   | TISI { sig_inst_skols = skol_prs, sig_inst_wcs = wcs } <- sig_inst-  = tcExtendTyVarEnv2 wcs $-    tcExtendTyVarEnv2 skol_prs $+     -- Note [Use tcExtendTyVar not scopeTyVars in tcRhs]+  = tcExtendNameTyVarEnv wcs $+    tcExtendNameTyVarEnv skol_prs $     thing_inside  tcExtendIdBinderStackForRhs :: [MonoBindInfo] -> TcM a -> TcM a@@ -1654,6 +1586,30 @@ The beta is untoucable, but floats out of the constraint and can be solved absolutely fine. +Note [Use tcExtendTyVar not scopeTyVars in tcRhs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Normally, any place that corresponds to Λ or ∀ in Core should be flagged+with a call to scopeTyVars, which arranges for an implication constraint+to be made, bumps the TcLevel, and (crucially) prevents a unification+variable created outside the scope of a local skolem to unify with that+skolem.++We do not need to do this here, however.++- Note that this happens only in the case of a partial signature.+  Complete signatures go via tcPolyCheck, not tcPolyInfer.++- The TcLevel is incremented in tcPolyInfer, right outside the call+  to tcMonoBinds. We thus don't have to worry about outer metatvs unifying+  with local skolems.++- The other potential concern is that we need SkolemInfo associated with+  the skolems. This, too, is OK, though: the constraints pass through+  simplifyInfer (which doesn't report errors), at the end of which+  the skolems will get quantified and put into an implication constraint.+  Thus, by the time any errors are reported, the SkolemInfo will be+  in place.+ ************************************************************************ *                                                                      *                 Generalisation@@ -1742,16 +1698,18 @@     fv_env :: NameEnv NameSet     fv_env = mkNameEnv $ concatMap (bindFvs . unLoc) binds -    bindFvs :: HsBindLR GhcRn idR -> [(Name, NameSet)]-    bindFvs (FunBind { fun_id = L _ f, bind_fvs = fvs })-       = let open_fvs = filterNameSet (not . is_closed) fvs+    bindFvs :: HsBindLR GhcRn GhcRn -> [(Name, NameSet)]+    bindFvs (FunBind { fun_id = L _ f, fun_ext = fvs })+       = let open_fvs = get_open_fvs fvs          in [(f, open_fvs)]-    bindFvs (PatBind { pat_lhs = pat, bind_fvs = fvs })-       = let open_fvs = filterNameSet (not . is_closed) fvs+    bindFvs (PatBind { pat_lhs = pat, pat_ext = fvs })+       = let open_fvs = get_open_fvs fvs          in [(b, open_fvs) | b <- collectPatBinders pat]     bindFvs _        = [] +    get_open_fvs fvs = filterNameSet (not . is_closed) fvs+     is_closed :: Name -> ClosedTypeId     is_closed name       | Just thing <- lookupNameEnv type_env name@@ -1790,7 +1748,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 :: (SourceTextX p, OutputableBndrId p, Outputable body)-                 => LPat p -> GRHSs GhcRn body -> SDoc+patMonoBindsCtxt :: (OutputableBndrId (GhcPass 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
@@ -19,14 +19,18 @@ import TcFlatten import TcSMonad import TcEvidence+import TcEvTerm import Class import TyCon import TyCoRep   -- cleverly decomposes types, good for completeness checking import Coercion+import CoreSyn+import Id( idType, mkTemplateLocals ) import FamInstEnv ( FamInstEnvs ) import FamInst ( tcTopNormaliseNewTypeTF_maybe ) import Var import VarEnv( mkInScopeSet )+import VarSet( delVarSetList ) import Outputable import DynFlags( DynFlags ) import NameSet@@ -80,15 +84,31 @@ canonicalize :: Ct -> TcS (StopOrContinue Ct) canonicalize (CNonCanonical { cc_ev = ev })   = {-# SCC "canNC" #-}-    case classifyPredType (ctEvPred ev) of+    case classifyPredType pred of       ClassPred cls tys     -> do traceTcS "canEvNC:cls" (ppr cls <+> ppr tys)                                   canClassNC ev cls tys       EqPred eq_rel ty1 ty2 -> do traceTcS "canEvNC:eq" (ppr ty1 $$ ppr ty2)                                   canEqNC    ev eq_rel ty1 ty2-      IrredPred {}          -> do traceTcS "canEvNC:irred" (ppr (ctEvPred ev))+      IrredPred {}          -> do traceTcS "canEvNC:irred" (ppr pred)                                   canIrred ev+      ForAllPred _ _ pred   -> do traceTcS "canEvNC:forall" (ppr pred)+                                  canForAll ev (isClassPred pred)+  where+    pred = ctEvPred ev +canonicalize (CQuantCan (QCI { qci_ev = ev, qci_pend_sc = pend_sc }))+  = canForAll ev pend_sc+ 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+    -- 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+    canEqNC ev eq_rel ty1 ty2++  | otherwise   = canIrred ev  canonicalize (CDictCan { cc_ev = ev, cc_class  = cls@@ -129,7 +149,7 @@ -- Precondition: EvVar is class evidence canClassNC ev cls tys   | isGiven ev  -- See Note [Eagerly expand given superclasses]-  = do { sc_cts <- mkStrictSuperClasses ev cls tys+  = do { sc_cts <- mkStrictSuperClasses ev [] [] cls tys        ; emitWork sc_cts        ; canClass ev cls tys False } @@ -152,7 +172,7 @@           -- Then we solve the wanted by pushing the call-site          -- onto the newly emitted CallStack-       ; let ev_cs = EvCsPushCall func (ctLocSpan loc) (ctEvTerm new_ev)+       ; let ev_cs = EvCsPushCall func (ctLocSpan loc) (ctEvExpr new_ev)        ; solveCallStack ev ev_cs         ; canClass new_ev cls tys False }@@ -171,8 +191,9 @@   -- We're given ev_cs :: CallStack, but the evidence term should be a   -- dictionary, so we have to coerce ev_cs to a dictionary for   -- `IP ip CallStack`. See Note [Overview of implicit CallStacks]-  let ev_tm = mkEvCast (EvCallStack ev_cs) (wrapIP (ctEvPred ev))-  setWantedEvBind (ctEvEvId ev) ev_tm+  cs_tm <- evCallStack ev_cs+  let ev_tm = mkEvCast cs_tm (wrapIP (ctEvPred ev))+  setEvBindIfWanted ev ev_tm  canClass :: CtEvidence          -> Class -> [Type]@@ -183,8 +204,9 @@ canClass ev cls tys pend_sc   =   -- all classes do *nominal* matching     ASSERT2( ctEvRole ev == Nominal, ppr ev $$ ppr cls $$ ppr tys )-    do { (xis, cos) <- flattenManyNom ev tys-       ; let co = mkTcTyConAppCo Nominal (classTyCon cls) cos+    do { (xis, cos, _kind_co) <- flattenArgsNom ev cls_tc tys+       ; MASSERT( isTcReflCo _kind_co )+       ; let co = mkTcTyConAppCo Nominal cls_tc cos              xi = mkClassPred cls xis              mk_ct new_ev = CDictCan { cc_ev = new_ev                                      , cc_tyargs = xis@@ -194,12 +216,14 @@        ; traceTcS "canClass" (vcat [ ppr ev                                    , ppr xi, ppr mb ])        ; return (fmap mk_ct mb) }+  where+    cls_tc = classTyCon cls  {- Note [The superclass story] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We need to add superclass constraints for two reasons: -* For givens [G], they give us a route to to proof.  E.g.+* For givens [G], they give us a route to proof.  E.g.     f :: Ord a => a -> Bool     f x = x == x   We get a Wanted (Eq a), which can only be solved from the superclass@@ -239,19 +263,19 @@  1. Eagerly generate superclasses for given (but not wanted)    constraints; see Note [Eagerly expand given superclasses].-   This is done in canClassNC, when we take a non-canonical constraint-   and cannonicalise it.+   This is done using mkStrictSuperClasses in canClassNC, when+   we take a non-canonical Given constraint and cannonicalise it.     However stop if you encounter the same class twice.  That is,-   expand eagerly, but have a conservative termination condition: see-   Note [Expanding superclasses] in TcType.+   mkStrictSuperClasses expands eagerly, but has a conservative+   termination condition: see Note [Expanding superclasses] in TcType.  2. Solve the wanteds as usual, but do no further expansion of    superclasses for canonical CDictCans in solveSimpleGivens or    solveSimpleWanteds; Note [Danger of adding superclasses during solving] -   However, /do/ continue to eagerly expand superlasses for /given/-   non-canonical constraints (canClassNC does this).  As Trac #12175+   However, /do/ continue to eagerly expand superlasses for new /given/+   /non-canonical/ constraints (canClassNC does this).  As Trac #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].@@ -259,10 +283,21 @@ 3. If we have any remaining unsolved wanteds         (see Note [When superclasses help] in TcRnTypes)    try harder: take both the Givens and Wanteds, and expand-   superclasses again.  This may succeed in generating (a finite-   number of) extra Givens, and extra Deriveds. Both may help the-   proof.  This is done in TcSimplify.expandSuperClasses.+   superclasses again.  See the calls to expandSuperClasses in+   TcSimplify.simpl_loop and solveWanteds. +   This may succeed in generating (a finite number of) extra Givens,+   and extra Deriveds. Both may help the proof.++3a An important wrinkle: only expand Givens from the current level.+   Two reasons:+      - We only want to expand it once, and that is best done at+        the level it is bound, rather than repeatedly at the leaves+        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.+ 4. Go round to (2) again.  This loop (2,3,4) is implemented    in TcSimplify.simpl_loop. @@ -283,10 +318,31 @@ When we take a CNonCanonical or CIrredCan, but end up classifying it as a CDictCan, we set the cc_pend_sc flag to False. +Note [Superclass loops]+~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have+  class C a => D a+  class D a => C a++Then, when we expand superclasses, we'll get back to the self-same+predicate, so we have reached a fixpoint in expansion and there is no+point in fruitlessly expanding further.  This case just falls out from+our strategy.  Consider+  f :: C a => a -> Bool+  f x = x==x+Then canClassNC gets the [G] d1: C a constraint, and eager emits superclasses+G] d2: D a, [G] d3: C a (psc).  (The "psc" means it has its sc_pend flag set.)+When processing d3 we find a match with d1 in the inert set, and we always+keep the inert item (d1) if possible: see Note [Replacement vs keeping] in+TcInteract.  So d3 dies a quick, happy death.+ Note [Eagerly expand given superclasses] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In step (1) of Note [The superclass story], why do we eagerly expand-Given superclasses by one layer?  Mainly because of some very obscure+Given superclasses by one layer?  (By "one layer" we mean expand transitively+until you meet the same class again -- the conservative criterion embodied+in expandSuperClasses.  So a "layer" might be a whole stack of superclasses.)+We do this eagerly for Givens mainly because of some very obscure cases like this:     instance Bad a => Eq (T a)@@ -331,7 +387,7 @@     Follow the superclass rules to add          [G] F a ~ b          [D] F a ~ beta-    Now we we get [D] beta ~ b, and can solve that.+    Now we get [D] beta ~ b, and can solve that.      -- Example (tcfail138)       class L a b | a -> b@@ -396,67 +452,52 @@ makeSuperClasses cts = concatMapM go cts   where     go (CDictCan { cc_ev = ev, cc_class = cls, cc_tyargs = tys })-          = mkStrictSuperClasses ev cls tys+      = mkStrictSuperClasses ev [] [] cls tys+    go (CQuantCan (QCI { qci_pred = pred, qci_ev = ev }))+      = ASSERT2( isClassPred pred, ppr pred )  -- The cts should all have+                                               -- class pred heads+        mkStrictSuperClasses ev tvs theta cls tys+      where+        (tvs, theta, cls, tys) = tcSplitDFunTy (ctEvPred ev)     go ct = pprPanic "makeSuperClasses" (ppr ct) -mkStrictSuperClasses :: CtEvidence -> Class -> [Type] -> TcS [Ct]--- Return constraints for the strict superclasses of (c tys)-mkStrictSuperClasses ev cls tys-  = mk_strict_superclasses (unitNameSet (className cls)) ev cls tys--mk_superclasses :: NameSet -> CtEvidence -> TcS [Ct]--- Return this constraint, plus its superclasses, if any-mk_superclasses rec_clss ev-  | ClassPred cls tys <- classifyPredType (ctEvPred ev)-  = mk_superclasses_of rec_clss ev cls tys--  | otherwise   -- Superclass is not a class predicate-  = return [mkNonCanonical ev]--mk_superclasses_of :: NameSet -> CtEvidence -> Class -> [Type] -> TcS [Ct]--- Always return this class constraint,--- and expand its superclasses-mk_superclasses_of rec_clss ev cls tys-  | loop_found = do { traceTcS "mk_superclasses_of: loop" (ppr cls <+> ppr tys)-                    ; return [this_ct] }  -- cc_pend_sc of this_ct = True-  | otherwise  = do { traceTcS "mk_superclasses_of" (vcat [ ppr cls <+> ppr tys-                                                          , ppr (isCTupleClass cls)-                                                          , ppr rec_clss-                                                          ])-                    ; sc_cts <- mk_strict_superclasses rec_clss' ev cls tys-                    ; return (this_ct : sc_cts) }-                                   -- cc_pend_sc of this_ct = False-  where-    cls_nm     = className cls-    loop_found = not (isCTupleClass cls) && cls_nm `elemNameSet` rec_clss-                 -- Tuples never contribute to recursion, and can be nested-    rec_clss'  = rec_clss `extendNameSet` cls_nm-    this_ct    = CDictCan { cc_ev = ev, cc_class = cls, cc_tyargs = tys-                          , cc_pend_sc = loop_found }-                 -- NB: If there is a loop, we cut off, so we have not-                 --     added the superclasses, hence cc_pend_sc = True+mkStrictSuperClasses+    :: CtEvidence+    -> [TyVar] -> ThetaType  -- These two args are non-empty only when taking+                             -- superclasses of a /quantified/ constraint+    -> Class -> [Type] -> TcS [Ct]+-- Return constraints for the strict superclasses of+--   ev :: forall as. theta => cls tys+mkStrictSuperClasses ev tvs theta cls tys+  = mk_strict_superclasses (unitNameSet (className cls))+                           ev tvs theta cls tys -mk_strict_superclasses :: NameSet -> CtEvidence -> Class -> [Type] -> TcS [Ct]+mk_strict_superclasses :: NameSet -> CtEvidence+                       -> [TyVar] -> ThetaType+                       -> Class -> [Type] -> TcS [Ct] -- Always return the immediate superclasses of (cls tys); -- and expand their superclasses, provided none of them are in rec_clss -- nor are repeated-mk_strict_superclasses rec_clss ev cls tys+mk_strict_superclasses rec_clss ev tvs theta cls tys   | CtGiven { ctev_evar = evar, ctev_loc = loc } <- ev-  = do { sc_evs <- newGivenEvVars (mk_given_loc loc)-                                  (mkEvScSelectors (EvId evar) cls tys)-       ; concatMapM (mk_superclasses rec_clss) sc_evs }+  = concatMapM (do_one_given evar (mk_given_loc loc)) $+    classSCSelIds cls+  where+    dict_ids  = mkTemplateLocals theta+    size      = sizeTypes tys -  | all noFreeVarsOfType tys-  = return [] -- Wanteds with no variables yield no deriveds.-              -- See Note [Improvement from Ground Wanteds]+    do_one_given evar given_loc sel_id+      = do { let sc_pred = funResultTy (piResultTys (idType sel_id) tys)+                 given_ty = mkInfSigmaTy tvs theta sc_pred+           ; given_ev <- newGivenEvVar given_loc $+                         (given_ty, mk_sc_sel evar sel_id)+           ; mk_superclasses rec_clss given_ev tvs theta sc_pred } -  | otherwise -- Wanted/Derived case, just add Derived superclasses-              -- that can lead to improvement.-  = do { let loc = ctEvLoc ev-       ; sc_evs <- mapM (newDerivedNC loc) (immSuperClasses cls tys)-       ; concatMapM (mk_superclasses rec_clss) sc_evs }-  where-    size = sizeTypes tys+    mk_sc_sel evar sel_id+      = EvExpr $ mkLams tvs $ mkLams dict_ids $+        Var sel_id `mkTyApps` tys `App`+        (evId evar `mkTyApps` mkTyVarTys tvs `mkVarApps` dict_ids)+     mk_given_loc loc        | isCTupleClass cls        = loc   -- For tuple predicates, just take them apart, without@@ -475,7 +516,64 @@        | otherwise  -- Probably doesn't happen, since this function        = loc        -- is only used for Givens, but does no harm +mk_strict_superclasses rec_clss ev tvs theta cls tys+  | all noFreeVarsOfType tys+  = return [] -- Wanteds with no variables yield no deriveds.+              -- See Note [Improvement from Ground Wanteds] +  | otherwise -- Wanted/Derived case, just add Derived superclasses+              -- that can lead to improvement.+  = ASSERT2( null tvs && null theta, ppr tvs $$ ppr theta )+    concatMapM do_one_derived (immSuperClasses cls tys)+  where+    loc = ctEvLoc ev++    do_one_derived sc_pred+      = do { sc_ev <- newDerivedNC loc sc_pred+           ; mk_superclasses rec_clss sc_ev [] [] sc_pred }++mk_superclasses :: NameSet -> CtEvidence+                -> [TyVar] -> ThetaType -> PredType -> TcS [Ct]+-- Return this constraint, plus its superclasses, if any+mk_superclasses rec_clss ev tvs theta pred+  | ClassPred cls tys <- classifyPredType pred+  = mk_superclasses_of rec_clss ev tvs theta cls tys++  | otherwise   -- Superclass is not a class predicate+  = return [mkNonCanonical ev]++mk_superclasses_of :: NameSet -> CtEvidence+                   -> [TyVar] -> ThetaType -> Class -> [Type]+                   -> TcS [Ct]+-- Always return this class constraint,+-- and expand its superclasses+mk_superclasses_of rec_clss ev tvs theta cls tys+  | loop_found = do { traceTcS "mk_superclasses_of: loop" (ppr cls <+> ppr tys)+                    ; return [this_ct] }  -- cc_pend_sc of this_ct = True+  | otherwise  = do { traceTcS "mk_superclasses_of" (vcat [ ppr cls <+> ppr tys+                                                          , ppr (isCTupleClass cls)+                                                          , ppr rec_clss+                                                          ])+                    ; sc_cts <- mk_strict_superclasses rec_clss' ev tvs theta cls tys+                    ; return (this_ct : sc_cts) }+                                   -- cc_pend_sc of this_ct = False+  where+    cls_nm     = className cls+    loop_found = not (isCTupleClass cls) && cls_nm `elemNameSet` rec_clss+                 -- Tuples never contribute to recursion, and can be nested+    rec_clss'  = rec_clss `extendNameSet` cls_nm++    this_ct | null tvs, null theta+            = CDictCan { cc_ev = ev, cc_class = cls, cc_tyargs = tys+                       , cc_pend_sc = loop_found }+                 -- NB: If there is a loop, we cut off, so we have not+                 --     added the superclasses, hence cc_pend_sc = True+            | otherwise+            = CQuantCan (QCI { qci_tvs = tvs, qci_pred = mkClassPred cls tys+                             , qci_ev = ev+                             , qci_pend_sc = loop_found })++ {- ************************************************************************ *                                                                      *@@ -487,16 +585,8 @@ canIrred :: CtEvidence -> TcS (StopOrContinue Ct) -- Precondition: ty not a tuple and no other evidence form canIrred ev-  | EqPred eq_rel ty1 ty2 <- classifyPredType pred-  = -- For insolubles (all of which are equalities, do /not/ flatten the arguments-    -- In Trac #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-    canEqNC ev eq_rel ty1 ty2--  | otherwise-  = do { traceTcS "can_pred" (text "IrredPred = " <+> ppr pred)+  = do { let pred = ctEvPred ev+       ; traceTcS "can_pred" (text "IrredPred = " <+> ppr pred)        ; (xi,co) <- flatten FM_FlattenAll ev pred -- co :: xi ~ pred        ; rewriteEvidence ev xi co `andWhenContinue` \ new_ev ->     do { -- Re-classify, in case flattening has improved its shape@@ -505,19 +595,172 @@            EqPred eq_rel ty1 ty2 -> canEqNC new_ev eq_rel ty1 ty2            _                     -> continueWith $                                     mkIrredCt new_ev } }-  where-    pred = ctEvPred ev  canHole :: CtEvidence -> Hole -> TcS (StopOrContinue Ct) canHole ev hole-  = do { let ty = ctEvPred ev-       ; (xi,co) <- flatten FM_SubstOnly ev ty -- co :: xi ~ ty+  = do { let pred = ctEvPred ev+       ; (xi,co) <- flatten FM_SubstOnly ev pred -- co :: xi ~ pred        ; rewriteEvidence ev xi co `andWhenContinue` \ new_ev ->     do { updInertIrreds (`snocCts` (CHoleCan { cc_ev = new_ev                                              , cc_hole = hole }))        ; stopWith new_ev "Emit insoluble hole" } } -{-++{- *********************************************************************+*                                                                      *+*                      Quantified predicates+*                                                                      *+********************************************************************* -}++{- Note [Quantified constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The -XQuantifiedConstraints extension allows type-class contexts like this:++  data Rose f x = Rose x (f (Rose f x))++  instance (Eq a, forall b. Eq b => Eq (f b))+        => Eq (Rose f a)  where+    (Rose x1 rs1) == (Rose x2 rs2) = x1==x2 && rs1 == rs2++Note the (forall b. Eq b => Eq (f b)) in the instance contexts.+This quantified constraint is needed to solve the+ [W] (Eq (f (Rose f x)))+constraint which arises form the (==) definition.++The wiki page is+  https://ghc.haskell.org/trac/ghc/wiki/QuantifiedConstraints+which in turn contains a link to the GHC Proposal where the change+is specified, and a Haskell Symposium paper about it.++We implement two main extensions to the design in the paper:++ 1. We allow a variable in the instance head, e.g.+      f :: forall m a. (forall b. m b) => D (m a)+    Notice the 'm' in the head of the quantified constraint, not+    a class.++ 2. We suport superclasses to quantified constraints.+    For example (contrived):+      f :: (Ord b, forall b. Ord b => Ord (m b)) => m a -> m a -> Bool+      f x y = x==y+    Here we need (Eq (m a)); but the quantifed constraint deals only+    with Ord.  But we can make it work by using its superclass.++Here are the moving parts+  * Language extension {-# LANGUAGE QuantifiedConstraints #-}+    and add it to ghc-boot-th:GHC.LanguageExtensions.Type.Extension++  * A new form of evidence, EvDFun, that is used to discharge+    such wanted constraints++  * checkValidType gets some changes to accept forall-constraints+    only in the right places.++  * Type.PredTree gets a new constructor ForAllPred, and+    and classifyPredType analyses a PredType to decompose+    the new forall-constraints++  * TcSMonad.InertCans gets an extra field, inert_insts,+    which holds all the Given forall-constraints.  In effect,+    such Given constraints are like local instance decls.++  * When trying to solve a class constraint, via+    TcInteract.matchInstEnv, use the InstEnv from inert_insts+    so that we include the local Given forall-constraints+    in the lookup.  (See TcSMonad.getInstEnvs.)++  * TcCanonical.canForAll deals with solving a+    forall-constraint.  See+       Note [Solving a Wanted forall-constraint]+       Note [Solving a Wanted forall-constraint]++  * We augment the kick-out code to kick out an inert+    forall constraint if it can be rewritten by a new+    type equality; see TcSMonad.kick_out_rewritable++Note that a quantified constraint is never /inferred/+(by TcSimplify.simplifyInfer).  A function can only have a+quantified constraint in its type if it is given an explicit+type signature.++Note that we implement+-}++canForAll :: CtEvidence -> Bool -> TcS (StopOrContinue Ct)+-- We have a constraint (forall as. blah => C tys)+canForAll ev pend_sc+  = do { -- First rewrite it to apply the current substitution+         -- Do not bother with type-family reductions; we can't+         -- do them under a forall anyway (c.f. Flatten.flatten_one+         -- on a forall type)+         let pred = ctEvPred ev+       ; (xi,co) <- flatten FM_SubstOnly ev pred -- co :: xi ~ pred+       ; rewriteEvidence ev xi co `andWhenContinue` \ new_ev ->++    do { -- Now decompose into its pieces and solve it+         -- (It takes a lot less code to flatten before decomposing.)+       ; case classifyPredType (ctEvPred new_ev) of+           ForAllPred tv_bndrs theta pred+              -> solveForAll new_ev tv_bndrs theta pred pend_sc+           _  -> pprPanic "canForAll" (ppr new_ev)+    } }++solveForAll :: CtEvidence -> [TyVarBinder] -> TcThetaType -> PredType -> Bool+            -> TcS (StopOrContinue Ct)+solveForAll ev tv_bndrs theta pred pend_sc+  | CtWanted { ctev_dest = dest } <- ev+  = -- See Note [Solving a Wanted forall-constraint]+    do { let skol_info = QuantCtxtSkol+             empty_subst = mkEmptyTCvSubst $ mkInScopeSet $+                           tyCoVarsOfTypes (pred:theta) `delVarSetList` tvs+       ; (subst, skol_tvs) <- tcInstSkolTyVarsX empty_subst tvs+       ; given_ev_vars <- mapM newEvVar (substTheta subst theta)++       ; (w_id, ev_binds)+             <- checkConstraintsTcS skol_info skol_tvs given_ev_vars $+                do { wanted_ev <- newWantedEvVarNC loc $+                                  substTy subst pred+                   ; return ( ctEvEvId wanted_ev+                            , unitBag (mkNonCanonical wanted_ev)) }++      ; setWantedEvTerm dest $+        EvFun { et_tvs = skol_tvs, et_given = given_ev_vars+              , et_binds = ev_binds, et_body = w_id }++      ; stopWith ev "Wanted forall-constraint" }++  | isGiven ev   -- See Note [Solving a Given forall-constraint]+  = do { addInertForAll qci+       ; stopWith ev "Given forall-constraint" }++  | otherwise+  = stopWith ev "Derived forall-constraint"+  where+    loc = ctEvLoc ev+    tvs = binderVars tv_bndrs+    qci = QCI { qci_ev = ev, qci_tvs = tvs+              , qci_pred = pred, qci_pend_sc = pend_sc }++{- Note [Solving a Wanted forall-constraint]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Solving a wanted forall (quantified) constraint+  [W] df :: forall ab. (Eq a, Ord b) => C x a b+is delightfully easy.   Just build an implication constraint+    forall ab. (g1::Eq a, g2::Ord b) => [W] d :: C x a+and discharge df thus:+    df = /\ab. \g1 g2. let <binds> in d+where <binds> is filled in by solving the implication constraint.+All the machinery is to hand; there is little to do.++Note [Solving a Given forall-constraint]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+For a Given constraint+  [G] df :: forall ab. (Eq a, Ord b) => C x a b+we just add it to TcS's local InstEnv of known instances,+via addInertForall.  Then, if we look up (C x Int Bool), say,+we'll find a match in the InstEnv.++ ************************************************************************ *                                                                      * *        Equalities@@ -602,28 +845,15 @@   = canEqReflexive ev ReprEq ty1  -- When working with ReprEq, unwrap newtypes.-can_eq_nc' _flat rdr_env envs ev ReprEq ty1 _ ty2 ps_ty2-  | Just stuff1 <- tcTopNormaliseNewTypeTF_maybe envs rdr_env ty1+-- See Note [Unwrap newtypes first]+can_eq_nc' _flat rdr_env envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2+  | ReprEq <- eq_rel+  , Just stuff1 <- tcTopNormaliseNewTypeTF_maybe envs rdr_env ty1   = can_eq_newtype_nc ev NotSwapped ty1 stuff1 ty2 ps_ty2-can_eq_nc' _flat rdr_env envs ev ReprEq ty1 ps_ty1 ty2 _-  | Just stuff2 <- tcTopNormaliseNewTypeTF_maybe envs rdr_env ty2-  = can_eq_newtype_nc ev IsSwapped  ty2 stuff2 ty1 ps_ty1 --- Now, check for tyvars. This must happen before CastTy because we need--- to catch casted tyvars, as the flattener might produce these,--- due to the fact that flattened types have flattened kinds.--- See Note [Flattening].--- Note that there can be only one cast on the tyvar because this will--- run after the "get rid of casts" case of can_eq_nc' function on the--- not-yet-flattened types.--- NB: pattern match on True: we want only flat types sent to canEqTyVar.--- See also Note [No top-level newtypes on RHS of representational equalities]-can_eq_nc' True _rdr_env _envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2-  | Just (tv1, co1) <- getCastedTyVar_maybe ty1-  = canEqTyVar ev eq_rel NotSwapped tv1 co1 ps_ty1 ty2 ps_ty2-can_eq_nc' True _rdr_env _envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2-  | Just (tv2, co2) <- getCastedTyVar_maybe ty2-  = canEqTyVar ev eq_rel IsSwapped tv2 co2 ps_ty2 ty1 ps_ty1+  | ReprEq <- eq_rel+  , Just stuff2 <- tcTopNormaliseNewTypeTF_maybe envs rdr_env ty2+  = can_eq_newtype_nc ev IsSwapped  ty2 stuff2 ty1 ps_ty1  -- Then, get rid of casts can_eq_nc' flat _rdr_env _envs ev eq_rel (CastTy ty1 co1) _ ty2 ps_ty2@@ -631,6 +861,13 @@ can_eq_nc' flat _rdr_env _envs ev eq_rel ty1 ps_ty1 (CastTy ty2 co2) _   = canEqCast flat ev eq_rel IsSwapped ty2 co2 ty1 ps_ty1 +-- NB: pattern match on True: we want only flat types sent to canEqTyVar.+-- See also Note [No top-level newtypes on RHS of representational equalities]+can_eq_nc' True _rdr_env _envs ev eq_rel (TyVarTy tv1) ps_ty1 ty2 ps_ty2+  = canEqTyVar ev eq_rel NotSwapped tv1 ps_ty1 ty2 ps_ty2+can_eq_nc' True _rdr_env _envs ev eq_rel ty1 ps_ty1 (TyVarTy tv2) ps_ty2+  = canEqTyVar ev eq_rel IsSwapped tv2 ps_ty2 ty1 ps_ty1+ ---------------------- -- Otherwise try to decompose ----------------------@@ -638,7 +875,7 @@ -- Literals can_eq_nc' _flat _rdr_env _envs ev eq_rel ty1@(LitTy l1) _ (LitTy l2) _  | l1 == l2-  = do { setEqIfWanted ev (mkReflCo (eqRelRole eq_rel) ty1)+  = do { setEvBindIfWanted ev (evCoercion $ mkReflCo (eqRelRole eq_rel) ty1)        ; stopWith ev "Equal LitTy" }  -- Try to decompose type constructor applications@@ -657,25 +894,39 @@  -- See Note [Canonicalising type applications] about why we require flat types can_eq_nc' True _rdr_env _envs ev eq_rel (AppTy t1 s1) _ ty2 _-  | Just (t2, s2) <- tcSplitAppTy_maybe ty2-  = can_eq_app ev eq_rel t1 s1 t2 s2+  | NomEq <- eq_rel+  , Just (t2, s2) <- tcSplitAppTy_maybe ty2+  = can_eq_app ev t1 s1 t2 s2 can_eq_nc' True _rdr_env _envs ev eq_rel ty1 _ (AppTy t2 s2) _-  | Just (t1, s1) <- tcSplitAppTy_maybe ty1-  = can_eq_app ev eq_rel t1 s1 t2 s2+  | NomEq <- eq_rel+  , Just (t1, s1) <- tcSplitAppTy_maybe ty1+  = can_eq_app ev t1 s1 t2 s2  -- No similarity in type structure detected. Flatten and try again. can_eq_nc' False rdr_env envs ev eq_rel _ ps_ty1 _ ps_ty2   = do { (xi1, co1) <- flatten FM_FlattenAll ev ps_ty1        ; (xi2, co2) <- flatten FM_FlattenAll ev ps_ty2-       ; rewriteEqEvidence ev NotSwapped xi1 xi2 co1 co2-         `andWhenContinue` \ new_ev ->-         can_eq_nc' True rdr_env envs new_ev eq_rel xi1 xi1 xi2 xi2 }+       ; new_ev <- rewriteEqEvidence ev NotSwapped xi1 xi2 co1 co2+       ; can_eq_nc' True rdr_env envs new_ev eq_rel xi1 xi1 xi2 xi2 }  -- We've flattened and the types don't match. Give up.-can_eq_nc' True _rdr_env _envs ev _eq_rel _ ps_ty1 _ ps_ty2+can_eq_nc' True _rdr_env _envs ev eq_rel _ ps_ty1 _ ps_ty2   = do { traceTcS "can_eq_nc' catch-all case" (ppr ps_ty1 $$ ppr ps_ty2)-       ; canEqHardFailure ev ps_ty1 ps_ty2 }+       ; case eq_rel of -- See Note [Unsolved equalities]+            ReprEq -> continueWith (mkIrredCt ev)+            NomEq  -> continueWith (mkInsolubleCt ev) }+          -- No need to call canEqFailure/canEqHardFailure because they+          -- flatten, and the types involved here are already flat +{- Note [Unsolved equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we have an unsolved equality like+  (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+-}+ --------------------------------- can_eq_nc_forall :: CtEvidence -> EqRel                  -> Type -> Type    -- LHS and RHS@@ -709,34 +960,30 @@             phi1' = substTy subst1 phi1              -- Unify the kinds, extend the substitution+            go :: [TcTyVar] -> TCvSubst -> [TyVarBinder]+               -> TcS (TcCoercion, Cts)             go (skol_tv:skol_tvs) subst (bndr2:bndrs2)               = do { let tv2 = binderVar bndr2-                   ; kind_co <- unifyWanted loc Nominal-                                            (tyVarKind skol_tv)-                                            (substTy subst (tyVarKind tv2))+                   ; (kind_co, wanteds1) <- unify loc Nominal (tyVarKind skol_tv)+                                                  (substTy subst (tyVarKind tv2))                    ; let subst' = extendTvSubst subst tv2                                        (mkCastTy (mkTyVarTy skol_tv) kind_co)-                   ; co <- go skol_tvs subst' bndrs2-                   ; return (mkForAllCo skol_tv kind_co co) }+                   ; (co, wanteds2) <- go skol_tvs subst' bndrs2+                   ; return ( mkTcForAllCo skol_tv kind_co co+                            , wanteds1 `unionBags` wanteds2 ) }              -- Done: unify phi1 ~ phi2             go [] subst bndrs2               = ASSERT( null bndrs2 )-                unifyWanted loc (eqRelRole eq_rel)-                            phi1' (substTy subst phi2)+                unify loc (eqRelRole eq_rel) phi1' (substTy subst phi2)              go _ _ _ = panic "cna_eq_nc_forall"  -- case (s:ss) []              empty_subst2 = mkEmptyTCvSubst (getTCvInScope subst1) -      ; (implic, _ev_binds, all_co) <- buildImplication skol_info skol_tvs [] $-                                       go skol_tvs empty_subst2 bndrs2-           -- We have nowhere to put these bindings-           -- but TcSimplify.setImplicationStatus-           -- checks that we don't actually use them-           -- when skol_info = UnifyForAllSkol+      ; all_co <- checkTvConstraintsTcS skol_info skol_tvs $+                  go skol_tvs empty_subst2 bndrs2 -      ; updWorkListTcS (extendWorkListImplic implic)       ; setWantedEq orig_dest all_co       ; stopWith ev "Deferred polytype equality" } } @@ -745,6 +992,17 @@         pprEq s1 s2    -- See Note [Do not decompose given polytype equalities]       ; stopWith ev "Discard given polytype equality" } + where+    unify :: CtLoc -> Role -> TcType -> TcType -> TcS (TcCoercion, Cts)+    -- This version returns the wanted constraint rather+    -- than putting it in the work list+    unify loc role ty1 ty2+      | ty1 `tcEqType` ty2+      = return (mkTcReflCo role ty1, emptyBag)+      | otherwise+      = do { (wanted, co) <- newWantedEq loc role ty1 ty2+           ; return (co, unitBag (mkNonCanonical wanted)) }+ --------------------------------- -- | Compare types for equality, while zonking as necessary. Gives up -- as soon as it finds that two types are not equal.@@ -882,7 +1140,26 @@     combine_rev f (Right tys) (Left elt) = Left (f <$> elt     <*> pure tys)     combine_rev f (Right tys) (Right ty) = Right (f ty tys) -{-+{- See Note [Unwrap newtypes first]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  newtype N m a = MkN (m a)+Then N will get a conservative, Nominal role for its second paramter 'a',+because it appears as an argument to the unknown 'm'. Now consider+  [W] N Maybe a  ~R#  N Maybe b++If we decompose, we'll get+  [W] a ~N# b++But if instead we unwrap we'll get+  [W] Maybe a ~R# Maybe b+which in turn gives us+  [W] a ~R# b+which is easier to satisfy.++Bottom line: unwrap newtypes before decomposing them!+c.f. Trac #9123 comment:52,53 for a compelling example.+ Note [Newtypes can blow the stack] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppose we have@@ -951,16 +1228,15 @@            -- we have actually used the newtype constructor here, so            -- make sure we don't warn about importing it! -       ; rewriteEqEvidence ev swapped ty1' ps_ty2-                           (mkTcSymCo co) (mkTcReflCo Representational ps_ty2)-         `andWhenContinue` \ new_ev ->-         can_eq_nc False new_ev ReprEq ty1' ty1' ty2 ps_ty2 }+       ; 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 }  --------- -- ^ Decompose a type application. -- All input types must be flat. See Note [Canonicalising type applications]-can_eq_app :: CtEvidence       -- :: s1 t1 ~r s2 t2-           -> EqRel            -- r+-- Nominal equality only!+can_eq_app :: CtEvidence       -- :: s1 t1 ~N s2 t2            -> Xi -> Xi         -- s1 t1            -> Xi -> Xi         -- s2 t2            -> TcS (StopOrContinue Ct)@@ -968,13 +1244,7 @@ -- AppTys only decompose for nominal equality, so this case just leads -- to an irreducible constraint; see typecheck/should_compile/T10494 -- See Note [Decomposing equality], note {4}-can_eq_app ev ReprEq _ _ _ _-  = do { traceTcS "failing to decompose representational AppTy equality" (ppr ev)-       ; continueWith (mkIrredCt ev) }-          -- no need to call canEqFailure, because that flattens, and the-          -- types involved here are already flat--can_eq_app ev NomEq s1 t1 s2 t2+can_eq_app ev s1 t1 s2 t2   | CtDerived { ctev_loc = loc } <- ev   = do { unifyDeriveds loc [Nominal, Nominal] [s1, t1] [s2, t2]        ; stopWith ev "Decomposed [D] AppTy" }@@ -987,19 +1257,34 @@        ; let co = mkAppCo co_s co_t        ; setWantedEq dest co        ; stopWith ev "Decomposed [W] AppTy" }++    -- If there is a ForAll/(->) mismatch, the use of the Left coercion+    -- below is ill-typed, potentially leading to a panic in splitTyConApp+    -- Test case: typecheck/should_run/Typeable1+    -- We could also include this mismatch check above (for W and D), but it's slow+    -- and we'll get a better error message not doing it+  | s1k `mismatches` s2k+  = canEqHardFailure ev (s1 `mkAppTy` t1) (s2 `mkAppTy` t2)+   | CtGiven { ctev_evar = evar, ctev_loc = loc } <- ev   = do { let co   = mkTcCoVarCo evar              co_s = mkTcLRCo CLeft  co              co_t = mkTcLRCo CRight co        ; evar_s <- newGivenEvVar loc ( mkTcEqPredLikeEv ev s1 s2-                                     , EvCoercion co_s )+                                     , evCoercion co_s )        ; evar_t <- newGivenEvVar loc ( mkTcEqPredLikeEv ev t1 t2-                                     , EvCoercion co_t )+                                     , evCoercion co_t )        ; emitWorkNC [evar_t]        ; canEqNC evar_s NomEq s1 s2 }-  | otherwise  -- Can't happen-  = error "can_eq_app" +  where+    s1k = typeKind s1+    s2k = typeKind s2++    k1 `mismatches` k2+      =  isForAllTy k1 && not (isForAllTy k2)+      || not (isForAllTy k1) && isForAllTy k2+ ----------------------- -- | Break apart an equality over a casted type -- looking like   (ty1 |> co1) ~ ty2   (modulo a swap-flag)@@ -1014,12 +1299,10 @@   = do { traceTcS "Decomposing cast" (vcat [ ppr ev                                            , ppr ty1 <+> text "|>" <+> ppr co1                                            , ppr ps_ty2 ])-       ; rewriteEqEvidence ev swapped ty1 ps_ty2-                           (mkTcReflCo role ty1-                              `mkTcCoherenceRightCo` co1)-                           (mkTcReflCo role ps_ty2)-         `andWhenContinue` \ new_ev ->-         can_eq_nc flat new_ev eq_rel ty1 ty1 ty2 ps_ty2 }+       ; new_ev <- rewriteEqEvidence ev swapped ty1 ps_ty2+                                     (mkTcReflCo role ty1 `mkTcCoherenceRightCo` co1)+                                     (mkTcReflCo role ps_ty2)+       ; can_eq_nc flat new_ev eq_rel ty1 ty1 ty2 ps_ty2 }   where     role = eqRelRole eq_rel @@ -1264,7 +1547,7 @@         -> do { let ev_co = mkCoVarCo evar               ; given_evs <- newGivenEvVars loc $                              [ ( mkPrimEqPredRole r ty1 ty2-                               , EvCoercion (mkNthCo i ev_co) )+                               , evCoercion $ mkNthCo r i ev_co )                              | (r, ty1, ty2, i) <- zip4 tc_roles tys1 tys2 [0..]                              , r /= Phantom                              , not (isCoercionTy ty1) && not (isCoercionTy ty2) ]@@ -1303,9 +1586,8 @@             -- new equalities become available        ; traceTcS "canEqFailure with ReprEq" $          vcat [ ppr ev, ppr ty1, ppr ty2, ppr xi1, ppr xi2 ]-       ; rewriteEqEvidence ev NotSwapped xi1 xi2 co1 co2-         `andWhenContinue` \ new_ev ->-         continueWith (mkIrredCt new_ev) }+       ; new_ev <- rewriteEqEvidence ev NotSwapped xi1 xi2 co1 co2+       ; continueWith (mkIrredCt new_ev) }  -- | Call when canonicalizing an equality fails with utterly no hope. canEqHardFailure :: CtEvidence@@ -1314,9 +1596,8 @@ canEqHardFailure ev ty1 ty2   = do { (s1, co1) <- flatten FM_SubstOnly ev ty1        ; (s2, co2) <- flatten FM_SubstOnly ev ty2-       ; rewriteEqEvidence ev NotSwapped s1 s2 co1 co2-         `andWhenContinue` \ new_ev ->-         continueWith (mkInsolubleCt new_ev) }+       ; new_ev <- rewriteEqEvidence ev NotSwapped s1 s2 co1 co2+       ; continueWith (mkInsolubleCt new_ev) }  {- Note [Decomposing TyConApps]@@ -1419,6 +1700,25 @@  See also #10715, which induced this addition. +Note [canCFunEqCan]+~~~~~~~~~~~~~~~~~~~+Flattening the arguments to a type family can change the kind of the type+family application. As an easy example, consider (Any k) where (k ~ Type)+is in the inert set. The original (Any k :: k) becomes (Any Type :: Type).+The problem here is that the fsk in the CFunEqCan will have the old kind.++The solution is to come up with a new fsk/fmv of the right kind. For+givens, this is easy: just introduce a new fsk and update the flat-cache+with the new one. For wanteds, we want to solve the old one if favor of+the new one, so we use dischargeFmv. This also kicks out constraints+from the inert set; this behavior is correct, as the kind-change may+allow more constraints to be solved.++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+though the coercion was homo-kinded, `kind_co` was not `Refl`, so we+made a new (identical) CFunEqCan, and then the entire process repeated. -}  canCFunEqCan :: CtEvidence@@ -1430,107 +1730,205 @@ -- and the RHS is a fsk, which we must *not* substitute. -- So just substitute in the LHS canCFunEqCan ev fn tys fsk-  = do { (tys', cos) <- flattenManyNom ev tys+  = do { (tys', cos, kind_co) <- flattenArgsNom ev fn tys                         -- cos :: tys' ~ tys        ; let lhs_co  = mkTcTyConAppCo Nominal fn cos                         -- :: F tys' ~ F tys              new_lhs = mkTyConApp fn tys'-             fsk_ty  = mkTyVarTy fsk-       ; rewriteEqEvidence ev NotSwapped new_lhs fsk_ty-                           lhs_co (mkTcNomReflCo fsk_ty)-         `andWhenContinue` \ ev' ->-    do { extendFlatCache fn tys' (ctEvCoercion ev', fsk_ty, ctEvFlavour ev')++             flav    = ctEvFlavour ev+       ; (ev', fsk')+           <- if isTcReflexiveCo kind_co   -- See Note [canCFunEqCan]+              then do { traceTcS "canCFunEqCan: refl" (ppr new_lhs $$ ppr lhs_co)+                      ; let fsk_ty = mkTyVarTy fsk+                      ; ev' <- rewriteEqEvidence ev NotSwapped new_lhs fsk_ty+                                                 lhs_co (mkTcNomReflCo fsk_ty)+                      ; return (ev', fsk) }+              else do { traceTcS "canCFunEqCan: non-refl" $+                        vcat [ text "Kind co:" <+> ppr kind_co+                             , text "RHS:" <+> ppr fsk <+> dcolon <+> ppr (tyVarKind fsk)+                             , text "LHS:" <+> hang (ppr (mkTyConApp fn tys))+                                                  2 (dcolon <+> ppr (typeKind (mkTyConApp fn tys)))+                             , text "New LHS" <+> hang (ppr new_lhs)+                                                     2 (dcolon <+> ppr (typeKind new_lhs)) ]+                      ; (ev', new_co, new_fsk)+                          <- newFlattenSkolem flav (ctEvLoc ev) fn tys'+                      ; let xi = mkTyVarTy new_fsk `mkCastTy` kind_co+                               -- sym lhs_co :: F tys ~ F tys'+                               -- new_co     :: F tys' ~ new_fsk+                               -- co         :: F tys ~ (new_fsk |> kind_co)+                            co = mkTcSymCo lhs_co `mkTcTransCo`+                                 (new_co `mkTcCoherenceRightCo` kind_co)++                      ; traceTcS "Discharging fmv/fsk due to hetero flattening" (ppr ev)+                      ; dischargeFunEq ev fsk co xi+                      ; return (ev', new_fsk) }++       ; extendFlatCache fn tys' (ctEvCoercion ev', mkTyVarTy fsk', ctEvFlavour ev')        ; continueWith (CFunEqCan { cc_ev = ev', cc_fun = fn-                                 , cc_tyargs = tys', cc_fsk = fsk }) } }+                                 , cc_tyargs = tys', cc_fsk = fsk' }) }  --------------------- canEqTyVar :: CtEvidence          -- ev :: lhs ~ rhs            -> EqRel -> SwapFlag-           -> TcTyVar -> CoercionN  -- tv1 |> co1+           -> TcTyVar               -- tv1            -> TcType                -- lhs: pretty lhs, already flat            -> TcType -> TcType      -- rhs: already flat            -> TcS (StopOrContinue Ct)-canEqTyVar ev eq_rel swapped tv1 co1 ps_ty1 xi2 ps_xi2-  | k1 `eqType` k2-  = canEqTyVarHomo ev eq_rel swapped tv1 co1 ps_ty1 xi2 ps_xi2+canEqTyVar ev eq_rel swapped tv1 ps_ty1 xi2 ps_xi2+  | k1 `tcEqType` k2+  = canEqTyVarHomo ev eq_rel swapped tv1 ps_ty1 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.+  | 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)+       ; traceTcS "canEqTyVar tried flattening kinds"+                  (vcat [ sep [ parens (ppr tv1 <+> dcolon <+> ppr k1)+                              , text "~"+                              , parens (ppr xi2 <+> dcolon <+> ppr k2) ]+                        , ppr flat_k1+                        , ppr k1_co+                        , ppr flat_k2+                        , ppr k2_co ])++         -- 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)+         -- and then emit a kind equality in canEqTyVarHetero.+         -- See Note [Equalities with incompatible kinds]++       ; let role = eqRelRole eq_rel+       ; if flat_k1 `tcEqType` flat_k2+         then do { let rhs_kind_co = mkTcSymCo k2_co `mkTcTransCo` k1_co+                         -- :: kind(xi2) ~N kind(xi1)++                       new_rhs     = xi2 `mkCastTy` rhs_kind_co+                       ps_rhs      = ps_xi2 `mkCastTy` rhs_kind_co+                       rhs_co      = mkTcReflCo role xi2 `mkTcCoherenceLeftCo` rhs_kind_co++                 ; new_ev <- rewriteEqEvidence ev swapped xi1 new_rhs+                                               (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 }+         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++             new_lhs = xi1 `mkCastTy` sym_k1_co  -- :: flat_k1+             new_rhs = xi2 `mkCastTy` sym_k2_co  -- :: flat_k2+             ps_rhs  = ps_xi2 `mkCastTy` sym_k2_co++             lhs_co = mkReflCo role xi1 `mkTcCoherenceLeftCo` sym_k1_co+             rhs_co = mkReflCo role xi2 `mkTcCoherenceLeftCo` sym_k2_co+               -- lhs_co :: (xi1 |> sym k1_co) ~ xi1+               -- rhs_co :: (xi2 |> sym k2_co) ~ xi2++       ; 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+                                        new_rhs flat_k2 ps_rhs } }+  where+    xi1 = mkTyVarTy tv1++    k1 = tyVarKind tv1+    k2 = typeKind xi2++    loc  = ctEvLoc ev+    flav = ctEvFlavour ev++canEqTyVarHetero :: CtEvidence   -- :: (tv1 |> co1 :: ki1) ~ (xi2 :: ki2)+                 -> EqRel+                 -> TcTyVar -> TcCoercionN -> TcKind  -- tv1 |> co1 :: ki1+                 -> TcType            -- pretty tv1 (*without* the coercion)+                 -> TcType -> TcKind  -- xi2 :: ki2+                 -> TcType            -- pretty xi2+                 -> TcS (StopOrContinue Ct)+canEqTyVarHetero ev eq_rel tv1 co1 ki1 ps_tv1 xi2 ki2 ps_xi2   -- See Note [Equalities with incompatible kinds]   | CtGiven { ctev_evar = evar } <- ev-    -- unswapped: tm :: (lhs :: k1) ~ (rhs :: k2)-    -- swapped  : tm :: (rhs :: k2) ~ (lhs :: k1)-  = do { kind_ev_id <- newBoundEvVarId kind_pty-                                       (EvCoercion $-                                        if isSwapped swapped-                                        then mkTcSymCo $ mkTcKindCo $ mkTcCoVarCo evar-                                        else             mkTcKindCo $ mkTcCoVarCo evar)-           -- kind_ev_id :: (k1 :: *) ~ (k2 :: *)   (whether swapped or not)-       ; let kind_ev = CtGiven { ctev_pred = kind_pty-                               , ctev_evar = kind_ev_id-                               , ctev_loc  = kind_loc }-             homo_co = mkSymCo $ mkCoVarCo kind_ev_id-             rhs'    = mkCastTy xi2 homo_co-             ps_rhs' = mkCastTy ps_xi2 homo_co+    -- unswapped: tm :: (lhs :: ki1) ~ (rhs :: ki2)+    -- swapped  : tm :: (rhs :: ki2) ~ (lhs :: ki1)+  = do { let kind_co = mkTcKindCo (mkTcCoVarCo evar)+       ; kind_ev <- newGivenEvVar kind_loc (kind_pty, evCoercion kind_co)+       ; let  -- kind_ev :: (ki1 :: *) ~ (ki2 :: *)   (whether swapped or not)+              -- co1     :: kind(tv1) ~N ki1+              -- homo_co :: ki2 ~N kind(tv1)+             homo_co = mkTcSymCo (ctEvCoercion kind_ev) `mkTcTransCo` mkTcSymCo co1+             rhs'    = mkCastTy xi2 homo_co     -- :: kind(tv1)+             ps_rhs' = mkCastTy ps_xi2 homo_co  -- :: kind(tv1)+             rhs_co  = mkReflCo role xi2 `mkTcCoherenceLeftCo` homo_co+               -- rhs_co :: (xi2 |> homo_co :: kind(tv1)) ~ xi2++             lhs'   = mkTyVarTy tv1       -- :: kind(tv1)+             lhs_co = mkReflCo role lhs' `mkTcCoherenceRightCo` co1+               -- lhs_co :: (tv1 :: kind(tv1)) ~ (tv1 |> co1 :: ki1)+        ; traceTcS "Hetero equality gives rise to given kind equality"-           (ppr kind_ev_id <+> dcolon <+> ppr kind_pty)+           (ppr kind_ev <+> dcolon <+> ppr kind_pty)        ; emitWorkNC [kind_ev]-       ; type_ev <- newGivenEvVar loc $-                    if isSwapped swapped-                    then ( mkTcEqPredLikeEv ev rhs' lhs-                         , EvCoercion $-                           mkTcCoherenceLeftCo (mkTcCoVarCo evar) homo_co )-                    else ( mkTcEqPredLikeEv ev lhs rhs'-                         , EvCoercion $-                           mkTcCoherenceRightCo (mkTcCoVarCo evar) homo_co )-          -- unswapped: type_ev :: (lhs :: k1) ~ ((rhs |> sym kind_ev_id) :: k1)-          -- swapped  : type_ev :: ((rhs |> sym kind_ev_id) :: k1) ~ (lhs :: k1)-       ; canEqTyVarHomo type_ev eq_rel swapped tv1 co1 ps_ty1 rhs' ps_rhs' }+       ; type_ev <- rewriteEqEvidence ev NotSwapped lhs' rhs' lhs_co rhs_co+       ; canEqTyVarHomo type_ev eq_rel NotSwapped tv1 ps_tv1 rhs' ps_rhs' }    -- See Note [Equalities with incompatible kinds]   | otherwise   -- Wanted and Derived                   -- NB: all kind equalities are Nominal-  = do { emitNewDerivedEq kind_loc Nominal k1 k2-             -- kind_ev :: (k1 :: *) ~ (k2 :: *)+  = do { emitNewDerivedEq kind_loc Nominal ki1 ki2+             -- kind_ev :: (ki1 :: *) ~ (ki2 :: *)        ; traceTcS "Hetero equality gives rise to derived kind equality" $            ppr ev        ; continueWith (mkIrredCt ev) }    where-    lhs = mkTyVarTy tv1 `mkCastTy` co1--    Pair _ k1 = coercionKind co1-    k2        = typeKind xi2--    kind_pty = mkHeteroPrimEqPred liftedTypeKind liftedTypeKind k1 k2-    kind_loc = mkKindLoc lhs xi2 loc+    kind_pty = mkHeteroPrimEqPred liftedTypeKind liftedTypeKind ki1 ki2+    kind_loc = mkKindLoc (mkTyVarTy tv1 `mkCastTy` co1) xi2 loc      loc  = ctev_loc ev+    role = eqRelRole eq_rel  -- guaranteed that typeKind lhs == typeKind rhs canEqTyVarHomo :: CtEvidence                -> EqRel -> SwapFlag-               -> TcTyVar -> CoercionN   -- lhs: tv1 |> co1+               -> TcTyVar                -- lhs: tv1                -> TcType                 -- pretty lhs                -> TcType -> TcType       -- rhs (might not be flat)                -> TcS (StopOrContinue Ct)-canEqTyVarHomo ev eq_rel swapped tv1 co1 ps_ty1 ty2 _+canEqTyVarHomo ev eq_rel swapped tv1 ps_ty1 ty2 _   | Just (tv2, _) <- tcGetCastedTyVar_maybe ty2   , tv1 == tv2-  = canEqReflexive ev eq_rel (mkTyVarTy tv1 `mkCastTy` co1)-    -- we don't need to check co2 because its type must match co1+  = canEqReflexive ev eq_rel (mkTyVarTy tv1)+    -- we don't need to check co because it must be reflexive    | Just (tv2, co2) <- tcGetCastedTyVar_maybe ty2   , swapOverTyVars tv1 tv2-  = do { traceTcS "canEqTyVar" (ppr tv1 $$ ppr tv2 $$ ppr swapped)+  = do { traceTcS "canEqTyVar swapOver" (ppr tv1 $$ ppr tv2 $$ ppr swapped)          -- FM_Avoid commented out: see Note [Lazy flattening] in TcFlatten          -- let fmode = FE { fe_ev = ev, fe_mode = FM_Avoid tv1' True }          -- Flatten the RHS less vigorously, to avoid gratuitous flattening          -- True <=> xi2 should not itself be a type-function application++       ; let role    = eqRelRole eq_rel+             sym_co2 = mkTcSymCo co2+             ty1     = mkTyVarTy tv1+             new_lhs = ty1 `mkCastTy` sym_co2+             lhs_co  = mkReflCo role ty1 `mkTcCoherenceLeftCo` sym_co2++             new_rhs = mkTyVarTy tv2+             rhs_co  = mkReflCo role new_rhs `mkTcCoherenceRightCo` co2++       ; new_ev <- rewriteEqEvidence ev swapped new_lhs new_rhs lhs_co rhs_co+        ; dflags <- getDynFlags-       ; canEqTyVar2 dflags ev eq_rel (flipSwap swapped) tv2 co2 ps_ty1 }+       ; canEqTyVar2 dflags new_ev eq_rel IsSwapped tv2 (ps_ty1 `mkCastTy` sym_co2) } -canEqTyVarHomo ev eq_rel swapped tv1 co1 _ _ ps_ty2+canEqTyVarHomo ev eq_rel swapped tv1 _ _ ps_ty2   = do { dflags <- getDynFlags-       ; canEqTyVar2 dflags ev eq_rel swapped tv1 co1 ps_ty2 }+       ; canEqTyVar2 dflags ev eq_rel swapped tv1 ps_ty2 }  -- 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)@@ -1538,28 +1936,26 @@             -> CtEvidence   -- lhs ~ rhs (or, if swapped, orhs ~ olhs)             -> EqRel             -> SwapFlag-            -> TcTyVar -> CoercionN     -- lhs = tv |> co, flat+            -> TcTyVar                  -- lhs = tv, flat             -> TcType                   -- rhs             -> TcS (StopOrContinue Ct) -- LHS is an inert type variable, -- and RHS is fully rewritten, but with type synonyms -- preserved as much as possible-canEqTyVar2 dflags ev eq_rel swapped tv1 co1 orhs-  | Just nrhs' <- metaTyVarUpdateOK dflags tv1 nrhs  -- No occurs check+canEqTyVar2 dflags ev eq_rel swapped tv1 rhs+  | 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-  = rewriteEqEvidence ev swapped nlhs nrhs' rewrite_co1 rewrite_co2-    `andWhenContinue` \ new_ev ->-    continueWith (CTyEqCan { cc_ev = new_ev, cc_tyvar = tv1-                           , cc_rhs = nrhs', cc_eq_rel = eq_rel })+  = 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 }) }    | otherwise  -- For some reason (occurs check, or forall) we can't unify                -- We must not use it for further rewriting!-  = do { traceTcS "canEqTyVar2 can't unify" (ppr tv1 $$ ppr nrhs)-       ; rewriteEqEvidence ev swapped nlhs nrhs rewrite_co1 rewrite_co2-         `andWhenContinue` \ new_ev ->-         if isInsolubleOccursCheck eq_rel tv1 nrhs+  = do { traceTcS "canEqTyVar2 can't unify" (ppr tv1 $$ ppr rhs)+       ; new_ev <- rewriteEqEvidence ev swapped lhs rhs rewrite_co1 rewrite_co2+       ; if isInsolubleOccursCheck eq_rel tv1 rhs          then continueWith (mkInsolubleCt new_ev)              -- If we have a ~ [a], it is not canonical, and in particular              -- we don't want to rewrite existing inerts with it, otherwise@@ -1575,13 +1971,10 @@   where     role = eqRelRole eq_rel -    nlhs = mkTyVarTy tv1-    nrhs = orhs `mkCastTy` mkTcSymCo co1+    lhs = mkTyVarTy tv1 -    -- rewrite_co1 :: tv1 ~ (tv1 |> co1)-    -- rewrite_co2 :: (rhs |> sym co1) ~ rhs-    rewrite_co1  = mkTcReflCo role nlhs `mkTcCoherenceRightCo` co1-    rewrite_co2  = mkTcReflCo role orhs `mkTcCoherenceLeftCo`  mkTcSymCo co1+    rewrite_co1  = mkTcReflCo role lhs+    rewrite_co2  = mkTcReflCo role rhs  -- | Solve a reflexive equality constraint canEqReflexive :: CtEvidence    -- ty ~ ty@@ -1589,7 +1982,7 @@                -> TcType        -- ty                -> TcS (StopOrContinue Ct)   -- always Stop canEqReflexive ev eq_rel ty-  = do { setEvBindIfWanted ev (EvCoercion $+  = do { setEvBindIfWanted ev (evCoercion $                                mkTcReflCo (eqRelRole eq_rel) ty)        ; stopWith ev "Solved by reflexivity" } @@ -1621,37 +2014,6 @@    substituted out  Note [Elminate flat-skols]         fsk ~ a -Note [Avoid unnecessary swaps]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If we swap without actually improving matters, we can get an infinite loop.-Consider-    work item:  a ~ b-   inert item:  b ~ c-We canonicalise the work-time to (a ~ c).  If we then swap it before-aeding to the inert set, we'll add (c ~ a), and therefore kick out the-inert guy, so we get-   new work item:  b ~ c-   inert item:     c ~ a-And now the cycle just repeats--Note [Eliminate flat-skols]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have  [G] Num (F [a])-then we flatten to-     [G] Num fsk-     [G] F [a] ~ fsk-where fsk is a flatten-skolem (FlatSkolTv). Suppose we have-      type instance F [a] = a-then we'll reduce the second constraint to-     [G] a ~ fsk-and then replace all uses of 'a' with fsk.  That's bad because-in error messages intead 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.--Solution: re-orient a~fsk to fsk~a, so that we preferentially eliminate-the fsk.- Note [Equalities with incompatible kinds] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What do we do when we have an equality@@ -1848,7 +2210,7 @@     -- rewriteEvidence to put the isTcReflCo test first!     -- Why?  Because for *Derived* constraints, c, the coercion, which     -- was produced by flattening, may contain suspended calls to-    -- (ctEvTerm c), which fails for Derived constraints.+    -- (ctEvExpr c), which fails for Derived constraints.     -- (Getting this wrong caused Trac #7384.)     continueWith (old_ev { ctev_pred = new_pred }) @@ -1861,7 +2223,7 @@        ; continueWith new_ev }   where     -- mkEvCast optimises ReflCo-    new_tm = mkEvCast (EvId old_evar) (tcDowngradeRole Representational+    new_tm = mkEvCast (evId old_evar) (tcDowngradeRole Representational                                                        (ctEvRole ev)                                                        (mkTcSymCo co)) @@ -1870,8 +2232,8 @@   = do { mb_new_ev <- newWanted loc new_pred        ; MASSERT( tcCoercionRole co == ctEvRole ev )        ; setWantedEvTerm dest-                   (mkEvCast (getEvTerm mb_new_ev)-                             (tcDowngradeRole Representational (ctEvRole ev) co))+            (mkEvCast (getEvExpr mb_new_ev)+                      (tcDowngradeRole Representational (ctEvRole ev) co))        ; case mb_new_ev of             Fresh  new_ev -> continueWith new_ev             Cached _      -> stopWith ev "Cached wanted" }@@ -1884,7 +2246,7 @@                                         -- Should be zonked, because we use typeKind on nlhs/nrhs                   -> TcCoercion         -- lhs_co, of type :: nlhs ~ olhs                   -> TcCoercion         -- rhs_co, of type :: nrhs ~ orhs-                  -> TcS (StopOrContinue CtEvidence)  -- Of type nlhs ~ nrhs+                  -> TcS CtEvidence     -- Of type nlhs ~ nrhs -- For (rewriteEqEvidence (Given g olhs orhs) False nlhs nrhs lhs_co rhs_co) -- we generate -- If not swapped@@ -1902,19 +2264,18 @@ -- It's all a form of rewwriteEvidence, specialised for equalities rewriteEqEvidence old_ev swapped nlhs nrhs lhs_co rhs_co   | CtDerived {} <- old_ev  -- Don't force the evidence for a Derived-  = continueWith (old_ev { ctev_pred = new_pred })+  = return (old_ev { ctev_pred = new_pred })    | NotSwapped <- swapped   , isTcReflCo lhs_co      -- See Note [Rewriting with Refl]   , isTcReflCo rhs_co-  = continueWith (old_ev { ctev_pred = new_pred })+  = return (old_ev { ctev_pred = new_pred })    | CtGiven { ctev_evar = old_evar } <- old_ev-  = do { let new_tm = EvCoercion (lhs_co+  = do { let new_tm = evCoercion (lhs_co                                   `mkTcTransCo` maybeSym swapped (mkTcCoVarCo old_evar)                                   `mkTcTransCo` mkTcSymCo rhs_co)-       ; new_ev <- newGivenEvVar loc' (new_pred, new_tm)-       ; continueWith new_ev }+       ; newGivenEvVar loc' (new_pred, new_tm) }    | CtWanted { ctev_dest = dest } <- old_ev   = do { (new_ev, hole_co) <- newWantedEq loc' (ctEvRole old_ev) nlhs nrhs@@ -1924,7 +2285,7 @@                   `mkTransCo` rhs_co        ; setWantedEq dest co        ; traceTcS "rewriteEqEvidence" (vcat [ppr old_ev, ppr nlhs, ppr nrhs, ppr co])-       ; continueWith new_ev }+       ; return new_ev }    | otherwise   = panic "rewriteEvidence"@@ -1944,7 +2305,7 @@ Similar remarks apply for Derived.  Rather than making an equality test (which traverses the structure of the-type, perhaps fruitlessly, unifyWanted traverses the common structure, and+type, perhaps fruitlessly), unifyWanted traverses the common structure, and bales out when it finds a difference by creating a new Wanted constraint. But where it succeeds in finding common structure, it just builds a coercion to reflect it.
typecheck/TcClassDcl.hs view
@@ -139,16 +139,20 @@        ; traceTc "tcClassSigs 2" (ppr clas)        ; return op_info }   where-    vanilla_sigs = [L loc (nm,ty) | L loc (ClassOpSig False nm ty) <- sigs]-    gen_sigs     = [L loc (nm,ty) | L loc (ClassOpSig True  nm ty) <- sigs]+    vanilla_sigs = [L loc (nm,ty) | L loc (ClassOpSig _ False nm ty) <- sigs]+    gen_sigs     = [L loc (nm,ty) | L loc (ClassOpSig _ True  nm ty) <- sigs]     dm_bind_names :: [Name] -- These ones have a value binding in the class decl     dm_bind_names = [op | L _ (FunBind {fun_id = L _ op}) <- bagToList def_methods] +    skol_info = TyConSkol ClassFlavour clas+     tc_sig :: NameEnv (SrcSpan, Type) -> ([Located Name], LHsSigType GhcRn)            -> TcM [TcMethInfo]     tc_sig gen_dm_env (op_names, op_hs_ty)       = do { traceTc "ClsSig 1" (ppr op_names)-           ; op_ty <- tcClassSigType op_names op_hs_ty   -- Class tyvars already in scope+           ; op_ty <- tcClassSigType skol_info op_names op_hs_ty+                   -- Class tyvars already in scope+            ; traceTc "ClsSig 2" (ppr op_names)            ; return [ (op_name, op_ty, f op_name) | L _ op_name <- op_names ] }            where@@ -157,7 +161,7 @@                   | otherwise                               = Nothing      tc_gen_sig (op_names, gen_hs_ty)-      = do { gen_op_ty <- tcClassSigType op_names gen_hs_ty+      = do { gen_op_ty <- tcClassSigType skol_info op_names gen_hs_ty            ; return [ (op_name, (loc, gen_op_ty)) | L loc op_name <- op_names ] }  {-@@ -194,6 +198,9 @@          ; let tc_item = tcDefMeth clas clas_tyvars this_dict                                   default_binds sig_fn prag_fn+                   -- tcExtendTyVarEnv here (instead of scopeTyVars) is OK:+                   -- the tcDefMeth calls checkConstraints to bump the TcLevel+                   -- and make the implication constraint         ; dm_binds <- tcExtendTyVarEnv clas_tyvars $                       mapM tc_item op_items @@ -276,15 +283,17 @@                                         , sig_loc   = getLoc (hsSigType hs_ty) }         ; (ev_binds, (tc_bind, _))-               <- checkConstraints (ClsSkol clas) tyvars [this_dict] $+               <- checkConstraints (TyConSkol ClassFlavour (getName clas)) tyvars [this_dict] $                   tcPolyCheck no_prag_fn local_dm_sig                               (L bind_loc lm_bind) -       ; let export = ABE { abe_poly   = global_dm_id+       ; let export = ABE { abe_ext   = noExt+                          , abe_poly  = global_dm_id                           , abe_mono  = local_dm_id                           , abe_wrap  = idHsWrapper                           , abe_prags = IsDefaultMethod }-             full_bind = AbsBinds { abs_tvs      = tyvars+             full_bind = AbsBinds { abs_ext      = noExt+                                  , abs_tvs      = tyvars                                   , abs_ev_vars  = [this_dict]                                   , abs_exports  = [export]                                   , abs_ev_binds = [ev_binds]@@ -351,8 +360,8 @@     env = mkHsSigEnv get_classop_sig sigs      get_classop_sig :: LSig GhcRn -> Maybe ([Located Name], LHsSigType GhcRn)-    get_classop_sig  (L _ (ClassOpSig _ ns hs_ty)) = Just (ns, hs_ty)-    get_classop_sig  _                             = Nothing+    get_classop_sig  (L _ (ClassOpSig _ _ ns hs_ty)) = Just (ns, hs_ty)+    get_classop_sig  _                               = Nothing  --------------------------- findMethodBind  :: Name                 -- Selector@@ -377,8 +386,8 @@ findMinimalDef = firstJusts . map toMinimalDef   where     toMinimalDef :: LSig GhcRn -> Maybe ClassMinimalDef-    toMinimalDef (L _ (MinimalSig _ (L _ bf))) = Just (fmap unLoc bf)-    toMinimalDef _                             = Nothing+    toMinimalDef (L _ (MinimalSig _ _ (L _ bf))) = Just (fmap unLoc bf)+    toMinimalDef _                               = Nothing  {- Note [Polymorphic methods]
typecheck/TcDefaults.hs view
@@ -42,10 +42,10 @@         -- one group, only for the next group to ignore them and install         -- defaultDefaultTys -tcDefaults [L _ (DefaultDecl [])]+tcDefaults [L _ (DefaultDecl _ [])]   = return (Just [])            -- Default declaration specifying no types -tcDefaults [L locn (DefaultDecl mono_tys)]+tcDefaults [L locn (DefaultDecl _ mono_tys)]   = setSrcSpan locn                     $     addErrCtxt defaultDeclCtxt          $     do  { ovl_str   <- xoptM LangExt.OverloadedStrings@@ -63,9 +63,10 @@          ; return (Just tau_tys) } -tcDefaults decls@(L locn (DefaultDecl _) : _)+tcDefaults decls@(L locn (DefaultDecl _ _) : _)   = setSrcSpan locn $     failWithTc (dupDefaultDeclErr decls)+tcDefaults (L _ (XDefaultDecl _):_) = panic "tcDefaults"   tc_default_ty :: [Class] -> LHsType GhcRn -> TcM Type@@ -93,11 +94,14 @@ defaultDeclCtxt = text "When checking the types in a default declaration"  dupDefaultDeclErr :: [Located (DefaultDecl GhcRn)] -> SDoc-dupDefaultDeclErr (L _ (DefaultDecl _) : dup_things)+dupDefaultDeclErr (L _ (DefaultDecl _ _) : dup_things)   = hang (text "Multiple default declarations")        2 (vcat (map pp dup_things))   where-    pp (L locn (DefaultDecl _)) = text "here was another default declaration" <+> ppr locn+    pp (L locn (DefaultDecl _ _))+      = text "here was another default declaration" <+> ppr locn+    pp (L _ (XDefaultDecl _)) = panic "dupDefaultDeclErr"+dupDefaultDeclErr (L _ (XDefaultDecl _) : _) = panic "dupDefaultDeclErr" dupDefaultDeclErr [] = panic "dupDefaultDeclErr []"  badDefaultTy :: Type -> [Class] -> SDoc
typecheck/TcDeriv.hs view
@@ -31,6 +31,7 @@ import Inst import FamInstEnv import TcHsType+import TyCoRep  import RnNames( extendGlobalRdrEnvRn ) import RnBinds@@ -40,7 +41,6 @@ import Avail  import Unify( tcUnifyTy )-import BasicTypes ( DerivStrategy(..) ) import Class import Type import ErrUtils@@ -337,7 +337,7 @@         -- 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 = ValBindsIn aux_binds (bagToList aux_sigs)+        ; 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 ;@@ -584,7 +584,8 @@  ------------------------------------------------------------------ -- | Process a single class in a `deriving` clause.-deriveClause :: TyCon -> Maybe DerivStrategy -> LHsSigType GhcRn -> SDoc+deriveClause :: TyCon -> Maybe (DerivStrategy GhcRn)+             -> LHsSigType GhcRn -> SDoc              -> TcM (Maybe EarlyDerivSpec) deriveClause rep_tc mb_strat pred err_ctxt   = addErrCtxt err_ctxt $@@ -607,31 +608,69 @@ -- -- This returns a Maybe because the user might try to derive Typeable, which is -- a no-op nowadays.-deriveStandalone (L loc (DerivDecl deriv_ty deriv_strat' overlap_mode))+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 deriv_strat = fmap unLoc deriv_strat'+       ; let mb_deriv_strat = fmap unLoc mbl_deriv_strat        ; traceTc "Deriving strategy (standalone deriving)" $-           vcat [ppr deriv_strat, ppr deriv_ty]-       ; (tvs, theta, cls, inst_tys) <- tcHsClsInstType TcType.InstDeclCtxt deriv_ty+           vcat [ppr mb_deriv_strat, ppr deriv_ty]+       ; (mb_deriv_strat', tvs', (deriv_ctxt', cls, inst_tys'))+           <- tcDerivStrategy TcType.InstDeclCtxt mb_deriv_strat $ do+                (tvs, deriv_ctxt, cls, inst_tys)+                  <- tcStandaloneDerivInstType 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     = typeKind via_ty+                   inst_ty_kind = typeKind 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 "theta:" <+> ppr theta+              , 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-       ; checkTc (not (null inst_tys)) derivingNullaryErr--       ; let cls_tys = take (length inst_tys - 1) inst_tys-             inst_ty = last inst_tys        ; 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 deriv_strat msg)+                              inst_ty mb_deriv_strat' msg)         ; case tcSplitTyConApp_maybe inst_ty of            Just (tc, tc_args)@@ -639,23 +678,68 @@               -> do warnUselessTypeable                     return Nothing -              | isUnboxedTupleTyCon tc-              -> bale_out $ unboxedTyConErr "tuple"--              | isUnboxedSumTyCon tc-              -> bale_out $ unboxedTyConErr "sum"--              | isAlgTyCon tc || isDataFamilyTyCon tc  -- All other classes-              -> do { spec <- mkEqnHelp (fmap unLoc overlap_mode)-                                        tvs cls cls_tys tc tc_args-                                        (Just theta) deriv_strat-                    ; return $ Just spec }+              | 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+  :: LHsSigWcType GhcRn+  -> TcM ([TyVar], DerivContext, Class, [Type])+tcStandaloneDerivInstType+    (HsWC { hswc_body = deriv_ty@(HsIB { hsib_ext = HsIBRn+                                                        { hsib_vars   = vars+                                                        , hsib_closed = closed }+                                       , hsib_body   = deriv_ty_body })})+  | (tvs, theta, rho) <- splitLHsSigmaTy deriv_ty_body+  , L _ [wc_pred] <- theta+  , L _ (HsWildCardTy (AnonWildCard (L wc_span _))) <- ignoreParens wc_pred+  = do (deriv_tvs, _deriv_theta, deriv_cls, deriv_inst_tys)+         <- tc_hs_cls_inst_ty $+            HsIB { hsib_ext = HsIBRn { hsib_vars = vars+                                     , hsib_closed = closed }+                 , hsib_body+                     = L (getLoc deriv_ty_body) $+                       HsForAllTy { hst_bndrs = tvs+                                  , hst_xforall = noExt+                                  , hst_body  = rho }}+       pure (deriv_tvs, InferContext (Just wc_span), deriv_cls, deriv_inst_tys)+  | otherwise+  = do (deriv_tvs, deriv_theta, deriv_cls, deriv_inst_tys)+         <- tc_hs_cls_inst_ty deriv_ty+       pure (deriv_tvs, SupplyContext deriv_theta, deriv_cls, deriv_inst_tys)+  where+    tc_hs_cls_inst_ty = tcHsClsInstType TcType.InstDeclCtxt+tcStandaloneDerivInstType (HsWC _ (XHsImplicitBndrs _))+  = panic "tcStandaloneDerivInstType"+tcStandaloneDerivInstType (XHsWildCardBndrs _)+  = panic "tcStandaloneDerivInstType"+ warnUselessTypeable :: TcM () warnUselessTypeable   = do { warn <- woptM Opt_WarnDerivingTypeable@@ -666,7 +750,7 @@ ------------------------------------------------------------------ deriveTyData :: [TyVar] -> TyCon -> [Type]   -- LHS of data or data instance                                              --   Can be a data instance, hence [Type] args-             -> Maybe DerivStrategy          -- The optional deriving strategy+             -> Maybe (DerivStrategy GhcRn)  -- The optional deriving strategy              -> LHsSigType GhcRn             -- The deriving predicate              -> TcM (Maybe EarlyDerivSpec) -- The deriving clause of a data or newtype declaration@@ -674,11 +758,14 @@ -- -- This returns a Maybe because the user might try to derive Typeable, which is -- a no-op nowadays.-deriveTyData tvs tc tc_args deriv_strat deriv_pred-  = setSrcSpan (getLoc (hsSigType deriv_pred)) $  -- Use loc of the 'deriving' item-    do  { (deriv_tvs, cls, cls_tys, cls_arg_kinds)+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))+                   -- Why not scopeTyVars? Because these are *TyVar*s, not TcTyVars.+                   -- Their kinds are fully settled. No need to worry about skolem+                   -- escape.                 <- tcExtendTyVarEnv tvs $-                   tcHsDeriv deriv_pred                 -- 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@@ -687,6 +774,9 @@                 -- 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 TcType.DerivClauseCtxt mb_deriv_strat $+                     tcHsDeriv deriv_pred+         ; when (cls_arg_kinds `lengthIsNot` 1) $             failWithTc (nonUnaryErr deriv_pred)         ; let [cls_arg_kind] = cls_arg_kinds@@ -714,25 +804,56 @@         ; checkTc (enough_args && isJust mb_match)                   (derivingKindErr tc cls cls_tys cls_arg_kind enough_args) -        ; let Just kind_subst = mb_match-              ki_subst_range  = getTCvSubstRangeFVs kind_subst-              all_tkvs        = toposortTyVars $-                                fvVarList $ unionFV-                                  (tyCoFVsOfTypes tc_args_to_keep)-                                  (FV.mkFVs deriv_tvs)-              -- See Note [Unification of two kind variables in deriving]-              unmapped_tkvs   = filter (\v -> v `notElemTCvSubst` kind_subst-                                      && not (v `elemVarSet` ki_subst_range))-                                       all_tkvs-              (subst, _)      = mapAccumL substTyVarBndr-                                          kind_subst unmapped_tkvs-              final_tc_args   = substTys subst tc_args_to_keep-              final_cls_tys   = substTys subst cls_tys-              tkvs            = tyCoVarsOfTypesWellScoped $-                                final_cls_tys ++ final_tc_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 = toposortTyVars $ 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 = typeKind final_via_ty+                    final_inst_ty_kind+                              = typeKind (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 deriv_strat, ppr deriv_pred]+            vcat [ppr final_mb_deriv_strat, ppr deriv_pred]          ; traceTc "derivTyData1" (vcat [ pprTyVars tvs, ppr tc, ppr tc_args                                        , ppr deriv_pred@@ -768,7 +889,7 @@          ; spec <- mkEqnHelp Nothing tkvs                             cls final_cls_tys tc final_tc_args-                            Nothing deriv_strat+                            (InferContext Nothing) final_mb_deriv_strat         ; traceTc "derivTyData" (ppr spec)         ; return $ Just spec } } @@ -845,11 +966,11 @@      instance (k ~ *) => Functor (T k) where -But this does not typecheck as the result of a -XTypeInType design decision:-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 *).+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:@@ -878,6 +999,20 @@ 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@@ -898,7 +1033,7 @@ We used to accomplish this by doing the following:      unmapped_tkvs = filter (`notElemTCvSubst` kind_subst) all_tkvs-    (subst, _)    = mapAccumL substTyVarBndr kind_subst unmapped_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,@@ -927,8 +1062,8 @@   data family Fam (f :: * -> *) (a :: *)   newtype instance Fam f (Const a f) = Fam (f a) deriving Functor -With -XTypeInType, it is also possible to define kind synonyms, and they can-mention other types in a datatype declaration. For example,+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@@ -946,16 +1081,18 @@           -> [TyVar]           -> Class -> [Type]           -> TyCon -> [Type]-          -> DerivContext       -- Just    => context supplied (standalone deriving)-                                -- Nothing => context inferred (deriving on data decl)-          -> Maybe DerivStrategy+          -> 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 mtheta deriv_strat+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@@ -977,10 +1114,10 @@                          , denv_tc_args      = tc_args                          , denv_rep_tc       = rep_tc                          , denv_rep_tc_args  = rep_tc_args-                         , denv_mtheta       = mtheta+                         , denv_ctxt         = deriv_ctxt                          , denv_strat        = deriv_strat }        ; flip runReaderT deriv_env $-         if isDataTyCon rep_tc then mkDataTypeEqn else mkNewTypeEqn }+         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)@@ -1051,25 +1188,31 @@ ************************************************************************ -} +-- | 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_data_eqn bale_out-         Just AnyclassStrategy -> mk_eqn_anyclass mk_data_eqn bale_out+         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_data_eqn bale_out+         Nothing -> mk_eqn_no_mechanism mk_originative_eqn bale_out -mk_data_eqn :: DerivSpecMechanism -- How GHC should proceed attempting to-                                  -- derive this instance, determined in-                                  -- mkDataTypeEqn/mkNewTypeEqn-            -> DerivM EarlyDerivSpec-mk_data_eqn mechanism+-- 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@@ -1077,14 +1220,14 @@                 , denv_rep_tc       = rep_tc                 , denv_cls          = cls                 , denv_cls_tys      = cls_tys-                , denv_mtheta       = mtheta } <- ask+                , 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 mtheta of-        Nothing -> -- Infer context+       case deriv_ctxt of+        InferContext wildcard ->           do { (inferred_constraints, tvs', inst_tys')                  <- inferConstraints mechanism              ; return $ InferTheta $ DS@@ -1094,9 +1237,10 @@                    , ds_tc = rep_tc                    , ds_theta = inferred_constraints                    , ds_overlap = overlap_mode+                   , ds_standalone_wildcard = wildcard                    , ds_mechanism = mechanism } } -        Just theta -> do -- Specified context+        SupplyContext theta ->             return $ GivenTheta $ DS                    { ds_loc = loc                    , ds_name = dfun_name, ds_tvs = tvs@@ -1104,31 +1248,169 @@                    , 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_rep_tc  = rep_tc+  = do DerivEnv { denv_tc      = tc+                , denv_rep_tc  = rep_tc                 , denv_cls     = cls                 , denv_cls_tys = cls_tys-                , denv_mtheta  = mtheta } <- ask+                , denv_ctxt    = deriv_ctxt } <- ask        dflags <- getDynFlags-       case checkSideConditions dflags mtheta cls cls_tys rep_tc of-         CanDerive               -> mk_eqn_stock' go_for_it-         DerivableClassError msg -> bale_out msg-         _                       -> bale_out (nonStdErr cls)--mk_eqn_stock' :: (DerivSpecMechanism -> DerivM EarlyDerivSpec)-              -> DerivM EarlyDerivSpec-mk_eqn_stock' go_for_it-  = do cls <- asks denv_cls-       go_for_it $-         case hasStockDeriving cls of-           Just gen_fn -> DerivSpecStock gen_fn-           Nothing ->-             pprPanic "mk_eqn_stock': Not a stock class!" (ppr cls)+       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)@@ -1139,6 +1421,14 @@          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@@ -1147,7 +1437,7 @@                 , denv_rep_tc  = rep_tc                 , denv_cls     = cls                 , denv_cls_tys = cls_tys-                , denv_mtheta  = mtheta } <- ask+                , denv_ctxt    = deriv_ctxt } <- ask        dflags <- getDynFlags             -- See Note [Deriving instances for classes themselves]@@ -1159,62 +1449,38 @@              | otherwise              = nonStdErr cls $$ msg -       case checkSideConditions dflags mtheta cls cls_tys rep_tc of-           -- NB: pass the *representation* tycon to checkSideConditions+       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)-           DerivableClassError msg -> bale_out msg-           CanDerive               -> mk_eqn_stock' go_for_it-           DerivableViaInstance    -> go_for_it DerivSpecAnyClass+           StockClassError msg     -> bale_out msg+           CanDeriveStock gen_fn   -> go_for_it $ DerivSpecStock gen_fn+           CanDeriveAnyClass       -> go_for_it DerivSpecAnyClass  {- ************************************************************************ *                                                                      *-                Deriving newtypes+            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_overlap_mode = overlap_mode-                , denv_tvs          = tvs-                , denv_tc           = tycon-                , denv_tc_args      = tc_args+  = 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_mtheta       = mtheta+                , denv_ctxt         = deriv_ctxt                 , denv_strat        = mb_strat } <- ask        dflags <- getDynFlags         let newtype_deriving  = xopt LangExt.GeneralizedNewtypeDeriving dflags            deriveAnyClass    = xopt LangExt.DeriveAnyClass             dflags-           go_for_it_gnd     = do-             lift $ traceTc "newtype deriving:" $-               ppr tycon <+> ppr rep_tys <+> ppr all_thetas-             let mechanism = DerivSpecNewtype rep_inst_ty-             doDerivInstErrorChecks1 mechanism-             dfun_name <- lift $ newDFunName' cls tycon-             loc       <- lift getSrcSpanM-             case mtheta of-              Just 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_mechanism = mechanism }-              Nothing -> 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 = all_thetas-                  , ds_overlap = overlap_mode-                  , ds_mechanism = mechanism }            bale_out        = bale_out' newtype_deriving            bale_out' b msg = do err <- derivingThingErrM b msg                                 lift $ failWithTc err@@ -1271,58 +1537,15 @@            -- 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-           rep_tys     = cls_tys ++ [rep_inst_ty]-           rep_pred    = mkClassPred cls rep_tys-           rep_pred_o  = mkPredOrigin DerivOrigin TypeLevel rep_pred-                   -- rep_pred is the representation dictionary, from where-                   -- we are gong to get all the methods for the newtype-                   -- 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 DerivOrigin TypeLevel) $-                        substTheta (zipTvSubst cls_tyvars inst_tys) $-                        classSCTheta cls--           -- 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 :: [PredOrigin]-           meths = classMethods cls-           meth_preds | null meths = [] -- No methods => no constraints-                                        -- (Trac #12814)-                      | otherwise = rep_pred_o : coercible_constraints-           coercible_constraints-             = [ mkPredOrigin (DerivOriginCoerce meth t1 t2) TypeLevel-                              (mkReprPrimEqPred t1 t2)-               | meth <- meths-               , let (Pair t1 t2) = mkCoerceClassMethEqn cls tvs-                                            inst_tys rep_inst_ty meth ]--           all_thetas :: [ThetaOrigin]-           all_thetas = [mkThetaOriginFromPreds $ meth_preds ++ sc_preds]-            -------------------------------------------------------------------            --  Figuring out whether we can only do this newtype-deriving thing             -- See Note [Determining whether newtype-deriving is appropriate]-           might_derive_via_coercible+           might_be_newtype_derivable               =  not (non_coercible_class cls)-              && coercion_looks_sensible+              && eta_ok --            && not (isRecursiveTyCon tycon)      -- Note [Recursive newtypes]-           coercion_looks_sensible-              =  eta_ok-                 -- Check (a) from Note [GND and associated type families]-              && ats_ok-                 -- 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             -- Check that eta reduction is OK            eta_ok = rep_tc_args `lengthAtLeast` nt_eta_arity@@ -1333,46 +1556,13 @@              --     And the [a] must not mention 'b'.  That's all handled              --     by nt_eta_rity. -           (adf_tcs, atf_tcs) = partition isDataFamilyTyCon at_tcs-           ats_ok             = 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 eta_ok eta_msg-                     , ppUnless ats_ok ats_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-                     ]-           eta_msg   = text "cannot eta-reduce the representation type enough"-           ats_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")+           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_data_eqn bale_out-         Just AnyclassStrategy -> mk_eqn_anyclass mk_data_eqn bale_out+         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,@@ -1380,18 +1570,23 @@            -- 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 coercion_looks_sensible && newtype_deriving-             then go_for_it_gnd+           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_derive_via_coercible+           | might_be_newtype_derivable              && ((newtype_deriving && not deriveAnyClass)                   || std_class_via_coercible cls)-          -> go_for_it_gnd+          -> mk_eqn_newtype rep_inst_ty            | otherwise-          -> case checkSideConditions dflags mtheta cls cls_tys rep_tycon of-               DerivableClassError msg+          -> 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@@ -1401,10 +1596,10 @@                  --                  -- and the previous cases won't catch it. This fixes the bug                  -- reported in Trac #10598.-                 | might_derive_via_coercible && newtype_deriving-                -> go_for_it_gnd+                 | might_be_newtype_derivable && newtype_deriving+                -> mk_eqn_newtype rep_inst_ty                  -- Otherwise, throw an error for a stock class-                 | might_derive_via_coercible && not newtype_deriving+                 | might_be_newtype_derivable && not newtype_deriving                 -> bale_out (msg $$ suggest_gnd)                  | otherwise                 -> bale_out msg@@ -1418,8 +1613,8 @@                  -- where it may not be applicable. See Trac #9600.                  | otherwise                  -> bale_out (non_std $$ suggest_gnd) -               -- DerivableViaInstance-               DerivableViaInstance -> do+               -- 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.@@ -1430,9 +1625,10 @@                        <+> text "GeneralizedNewtypeDeriving are enabled"                      , text "Defaulting to the DeriveAnyClass strategy"                        <+> text "for instantiating" <+> ppr cls ]-                 mk_data_eqn DerivSpecAnyClass-               -- CanDerive-               CanDerive -> mk_eqn_stock' mk_data_eqn+                 mk_originative_eqn DerivSpecAnyClass+               -- CanDeriveStock+               CanDeriveStock gen_fn -> mk_originative_eqn $+                                        DerivSpecStock gen_fn  {- Note [Recursive newtypes]@@ -1574,6 +1770,8 @@     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}@@ -1651,13 +1849,14 @@ -- 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_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 mechanism+             doDerivInstErrorChecks2 clas inst_spec theta wildcard mechanism              traceTc "newder" (ppr inst_spec)              return $ InstInfo                        { iSpec   = inst_spec@@ -1671,7 +1870,7 @@   where     extensions :: [LangExt.Extension]     extensions-      | isDerivSpecNewtype mechanism+      | 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]@@ -1684,14 +1883,15 @@ doDerivInstErrorChecks1 :: DerivSpecMechanism -> DerivM () doDerivInstErrorChecks1 mechanism = do     DerivEnv { denv_tc      = tc-             , denv_rep_tc  = rep_tc-             , denv_mtheta  = mtheta } <- ask+             , 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 (mtheta /= Nothing),-    -- check that all the data constructors are in scope...+    -- 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)) &&@@ -1703,14 +1903,31 @@      -- ...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.-    unless (anyclass_strategy || isNothing mtheta || not hidden_data_cons) $+    -- 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 -> DerivSpecMechanism -> TcM ()-doDerivInstErrorChecks2 clas clas_inst mechanism+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]@@ -1718,10 +1935,14 @@          do { failIfTc (safeLanguageOn dflags) gen_inst_err             ; when (safeInferOn dflags) (recordUnsafeInfer emptyBag) } }   where-    exotic_mechanism = case mechanism of-      DerivSpecStock{} -> False-      _                -> True+    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." @@ -1731,15 +1952,12 @@ genDerivStuff mechanism loc clas tycon inst_tys tyvars   = case mechanism of       -- See Note [Bindings for Generalised Newtype Deriving]-      DerivSpecNewtype rhs_ty -> do-        (binds, faminsts) <- gen_Newtype_binds loc clas tyvars inst_tys rhs_ty-        return (binds, faminsts, maybeToList unusedConName)+      DerivSpecNewtype rhs_ty -> gen_newtype_or_via rhs_ty        -- Try a stock deriver       DerivSpecStock gen_fn -> gen_fn loc tycon inst_tys -      -- If there isn't a stock deriver, our last resort is -XDeriveAnyClass-      -- (since -XGeneralizedNewtypeDeriving fell through).+      -- Try DeriveAnyClass       DerivSpecAnyClass -> do         let mini_env   = mkVarEnv (classTyVars clas `zip` inst_tys)             mini_subst = mkTvSubst (mkInScopeSet (mkVarSet tyvars)) mini_env@@ -1757,7 +1975,14 @@                -- 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@@ -1849,6 +2074,14 @@  * 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@@ -1918,6 +2151,15 @@                     = 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",@@ -1925,10 +2167,10 @@                 <+> pprClassPred cls (cls_tys ++ [inst_ty]))]  derivingThingErr :: Bool -> Class -> [Type] -> Type-                 -> Maybe DerivStrategy -> MsgDoc -> MsgDoc+                 -> 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 ppr mb_strat) why+                      (maybe empty derivStrategyName mb_strat) why  derivingThingErrM :: Bool -> MsgDoc -> DerivM MsgDoc derivingThingErrM newtype_deriving why@@ -1948,10 +2190,12 @@                 , denv_cls_tys = cls_tys                 , denv_strat   = mb_strat } <- ask        pure $ derivingThingErr' (isDerivSpecNewtype mechanism) cls cls_tys-                (mkTyConApp tc tc_args) mb_strat (ppr mechanism) why+                (mkTyConApp tc tc_args) mb_strat+                (derivStrategyName $ derivSpecMechanismToStrategy mechanism)+                why  derivingThingErr' :: Bool -> Class -> [Type] -> Type-                  -> Maybe DerivStrategy -> MsgDoc -> MsgDoc -> MsgDoc+                  -> 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)@@ -1973,10 +2217,6 @@   = hang (text "The data constructors of" <+> quotes (ppr tc) <+> ptext (sLit "are not all in scope"))        2 (text "so you cannot derive an instance for it") -standaloneCtxt :: LHsSigType GhcRn -> SDoc+standaloneCtxt :: LHsSigWcType GhcRn -> SDoc standaloneCtxt ty = hang (text "In the stand-alone deriving instance for")                        2 (quotes (ppr ty))--unboxedTyConErr :: String -> MsgDoc-unboxedTyConErr thing =-  text "The last argument of the instance cannot be an unboxed" <+> text thing
typecheck/TcDerivInfer.hs view
@@ -70,6 +70,7 @@                   , denv_tc_args     = tc_args                   , denv_cls         = main_cls                   , denv_cls_tys     = cls_tys } <- ask+       ; wildcard <- isStandaloneWildcardDeriv        ; let is_anyclass = isDerivSpecAnyClass mechanism              infer_constraints                | is_anyclass = inferConstraintsDAC inst_tys@@ -83,7 +84,8 @@              cls_tvs  = classTyVars main_cls              sc_constraints = ASSERT2( equalLength cls_tvs inst_tys                                      , ppr main_cls <+> ppr inst_tys )-                              [ mkThetaOrigin DerivOrigin TypeLevel [] [] [] $+                              [ mkThetaOrigin (mkDerivOrigin wildcard)+                                              TypeLevel [] [] [] $                                 substTheta cls_subst (classSCTheta main_cls) ]              cls_subst = ASSERT( equalLength cls_tvs inst_tys )                          zipTvSubst cls_tvs inst_tys@@ -107,6 +109,7 @@                 , denv_rep_tc_args = rep_tc_args                 , denv_cls         = main_cls                 , denv_cls_tys     = cls_tys } <- ask+       wildcard <- isStandaloneWildcardDeriv         let tc_binders = tyConBinders rep_tc            choose_level bndr@@ -131,7 +134,7 @@                        -- No constraints for unlifted types                        -- See Note [Deriving and unboxed types]                      , not (isUnliftedType arg_ty)-                     , let orig = DerivOriginDC data_con arg_n+                     , let orig = DerivOriginDC data_con arg_n wildcard                      , preds_and_mbSubst                          <- get_arg_constraints orig arg_t_or_k arg_ty                      ]@@ -145,7 +148,7 @@                                          emptyTCvSubst (catMaybes mbSubsts)                    unmapped_tvs = filter (\v -> v `notElemTCvSubst` subst                                              && not (v `isInScope` subst)) tvs-                   (subst', _)  = mapAccumL substTyVarBndr subst unmapped_tvs+                   (subst', _)  = substTyVarBndrs subst unmapped_tvs                    preds'       = map (substPredOrigin subst') preds                    inst_tys'    = substTys subst' inst_tys                    tvs'         = tyCoVarsOfTypesWellScoped inst_tys'@@ -210,7 +213,7 @@                 -- Stupid constraints            stupid_constraints-             = [ mkThetaOrigin DerivOrigin TypeLevel [] [] [] $+             = [ mkThetaOrigin deriv_origin TypeLevel [] [] [] $                  substTheta tc_subst (tyConStupidTheta rep_tc) ]            tc_subst = -- See the comment with all_rep_tc_args for an                       -- explanation of this assertion@@ -230,7 +233,7 @@                constrs                  | main_cls `hasKey` dataClassKey                  , all (isLiftedTypeKind . typeKind) rep_tc_args-                 = [ mk_cls_pred DerivOrigin t_or_k main_cls ty+                 = [ mk_cls_pred deriv_origin t_or_k main_cls ty                    | (t_or_k, ty) <- zip t_or_ks rep_tc_args]                  | otherwise                  = []@@ -244,6 +247,8 @@                      | otherwise   = cls_tys +           deriv_origin = mkDerivOrigin wildcard+        if    -- Generic constraints are easy           |  is_generic            -> return ([], tvs, inst_tys)@@ -289,6 +294,7 @@ inferConstraintsDAC inst_tys   = do { DerivEnv { denv_tvs = tvs                   , denv_cls = cls } <- ask+       ; wildcard <- isStandaloneWildcardDeriv         ; let gen_dms = [ (sel_id, dm_ty)                        | (sel_id, Just (_, GenericDM dm_ty)) <- classOpItems cls ]@@ -310,7 +316,7 @@                           (dm_tvs, dm_theta, dm_tau)                                      = tcSplitNestedSigmaTys gen_dm_ty'                           tau_eq     = mkPrimEqPred meth_tau dm_tau-                    ; return (mkThetaOrigin DerivOrigin TypeLevel+                    ; return (mkThetaOrigin (mkDerivOrigin wildcard) TypeLevel                                 meth_tvs dm_tvs meth_theta (tau_eq:dm_theta)) }         ; theta_origins <- lift $ mapM do_one_meth gen_dms@@ -318,20 +324,28 @@  {- Note [Inferring the instance context] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-There are two sorts of 'deriving':+There are two sorts of 'deriving', as represented by the two constructors+for DerivContext: -  * InferTheta: the deriving clause for a data type-      data T a = T1 a deriving( Eq )+  * InferContext mb_wildcard: This can either be:+    - The deriving clause for a data type.+        (e.g, data T a = T1 a deriving( Eq ))+      In this case, mb_wildcard = Nothing.+    - A standalone declaration with an extra-constraints wildcard+        (e.g., deriving instance _ => Eq (Foo a))+      In this case, mb_wildcard = Just loc, where loc is the location+      of the extra-constraints wildcard.+     Here we must infer an instance context,     and generate instance declaration       instance Eq a => Eq (T a) where ... -  * CheckTheta: standalone deriving+  * SupplyContext theta: standalone deriving       deriving instance Eq a => Eq (T a)     Here we only need to fill in the bindings;-    the instance context is user-supplied+    the instance context (theta) is user-supplied -For a deriving clause (InferTheta) we must figure out the+For the InferContext case, we must figure out the instance context (inferConstraintsDataConArgs). Suppose we are inferring the instance context for     C t1 .. tn (T s1 .. sm)@@ -384,7 +398,7 @@    data T = MkT Int# deriving ( Show )  Specifically, we use TcGenDeriv.box to box the Int# into an Int-(which we know how to show), and append a '#'. Parenthesis are not required+(which we know how to show), and append a '#'. Parentheses are not required for unboxed values (`MkT -3#` is a valid expression).  Note [Superclasses of derived instance]@@ -523,8 +537,8 @@  simplifyInstanceContexts :: [DerivSpec [ThetaOrigin]]                          -> TcM [DerivSpec ThetaType]--- Used only for deriving clauses (InferTheta)--- not for standalone deriving+-- Used only for deriving clauses or standalone deriving with an+-- extra-constraints wildcard (InferContext) -- See Note [Simplifying the instance context]  simplifyInstanceContexts [] = return []@@ -624,20 +638,26 @@                let given_pred = substTy skol_subst given                in newEvVar given_pred -             mk_wanted_cts :: [TyVar] -> [PredOrigin] -> TcM [CtEvidence]-             mk_wanted_cts metas_to_be wanteds-               = do -- We instantiate metas_to_be with fresh meta type-                    -- variables. Currently, these can only be type variables-                    -- quantified in generic default type signatures.-                    -- See Note [Gathering and simplifying constraints for-                    -- DeriveAnyClass]-                    (meta_subst, _meta_tvs) <- newMetaTyVars metas_to_be-                    let wanted_subst = skol_subst `unionTCvSubst` meta_subst-                        mk_wanted_ct (PredOrigin wanted o t_or_k)-                          = newWanted o (Just t_or_k) $-                            substTyUnchecked wanted_subst wanted-                    mapM mk_wanted_ct wanteds+             emit_wanted_constraints :: [TyVar] -> [PredOrigin] -> TcM ()+             emit_wanted_constraints metas_to_be preds+               = do { -- We instantiate metas_to_be with fresh meta type+                      -- variables. Currently, these can only be type variables+                      -- quantified in generic default type signatures.+                      -- See Note [Gathering and simplifying constraints for+                      -- DeriveAnyClass]+                      (meta_subst, _meta_tvs) <- newMetaTyVars metas_to_be +                    -- Now make a constraint for each of the instantiated predicates+                    ; let wanted_subst = skol_subst `unionTCvSubst` meta_subst+                          mk_wanted_ct (PredOrigin wanted orig t_or_k)+                            = do { ev <- newWanted orig (Just t_or_k) $+                                         substTyUnchecked wanted_subst wanted+                                 ; return (mkNonCanonical ev) }+                    ; cts <- mapM mk_wanted_ct preds++                    -- And emit them into the monad+                    ; emitSimples (listToCts cts) }+              -- Create the implications we need to solve. For stock and newtype              -- deriving, these implication constraints will be simple class              -- constraints like (C a, Ord b).@@ -647,37 +667,46 @@              mk_wanteds (ThetaOrigin { to_anyclass_skols  = ac_skols                                      , to_anyclass_metas  = ac_metas                                      , to_anyclass_givens = ac_givens-                                     , to_wanted_origins  = wanteds })+                                     , to_wanted_origins  = preds })                = do { ac_given_evs <- mapM mk_given_ev ac_givens                     ; (_, wanteds)                         <- captureConstraints $                            checkConstraints skol_info ac_skols ac_given_evs $-                           do { cts <- mk_wanted_cts ac_metas wanteds-                              ; emitSimples $ listToCts-                                            $ map mkNonCanonical cts }+                              -- The checkConstraints bumps the TcLevel, and+                              -- wraps the wanted constraints in an implication,+                              -- when (but only when) necessary+                           emit_wanted_constraints ac_metas preds                     ; pure wanteds }         -- See [STEP DAC BUILD]-       -- Generate the implication constraints constraints to solve with the-       -- skolemized variables-       ; wanteds <- mapM mk_wanteds thetas+       -- Generate the implication constraints, one for each method, to solve+       -- with the skolemized variables.  Start "one level down" because+       -- we are going to wrap the result in an implication with tvs_skols,+       -- in step [DAC RESIDUAL]+       ; (wanteds, tc_lvl) <- pushTcLevelM $+                              mapM mk_wanteds thetas         ; traceTc "simplifyDeriv inputs" $          vcat [ pprTyVars tvs $$ ppr thetas $$ ppr wanteds, doc ]         -- See [STEP DAC SOLVE]-       -- Simplify the constraints-       ; solved_implics <- runTcSDeriveds $ solveWantedsAndDrop-                                          $ unionsWC wanteds+       -- Simplify the constraints, starting at the same level at which+       -- they are generated (c.f. the call to runTcSWithEvBinds in+       -- simplifyInfer)+       ; solved_wanteds <- setTcLevel tc_lvl   $+                           runTcSDeriveds      $+                           solveWantedsAndDrop $+                           unionsWC wanteds+        -- It's not yet zonked!  Obviously zonk it before peering at it-       ; solved_implics <- zonkWC solved_implics+       ; solved_wanteds <- zonkWC solved_wanteds         -- See [STEP DAC HOIST]        -- Split the resulting constraints into bad and good constraints,        -- building an @unsolved :: WantedConstraints@ representing all        -- the constraints we can't just shunt to the predicates.        -- See Note [Exotic derived instance contexts]-       ; let residual_simple = approximateWC True solved_implics+       ; let residual_simple = approximateWC True solved_wanteds              (bad, good) = partitionBagWith get_good residual_simple               get_good :: Ct -> Either Ct PredType@@ -709,10 +738,9 @@         -- See [STEP DAC RESIDUAL]        ; min_theta_vars <- mapM newEvVar min_theta-       ; tc_lvl <- getTcLevel        ; (leftover_implic, _)-           <- buildImplicationFor (pushTcLevel tc_lvl) skol_info tvs_skols-                                  min_theta_vars solved_implics+           <- buildImplicationFor tc_lvl skol_info tvs_skols+                                  min_theta_vars solved_wanteds        -- This call to simplifyTop is purely for error reporting        -- See Note [Error reporting for deriving clauses]        -- See also Note [Exotic derived instance contexts], which are caught@@ -725,8 +753,8 @@ Note [Overlap and deriving] ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider some overlapping instances:-  data Show a => Show [a] where ..-  data Show [Char] where ...+  instance Show a => Show [a] where ..+  instance Show [Char] where ...  Now a data type with deriving:   data T a = MkT [a] deriving( Show )@@ -794,25 +822,29 @@ [STEP DAC BUILD] So that's what we do.  We build the constraint (call it C1) -   forall b. Ix b => (Show (Maybe s), Ix cc,-                      Maybe s -> b -> String-                          ~ Maybe s -> cc -> String)+   forall[2] b. Ix b => (Show (Maybe s), Ix cc,+                        Maybe s -> b -> String+                            ~ Maybe s -> cc -> String) -Here, the 'b' comes from the quantified type variable in the expected type-of bar (i.e., 'to_anyclass_skols' in 'ThetaOrigin'). The 'cc' is a unification-variable that comes from instantiating the quantified type variable 'c' in-$gdm_bar's type (i.e., 'to_anyclass_metas' in 'ThetaOrigin).+Here:+* The level of this forall constraint is forall[2], because we are later+  going to wrap it in a forall[1] in [STEP DAC RESIDUAL] -The (Ix b) constraint comes from the context of bar's type-(i.e., 'to_wanted_givens' in 'ThetaOrigin'). The (Show (Maybe s)) and (Ix cc)-constraints come from the context of $gdm_bar's type-(i.e., 'to_anyclass_givens' in 'ThetaOrigin').+* The 'b' comes from the quantified type variable in the expected type+  of bar (i.e., 'to_anyclass_skols' in 'ThetaOrigin'). The 'cc' is a unification+  variable that comes from instantiating the quantified type variable 'c' in+  $gdm_bar's type (i.e., 'to_anyclass_metas' in 'ThetaOrigin). -The equality constraint (Maybe s -> b -> String) ~ (Maybe s -> cc -> String)-comes from marrying up the instantiated type of $gdm_bar with the specified-type of bar. Notice that the type variables from the instance, 's' in this-case, are global to this constraint.+* The (Ix b) constraint comes from the context of bar's type+  (i.e., 'to_wanted_givens' in 'ThetaOrigin'). The (Show (Maybe s)) and (Ix cc)+  constraints come from the context of $gdm_bar's type+  (i.e., 'to_anyclass_givens' in 'ThetaOrigin'). +* The equality constraint (Maybe s -> b -> String) ~ (Maybe s -> cc -> String)+  comes from marrying up the instantiated type of $gdm_bar with the specified+  type of bar. Notice that the type variables from the instance, 's' in this+  case, are global to this constraint.+ 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,@@ -820,8 +852,8 @@  Similarly for 'baz', givng the constraint C2 -   forall. Eq (Maybe s) => (Ord a, Show a,-                            Maybe s -> Maybe s -> Bool+   forall[2]. Eq (Maybe s) => (Ord a, Show a,+                              Maybe s -> Maybe s -> Bool                                 ~ Maybe s -> Maybe s -> Bool)  In this case baz has no local quantification, so the implication@@ -832,9 +864,9 @@ We can combine these two implication constraints into a single constraint (C1, C2), and simplify, unifying cc:=b, to get: -   forall b. Ix b => Show a+   forall[2] b. Ix b => Show a    /\-   forall. Eq (Maybe s) => (Ord a, Show a)+   forall[2]. Eq (Maybe s) => (Ord a, Show a)  [STEP DAC HOIST] Let's call that (C1', C2').  Now we need to hoist the unsolved@@ -853,7 +885,7 @@ In this case we have solved all the leftover constraints, but what if we don't?  Simple!  We just form the final residual constraint -   forall s. CX => (C1',C2')+   forall[1] s. CX => (C1',C2')  and simplify that. In simple cases it'll succeed easily, because CX literally contains the constraints in C1', C2', but if there is anything
typecheck/TcDerivUtils.hs view
@@ -11,12 +11,13 @@ module TcDerivUtils (         DerivM, DerivEnv(..),         DerivSpec(..), pprDerivSpec,-        DerivSpecMechanism(..), isDerivSpecStock,-        isDerivSpecNewtype, isDerivSpecAnyClass,-        DerivContext, DerivStatus(..),+        DerivSpecMechanism(..), derivSpecMechanismToStrategy, isDerivSpecStock,+        isDerivSpecNewtype, isDerivSpecAnyClass, isDerivSpecVia,+        DerivContext(..), OriginativeDerivStatus(..),+        isStandaloneDeriv, isStandaloneWildcardDeriv, mkDerivOrigin,         PredOrigin(..), ThetaOrigin(..), mkPredOrigin,         mkThetaOrigin, mkThetaOriginFromPreds, substPredOrigin,-        checkSideConditions, hasStockDeriving,+        checkOriginativeSideConditions, hasStockDeriving,         canDeriveAnyClass,         std_class_via_coercible, non_coercible_class,         newDerivClsInst, extendLocalInstEnv@@ -52,6 +53,7 @@ import VarSet  import Control.Monad.Trans.Reader+import Data.Maybe import qualified GHC.LanguageExtensions as LangExt import ListSetOps (assocMaybe) @@ -60,6 +62,31 @@ -- is a simple reader around 'TcRn'. type DerivM = ReaderT DerivEnv TcRn +-- | Is GHC processing a stanalone deriving declaration?+isStandaloneDeriv :: DerivM Bool+isStandaloneDeriv = asks (go . denv_ctxt)+  where+    go :: DerivContext -> Bool+    go (InferContext wildcard) = isJust wildcard+    go (SupplyContext {})      = True++-- | Is GHC processing a standalone deriving declaration with an+-- extra-constraints wildcard as the context?+-- (e.g., @deriving instance _ => Eq (Foo a)@)+isStandaloneWildcardDeriv :: DerivM Bool+isStandaloneWildcardDeriv = asks (go . denv_ctxt)+  where+    go :: DerivContext -> Bool+    go (InferContext wildcard) = isJust wildcard+    go (SupplyContext {})      = False++-- | @'mkDerivOrigin' wc@ returns 'StandAloneDerivOrigin' if @wc@ is 'True',+-- and 'DerivClauseOrigin' if @wc@ is 'False'. Useful for error-reporting.+mkDerivOrigin :: Bool -> CtOrigin+mkDerivOrigin standalone_wildcard+  | standalone_wildcard = StandAloneDerivOrigin+  | otherwise           = DerivClauseOrigin+ -- | Contains all of the information known about a derived instance when -- determining what its @EarlyDerivSpec@ should be. data DerivEnv = DerivEnv@@ -82,10 +109,13 @@   , denv_rep_tc_args  :: [Type]     -- ^ The representation types for 'denv_tc_args'     --   (for data family instances)-  , denv_mtheta       :: DerivContext-    -- ^ 'Just' the context of the instance, for standalone deriving.-    --   'Nothing' for @deriving@ clauses.-  , denv_strat        :: Maybe DerivStrategy+  , denv_ctxt         :: DerivContext+    -- ^ @'SupplyContext' theta@ for standalone deriving (where @theta@ is the+    --   context of the instance).+    --   'InferContext' for @deriving@ clauses, or for standalone deriving that+    --   uses a wildcard constraint.+    --   See @Note [Inferring the instance context]@.+  , denv_strat        :: Maybe (DerivStrategy GhcTc)     -- ^ 'Just' if user requests a particular deriving strategy.     --   Otherwise, 'Nothing'.   }@@ -99,7 +129,7 @@                 , denv_tc_args      = tc_args                 , denv_rep_tc       = rep_tc                 , denv_rep_tc_args  = rep_tc_args-                , denv_mtheta       = mtheta+                , denv_ctxt         = ctxt                 , denv_strat        = mb_strat })     = hang (text "DerivEnv")          2 (vcat [ text "denv_overlap_mode" <+> ppr overlap_mode@@ -110,18 +140,21 @@                  , 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_mtheta"       <+> ppr mtheta+                 , text "denv_ctxt"         <+> ppr ctxt                  , text "denv_strat"        <+> ppr mb_strat ]) -data DerivSpec theta = DS { ds_loc       :: SrcSpan-                          , ds_name      :: Name         -- DFun name-                          , ds_tvs       :: [TyVar]-                          , ds_theta     :: theta-                          , ds_cls       :: Class-                          , ds_tys       :: [Type]-                          , ds_tc        :: TyCon-                          , ds_overlap   :: Maybe OverlapMode-                          , ds_mechanism :: DerivSpecMechanism }+data DerivSpec theta = DS { ds_loc                 :: SrcSpan+                          , ds_name                :: Name         -- DFun name+                          , ds_tvs                 :: [TyVar]+                          , 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]+                              -- in TcDerivInfer+                          , ds_mechanism           :: DerivSpecMechanism }         -- This spec implies a dfun declaration of the form         --       df :: forall tvs. theta => C tys         -- The Name is the name for the DFun we'll build@@ -151,15 +184,17 @@  pprDerivSpec :: Outputable theta => DerivSpec theta -> SDoc pprDerivSpec (DS { ds_loc = l, ds_name = n, ds_tvs = tvs, ds_cls = c,-                   ds_tys = tys, ds_theta = rhs, ds_mechanism = mech })+                   ds_tys = tys, ds_theta = rhs,+                   ds_standalone_wildcard = wildcard, ds_mechanism = mech })   = hang (text "DerivSpec")-       2 (vcat [ text "ds_loc       =" <+> ppr l-               , text "ds_name      =" <+> ppr n-               , text "ds_tvs       =" <+> ppr tvs-               , text "ds_cls       =" <+> ppr c-               , text "ds_tys       =" <+> ppr tys-               , text "ds_theta     =" <+> ppr rhs-               , text "ds_mechanism =" <+> ppr mech ])+       2 (vcat [ text "ds_loc                  =" <+> ppr l+               , text "ds_name                 =" <+> ppr n+               , text "ds_tvs                  =" <+> ppr tvs+               , text "ds_cls                  =" <+> ppr c+               , text "ds_tys                  =" <+> ppr tys+               , text "ds_theta                =" <+> ppr rhs+               , text "ds_standalone_wildcard  =" <+> ppr wildcard+               , text "ds_mechanism            =" <+> ppr mech ])  instance Outputable theta => Outputable (DerivSpec theta) where   ppr = pprDerivSpec@@ -190,7 +225,17 @@    | DerivSpecAnyClass -- -XDeriveAnyClass -isDerivSpecStock, isDerivSpecNewtype, isDerivSpecAnyClass+  | DerivSpecVia -- -XDerivingVia+      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++isDerivSpecStock, isDerivSpecNewtype, isDerivSpecAnyClass, isDerivSpecVia   :: DerivSpecMechanism -> Bool isDerivSpecStock (DerivSpecStock{}) = True isDerivSpecStock _                  = False@@ -198,30 +243,57 @@ isDerivSpecNewtype (DerivSpecNewtype{}) = True isDerivSpecNewtype _                    = False -isDerivSpecAnyClass (DerivSpecAnyClass{}) = True-isDerivSpecAnyClass _                     = False+isDerivSpecAnyClass DerivSpecAnyClass = True+isDerivSpecAnyClass _                 = False --- A DerivSpecMechanism can be losslessly converted to a DerivStrategy.-mechanismToStrategy :: DerivSpecMechanism -> DerivStrategy-mechanismToStrategy (DerivSpecStock{})    = StockStrategy-mechanismToStrategy (DerivSpecNewtype{})  = NewtypeStrategy-mechanismToStrategy (DerivSpecAnyClass{}) = AnyclassStrategy+isDerivSpecVia (DerivSpecVia{}) = True+isDerivSpecVia _                = False  instance Outputable DerivSpecMechanism where-  ppr = ppr . mechanismToStrategy+  ppr (DerivSpecStock{})   = text "DerivSpecStock"+  ppr (DerivSpecNewtype t) = text "DerivSpecNewtype" <> colon <+> ppr t+  ppr DerivSpecAnyClass    = text "DerivSpecAnyClass"+  ppr (DerivSpecVia t)     = text "DerivSpecVia" <> colon <+> ppr t -type DerivContext = Maybe ThetaType-   -- Nothing    <=> Vanilla deriving; infer the context of the instance decl-   -- Just theta <=> Standalone deriving: context supplied by programmer+-- | Whether GHC is processing a @deriving@ clause or a standalone deriving+-- declaration.+data DerivContext+  = InferContext (Maybe SrcSpan) -- ^ @'InferContext mb_wildcard@ is either:+                                 --+                                 -- * A @deriving@ clause (in which case+                                 --   @mb_wildcard@ is 'Nothing').+                                 --+                                 -- * A standalone deriving declaration with+                                 --   an extra-constraints wildcard as the+                                 --   context (in which case @mb_wildcard@ is+                                 --   @'Just' loc@, where @loc@ is the location+                                 --   of the wildcard.+                                 --+                                 -- GHC should infer the context. -data DerivStatus = CanDerive                 -- Stock class, can derive-                 | DerivableClassError SDoc  -- Stock class, but can't do it-                 | DerivableViaInstance      -- See Note [Deriving any class]-                 | NonDerivableClass SDoc    -- Non-stock class+  | SupplyContext ThetaType      -- ^ @'SupplyContext' theta@ is a standalone+                                 -- deriving declaration, where @theta@ is the+                                 -- context supplied by the user. +instance Outputable DerivContext where+  ppr (InferContext standalone) = text "InferContext"  <+> ppr standalone+  ppr (SupplyContext theta)     = text "SupplyContext" <+> ppr theta++-- | Records whether a particular class can be derived by way of an+-- /originative/ deriving strategy (i.e., @stock@ or @anyclass@).+--+-- See @Note [Deriving strategies]@ in "TcDeriv".+data OriginativeDerivStatus+  = CanDeriveStock            -- Stock class, can derive+      (SrcSpan -> TyCon -> [Type]+               -> TcM (LHsBinds GhcPs, BagDerivStuff, [Name]))+  | StockClassError SDoc      -- Stock class, but can't do it+  | CanDeriveAnyClass         -- See Note [Deriving any class]+  | NonDerivableClass SDoc    -- Cannot derive with either stock or anyclass+ -- A stock class is one either defined in the Haskell report or for which GHC -- otherwise knows how to generate code for (possibly requiring the use of a--- language extension), such as Eq, Ord, Ix, Data, Generic, etc.+-- language extension), such as Eq, Ord, Ix, Data, Generic, etc.)  -- | A 'PredType' annotated with the origin of the constraint 'CtOrigin', -- and whether or the constraint deals in types or kinds.@@ -339,9 +411,9 @@  Only certain blessed classes can be used in a deriving clause (without the assistance of GeneralizedNewtypeDeriving or DeriveAnyClass). These classes-are listed below in the definition of hasStockDeriving. The sideConditions+are listed below in the definition of hasStockDeriving. The stockSideConditions function determines the criteria that needs to be met in order for a particular-class to be able to be derived successfully.+stock class to be able to be derived successfully.  A class might be able to be used in a deriving clause if -XDeriveAnyClass is willing to support it. The canDeriveAnyClass function checks if this is the@@ -447,35 +519,43 @@     doc = text "Data con fixities for" <+> ppr name  --------------------------------------------------------------------- Check side conditions that dis-allow derivability for particular classes--- This is *apart* from the newtype-deriving mechanism+-- Check side conditions that dis-allow derivability for the originative+-- deriving strategies (stock and anyclass).+-- See Note [Deriving strategies] in TcDeriv for an explanation of what+-- "originative" means. --+-- This is *apart* from the coerce-based strategies, newtype and via.+-- -- Here we get the representation tycon in case of family instances as it has -- the data constructors - but we need to be careful to fall back to the -- family tycon (with indexes) in error messages. -checkSideConditions :: DynFlags -> DerivContext -> Class -> [TcType]-                    -> TyCon -- tycon-                    -> DerivStatus-checkSideConditions dflags mtheta cls cls_tys rep_tc-  | Just cond <- sideConditions mtheta cls-  = case (cond dflags rep_tc) of-        NotValid err -> DerivableClassError err  -- Class-specific error+checkOriginativeSideConditions+  :: DynFlags -> DerivContext -> Class -> [TcType]+  -> TyCon -> TyCon+  -> OriginativeDerivStatus+checkOriginativeSideConditions dflags deriv_ctxt cls cls_tys tc rep_tc+    -- First, check if stock deriving is possible...+  | Just cond <- stockSideConditions deriv_ctxt cls+  = case (cond dflags tc rep_tc) of+        NotValid err -> StockClassError err  -- Class-specific error         IsValid  | null (filterOutInvisibleTypes (classTyCon cls) cls_tys)-                   -> CanDerive                    -- All stock derivable classes are unary in the sense that                    -- there should be not types in cls_tys (i.e., no type args                    -- other than last). Note that cls_types can contain                    -- invisible types as well (e.g., for Generic1, which is                    -- poly-kinded), so make sure those are not counted.-                 | otherwise -> DerivableClassError (classArgsErr cls cls_tys)+                 , Just gen_fn <- hasStockDeriving cls+                   -> CanDeriveStock gen_fn+                 | otherwise -> StockClassError (classArgsErr cls cls_tys)                    -- e.g. deriving( Eq s ) +    -- ...if not, try falling back on DeriveAnyClass.   | NotValid err <- canDeriveAnyClass dflags-  = NonDerivableClass err  -- DeriveAnyClass does not work+  = NonDerivableClass err  -- Neither anyclass nor stock work    | otherwise-  = DerivableViaInstance   -- DeriveAnyClass should work+  = CanDeriveAnyClass   -- DeriveAnyClass should work  classArgsErr :: Class -> [Type] -> SDoc classArgsErr cls cls_tys = quotes (ppr (mkClassPred cls cls_tys)) <+> text "is not a class"@@ -485,8 +565,8 @@ -- mechanism on certain classes (as opposed to classes that require -- GeneralizedNewtypeDeriving or DeriveAnyClass). Returns Nothing for a -- class for which stock deriving isn't possible.-sideConditions :: DerivContext -> Class -> Maybe Condition-sideConditions mtheta cls+stockSideConditions :: DerivContext -> Class -> Maybe Condition+stockSideConditions deriv_ctxt cls   | cls_key == eqClassKey          = Just (cond_std `andCond` cond_args cls)   | cls_key == ordClassKey         = Just (cond_std `andCond` cond_args cls)   | cls_key == showClassKey        = Just (cond_std `andCond` cond_args cls)@@ -520,10 +600,10 @@   | otherwise                      = Nothing   where     cls_key = getUnique cls-    cond_std     = cond_stdOK mtheta False  -- Vanilla data constructors, at least one,-                                            --    and monotype arguments-    cond_vanilla = cond_stdOK mtheta True   -- Vanilla data constructors but-                                            --   allow no data cons or polytype arguments+    cond_std     = cond_stdOK deriv_ctxt False+      -- Vanilla data constructors, at least one, and monotype arguments+    cond_vanilla = cond_stdOK deriv_ctxt True+      -- Vanilla data constructors but allow no data cons or polytype arguments  canDeriveAnyClass :: DynFlags -> Validity -- IsValid: we can (try to) derive it via an empty instance declaration@@ -534,54 +614,108 @@   | otherwise   = IsValid   -- OK! -type Condition = DynFlags -> TyCon -> Validity-        -- TyCon is the *representation* tycon if the data type is an indexed one-        -- Nothing => OK+type Condition+   = DynFlags +  -> TyCon    -- ^ The data type's 'TyCon'. For data families, this is the+              -- family 'TyCon'.++  -> TyCon    -- ^ For data families, this is the representation 'TyCon'.+              -- Otherwise, this is the same as the other 'TyCon' argument.++  -> Validity -- ^ 'IsValid' if deriving an instance for this 'TyCon' is+              -- possible. Otherwise, it's @'NotValid' err@, where @err@+              -- explains what went wrong.+ orCond :: Condition -> Condition -> Condition-orCond c1 c2 dflags tc-  = case (c1 dflags tc, c2 dflags tc) of+orCond c1 c2 dflags tc rep_tc+  = case (c1 dflags tc rep_tc, c2 dflags tc rep_tc) of      (IsValid,    _)          -> IsValid    -- c1 succeeds      (_,          IsValid)    -> IsValid    -- c21 succeeds      (NotValid x, NotValid y) -> NotValid (x $$ text "  or" $$ y)                                             -- Both fail  andCond :: Condition -> Condition -> Condition-andCond c1 c2 dflags tc = c1 dflags tc `andValid` c2 dflags tc+andCond c1 c2 dflags tc rep_tc+  = c1 dflags tc rep_tc `andValid` c2 dflags tc rep_tc -cond_stdOK :: DerivContext -- Says whether this is standalone deriving or not;-                           --     if standalone, we just say "yes, go for it"-           -> Bool         -- True <=> permissive: allow higher rank-                           --          args and no data constructors-           -> Condition-cond_stdOK (Just _) _ _ _-  = IsValid     -- Don't check these conservative conditions for+-- | Some common validity checks shared among stock derivable classes. One+-- check that absolutely must hold is that if an instance @C (T a)@ is being+-- derived, then @T@ must be a tycon for a data type or a newtype. The+-- remaining checks are only performed if using a @deriving@ clause (i.e.,+-- they're ignored if using @StandaloneDeriving@):+--+-- 1. The data type must have at least one constructor (this check is ignored+--    if using @EmptyDataDeriving@).+--+-- 2. The data type cannot have any GADT constructors.+--+-- 3. The data type cannot have any constructors with existentially quantified+--    type variables.+--+-- 4. The data type cannot have a context (e.g., @data Foo a = Eq a => MkFoo@).+--+-- 5. The data type cannot have fields with higher-rank types.+cond_stdOK+  :: DerivContext -- ^ 'SupplyContext' if this is standalone deriving with a+                  -- user-supplied context, 'InferContext' if not.+                  -- If it is the former, we relax some of the validity checks+                  -- we would otherwise perform (i.e., "just go for it").++  -> Bool         -- ^ 'True' <=> allow higher rank arguments and empty data+                  -- types (with no data constructors) even in the absence of+                  -- the -XEmptyDataDeriving extension.++  -> Condition+cond_stdOK deriv_ctxt permissive dflags tc rep_tc+  = valid_ADT `andValid` valid_misc+  where+    valid_ADT, valid_misc :: Validity+    valid_ADT+      | isAlgTyCon tc || isDataFamilyTyCon tc+      = IsValid+      | otherwise+        -- Complain about functions, primitive types, and other tycons that+        -- stock deriving can't handle.+      = NotValid $ text "The last argument of the instance must be a"+               <+> text "data or newtype application"++    valid_misc+      = case deriv_ctxt of+         SupplyContext _ -> IsValid+                -- Don't check these conservative conditions for                 -- standalone deriving; just generate the code                 -- and let the typechecker handle the result-cond_stdOK Nothing permissive dflags rep_tc-  | null data_cons-  , not permissive = checkFlag LangExt.EmptyDataDeriving dflags rep_tc-                     `orValid`-                     NotValid (no_cons_why rep_tc $$ empty_data_suggestion)-  | not (null con_whys) = NotValid (vcat con_whys $$ standalone_suggestion)-  | otherwise           = IsValid-  where+         InferContext wildcard+           | null data_cons -- 1.+           , not permissive+           -> checkFlag LangExt.EmptyDataDeriving dflags tc rep_tc `orValid`+              NotValid (no_cons_why rep_tc $$ empty_data_suggestion)+           | not (null con_whys)+           -> NotValid (vcat con_whys $$ possible_fix_suggestion wildcard)+           | otherwise+           -> IsValid+     empty_data_suggestion =       text "Use EmptyDataDeriving to enable deriving for empty data types"-    standalone_suggestion =-      text "Possible fix: use a standalone deriving declaration instead"+    possible_fix_suggestion wildcard+      = case wildcard of+          Just _ ->+            text "Possible fix: fill in the wildcard constraint yourself"+          Nothing ->+            text "Possible fix: use a standalone deriving declaration instead"     data_cons  = tyConDataCons rep_tc     con_whys   = getInvalids (map check_con data_cons)      check_con :: DataCon -> Validity     check_con con-      | not (null eq_spec)+      | not (null eq_spec) -- 2.       = bad "is a GADT"-      | not (null ex_tvs)+      | not (null ex_tvs) -- 3.       = bad "has existential type variables in its type"-      | not (null theta)+      | not (null theta) -- 4.       = bad "has constraints in its type"-      | not (permissive || all isTauTy (dataConOrigArgTys con))+      | not (permissive || all isTauTy (dataConOrigArgTys con)) -- 5.       = bad "has a higher-rank type"       | otherwise       = IsValid@@ -594,10 +728,10 @@                      text "must have at least one data constructor"  cond_RepresentableOk :: Condition-cond_RepresentableOk _ tc = canDoGenerics tc+cond_RepresentableOk _ _ rep_tc = canDoGenerics rep_tc  cond_Representable1Ok :: Condition-cond_Representable1Ok _ tc = canDoGenerics1 tc+cond_Representable1Ok _ _ rep_tc = canDoGenerics1 rep_tc  cond_enumOrProduct :: Class -> Condition cond_enumOrProduct cls = cond_isEnumeration `orCond`@@ -606,13 +740,13 @@ 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.-cond_args cls _ tc+cond_args cls _ _ rep_tc   = case bad_args of       []     -> IsValid       (ty:_) -> NotValid (hang (text "Don't know how to derive" <+> quotes (ppr cls))                              2 (text "for type" <+> quotes (ppr ty)))   where-    bad_args = [ arg_ty | con <- tyConDataCons tc+    bad_args = [ arg_ty | con <- tyConDataCons rep_tc                         , arg_ty <- dataConOrigArgTys con                         , isUnliftedType arg_ty                         , not (ok_ty arg_ty) ]@@ -630,7 +764,7 @@   cond_isEnumeration :: Condition-cond_isEnumeration _ rep_tc+cond_isEnumeration _ _ rep_tc   | isEnumerationTyCon rep_tc = IsValid   | otherwise                 = NotValid why   where@@ -640,7 +774,7 @@                   -- See Note [Enumeration types] in TyCon  cond_isProduct :: Condition-cond_isProduct _ rep_tc+cond_isProduct _ _ rep_tc   | isProductTyCon rep_tc = IsValid   | otherwise             = NotValid why   where@@ -654,7 +788,7 @@ --            (c) don't use argument in the wrong place, e.g. data T a = T (X a a) --            (d) optionally: don't use function types --            (e) no "stupid context" on data type-cond_functorOK allowFunctions allowExQuantifiedLastTyVar _ rep_tc+cond_functorOK allowFunctions allowExQuantifiedLastTyVar _ _ rep_tc   | null tc_tvs   = NotValid (text "Data type" <+> quotes (ppr rep_tc)               <+> text "must have some type parameters")@@ -703,7 +837,7 @@     wrong_arg   = text "must use the type variable only as the last argument of a data type"  checkFlag :: LangExt.Extension -> Condition-checkFlag flag dflags _+checkFlag flag dflags _ _   | xopt flag dflags = IsValid   | otherwise        = NotValid why   where
typecheck/TcEnv.hs view
@@ -18,16 +18,16 @@         tcExtendGlobalEnv, tcExtendTyConEnv,         tcExtendGlobalEnvImplicit, setGlobalTypeEnv,         tcExtendGlobalValEnv,-        tcLookupLocatedGlobal, tcLookupGlobal,+        tcLookupLocatedGlobal, tcLookupGlobal, tcLookupGlobalOnly,         tcLookupTyCon, tcLookupClass,         tcLookupDataCon, tcLookupPatSyn, tcLookupConLike,         tcLookupLocatedGlobalId, tcLookupLocatedTyCon,         tcLookupLocatedClass, tcLookupAxiom,-        lookupGlobal,+        lookupGlobal, ioLookupDataCon,          -- Local environment         tcExtendKindEnv, tcExtendKindEnvList,-        tcExtendTyVarEnv, tcExtendTyVarEnv2,+        tcExtendTyVarEnv, tcExtendNameTyVarEnv,         tcExtendLetEnv, tcExtendSigIds, tcExtendRecIds,         tcExtendIdEnv, tcExtendIdEnv1, tcExtendIdEnv2,         tcExtendBinderStack, tcExtendLocalTypeEnv,@@ -106,13 +106,14 @@ import Encoding import FastString import ListSetOps+import ErrUtils import Util import Maybes( MaybeErr(..), orElse ) import qualified GHC.LanguageExtensions as LangExt  import Data.IORef import Data.List-+import Control.Monad  {- ********************************************************************* *                                                                      *@@ -121,15 +122,70 @@ ********************************************************************* -}  lookupGlobal :: HscEnv -> Name -> IO TyThing--- An IO version, used outside the typechecker--- It's more complicated than it looks, because it may--- need to suck in an interface file+-- A variant of lookupGlobal_maybe for the clients which are not+-- interested in recovering from lookup failure and accept panic. lookupGlobal hsc_env name-  = initTcForLookup hsc_env (tcLookupGlobal name)-    -- This initTcForLookup stuff is massive overkill-    -- but that's how it is right now, and at least-    -- this function localises it+  = do  {+          mb_thing <- lookupGlobal_maybe hsc_env name+        ; case mb_thing of+            Succeeded thing -> return thing+            Failed msg      -> pprPanic "lookupGlobal" msg+        } +lookupGlobal_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)+-- This may look up an Id that one one has previously looked up.+-- If so, we are going to read its interface file, and add its bindings+-- to the ExternalPackageTable.+lookupGlobal_maybe hsc_env name+  = do  {    -- Try local envt+          let mod = icInteractiveModule (hsc_IC hsc_env)+              dflags = hsc_dflags hsc_env+              tcg_semantic_mod = canonicalizeModuleIfHome dflags mod++        ; if nameIsLocalOrFrom tcg_semantic_mod name+              then (return+                (Failed (text "Can't find local name: " <+> ppr name)))+                  -- Internal names can happen in GHCi+              else+           -- Try home package table and external package table+          lookupImported_maybe hsc_env name+        }++lookupImported_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)+-- Returns (Failed err) if we can't find the interface file for the thing+lookupImported_maybe hsc_env name+  = do  { mb_thing <- lookupTypeHscEnv hsc_env name+        ; case mb_thing of+            Just thing -> return (Succeeded thing)+            Nothing    -> importDecl_maybe hsc_env name+            }++importDecl_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc TyThing)+importDecl_maybe hsc_env name+  | Just thing <- wiredInNameTyThing_maybe name+  = do  { when (needWiredInHomeIface thing)+               (initIfaceLoad hsc_env (loadWiredInHomeIface name))+                -- See Note [Loading instances for wired-in things]+        ; return (Succeeded thing) }+  | otherwise+  = initIfaceLoad hsc_env (importDecl name)++ioLookupDataCon :: HscEnv -> Name -> IO DataCon+ioLookupDataCon hsc_env name = do+  mb_thing <- ioLookupDataCon_maybe hsc_env name+  case mb_thing of+    Succeeded thing -> return thing+    Failed msg      -> pprPanic "lookupDataConIO" msg++ioLookupDataCon_maybe :: HscEnv -> Name -> IO (MaybeErr MsgDoc DataCon)+ioLookupDataCon_maybe hsc_env name = do+    thing <- lookupGlobal hsc_env name+    return $ case thing of+        AConLike (RealDataCon con) -> Succeeded con+        _                          -> Failed $+          pprTcTyThingCategory (AGlobal thing) <+> quotes (ppr name) <+>+                text "used as a data constructor"+ {- ************************************************************************ *                                                                      *@@ -173,6 +229,15 @@             Failed msg      -> failWithTc msg         }}} +-- Look up only in this module's global env't. Don't look in imports, etc.+-- Panic if it's not there.+tcLookupGlobalOnly :: Name -> TcM TyThing+tcLookupGlobalOnly name+  = do { env <- getGblEnv+       ; return $ case lookupNameEnv (tcg_type_env env) name of+                    Just thing -> thing+                    Nothing    -> pprPanic "tcLookupGlobalOnly" (ppr name) }+ tcLookupDataCon :: Name -> TcM DataCon tcLookupDataCon name = do     thing <- tcLookupGlobal name@@ -274,7 +339,7 @@  tcExtendGlobalEnvImplicit :: [TyThing] -> TcM r -> TcM r   -- Just extend the global environment with some TyThings-  -- Do not extend tcg_tcs etc+  -- Do not extend tcg_tcs, tcg_patsyns etc tcExtendGlobalEnvImplicit things thing_inside    = do { tcg_env <- getGblEnv         ; let ge'  = extendTypeEnvList (tcg_type_env tcg_env) things@@ -386,7 +451,7 @@ --      ATcTyCon or APromotionErr -- No need to update the global tyvars, or tcl_th_bndrs, or tcl_rdr tcExtendKindEnvList things thing_inside-  = do { traceTc "txExtendKindEnvList" (ppr things)+  = do { traceTc "tcExtendKindEnvList" (ppr things)        ; updLclEnv upd_env thing_inside }   where     upd_env env = env { tcl_env = extendNameEnvList (tcl_env env) things }@@ -394,19 +459,27 @@ tcExtendKindEnv :: NameEnv TcTyThing -> TcM r -> TcM r -- A variant of tcExtendKindEvnList tcExtendKindEnv extra_env thing_inside-  = do { traceTc "txExtendKindEnv" (ppr extra_env)+  = do { traceTc "tcExtendKindEnv" (ppr extra_env)        ; updLclEnv upd_env thing_inside }   where     upd_env env = env { tcl_env = tcl_env env `plusNameEnv` extra_env }  ----------------------- -- Scoped type and kind variables+-- Before using this function, consider using TcHsType.scopeTyVars, which+-- bumps the TcLevel and thus prevents any of these TyVars from appearing+-- in kinds of tyvars in an outer scope.+-- Indeed, you should always use scopeTyVars unless some other code nearby+-- bumps the TcLevel. tcExtendTyVarEnv :: [TyVar] -> TcM r -> TcM r tcExtendTyVarEnv tvs thing_inside-  = tcExtendTyVarEnv2 [(tyVarName tv, tv) | tv <- tvs] thing_inside+  = tcExtendNameTyVarEnv (mkTyVarNamePairs tvs) thing_inside -tcExtendTyVarEnv2 :: [(Name,TcTyVar)] -> TcM r -> TcM r-tcExtendTyVarEnv2 binds thing_inside+-- Before using this function, consider using TcHsType.scopeTyVars2, which+-- bumps the TcLevel and thus prevents any of these TyVars from appearing+-- in kinds of tyvars in an outer scope.+tcExtendNameTyVarEnv :: [(Name,TcTyVar)] -> TcM r -> TcM r+tcExtendNameTyVarEnv binds thing_inside   -- this should be used only for explicitly mentioned scoped variables.   -- thus, no coercion variables   = do { tc_extend_local_env NotTopLevel@@ -469,7 +542,7 @@  tcExtendIdEnv :: [TcId] -> TcM a -> TcM a -- For lambda-bound and case-bound Ids--- Extends the the TcBinderStack as well+-- Extends the TcBinderStack as well tcExtendIdEnv ids thing_inside   = tcExtendIdEnv2 [(idName id, id) | id <- ids] thing_inside @@ -633,11 +706,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_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"   tcAddPatSynPlaceholders :: [PatSynBind GhcRn GhcRn] -> TcM a -> TcM a@@ -655,8 +735,8 @@     get_type_sig :: LSig GhcRn -> NameSet -> NameSet     get_type_sig sig ns =       case sig of-        L _ (TypeSig names _) -> extendNameSetList ns (map unLoc names)-        L _ (PatSynSig names _) -> extendNameSetList ns (map unLoc names)+        L _ (TypeSig _ names _) -> extendNameSetList ns (map unLoc names)+        L _ (PatSynSig _ names _) -> extendNameSetList ns (map unLoc names)         _ -> ns  @@ -890,10 +970,12 @@            --          Used only to improve error messages       } -instance (SourceTextX a, OutputableBndrId a) => Outputable (InstInfo a) where+instance (OutputableBndrId (GhcPass a))+       => Outputable (InstInfo (GhcPass a)) where     ppr = pprInstInfoDetails -pprInstInfoDetails :: (SourceTextX a, OutputableBndrId a) => InstInfo a -> SDoc+pprInstInfoDetails :: (OutputableBndrId (GhcPass a))+                   => InstInfo (GhcPass a) -> SDoc pprInstInfoDetails info    = hang (pprInstanceHdr (iSpec info) <+> text "where")         2 (details (iBinds info))
typecheck/TcErrors.hs view
@@ -20,7 +20,6 @@ import RnUnbound ( unknownNameSuggestions ) import Type import TyCoRep-import Kind import Unify            ( tcMatchTys ) import Module import FamInst@@ -31,13 +30,13 @@ import Class import DataCon import TcEvidence+import TcEvTerm import HsExpr  ( UnboundVar(..) ) import HsBinds ( PatSynBind(..) ) import Name import RdrName ( lookupGlobalRdrEnv, lookupGRE_Name, GlobalRdrEnv-               , mkRdrUnqual, isLocalGRE, greSrcSpan, pprNameProvenance-               , GlobalRdrElt (..), globalRdrEnvElts )-import PrelNames ( typeableClassName, hasKey, liftedRepDataConKey )+               , mkRdrUnqual, isLocalGRE, greSrcSpan )+import PrelNames ( typeableClassName, hasKey, liftedRepDataConKey, tYPETyConKey ) import Id import Var import VarSet@@ -48,8 +47,6 @@ import BasicTypes import ConLike          ( ConLike(..)) import Util-import TcEnv (tcLookup)-import {-# SOURCE #-} TcSimplify ( tcCheckHoleFit ) import FastString import Outputable import SrcLoc@@ -58,13 +55,15 @@ import Maybes import Pair import qualified GHC.LanguageExtensions as LangExt-import FV ( fvVarList, fvVarSet, unionFV )+import FV ( fvVarList, unionFV )  import Control.Monad    ( when ) import Data.Foldable    ( toList )-import Data.List        ( partition, mapAccumL, nub, sortBy, unfoldr, foldl')+import Data.List        ( partition, mapAccumL, nub, sortBy, unfoldr ) import qualified Data.Set as Set +import {-# SOURCE #-} TcHoleErrors ( findValidHoleFits )+ import Data.Semigroup   ( Semigroup ) import qualified Data.Semigroup as Semigroup @@ -126,7 +125,7 @@        ; defer_errors <- goptM Opt_DeferTypeErrors        ; warn_errors <- woptM Opt_WarnDeferredTypeErrors -- implement #10283        ; let type_errors | not defer_errors = TypeError-                         | warn_errors      = TypeWarn+                         | warn_errors      = TypeWarn (Reason Opt_WarnDeferredTypeErrors)                          | otherwise        = TypeDefer         ; defer_holes <- goptM Opt_DeferTypedHoles@@ -147,7 +146,7 @@                                 | warn_out_of_scope      = HoleWarn                                 | otherwise              = HoleDefer -       ; report_unsolved binds_var False type_errors expr_holes+       ; report_unsolved binds_var type_errors expr_holes           type_holes out_of_scope_holes wanted         ; ev_binds <- getTcEvBindsMap binds_var@@ -162,8 +161,8 @@ -- and for simplifyDefault. reportAllUnsolved :: WantedConstraints -> TcM () reportAllUnsolved wanted-  = do { ev_binds <- newTcEvBinds-       ; report_unsolved ev_binds False TypeError+  = do { ev_binds <- newNoTcEvBinds+       ; report_unsolved ev_binds TypeError                          HoleError HoleError HoleError wanted }  -- | Report all unsolved goals as warnings (but without deferring any errors to@@ -172,23 +171,27 @@ warnAllUnsolved :: WantedConstraints -> TcM () warnAllUnsolved wanted   = do { ev_binds <- newTcEvBinds-       ; report_unsolved ev_binds True TypeWarn+       ; report_unsolved ev_binds (TypeWarn NoReason)                          HoleWarn HoleWarn HoleWarn wanted }  -- | Report unsolved goals as errors or warnings. report_unsolved :: EvBindsVar        -- cec_binds-                -> Bool              -- Errors as warnings                 -> TypeErrorChoice   -- Deferred type errors                 -> HoleChoice        -- Expression holes                 -> HoleChoice        -- Type holes                 -> HoleChoice        -- Out of scope holes                 -> WantedConstraints -> TcM ()-report_unsolved mb_binds_var err_as_warn type_errors expr_holes+report_unsolved mb_binds_var type_errors expr_holes     type_holes out_of_scope_holes wanted   | isEmptyWC wanted   = return ()   | otherwise-  = do { traceTc "reportUnsolved (before zonking and tidying)" (ppr wanted)+  = do { traceTc "reportUnsolved warning/error settings:" $+           vcat [ text "type errors:" <+> ppr type_errors+                , text "expr holes:" <+> ppr expr_holes+                , text "type holes:" <+> ppr type_holes+                , text "scope holes:" <+> ppr out_of_scope_holes ]+       ; traceTc "reportUnsolved (before zonking and tidying)" (ppr wanted)         ; wanted <- zonkWC wanted   -- Zonk to reveal all information        ; env0 <- tcInitTidyEnv@@ -206,7 +209,6 @@        ; let err_ctxt = CEC { cec_encl  = []                             , cec_tidy  = tidy_env                             , cec_defer_type_errors = type_errors-                            , cec_errors_as_warns = err_as_warn                             , cec_expr_holes = expr_holes                             , cec_type_holes = type_holes                             , cec_out_of_scope_holes = out_of_scope_holes@@ -226,13 +228,13 @@ data Report   = Report { report_important :: [SDoc]            , report_relevant_bindings :: [SDoc]-           , report_valid_substitutions :: [SDoc]+           , report_valid_hole_fits :: [SDoc]            }  instance Outputable Report where   -- Debugging only   ppr (Report { report_important = imp               , report_relevant_bindings = rel-              , report_valid_substitutions = val })+              , report_valid_hole_fits = val })     = vcat [ text "important:" <+> vcat imp            , text "relevant:"  <+> vcat rel            , text "valid:"  <+> vcat val ]@@ -245,7 +247,7 @@ in question, but context and relevant bindings are always the same, which should simplify visual parsing. -The context is added when the the Report is passed off to 'mkErrorReport'.+The context is added when the Report is passed off to 'mkErrorReport'. Unfortunately, unlike the context, the relevant bindings are added in multiple places so they have to be in the Report. -}@@ -265,13 +267,17 @@ relevant_bindings :: SDoc -> Report relevant_bindings doc = mempty { report_relevant_bindings = [doc] } --- | Put a doc into the valid substitutions block.-valid_substitutions :: SDoc -> Report-valid_substitutions docs = mempty { report_valid_substitutions = [docs] }+-- | Put a doc into the valid hole fits block.+valid_hole_fits :: SDoc -> Report+valid_hole_fits docs = mempty { report_valid_hole_fits = [docs] }  data TypeErrorChoice   -- What to do for type errors found by the type checker   = TypeError     -- A type error aborts compilation with an error message-  | TypeWarn      -- A type error is deferred to runtime, plus a compile-time warning+  | TypeWarn WarnReason+                  -- A type error is deferred to runtime, plus a compile-time warning+                  -- The WarnReason should usually be (Reason Opt_WarnDeferredTypeErrors)+                  -- but it isn't for the Safe Haskell Overlapping Instances warnings+                  -- see warnAllUnsolved   | TypeDefer     -- A type error is deferred to runtime; no error or warning at compile time  data HoleChoice@@ -285,9 +291,9 @@   ppr HoleDefer = text "HoleDefer"  instance Outputable TypeErrorChoice  where-  ppr TypeError = text "TypeError"-  ppr TypeWarn  = text "TypeWarn"-  ppr TypeDefer = text "TypeDefer"+  ppr TypeError         = text "TypeError"+  ppr (TypeWarn reason) = text "TypeWarn" <+> ppr reason+  ppr TypeDefer         = text "TypeDefer"  data ReportErrCtxt     = CEC { cec_encl :: [Implication]  -- Enclosing implications@@ -299,10 +305,6 @@                                        -- into warnings, and emit evidence bindings                                        -- into 'cec_binds' for unsolved constraints -          , cec_errors_as_warns :: Bool   -- Turn all errors into warnings-                                          -- (except for Holes, which are-                                          -- controlled by cec_type_holes and-                                          -- cec_expr_holes)           , cec_defer_type_errors :: TypeErrorChoice -- Defer type errors until runtime            -- cec_expr_holes is a union of:@@ -323,7 +325,6 @@  instance Outputable ReportErrCtxt where   ppr (CEC { cec_binds              = bvar-           , cec_errors_as_warns    = ew            , cec_defer_type_errors  = dte            , cec_expr_holes         = eh            , cec_type_holes         = th@@ -332,7 +333,6 @@            , cec_suppress           = sup })     = text "CEC" <+> braces (vcat          [ text "cec_binds"              <+> equals <+> ppr bvar-         , text "cec_errors_as_warns"    <+> equals <+> ppr ew          , text "cec_defer_type_errors"  <+> equals <+> ppr dte          , text "cec_expr_holes"         <+> equals <+> ppr eh          , text "cec_type_holes"         <+> equals <+> ppr th@@ -340,9 +340,23 @@          , text "cec_warn_redundant"     <+> equals <+> ppr wr          , text "cec_suppress"           <+> equals <+> ppr sup ]) -{--Note [Suppressing error messages]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-- | Returns True <=> the ReportErrCtxt indicates that something is deferred+deferringAnyBindings :: ReportErrCtxt -> Bool+  -- Don't check cec_type_holes, as these don't cause bindings to be deferred+deferringAnyBindings (CEC { cec_defer_type_errors  = TypeError+                          , cec_expr_holes         = HoleError+                          , cec_out_of_scope_holes = HoleError }) = False+deferringAnyBindings _                                            = True++-- | Transforms a 'ReportErrCtxt' into one that does not defer any bindings+-- at all.+noDeferredBindings :: ReportErrCtxt -> ReportErrCtxt+noDeferredBindings ctxt = ctxt { cec_defer_type_errors  = TypeError+                               , cec_expr_holes         = HoleError+                               , cec_out_of_scope_holes = HoleError }++{- Note [Suppressing error messages]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The cec_suppress flag says "don't report any errors".  Instead, just create evidence bindings (as usual).  It's used when more important errors have occurred. @@ -352,13 +366,27 @@   * If there are any insolubles (eg Int~Bool), here or in a nested implication,     then suppress errors from the simple constraints here.  Sometimes the     simple-constraint errors are a knock-on effect of the insolubles.++This suppression behaviour is controlled by the Bool flag in+ReportErrorSpec, as used in reportWanteds.++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+tryReporter we use askNoErrs to see if any error messages were+/actually/ produced; if not, we don't switch on suppression.++A consequence is that warnings never suppress warnings, so turning an+error into a warning may allow subsequent warnings to appear that were+previously suppressed.   (e.g. partial-sigs/should_fail/T14584) -}  reportImplic :: ReportErrCtxt -> Implication -> TcM ()-reportImplic ctxt implic@(Implic { ic_skols = tvs, ic_given = given+reportImplic ctxt implic@(Implic { ic_skols = tvs, ic_telescope = m_telescope+                                 , ic_given = given                                  , ic_wanted = wanted, ic_binds = evb                                  , ic_status = status, ic_info = info-                                 , ic_env = tcl_env, ic_tclvl = tc_lvl })+                                 , ic_tclvl = tc_lvl })   | BracketSkol <- info   , not insoluble   = return ()        -- For Template Haskell brackets report only@@ -370,29 +398,44 @@   = do { traceTc "reportImplic" (ppr implic')        ; reportWanteds ctxt' tc_lvl wanted        ; when (cec_warn_redundant ctxt) $-         warnRedundantConstraints ctxt' tcl_env info' dead_givens }+         warnRedundantConstraints ctxt' tcl_env info' dead_givens+       ; when bad_telescope $ reportBadTelescope ctxt tcl_env m_telescope tvs }   where+    tcl_env      = implicLclEnv implic     insoluble    = isInsolubleStatus status     (env1, tvs') = mapAccumL tidyTyCoVarBndr (cec_tidy ctxt) tvs     info'        = tidySkolemInfo env1 info     implic' = implic { ic_skols = tvs'                      , ic_given = map (tidyEvVar env1) given                      , ic_info  = info' }-    ctxt' = ctxt { cec_tidy     = env1-                 , cec_encl     = implic' : cec_encl ctxt+    ctxt1 | NoEvBindsVar{} <- evb    = noDeferredBindings ctxt+          | otherwise                = ctxt+          -- If we go inside an implication that has no term+          -- evidence (e.g. unifying under a forall), we can't defer+          -- 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. -                 , cec_suppress = insoluble || cec_suppress ctxt-                      -- Suppress inessential errors if there-                      -- are are insolubles anywhere in the-                      -- tree rooted here, or we've come across-                      -- a suppress-worthy constraint higher up (Trac #11541)+    ctxt' = ctxt1 { cec_tidy     = env1+                  , cec_encl     = implic' : cec_encl ctxt -                 , cec_binds    = evb }+                  , cec_suppress = insoluble || cec_suppress ctxt+                        -- 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) +                  , cec_binds    = evb }+     dead_givens = case status of                     IC_Solved { ics_dead = dead } -> dead                     _                             -> [] +    bad_telescope = case status of+              IC_BadTelescope -> True+              _               -> False+ warnRedundantConstraints :: ReportErrCtxt -> TcLclEnv -> SkolemInfo -> [EvVar] -> TcM () -- See Note [Tracking redundant constraints] in TcSimplify warnRedundantConstraints ctxt env info ev_vars@@ -416,13 +459,32 @@    doc = text "Redundant constraint" <> plural redundant_evs <> colon          <+> pprEvVarTheta redundant_evs -   redundant_evs = case info of -- See Note [Redundant constraints in instance decls]-                     InstSkol -> filterOut improving ev_vars-                     _        -> ev_vars+   redundant_evs =+       filterOut is_type_error $+       case info of -- See Note [Redundant constraints in instance decls]+         InstSkol -> filterOut (improving . idType) ev_vars+         _        -> ev_vars -   improving ev_var = any isImprovementPred $-                      transSuperClasses (idType ev_var)+   -- See #15232+   is_type_error = isJust . userTypeError_maybe . idType +   improving pred -- (transSuperClasses p) does not include p+     = any isImprovementPred (pred : transSuperClasses pred)++reportBadTelescope :: ReportErrCtxt -> TcLclEnv -> Maybe SDoc -> [TcTyVar] -> TcM ()+reportBadTelescope ctxt env (Just telescope) skols+  = do { msg <- mkErrorReport ctxt env (important doc)+       ; reportError msg }+  where+    doc = hang (text "These kind and type variables:" <+> telescope $$+                text "are out of dependency order. Perhaps try this ordering:")+             2 (pprTyVars sorted_tvs)++    sorted_tvs = toposortTyVars skols++reportBadTelescope _ _ Nothing skols+  = pprPanic "reportBadTelescope" (ppr skols)+ {- Note [Redundant constraints in instance decls] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For instance declarations, we don't report unused givens if@@ -479,14 +541,15 @@     -- (see TcRnTypes.insolubleWantedCt) is caught here, otherwise     -- we might suppress its error message, and proceed on past     -- type checking to get a Lint error later-    report1 = [ ("custom_error", is_user_type_error,True, mkUserTypeErrorReporter)+    report1 = [ ("Out of scope", is_out_of_scope,    True,  mkHoleReporter tidy_cts)+              , ("Holes",        is_hole,            False, mkHoleReporter tidy_cts)+              , ("custom_error", is_user_type_error, True,  mkUserTypeErrorReporter)+               , given_eq_spec               , ("insoluble2",   utterly_wrong,  True, mkGroupReporter mkEqErr)               , ("skolem eq1",   very_wrong,     True, mkSkolReporter)               , ("skolem eq2",   skolem_eq,      True, mkSkolReporter)               , ("non-tv eq",    non_tv_eq,      True, mkSkolReporter)-              , ("Out of scope", is_out_of_scope,True, mkHoleReporter tidy_cts)-              , ("Holes",        is_hole,        False, mkHoleReporter tidy_cts)                    -- The only remaining equalities are alpha ~ ty,                   -- where alpha is untouchable; and representational equalities@@ -559,6 +622,9 @@     find_gadt_match (implic : implics)       | PatSkol {} <- ic_info implic       , not (ic_no_eqs implic)+      , wopt Opt_WarnInaccessibleCode (implicDynFlags implic)+          -- Don't bother doing this if -Winaccessible-code isn't enabled.+          -- See Note [Avoid -Winaccessible-code when deriving] in TcInstDcls.       = Just implic       | otherwise       = find_gadt_match implics@@ -635,7 +701,7 @@ mkGivenErrorReporter implic ctxt cts   = do { (ctxt, binds_msg, ct) <- relevantBindings True ctxt ct        ; dflags <- getDynFlags-       ; let ct' = setCtLoc ct (setCtLocEnv (ctLoc ct) (ic_env implic))+       ; let ct' = setCtLoc ct (setCtLocEnv (ctLoc ct) (implicLclEnv implic))                    -- For given constraints we overwrite the env (and hence src-loc)                   -- with one from the implication.  See Note [Inaccessible code] @@ -648,7 +714,7 @@                              Nothing ty1 ty2         ; traceTc "mkGivenErrorReporter" (ppr ct)-       ; maybeReportError ctxt err }+       ; reportWarning (Reason Opt_WarnInaccessibleCode) err }   where     (ct : _ )  = cts    -- Never empty     (ty1, ty2) = getEqPredTys (ctPred ct)@@ -724,6 +790,10 @@                ; reportWarning (Reason Opt_WarnMissingMonadFailInstances) err }          (_, cts') -> do { err <- mk_err ctxt cts'+                        ; traceTc "About to maybeReportErr" $+                          vcat [ text "Constraint:"             <+> ppr cts'+                               , text "cec_suppress ="          <+> ppr (cec_suppress ctxt)+                               , text "cec_defer_type_errors =" <+> ppr (cec_defer_type_errors ctxt) ]                         ; maybeReportError ctxt err                             -- But see Note [Always warn with -fdefer-type-errors]                         ; traceTc "reportGroup" (ppr cts')@@ -739,6 +809,8 @@             _otherwise           -> False  maybeReportHoleError :: ReportErrCtxt -> Ct -> ErrMsg -> TcM ()+-- Unlike maybeReportError, these "hole" errors are+-- /not/ suppressed by cec_suppress.  We want to see them! maybeReportHoleError ctxt ct err   -- When -XPartialTypeSignatures is on, warnings (instead of errors) are   -- generated for holes in partial type signatures.@@ -779,25 +851,23 @@   | cec_suppress ctxt    -- Some worse error has occurred;   = return ()            -- so suppress this error/warning -  | cec_errors_as_warns ctxt-  = reportWarning NoReason err-   | otherwise   = case cec_defer_type_errors ctxt of-      TypeDefer -> return ()-      TypeWarn  -> reportWarning (Reason Opt_WarnDeferredTypeErrors) err-      TypeError -> reportError err+      TypeDefer       -> return ()+      TypeWarn reason -> reportWarning reason err+      TypeError       -> reportError err  addDeferredBinding :: ReportErrCtxt -> ErrMsg -> Ct -> TcM () -- See Note [Deferring coercion errors to runtime] addDeferredBinding ctxt err ct-  | CtWanted { ctev_pred = pred, ctev_dest = dest } <- ctEvidence ct+  | deferringAnyBindings ctxt+  , CtWanted { ctev_pred = pred, ctev_dest = dest } <- ctEvidence ct     -- Only add deferred bindings for Wanted constraints   = do { dflags <- getDynFlags        ; let err_msg = pprLocErrMsg err              err_fs  = mkFastString $ showSDoc dflags $                        err_msg $$ text "(deferred type error)"-             err_tm  = EvDelayedError pred err_fs+             err_tm  = evDelayedError pred err_fs              ev_binds_var = cec_binds ctxt         ; case dest of@@ -843,12 +913,16 @@  tryReporter :: ReportErrCtxt -> ReporterSpec -> [Ct] -> TcM (ReportErrCtxt, [Ct]) tryReporter ctxt (str, keep_me,  suppress_after, reporter) cts-  | null yeses = return (ctxt, cts)-  | otherwise  = do { traceTc "tryReporter{ " (text str <+> ppr yeses)-                    ; reporter ctxt yeses-                    ; let ctxt' = ctxt { cec_suppress = suppress_after || cec_suppress ctxt }-                    ; traceTc "tryReporter end }" (text str <+> ppr (cec_suppress ctxt) <+> ppr suppress_after)-                    ; return (ctxt', nos) }+  | null yeses+  = return (ctxt, cts)+  | otherwise+  = do { traceTc "tryReporter{ " (text str <+> ppr yeses)+       ; (_, no_errs) <- askNoErrs (reporter ctxt yeses)+       ; let suppress_now = not no_errs && suppress_after+                            -- See Note [Suppressing error messages]+             ctxt' = ctxt { cec_suppress = suppress_now || cec_suppress ctxt }+       ; traceTc "tryReporter end }" (text str <+> ppr (cec_suppress ctxt) <+> ppr suppress_after)+       ; return (ctxt', nos) }   where     (yeses, nos) = partition (\ct -> keep_me ct (classifyPredType (ctPred ct))) cts @@ -905,9 +979,8 @@ getUserGivensFromImplics implics   = reverse (filterOut (null . ic_given) implics) -{--Note [Always warn with -fdefer-type-errors]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{- Note [Always warn with -fdefer-type-errors]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When -fdefer-type-errors is on we warn about *all* type errors, even if cec_suppress is on.  This can lead to a lot more warnings than you would get errors without -fdefer-type-errors, but if we suppress any of@@ -1075,11 +1148,14 @@                   = givenConstraintsMsg ctxt                | otherwise = empty -       ; sub_msg <- validSubstitutions tidy_simples ctxt ct+       ; show_valid_hole_fits <- goptM Opt_ShowValidHoleFits+       ; (ctxt, sub_msg) <- if show_valid_hole_fits+                            then validHoleFits ctxt tidy_simples ct+                            else return (ctxt, empty)        ; mkErrorMsgFromCt ctxt ct $             important hole_msg `mappend`             relevant_bindings (binds_msg $$ constraints_msg) `mappend`-            valid_substitutions sub_msg}+            valid_hole_fits sub_msg}    where     occ       = holeOcc hole@@ -1098,8 +1174,12 @@                           , tyvars_msg, type_hole_hint ]      pp_hole_type_with_kind-      | isLiftedTypeKind hole_kind = pprType hole_ty-      | otherwise                  = pprType hole_ty <+> dcolon <+> pprKind hole_kind+      | isLiftedTypeKind hole_kind+        || isCoercionType hole_ty -- Don't print the kind of unlifted+                                  -- equalities (#15039)+      = pprType hole_ty+      | otherwise+      = pprType hole_ty <+> dcolon <+> pprKind hole_kind      tyvars_msg = ppUnless (null tyvars) $                  text "Where:" <+> (vcat (map loc_msg other_tvs)@@ -1136,149 +1216,29 @@  mkHoleError _ _ ct = pprPanic "mkHoleError" (ppr ct) ---- See Note [Valid substitutions include ...]-validSubstitutions :: [Ct] -> ReportErrCtxt -> Ct -> TcM SDoc-validSubstitutions simples (CEC {cec_encl = implics}) ct | isExprHoleCt ct =-  do { rdr_env <- getGlobalRdrEnv-     ; dflags <- getDynFlags-     ; traceTc "findingValidSubstitutionsFor {" $ ppr wrapped_hole_ty-     ; (discards, substitutions) <--        setTcLevel hole_lvl $-         go (maxValidSubstitutions dflags) $-          localsFirst $ globalRdrEnvElts rdr_env-     ; traceTc "}" empty-     ; return $ ppUnless (null substitutions) $-                 hang (text "Valid substitutions include")-                  2 (vcat (map ppr_sub substitutions)-                    $$ ppWhen discards subsDiscardMsg) }-  where-    -- We extract the type of the hole from the constraint.-    hole_ty :: TcPredType-    hole_ty = ctPred ct-    hole_loc = ctEvLoc $ ctEvidence ct-    hole_lvl = ctLocLevel $ hole_loc-    hole_fvs = tyCoFVsOfType hole_ty--    -- For checking, we wrap the type of the hole with all the givens-    -- from all the implications in the context.-    wrapped_hole_ty :: TcSigmaType-    wrapped_hole_ty = foldl' wrapTypeWithImplication hole_ty implics--    -- We rearrange the elements to make locals appear at the top of the list,-    -- since they're most likely to be relevant to the user-    localsFirst :: [GlobalRdrElt] -> [GlobalRdrElt]-    localsFirst elts = lcl ++ gbl-      where (lcl, gbl) = partition gre_lcl elts--    -- For pretty printing, we look up the name and type of the substitution-    -- we found.-    ppr_sub :: (GlobalRdrElt, Id) -> SDoc-    ppr_sub (elt, id) = sep [ idAndTy , nest 2 (parens $ pprNameProvenance elt)]-      where name = gre_name elt-            ty = varType id-            idAndTy = (pprPrefixOcc name <+> dcolon <+> pprType ty)--    -- These are the constraints whose every free unification variable is-    -- mentioned in the type of the hole.-    relevantCts :: [Ct]-    relevantCts = if isEmptyVarSet hole_fv then []-                  else filter isRelevant simples-      where hole_fv :: VarSet-            hole_fv = fvVarSet hole_fvs-            ctFreeVarSet :: Ct -> VarSet-            ctFreeVarSet = fvVarSet . tyCoFVsOfType . ctPred-            allFVMentioned :: Ct -> Bool-            allFVMentioned ct = ctFreeVarSet ct `subVarSet` hole_fv-            -- We filter out those constraints that have no variables (since-            -- they won't be solved by finding a type for the type variable-            -- representing the hole) and also other holes, since we're not-            -- trying to find substitutions for many holes at once.-            isRelevant ct = not (isEmptyVarSet (ctFreeVarSet ct))-                            && allFVMentioned ct-                            && not (isHoleCt ct)---    -- This creates a substitution with new fresh type variables for all the-    -- free variables mentioned in the type of hole and in the relevant-    -- constraints. Note that since we only pick constraints such that all their-    -- free variables are mentioned by the hole, the free variables of the hole-    -- are all the free variables of the constraints as well.-    getHoleCloningSubst :: TcM TCvSubst-    getHoleCloningSubst = mkTvSubstPrs <$> getClonedVars-      where cloneFV :: TyVar -> TcM (TyVar, Type)-            cloneFV fv = ((,) fv) <$> newFlexiTyVarTy (varType fv)-            getClonedVars :: TcM [(TyVar, Type)]-            getClonedVars = mapM cloneFV (fvVarList hole_fvs)--    -- This applies the given substitution to the given constraint.-    applySubToCt :: TCvSubst -> Ct -> Ct-    applySubToCt sub ct = ct {cc_ev = ev {ctev_pred = subbedPredType} }-      where subbedPredType = substTy sub $ ctPred ct-            ev = ctEvidence ct--    -- The real work happens here, where we invoke the type checker-    -- to check whether we the given type fits into the hole!-    -- To check: Clone all relevant cts and the hole-    -- then solve the subsumption check AND check that all other-    -- the other constraints were solved.-    fitsHole :: Type -> TcM Bool-    fitsHole typ =-      do { traceTc "checkingFitOf {" $ ppr typ-         ; cloneSub <- getHoleCloningSubst-         ; let cHoleTy = substTy cloneSub wrapped_hole_ty-               cCts = map (applySubToCt cloneSub) relevantCts-         ; fits <- tcCheckHoleFit (listToBag cCts) cHoleTy typ-         ; traceTc "}" empty-         ; return fits}--    -- Kickoff the checking of the elements. The first argument-    -- is a counter, so that we stop after finding functions up to-    -- the limit the user gives us.-    go :: Maybe Int -> [GlobalRdrElt] -> TcM (Bool, [(GlobalRdrElt, Id)])-    go = go_ []--    -- We iterate over the elements, checking each one in turn. If-    -- we've already found -fmax-valid-substitutions=n elements, we-    -- look no further.-    go_ :: [(GlobalRdrElt,Id)] -- What we've found so far.-        -> Maybe Int           -- How many we're allowed to find, if limited.-        -> [GlobalRdrElt]      -- The elements we've yet to check.-        -> TcM (Bool, [(GlobalRdrElt, Id)])-    go_ subs _ [] = return (False, reverse subs)-    go_ subs (Just 0) _ = return (True, reverse subs)-    go_ subs maxleft (el:elts) =-      do { traceTc "lookingUp" $ ppr el-         ; maybeThing <- lookup (gre_name el)-         ; case maybeThing of-             Just id -> do { fits <- fitsHole (varType id)-                           ; if fits then (keep_it id) else discard_it }-             _ -> discard_it-         }-      where discard_it = go_ subs maxleft elts-            keep_it id = go_ ((el,id):subs) ((\n -> n - 1) <$> maxleft) elts-            lookup name =-              do { thing <- tcLookup name-                 ; case thing of-                     ATcId {tct_id = id}         -> return $ Just id-                     AGlobal (AnId id)           -> return $ Just id-                     AGlobal (AConLike (RealDataCon con))  ->-                       return $ Just (dataConWrapId con)-                     _ -> return Nothing }----- We don't (as of yet) handle holes in types, only in expressions.-validSubstitutions _ _ _ = return empty-+-- We unwrap the ReportErrCtxt here, to avoid introducing a loop in module+-- imports+validHoleFits :: ReportErrCtxt -- The context we're in, i.e. the+                                        -- implications and the tidy environment+                       -> [Ct]          -- Unsolved simple constraints+                       -> Ct            -- The hole constraint.+                       -> TcM (ReportErrCtxt, SDoc) -- We return the new context+                                                    -- with a possibly updated+                                                    -- tidy environment, and+                                                    -- the message.+validHoleFits ctxt@(CEC {cec_encl = implics+                             , cec_tidy = lcl_env}) simps ct+  = do { (tidy_env, msg) <- findValidHoleFits lcl_env implics simps ct+       ; return (ctxt {cec_tidy = tidy_env}, msg) }  -- See Note [Constraints include ...] givenConstraintsMsg :: ReportErrCtxt -> SDoc givenConstraintsMsg ctxt =     let constraints :: [(Type, RealSrcSpan)]         constraints =-          do { Implic{ ic_given = given, ic_env = env } <- cec_encl ctxt+          do { implic@Implic{ ic_given = given } <- cec_encl ctxt              ; constraint <- given-             ; return (varType constraint, tcl_loc env) }+             ; return (varType constraint, tcl_loc (implicLclEnv implic)) }          pprConstraint (constraint, loc) =           ppr constraint <+> nest 2 (parens (text "from" <+> ppr loc))@@ -1310,75 +1270,7 @@     (ct1:_) = cts  {--Note [Valid substitutions include ...]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-`validSubstitutions` returns the "Valid substitutions include ..." message.-For example, look at the following definitions in a file called test.hs: -   import Data.List (inits)--   f :: [String]-   f = _ "hello, world"--The hole in `f` would generate the message:--  • Found hole: _ :: [Char] -> [String]-  • In the expression: _-    In the expression: _ "hello, world"-    In an equation for ‘f’: f = _ "hello, world"-  • Relevant bindings include f :: [String] (bound at test.hs:6:1)-    Valid substitutions include-      inits :: forall a. [a] -> [[a]]-        (imported from ‘Data.List’ at test.hs:3:19-23-         (and originally defined in ‘base-4.11.0.0:Data.OldList’))-      return :: forall (m :: * -> *). Monad m => forall a. a -> m a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Base’))-      fail :: forall (m :: * -> *). Monad m => forall a. String -> m a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Base’))-      mempty :: forall a. Monoid a => a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Base’))-      pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Base’))-      read :: forall a. Read a => String -> a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘Text.Read’))-      lines :: String -> [String]-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘base-4.11.0.0:Data.OldList’))-      words :: String -> [String]-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘base-4.11.0.0:Data.OldList’))-      error :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => [Char] -> a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Err’))-      errorWithoutStackTrace :: forall (a :: TYPE r). [Char] -> a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Err’))-      undefined :: forall (a :: TYPE r). GHC.Stack.Types.HasCallStack => a-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.Err’))-      repeat :: forall a. a -> [a]-        (imported from ‘Prelude’ at test.hs:1:8-11-         (and originally defined in ‘GHC.List’))--Valid substitutions are found by checking top level identifiers in scope for-whether their type is subsumed by the type of the hole. Additionally, as-highlighted by Trac #14273, we also need to check whether all relevant-constraints are solved by choosing an identifier of that type as well. This is-to make sure we don't suggest a substitution which does not fulfill the-constraints imposed on the hole (even though it has a type that would otherwise-fit the hole). The relevant constraints are those whose free unification-variables are all mentioned by the type of the hole. Since checking for-subsumption results in the side effect of type variables being unified by the-simplifier, we need to take care to clone the variables in the hole and relevant-constraints before checking whether an identifier fits into the hole, to avoid-affecting the hole and later checks.-- Note [Constraints include ...] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 'givenConstraintsMsg' returns the "Constraints include ..." message enabled by@@ -1790,7 +1682,7 @@    -- Check for skolem escape   | (implic:_) <- cec_encl ctxt   -- Get the innermost context-  , Implic { ic_env = env, ic_skols = skols, ic_info = skol_info } <- implic+  , Implic { ic_skols = skols, ic_info = skol_info } <- implic   , let esc_skols = filter (`elemVarSet` (tyCoVarsOfType ty2)) skols   , not (null esc_skols)   = do { let msg = important $ misMatchMsg ct oriented ty1 ty2@@ -1808,7 +1700,8 @@                                            what <+> text "variables are")                                <+> text "bound by"                              , nest 2 $ ppr skol_info-                             , nest 2 $ text "at" <+> ppr (tcl_loc env) ] ]+                             , nest 2 $ text "at" <+>+                               ppr (tcl_loc (implicLclEnv implic)) ] ]        ; mkErrorMsgFromCt ctxt ct (mconcat [msg, tv_extra, report]) }    -- Nastiest case: attempt to unify an untouchable variable@@ -1817,8 +1710,7 @@   -- meta tyvar or a SigTv, else it'd have been unified   -- See Note [Error messages for untouchables]   | (implic:_) <- cec_encl ctxt   -- Get the innermost context-  , Implic { ic_env = env, ic_given = given-           , ic_tclvl = lvl, ic_info = skol_info } <- implic+  , Implic { ic_given = given, ic_tclvl = lvl, ic_info = skol_info } <- implic   = ASSERT2( not (isTouchableMetaTyVar lvl tv1)            , ppr tv1 $$ ppr lvl )  -- See Note [Error messages for untouchables]     do { let msg = important $ misMatchMsg ct oriented ty1 ty2@@ -1827,7 +1719,8 @@                   sep [ quotes (ppr tv1) <+> text "is untouchable"                       , nest 2 $ text "inside the constraints:" <+> pprEvVarTheta given                       , nest 2 $ text "bound by" <+> ppr skol_info-                      , nest 2 $ text "at" <+> ppr (tcl_loc env) ]+                      , nest 2 $ text "at" <+>+                        ppr (tcl_loc (implicLclEnv implic)) ]              tv_extra = important $ extraTyVarEqInfo ctxt tv1 ty2              add_sig  = important $ suggestAddSig ctxt ty1 ty2        ; mkErrorMsgFromCt ctxt ct $ mconcat@@ -1916,7 +1809,8 @@     eq_pred = ctEvPred ev     orig    = ctEvOrigin ev     givens  = [ given | given <- getUserGivens ctxt, not (ic_no_eqs given)]-              -- Keep only UserGivens that have some equalities+              -- Keep only UserGivens that have some equalities.+              -- See Note [Suppress redundant givens during error reporting]  couldNotDeduce :: [UserGiven] -> (ThetaType, CtOrigin) -> SDoc couldNotDeduce givens (wanteds, orig)@@ -1930,12 +1824,50 @@          (g:gs) ->      ppr_given (text "from the context:") g                  : map (ppr_given (text "or from:")) gs     where-       ppr_given herald (Implic { ic_given = gs, ic_info = skol_info-                                , ic_env = env })-           = hang (herald <+> pprEvVarTheta gs)+       ppr_given herald implic@(Implic { ic_given = gs, ic_info = skol_info })+           = hang (herald <+> pprEvVarTheta (mkMinimalBySCs evVarPred gs))+             -- 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 env) ])+                       , text "at" <+> ppr (tcl_loc (implicLclEnv implic)) ]) +{-+Note [Suppress redundant givens during error reporting]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When GHC is unable to solve a constraint and prints out an error message, it+will print out what given constraints are in scope to provide some context to+the programmer. But we shouldn't print out /every/ given, since some of them+are not terribly helpful to diagnose type errors. Consider this example:++  foo :: Int :~: Int -> a :~: b -> a :~: c+  foo Refl Refl = Refl++When reporting that GHC can't solve (a ~ c), there are two givens in scope:+(Int ~ Int) and (a ~ b). But (Int ~ Int) is trivially soluble (i.e.,+redundant), so it's not terribly useful to report it in an error message.+To accomplish this, we discard any Implications that do not bind any+equalities by filtering the `givens` selected in `misMatchOrCND` (based on+the `ic_no_eqs` field of the Implication).++But this is not enough to avoid all redundant givens! Consider this example,+from #15361:++  goo :: forall (a :: Type) (b :: Type) (c :: Type).+         a :~~: b -> a :~~: c+  goo HRefl = HRefl++Matching on HRefl brings the /single/ given (* ~ *, a ~ b) into scope.+The (* ~ *) part arises due the kinds of (:~~:) being unified. More+importantly, (* ~ *) is redundant, so we'd like not to report it. However,+the Implication (* ~ *, a ~ b) /does/ bind an equality (as reported by its+ic_no_eqs field), so the test above will keep it wholesale.++To refine this given, we apply mkMinimalBySCs on it to extract just the (a ~ b)+part. This works because mkMinimalBySCs eliminates reflexive equalities in+addition to superclasses (see Note [Remove redundant provided dicts]+in TcPatSyn).+-}+ extraTyVarEqInfo :: ReportErrCtxt -> TcTyVar -> TcType -> SDoc -- Add on extra info about skolem constants -- NB: The types themselves are already tidied@@ -2040,8 +1972,7 @@   | KindLevel <- level, occurs_check_error       = (True, Nothing, empty)   | isUnliftedTypeKind act, isLiftedTypeKind exp = (False, Nothing, msg2)   | isLiftedTypeKind act, isUnliftedTypeKind exp = (False, Nothing, msg3)-  | isLiftedTypeKind exp && not (isConstraintKind exp)-                                                 = (False, Nothing, msg4)+  | tcIsLiftedTypeKind exp                       = (False, Nothing, msg4)   | Just msg <- num_args_msg                     = (False, Nothing, msg $$ msg1)   | KindLevel <- level, Just th <- maybe_thing   = (False, Nothing, msg5 th)   | act `pickyEqType` ty1, exp `pickyEqType` ty2 = (True, Just NotSwapped, empty)@@ -2090,13 +2021,22 @@                , maybe (text "found something with kind")                        (\thing -> quotes thing <+> text "has kind")                        maybe_thing-               , quotes (ppr act) ]+               , quotes (pprWithTYPE act) ]      msg5 th = hang (text "Expected" <+> kind_desc <> comma)                  2 (text "but" <+> quotes th <+> text "has kind" <+>                     quotes (ppr act))       where-        kind_desc | isConstraintKind exp = text "a constraint"+        kind_desc | tcIsConstraintKind exp = text "a constraint"++                    -- TYPE t0+                  | Just (tc, [arg]) <- tcSplitTyConApp_maybe exp+                  , tc `hasKey` tYPETyConKey+                  , tcIsTyVarTy arg      = sdocWithDynFlags $ \dflags ->+                                           if gopt Opt_PrintExplicitRuntimeReps dflags+                                           then text "kind" <+> quotes (ppr exp)+                                           else text "a type"+                   | otherwise            = text "kind" <+> quotes (ppr exp)      num_args_msg = case level of@@ -2555,13 +2495,18 @@                = empty      drv_fixes = case orig of-                   DerivOrigin      -> [drv_fix]-                   DerivOriginDC {} -> [drv_fix]-                   DerivOriginCoerce {} -> [drv_fix]+                   DerivClauseOrigin                  -> [drv_fix False]+                   StandAloneDerivOrigin              -> [drv_fix True]+                   DerivOriginDC _ _       standalone -> [drv_fix standalone]+                   DerivOriginCoerce _ _ _ standalone -> [drv_fix standalone]                    _                -> [] -    drv_fix = hang (text "use a standalone 'deriving instance' declaration,")-                 2 (text "so you can specify the instance context yourself")+    drv_fix standalone_wildcard+      | standalone_wildcard+      = text "fill in the wildcard constraint yourself"+      | otherwise+      = hang (text "use a standalone 'deriving instance' declaration,")+           2 (text "so you can specify the instance context yourself")      -- Normal overlap error     overlap_msg@@ -2598,12 +2543,13 @@      matching_givens = mapMaybe matchable useful_givens -    matchable (Implic { ic_given = evvars, ic_info = skol_info, ic_env = env })+    matchable implic@(Implic { ic_given = evvars, ic_info = skol_info })       = case ev_vars_matching of              [] -> Nothing              _  -> Just $ hang (pprTheta ev_vars_matching)                             2 (sep [ text "bound by" <+> ppr skol_info-                                   , text "at" <+> ppr (tcl_loc env) ])+                                   , 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')@@ -2987,7 +2933,7 @@        ; (tidy_env', docs, discards)               <- go dflags env1 ct_tvs (maxRelevantBinds dflags)                     emptyVarSet [] False-                    (remove_shadowing $ tcl_bndrs lcl_env)+                    (removeBindingShadowing $ tcl_bndrs lcl_env)          -- tcl_bndrs has the innermost bindings first,          -- which are probably the most relevant ones @@ -3013,15 +2959,6 @@     dec_max :: Maybe Int -> Maybe Int     dec_max = fmap (\n -> n - 1) -    ---- fixes #12177-    ---- builds up a list of bindings whose OccName has not been seen before-    remove_shadowing :: [TcBinder] -> [TcBinder]-    remove_shadowing 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      go :: DynFlags -> TidyEnv -> TcTyVarSet -> Maybe Int -> TcTyVarSet -> [SDoc]        -> Bool                          -- True <=> some filtered out due to lack of fuel@@ -3079,14 +3016,10 @@                  else go dflags tidy_env' ct_tvs (dec_max n_left) new_seen                          (doc:docs) discards tc_bndrs } + discardMsg :: SDoc discardMsg = text "(Some bindings suppressed;" <+>              text "use -fmax-relevant-binds=N or -fno-max-relevant-binds)"--subsDiscardMsg :: SDoc-subsDiscardMsg =-    text "(Some substitutions suppressed;" <+>-    text "use -fmax-valid-substitutions=N or -fno-max-valid-substitutions)"  ----------------------- warnDefaulting :: [Ct] -> Type -> TcM ()
+ typecheck/TcEvTerm.hs view
@@ -0,0 +1,70 @@++-- (those who have too heavy dependencies for TcEvidence)+module TcEvTerm+    ( evDelayedError, evCallStack )+where++import GhcPrelude++import FastString+import Type+import CoreSyn+import MkCore+import Literal ( Literal(..) )+import TcEvidence+import HscTypes+import DynFlags+import Name+import Module+import CoreUtils+import PrelNames+import SrcLoc++-- Used with Opt_DeferTypeErrors+-- See Note [Deferring coercion errors to runtime]+-- in TcSimplify+evDelayedError :: Type -> FastString -> EvTerm+evDelayedError ty msg+  = EvExpr $+    Var errorId `mkTyApps` [getRuntimeRep ty, ty] `mkApps` [litMsg]+  where+    errorId = tYPE_ERROR_ID+    litMsg  = Lit (MachStr (fastStringToByteString msg))++-- Dictionary for CallStack implicit parameters+evCallStack :: (MonadThings m, HasModule m, HasDynFlags m) =>+    EvCallStack -> m EvExpr+-- See Note [Overview of implicit CallStacks] in TcEvidence.hs+evCallStack cs = do+  df            <- getDynFlags+  m             <- getModule+  srcLocDataCon <- lookupDataCon srcLocDataConName+  let mkSrcLoc l = mkCoreConApps srcLocDataCon <$>+               sequence [ mkStringExprFS (unitIdFS $ moduleUnitId m)+                        , mkStringExprFS (moduleNameFS $ moduleName m)+                        , mkStringExprFS (srcSpanFile l)+                        , return $ mkIntExprInt df (srcSpanStartLine l)+                        , return $ mkIntExprInt df (srcSpanStartCol l)+                        , return $ mkIntExprInt df (srcSpanEndLine l)+                        , return $ mkIntExprInt df (srcSpanEndCol l)+                        ]++  emptyCS <- Var <$> lookupId emptyCallStackName++  pushCSVar <- lookupId pushCallStackName+  let pushCS name loc rest =+        mkCoreApps (Var pushCSVar) [mkCoreTup [name, loc], rest]++  let mkPush name loc tm = do+        nameExpr <- mkStringExprFS name+        locExpr <- mkSrcLoc loc+        -- at this point tm :: IP sym CallStack+        -- but we need the actual CallStack to pass to pushCS,+        -- so we use unwrapIP to strip the dictionary wrapper+        -- See Note [Overview of implicit CallStacks]+        let ip_co = unwrapIP (exprType tm)+        return (pushCS nameExpr locExpr (Cast tm ip_co))++  case cs of+    EvCsPushCall name loc tm -> mkPush (occNameFS $ getOccName name) loc tm+    EvCsEmpty -> return emptyCS
typecheck/TcEvidence.hs view
@@ -16,9 +16,14 @@   lookupEvBind, evBindMapBinds, foldEvBindMap, filterEvBindMap,   isEmptyEvBindMap,   EvBind(..), emptyTcEvBinds, isEmptyTcEvBinds, mkGivenEvBind, mkWantedEvBind,-  sccEvBinds, evBindVar,-  EvTerm(..), mkEvCast, evVarsOfTerm, mkEvScSelectors,-  EvLit(..), evTermCoercion,+  evBindVar, isNoEvBindsVar,++  -- EvTerm (already a CoreExpr)+  EvTerm(..), EvExpr,+  evId, evCoercion, evCast, evDFunApp,  evSelector,+  mkEvCast, evVarsOfTerm, mkEvScSelectors, evTypeable, findNeededEvVars,++  evTermCoercion, evTermCoercion_maybe,   EvCallStack(..),   EvTypeable(..), @@ -57,12 +62,15 @@ import Name import Pair +import CoreSyn+import Class ( classSCSelId )+import Id ( isEvVar )+import CoreFVs ( exprSomeFreeVars )+ import Util import Bag-import Digraph import qualified Data.Data as Data import Outputable-import FastString import SrcLoc import Data.IORef( IORef ) import UniqSet@@ -101,7 +109,7 @@                        -> [TcCoercion] -> TcCoercionR mkTcForAllCo           :: TyVar -> TcCoercionN -> TcCoercion -> TcCoercion mkTcForAllCos          :: [(TyVar, TcCoercionN)] -> TcCoercion -> TcCoercion-mkTcNthCo              :: Int -> TcCoercion -> TcCoercion+mkTcNthCo              :: Role -> Int -> TcCoercion -> TcCoercion mkTcLRCo               :: LeftOrRight -> TcCoercion -> TcCoercion mkTcSubCo              :: TcCoercionN -> TcCoercionR maybeTcSubCo           :: EqRel -> TcCoercion -> TcCoercion@@ -310,7 +318,7 @@ mkWpEvApps args = mk_co_app_fn WpEvApp args  mkWpEvVarApps :: [EvVar] -> HsWrapper-mkWpEvVarApps vs = mk_co_app_fn WpEvApp (map EvId vs)+mkWpEvVarApps vs = mk_co_app_fn WpEvApp (map (EvExpr . evId) vs)  mkWpTyLams :: [TyVar] -> HsWrapper mkWpTyLams ids = mk_co_lam_fn WpTyLam ids@@ -392,12 +400,37 @@       -- See Note [Tracking redundant constraints] in TcSimplify     } +  | NoEvBindsVar {  -- See Note [No evidence bindings]++      -- See above for comments on ebv_uniq, evb_tcvs+      ebv_uniq :: Unique,+      ebv_tcvs :: IORef CoVarSet+    }+ instance Data.Data TcEvBinds where   -- Placeholder; we can't travers into TcEvBinds   toConstr _   = abstractConstr "TcEvBinds"   gunfold _ _  = error "gunfold"   dataTypeOf _ = Data.mkNoRepType "TcEvBinds" +{- Note [No evidence bindings]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Class constraints etc give rise to /term/ bindings for evidence, and+we have nowhere to put term bindings in /types/.  So in some places we+use NoEvBindsVar (see newNoTcEvBinds) to signal that no term-level+evidence bindings are allowed.  Notebly ():++  - Places in types where we are solving kind constraints (all of which+    are equalities); see solveEqualities, solveLocalEqualities,+    checkTvConstraints++  - When unifying forall-types+-}++isNoEvBindsVar :: EvBindsVar -> Bool+isNoEvBindsVar (NoEvBindsVar {}) = True+isNoEvBindsVar (EvBindsVar {})   = False+ ----------------- newtype EvBindMap   = EvBindMap {@@ -465,43 +498,62 @@ mkWantedEvBind :: EvVar -> EvTerm -> EvBind mkWantedEvBind ev tm = EvBind { eb_is_given = False, eb_lhs = ev, eb_rhs = tm } -+-- EvTypeable are never given, so we can work with EvExpr here instead of EvTerm mkGivenEvBind :: EvVar -> EvTerm -> EvBind mkGivenEvBind ev tm = EvBind { eb_is_given = True, eb_lhs = ev, eb_rhs = tm } ++-- An EvTerm is, conceptually, a CoreExpr that implements the constraint.+-- Unfortunately, we cannot just do+--   type EvTerm  = CoreExpr+-- Because of staging problems issues around EvTypeable data EvTerm-  = EvId EvId                    -- Any sort of evidence Id, including coercions+  = EvExpr EvExpr -  | EvCoercion TcCoercion        -- coercion bindings-                                 -- See Note [Coercion evidence terms]+  | EvTypeable Type EvTypeable   -- Dictionary for (Typeable ty) -  | EvCast EvTerm TcCoercionR    -- d |> co+  | EvFun     -- /\as \ds. let binds in v+      { et_tvs   :: [TyVar]+      , et_given :: [EvVar]+      , et_binds :: TcEvBinds -- This field is why we need an EvFun+                              -- constructor, and can't just use EvExpr+      , et_body  :: EvVar } -  | EvDFunApp DFunId             -- Dictionary instance application-       [Type] [EvTerm]+  deriving Data.Data -  | EvDelayedError Type FastString  -- Used with Opt_DeferTypeErrors-                               -- See Note [Deferring coercion errors to runtime]-                               -- in TcSimplify+type EvExpr = CoreExpr -  | EvSuperClass EvTerm Int      -- n'th superclass. Used for both equalities and-                                 -- dictionaries, even though the former have no-                                 -- selector Id.  We count up from _0_+-- An EvTerm is (usually) constructed by any of the constructors here+-- and those more complicates ones who were moved to module TcEvTerm -  | EvLit EvLit       -- Dictionary for KnownNat and KnownSymbol classes.-                      -- Note [KnownNat & KnownSymbol and EvLit]+-- | Any sort of evidence Id, including coercions+evId ::  EvId -> EvExpr+evId = Var -  | EvCallStack EvCallStack      -- Dictionary for CallStack implicit parameters+-- coercion bindings+-- See Note [Coercion evidence terms]+evCoercion :: TcCoercion -> EvTerm+evCoercion co = EvExpr (Coercion co) -  | EvTypeable Type EvTypeable   -- Dictionary for (Typeable ty)+-- | d |> co+evCast :: EvExpr -> TcCoercion -> EvTerm+evCast et tc | isReflCo tc = EvExpr et+             | otherwise   = EvExpr (Cast et tc) -  | EvSelector Id [Type] [EvTerm] -- Selector id plus the types at which it-                                  -- should be instantiated, used for HasField-                                  -- dictionaries; see Note [HasField instances]-                                  -- in TcInterface+-- Dictionary instance application+evDFunApp :: DFunId -> [Type] -> [EvExpr] -> EvTerm+evDFunApp df tys ets = EvExpr $ Var df `mkTyApps` tys `mkApps` ets -  deriving Data.Data+-- Selector id plus the types at which it+-- should be instantiated, used for HasField+-- dictionaries; see Note [HasField instances]+-- in TcInterface+evSelector :: Id -> [Type] -> [EvExpr] -> EvExpr+evSelector sel_id tys tms = Var sel_id `mkTyApps` tys `mkApps` tms +-- Dictionary for (Typeable ty)+evTypeable :: Type -> EvTypeable -> EvTerm+evTypeable = EvTypeable  -- | Instructions on how to make a 'Typeable' dictionary. -- See Note [Typeable evidence terms]@@ -526,16 +578,11 @@     -- (see Trac #10348)   deriving Data.Data -data EvLit-  = EvNum Integer-  | EvStr FastString-    deriving Data.Data- -- | Evidence for @CallStack@ implicit parameters. data EvCallStack   -- See Note [Overview of implicit CallStacks]   = EvCsEmpty-  | EvCsPushCall Name RealSrcSpan EvTerm+  | EvCsPushCall Name RealSrcSpan EvExpr     -- ^ @EvCsPushCall name loc stk@ represents a call to @name@, occurring at     -- @loc@, in a calling context @stk@.   deriving Data.Data@@ -597,54 +644,6 @@  from super classes will be "given" and hence rigid]  -Note [KnownNat & KnownSymbol and EvLit]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-A part of the type-level literals implementation are the classes-"KnownNat" and "KnownSymbol", which provide a "smart" constructor for-defining singleton values.  Here is the key stuff from GHC.TypeLits--  class KnownNat (n :: Nat) where-    natSing :: SNat n--  newtype SNat (n :: Nat) = SNat Integer--Conceptually, this class has infinitely many instances:--  instance KnownNat 0       where natSing = SNat 0-  instance KnownNat 1       where natSing = SNat 1-  instance KnownNat 2       where natSing = SNat 2-  ...--In practice, we solve `KnownNat` predicates in the type-checker-(see typecheck/TcInteract.hs) because we can't have infinitely many instances.-The evidence (aka "dictionary") for `KnownNat` is of the form `EvLit (EvNum n)`.--We make the following assumptions about dictionaries in GHC:-  1. The "dictionary" for classes with a single method---like `KnownNat`---is-     a newtype for the type of the method, so using a evidence amounts-     to a coercion, and-  2. Newtypes use the same representation as their definition types.--So, the evidence for `KnownNat` is just a value of the representation type,-wrapped in two newtype constructors: one to make it into a `SNat` value,-and another to make it into a `KnownNat` dictionary.--Also note that `natSing` and `SNat` are never actually exposed from the-library---they are just an implementation detail.  Instead, users see-a more convenient function, defined in terms of `natSing`:--  natVal :: KnownNat n => proxy n -> Integer--The reason we don't use this directly in the class is that it is simpler-and more efficient to pass around an integer rather than an entier function,-especially when the `KnowNat` evidence is packaged up in an existential.--The story for kind `Symbol` is analogous:-  * class KnownSymbol-  * newtype SSymbol-  * Evidence: EvLit (EvStr n)-- Note [Overview of implicit CallStacks] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (See https://ghc.haskell.org/trac/ghc/wiki/ExplicitCallStack/ImplicitLocations)@@ -769,17 +768,25 @@  -} -mkEvCast :: EvTerm -> TcCoercion -> EvTerm+mkEvCast :: EvExpr -> TcCoercion -> EvTerm mkEvCast ev lco-  | ASSERT2(tcCoercionRole lco == Representational, (vcat [text "Coercion of wrong role passed to mkEvCast:", ppr ev, ppr lco]))-    isTcReflCo lco = ev-  | otherwise      = EvCast ev lco+  | ASSERT2( tcCoercionRole lco == Representational+           , (vcat [text "Coercion of wrong role passed to mkEvCast:", ppr ev, ppr lco]))+    isTcReflCo lco = EvExpr ev+  | otherwise      = evCast ev lco -mkEvScSelectors :: EvTerm -> Class -> [TcType] -> [(TcPredType, EvTerm)]-mkEvScSelectors ev cls tys++mkEvScSelectors         -- Assume   class (..., D ty, ...) => C a b+  :: Class -> [TcType]  -- C ty1 ty2+  -> [(TcPredType,      -- D ty[ty1/a,ty2/b]+       EvExpr)          -- :: C ty1 ty2 -> D ty[ty1/a,ty2/b]+     ]+mkEvScSelectors cls tys    = zipWith mk_pr (immSuperClasses cls tys) [0..]   where-    mk_pr pred i = (pred, EvSuperClass ev i)+    mk_pr pred i = (pred, Var sc_sel_id `mkTyApps` tys)+      where+        sc_sel_id  = classSCSelId cls i -- Zero-indexed  emptyTcEvBinds :: TcEvBinds emptyTcEvBinds = EvBinds emptyBag@@ -788,50 +795,58 @@ isEmptyTcEvBinds (EvBinds b)    = isEmptyBag b isEmptyTcEvBinds (TcEvBinds {}) = panic "isEmptyTcEvBinds" --evTermCoercion :: EvTerm -> TcCoercion+evTermCoercion_maybe :: EvTerm -> Maybe TcCoercion -- Applied only to EvTerms of type (s~t) -- See Note [Coercion evidence terms]-evTermCoercion (EvId v)        = mkCoVarCo v-evTermCoercion (EvCoercion co) = co-evTermCoercion (EvCast tm co)  = mkCoCast (evTermCoercion tm) co-evTermCoercion tm = pprPanic "evTermCoercion" (ppr tm)+evTermCoercion_maybe ev_term+  | EvExpr e <- ev_term = go e+  | otherwise           = Nothing+  where+    go :: EvExpr -> Maybe TcCoercion+    go (Var v)       = return (mkCoVarCo v)+    go (Coercion co) = return co+    go (Cast tm co)  = do { co' <- go tm+                          ; return (mkCoCast co' co) }+    go _             = Nothing -evVarsOfTerm :: EvTerm -> VarSet-evVarsOfTerm (EvId v)             = unitVarSet v-evVarsOfTerm (EvCoercion co)      = coVarsOfCo co-evVarsOfTerm (EvDFunApp _ _ evs)  = mapUnionVarSet evVarsOfTerm evs-evVarsOfTerm (EvSuperClass v _)   = evVarsOfTerm v-evVarsOfTerm (EvCast tm co)       = evVarsOfTerm tm `unionVarSet` coVarsOfCo co-evVarsOfTerm (EvDelayedError _ _) = emptyVarSet-evVarsOfTerm (EvLit _)            = emptyVarSet-evVarsOfTerm (EvCallStack cs)     = evVarsOfCallStack cs-evVarsOfTerm (EvTypeable _ ev)    = evVarsOfTypeable ev-evVarsOfTerm (EvSelector _ _ evs) = mapUnionVarSet evVarsOfTerm evs+evTermCoercion :: EvTerm -> TcCoercion+evTermCoercion tm = case evTermCoercion_maybe tm of+                      Just co -> co+                      Nothing -> pprPanic "evTermCoercion" (ppr tm) -evVarsOfTerms :: [EvTerm] -> VarSet-evVarsOfTerms = mapUnionVarSet evVarsOfTerm --- | Do SCC analysis on a bag of 'EvBind's.-sccEvBinds :: Bag EvBind -> [SCC EvBind]-sccEvBinds bs = stronglyConnCompFromEdgedVerticesUniq edges+{- *********************************************************************+*                                                                      *+                  Free variables+*                                                                      *+********************************************************************* -}++findNeededEvVars :: EvBindMap -> VarSet -> VarSet+findNeededEvVars ev_binds seeds+  = transCloVarSet also_needs seeds   where-    edges :: [ Node EvVar EvBind ]-    edges = foldrBag ((:) . mk_node) [] bs+   also_needs :: VarSet -> VarSet+   also_needs needs = nonDetFoldUniqSet add emptyVarSet needs+     -- It's OK to use nonDetFoldUFM here because we immediately+     -- forget about the ordering by creating a set -    mk_node :: EvBind -> Node EvVar EvBind-    mk_node b@(EvBind { eb_lhs = var, eb_rhs = term })-      = DigraphNode b var (nonDetEltsUniqSet (evVarsOfTerm term `unionVarSet`-                                coVarsOfType (varType var)))-      -- It's OK to use nonDetEltsUniqSet here as stronglyConnCompFromEdgedVertices-      -- is still deterministic even if the edges are in nondeterministic order-      -- as explained in Note [Deterministic SCC] in Digraph.+   add :: Var -> VarSet -> VarSet+   add v needs+     | Just ev_bind <- lookupEvBind ev_binds v+     , EvBind { eb_is_given = is_given, eb_rhs = rhs } <- ev_bind+     , is_given+     = evVarsOfTerm rhs `unionVarSet` needs+     | otherwise+     = needs -evVarsOfCallStack :: EvCallStack -> VarSet-evVarsOfCallStack cs = case cs of-  EvCsEmpty -> emptyVarSet-  EvCsPushCall _ _ tm -> evVarsOfTerm tm+evVarsOfTerm :: EvTerm -> VarSet+evVarsOfTerm (EvExpr e)         = exprSomeFreeVars isEvVar e+evVarsOfTerm (EvTypeable _ ev)  = evVarsOfTypeable ev+evVarsOfTerm (EvFun {})         = emptyVarSet -- See Note [Free vars of EvFun] +evVarsOfTerms :: [EvTerm] -> VarSet+evVarsOfTerms = mapUnionVarSet evVarsOfTerm+ evVarsOfTypeable :: EvTypeable -> VarSet evVarsOfTypeable ev =   case ev of@@ -840,7 +855,20 @@     EvTypeableTrFun e1 e2 -> evVarsOfTerms [e1,e2]     EvTypeableTyLit e     -> evVarsOfTerm e -{-++{- Note [Free vars of EvFun]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Finding the free vars of an EvFun is made tricky by the fact the+bindings et_binds may be a mutable variable.  Fortunately, we+can just squeeze by.  Here's how.++* evVarsOfTerm is used only by TcSimplify.neededEvVars.+* Each EvBindsVar in an et_binds field of an EvFun is /also/ in the+  ic_binds field of an Implication+* So we can track usage via the processing for that implication,+  (see Note [Tracking redundant constraints] in TcSimplify).+  We can ignore usage from the EvFun altogether.+ ************************************************************************ *                                                                      *                   Pretty printing@@ -873,11 +901,12 @@                                               <+> pprParendCo co)]     help it (WpEvApp id)  = no_parens  $ sep [it True, nest 2 (ppr id)]     help it (WpTyApp ty)  = no_parens  $ sep [it True, text "@" <+> pprParendType ty]-    help it (WpEvLam id)  = add_parens $ sep [ text "\\" <> pp_bndr id, it False]-    help it (WpTyLam tv)  = add_parens $ sep [text "/\\" <> pp_bndr tv, it False]+    help it (WpEvLam id)  = add_parens $ sep [ text "\\" <> pprLamBndr id <> dot, it False]+    help it (WpTyLam tv)  = add_parens $ sep [text "/\\" <> pprLamBndr tv <> dot, it False]     help it (WpLet binds) = add_parens $ sep [text "let" <+> braces (ppr binds), it False] -    pp_bndr v = pprBndr LambdaBind v <> dot+pprLamBndr :: Id -> SDoc+pprLamBndr v = pprBndr LambdaBind v  add_parens, no_parens :: SDoc -> Bool -> SDoc add_parens d True  = parens d@@ -891,9 +920,11 @@ instance Outputable EvBindsVar where   ppr (EvBindsVar { ebv_uniq = u })      = text "EvBindsVar" <> angleBrackets (ppr u)+  ppr (NoEvBindsVar { ebv_uniq = u })+     = text "NoEvBindsVar" <> angleBrackets (ppr u)  instance Uniquable EvBindsVar where-  getUnique (EvBindsVar { ebv_uniq = u }) = u+  getUnique = ebv_uniq  instance Outputable EvBind where   ppr (EvBind { eb_lhs = v, eb_rhs = e, eb_is_given = is_given })@@ -904,21 +935,11 @@    -- We cheat a bit and pretend EqVars are CoVars for the purposes of pretty printing  instance Outputable EvTerm where-  ppr (EvId v)              = ppr v-  ppr (EvCast v co)         = ppr v <+> (text "`cast`") <+> pprParendCo co-  ppr (EvCoercion co)       = text "CO" <+> ppr co-  ppr (EvSuperClass d n)    = text "sc" <> parens (ppr (d,n))-  ppr (EvDFunApp df tys ts) = ppr df <+> sep [ char '@' <> ppr tys, ppr ts ]-  ppr (EvLit l)             = ppr l-  ppr (EvCallStack cs)      = ppr cs-  ppr (EvDelayedError ty msg) =     text "error"-                                <+> sep [ char '@' <> ppr ty, ppr msg ]-  ppr (EvTypeable ty ev)      = ppr ev <+> dcolon <+> text "Typeable" <+> ppr ty-  ppr (EvSelector sel tys ts) = ppr sel <+> sep [ char '@' <> ppr tys, ppr ts]--instance Outputable EvLit where-  ppr (EvNum n) = integer n-  ppr (EvStr s) = text (show s)+  ppr (EvExpr e)         = ppr e+  ppr (EvTypeable ty ev) = ppr ev <+> dcolon <+> text "Typeable" <+> ppr ty+  ppr (EvFun { et_tvs = tvs, et_given = gs, et_binds = bs, et_body = w })+      = hang (text "\\" <+> sep (map pprLamBndr (tvs ++ gs)) <+> arrow)+           2 (ppr bs $$ ppr w)   -- Not very pretty  instance Outputable EvCallStack where   ppr EvCsEmpty
typecheck/TcExpr.hs view
@@ -45,7 +45,6 @@ import TcPat import TcMType import TcType-import DsMonad import Id import IdInfo import ConLike@@ -60,8 +59,9 @@ import Type import TcEvidence import VarSet+import MkId( seqId ) import TysWiredIn-import TysPrim( intPrimTy )+import TysPrim( intPrimTy, mkTemplateTyVars, tYPE ) import PrimOp( tagToEnumKey ) import PrelNames import DynFlags@@ -167,43 +167,43 @@ -}  tcExpr :: HsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTcId)-tcExpr (HsVar (L _ name))   res_ty = tcCheckId name res_ty-tcExpr e@(HsUnboundVar uv)  res_ty = tcUnboundId e uv res_ty+tcExpr (HsVar _ (L _ name))   res_ty = tcCheckId name res_ty+tcExpr e@(HsUnboundVar _ uv)  res_ty = tcUnboundId e uv res_ty  tcExpr e@(HsApp {})     res_ty = tcApp1 e res_ty tcExpr e@(HsAppType {}) res_ty = tcApp1 e res_ty -tcExpr e@(HsLit lit) res_ty+tcExpr e@(HsLit x lit) res_ty   = do { let lit_ty = hsLitType lit-       ; tcWrapResult e (HsLit (convertLit lit)) lit_ty res_ty }+       ; tcWrapResult e (HsLit x (convertLit lit)) lit_ty res_ty } -tcExpr (HsPar expr)   res_ty = do { expr' <- tcMonoExprNC expr res_ty-                                  ; return (HsPar expr') }+tcExpr (HsPar x expr) res_ty = do { expr' <- tcMonoExprNC expr res_ty+                                  ; return (HsPar x expr') } -tcExpr (HsSCC src lbl expr) res_ty+tcExpr (HsSCC x src lbl expr) res_ty   = do { expr' <- tcMonoExpr expr res_ty-       ; return (HsSCC src lbl expr') }+       ; return (HsSCC x src lbl expr') } -tcExpr (HsTickPragma src info srcInfo expr) res_ty+tcExpr (HsTickPragma x src info srcInfo expr) res_ty   = do { expr' <- tcMonoExpr expr res_ty-       ; return (HsTickPragma src info srcInfo expr') }+       ; return (HsTickPragma x src info srcInfo expr') } -tcExpr (HsCoreAnn src lbl expr) res_ty+tcExpr (HsCoreAnn x src lbl expr) res_ty   = do  { expr' <- tcMonoExpr expr res_ty-        ; return (HsCoreAnn src lbl expr') }+        ; return (HsCoreAnn x src lbl expr') } -tcExpr (HsOverLit lit) res_ty+tcExpr (HsOverLit x lit) res_ty   = do  { lit' <- newOverloadedLit lit res_ty-        ; return (HsOverLit lit') }+        ; return (HsOverLit x lit') } -tcExpr (NegApp expr neg_expr) res_ty+tcExpr (NegApp x expr neg_expr) res_ty   = do  { (expr', neg_expr')             <- tcSyntaxOp NegateOrigin neg_expr [SynAny] res_ty $                \[arg_ty] ->                tcMonoExpr expr (mkCheckExpType arg_ty)-        ; return (NegApp expr' neg_expr') }+        ; return (NegApp x expr' neg_expr') } -tcExpr e@(HsIPVar x) res_ty+tcExpr e@(HsIPVar _ x) res_ty   = do {   {- Implicit parameters must have a *tau-type* not a               type scheme.  We enforce this by creating a fresh               type variable as its type.  (Because res_ty may not@@ -212,15 +212,16 @@        ; let ip_name = mkStrLitTy (hsIPNameFS x)        ; ipClass <- tcLookupClass ipClassName        ; ip_var <- emitWantedEvVar origin (mkClassPred ipClass [ip_name, ip_ty])-       ; tcWrapResult e (fromDict ipClass ip_name ip_ty (HsVar (noLoc ip_var)))-                      ip_ty res_ty }+       ; tcWrapResult e+                   (fromDict ipClass ip_name ip_ty (HsVar noExt (noLoc ip_var)))+                   ip_ty res_ty }   where   -- Coerces a dictionary for `IP "x" t` into `t`.   fromDict ipClass x ty = mkHsWrap $ mkWpCastR $                           unwrapIP $ mkClassPred ipClass [x,ty]   origin = IPOccOrigin x -tcExpr e@(HsOverLabel mb_fromLabel l) res_ty+tcExpr e@(HsOverLabel _ mb_fromLabel l) res_ty   = do { -- See Note [Type-checking overloaded labels]          loc <- getSrcSpanM        ; case mb_fromLabel of@@ -230,7 +231,8 @@                          ; let pred = mkClassPred isLabelClass [lbl, alpha]                          ; loc <- getSrcSpanM                          ; var <- emitWantedEvVar origin pred-                         ; tcWrapResult e (fromDict pred (HsVar (L loc var)))+                         ; tcWrapResult e+                                       (fromDict pred (HsVar noExt (L loc var)))                                         alpha res_ty } }   where   -- Coerces a dictionary for `IsLabel "x" t` into `t`,@@ -240,12 +242,13 @@   lbl = mkStrLitTy l    applyFromLabel loc fromLabel =-    L loc (HsVar (L loc fromLabel)) `HsAppType`-      mkEmptyWildCardBndrs (L loc (HsTyLit (HsStrTy NoSourceText l)))+    HsAppType+         (mkEmptyWildCardBndrs (L loc (HsTyLit noExt (HsStrTy NoSourceText l))))+         (L loc (HsVar noExt (L loc fromLabel))) -tcExpr (HsLam match) res_ty+tcExpr (HsLam x match) res_ty   = do  { (match', wrap) <- tcMatchLambda herald match_ctxt match res_ty-        ; return (mkHsWrap wrap (HsLam match')) }+        ; return (mkHsWrap wrap (HsLam x match')) }   where     match_ctxt = MC { mc_what = LambdaExpr, mc_body = tcBody }     herald = sep [ text "The lambda expression" <+>@@ -254,23 +257,23 @@                         -- The pprSetDepth makes the abstraction print briefly                    text "has"] -tcExpr e@(HsLamCase matches) res_ty+tcExpr e@(HsLamCase x matches) res_ty   = do { (matches', wrap)            <- tcMatchLambda msg match_ctxt matches res_ty            -- The laziness annotation is because we don't want to fail here            -- if there are multiple arguments-       ; return (mkHsWrap wrap $ HsLamCase matches') }+       ; return (mkHsWrap wrap $ HsLamCase x matches') }   where     msg = sep [ text "The function" <+> quotes (ppr e)               , text "requires"]     match_ctxt = MC { mc_what = CaseAlt, mc_body = tcBody } -tcExpr e@(ExprWithTySig expr sig_ty) res_ty+tcExpr e@(ExprWithTySig sig_ty expr) res_ty   = do { let loc = getLoc (hsSigWcType sig_ty)        ; sig_info <- checkNoErrs $  -- Avoid error cascade                      tcUserTypeSig loc sig_ty Nothing        ; (expr', poly_ty) <- tcExprSig expr sig_info-       ; let expr'' = ExprWithTySigOut expr' sig_ty+       ; let expr'' = ExprWithTySig sig_ty expr'        ; tcWrapResult e expr'' poly_ty res_ty }  {-@@ -349,8 +352,8 @@ See also Note [seqId magic] in MkId -} -tcExpr expr@(OpApp arg1 op fix arg2) res_ty-  | (L loc (HsVar (L lv op_name))) <- op+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@@ -360,10 +363,10 @@        ; arg2_ty <- readExpType arg2_exp_ty        ; op_id <- tcLookupId op_name        ; let op' = L loc (mkHsWrap (mkWpTyApps [arg1_ty, arg2_ty])-                                   (HsVar (L lv op_id)))-       ; return $ OpApp arg1' op' fix arg2' }+                                   (HsVar noExt (L lv op_id)))+       ; return $ OpApp fix arg1' op' arg2' } -  | (L loc (HsVar (L lv op_name))) <- op+  | (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@@ -386,7 +389,8 @@        --        -- The *result* type can have any kind (Trac #8739),        -- so we don't need to check anything for that-       ; _ <- unifyKind (Just (HsCoreTy arg2_sigma)) (typeKind arg2_sigma) liftedTypeKind+       ; _ <- unifyKind (Just (XHsType $ NHsCoreTy arg2_sigma))+                        (typeKind arg2_sigma) liftedTypeKind            -- ignore the evidence. arg2_sigma must have type * or #,            -- because we know arg2_sigma -> or_res_ty is well-kinded            -- (because otherwise matchActualFunTys would fail)@@ -400,7 +404,7 @@        ; let op' = L loc (mkHsWrap (mkWpTyApps [ getRuntimeRep res_ty                                                , arg2_sigma                                                , res_ty])-                                   (HsVar (L lv op_id)))+                                   (HsVar noExt (L lv op_id)))              -- arg1' :: arg1_ty              -- wrap_arg1 :: arg1_ty "->" (arg2_sigma -> op_res_ty)              -- wrap_res :: op_res_ty "->" res_ty@@ -411,15 +415,15 @@                      <.> wrap_arg1              doc = text "When looking at the argument to ($)" -       ; return (OpApp (mkLHsWrap wrap1 arg1') op' fix arg2') }+       ; return (OpApp fix (mkLHsWrap wrap1 arg1') op' arg2') } -  | (L loc (HsRecFld (Ambiguous lbl _))) <- op+  | (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 (Unambiguous lbl sel_name))-       ; tcExpr (OpApp arg1 op' fix arg2) res_ty+       ; let op' = L loc (HsRecFld noExt (Unambiguous sel_name lbl))+       ; tcExpr (OpApp fix arg1 op' arg2) res_ty        }    | otherwise@@ -427,12 +431,12 @@        ; (wrap, op', [HsValArg arg1', HsValArg arg2'])            <- tcApp (Just $ mk_op_msg op)                      op [HsValArg arg1, HsValArg arg2] res_ty-       ; return (mkHsWrap wrap $ OpApp arg1' op' fix arg2') }+       ; return (mkHsWrap wrap $ OpApp fix arg1' op' arg2') }  -- Right sections, equivalent to \ x -> x `op` expr, or --      \ x -> op x expr -tcExpr expr@(SectionR op arg2) res_ty+tcExpr expr@(SectionR x op arg2) res_ty   = do { (op', op_ty) <- tcInferFun op        ; (wrap_fun, [arg1_ty, arg2_ty], op_res_ty)                   <- matchActualFunTys (mk_op_msg op) fn_orig (Just (unLoc op)) 2 op_ty@@ -440,14 +444,14 @@                                  (mkFunTy arg1_ty op_res_ty) res_ty        ; arg2' <- tcArg op arg2 arg2_ty 2        ; return ( mkHsWrap wrap_res $-                  SectionR (mkLHsWrap wrap_fun op') arg2' ) }+                  SectionR x (mkLHsWrap wrap_fun op') arg2' ) }   where     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 -tcExpr expr@(SectionL arg1 op) res_ty+tcExpr expr@(SectionL x arg1 op) res_ty   = do { (op', op_ty) <- tcInferFun op        ; dflags <- getDynFlags      -- Note [Left sections]        ; let n_reqd_args | xopt LangExt.PostfixOperators dflags = 1@@ -460,14 +464,14 @@                                  (mkFunTys arg_tys op_res_ty) res_ty        ; arg1' <- tcArg op arg1 arg1_ty 1        ; return ( mkHsWrap wrap_res $-                  SectionL arg1' (mkLHsWrap wrap_fn op') ) }+                  SectionL x arg1' (mkLHsWrap wrap_fn op') ) }   where     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 -tcExpr expr@(ExplicitTuple tup_args boxity) res_ty+tcExpr expr@(ExplicitTuple x tup_args boxity) res_ty   | all tupArgPresent tup_args   = do { let arity  = length tup_args              tup_tc = tupleTyCon boxity arity@@ -479,7 +483,7 @@        ; let arg_tys' = case boxity of Unboxed -> drop arity arg_tys                                        Boxed   -> arg_tys        ; tup_args1 <- tcTupArgs tup_args arg_tys'-       ; return $ mkHsWrapCo coi (ExplicitTuple tup_args1 boxity) }+       ; return $ mkHsWrapCo coi (ExplicitTuple x tup_args1 boxity) }    | otherwise   = -- The tup_args are a mixture of Present and Missing (for tuple sections)@@ -499,16 +503,16 @@        -- Handle tuple sections where        ; tup_args1 <- tcTupArgs tup_args arg_tys -       ; return $ mkHsWrap wrap (ExplicitTuple tup_args1 boxity) }+       ; return $ mkHsWrap wrap (ExplicitTuple x tup_args1 boxity) } -tcExpr (ExplicitSum alt arity expr _) res_ty+tcExpr (ExplicitSum _ alt arity expr) res_ty   = do { let sum_tc = sumTyCon arity        ; res_ty <- expTypeToType res_ty        ; (coi, arg_tys) <- matchExpectedTyConApp sum_tc res_ty        ; -- Drop levity vars, we don't care about them here          let arg_tys' = drop arity arg_tys        ; expr' <- tcPolyExpr expr (arg_tys' `getNth` (alt - 1))-       ; return $ mkHsWrapCo coi (ExplicitSum alt arity expr' arg_tys') }+       ; return $ mkHsWrapCo coi (ExplicitSum arg_tys' alt arity expr' ) }  tcExpr (ExplicitList _ witness exprs) res_ty   = case witness of@@ -529,15 +533,6 @@                      ; return $ ExplicitList elt_ty (Just fln') exprs' }      where tc_elt elt_ty expr = tcPolyExpr expr elt_ty -tcExpr (ExplicitPArr _ exprs) res_ty    -- maybe empty-  = do  { res_ty <- expTypeToType res_ty-        ; (coi, elt_ty) <- matchExpectedPArrTy res_ty-        ; exprs' <- mapM (tc_elt elt_ty) exprs-        ; return $-          mkHsWrapCo coi $ ExplicitPArr elt_ty exprs' }-  where-    tc_elt elt_ty expr = tcPolyExpr expr elt_ty- {- ************************************************************************ *                                                                      *@@ -546,12 +541,12 @@ ************************************************************************ -} -tcExpr (HsLet (L l binds) expr) res_ty+tcExpr (HsLet x (L l binds) expr) res_ty   = do  { (binds', expr') <- tcLocalBinds binds $                              tcMonoExpr expr res_ty-        ; return (HsLet (L l binds') expr') }+        ; return (HsLet x (L l binds') expr') } -tcExpr (HsCase scrut matches) res_ty+tcExpr (HsCase x scrut matches) res_ty   = do  {  -- We used to typecheck the case alternatives first.            -- The case patterns tend to give good type info to use            -- when typechecking the scrutinee.  For example@@ -565,12 +560,12 @@          ; traceTc "HsCase" (ppr scrut_ty)         ; matches' <- tcMatchesCase match_ctxt scrut_ty matches res_ty-        ; return (HsCase scrut' matches') }+        ; return (HsCase x scrut' matches') }  where     match_ctxt = MC { mc_what = CaseAlt,                       mc_body = tcBody } -tcExpr (HsIf Nothing pred b1 b2) res_ty    -- Ordinary 'if'+tcExpr (HsIf x Nothing pred b1 b2) res_ty    -- Ordinary 'if'   = do { pred' <- tcMonoExpr pred (mkCheckExpType boolTy)        ; res_ty <- tauifyExpType res_ty            -- Just like Note [Case branches must never infer a non-tau type]@@ -578,9 +573,9 @@         ; b1' <- tcMonoExpr b1 res_ty        ; b2' <- tcMonoExpr b2 res_ty-       ; return (HsIf Nothing pred' b1' b2') }+       ; return (HsIf x Nothing pred' b1' b2') } -tcExpr (HsIf (Just fun) pred b1 b2) res_ty+tcExpr (HsIf x (Just fun) pred b1 b2) res_ty   = do { ((pred', b1', b2'), fun')            <- tcSyntaxOp IfOrigin fun [SynAny, SynAny, SynAny] res_ty $               \ [pred_ty, b1_ty, b2_ty] ->@@ -588,7 +583,7 @@                  ; b1'   <- tcPolyExpr b1   b1_ty                  ; b2'   <- tcPolyExpr b2   b2_ty                  ; return (pred', b1', b2') }-       ; return (HsIf (Just fun') pred' b1' b2') }+       ; return (HsIf x (Just fun') pred' b1' b2') }  tcExpr (HsMultiIf _ alts) res_ty   = do { res_ty <- if isSingleton alts@@ -602,13 +597,13 @@        ; return (HsMultiIf res_ty alts') }   where match_ctxt = MC { mc_what = IfAlt, mc_body = tcBody } -tcExpr (HsDo do_or_lc stmts _) res_ty+tcExpr (HsDo _ do_or_lc stmts) res_ty   = do { expr' <- tcDoStmts do_or_lc stmts res_ty        ; return expr' } -tcExpr (HsProc pat cmd) res_ty+tcExpr (HsProc x pat cmd) res_ty   = do  { (pat', cmd', coi) <- tcProc pat cmd res_ty-        ; return $ mkHsWrapCo coi (HsProc pat' cmd') }+        ; return $ mkHsWrapCo coi (HsProc x pat' cmd') }  -- Typechecks the static form and wraps it with a call to 'fromStaticPtr'. -- See Note [Grand plan for static forms] in StaticPtrTable for an overview.@@ -649,7 +644,8 @@         ; fromStaticPtr <- newMethodFromName StaticOrigin fromStaticPtrName p_ty         ; let wrap = mkWpTyApps [expr_ty]         ; loc <- getSrcSpanM-        ; return $ mkHsWrapCo co $ HsApp (L loc $ mkHsWrap wrap fromStaticPtr)+        ; return $ mkHsWrapCo co $ HsApp noExt+                                         (L loc $ mkHsWrap wrap fromStaticPtr)                                          (L loc (HsStatic fvs expr'))         } @@ -683,9 +679,10 @@                 ; rbinds' <- tcRecordBinds con_like arg_tys rbinds                 ; return $                   mkHsWrap res_wrap $-                  RecordCon { rcon_con_name = L loc con_id-                            , rcon_con_expr = mkHsWrap con_wrap con_expr-                            , rcon_con_like = con_like+                  RecordCon { rcon_ext = RecordConTc+                                 { rcon_con_like = con_like+                                 , rcon_con_expr = mkHsWrap con_wrap con_expr }+                            , rcon_con_name = L loc con_id                             , rcon_flds = rbinds' } } }  {-@@ -970,12 +967,16 @@         -- Phew!         ; return $           mkHsWrap wrap_res $-          RecordUpd { rupd_expr = mkLHsWrap fam_co (mkLHsWrapCo co_scrut record_expr')+          RecordUpd { rupd_expr+                          = mkLHsWrap fam_co (mkLHsWrapCo co_scrut record_expr')                     , rupd_flds = rbinds'-                    , rupd_cons = relevant_cons, rupd_in_tys = scrut_inst_tys-                    , rupd_out_tys = result_inst_tys, rupd_wrap = req_wrap } }+                    , rupd_ext = RecordUpdTc+                        { rupd_cons = relevant_cons+                        , rupd_in_tys = scrut_inst_tys+                        , rupd_out_tys = result_inst_tys+                        , rupd_wrap = req_wrap }} } -tcExpr e@(HsRecFld f) res_ty+tcExpr e@(HsRecFld _ f) res_ty     = tcCheckRecSelId e f res_ty  {-@@ -991,35 +992,6 @@ tcExpr (ArithSeq _ witness seq) res_ty   = tcArithSeq witness seq res_ty -tcExpr (PArrSeq _ seq@(FromTo expr1 expr2)) res_ty-  = do  { res_ty <- expTypeToType res_ty-        ; (coi, elt_ty) <- matchExpectedPArrTy res_ty-        ; expr1' <- tcPolyExpr expr1 elt_ty-        ; expr2' <- tcPolyExpr expr2 elt_ty-        ; enumFromToP <- initDsTc $ dsDPHBuiltin enumFromToPVar-        ; enum_from_to <- newMethodFromName (PArrSeqOrigin seq)-                                 (idName enumFromToP) elt_ty-        ; return $-          mkHsWrapCo coi $ PArrSeq enum_from_to (FromTo expr1' expr2') }--tcExpr (PArrSeq _ seq@(FromThenTo expr1 expr2 expr3)) res_ty-  = do  { res_ty <- expTypeToType res_ty-        ; (coi, elt_ty) <- matchExpectedPArrTy res_ty-        ; expr1' <- tcPolyExpr expr1 elt_ty-        ; expr2' <- tcPolyExpr expr2 elt_ty-        ; expr3' <- tcPolyExpr expr3 elt_ty-        ; enumFromThenToP <- initDsTc $ dsDPHBuiltin enumFromThenToPVar-        ; eft <- newMethodFromName (PArrSeqOrigin seq)-                      (idName enumFromThenToP) elt_ty        -- !!!FIXME: chak-        ; return $-          mkHsWrapCo coi $-          PArrSeq eft (FromThenTo expr1' expr2' expr3') }--tcExpr (PArrSeq _ _) _-  = panic "TcExpr.tcExpr: Infinite parallel array!"-    -- the parser shouldn't have generated it and the renamer shouldn't have-    -- let it through- {- ************************************************************************ *                                                                      *@@ -1032,15 +1004,15 @@ -- Here we get rid of it and add the finalizers to the global environment. -- -- See Note [Delaying modFinalizers in untyped splices] in RnSplice.-tcExpr (HsSpliceE (HsSpliced mod_finalizers (HsSplicedExpr expr)))+tcExpr (HsSpliceE _ (HsSpliced _ mod_finalizers (HsSplicedExpr expr)))        res_ty   = do addModFinalizersWithLclEnv mod_finalizers        tcExpr expr res_ty-tcExpr (HsSpliceE splice)        res_ty+tcExpr (HsSpliceE _ splice)          res_ty   = tcSpliceExpr splice res_ty-tcExpr e@(HsBracket brack)         res_ty+tcExpr e@(HsBracket _ brack)         res_ty   = tcTypedBracket e brack res_ty-tcExpr e@(HsRnBracketOut brack ps) res_ty+tcExpr e@(HsRnBracketOut _ brack ps) res_ty   = tcUntypedBracket e brack ps res_ty  {-@@ -1126,11 +1098,50 @@ data HsArg tm ty   = HsValArg tm   -- Argument is an ordinary expression     (f arg)   | HsTypeArg  ty -- Argument is a visible type application (f @ty)+  | HsArgPar SrcSpan -- See Note [HsArgPar] +{-+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]++-}++wrapHsArgs :: (XAppTypeE (GhcPass id) ~ LHsWcType GhcRn)+           => LHsExpr (GhcPass id)+           -> [HsArg (LHsExpr (GhcPass id)) (LHsWcType GhcRn)]+           -> LHsExpr (GhcPass id)+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++instance (Outputable tm, Outputable ty) => Outputable (HsArg tm ty) where+  ppr (HsValArg tm) = text "HsValArg" <> ppr tm+  ppr (HsTypeArg ty) = text "HsTypeArg" <> ppr ty+  ppr (HsArgPar sp) = text "HsArgPar" <> ppr sp+ isHsValArg :: HsArg tm ty -> Bool-isHsValArg (HsValArg {}) = True+isHsValArg (HsValArg {})  = True isHsValArg (HsTypeArg {}) = False+isHsValArg (HsArgPar {})  = False +isArgPar :: HsArg tm ty -> Bool+isArgPar (HsArgPar {})  = True+isArgPar (HsValArg {})  = False+isArgPar (HsTypeArg {}) = False++isArgPar_maybe :: HsArg a b -> Maybe (HsArg c d)+isArgPar_maybe (HsArgPar sp) = Just $ HsArgPar sp+isArgPar_maybe _ = Nothing+ type LHsExprArgIn  = HsArg (LHsExpr GhcRn)   (LHsWcType GhcRn) type LHsExprArgOut = HsArg (LHsExpr GhcTcId) (LHsWcType GhcRn) @@ -1138,10 +1149,7 @@        -> ExpRhoType -> TcM (HsExpr GhcTcId) tcApp1 e res_ty   = do { (wrap, fun, args) <- tcApp Nothing (noLoc e) [] res_ty-       ; return (mkHsWrap wrap $ unLoc $ foldl mk_hs_app fun args) }-  where-    mk_hs_app f (HsValArg a)  = mkHsApp f a-    mk_hs_app f (HsTypeArg a) = mkHsAppTypeOut f a+       ; return (mkHsWrap wrap $ unLoc $ wrapHsArgs fun args) }  tcApp :: Maybe SDoc  -- like "The function `f' is applied to"                      -- or leave out to get exactly that message@@ -1152,63 +1160,93 @@            -- But OpApp is slightly different, so that's why the caller            -- must assemble -tcApp m_herald orig_fun orig_args res_ty-  = go orig_fun orig_args-  where-    go :: LHsExpr GhcRn -> [LHsExprArgIn]-       -> TcM (HsWrapper, LHsExpr GhcTcId, [LHsExprArgOut])-    go (L _ (HsPar e))       args = go e  args-    go (L _ (HsApp e1 e2))   args = go e1 (HsValArg e2:args)-    go (L _ (HsAppType e t)) args = go e  (HsTypeArg t:args)+tcApp m_herald (L sp (HsPar _ fun)) args res_ty+  = tcApp m_herald fun (HsArgPar sp : args) res_ty -    go (L loc (HsVar (L _ fun))) args-      | fun `hasKey` tagToEnumKey-      , count isHsValArg args == 1-      = do { (wrap, expr, args) <- tcTagToEnum loc fun args res_ty-           ; return (wrap, expr, args) }+tcApp m_herald (L _ (HsApp _ fun arg1)) args res_ty+  = tcApp m_herald fun (HsValArg arg1 : args) res_ty -      | fun `hasKey` seqIdKey-      , count isHsValArg args == 2-      = do { (wrap, expr, args) <- tcSeq loc fun args res_ty-           ; return (wrap, expr, args) }+tcApp m_herald (L _ (HsAppType ty1 fun)) args res_ty+  = tcApp m_herald fun (HsTypeArg ty1 : args) res_ty -    go (L loc (HsRecFld (Ambiguous lbl _))) args@(HsValArg (L _ arg) : _)-      | Just sig_ty <- obviousSig arg-      = do { sig_tc_ty <- tcHsSigWcType ExprSigCtxt sig_ty-           ; sel_name  <- disambiguateSelector lbl sig_tc_ty-           ; go (L loc (HsRecFld (Unambiguous lbl sel_name))) args }+tcApp m_herald fun@(L loc (HsRecFld _ fld_lbl)) args res_ty+  | Ambiguous _ lbl        <- fld_lbl  -- Still ambiguous+  , HsValArg (L _ arg) : _ <- filterOut isArgPar args -- A value arg is first+  , Just sig_ty     <- obviousSig arg  -- A type sig on the arg disambiguates+  = do { sig_tc_ty <- tcHsSigWcType ExprSigCtxt sig_ty+       ; sel_name  <- disambiguateSelector lbl sig_tc_ty+       ; (tc_fun, fun_ty) <- tcInferRecSelId (Unambiguous sel_name lbl)+       ; tcFunApp m_herald fun (L loc tc_fun) fun_ty args res_ty } -    -- See Note [Visible type application for the empty list constructor]-    go (L loc (ExplicitList _ Nothing [])) [HsTypeArg ty_arg]-      = 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@(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 -    go fun args-      = do {   -- Type-check the function-           ; (fun1, fun_sigma) <- tcInferFun fun-           ; let orig = lexprCtOrigin fun+  -- 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 -           ; (wrap_fun, args1, actual_res_ty)-               <- tcArgs fun fun_sigma orig args-                         (m_herald `orElse` mk_app_msg fun 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, []) } -                -- this is just like tcWrapResult, but the types don't line-                -- up to call that function-           ; wrap_res <- addFunResCtxt True (unLoc fun) actual_res_ty res_ty $-                         tcSubTypeDS_NC_O orig GenSigCtxt-                           (Just $ unLoc $ foldl mk_hs_app fun args)-                           actual_res_ty res_ty+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 } -           ; return (wrap_res, mkLHsWrap wrap_fun fun1, args1) }+---------------------+tcFunApp :: Maybe SDoc  -- like "The function `f' is applied to"+                        -- or leave out to get exactly that message+         -> LHsExpr GhcRn                  -- Renamed function+         -> LHsExpr GhcTcId -> TcSigmaType -- Function and its type+         -> [LHsExprArgIn]                 -- Arguments+         -> ExpRhoType                     -- Overall result type+         -> TcM (HsWrapper, LHsExpr GhcTcId, [LHsExprArgOut])+            -- (wrapper-for-result, fun, args)+            -- For an ordinary function application,+            -- these should be assembled as wrap_res[ fun args ]+            -- But OpApp is slightly different, so that's why the caller+            -- must assemble -    mk_hs_app f (HsValArg a)  = mkHsApp f a-    mk_hs_app f (HsTypeArg a) = mkHsAppType f a+-- tcFunApp deals with the general case;+-- the special cases are handled by tcApp+tcFunApp m_herald rn_fun tc_fun fun_sigma rn_args res_ty+  = do { let orig = lexprCtOrigin rn_fun +       ; (wrap_fun, tc_args, actual_res_ty)+           <- tcArgs rn_fun fun_sigma orig rn_args+                     (m_herald `orElse` mk_app_msg rn_fun rn_args)++            -- this is just like tcWrapResult, but the types don't line+            -- up to call that function+       ; wrap_res <- addFunResCtxt True (unLoc rn_fun) actual_res_ty res_ty $+                     tcSubTypeDS_NC_O orig GenSigCtxt+                       (Just $ unLoc $ wrapHsArgs rn_fun rn_args)+                       actual_res_ty res_ty++       ; return (wrap_res, mkLHsWrap wrap_fun tc_fun, tc_args) }+ mk_app_msg :: LHsExpr GhcRn -> [LHsExprArgIn] -> SDoc mk_app_msg fun args = sep [ text "The" <+> text what <+> quotes (ppr expr)                           , text "is applied to"]@@ -1246,12 +1284,12 @@ ---------------- tcInferFun :: LHsExpr GhcRn -> TcM (LHsExpr GhcTcId, TcSigmaType) -- Infer type of a function-tcInferFun (L loc (HsVar (L _ name)))+tcInferFun (L loc (HsVar _ (L _ name)))   = do { (fun, ty) <- setSrcSpan loc (tcInferId name)                -- Don't wrap a context around a plain Id        ; return (L loc fun, ty) } -tcInferFun (L loc (HsRecFld f))+tcInferFun (L loc (HsRecFld _ f))   = do { (fun, ty) <- setSrcSpan loc (tcInferRecSelId f)                -- Don't wrap a context around a plain Id        ; return (L loc fun, ty) }@@ -1283,6 +1321,11 @@      go _ _ fun_ty [] = return (idHsWrapper, [], fun_ty) +    go acc_args n fun_ty (HsArgPar sp : args)+      = do { (inner_wrap, args', res_ty) <- go acc_args n fun_ty args+           ; return (inner_wrap, HsArgPar sp : args', res_ty)+           }+     go acc_args n fun_ty (HsTypeArg hs_ty_arg : args)       = do { (wrap1, upsilon_ty) <- topInstantiateInferred fun_orig fun_ty                -- wrap1 :: fun_ty "->" upsilon_ty@@ -1383,8 +1426,9 @@   = ASSERT( equalLength args tys ) mapM go (args `zip` tys)   where     go (L l (Missing {}),   arg_ty) = return (L l (Missing arg_ty))-    go (L l (Present expr), arg_ty) = do { expr' <- tcPolyExpr expr arg_ty-                                         ; return (L l (Present expr')) }+    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"  --------------------------- -- See TcType.SyntaxOpType also for commentary@@ -1407,7 +1451,7 @@               -> SyntaxOpType               -> ([TcSigmaType] -> TcM a)               -> TcM (a, SyntaxExpr GhcTcId)-tcSyntaxOpGen orig (SyntaxExpr { syn_expr = HsVar (L _ op) })+tcSyntaxOpGen orig (SyntaxExpr { syn_expr = HsVar _ (L _ op) })               arg_tys res_ty thing_inside   = do { (expr, sigma) <- tcInferId op        ; (result, expr_wrap, arg_wraps, res_wrap)@@ -1595,7 +1639,7 @@        ; let skol_info = SigSkol ExprSigCtxt (idType poly_id) tv_prs              skol_tvs  = map snd tv_prs        ; (ev_binds, expr') <- checkConstraints skol_info skol_tvs given $-                              tcExtendTyVarEnv2 tv_prs $+                              tcExtendNameTyVarEnv tv_prs $                               tcPolyExprNC expr tau         ; let poly_wrap = mkWpTyLams   skol_tvs@@ -1608,8 +1652,8 @@     do { (tclvl, wanted, (expr', sig_inst))              <- pushLevelAndCaptureConstraints  $                 do { sig_inst <- tcInstSig sig-                   ; expr' <- tcExtendTyVarEnv2 (sig_inst_skols sig_inst) $-                              tcExtendTyVarEnv2 (sig_inst_wcs   sig_inst) $+                   ; expr' <- tcExtendNameTyVarEnv (sig_inst_skols sig_inst) $+                              tcExtendNameTyVarEnv (sig_inst_wcs   sig_inst) $                               tcPolyExprNC expr (sig_inst_tau sig_inst)                    ; return (expr', sig_inst) }        -- See Note [Partial expression signatures]@@ -1680,27 +1724,31 @@ 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 (noLoc name)) actual_res_ty res_ty $-         tcWrapResultO (OccurrenceOf name) (HsVar (noLoc name)) expr actual_res_ty res_ty }+       ; addFunResCtxt False (HsVar noExt (noLoc name)) actual_res_ty res_ty $+         tcWrapResultO (OccurrenceOf name) (HsVar noExt (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+tcCheckRecSelId rn_expr f@(Unambiguous _ (L _ lbl)) res_ty   = do { (expr, actual_res_ty) <- tcInferRecSelId f-       ; addFunResCtxt False (HsRecFld f) actual_res_ty res_ty $+       ; addFunResCtxt False (HsRecFld noExt f) actual_res_ty res_ty $          tcWrapResultO (OccurrenceOfRecSel lbl) rn_expr expr actual_res_ty res_ty }-tcCheckRecSelId rn_expr (Ambiguous lbl _) res_ty+tcCheckRecSelId rn_expr (Ambiguous _ lbl) res_ty   = case tcSplitFunTy_maybe =<< checkingExpType_maybe res_ty of       Nothing       -> ambiguousSelector lbl       Just (arg, _) -> do { sel_name <- disambiguateSelector lbl arg-                          ; tcCheckRecSelId rn_expr (Unambiguous lbl sel_name) res_ty }+                          ; tcCheckRecSelId rn_expr (Unambiguous sel_name lbl)+                                                    res_ty }+tcCheckRecSelId _ (XAmbiguousFieldOcc _) _ = panic "tcCheckRecSelId"  ------------------------ tcInferRecSelId :: AmbiguousFieldOcc GhcRn -> TcM (HsExpr GhcTcId, TcRhoType)-tcInferRecSelId (Unambiguous (L _ lbl) sel)+tcInferRecSelId (Unambiguous sel (L _ lbl))   = do { (expr', ty) <- tc_infer_id lbl sel        ; return (expr', ty) }-tcInferRecSelId (Ambiguous lbl _)+tcInferRecSelId (Ambiguous _ lbl)   = ambiguousSelector lbl+tcInferRecSelId (XAmbiguousFieldOcc _) = panic "tcInferRecSelId"  ------------------------ tcInferId :: Name -> TcM (HsExpr GhcTcId, TcSigmaType)@@ -1729,7 +1777,7 @@   = do { assert_error_id <- tcLookupId assertErrorName        ; (wrap, id_rho) <- topInstantiate (OccurrenceOf assert_name)                                           (idType assert_error_id)-       ; return (mkHsWrap wrap (HsVar (noLoc assert_error_id)), id_rho)+       ; return (mkHsWrap wrap (HsVar noExt (noLoc assert_error_id)), id_rho)        }  tc_infer_id :: RdrName -> Name -> TcM (HsExpr GhcTcId, TcSigmaType)@@ -1755,12 +1803,12 @@              _ -> failWithTc $                   ppr thing <+> text "used where a value identifier was expected" }   where-    return_id id = return (HsVar (noLoc id), idType id)+    return_id id = return (HsVar noExt (noLoc id), idType id)      return_data_con con        -- For data constructors, must perform the stupid-theta check       | null stupid_theta-      = return (HsConLikeOut (RealDataCon con), con_ty)+      = return (HsConLikeOut noExt (RealDataCon con), con_ty)        | otherwise        -- See Note [Instantiating stupid theta]@@ -1771,7 +1819,8 @@                  rho'   = substTy subst rho            ; wrap <- instCall (OccurrenceOf id_name) tys' theta'            ; addDataConStupidTheta con tys'-           ; return (mkHsWrap wrap (HsConLikeOut (RealDataCon con)), rho') }+           ; return ( mkHsWrap wrap (HsConLikeOut noExt (RealDataCon con))+                    , rho') }        where         con_ty         = dataConUserType con@@ -1803,7 +1852,8 @@                                               , ctev_loc  = loc}                            , cc_hole = ExprHole unbound }       ; emitInsoluble can-      ; tcWrapResultO (UnboundOccurrenceOf occ) rn_expr (HsVar (noLoc ev)) ty res_ty }+      ; tcWrapResultO (UnboundOccurrenceOf occ) rn_expr (HsVar noExt (noLoc ev))+                                                                     ty res_ty }   {-@@ -1856,39 +1906,6 @@  -} -tcSeq :: SrcSpan -> Name -> [LHsExprArgIn]-      -> ExpRhoType -> TcM (HsWrapper, LHsExpr GhcTcId, [LHsExprArgOut])--- (seq e1 e2) :: res_ty--- We need a special typing rule because res_ty can be unboxed--- See Note [Typing rule for seq]-tcSeq loc fun_name args res_ty-  = do  { fun <- tcLookupId fun_name-        ; (arg1_ty, args1) <- case args of-            (HsTypeArg hs_ty_arg1 : args1)-              -> do { ty_arg1 <- tcHsTypeApp hs_ty_arg1 liftedTypeKind-                    ; return (ty_arg1, args1) }--            _ -> do { arg_ty1 <- newFlexiTyVarTy liftedTypeKind-                    ; return (arg_ty1, args) }--        ; (arg1, arg2, arg2_exp_ty) <- case args1 of-            [HsTypeArg hs_ty_arg2, HsValArg term_arg1, HsValArg term_arg2]-              -> do { arg2_kind <- newOpenTypeKind-                    ; ty_arg2 <- tcHsTypeApp hs_ty_arg2 arg2_kind-                                   -- see Note [Typing rule for seq]-                    ; _ <- tcSubTypeDS (OccurrenceOf fun_name) GenSigCtxt ty_arg2 res_ty-                    ; return (term_arg1, term_arg2, mkCheckExpType ty_arg2) }-            [HsValArg term_arg1, HsValArg term_arg2]-              -> return (term_arg1, term_arg2, res_ty)-            _ -> too_many_args "seq" args--        ; arg1' <- tcMonoExpr arg1 (mkCheckExpType arg1_ty)-        ; arg2' <- tcMonoExpr arg2 arg2_exp_ty-        ; res_ty <- readExpType res_ty  -- by now, it's surely filled in-        ; let fun'    = L loc (mkHsWrap ty_args (HsVar (L loc fun)))-              ty_args = WpTyApp res_ty <.> WpTyApp arg1_ty-        ; return (idHsWrapper, fun', [HsValArg arg1', HsValArg arg2']) }- tcTagToEnum :: SrcSpan -> Name -> [LHsExprArgIn] -> ExpRhoType             -> TcM (HsWrapper, LHsExpr GhcTcId, [LHsExprArgOut]) -- tagToEnum# :: forall a. Int# -> a@@ -1896,7 +1913,12 @@ tcTagToEnum loc fun_name args res_ty   = do { fun <- tcLookupId fun_name -       ; arg <- case args of+       ; let pars1 = mapMaybe isArgPar_maybe before+             pars2 = mapMaybe isArgPar_maybe after+             -- args contains exactly one HsValArg+             (before, _:after) = break isHsValArg args++       ; arg <- case filterOut isArgPar args of            [HsTypeArg hs_ty_arg, HsValArg term_arg]              -> do { ty_arg <- tcHsTypeApp hs_ty_arg liftedTypeKind                    ; _ <- tcSubTypeDS (OccurrenceOf fun_name) GenSigCtxt ty_arg res_ty@@ -1927,10 +1949,15 @@                  (mk_error ty' doc2)         ; arg' <- tcMonoExpr arg (mkCheckExpType intPrimTy)-       ; let fun' = L loc (mkHsWrap (WpTyApp rep_ty) (HsVar (L loc fun)))+       ; let fun' = L loc (mkHsWrap (WpTyApp rep_ty) (HsVar noExt (L loc fun)))              rep_ty = mkTyConApp rep_tc rep_args+             out_args = concat+              [ pars1+              , [HsValArg arg']+              , pars2+              ] -       ; return (mkWpCastR (mkTcSymCo coi), fun', [HsValArg arg']) }+       ; return (mkWpCastR (mkTcSymCo coi), fun', out_args) }                  -- coi is a Representational coercion   where     doc1 = vcat [ text "Specify the type by giving a type signature"@@ -1951,6 +1978,8 @@   where     pp (HsValArg e)                             = ppr e     pp (HsTypeArg (HsWC { hswc_body = L _ t })) = pprHsType t+    pp (HsTypeArg (XHsWildCardBndrs _)) = panic "too_many_args"+    pp (HsArgPar _) = empty   {-@@ -2005,7 +2034,7 @@         ; lift <- if isStringTy id_ty then                      do { sid <- tcLookupId THNames.liftStringName                                      -- See Note [Lifting strings]-                        ; return (HsVar (noLoc sid)) }+                        ; return (HsVar noExt (noLoc sid)) }                   else                      setConstraintVar lie_var   $                           -- Put the 'lift' constraint into the right LIE@@ -2215,8 +2244,9 @@     -- Extract the selector name of a field update if it is unambiguous     isUnambiguous :: LHsRecUpdField GhcRn -> Maybe (LHsRecUpdField GhcRn,Name)     isUnambiguous x = case unLoc (hsRecFieldLbl (unLoc x)) of-                        Unambiguous _ sel_name -> Just (x, sel_name)+                        Unambiguous sel_name _ -> Just (x, sel_name)                         Ambiguous{}            -> Nothing+                        XAmbiguousFieldOcc{}   -> Nothing      -- Look up the possible parents and selector GREs for each field     getUpdFieldsParents :: TcM [(LHsRecUpdField GhcRn@@ -2284,7 +2314,7 @@            ; let L loc af = hsRecFieldLbl upd                  lbl      = rdrNameAmbiguousFieldOcc af            ; return $ L l upd { hsRecFieldLbl-                                  = L loc (Unambiguous (L loc lbl) i) } }+                                  = L loc (Unambiguous i (L loc lbl)) } }   -- Extract the outermost TyCon of a type, if there is one; for@@ -2320,8 +2350,8 @@ -- the record expression in an update must be "obvious", i.e. the -- outermost constructor ignoring parentheses. obviousSig :: HsExpr GhcRn -> Maybe (LHsSigWcType GhcRn)-obviousSig (ExprWithTySig _ ty) = Just ty-obviousSig (HsPar p)            = obviousSig (unLoc p)+obviousSig (ExprWithTySig ty _) = Just ty+obviousSig (HsPar _ p)          = obviousSig (unLoc p) obviousSig _                    = Nothing  @@ -2384,21 +2414,22 @@                                  , hsRecFieldArg = rhs }))       = do { let lbl = rdrNameAmbiguousFieldOcc af                  sel_id = selectorAmbiguousFieldOcc af-                 f = L loc (FieldOcc (L loc lbl) (idName sel_id))+                 f = L loc (FieldOcc (idName sel_id) (L loc lbl))            ; mb <- tcRecordField con_like flds_w_tys f rhs            ; case mb of                Nothing         -> return Nothing                Just (f', rhs') ->                  return (Just                          (L l (fld { hsRecFieldLbl-                                      = L loc (Unambiguous (L loc lbl)-                                               (selectorFieldOcc (unLoc f')))+                                      = L loc (Unambiguous+                                               (extFieldOcc (unLoc f'))+                                               (L loc lbl))                                    , hsRecFieldArg = rhs' }))) }  tcRecordField :: ConLike -> Assoc Name Type               -> LFieldOcc GhcRn -> LHsExpr GhcRn               -> TcM (Maybe (LFieldOcc GhcTc, LHsExpr GhcTc))-tcRecordField con_like flds_w_tys (L loc (FieldOcc lbl sel_name)) rhs+tcRecordField con_like flds_w_tys (L loc (FieldOcc sel_name lbl)) rhs   | Just field_ty <- assocMaybe flds_w_tys sel_name       = addErrCtxt (fieldCtxt field_lbl) $         do { rhs' <- tcPolyExprNC rhs field_ty@@ -2409,12 +2440,13 @@                 --          (so we can find it easily)                 --      but is a LocalId with the appropriate type of the RHS                 --          (so the desugarer knows the type of local binder to make)-           ; return (Just (L loc (FieldOcc lbl field_id), rhs')) }+           ; return (Just (L loc (FieldOcc field_id lbl), rhs')) }       | otherwise       = do { addErrTc (badFieldCon con_like field_lbl)            ; return Nothing }   where         field_lbl = occNameFS $ rdrNameOcc (unLoc lbl)+tcRecordField _ _ (L _ (XFieldOcc _)) _ = panic "tcRecordField"   checkMissingFields ::  ConLike -> HsRecordBinds GhcRn -> TcM ()
typecheck/TcFlatten.hs view
@@ -1,1665 +1,2157 @@-{-# LANGUAGE CPP, ViewPatterns #-}--module TcFlatten(-   FlattenMode(..),-   flatten, flattenManyNom,--   unflattenWanteds- ) where--#include "HsVersions.h"--import GhcPrelude--import TcRnTypes-import TcType-import Type-import TcUnify( occCheckExpand )-import TcEvidence-import TyCon-import TyCoRep   -- performs delicate algorithm on types-import Coercion-import Var-import VarEnv-import Outputable-import TcSMonad as TcS-import BasicTypes( SwapFlag(..) )--import Util-import Bag-import Pair-import Control.Monad-import MonadUtils ( zipWithAndUnzipM )-import GHC.Exts ( inline )--import Control.Arrow ( first )--{--Note [The flattening story]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-* A CFunEqCan is either of form-     [G] <F xis> : F xis ~ fsk   -- fsk is a FlatSkolTv-     [W]       x : F xis ~ fmv   -- fmv is a FlatMetaTv-  where-     x is the witness variable-     xis are function-free-     fsk/fmv is a flatten skolem;-        it is always untouchable (level 0)--* CFunEqCans can have any flavour: [G], [W], [WD] or [D]--* KEY INSIGHTS:--   - A given flatten-skolem, fsk, is known a-priori to be equal to-     F xis (the LHS), with <F xis> evidence.  The fsk is still a-     unification variable, but it is "owned" by its CFunEqCan, and-     is filled in (unflattened) only by unflattenGivens.--   - A unification flatten-skolem, fmv, stands for the as-yet-unknown-     type to which (F xis) will eventually reduce.  It is filled in-     only by dischargeFmv.--   - All fsk/fmv variables are "untouchable".  To make it simple to test,-     we simply give them TcLevel=0.  This means that in a CTyVarEq, say,-       fmv ~ Int-     we NEVER unify fmv.--   - A unification flatten-skolems, fmv, ONLY gets unified when either-       a) The CFunEqCan takes a step, using an axiom-       b) By unflattenWanteds-    They are never unified in any other form of equality.-    For example [W] ffmv ~ Int  is stuck; it does not unify with fmv.--* We *never* substitute in the RHS (i.e. the fsk/fmv) of a CFunEqCan.-  That would destroy the invariant about the shape of a CFunEqCan,-  and it would risk wanted/wanted interactions. The only way we-  learn information about fsk is when the CFunEqCan takes a step.--  However we *do* substitute in the LHS of a CFunEqCan (else it-  would never get to fire!)--* Unflattening:-   - We unflatten Givens when leaving their scope (see unflattenGivens)-   - We unflatten Wanteds at the end of each attempt to simplify the-     wanteds; see unflattenWanteds, called from solveSimpleWanteds.--* Each canonical [G], [W], or [WD] CFunEqCan x : F xis ~ fsk/fmv-  has its own distinct evidence variable x and flatten-skolem fsk/fmv.-  Why? We make a fresh fsk/fmv when the constraint is born;-  and we never rewrite the RHS of a CFunEqCan.--  In contrast a [D] CFunEqCan shares its fmv with its partner [W],-  but does not "own" it.  If we reduce a [D] F Int ~ fmv, where-  say type instance F Int = ty, then we don't discharge fmv := ty.-  Rather we simply generate [D] fmv ~ ty (in TcInteract.reduce_top_fun_eq)--* Inert set invariant: if F xis1 ~ fsk1, F xis2 ~ fsk2-                       then xis1 /= xis2-  i.e. at most one CFunEqCan with a particular LHS--* Function applications can occur in the RHS of a CTyEqCan.  No reason-  not allow this, and it reduces the amount of flattening that must occur.--* Flattening a type (F xis):-    - If we are flattening in a Wanted/Derived constraint-      then create new [W] x : F xis ~ fmv-      else create new [G] x : F xis ~ fsk-      with fresh evidence variable x and flatten-skolem fsk/fmv--    - Add it to the work list--    - Replace (F xis) with fsk/fmv in the type you are flattening--    - You can also add the CFunEqCan to the "flat cache", which-      simply keeps track of all the function applications you-      have flattened.--    - If (F xis) is in the cache already, just-      use its fsk/fmv and evidence x, and emit nothing.--    - No need to substitute in the flat-cache. It's not the end-      of the world if we start with, say (F alpha ~ fmv1) and-      (F Int ~ fmv2) and then find alpha := Int.  Athat will-      simply give rise to fmv1 := fmv2 via [Interacting rule] below--* Canonicalising a CFunEqCan [G/W] x : F xis ~ fsk/fmv-    - Flatten xis (to substitute any tyvars; there are already no functions)-                  cos :: xis ~ flat_xis-    - New wanted  x2 :: F flat_xis ~ fsk/fmv-    - Add new wanted to flat cache-    - Discharge x = F cos ; x2--* [Interacting rule]-    (inert)     [W] x1 : F tys ~ fmv1-    (work item) [W] x2 : F tys ~ fmv2-  Just solve one from the other:-    x2 := x1-    fmv2 := fmv1-  This just unites the two fsks into one.-  Always solve given from wanted if poss.--* For top-level reductions, see Note [Top-level reductions for type functions]-  in TcInteract---Why given-fsks, alone, doesn't work-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Could we get away with only flatten meta-tyvars, with no flatten-skolems? No.--  [W] w : alpha ~ [F alpha Int]-----> flatten-  w = ...w'...-  [W] w' : alpha ~ [fsk]-  [G] <F alpha Int> : F alpha Int ~ fsk----> unify (no occurs check)-  alpha := [fsk]--But since fsk = F alpha Int, this is really an occurs check error.  If-that is all we know about alpha, we will succeed in constraint-solving, producing a program with an infinite type.--Even if we did finally get (g : fsk ~ Bool) by solving (F alpha Int ~ fsk)-using axiom, zonking would not see it, so (x::alpha) sitting in the-tree will get zonked to an infinite type.  (Zonking always only does-refl stuff.)--Why flatten-meta-vars, alone doesn't work-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Look at Simple13, with unification-fmvs only--  [G] g : a ~ [F a]-----> Flatten given-  g' = g;[x]-  [G] g'  : a ~ [fmv]-  [W] x : F a ~ fmv----> subst a in x-  g' = g;[x]-  x = F g' ; x2-  [W] x2 : F [fmv] ~ fmv--And now we have an evidence cycle between g' and x!--If we used a given instead (ie current story)--  [G] g : a ~ [F a]-----> Flatten given-  g' = g;[x]-  [G] g'  : a ~ [fsk]-  [G] <F a> : F a ~ fsk-----> Substitute for a-  [G] g'  : a ~ [fsk]-  [G] F (sym g'); <F a> : F [fsk] ~ fsk---Why is it right to treat fmv's differently to ordinary unification vars?-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-  f :: forall a. a -> a -> Bool-  g :: F Int -> F Int -> Bool--Consider-  f (x:Int) (y:Bool)-This gives alpha~Int, alpha~Bool.  There is an inconsistency,-but really only one error.  SherLoc may tell you which location-is most likely, based on other occurrences of alpha.--Consider-  g (x:Int) (y:Bool)-Here we get (F Int ~ Int, F Int ~ Bool), which flattens to-  (fmv ~ Int, fmv ~ Bool)-But there are really TWO separate errors.--  ** We must not complain about Int~Bool. **--Moreover these two errors could arise in entirely unrelated parts of-the code.  (In the alpha case, there must be *some* connection (eg-v:alpha in common envt).)--Note [Unflattening can force the solver to iterate]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Look at Trac #10340:-   type family Any :: *   -- No instances-   get :: MonadState s m => m s-   instance MonadState s (State s) where ...--   foo :: State Any Any-   foo = get--For 'foo' we instantiate 'get' at types mm ss-   [WD] MonadState ss mm, [WD] mm ss ~ State Any Any-Flatten, and decompose-   [WD] MonadState ss mm, [WD] Any ~ fmv-   [WD] mm ~ State fmv, [WD] fmv ~ ss-Unify mm := State fmv:-   [WD] MonadState ss (State fmv)-   [WD] Any ~ fmv, [WD] fmv ~ ss-Now we are stuck; the instance does not match!!  So unflatten:-   fmv := Any-   ss := Any    (*)-   [WD] MonadState Any (State Any)--The unification (*) represents progress, so we must do a second-round of solving; this time it succeeds. This is done by the 'go'-loop in solveSimpleWanteds.--This story does not feel right but it's the best I can do; and the-iteration only happens in pretty obscure circumstances.---************************************************************************-*                                                                      *-*                  Examples-     Here is a long series of examples I had to work through-*                                                                      *-************************************************************************--Simple20-~~~~~~~~-axiom F [a] = [F a]-- [G] F [a] ~ a--->- [G] fsk ~ a- [G] [F a] ~ fsk  (nc)--->- [G] F a ~ fsk2- [G] fsk ~ [fsk2]- [G] fsk ~ a--->- [G] F a ~ fsk2- [G] a ~ [fsk2]- [G] fsk ~ a-------------------------------------------indexed-types/should_compile/T44984--  [W] H (F Bool) ~ H alpha-  [W] alpha ~ F Bool--->-  F Bool  ~ fmv0-  H fmv0  ~ fmv1-  H alpha ~ fmv2--  fmv1 ~ fmv2-  fmv0 ~ alpha--flatten-~~~~~~~-  fmv0  := F Bool-  fmv1  := H (F Bool)-  fmv2  := H alpha-  alpha := F Bool-plus-  fmv1 ~ fmv2--But these two are equal under the above assumptions.-Solve by Refl.------ under plan B, namely solve fmv1:=fmv2 eagerly ----  [W] H (F Bool) ~ H alpha-  [W] alpha ~ F Bool--->-  F Bool  ~ fmv0-  H fmv0  ~ fmv1-  H alpha ~ fmv2--  fmv1 ~ fmv2-  fmv0 ~ alpha--->-  F Bool  ~ fmv0-  H fmv0  ~ fmv1-  H alpha ~ fmv2    fmv2 := fmv1--  fmv0 ~ alpha--flatten-  fmv0 := F Bool-  fmv1 := H fmv0 = H (F Bool)-  retain   H alpha ~ fmv2-    because fmv2 has been filled-  alpha := F Bool--------------------------------indexed-types/should_failt/T4179--after solving-  [W] fmv_1 ~ fmv_2-  [W] A3 (FCon x)           ~ fmv_1    (CFunEqCan)-  [W] A3 (x (aoa -> fmv_2)) ~ fmv_2    (CFunEqCan)-------------------------------------------indexed-types/should_fail/T7729a--a)  [W]   BasePrimMonad (Rand m) ~ m1-b)  [W]   tt m1 ~ BasePrimMonad (Rand m)----->  process (b) first-    BasePrimMonad (Ramd m) ~ fmv_atH-    fmv_atH ~ tt m1----->  now process (a)-    m1 ~ s_atH ~ tt m1    -- An obscure occurs check--------------------------------------------typecheck/TcTypeNatSimple--Original constraint-  [W] x + y ~ x + alpha  (non-canonical)-==>-  [W] x + y     ~ fmv1   (CFunEqCan)-  [W] x + alpha ~ fmv2   (CFuneqCan)-  [W] fmv1 ~ fmv2        (CTyEqCan)--(sigh)-------------------------------------------indexed-types/should_fail/GADTwrong1--  [G] Const a ~ ()-==> flatten-  [G] fsk ~ ()-  work item: Const a ~ fsk-==> fire top rule-  [G] fsk ~ ()-  work item fsk ~ ()--Surely the work item should rewrite to () ~ ()?  Well, maybe not;-it'a very special case.  More generally, our givens look like-F a ~ Int, where (F a) is not reducible.--------------------------------------------indexed_types/should_fail/T8227:--Why using a different can-rewrite rule in CFunEqCan heads-does not work.--Assuming NOT rewriting wanteds with wanteds--   Inert: [W] fsk_aBh ~ fmv_aBk -> fmv_aBk-          [W] fmv_aBk ~ fsk_aBh--          [G] Scalar fsk_aBg ~ fsk_aBh-          [G] V a ~ f_aBg--   Worklist includes  [W] Scalar fmv_aBi ~ fmv_aBk-   fmv_aBi, fmv_aBk are flatten unification variables--   Work item: [W] V fsk_aBh ~ fmv_aBi--Note that the inert wanteds are cyclic, because we do not rewrite-wanteds with wanteds.---Then we go into a loop when normalise the work-item, because we-use rewriteOrSame on the argument of V.--Conclusion: Don't make canRewrite context specific; instead use-[W] a ~ ty to rewrite a wanted iff 'a' is a unification variable.---------------------------------------------Here is a somewhat similar case:--   type family G a :: *--   blah :: (G a ~ Bool, Eq (G a)) => a -> a-   blah = error "urk"--   foo x = blah x--For foo we get-   [W] Eq (G a), G a ~ Bool-Flattening-   [W] G a ~ fmv, Eq fmv, fmv ~ Bool-We can't simplify away the Eq Bool unless we substitute for fmv.-Maybe that doesn't matter: we would still be left with unsolved-G a ~ Bool.-----------------------------Trac #9318 has a very simple program leading to--  [W] F Int ~ Int-  [W] F Int ~ Bool--We don't want to get "Error Int~Bool".  But if fmv's can rewrite-wanteds, we will--  [W] fmv ~ Int-  [W] fmv ~ Bool---->-  [W] Int ~ Bool---************************************************************************-*                                                                      *-*                FlattenEnv & FlatM-*             The flattening environment & monad-*                                                                      *-************************************************************************---}--type FlatWorkListRef = TcRef [Ct]  -- See Note [The flattening work list]--data FlattenEnv-  = FE { fe_mode    :: FlattenMode-       , fe_loc     :: CtLoc              -- See Note [Flattener CtLoc]-       , fe_flavour :: CtFlavour-       , fe_eq_rel  :: EqRel              -- See Note [Flattener EqRels]-       , fe_work    :: FlatWorkListRef }  -- See Note [The flattening work list]--data FlattenMode  -- Postcondition for all three: inert wrt the type substitution-  = FM_FlattenAll          -- Postcondition: function-free-  | FM_SubstOnly           -- See Note [Flattening under a forall]----  | FM_Avoid TcTyVar Bool  -- See Note [Lazy flattening]---                           -- Postcondition:---                           --  * tyvar is only mentioned in result under a rigid path---                           --    e.g.   [a] is ok, but F a won't happen---                           --  * If flat_top is True, top level is not a function application---                           --   (but under type constructors is ok e.g. [F a])--instance Outputable FlattenMode where-  ppr FM_FlattenAll = text "FM_FlattenAll"-  ppr FM_SubstOnly  = text "FM_SubstOnly"--eqFlattenMode :: FlattenMode -> FlattenMode -> Bool-eqFlattenMode FM_FlattenAll FM_FlattenAll = True-eqFlattenMode FM_SubstOnly  FM_SubstOnly  = True---  FM_Avoid tv1 b1 `eq` FM_Avoid tv2 b2 = tv1 == tv2 && b1 == b2-eqFlattenMode _  _ = False--mkFlattenEnv :: FlattenMode -> CtEvidence -> FlatWorkListRef -> FlattenEnv-mkFlattenEnv fm ctev ref = FE { fe_mode    = fm-                              , fe_loc     = ctEvLoc ctev-                              , fe_flavour = ctEvFlavour ctev-                              , fe_eq_rel  = ctEvEqRel ctev-                              , fe_work    = ref }---- | The 'FlatM' monad is a wrapper around 'TcS' with the following--- extra capabilities: (1) it offers access to a 'FlattenEnv';--- and (2) it maintains the flattening worklist.--- See Note [The flattening work list].-newtype FlatM a-  = FlatM { runFlatM :: FlattenEnv -> TcS a }--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--liftTcS :: TcS a -> FlatM a-liftTcS thing_inside-  = FlatM $ const thing_inside--emitFlatWork :: Ct -> FlatM ()--- See Note [The flattening work list]-emitFlatWork ct = FlatM $ \env -> updTcRef (fe_work env) (ct :)--runFlatten :: FlattenMode -> CtEvidence -> FlatM a -> TcS a--- Run thing_inside (which does flattening), and put all--- the work it generates onto the main work list--- See Note [The flattening work list]--- NB: The returned evidence is always the same as the original, but with--- perhaps a new CtLoc-runFlatten mode ev thing_inside-  = do { flat_ref <- newTcRef []-       ; let fmode = mkFlattenEnv mode ev flat_ref-       ; res <- runFlatM thing_inside fmode-       ; new_flats <- readTcRef flat_ref-       ; updWorkListTcS (add_flats new_flats)-       ; return res }-  where-    add_flats new_flats wl-      = wl { wl_funeqs = add_funeqs new_flats (wl_funeqs wl) }--    add_funeqs []     wl = wl-    add_funeqs (f:fs) wl = add_funeqs fs (f:wl)-      -- add_funeqs fs ws = reverse fs ++ ws-      -- e.g. add_funeqs [f1,f2,f3] [w1,w2,w3,w4]-      --        = [f3,f2,f1,w1,w2,w3,w4]--traceFlat :: String -> SDoc -> FlatM ()-traceFlat herald doc = liftTcS $ traceTcS herald doc--getFlatEnvField :: (FlattenEnv -> a) -> FlatM a-getFlatEnvField accessor-  = FlatM $ \env -> return (accessor env)--getEqRel :: FlatM EqRel-getEqRel = getFlatEnvField fe_eq_rel--getRole :: FlatM Role-getRole = eqRelRole <$> getEqRel--getFlavour :: FlatM CtFlavour-getFlavour = getFlatEnvField fe_flavour--getFlavourRole :: FlatM CtFlavourRole-getFlavourRole-  = do { flavour <- getFlavour-       ; eq_rel <- getEqRel-       ; return (flavour, eq_rel) }--getMode :: FlatM FlattenMode-getMode = getFlatEnvField fe_mode--getLoc :: FlatM CtLoc-getLoc = getFlatEnvField fe_loc--checkStackDepth :: Type -> FlatM ()-checkStackDepth ty-  = do { loc <- getLoc-       ; liftTcS $ checkReductionDepth loc ty }---- | Change the 'EqRel' in a 'FlatM'.-setEqRel :: EqRel -> FlatM a -> FlatM a-setEqRel new_eq_rel thing_inside-  = FlatM $ \env ->-    if new_eq_rel == fe_eq_rel env-    then runFlatM thing_inside env-    else runFlatM thing_inside (env { fe_eq_rel = new_eq_rel })---- | Change the 'FlattenMode' in a 'FlattenEnv'.-setMode :: FlattenMode -> FlatM a -> FlatM a-setMode new_mode thing_inside-  = FlatM $ \env ->-    if new_mode `eqFlattenMode` fe_mode env-    then runFlatM thing_inside env-    else runFlatM thing_inside (env { fe_mode = new_mode })---- | Use when flattening kinds/kind coercions. See--- Note [No derived kind equalities]-flattenKinds :: FlatM a -> FlatM a-flattenKinds thing_inside-  = FlatM $ \env ->-    let kind_flav = case fe_flavour env of-                      Given -> Given-                      _     -> Wanted WDeriv-    in-    runFlatM thing_inside (env { fe_eq_rel = NomEq, fe_flavour = kind_flav })--bumpDepth :: FlatM a -> FlatM a-bumpDepth (FlatM thing_inside)-  = FlatM $ \env -> do { let env' = env { fe_loc = bumpCtLocDepth (fe_loc env) }-                       ; thing_inside env' }--{--Note [The flattening work list]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The "flattening work list", held in the fe_work field of FlattenEnv,-is a list of CFunEqCans generated during flattening.  The key idea-is this.  Consider flattening (Eq (F (G Int) (H Bool)):-  * The flattener recursively calls itself on sub-terms before building-    the main term, so it will encounter the terms in order-              G Int-              H Bool-              F (G Int) (H Bool)-    flattening to sub-goals-              w1: G Int ~ fuv0-              w2: H Bool ~ fuv1-              w3: F fuv0 fuv1 ~ fuv2--  * 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-    of suspended calls.--  * So we want to process w1, w2 first.--  * So you might think that we should just use a FIFO deque for the work-list,-    so that putting adding goals in order w1,w2,w3 would mean we processed-    w1 first.--  * BUT suppose we have 'type instance G Int = H Char'.  Then processing-    w1 leads to a new goal-                w4: H Char ~ fuv0-    We do NOT want to put that on the far end of a deque!  Instead we want-    to put it at the *front* of the work-list so that we continue to work-    on it.--So the work-list structure is this:--  * The wl_funeqs (in TcS) is a LIFO stack; we push new goals (such as w4) on-    top (extendWorkListFunEq), and take new work from the top-    (selectWorkItem).--  * When flattening, emitFlatWork pushes new flattening goals (like-    w1,w2,w3) onto the flattening work list, fe_work, another-    push-down stack.--  * When we finish flattening, we *reverse* the fe_work stack-    onto the wl_funeqs stack (which brings w1 to the top).--The function runFlatten initialises the fe_work stack, and reverses-it onto wl_fun_eqs at the end.--Note [Flattener EqRels]-~~~~~~~~~~~~~~~~~~~~~~~-When flattening, we need to know which equality relation -- nominal-or representation -- we should be respecting. The only difference is-that we rewrite variables by representational equalities when fe_eq_rel-is ReprEq, and that we unwrap newtypes when flattening w.r.t.-representational equality.--Note [Flattener CtLoc]-~~~~~~~~~~~~~~~~~~~~~~-The flattener does eager type-family reduction.-Type families might loop, and we-don't want GHC to do so. A natural solution is to have a bounded depth-to these processes. A central difficulty is that such a solution isn't-quite compositional. For example, say it takes F Int 10 steps to get to Bool.-How many steps does it take to get from F Int -> F Int to Bool -> Bool?-10? 20? What about getting from Const Char (F Int) to Char? 11? 1? Hard to-know and hard to track. So, we punt, essentially. We store a CtLoc in-the FlattenEnv and just update the environment when recurring. In the-TyConApp case, where there may be multiple type families to flatten,-we just copy the current CtLoc into each branch. If any branch hits the-stack limit, then the whole thing fails.--A consequence of this is that setting the stack limits appropriately-will be essentially impossible. So, the official recommendation if a-stack limit is hit is to disable the check entirely. Otherwise, there-will be baffling, unpredictable errors.--Note [Lazy flattening]-~~~~~~~~~~~~~~~~~~~~~~-The idea of FM_Avoid mode is to flatten less aggressively.  If we have-       a ~ [F Int]-there seems to be no great merit in lifting out (F Int).  But if it was-       a ~ [G a Int]-then we *do* want to lift it out, in case (G a Int) reduces to Bool, say,-which gets rid of the occurs-check problem.  (For the flat_top Bool, see-comments above and at call sites.)--HOWEVER, the lazy flattening actually seems to make type inference go-*slower*, not faster.  perf/compiler/T3064 is a case in point; it gets-*dramatically* worse with FM_Avoid.  I think it may be because-floating the types out means we normalise them, and that often makes-them smaller and perhaps allows more re-use of previously solved-goals.  But to be honest I'm not absolutely certain, so I am leaving-FM_Avoid in the code base.  What I'm removing is the unique place-where it is *used*, namely in TcCanonical.canEqTyVar.--See also Note [Conservative unification check] in TcUnify, which gives-other examples where lazy flattening caused problems.--Bottom line: FM_Avoid is unused for now (Nov 14).-Note: T5321Fun got faster when I disabled FM_Avoid-      T5837 did too, but it's pathalogical anyway--Note [Phantoms in the flattener]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have--data Proxy p = Proxy--and we're flattening (Proxy ty) w.r.t. ReprEq. Then, we know that `ty`-is really irrelevant -- it will be ignored when solving for representational-equality later on. So, we omit flattening `ty` entirely. This may-violate the expectation of "xi"s for a bit, but the canonicaliser will-soon throw out the phantoms when decomposing a TyConApp. (Or, the-canonicaliser will emit an insoluble, in which case the unflattened version-yields a better error message anyway.)--Note [No derived kind equalities]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We call flattenKinds in two places: in flatten_co (Note [Flattening coercions])-and in flattenTyVar. The latter case is easier to understand; flattenKinds is-used to flatten the kind of a flat (i.e. inert) tyvar. Flattening a kind-naturally produces a coercion. This coercion is then used in the flattened type.-However, danger lurks if the flattening flavour (that is, the fe_flavour of the-FlattenEnv) is Derived: the coercion might be bottom. (This can happen when-looks up a kindvar in the inert set only to find a Derived equality, with-no coercion.) The solution is simple: ensure that the fe_flavour is not derived-when flattening a kind. This is what flattenKinds does.---}--{- *********************************************************************-*                                                                      *-*      Externally callable flattening functions                        *-*                                                                      *-*  They are all wrapped in runFlatten, so their                        *-*  flattening work gets put into the work list                         *-*                                                                      *-********************************************************************* -}--flatten :: FlattenMode -> CtEvidence -> TcType-        -> TcS (Xi, TcCoercion)-flatten mode ev ty-  = do { traceTcS "flatten {" (ppr mode <+> ppr ty)-       ; (ty', co) <- runFlatten mode ev (flatten_one ty)-       ; traceTcS "flatten }" (ppr ty')-       ; return (ty', co) }--flattenManyNom :: CtEvidence -> [TcType] -> TcS ([Xi], [TcCoercion])--- Externally-callable, hence runFlatten--- Flatten a bunch of types all at once; in fact they are--- always the arguments of a saturated type-family, so---      ctEvFlavour ev = Nominal--- and we want to flatten all at nominal role-flattenManyNom ev tys-  = do { traceTcS "flatten_many {" (vcat (map ppr tys))-       ; (tys', cos) <- runFlatten FM_FlattenAll ev (flatten_many_nom tys)-       ; traceTcS "flatten }" (vcat (map ppr tys'))-       ; return (tys', cos) }---{- *********************************************************************-*                                                                      *-*           The main flattening functions-*                                                                      *-********************************************************************* -}--{- Note [Flattening]-~~~~~~~~~~~~~~~~~~~~-  flatten ty  ==>   (xi, co)-    where-      xi has no type functions, unless they appear under ForAlls-         has no skolems that are mapped in the inert set-         has no filled-in metavariables-      co :: xi ~ ty--Note that it is flatten's job to flatten *every type function it sees*.-flatten is only called on *arguments* to type functions, by canEqGiven.--Flattening also:-  * zonks, removing any metavariables, and-  * applies the substitution embodied in the inert set--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 these facts:-  (F1) typeKind(xi) succeeds and returns a fully zonked kind-  (F2) 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,-then the right-hand type of co will be the zonked version of ty.-It is for this reason that we-occasionally have to explicitly zonk, when (co :: xi ~ ty) is important-even before we zonk the whole program. For example, see the FTRNotFollowed-case in flattenTyVar.--Why have these invariants on flattening? Really, they're both to ensure-invariant (F1), which is a Good Thing because we sometimes use typeKind-during canonicalisation, and we want this kind to be zonked (e.g., see-TcCanonical.homogeniseRhsKind). Invariant (F2) is needed solely to support-(F1). It is relied on in one place:-- - The FTRNotFollowed case in flattenTyVar. Here, we have a tyvar- that cannot be reduced any further (that is, no equality over the tyvar- is in the inert set such that the inert equality can rewrite the constraint- at hand, and it is not a filled-in metavariable).- But its kind might still not be flat,- if it mentions a type family or a variable that can be rewritten. Flattened- types have flattened kinds (see below), so we must flatten the kind. Here is- an example:--   let kappa be a filled-in metavariable such that kappa := k.-   [G] co :: k ~ Type--   We are flattening-     a :: kappa-   where a is a skolem.-- We end up in the FTRNotFollowed case, but we need to flatten the kind kappa.- Flattening kappa yields (Type, kind_co), where kind_co :: Type ~ k. Note that the- right-hand type of kind_co is *not* kappa, because (F1) tells us it's zonk(kappa),- which is k. Now, we return (a |> sym kind_co). If we are to uphold (F1), then- the right-hand type of (sym kind_co) had better be fully zonked. In other words,- the left-hand type of kind_co needs to be zonked... which is precisely what (F2)- guarantees.--In order to support (F2), we require that ctEvCoercion, when called on a-zonked CtEvidence, always returns a zonked coercion. See Note [Given in-ctEvCoercion]. This requirement comes into play in flatten_tyvar2. (I suppose-we could move the logic from ctEvCoercion to flatten_tyvar2, but it's much-easier to do in ctEvCoercion.)--Flattening a type also means flattening its kind. In the case of a type-variable whose kind mentions a type family, this might mean that the result-of flattening has a cast in it.--Recall that in comments we use alpha[flat = ty] to represent a-flattening skolem variable alpha which has been generated to stand in-for ty.------- Example of flattening a constraint: -------  flatten (List (F (G Int)))  ==>  (xi, cc)-    where-      xi  = List alpha-      cc  = { G Int ~ beta[flat = G Int],-              F beta ~ alpha[flat = F beta] }-Here-  * alpha and beta are 'flattening skolem variables'.-  * All the constraints in cc are 'given', and all their coercion terms-    are the identity.--NB: Flattening Skolems only occur in canonical constraints, which-are never zonked, so we don't need to worry about zonking doing-accidental unflattening.--Note that we prefer to leave type synonyms unexpanded when possible,-so when the flattener encounters one, it first asks whether its-transitive expansion contains any type function applications.  If so,-it expands the synonym and proceeds; if not, it simply returns the-unexpanded synonym.--Note [flatten_many performance]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-In programs with lots of type-level evaluation, flatten_many becomes-part of a tight loop. For example, see test perf/compiler/T9872a, which-calls flatten_many a whopping 7,106,808 times. It is thus important-that flatten_many be efficient.--Performance testing showed that the current implementation is indeed-efficient. It's critically important that zipWithAndUnzipM be-specialized to TcS, and it's also quite helpful to actually `inline`-it. On test T9872a, here are the allocation stats (Dec 16, 2014):-- * Unspecialized, uninlined:     8,472,613,440 bytes allocated in the heap- * Specialized, uninlined:       6,639,253,488 bytes allocated in the heap- * Specialized, inlined:         6,281,539,792 bytes allocated in the heap--To improve performance even further, flatten_many_nom is split off-from flatten_many, as nominal equality is the common case. This would-be natural to write using mapAndUnzipM, but even inlined, that function-is not as performant as a hand-written loop.-- * mapAndUnzipM, inlined:        7,463,047,432 bytes allocated in the heap- * hand-written recursion:       5,848,602,848 bytes allocated in the heap--If you make any change here, pay close attention to the T9872{a,b,c} tests-and T5321Fun.--If we need to make this yet more performant, a possible way forward is to-duplicate the flattener code for the nominal case, and make that case-faster. This doesn't seem quite worth it, yet.--}--flatten_many :: [Role] -> [Type] -> FlatM ([Xi], [Coercion])--- Coercions :: Xi ~ Type, at roles given--- Returns True iff (no flattening happened)--- NB: The EvVar inside the 'fe_ev :: CtEvidence' is unused,---     we merely want (a) Given/Solved/Derived/Wanted info---                    (b) the GivenLoc/WantedLoc for when we create new evidence-flatten_many roles tys--- See Note [flatten_many performance]-  = inline zipWithAndUnzipM go roles tys-  where-    go Nominal          ty = setEqRel NomEq  $ flatten_one ty-    go Representational ty = setEqRel ReprEq $ flatten_one ty-    go Phantom          ty = -- See Note [Phantoms in the flattener]-                             do { ty <- liftTcS $ zonkTcType ty-                                ; return ( ty, mkReflCo Phantom ty ) }---- | Like 'flatten_many', but assumes that every role is nominal.-flatten_many_nom :: [Type] -> FlatM ([Xi], [Coercion])-flatten_many_nom [] = return ([], [])--- See Note [flatten_many performance]-flatten_many_nom (ty:tys)-  = do { (xi, co) <- flatten_one ty-       ; (xis, cos) <- flatten_many_nom tys-       ; return (xi:xis, co:cos) }--------------------flatten_one :: TcType -> FlatM (Xi, Coercion)--- Flatten a type to get rid of type function applications, returning--- the new type-function-free type, and a collection of new equality--- constraints.  See Note [Flattening] for more detail.------ Postcondition: Coercion :: Xi ~ TcType--- The role on the result coercion matches the EqRel in the FlattenEnv--flatten_one xi@(LitTy {})-  = do { role <- getRole-       ; return (xi, mkReflCo role xi) }--flatten_one (TyVarTy tv)-  = flattenTyVar tv--flatten_one (AppTy ty1 ty2)-  = do { (xi1,co1) <- flatten_one ty1-       ; eq_rel <- getEqRel-       ; case (eq_rel, nextRole xi1) of-           -- We need nextRole here because although ty1 definitely-           -- isn't a TyConApp, xi1 might be.-           -- ToDo: but can such a substitution change roles??-           (NomEq,  _)                -> flatten_rhs xi1 co1 NomEq-           (ReprEq, Nominal)          -> flatten_rhs xi1 co1 NomEq-           (ReprEq, Representational) -> flatten_rhs xi1 co1 ReprEq-           (ReprEq, Phantom)          -> -- See Note [Phantoms in the flattener]-             do { ty2 <- liftTcS $ zonkTcType ty2-                ; return ( mkAppTy xi1 ty2-                         , mkAppCo co1 (mkNomReflCo ty2)) } }-  where-    flatten_rhs xi1 co1 eq_rel2-      = do { (xi2,co2) <- setEqRel eq_rel2 $ flatten_one ty2-           ; role1 <- getRole-           ; let role2 = eqRelRole eq_rel2-           ; traceFlat "flatten/appty"-                       (ppr ty1 $$ ppr ty2 $$ ppr xi1 $$-                        ppr xi2 $$ ppr role1 $$ ppr role2)--           ; return ( mkAppTy xi1 xi2-                    , mkTransAppCo role1 co1 xi1 ty1-                                   role2 co2 xi2 ty2-                                   role1 ) }  -- output should match fmode--flatten_one (TyConApp tc tys)-  -- Expand type synonyms that mention type families-  -- on the RHS; see Note [Flattening synonyms]-  | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys-  , let expanded_ty = mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys'-  = do { mode <- getMode-       ; case mode of-           FM_FlattenAll | not (isFamFreeTyCon tc)-                         -> flatten_one expanded_ty-           _             -> flatten_ty_con_app tc tys }--  -- Otherwise, it's a type function application, and we have to-  -- flatten it away as well, and generate a new given equality constraint-  -- between the application and a newly generated flattening skolem variable.-  | isTypeFamilyTyCon tc-  = flatten_fam_app tc tys--  -- For * a normal data type application-  --     * data family application-  -- we just recursively flatten the arguments.-  | otherwise--- FM_Avoid stuff commented out; see Note [Lazy flattening]---  , let fmode' = case fmode of  -- Switch off the flat_top bit in FM_Avoid---                   FE { fe_mode = FM_Avoid tv _ }---                     -> fmode { fe_mode = FM_Avoid tv False }---                   _ -> fmode-  = flatten_ty_con_app tc tys--flatten_one (FunTy ty1 ty2)-  = do { (xi1,co1) <- flatten_one ty1-       ; (xi2,co2) <- flatten_one ty2-       ; role <- getRole-       ; return (mkFunTy xi1 xi2, mkFunCo role co1 co2) }--flatten_one ty@(ForAllTy {})--- TODO (RAE): This is inadequate, as it doesn't flatten the kind of--- the bound tyvar. Doing so will require carrying around a substitution--- and the usual substTyVarBndr-like silliness. Argh.---- We allow for-alls when, but only when, no type function--- applications inside the forall involve the bound type variables.-  = do { let (bndrs, rho) = splitForAllTyVarBndrs ty-             tvs          = binderVars bndrs-       ; (rho', co) <- setMode FM_SubstOnly $ flatten_one rho-                         -- Substitute only under a forall-                         -- See Note [Flattening under a forall]-       ; return (mkForAllTys bndrs rho', mkHomoForAllCos tvs co) }--flatten_one (CastTy ty g)-  = do { (xi, co) <- flatten_one ty-       ; (g', _) <- flatten_co g--       ; return (mkCastTy xi g', castCoercionKind co g' g) }--flatten_one (CoercionTy co) = first mkCoercionTy <$> flatten_co co---- | "Flatten" a coercion. Really, just flatten the types that it coerces--- between and then use transitivity. See Note [Flattening coercions]-flatten_co :: Coercion -> FlatM (Coercion, Coercion)-flatten_co co-  = do { co <- liftTcS $ zonkCo co  -- see Note [Zonking when flattening a coercion]-       ; let (Pair ty1 ty2, role) = coercionKindRole co-       ; (co1, co2) <- flattenKinds $-                       do { (_, co1) <- flatten_one ty1-                          ; (_, co2) <- flatten_one ty2-                          ; return (co1, co2) }-       ; let co' = downgradeRole role Nominal co1 `mkTransCo`-                   co `mkTransCo`-                   mkSymCo (downgradeRole role Nominal co2)-             -- kco :: (ty1' ~r ty2') ~N (ty1 ~r ty2)-             kco = mkTyConAppCo Nominal (equalityTyCon role)-                     [ mkKindCo co1, mkKindCo co2, co1, co2 ]-       ; traceFlat "flatten_co" (vcat [ ppr co, ppr co1, ppr co2, ppr co' ])-       ; env_role <- getRole-       ; return (co', mkProofIrrelCo env_role kco co' co) }--flatten_ty_con_app :: TyCon -> [TcType] -> FlatM (Xi, Coercion)-flatten_ty_con_app tc tys-  = do { eq_rel <- getEqRel-       ; let role = eqRelRole eq_rel-       ; (xis, cos) <- case eq_rel of-                         NomEq  -> flatten_many_nom tys-                         ReprEq -> flatten_many (tyConRolesRepresentational tc) tys-       ; return (mkTyConApp tc xis, mkTyConAppCo role tc cos) }--{--Note [Flattening coercions]-~~~~~~~~~~~~~~~~~~~~~~~~~~~-Because a flattened type has a flattened kind, we also must "flatten"-coercions as we walk through a type. Otherwise, the "from" type of-the coercion might not match the (now flattened) kind of the type-that it's casting. flatten_co does the work, taking a coercion of-type (ty1 ~ ty2) and flattening it to have type (fty1 ~ fty2),-where flatten(ty1) = fty1 and flatten(ty2) = fty2.--In other words:--  If  r1 is a role-      co :: s ~r1 t-      flatten_co co = (fco, kco)-      r2 is the role in the FlatM--  then-      fco :: fs ~r1 ft-      fs, ft are flattened types-      kco :: fco ~r2 co--The second return value of flatten_co is always a ProofIrrelCo. As-such, it doesn't contain any information the caller doesn't have and-might not be necessary in whatever comes next.--Note that a flattened coercion might have unzonked metavariables or-type functions in it -- but its *kind* will not. Instead of just flattening-the kinds and using mkTransCo, we could actually flatten the coercion-structurally. But doing so seems harder than simply flattening the types.--Note [Zonking when flattening a coercion]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-The first step in flatten_co (see Note [Flattening coercions]) is to-zonk the input. This is necessary because we want to ensure the following-invariants (c.f. the invariants (F1) and (F2) in Note [Flattening])-  If-    (co', kco) <- flatten_co co-  Then-    (FC1) coercionKind(co') succeeds and produces a fully zonked pair of kinds-    (FC2) kco :: co' ~ zonk(co)-We must zonk to ensure (1). This is because fco is built by using mkTransCo-to build up on the input co. But if the only action that happens during-flattening ty1 and ty2 is to zonk metavariables, the coercions returned-(co1 and co2) will be reflexive. The mkTransCo calls will drop the reflexive-coercions and co' will be the same as co -- with unzonked kinds.--These invariants are necessary to uphold (F1) and (F2) in the CastTy and-CoercionTy cases.--We zonk right at the beginning to avoid duplicating work when flattening the-ty1 and ty2.--Note [Flattening synonyms]-~~~~~~~~~~~~~~~~~~~~~~~~~~-Not expanding synonyms aggressively improves error messages, and-keeps types smaller. But we need to take care.--Suppose-   type T a = a -> a-and we want to flatten the type (T (F a)).  Then we can safely flatten-the (F a) to a skolem, and return (T fsk).  We don't need to expand the-synonym.  This works because TcTyConAppCo can deal with synonyms-(unlike TyConAppCo), see Note [TcCoercions] in TcEvidence.--But (Trac #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.---Note [Flattening under a forall]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Under a forall, we-  (a) MUST apply the inert substitution-  (b) MUST NOT flatten type family applications-Hence FMSubstOnly.--For (a) consider   c ~ a, a ~ T (forall b. (b, [c]))-If we don't apply the c~a substitution to the second constraint-we won't see the occurs-check error.--For (b) consider  (a ~ forall b. F a b), we don't want to flatten-to     (a ~ forall b.fsk, F a b ~ fsk)-because now the 'b' has escaped its scope.  We'd have to flatten to-       (a ~ forall b. fsk b, forall b. F a b ~ fsk b)-and we have not begun to think about how to make that work!--************************************************************************-*                                                                      *-             Flattening a type-family application-*                                                                      *-************************************************************************--}--flatten_fam_app :: TyCon -> [TcType] -> FlatM (Xi, Coercion)-  --   flatten_fam_app            can be over-saturated-  --   flatten_exact_fam_app       is exactly saturated-  --   flatten_exact_fam_app_fully lifts out the application to top level-  -- Postcondition: Coercion :: Xi ~ F tys-flatten_fam_app tc tys  -- Can be over-saturated-    = ASSERT2( tys `lengthAtLeast` tyConArity tc-             , ppr tc $$ ppr (tyConArity tc) $$ ppr tys)-                 -- Type functions are saturated-                 -- The type function might be *over* saturated-                 -- in which case the remaining arguments should-                 -- be dealt with by AppTys-      do { let (tys1, tys_rest) = splitAt (tyConArity tc) tys-         ; (xi1, co1) <- flatten_exact_fam_app tc tys1-               -- co1 :: xi1 ~ F tys1--               -- all Nominal roles b/c the tycon is oversaturated-         ; (xis_rest, cos_rest) <- flatten_many (repeat Nominal) tys_rest-               -- cos_res :: xis_rest ~ tys_rest--         ; return ( mkAppTys xi1 xis_rest   -- NB mkAppTys: rhs_xi might not be a type variable-                                            --    cf Trac #5655-                  , mkAppCos co1 cos_rest-                            -- (rhs_xi :: F xis) ; (F cos :: F xis ~ F tys)-                  ) }--flatten_exact_fam_app, flatten_exact_fam_app_fully ::-  TyCon -> [TcType] -> FlatM (Xi, Coercion)--flatten_exact_fam_app tc tys-  = do { mode <- getMode-       ; role <- getRole-       ; case mode of-               -- These roles are always going to be Nominal for now,-               -- but not if #8177 is implemented-           FM_SubstOnly -> do { let roles = tyConRolesX role tc-                              ; (xis, cos) <- flatten_many roles tys-                              ; return ( mkTyConApp tc xis-                                       , mkTyConAppCo role tc cos ) }--           FM_FlattenAll -> flatten_exact_fam_app_fully tc tys }----       FM_Avoid tv flat_top ->---         do { (xis, cos) <- flatten_many fmode roles tys---            ; if flat_top || tv `elemVarSet` tyCoVarsOfTypes xis---              then flatten_exact_fam_app_fully fmode tc tys---              else return ( mkTyConApp tc xis---                          , mkTcTyConAppCo (feRole fmode) tc cos ) }--flatten_exact_fam_app_fully tc tys-  -- See Note [Reduce type family applications eagerly]-  = try_to_reduce tc tys False id $-    do { -- First, flatten the arguments-       ; (xis, cos) <- setEqRel NomEq    $-                       flatten_many_nom tys-       ; eq_rel   <- getEqRel-       ; cur_flav <- getFlavour-       ; let role   = eqRelRole eq_rel-             ret_co = mkTyConAppCo role tc cos-              -- ret_co :: F xis ~ F tys--        -- Now, look in the cache-       ; mb_ct <- liftTcS $ lookupFlatCache tc xis-       ; case mb_ct of-           Just (co, rhs_ty, flav)  -- co :: F xis ~ fsk-                -- flav is [G] or [WD]-                -- See Note [Type family equations] in TcSMonad-             | (NotSwapped, _) <- flav `funEqCanDischargeF` cur_flav-             ->  -- Usable hit in the flat-cache-                do { traceFlat "flatten/flat-cache hit" $ (ppr tc <+> ppr xis $$ ppr rhs_ty)-                   ; (fsk_xi, fsk_co) <- flatten_one rhs_ty-                          -- The fsk may already have been unified, so flatten it-                          -- fsk_co :: fsk_xi ~ fsk-                   ; return ( fsk_xi-                            , fsk_co `mkTransCo`-                              maybeSubCo eq_rel (mkSymCo co) `mkTransCo`-                              ret_co ) }-                                    -- :: fsk_xi ~ F xis--           -- Try to reduce the family application right now-           -- See Note [Reduce type family applications eagerly]-           _ -> try_to_reduce tc xis True (`mkTransCo` ret_co) $-                do { loc <- getLoc-                   ; (ev, co, fsk) <- liftTcS $ newFlattenSkolem cur_flav loc tc xis--                   -- The new constraint (F xis ~ fsk) is not necessarily inert-                   -- (e.g. the LHS may be a redex) so we must put it in the work list-                   ; let ct = CFunEqCan { cc_ev     = ev-                                        , cc_fun    = tc-                                        , cc_tyargs = xis-                                        , cc_fsk    = fsk }-                   ; emitFlatWork ct--                   ; traceFlat "flatten/flat-cache miss" $-                         (ppr tc <+> ppr xis $$ ppr fsk $$ ppr ev)--                   -- NB: fsk's kind is already flattend because-                   --     the xis are flattened-                   ; return (mkTyVarTy fsk, maybeSubCo eq_rel (mkSymCo co)-                                            `mkTransCo` ret_co ) }-        }--  where-    try_to_reduce :: TyCon   -- F, family tycon-                  -> [Type]  -- args, not necessarily flattened-                  -> Bool    -- add to the flat cache?-                  -> (   Coercion     -- :: xi ~ F args-                      -> Coercion )   -- what to return from outer function-                  -> FlatM (Xi, Coercion)  -- continuation upon failure-                  -> FlatM (Xi, Coercion)-    try_to_reduce tc tys cache update_co k-      = do { checkStackDepth (mkTyConApp tc tys)-           ; mb_match <- liftTcS $ matchFam tc tys-           ; case mb_match of-               Just (norm_co, norm_ty)-                 -> do { traceFlat "Eager T.F. reduction success" $-                         vcat [ ppr tc, ppr tys, ppr norm_ty-                              , ppr norm_co <+> dcolon-                                            <+> ppr (coercionKind norm_co)-                              , ppr cache]-                       ; (xi, final_co) <- bumpDepth $ flatten_one norm_ty-                       ; eq_rel <- getEqRel-                       ; let co = maybeSubCo eq_rel norm_co-                                  `mkTransCo` mkSymCo final_co-                       ; flavour <- getFlavour-                           -- NB: only extend cache with nominal equalities-                       ; when (cache && eq_rel == NomEq) $-                         liftTcS $-                         extendFlatCache tc tys ( co, xi, flavour )-                       ; return ( xi, update_co $ mkSymCo co ) }-               Nothing -> k }--{- Note [Reduce type family applications eagerly]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-If we come across a type-family application like (Append (Cons x Nil) t),-then, rather than flattening to a skolem etc, we may as well just reduce-it on the spot to (Cons x t).  This saves a lot of intermediate steps.-Examples that are helped are tests T9872, and T5321Fun.--Performance testing indicates that it's best to try this *twice*, once-before flattening arguments and once after flattening arguments.-Adding the extra reduction attempt before flattening arguments cut-the allocation amounts for the T9872{a,b,c} tests by half.--An example of where the early reduction appears helpful:--  type family Last x where-    Last '[x]     = x-    Last (h ': t) = Last t--  workitem: (x ~ Last '[1,2,3,4,5,6])--Flattening the argument never gets us anywhere, but trying to flatten-it at every step is quadratic in the length of the list. Reducing more-eagerly makes simplifying the right-hand type linear in its length.--Testing also indicated that the early reduction should *not* use the-flat-cache, but that the later reduction *should*. (Although the-effect was not large.)  Hence the Bool argument to try_to_reduce.  To-me (SLPJ) this seems odd; I get that eager reduction usually succeeds;-and if don't use the cache for eager reduction, we will miss most of-the opportunities for using it at all.  More exploration would be good-here.--At the end, once we've got a flat rhs, we extend the flatten-cache to record-the result. Doing so can save lots of work when the same redex shows up more-than once. Note that we record the link from the redex all the way to its-*final* value, not just the single step reduction. Interestingly, using the-flat-cache for the first reduction resulted in an increase in allocations-of about 3% for the four T9872x tests. However, using the flat-cache in-the later reduction is a similar gain. I (Richard E) don't currently (Dec '14)-have any knowledge as to *why* these facts are true.--************************************************************************-*                                                                      *-             Flattening a type variable-*                                                                      *-********************************************************************* -}---- | The result of flattening a tyvar "one step".-data FlattenTvResult-  = FTRNotFollowed-      -- ^ The inert set doesn't make the tyvar equal to anything else--  | FTRFollowed TcType Coercion-      -- ^ The tyvar flattens to a not-necessarily flat other type.-      -- co :: new type ~r old type, where the role is determined by-      -- the FlattenEnv--flattenTyVar :: TyVar -> FlatM (Xi, Coercion)-flattenTyVar tv-  = do { mb_yes <- flatten_tyvar1 tv-       ; case mb_yes of-           FTRFollowed ty1 co1  -- Recur-             -> do { (ty2, co2) <- flatten_one ty1-                   -- ; traceFlat "flattenTyVar2" (ppr tv $$ ppr ty2)-                   ; return (ty2, co2 `mkTransCo` co1) }--           FTRNotFollowed   -- Done-             -> do { let orig_kind = tyVarKind tv-                   ; (_new_kind, kind_co) <- flattenKinds $-                                             flatten_one orig_kind-                   ; let Pair _ zonked_kind = coercionKind kind_co-             -- NB: kind_co :: _new_kind ~ zonked_kind-             -- But zonked_kind is not necessarily the same as orig_kind-             -- because that may have filled-in metavars.-             -- Moreover the returned Xi type must be well-kinded-             -- (e.g. in canEqTyVarTyVar we use getCastedTyVar_maybe)-             -- If you remove it, then e.g. dependent/should_fail/T11407 panics-             -- See also Note [Flattening]-             -- An alternative would to use (zonkTcType orig_kind),-             -- but some simple measurements suggest that's a little slower-                   ; let tv'    = setTyVarKind tv zonked_kind-                         tv_ty' = mkTyVarTy tv'-                         ty'    = tv_ty' `mkCastTy` mkSymCo kind_co--                   ; role <- getRole-                   ; return (ty', mkReflCo role tv_ty'-                                  `mkCoherenceLeftCo` mkSymCo kind_co) } }--flatten_tyvar1 :: TcTyVar -> FlatM FlattenTvResult--- "Flattening" a type variable means to apply the substitution to it--- Specifically, look up the tyvar in---   * the internal MetaTyVar box---   * the inerts--- See also the documentation for FlattenTvResult--flatten_tyvar1 tv-  = do { mb_ty <- liftTcS $ isFilledMetaTyVar_maybe tv-       ; case mb_ty of-           Just ty -> do { traceFlat "Following filled tyvar" (ppr tv <+> equals <+> ppr ty)-                         ; role <- getRole-                         ; return (FTRFollowed ty (mkReflCo role ty)) } ;-           Nothing -> do { traceFlat "Unfilled tyvar" (ppr tv)-                         ; fr <- getFlavourRole-                         ; flatten_tyvar2 tv fr } }--flatten_tyvar2 :: TcTyVar -> CtFlavourRole -> FlatM FlattenTvResult--- The tyvar is not a filled-in meta-tyvar--- Try in the inert equalities--- See Definition [Applying a generalised substitution] in TcSMonad--- See Note [Stability of flattening] in TcSMonad--flatten_tyvar2 tv fr@(_, eq_rel)-  = do { ieqs <- liftTcS $ getInertEqs-       ; mode <- getMode-       ; case lookupDVarEnv ieqs tv of-           Just (ct:_)   -- If the first doesn't work,-                         -- the subsequent ones won't either-             | CTyEqCan { cc_ev = ctev, cc_tyvar = tv-                        , 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" (ppr mode <+> ppr tv <+> equals <+> ppr rhs_ty $$ ppr ctev)-                    ; let rewrite_co1 = mkSymCo (ctEvCoercion ctev)-                          rewrite_co  = case (ct_eq_rel, eq_rel) of-                            (ReprEq, _rel)  -> ASSERT( _rel == ReprEq )-                                    -- if this ASSERT fails, then-                                    -- eqCanRewriteFR answered incorrectly-                                               rewrite_co1-                            (NomEq, NomEq)  -> rewrite_co1-                            (NomEq, ReprEq) -> mkSubCo rewrite_co1--                    ; return (FTRFollowed rhs_ty rewrite_co) }-                    -- NB: ct is Derived then fmode must be also, hence-                    -- we are not going to touch the returned coercion-                    -- so ctEvCoercion is fine.--           _other -> return FTRNotFollowed }--{--Note [An alternative story for the inert substitution]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-(This entire note is just background, left here in case we ever want- to return the the previous state of affairs)--We used (GHC 7.8) to have this story for the inert substitution inert_eqs-- * 'a' is not in fvs(ty)- * They are *inert* in the weaker sense that there is no infinite chain of-   (i1 `eqCanRewrite` i2), (i2 `eqCanRewrite` i3), etc--This means that flattening must be recursive, but it does allow-  [G] a ~ [b]-  [G] b ~ Maybe c--This avoids "saturating" the Givens, which can save a modest amount of work.-It is easy to implement, in TcInteract.kick_out, by only kicking out an inert-only if (a) the work item can rewrite the inert AND-        (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-is an example; all the constraints here are Givens--             [G] a ~ TF (a,Int)-    -->-    work     TF (a,Int) ~ fsk-    inert    fsk ~ a--    --->-    work     fsk ~ (TF a, TF Int)-    inert    fsk ~ a--    --->-    work     a ~ (TF a, TF Int)-    inert    fsk ~ a--    ---> (attempting to flatten (TF a) so that it does not mention a-    work     TF a ~ fsk2-    inert    a ~ (fsk2, TF Int)-    inert    fsk ~ (fsk2, TF Int)--    ---> (substitute for a)-    work     TF (fsk2, TF Int) ~ fsk2-    inert    a ~ (fsk2, TF Int)-    inert    fsk ~ (fsk2, TF Int)--    ---> (top-level reduction, re-orient)-    work     fsk2 ~ (TF fsk2, TF Int)-    inert    a ~ (fsk2, TF Int)-    inert    fsk ~ (fsk2, TF Int)--    ---> (attempt to flatten (TF fsk2) to get rid of fsk2-    work     TF fsk2 ~ fsk3-    work     fsk2 ~ (fsk3, TF Int)-    inert    a   ~ (fsk2, TF Int)-    inert    fsk ~ (fsk2, TF Int)--    --->-    work     TF fsk2 ~ fsk3-    inert    fsk2 ~ (fsk3, TF Int)-    inert    a   ~ ((fsk3, TF Int), TF Int)-    inert    fsk ~ ((fsk3, TF Int), TF Int)--Because the incoming given rewrites all the inert givens, we get more and-more duplication in the inert set.  But this really only happens in pathalogical-casee, so we don't care.---************************************************************************-*                                                                      *-             Unflattening-*                                                                      *-************************************************************************--An unflattening example:-    [W] F a ~ alpha-flattens to-    [W] F a ~ fmv   (CFunEqCan)-    [W] fmv ~ alpha (CTyEqCan)-We must solve both!--}--unflattenWanteds :: Cts -> Cts -> TcS Cts-unflattenWanteds tv_eqs funeqs- = do { tclvl    <- getTcLevel--      ; traceTcS "Unflattening" $ braces $-        vcat [ text "Funeqs =" <+> pprCts funeqs-             , text "Tv eqs =" <+> pprCts tv_eqs ]--         -- Step 1: unflatten the CFunEqCans, except if that causes an occurs check-         -- Occurs check: consider  [W] alpha ~ [F alpha]-         --                 ==> (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-      ; traceTcS "Unflattening 1" $ braces (pprCts funeqs)--          -- Step 2: unify the tv_eqs, if possible-      ; tv_eqs  <- foldrBagM (unflatten_eq tclvl) emptyCts tv_eqs-      ; traceTcS "Unflattening 2" $ braces (pprCts tv_eqs)--          -- Step 3: fill any remaining fmvs with fresh unification variables-      ; funeqs <- mapBagM finalise_funeq funeqs-      ; 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--      ; let all_flat = tv_eqs `andCts` funeqs-      ; traceTcS "Unflattening done" $ braces (pprCts all_flat)--      ; return all_flat }-  where-    -----------------    unflatten_funeq :: Ct -> Cts -> TcS Cts-    unflatten_funeq ct@(CFunEqCan { cc_fun = tc, cc_tyargs = xis-                                  , cc_fsk = fmv, cc_ev = ev }) rest-      = do {   -- fmv should be an un-filled flatten meta-tv;-               -- we now fix its final value by filling it, being careful-               -- to observe the occurs check.  Zonking will eliminate it-               -- altogether in due course-             rhs' <- zonkTcType (mkTyConApp tc xis)-           ; case occCheckExpand fmv rhs' of-               Just rhs''    -- Normal case: fill the tyvar-                 -> do { setReflEvidence ev NomEq rhs''-                       ; unflattenFmv fmv rhs''-                       ; return rest }--               Nothing ->  -- Occurs check-                          return (ct `consCts` rest) }--    unflatten_funeq other_ct _-      = pprPanic "unflatten_funeq" (ppr other_ct)--    -----------------    finalise_funeq :: Ct -> TcS Ct-    finalise_funeq (CFunEqCan { cc_fsk = fmv, cc_ev = ev })-      = do { demoteUnfilledFmv fmv-           ; return (mkNonCanonical ev) }-    finalise_funeq ct = pprPanic "finalise_funeq" (ppr ct)--    -----------------    unflatten_eq :: TcLevel -> Ct -> Cts -> TcS Cts-    unflatten_eq tclvl ct@(CTyEqCan { cc_ev = ev, cc_tyvar = tv-                                    , cc_rhs = rhs, cc_eq_rel = eq_rel }) rest-      | isFmvTyVar tv   -- Previously these fmvs were untouchable,-                        -- but now they are touchable-                        -- NB: unlike unflattenFmv, filling a fmv here /does/-                        --     bump the unification count; it is "improvement"-                        -- Note [Unflattening can force the solver to iterate]-      = ASSERT2( tyVarKind tv `eqType` typeKind rhs, ppr ct )-           -- CTyEqCan invariant should ensure this is true-        do { is_filled <- isFilledMetaTyVar tv-           ; elim <- case is_filled of-               False -> do { traceTcS "unflatten_eq 2" (ppr ct)-                           ; tryFill      ev eq_rel       tv rhs }-               True  -> do { traceTcS "unflatten_eq 2" (ppr ct)-                           ; try_fill_rhs ev eq_rel tclvl tv rhs }-           ; if elim then return rest-                     else return (ct `consCts` rest) }--      | otherwise-      = return (ct `consCts` rest)--    unflatten_eq _ ct _ = pprPanic "unflatten_irred" (ppr ct)--    -----------------    try_fill_rhs ev eq_rel tclvl lhs_tv rhs-         -- Constraint is lhs_tv ~ rhs_tv,-         -- and lhs_tv is filled, so try RHS-      | Just (rhs_tv, co) <- getCastedTyVar_maybe rhs-                             -- co :: kind(rhs_tv) ~ kind(lhs_tv)-      , isFmvTyVar rhs_tv || (isTouchableMetaTyVar tclvl rhs_tv-                              && not (isSigTyVar rhs_tv))-                              -- LHS is a filled fmv, and so is a type-                              -- family application, which a SigTv should-                              -- not unify with-      = do { is_filled <- isFilledMetaTyVar rhs_tv-           ; if is_filled then return False-             else tryFill ev eq_rel rhs_tv-                          (mkTyVarTy lhs_tv `mkCastTy` mkSymCo co) }--      | otherwise-      = return False--    -----------------    finalise_eq :: Ct -> Cts -> TcS Cts-    finalise_eq (CTyEqCan { cc_ev = ev, cc_tyvar = tv-                          , cc_rhs = rhs, cc_eq_rel = eq_rel }) rest-      | isFmvTyVar tv-      = do { ty1 <- zonkTcTyVar tv-           ; rhs' <- zonkTcType rhs-           ; if ty1 `tcEqType` rhs'-             then do { setReflEvidence ev eq_rel rhs'-                     ; return rest }-             else return (mkNonCanonical ev `consCts` rest) }--      | otherwise-      = return (mkNonCanonical ev `consCts` rest)--    finalise_eq ct _ = pprPanic "finalise_irred" (ppr ct)--tryFill :: CtEvidence -> EqRel -> TcTyVar -> TcType -> TcS Bool--- (tryFill tv rhs ev) assumes 'tv' is an /un-filled/ MetaTv--- If tv does not appear in 'rhs', it set tv := rhs,--- binds the evidence (which should be a CtWanted) to Refl<rhs>--- and return True.  Otherwise returns False-tryFill ev eq_rel tv rhs-  = ASSERT2( not (isGiven ev), ppr ev )-    do { rhs' <- zonkTcType rhs-       ; case tcGetTyVar_maybe rhs' of {-            Just tv' | tv == tv' -> do { setReflEvidence ev eq_rel rhs-                                       ; return True } ;-            _other ->-    do { case occCheckExpand tv rhs' of-           Just rhs''    -- Normal case: fill the tyvar-             -> do { setReflEvidence ev eq_rel rhs''-                   ; unifyTyVar tv rhs''-                   ; return True }--           Nothing ->  -- Occurs check-                      return False } } }--setReflEvidence :: CtEvidence -> EqRel -> TcType -> TcS ()-setReflEvidence ev eq_rel rhs-  = setEvBindIfWanted ev (EvCoercion refl_co)-  where-    refl_co = mkTcReflCo (eqRelRole eq_rel) rhs--{--Note [Unflatten using funeqs first]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-    [W] G a ~ Int-    [W] F (G a) ~ G a--do not want to end up with-    [W] F Int ~ Int-because that might actually hold!  Better to end up with the two above-unsolved constraints.  The flat form will be--    G a ~ fmv1     (CFunEqCan)-    F fmv1 ~ fmv2  (CFunEqCan)-    fmv1 ~ Int     (CTyEqCan)-    fmv1 ~ fmv2    (CTyEqCan)--Flatten using the fun-eqs first.--}+{-# LANGUAGE CPP, ViewPatterns, BangPatterns #-}++module TcFlatten(+   FlattenMode(..),+   flatten, flattenKind, flattenArgsNom,++   unflattenWanteds+ ) where++#include "HsVersions.h"++import GhcPrelude++import TcRnTypes+import TcType+import Type+import TcEvidence+import TyCon+import TyCoRep   -- performs delicate algorithm on types+import Coercion+import Var+import VarSet+import VarEnv+import Outputable+import TcSMonad as TcS+import BasicTypes( SwapFlag(..) )++import Pair+import Util+import Bag+import Control.Monad++import Control.Arrow ( first )++{-+Note [The flattening story]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+* A CFunEqCan is either of form+     [G] <F xis> : F xis ~ fsk   -- fsk is a FlatSkolTv+     [W]       x : F xis ~ fmv   -- fmv is a FlatMetaTv+  where+     x is the witness variable+     xis are function-free+     fsk/fmv is a flatten skolem;+        it is always untouchable (level 0)++* CFunEqCans can have any flavour: [G], [W], [WD] or [D]++* KEY INSIGHTS:++   - A given flatten-skolem, fsk, is known a-priori to be equal to+     F xis (the LHS), with <F xis> evidence.  The fsk is still a+     unification variable, but it is "owned" by its CFunEqCan, and+     is filled in (unflattened) only by unflattenGivens.++   - A unification flatten-skolem, fmv, stands for the as-yet-unknown+     type to which (F xis) will eventually reduce.  It is filled in+++   - All fsk/fmv variables are "untouchable".  To make it simple to test,+     we simply give them TcLevel=0.  This means that in a CTyVarEq, say,+       fmv ~ Int+     we NEVER unify fmv.++   - A unification flatten-skolem, fmv, ONLY gets unified when either+       a) The CFunEqCan takes a step, using an axiom+       b) By unflattenWanteds+    They are never unified in any other form of equality.+    For example [W] ffmv ~ Int  is stuck; it does not unify with fmv.++* We *never* substitute in the RHS (i.e. the fsk/fmv) of a CFunEqCan.+  That would destroy the invariant about the shape of a CFunEqCan,+  and it would risk wanted/wanted interactions. The only way we+  learn information about fsk is when the CFunEqCan takes a step.++  However we *do* substitute in the LHS of a CFunEqCan (else it+  would never get to fire!)++* Unflattening:+   - We unflatten Givens when leaving their scope (see unflattenGivens)+   - We unflatten Wanteds at the end of each attempt to simplify the+     wanteds; see unflattenWanteds, called from solveSimpleWanteds.++* Ownership of fsk/fmv.  Each canonical [G], [W], or [WD]+       CFunEqCan x : F xis ~ fsk/fmv+  "owns" a distinct evidence variable x, and flatten-skolem fsk/fmv.+  Why? We make a fresh fsk/fmv when the constraint is born;+  and we never rewrite the RHS of a CFunEqCan.++  In contrast a [D] CFunEqCan /shares/ its fmv with its partner [W],+  but does not "own" it.  If we reduce a [D] F Int ~ fmv, where+  say type instance F Int = ty, then we don't discharge fmv := ty.+  Rather we simply generate [D] fmv ~ ty (in TcInteract.reduce_top_fun_eq,+  and dischargeFmv)++* Inert set invariant: if F xis1 ~ fsk1, F xis2 ~ fsk2+                       then xis1 /= xis2+  i.e. at most one CFunEqCan with a particular LHS++* Function applications can occur in the RHS of a CTyEqCan.  No reason+  not allow this, and it reduces the amount of flattening that must occur.++* Flattening a type (F xis):+    - If we are flattening in a Wanted/Derived constraint+      then create new [W] x : F xis ~ fmv+      else create new [G] x : F xis ~ fsk+      with fresh evidence variable x and flatten-skolem fsk/fmv++    - Add it to the work list++    - Replace (F xis) with fsk/fmv in the type you are flattening++    - You can also add the CFunEqCan to the "flat cache", which+      simply keeps track of all the function applications you+      have flattened.++    - If (F xis) is in the cache already, just+      use its fsk/fmv and evidence x, and emit nothing.++    - No need to substitute in the flat-cache. It's not the end+      of the world if we start with, say (F alpha ~ fmv1) and+      (F Int ~ fmv2) and then find alpha := Int.  Athat will+      simply give rise to fmv1 := fmv2 via [Interacting rule] below++* Canonicalising a CFunEqCan [G/W] x : F xis ~ fsk/fmv+    - Flatten xis (to substitute any tyvars; there are already no functions)+                  cos :: xis ~ flat_xis+    - New wanted  x2 :: F flat_xis ~ fsk/fmv+    - Add new wanted to flat cache+    - Discharge x = F cos ; x2++* [Interacting rule]+    (inert)     [W] x1 : F tys ~ fmv1+    (work item) [W] x2 : F tys ~ fmv2+  Just solve one from the other:+    x2 := x1+    fmv2 := fmv1+  This just unites the two fsks into one.+  Always solve given from wanted if poss.++* For top-level reductions, see Note [Top-level reductions for type functions]+  in TcInteract+++Why given-fsks, alone, doesn't work+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Could we get away with only flatten meta-tyvars, with no flatten-skolems? No.++  [W] w : alpha ~ [F alpha Int]++---> flatten+  w = ...w'...+  [W] w' : alpha ~ [fsk]+  [G] <F alpha Int> : F alpha Int ~ fsk++--> unify (no occurs check)+  alpha := [fsk]++But since fsk = F alpha Int, this is really an occurs check error.  If+that is all we know about alpha, we will succeed in constraint+solving, producing a program with an infinite type.++Even if we did finally get (g : fsk ~ Bool) by solving (F alpha Int ~ fsk)+using axiom, zonking would not see it, so (x::alpha) sitting in the+tree will get zonked to an infinite type.  (Zonking always only does+refl stuff.)++Why flatten-meta-vars, alone doesn't work+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Look at Simple13, with unification-fmvs only++  [G] g : a ~ [F a]++---> Flatten given+  g' = g;[x]+  [G] g'  : a ~ [fmv]+  [W] x : F a ~ fmv++--> subst a in x+  g' = g;[x]+  x = F g' ; x2+  [W] x2 : F [fmv] ~ fmv++And now we have an evidence cycle between g' and x!++If we used a given instead (ie current story)++  [G] g : a ~ [F a]++---> Flatten given+  g' = g;[x]+  [G] g'  : a ~ [fsk]+  [G] <F a> : F a ~ fsk++---> Substitute for a+  [G] g'  : a ~ [fsk]+  [G] F (sym g'); <F a> : F [fsk] ~ fsk+++Why is it right to treat fmv's differently to ordinary unification vars?+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+  f :: forall a. a -> a -> Bool+  g :: F Int -> F Int -> Bool++Consider+  f (x:Int) (y:Bool)+This gives alpha~Int, alpha~Bool.  There is an inconsistency,+but really only one error.  SherLoc may tell you which location+is most likely, based on other occurrences of alpha.++Consider+  g (x:Int) (y:Bool)+Here we get (F Int ~ Int, F Int ~ Bool), which flattens to+  (fmv ~ Int, fmv ~ Bool)+But there are really TWO separate errors.++  ** We must not complain about Int~Bool. **++Moreover these two errors could arise in entirely unrelated parts of+the code.  (In the alpha case, there must be *some* connection (eg+v:alpha in common envt).)++Note [Unflattening can force the solver to iterate]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Look at Trac #10340:+   type family Any :: *   -- No instances+   get :: MonadState s m => m s+   instance MonadState s (State s) where ...++   foo :: State Any Any+   foo = get++For 'foo' we instantiate 'get' at types mm ss+   [WD] MonadState ss mm, [WD] mm ss ~ State Any Any+Flatten, and decompose+   [WD] MonadState ss mm, [WD] Any ~ fmv+   [WD] mm ~ State fmv, [WD] fmv ~ ss+Unify mm := State fmv:+   [WD] MonadState ss (State fmv)+   [WD] Any ~ fmv, [WD] fmv ~ ss+Now we are stuck; the instance does not match!!  So unflatten:+   fmv := Any+   ss := Any    (*)+   [WD] MonadState Any (State Any)++The unification (*) represents progress, so we must do a second+round of solving; this time it succeeds. This is done by the 'go'+loop in solveSimpleWanteds.++This story does not feel right but it's the best I can do; and the+iteration only happens in pretty obscure circumstances.+++************************************************************************+*                                                                      *+*                  Examples+     Here is a long series of examples I had to work through+*                                                                      *+************************************************************************++Simple20+~~~~~~~~+axiom F [a] = [F a]++ [G] F [a] ~ a+-->+ [G] fsk ~ a+ [G] [F a] ~ fsk  (nc)+-->+ [G] F a ~ fsk2+ [G] fsk ~ [fsk2]+ [G] fsk ~ a+-->+ [G] F a ~ fsk2+ [G] a ~ [fsk2]+ [G] fsk ~ a++----------------------------------------+indexed-types/should_compile/T44984++  [W] H (F Bool) ~ H alpha+  [W] alpha ~ F Bool+-->+  F Bool  ~ fmv0+  H fmv0  ~ fmv1+  H alpha ~ fmv2++  fmv1 ~ fmv2+  fmv0 ~ alpha++flatten+~~~~~~~+  fmv0  := F Bool+  fmv1  := H (F Bool)+  fmv2  := H alpha+  alpha := F Bool+plus+  fmv1 ~ fmv2++But these two are equal under the above assumptions.+Solve by Refl.+++--- under plan B, namely solve fmv1:=fmv2 eagerly ---+  [W] H (F Bool) ~ H alpha+  [W] alpha ~ F Bool+-->+  F Bool  ~ fmv0+  H fmv0  ~ fmv1+  H alpha ~ fmv2++  fmv1 ~ fmv2+  fmv0 ~ alpha+-->+  F Bool  ~ fmv0+  H fmv0  ~ fmv1+  H alpha ~ fmv2    fmv2 := fmv1++  fmv0 ~ alpha++flatten+  fmv0 := F Bool+  fmv1 := H fmv0 = H (F Bool)+  retain   H alpha ~ fmv2+    because fmv2 has been filled+  alpha := F Bool+++----------------------------+indexed-types/should_failt/T4179++after solving+  [W] fmv_1 ~ fmv_2+  [W] A3 (FCon x)           ~ fmv_1    (CFunEqCan)+  [W] A3 (x (aoa -> fmv_2)) ~ fmv_2    (CFunEqCan)++----------------------------------------+indexed-types/should_fail/T7729a++a)  [W]   BasePrimMonad (Rand m) ~ m1+b)  [W]   tt m1 ~ BasePrimMonad (Rand m)++--->  process (b) first+    BasePrimMonad (Ramd m) ~ fmv_atH+    fmv_atH ~ tt m1++--->  now process (a)+    m1 ~ s_atH ~ tt m1    -- An obscure occurs check+++----------------------------------------+typecheck/TcTypeNatSimple++Original constraint+  [W] x + y ~ x + alpha  (non-canonical)+==>+  [W] x + y     ~ fmv1   (CFunEqCan)+  [W] x + alpha ~ fmv2   (CFuneqCan)+  [W] fmv1 ~ fmv2        (CTyEqCan)++(sigh)++----------------------------------------+indexed-types/should_fail/GADTwrong1++  [G] Const a ~ ()+==> flatten+  [G] fsk ~ ()+  work item: Const a ~ fsk+==> fire top rule+  [G] fsk ~ ()+  work item fsk ~ ()++Surely the work item should rewrite to () ~ ()?  Well, maybe not;+it'a very special case.  More generally, our givens look like+F a ~ Int, where (F a) is not reducible.+++----------------------------------------+indexed_types/should_fail/T8227:++Why using a different can-rewrite rule in CFunEqCan heads+does not work.++Assuming NOT rewriting wanteds with wanteds++   Inert: [W] fsk_aBh ~ fmv_aBk -> fmv_aBk+          [W] fmv_aBk ~ fsk_aBh++          [G] Scalar fsk_aBg ~ fsk_aBh+          [G] V a ~ f_aBg++   Worklist includes  [W] Scalar fmv_aBi ~ fmv_aBk+   fmv_aBi, fmv_aBk are flatten unification variables++   Work item: [W] V fsk_aBh ~ fmv_aBi++Note that the inert wanteds are cyclic, because we do not rewrite+wanteds with wanteds.+++Then we go into a loop when normalise the work-item, because we+use rewriteOrSame on the argument of V.++Conclusion: Don't make canRewrite context specific; instead use+[W] a ~ ty to rewrite a wanted iff 'a' is a unification variable.+++----------------------------------------++Here is a somewhat similar case:++   type family G a :: *++   blah :: (G a ~ Bool, Eq (G a)) => a -> a+   blah = error "urk"++   foo x = blah x++For foo we get+   [W] Eq (G a), G a ~ Bool+Flattening+   [W] G a ~ fmv, Eq fmv, fmv ~ Bool+We can't simplify away the Eq Bool unless we substitute for fmv.+Maybe that doesn't matter: we would still be left with unsolved+G a ~ Bool.++--------------------------+Trac #9318 has a very simple program leading to++  [W] F Int ~ Int+  [W] F Int ~ Bool++We don't want to get "Error Int~Bool".  But if fmv's can rewrite+wanteds, we will++  [W] fmv ~ Int+  [W] fmv ~ Bool+--->+  [W] Int ~ Bool+++************************************************************************+*                                                                      *+*                FlattenEnv & FlatM+*             The flattening environment & monad+*                                                                      *+************************************************************************++-}++type FlatWorkListRef = TcRef [Ct]  -- See Note [The flattening work list]++data FlattenEnv+  = FE { fe_mode    :: !FlattenMode+       , fe_loc     :: !CtLoc             -- See Note [Flattener CtLoc]+       , fe_flavour :: !CtFlavour+       , fe_eq_rel  :: !EqRel             -- See Note [Flattener EqRels]+       , fe_work    :: !FlatWorkListRef } -- See Note [The flattening work list]++data FlattenMode  -- Postcondition for all three: inert wrt the type substitution+  = FM_FlattenAll          -- Postcondition: function-free+  | FM_SubstOnly           -- See Note [Flattening under a forall]++--  | FM_Avoid TcTyVar Bool  -- See Note [Lazy flattening]+--                           -- Postcondition:+--                           --  * tyvar is only mentioned in result under a rigid path+--                           --    e.g.   [a] is ok, but F a won't happen+--                           --  * If flat_top is True, top level is not a function application+--                           --   (but under type constructors is ok e.g. [F a])++instance Outputable FlattenMode where+  ppr FM_FlattenAll = text "FM_FlattenAll"+  ppr FM_SubstOnly  = text "FM_SubstOnly"++eqFlattenMode :: FlattenMode -> FlattenMode -> Bool+eqFlattenMode FM_FlattenAll FM_FlattenAll = True+eqFlattenMode FM_SubstOnly  FM_SubstOnly  = True+--  FM_Avoid tv1 b1 `eq` FM_Avoid tv2 b2 = tv1 == tv2 && b1 == b2+eqFlattenMode _  _ = False++-- | The 'FlatM' monad is a wrapper around 'TcS' with the following+-- extra capabilities: (1) it offers access to a 'FlattenEnv';+-- and (2) it maintains the flattening worklist.+-- See Note [The flattening work list].+newtype FlatM a+  = FlatM { runFlatM :: FlattenEnv -> TcS a }++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++liftTcS :: TcS a -> FlatM a+liftTcS thing_inside+  = FlatM $ const thing_inside++emitFlatWork :: Ct -> FlatM ()+-- See Note [The flattening work list]+emitFlatWork ct = FlatM $ \env -> updTcRef (fe_work env) (ct :)++-- convenient wrapper when you have a CtEvidence describing+-- the flattening operation+runFlattenCtEv :: FlattenMode -> CtEvidence -> FlatM a -> TcS a+runFlattenCtEv mode ev+  = runFlatten mode (ctEvLoc ev) (ctEvFlavour ev) (ctEvEqRel ev)++-- Run thing_inside (which does flattening), and put all+-- the work it generates onto the main work list+-- See Note [The flattening work list]+runFlatten :: FlattenMode -> CtLoc -> CtFlavour -> EqRel -> FlatM a -> TcS a+runFlatten mode loc flav eq_rel thing_inside+  = do { flat_ref <- newTcRef []+       ; let fmode = FE { fe_mode = mode+                        , fe_loc  = loc+                        , fe_flavour = flav+                        , fe_eq_rel = eq_rel+                        , fe_work = flat_ref }+       ; res <- runFlatM thing_inside fmode+       ; new_flats <- readTcRef flat_ref+       ; updWorkListTcS (add_flats new_flats)+       ; return res }+  where+    add_flats new_flats wl+      = wl { wl_funeqs = add_funeqs new_flats (wl_funeqs wl) }++    add_funeqs []     wl = wl+    add_funeqs (f:fs) wl = add_funeqs fs (f:wl)+      -- add_funeqs fs ws = reverse fs ++ ws+      -- e.g. add_funeqs [f1,f2,f3] [w1,w2,w3,w4]+      --        = [f3,f2,f1,w1,w2,w3,w4]++traceFlat :: String -> SDoc -> FlatM ()+traceFlat herald doc = liftTcS $ traceTcS herald doc++getFlatEnvField :: (FlattenEnv -> a) -> FlatM a+getFlatEnvField accessor+  = FlatM $ \env -> return (accessor env)++getEqRel :: FlatM EqRel+getEqRel = getFlatEnvField fe_eq_rel++getRole :: FlatM Role+getRole = eqRelRole <$> getEqRel++getFlavour :: FlatM CtFlavour+getFlavour = getFlatEnvField fe_flavour++getFlavourRole :: FlatM CtFlavourRole+getFlavourRole+  = do { flavour <- getFlavour+       ; eq_rel <- getEqRel+       ; return (flavour, eq_rel) }++getMode :: FlatM FlattenMode+getMode = getFlatEnvField fe_mode++getLoc :: FlatM CtLoc+getLoc = getFlatEnvField fe_loc++checkStackDepth :: Type -> FlatM ()+checkStackDepth ty+  = do { loc <- getLoc+       ; liftTcS $ checkReductionDepth loc ty }++-- | Change the 'EqRel' in a 'FlatM'.+setEqRel :: EqRel -> FlatM a -> FlatM a+setEqRel new_eq_rel thing_inside+  = FlatM $ \env ->+    if new_eq_rel == fe_eq_rel env+    then runFlatM thing_inside env+    else runFlatM thing_inside (env { fe_eq_rel = new_eq_rel })++-- | Change the 'FlattenMode' in a 'FlattenEnv'.+setMode :: FlattenMode -> FlatM a -> FlatM a+setMode new_mode thing_inside+  = FlatM $ \env ->+    if new_mode `eqFlattenMode` fe_mode env+    then runFlatM thing_inside env+    else runFlatM thing_inside (env { fe_mode = new_mode })++-- | Make sure that flattening actually produces a coercion (in other+-- words, make sure our flavour is not Derived)+-- Note [No derived kind equalities]+noBogusCoercions :: FlatM a -> FlatM a+noBogusCoercions thing_inside+  = FlatM $ \env ->+    -- No new thunk is made if the flavour hasn't changed (note the bang).+    let !env' = case fe_flavour env of+          Derived -> env { fe_flavour = Wanted WDeriv }+          _       -> env+    in+    runFlatM thing_inside env'++bumpDepth :: FlatM a -> FlatM a+bumpDepth (FlatM thing_inside)+  = FlatM $ \env -> do+      -- bumpDepth can be called a lot during flattening so we force the+      -- new env to avoid accumulating thunks.+      { let !env' = env { fe_loc = bumpCtLocDepth (fe_loc env) }+      ; thing_inside env' }++{-+Note [The flattening work list]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The "flattening work list", held in the fe_work field of FlattenEnv,+is a list of CFunEqCans generated during flattening.  The key idea+is this.  Consider flattening (Eq (F (G Int) (H Bool)):+  * The flattener recursively calls itself on sub-terms before building+    the main term, so it will encounter the terms in order+              G Int+              H Bool+              F (G Int) (H Bool)+    flattening to sub-goals+              w1: G Int ~ fuv0+              w2: H Bool ~ fuv1+              w3: F fuv0 fuv1 ~ fuv2++  * 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+    of suspended calls.++  * So we want to process w1, w2 first.++  * So you might think that we should just use a FIFO deque for the work-list,+    so that putting adding goals in order w1,w2,w3 would mean we processed+    w1 first.++  * BUT suppose we have 'type instance G Int = H Char'.  Then processing+    w1 leads to a new goal+                w4: H Char ~ fuv0+    We do NOT want to put that on the far end of a deque!  Instead we want+    to put it at the *front* of the work-list so that we continue to work+    on it.++So the work-list structure is this:++  * The wl_funeqs (in TcS) is a LIFO stack; we push new goals (such as w4) on+    top (extendWorkListFunEq), and take new work from the top+    (selectWorkItem).++  * When flattening, emitFlatWork pushes new flattening goals (like+    w1,w2,w3) onto the flattening work list, fe_work, another+    push-down stack.++  * When we finish flattening, we *reverse* the fe_work stack+    onto the wl_funeqs stack (which brings w1 to the top).++The function runFlatten initialises the fe_work stack, and reverses+it onto wl_fun_eqs at the end.++Note [Flattener EqRels]+~~~~~~~~~~~~~~~~~~~~~~~+When flattening, we need to know which equality relation -- nominal+or representation -- we should be respecting. The only difference is+that we rewrite variables by representational equalities when fe_eq_rel+is ReprEq, and that we unwrap newtypes when flattening w.r.t.+representational equality.++Note [Flattener CtLoc]+~~~~~~~~~~~~~~~~~~~~~~+The flattener does eager type-family reduction.+Type families might loop, and we+don't want GHC to do so. A natural solution is to have a bounded depth+to these processes. A central difficulty is that such a solution isn't+quite compositional. For example, say it takes F Int 10 steps to get to Bool.+How many steps does it take to get from F Int -> F Int to Bool -> Bool?+10? 20? What about getting from Const Char (F Int) to Char? 11? 1? Hard to+know and hard to track. So, we punt, essentially. We store a CtLoc in+the FlattenEnv and just update the environment when recurring. In the+TyConApp case, where there may be multiple type families to flatten,+we just copy the current CtLoc into each branch. If any branch hits the+stack limit, then the whole thing fails.++A consequence of this is that setting the stack limits appropriately+will be essentially impossible. So, the official recommendation if a+stack limit is hit is to disable the check entirely. Otherwise, there+will be baffling, unpredictable errors.++Note [Lazy flattening]+~~~~~~~~~~~~~~~~~~~~~~+The idea of FM_Avoid mode is to flatten less aggressively.  If we have+       a ~ [F Int]+there seems to be no great merit in lifting out (F Int).  But if it was+       a ~ [G a Int]+then we *do* want to lift it out, in case (G a Int) reduces to Bool, say,+which gets rid of the occurs-check problem.  (For the flat_top Bool, see+comments above and at call sites.)++HOWEVER, the lazy flattening actually seems to make type inference go+*slower*, not faster.  perf/compiler/T3064 is a case in point; it gets+*dramatically* worse with FM_Avoid.  I think it may be because+floating the types out means we normalise them, and that often makes+them smaller and perhaps allows more re-use of previously solved+goals.  But to be honest I'm not absolutely certain, so I am leaving+FM_Avoid in the code base.  What I'm removing is the unique place+where it is *used*, namely in TcCanonical.canEqTyVar.++See also Note [Conservative unification check] in TcUnify, which gives+other examples where lazy flattening caused problems.++Bottom line: FM_Avoid is unused for now (Nov 14).+Note: T5321Fun got faster when I disabled FM_Avoid+      T5837 did too, but it's pathalogical anyway++Note [Phantoms in the flattener]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have++data Proxy p = Proxy++and we're flattening (Proxy ty) w.r.t. ReprEq. Then, we know that `ty`+is really irrelevant -- it will be ignored when solving for representational+equality later on. So, we omit flattening `ty` entirely. This may+violate the expectation of "xi"s for a bit, but the canonicaliser will+soon throw out the phantoms when decomposing a TyConApp. (Or, the+canonicaliser will emit an insoluble, in which case the unflattened version+yields a better error message anyway.)++Note [No derived kind equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A kind-level coercion can appear in types, via mkCastTy. So, whenever+we are generating a coercion in a dependent context (in other words,+in a kind) we need to make sure that our flavour is never Derived+(as Derived constraints have no evidence). The noBogusCoercions function+changes the flavour from Derived just for this purpose.++-}++{- *********************************************************************+*                                                                      *+*      Externally callable flattening functions                        *+*                                                                      *+*  They are all wrapped in runFlatten, so their                        *+*  flattening work gets put into the work list                         *+*                                                                      *+********************************************************************* -}++flatten :: FlattenMode -> CtEvidence -> TcType+        -> TcS (Xi, TcCoercion)+flatten mode ev ty+  = do { traceTcS "flatten {" (ppr mode <+> ppr ty)+       ; (ty', co) <- runFlattenCtEv mode ev (flatten_one ty)+       ; traceTcS "flatten }" (ppr ty')+       ; return (ty', co) }++-- specialized to flattening kinds: never Derived, always Nominal+-- See Note [No derived kind equalities]+flattenKind :: CtLoc -> CtFlavour -> TcType -> TcS (Xi, TcCoercionN)+flattenKind loc flav ty+  = do { traceTcS "flattenKind {" (ppr flav <+> ppr ty)+       ; let flav' = case flav of+                       Derived -> Wanted WDeriv  -- the WDeriv/WOnly choice matters not+                       _       -> flav+       ; (ty', co) <- runFlatten FM_FlattenAll loc flav' NomEq (flatten_one ty)+       ; traceTcS "flattenKind }" (ppr ty' $$ ppr co) -- co is never a panic+       ; return (ty', co) }++flattenArgsNom :: CtEvidence -> TyCon -> [TcType] -> TcS ([Xi], [TcCoercion], TcCoercionN)+-- Externally-callable, hence runFlatten+-- Flatten a vector of types all at once; in fact they are+-- always the arguments of type family or class, so+--      ctEvFlavour ev = Nominal+-- and we want to flatten all at nominal role+-- The kind passed in is the kind of the type family or class, call it T+-- The last coercion returned has type (typeKind(T xis) ~N typeKind(T tys))+flattenArgsNom ev tc tys+  = do { traceTcS "flatten_args {" (vcat (map ppr tys))+       ; (tys', cos, kind_co)+           <- runFlattenCtEv FM_FlattenAll ev (flatten_args_tc tc (repeat Nominal) tys)+       ; traceTcS "flatten }" (vcat (map ppr tys'))+       ; return (tys', cos, kind_co) }+++{- *********************************************************************+*                                                                      *+*           The main flattening functions+*                                                                      *+********************************************************************* -}++{- Note [Flattening]+~~~~~~~~~~~~~~~~~~~~+  flatten ty  ==>   (xi, co)+    where+      xi has no type functions, unless they appear under ForAlls+         has no skolems that are mapped in the inert set+         has no filled-in metavariables+      co :: xi ~ ty++Key invariants:+  (F0) co :: xi ~ zonk(ty)+  (F1) typeKind(xi) succeeds and returns a fully zonked kind+  (F2) typeKind(xi) `eqType` zonk(typeKind(ty))++Note that it is flatten's job to flatten *every type function it sees*.+flatten is only called on *arguments* to type functions, by canEqGiven.++Flattening also:+  * zonks, removing any metavariables, and+  * applies the substitution embodied in the inert set++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) typeKind(xi) succeeds and returns a fully zonked kind++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,+then the right-hand type of co will be the zonked version of ty.+It is for this reason that we+occasionally have to explicitly zonk, when (co :: xi ~ ty) is important+even before we zonk the whole program. For example, see the FTRNotFollowed+case in flattenTyVar.++Why have these invariants on flattening? Because we sometimes use typeKind+during canonicalisation, and we want this kind to be zonked (e.g., see+TcCanonical.canEqTyVar).++Flattening is always homogeneous. That is, the kind of the result of flattening is+always the same as the kind of the input, modulo zonking. More formally:++  (F2) typeKind(xi) `eqType` zonk(typeKind(ty))++This invariant means that the kind of a flattened type might not itself be flat.++Recall that in comments we use alpha[flat = ty] to represent a+flattening skolem variable alpha which has been generated to stand in+for ty.++----- Example of flattening a constraint: ------+  flatten (List (F (G Int)))  ==>  (xi, cc)+    where+      xi  = List alpha+      cc  = { G Int ~ beta[flat = G Int],+              F beta ~ alpha[flat = F beta] }+Here+  * alpha and beta are 'flattening skolem variables'.+  * All the constraints in cc are 'given', and all their coercion terms+    are the identity.++NB: Flattening Skolems only occur in canonical constraints, which+are never zonked, so we don't need to worry about zonking doing+accidental unflattening.++Note that we prefer to leave type synonyms unexpanded when possible,+so when the flattener encounters one, it first asks whether its+transitive expansion contains any type function applications.  If so,+it expands the synonym and proceeds; if not, it simply returns the+unexpanded synonym.++Note [flatten_args performance]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In programs with lots of type-level evaluation, flatten_args becomes+part of a tight loop. For example, see test perf/compiler/T9872a, which+calls flatten_args a whopping 7,106,808 times. It is thus important+that flatten_args be efficient.++Performance testing showed that the current implementation is indeed+efficient. It's critically important that zipWithAndUnzipM be+specialized to TcS, and it's also quite helpful to actually `inline`+it. On test T9872a, here are the allocation stats (Dec 16, 2014):++ * Unspecialized, uninlined:     8,472,613,440 bytes allocated in the heap+ * Specialized, uninlined:       6,639,253,488 bytes allocated in the heap+ * Specialized, inlined:         6,281,539,792 bytes allocated in the heap++To improve performance even further, flatten_args_nom is split off+from flatten_args, as nominal equality is the common case. This would+be natural to write using mapAndUnzipM, but even inlined, that function+is not as performant as a hand-written loop.++ * mapAndUnzipM, inlined:        7,463,047,432 bytes allocated in the heap+ * hand-written recursion:       5,848,602,848 bytes allocated in the heap++If you make any change here, pay close attention to the T9872{a,b,c} tests+and T5321Fun.++If we need to make this yet more performant, a possible way forward is to+duplicate the flattener code for the nominal case, and make that case+faster. This doesn't seem quite worth it, yet.++Note [flatten_args]+~~~~~~~~~~~~~~~~~~~+Invariant (F2) of Note [Flattening] says that flattening is homogeneous.+This causes some trouble when flattening a function applied to a telescope+of arguments, perhaps with dependency. For example, suppose++  type family F :: forall (j :: Type) (k :: Type). Maybe j -> Either j k -> Bool -> [k]++and we wish to flatten the args of (with kind applications explicit)++  F a b (Just a c) (Right a b d) False++where all variables are skolems and++  a :: Type+  b :: Type+  c :: a+  d :: k++  [G] aco :: a ~ fa+  [G] bco :: b ~ fb+  [G] cco :: c ~ fc+  [G] dco :: d ~ fd++We process the args in left-to-right order. The first two args are easy:++  (sym aco, fa) <- flatten a+  (sym bco, fb) <- flatten b++But now consider flattening (Just a c :: Maybe a). Regardless of how this+flattens, the result will have kind (Maybe a), due to (F2). And yet, when+we build the application (F fa fb ...), we need this argument to have kind+(Maybe fa), not (Maybe a). Suppose (Just a c) flattens to f3 (the "3" is+because it's the 3rd argument). We know f3 :: Maybe a. In order to get f3+to have kind Maybe fa, we must cast it. The coercion to use is determined+by the kind of F: we see in F's kind that the third argument has kind+Maybe j. Critically, we also know that the argument corresponding to j+(in our example, a) flattened with a coercion (sym aco). We can thus+know the coercion needed for the 3rd argument is (Maybe aco).++More generally, we must use the Lifting Lemma, as implemented in+Coercion.liftCoSubst. As we work left-to-right, any variable that is a+dependent parameter (j and k, in our example) gets mapped in a lifting context+to the coercion that is output from flattening the corresponding argument (aco+and bco, in our example). Then, after flattening later arguments, we lift the+kind of these arguments in the lifting context that we've be building up.+This coercion is then used to keep the result of flattening well-kinded.++Working through our example, this is what happens:++  1. Flatten a, getting (sym aco, fa). Extend the (empty) LC with [j |-> sym aco]++  2. Flatten b, getting (sym bco, fb). Extend the LC with [k |-> sym bco].++  3. Flatten (Just a c), getting (co3, f3). Lifting the kind (Maybe j) with our LC+     yields lco3 :: Maybe fa ~ Maybe a. Use (f3 |> sym lco3) as the argument to+     F.++  4. Flatten (Right a b d), getting (co4, f4). Lifting the kind (Either j k) with our LC+     yields lco4 :: Either fa fb ~ Either a b. Use (f4 |> sym lco4) as the 4th+     argument to F.++  5. Flatten False, getting (<False>, False). We lift Bool with our LC, getting <Bool>;+     casting has no effect. (Indeed we lifted and casted with no effect for steps 1 and 2, as well.)++We're now almost done, but the new application (F fa fb (f3 |> sym lco3) (f4+|> sym lco4) False) has the wrong kind. Its kind is [fb], instead of the original [b].+So we must use our LC one last time to lift the result kind [k], getting res_co :: [fb] ~ [b], and+we cast our result.++Accordingly, the final result is++  F fa fb (Just fa (fc |> aco) |> Maybe (sym aco) |> sym (Maybe (sym aco)))+          (Right fa fb (fd |> bco) |> Either (sym aco) (sym bco) |> sym (Either (sym aco) (sym bco)))+          False+            |> [sym bco]++The res_co is returned as the third return value from flatten_args.++Note [Last case in flatten_args]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In writing flatten_args's `go`, we know here that tys cannot be empty,+because that case is first. We've run out of+binders. But perhaps inner_ki is a tyvar that has been instantiated with a+Π-type. I believe this, today, this Π-type must be an ordinary function.+But tomorrow, we may allow, say, visible type application in types. And+it's best to be prepared.++Here is an example.++  a :: forall (k :: Type). k -> k+  type family Star+  Proxy :: forall j. j -> Type+  axStar :: Star ~ Type+  type family NoWay :: Bool+  axNoWay :: NoWay ~ False+  bo :: Type+  [G] bc :: bo ~ Bool   (in inert set)++  co :: (forall j. j -> Type) ~ (forall (j :: Star). (j |> axStar) -> Star)+  co = forall (j :: sym axStar). (<j> -> sym axStar)++  We are flattening:+  a (forall (j :: Star). (j |> axStar) -> Star)   -- 1+    (Proxy |> co)                                 -- 2+    (bo |> sym axStar)                            -- 3+    (NoWay |> sym bc)                             -- 4+      :: Star++Flattening (1) gives us+    (forall j. j -> Type)+    co1 :: (forall j. j -> Type) ~ (forall (j :: Star). (j |> axStar) -> Star)+We also extend the lifting context with+    k |-> co1++Flattening (2) gives us+    (Proxy |> co)+But building (a (forall j. j -> Type) Proxy) would be ill-kinded. So we cast the+result of flattening by sym co1, to get+    (Proxy |> co |> sym co1)+Happily, co and co1 cancel each other out, leaving us with+    Proxy+    co2 :: Proxy ~ (Proxy |> co)++Now we need to flatten (3). After flattening, should we tack on a homogenizing+coercion? The way we normally tell is to look at the kind of `a`. (See Note+[flatten_args].) Here, the remainder of the kind of `a` that we're left with+after processing two arguments is just `k`.++The way forward is look up k in the lifting context, getting co1. If we're at+all well-typed, co1 will be a coercion between Π-types, with enough binders on+both sides to accommodate any remaining arguments in flatten_args. So, let's+decompose co1 with decomposePiCos. This decomposition needs arguments to use+to instantiate any kind parameters. Look at the type of co1. If we just+decomposed it, we would end up with coercions whose types include j, which is+out of scope here. Accordingly, decomposePiCos takes a list of types whose+kinds are the *right-hand* types in the decomposed coercion. (See comments on+decomposePiCos, which also reverses the orientation of the coercions.)+The right-hand types are the unflattened ones -- conveniently what we have to+hand.++So we now call++  decomposePiCos (forall j. j -> Type)+                 [bo |> sym axStar, NoWay |> sym bc]+                 co1++to get++  co3 :: Star ~ Type+  co4 :: (j |> axStar) ~ (j |> co3), substituted to+                              (bo |> sym axStar |> axStar) ~ (bo |> sym axStar |> co3)+                           == bo ~ bo+  res_co :: Type ~ Star -- this one's not reversed in decomposePiCos++We then use these casts on (3) and (4) to get++  (bo |> sym axStar |> co3 :: Type)   -- (C3)+  (NoWay |> sym bc |> co4 :: bo)      -- (C4)++We can simplify to++  bo                          -- (C3)+  (NoWay |> sym bc :: bo)     -- (C4)++Now, to flatten (C3) and (C4), we still need to keep track of dependency.+We know the type of the function applied to (C3) and (C4) must be+(forall j. j -> Type), the flattened type+associated with k (the final type in the kind of `a`.) (We discard the lifting+context up to this point; as we've already substituted k, the domain of the+lifting context we used for (1) and (2), away.)++We now flatten (C3) to get+  Bool                        -- F3+  co5 :: Bool ~ bo+and flatten (C4) to get+  (False |> sym bc)+Like we did when flattening (2), we need to cast the result of flattening+(4), by lifting the type j with a lifting context containing+[j |-> co5]. This lifting yields co5.+We cast the result of flattening (C4) by sym co5 (this is the normal+cast-after-flattening; see Note [flatten_args]):+  (False |> sym bc |> sym co5)+which is really just+  False                       -- F4+  co4 :: False ~ (NoWay |> sym bc)++Now, we build up the result++  a (forall j. j -> Type)+    Proxy+    Bool+    False+      |> res_co++Let's check whether this is well-typed. We know++  a :: forall (k :: Type). k -> k++  a (forall j. j -> Type) :: (forall j. j -> Type) -> forall j. j -> Type++  a (forall j. j -> Type)+    Proxy+      :: forall j. j -> Type++  a (forall j. j -> Type)+    Proxy+    Bool+      :: Bool -> Type++  a (forall j. j -> Type)+    Proxy+    Bool+    False+      :: Type++  a (forall j. j -> Type)+    Proxy+    Bool+    False+     |> res_co+     :: Star++as desired. (Why do we want Star? Because we started with something of kind Star!)++Whew.++-}++{-# INLINE flatten_args_tc #-}+flatten_args_tc :: TyCon+                -> [Role]+                -> [Type]+                -> FlatM ([Xi], [Coercion], CoercionN)+flatten_args_tc tc = flatten_args all_bndrs any_named_bndrs inner_ki emptyVarSet+  -- NB: TyCon kinds are always closed+  where+    (bndrs, named)+      = ty_con_binders_ty_binders' (tyConBinders tc)+    -- it's possible that the result kind has arrows (for, e.g., a type family)+    -- so we must split it+    (inner_bndrs, inner_ki, inner_named) = split_pi_tys' (tyConResKind tc)+    !all_bndrs                           = bndrs `chkAppend` inner_bndrs+    !any_named_bndrs                     = named || inner_named+    -- NB: Those bangs there drop allocations in T9872{a,c,d} by 8%.++{-# INLINE flatten_args #-}+flatten_args :: [TyBinder] -> Bool   -- Binders, and True iff any of them are+                                     -- named.+             -> Kind -> TcTyCoVarSet -- function kind; kind's free vars+             -> [Role] -> [Type]     -- these are in 1-to-1 correspondence+             -> FlatM ([Xi], [Coercion], CoercionN)+-- Coercions :: Xi ~ Type, at roles given+-- Third coercion :: typeKind(fun xis) ~N typeKind(fun tys)+-- That is, the third coercion relates the kind of some function (whose kind is+-- passed as the first parameter) instantiated at xis to the kind of that+-- function instantiated at the tys. This is useful in keeping flattening+-- homoegeneous. The list of roles must be at least as long as the list of+-- types.+-- See Note [flatten_args]+flatten_args orig_binders+             any_named_bndrs+             orig_inner_ki+             orig_fvs+             orig_roles+             orig_tys+  = if any_named_bndrs+    then flatten_args_slow orig_binders+                           orig_inner_ki+                           orig_fvs+                           orig_roles+                           orig_tys+    else flatten_args_fast orig_binders orig_inner_ki orig_roles orig_tys++{-# INLINE flatten_args_fast #-}+-- | fast path flatten_args, in which none of the binders are named and+-- therefore we can avoid tracking a lifting context.+-- There are many bang patterns in here. It's been observed that they+-- greatly improve performance of an optimized build.+-- The T9872 test cases are good witnesses of this fact.+flatten_args_fast :: [TyBinder]+                  -> Kind+                  -> [Role]+                  -> [Type]+                  -> FlatM ([Xi], [Coercion], CoercionN)+flatten_args_fast orig_binders orig_inner_ki orig_roles orig_tys+  = fmap finish (iterate orig_tys orig_roles orig_binders)+  where++    iterate :: [Type]+            -> [Role]+            -> [TyBinder]+            -> FlatM ([Xi], [Coercion], [TyBinder])+    iterate (ty:tys) (role:roles) (_:binders) = do+      (xi, co) <- go role ty+      (xis, cos, binders) <- iterate tys roles binders+      pure (xi : xis, co : cos, binders)+    iterate [] _ binders = pure ([], [], binders)+    iterate _ _ _ = pprPanic+        "flatten_args wandered into deeper water than usual" (vcat [])+           -- This debug information is commented out because leaving it in+           -- causes a ~2% increase in allocations in T9872{a,c,d}.+           {-+             (vcat [ppr orig_binders,+                    ppr orig_inner_ki,+                    ppr (take 10 orig_roles), -- often infinite!+                    ppr orig_tys])+           -}++    {-# INLINE go #-}+    go :: Role+       -> Type+       -> FlatM (Xi, Coercion)+    go role ty+      = case role of+          -- In the slow path we bind the Xi and Coercion from the recursive+          -- call and then use it such+          --+          --   let kind_co = mkTcSymCo $ mkReflCo Nominal (tyBinderType binder)+          --       casted_xi = xi `mkCastTy` kind_co+          --       casted_co = co `mkTcCoherenceLeftCo` kind_co+          --+          -- but this isn't necessary:+          --   mkTcSymCo (Refl a b) = Refl a b,+          --   mkCastTy x (Refl _ _) = x+          --   mkTcCoherenceLeftCo x (Refl _ _) = x+          --+          -- Also, no need to check isAnonTyBinder or isNamedTyBinder, since+          -- we've already established that they're all anonymous.+          Nominal          -> setEqRel NomEq  $ flatten_one ty+          Representational -> setEqRel ReprEq $ flatten_one ty+          Phantom          -> -- See Note [Phantoms in the flattener]+                              do { ty <- liftTcS $ zonkTcType ty+                                 ; return (ty, mkReflCo Phantom ty) }+++    {-# INLINE finish #-}+    finish :: ([Xi], [Coercion], [TyBinder]) -> ([Xi], [Coercion], CoercionN)+    finish (xis, cos, binders) = (xis, cos, kind_co)+      where+        final_kind = mkPiTys binders orig_inner_ki+        kind_co    = mkReflCo Nominal final_kind++{-# INLINE flatten_args_slow #-}+-- | Slow path, compared to flatten_args_fast, because this one must track+-- a lifting context.+flatten_args_slow :: [TyBinder] -> Kind -> TcTyCoVarSet+                  -> [Role] -> [Type]+                  -> FlatM ([Xi], [Coercion], CoercionN)+flatten_args_slow orig_binders orig_inner_ki orig_fvs orig_roles orig_tys+  = go [] [] orig_lc orig_binders orig_inner_ki orig_roles orig_tys+  where+    orig_lc = emptyLiftingContext $ mkInScopeSet $ orig_fvs++    go :: [Xi]        -- Xis accumulator, in reverse order+       -> [Coercion]  -- Coercions accumulator, in reverse order+                      -- These are in 1-to-1 correspondence+       -> LiftingContext  -- mapping from tyvars to flattening coercions+       -> [TyBinder]  -- Unsubsted binders of function's kind+       -> Kind        -- Unsubsted result kind of function (not a Pi-type)+       -> [Role]      -- Roles at which to flatten these ...+       -> [Type]      -- ... unflattened types+       -> FlatM ([Xi], [Coercion], CoercionN)+    go acc_xis acc_cos lc binders inner_ki _ []+      = return (reverse acc_xis, reverse acc_cos, kind_co)+      where+        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) (ty:tys)+      = do { (xi, co) <- case role of+               Nominal          -> setEqRel NomEq $+                                   if isNamedTyBinder binder+                                   then noBogusCoercions $ flatten_one ty+                                   else                    flatten_one ty++               Representational -> ASSERT( isAnonTyBinder binder )+                                   setEqRel ReprEq $ flatten_one ty++               Phantom          -> -- See Note [Phantoms in the flattener]+                                   ASSERT( isAnonTyBinder binder )+                                   do { ty <- liftTcS $ zonkTcType ty+                                      ; return (ty, mkReflCo Phantom ty) }++             -- By Note [Flattening] invariant (F2),+             -- typeKind(xi) = typeKind(ty). But, it's possible that xi will be+             -- used as an argument to a function whose kind is different, if+             -- earlier arguments have been flattened to new types. We thus+             -- need a coercion (kind_co :: old_kind ~ new_kind).+             --+             -- The bangs here have been observed to improve performance+             -- significantly in optimized builds.+           ; let kind_co = mkTcSymCo $+                   liftCoSubst Nominal lc (tyBinderType binder)+                 !casted_xi = xi `mkCastTy` kind_co+                 casted_co = co `mkTcCoherenceLeftCo` kind_co++             -- now, extend the lifting context with the new binding+                 !new_lc | Just tv <- tyBinderVar_maybe binder+                         = extendLiftingContextAndInScope lc tv casted_co+                         | otherwise+                         = lc++           ; go (casted_xi : acc_xis)+                (casted_co : acc_cos)+                new_lc+                binders+                inner_ki+                roles+                tys+           }++      -- See Note [Last case in flatten_args]+    go acc_xis acc_cos lc [] inner_ki roles tys+      | Just k   <- tcGetTyVar_maybe inner_ki+      , Just co1 <- liftCoSubstTyVar lc Nominal k+      = do { let co1_kind              = coercionKind co1+                 (arg_cos, res_co)     = decomposePiCos co1 co1_kind tys+                 casted_tys            = ASSERT2( equalLength tys arg_cos+                                                , ppr tys $$ ppr arg_cos )+                                         zipWith mkCastTy tys arg_cos+                    -- In general decomposePiCos can return fewer cos than tys,+                    -- but not here; see "If we're at all well-typed..."+                    -- in Note [Last case in flatten_args].  Hence the ASSERT.+                 zapped_lc             = zapLiftingContext lc+                 Pair flattened_kind _ = co1_kind+                 (bndrs, new_inner)    = splitPiTys flattened_kind++           ; (xis_out, cos_out, res_co_out)+               <- go acc_xis acc_cos zapped_lc bndrs new_inner roles casted_tys+           -- cos_out :: xis_out ~ casted_tys+           -- we need to return cos :: xis_out ~ tys+           --+           -- zipWith has the map first because it will fuse.+           ; let cos = zipWith (flip mkTcCoherenceRightCo)+                               (map mkTcSymCo arg_cos)+                               cos_out++           ; return (xis_out, cos, res_co_out `mkTcTransCo` res_co) }++    go _ _ _ _ _ _ _ = pprPanic+        "flatten_args wandered into deeper water than usual" (vcat [])+           -- This debug information is commented out because leaving it in+           -- causes a ~2% increase in allocations in T9872d.+           -- That's independent of the analagous case in flatten_args_fast:+           -- each of these causes a 2% increase on its own, so commenting them+           -- both out gives a 4% decrease in T9872d.+           {-++             (vcat [ppr orig_binders,+                    ppr orig_inner_ki,+                    ppr (take 10 orig_roles), -- often infinite!+                    ppr orig_tys])+           -}++------------------+flatten_one :: TcType -> FlatM (Xi, Coercion)+-- Flatten a type to get rid of type function applications, returning+-- the new type-function-free type, and a collection of new equality+-- constraints.  See Note [Flattening] for more detail.+--+-- Postcondition: Coercion :: Xi ~ TcType+-- The role on the result coercion matches the EqRel in the FlattenEnv++flatten_one xi@(LitTy {})+  = do { role <- getRole+       ; return (xi, mkReflCo role xi) }++flatten_one (TyVarTy tv)+  = flattenTyVar tv++flatten_one (AppTy ty1 ty2)+  = flatten_app_tys ty1 [ty2]++flatten_one (TyConApp tc tys)+  -- Expand type synonyms that mention type families+  -- on the RHS; see Note [Flattening synonyms]+  | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys+  , let expanded_ty = mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys'+  = do { mode <- getMode+       ; case mode of+           FM_FlattenAll | not (isFamFreeTyCon tc)+                         -> flatten_one expanded_ty+           _             -> flatten_ty_con_app tc tys }++  -- Otherwise, it's a type function application, and we have to+  -- flatten it away as well, and generate a new given equality constraint+  -- between the application and a newly generated flattening skolem variable.+  | isTypeFamilyTyCon tc+  = flatten_fam_app tc tys++  -- For * a normal data type application+  --     * data family application+  -- we just recursively flatten the arguments.+  | otherwise+-- FM_Avoid stuff commented out; see Note [Lazy flattening]+--  , let fmode' = case fmode of  -- Switch off the flat_top bit in FM_Avoid+--                   FE { fe_mode = FM_Avoid tv _ }+--                     -> fmode { fe_mode = FM_Avoid tv False }+--                   _ -> fmode+  = flatten_ty_con_app tc tys++flatten_one (FunTy ty1 ty2)+  = do { (xi1,co1) <- flatten_one ty1+       ; (xi2,co2) <- flatten_one ty2+       ; role <- getRole+       ; return (mkFunTy xi1 xi2, mkFunCo role co1 co2) }++flatten_one ty@(ForAllTy {})+-- TODO (RAE): This is inadequate, as it doesn't flatten the kind of+-- the bound tyvar. Doing so will require carrying around a substitution+-- and the usual substTyVarBndr-like silliness. Argh.++-- We allow for-alls when, but only when, no type function+-- applications inside the forall involve the bound type variables.+  = do { let (bndrs, rho) = tcSplitForAllTyVarBndrs ty+             tvs           = binderVars bndrs+       ; (rho', co) <- setMode FM_SubstOnly $ flatten_one rho+                         -- Substitute only under a forall+                         -- See Note [Flattening under a forall]+       ; return (mkForAllTys bndrs rho', mkHomoForAllCos tvs co) }++flatten_one (CastTy ty g)+  = do { (xi, co) <- flatten_one ty+       ; (g', _)   <- flatten_co g++       ; return (mkCastTy xi g', castCoercionKind co g' g) }++flatten_one (CoercionTy co) = first mkCoercionTy <$> flatten_co co++-- | "Flatten" a coercion. Really, just zonk it so we can uphold+-- (F1) of Note [Flattening]+flatten_co :: Coercion -> FlatM (Coercion, Coercion)+flatten_co co+  = do { co <- liftTcS $ zonkCo co+       ; env_role <- getRole+       ; let co' = mkTcReflCo env_role (mkCoercionTy co)+       ; return (co, co') }++-- flatten (nested) AppTys+flatten_app_tys :: Type -> [Type] -> FlatM (Xi, Coercion)+-- commoning up nested applications allows us to look up the function's kind+-- only once. Without commoning up like this, we would spend a quadratic amount+-- of time looking up functions' types+flatten_app_tys (AppTy ty1 ty2) tys = flatten_app_tys ty1 (ty2:tys)+flatten_app_tys fun_ty arg_tys+  = do { (fun_xi, fun_co) <- flatten_one fun_ty+       ; flatten_app_ty_args fun_xi fun_co arg_tys }++-- Given a flattened function (with the coercion produced by flattening) and+-- a bunch of unflattened arguments, flatten the arguments and apply+--+-- The bang patterns used here were observed to improve performance. If you+-- wish to remove them, be sure to check for regeressions in allocations.+flatten_app_ty_args :: Xi -> Coercion -> [Type] -> FlatM (Xi, Coercion)+flatten_app_ty_args fun_xi fun_co []+  -- this will be a common case when called from flatten_fam_app, so shortcut+  = return (fun_xi, fun_co)+flatten_app_ty_args fun_xi fun_co arg_tys+  = do { (xi, co, kind_co) <- case tcSplitTyConApp_maybe fun_xi of+           Just (tc, xis) ->+             do { let tc_roles  = tyConRolesRepresentational tc+                      arg_roles = dropList xis tc_roles+                ; (arg_xis, arg_cos, kind_co)+                    <- flatten_vector (typeKind fun_xi) arg_roles arg_tys++                  -- Here, we have fun_co :: T xi1 xi2 ~ ty+                  -- and we need to apply fun_co to the arg_cos. The problem is+                  -- that using mkAppCo is wrong because that function expects+                  -- its second coercion to be Nominal, and the arg_cos might+                  -- not be. The solution is to use transitivity:+                  -- T <xi1> <xi2> arg_cos ;; fun_co <arg_tys>+                ; eq_rel <- getEqRel+                ; let app_xi = mkTyConApp tc (xis ++ arg_xis)+                      app_co = case eq_rel of+                        NomEq  -> mkAppCos fun_co arg_cos+                        ReprEq -> mkTcTyConAppCo Representational tc+                                    (zipWith mkReflCo tc_roles xis ++ arg_cos)+                                  `mkTcTransCo`+                                  mkAppCos fun_co (map mkNomReflCo arg_tys)+                ; return (app_xi, app_co, kind_co) }+           Nothing ->+             do { (arg_xis, arg_cos, kind_co)+                    <- flatten_vector (typeKind fun_xi) (repeat Nominal) arg_tys+                ; let arg_xi = mkAppTys fun_xi arg_xis+                      arg_co = mkAppCos fun_co arg_cos+                ; return (arg_xi, arg_co, kind_co) }++       ; return (homogenise_result xi co kind_co) }++flatten_ty_con_app :: TyCon -> [TcType] -> FlatM (Xi, Coercion)+flatten_ty_con_app tc tys+  = do { role <- getRole+       ; (xis, cos, kind_co) <- flatten_args_tc tc (tyConRolesX role tc) tys+       ; let tyconapp_xi = mkTyConApp tc xis+             tyconapp_co = mkTyConAppCo role tc cos+       ; return (homogenise_result tyconapp_xi tyconapp_co kind_co) }++-- Make the result of flattening homogeneous (Note [Flattening] (F2))+homogenise_result :: Xi              -- a flattened type+                  -> Coercion        -- :: xi ~ original ty+                  -> CoercionN       -- kind_co :: typeKind(xi) ~N typeKind(ty)+                  -> (Xi, Coercion)  -- (xi |> kind_co, (xi |> kind_co)+                                     --   ~ original ty)+homogenise_result xi co kind_co+  = let xi' = xi `mkCastTy` kind_co+        co' = co `mkTcCoherenceLeftCo` kind_co+    in  (xi', co')+{-# INLINE homogenise_result #-}++-- Flatten a vector (list of arguments).+flatten_vector :: Kind   -- of the function being applied to these arguments+               -> [Role] -- If we're flatten w.r.t. ReprEq, what roles do the+                         -- args have?+               -> [Type] -- the args to flatten+               -> FlatM ([Xi], [Coercion], CoercionN)+flatten_vector ki roles tys+  = do { eq_rel <- getEqRel+       ; case eq_rel of+           NomEq  -> flatten_args bndrs+                                  any_named_bndrs+                                  inner_ki+                                  fvs+                                  (repeat Nominal)+                                  tys+           ReprEq -> flatten_args bndrs+                                  any_named_bndrs+                                  inner_ki+                                  fvs+                                  roles+                                  tys+       }+  where+    (bndrs, inner_ki, any_named_bndrs) = split_pi_tys' ki+    fvs                                = tyCoVarsOfType ki+{-# INLINE flatten_vector #-}++{-+Note [Flattening synonyms]+~~~~~~~~~~~~~~~~~~~~~~~~~~+Not expanding synonyms aggressively improves error messages, and+keeps types smaller. But we need to take care.++Suppose+   type T a = a -> a+and we want to flatten the type (T (F a)).  Then we can safely flatten+the (F a) to a skolem, and return (T fsk).  We don't need to expand the+synonym.  This works because TcTyConAppCo can deal with synonyms+(unlike TyConAppCo), see Note [TcCoercions] in TcEvidence.++But (Trac #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.+++Note [Flattening under a forall]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Under a forall, we+  (a) MUST apply the inert substitution+  (b) MUST NOT flatten type family applications+Hence FMSubstOnly.++For (a) consider   c ~ a, a ~ T (forall b. (b, [c]))+If we don't apply the c~a substitution to the second constraint+we won't see the occurs-check error.++For (b) consider  (a ~ forall b. F a b), we don't want to flatten+to     (a ~ forall b.fsk, F a b ~ fsk)+because now the 'b' has escaped its scope.  We'd have to flatten to+       (a ~ forall b. fsk b, forall b. F a b ~ fsk b)+and we have not begun to think about how to make that work!++************************************************************************+*                                                                      *+             Flattening a type-family application+*                                                                      *+************************************************************************+-}++flatten_fam_app :: TyCon -> [TcType] -> FlatM (Xi, Coercion)+  --   flatten_fam_app            can be over-saturated+  --   flatten_exact_fam_app       is exactly saturated+  --   flatten_exact_fam_app_fully lifts out the application to top level+  -- Postcondition: Coercion :: Xi ~ F tys+flatten_fam_app tc tys  -- Can be over-saturated+    = ASSERT2( tys `lengthAtLeast` tyConArity tc+             , ppr tc $$ ppr (tyConArity tc) $$ ppr tys)++      do { mode <- getMode+         ; case mode of+             { FM_SubstOnly  -> flatten_ty_con_app tc tys+             ; FM_FlattenAll ->++                 -- Type functions are saturated+                 -- The type function might be *over* saturated+                 -- in which case the remaining arguments should+                 -- be dealt with by AppTys+      do { let (tys1, tys_rest) = splitAt (tyConArity tc) tys+         ; (xi1, co1) <- flatten_exact_fam_app_fully tc tys1+               -- co1 :: xi1 ~ F tys1++         ; flatten_app_ty_args xi1 co1 tys_rest } } }++-- the [TcType] exactly saturate the TyCon+flatten_exact_fam_app_fully :: TyCon -> [TcType] -> FlatM (Xi, Coercion)+flatten_exact_fam_app_fully tc tys+  -- See Note [Reduce type family applications eagerly]+     -- the following typeKind should never be evaluated, as it's just used in+     -- casting, and casts by refl are dropped+  = do { let reduce_co = mkNomReflCo (typeKind (mkTyConApp tc tys))+       ; mOut <- try_to_reduce_nocache tc tys reduce_co id+       ; case mOut of+           Just out -> pure out+           Nothing -> do+               { -- First, flatten the arguments+               ; (xis, cos, kind_co)+                   <- setEqRel NomEq $  -- just do this once, instead of for+                                        -- each arg+                      flatten_args_tc tc (repeat Nominal) tys+                      -- kind_co :: typeKind(F xis) ~N typeKind(F tys)+               ; eq_rel   <- getEqRel+               ; cur_flav <- getFlavour+               ; let role   = eqRelRole eq_rel+                     ret_co = mkTyConAppCo role tc cos+                      -- ret_co :: F xis ~ F tys; might be heterogeneous++                -- Now, look in the cache+               ; mb_ct <- liftTcS $ lookupFlatCache tc xis+               ; case mb_ct of+                   Just (co, rhs_ty, flav)  -- co :: F xis ~ fsk+                        -- flav is [G] or [WD]+                        -- See Note [Type family equations] in TcSMonad+                     | (NotSwapped, _) <- flav `funEqCanDischargeF` cur_flav+                     ->  -- Usable hit in the flat-cache+                        do { traceFlat "flatten/flat-cache hit" $+                               (ppr tc <+> ppr xis $$ ppr rhs_ty)+                           ; (fsk_xi, fsk_co) <- flatten_one rhs_ty+                                  -- The fsk may already have been unified, so+                                  -- flatten it+                                  -- fsk_co :: fsk_xi ~ fsk+                           ; let xi  = fsk_xi `mkCastTy` kind_co+                                 co' = (fsk_co `mkTcCoherenceLeftCo` kind_co)+                                        `mkTransCo`+                                        maybeSubCo eq_rel (mkSymCo co)+                                        `mkTransCo` ret_co+                           ; return (xi, co')+                           }+                                            -- :: fsk_xi ~ F xis++                   -- Try to reduce the family application right now+                   -- See Note [Reduce type family applications eagerly]+                   _ -> do { mOut <- try_to_reduce tc+                                                   xis+                                                   kind_co+                                                   (`mkTransCo` ret_co)+                           ; case mOut of+                               Just out -> pure out+                               Nothing -> do+                                 { loc <- getLoc+                                 ; (ev, co, fsk) <- liftTcS $+                                     newFlattenSkolem cur_flav loc tc xis++                                 -- The new constraint (F xis ~ fsk) is not+                                 -- necessarily inert (e.g. the LHS may be a+                                 -- redex) so we must put it in the work list+                                 ; let ct = CFunEqCan { cc_ev     = ev+                                                      , cc_fun    = tc+                                                      , cc_tyargs = xis+                                                      , cc_fsk    = fsk }+                                 ; emitFlatWork ct++                                 ; traceFlat "flatten/flat-cache miss" $+                                     (ppr tc <+> ppr xis $$ ppr fsk $$ ppr ev)++                                 -- NB: fsk's kind is already flattend because+                                 --     the xis are flattened+                                 ; let xi = mkTyVarTy fsk `mkCastTy` kind_co+                                       co' = (maybeSubCo eq_rel (mkSymCo co)+                                               `mkTcCoherenceLeftCo` kind_co)+                                              `mkTransCo` ret_co+                                 ; return (xi, co')+                                 }+                           }+               }+        }++  where++    -- try_to_reduce and try_to_reduce_nocache (below) could be unified into+    -- a more general definition, but it was observed that separating them+    -- gives better performance (lower allocation numbers in T9872x).++    try_to_reduce :: TyCon   -- F, family tycon+                  -> [Type]  -- args, not necessarily flattened+                  -> CoercionN -- kind_co :: typeKind(F args) ~N+                               --            typeKind(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 tc tys kind_co update_co+      = do { checkStackDepth (mkTyConApp tc tys)+           ; mb_match <- liftTcS $ matchFam tc tys+           ; case mb_match of+                 -- NB: norm_co will always be homogeneous. All type families+                 -- are homogeneous.+               Just (norm_co, norm_ty)+                 -> do { traceFlat "Eager T.F. reduction success" $+                         vcat [ ppr tc, ppr tys, ppr norm_ty+                              , ppr norm_co <+> dcolon+                                            <+> ppr (coercionKind norm_co)+                              ]+                       ; (xi, final_co) <- bumpDepth $ flatten_one norm_ty+                       ; eq_rel <- getEqRel+                       ; let co = maybeSubCo eq_rel norm_co+                                   `mkTransCo` mkSymCo final_co+                       ; flavour <- getFlavour+                           -- NB: only extend cache with nominal equalities+                       ; when (eq_rel == NomEq) $+                         liftTcS $+                         extendFlatCache tc tys ( co, xi, flavour )+                       ; let xi' = xi `mkCastTy` kind_co+                             co' = update_co $ mkSymCo co+                                                `mkTcCoherenceLeftCo` kind_co+                       ; return $ Just (xi', co') }+               Nothing -> pure Nothing }++    try_to_reduce_nocache :: TyCon   -- F, family tycon+                          -> [Type]  -- args, not necessarily flattened+                          -> CoercionN -- kind_co :: typeKind(F args)+                                       --            ~N typeKind(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+      = do { checkStackDepth (mkTyConApp tc tys)+           ; mb_match <- liftTcS $ matchFam tc tys+           ; case mb_match of+                 -- NB: norm_co will always be homogeneous. All type families+                 -- are homogeneous.+               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+                             xi' = xi `mkCastTy` kind_co+                             co' = update_co $ mkSymCo co+                                                `mkTcCoherenceLeftCo` kind_co+                       ; return $ Just (xi', co') }+               Nothing -> pure Nothing }++{- Note [Reduce type family applications eagerly]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we come across a type-family application like (Append (Cons x Nil) t),+then, rather than flattening to a skolem etc, we may as well just reduce+it on the spot to (Cons x t).  This saves a lot of intermediate steps.+Examples that are helped are tests T9872, and T5321Fun.++Performance testing indicates that it's best to try this *twice*, once+before flattening arguments and once after flattening arguments.+Adding the extra reduction attempt before flattening arguments cut+the allocation amounts for the T9872{a,b,c} tests by half.++An example of where the early reduction appears helpful:++  type family Last x where+    Last '[x]     = x+    Last (h ': t) = Last t++  workitem: (x ~ Last '[1,2,3,4,5,6])++Flattening the argument never gets us anywhere, but trying to flatten+it at every step is quadratic in the length of the list. Reducing more+eagerly makes simplifying the right-hand type linear in its length.++Testing also indicated that the early reduction should *not* use the+flat-cache, but that the later reduction *should*. (Although the+effect was not large.)  Hence the Bool argument to try_to_reduce.  To+me (SLPJ) this seems odd; I get that eager reduction usually succeeds;+and if don't use the cache for eager reduction, we will miss most of+the opportunities for using it at all.  More exploration would be good+here.++At the end, once we've got a flat rhs, we extend the flatten-cache to record+the result. Doing so can save lots of work when the same redex shows up more+than once. Note that we record the link from the redex all the way to its+*final* value, not just the single step reduction. Interestingly, using the+flat-cache for the first reduction resulted in an increase in allocations+of about 3% for the four T9872x tests. However, using the flat-cache in+the later reduction is a similar gain. I (Richard E) don't currently (Dec '14)+have any knowledge as to *why* these facts are true.++************************************************************************+*                                                                      *+             Flattening a type variable+*                                                                      *+********************************************************************* -}++-- | The result of flattening a tyvar "one step".+data FlattenTvResult+  = FTRNotFollowed+      -- ^ The inert set doesn't make the tyvar equal to anything else++  | FTRFollowed TcType Coercion+      -- ^ The tyvar flattens to a not-necessarily flat other type.+      -- co :: new type ~r old type, where the role is determined by+      -- the FlattenEnv++flattenTyVar :: TyVar -> FlatM (Xi, Coercion)+flattenTyVar tv+  = do { mb_yes <- flatten_tyvar1 tv+       ; case mb_yes of+           FTRFollowed ty1 co1  -- Recur+             -> do { (ty2, co2) <- flatten_one ty1+                   -- ; traceFlat "flattenTyVar2" (ppr tv $$ ppr ty2)+                   ; return (ty2, co2 `mkTransCo` co1) }++           FTRNotFollowed   -- Done, but make sure the kind is zonked+                            -- Note [Flattening] invariant (F1)+             -> do { tv' <- liftTcS $ updateTyVarKindM zonkTcType tv+                   ; role <- getRole+                   ; let ty' = mkTyVarTy tv'+                   ; return (ty', mkTcReflCo role ty') } }++flatten_tyvar1 :: TcTyVar -> FlatM FlattenTvResult+-- "Flattening" a type variable means to apply the substitution to it+-- Specifically, look up the tyvar in+--   * the internal MetaTyVar box+--   * the inerts+-- See also the documentation for FlattenTvResult++flatten_tyvar1 tv+  = do { mb_ty <- liftTcS $ isFilledMetaTyVar_maybe tv+       ; case mb_ty of+           Just ty -> do { traceFlat "Following filled tyvar"+                             (ppr tv <+> equals <+> ppr ty)+                         ; role <- getRole+                         ; return (FTRFollowed ty (mkReflCo role ty)) } ;+           Nothing -> do { traceFlat "Unfilled tyvar" (ppr tv)+                         ; fr <- getFlavourRole+                         ; flatten_tyvar2 tv fr } }++flatten_tyvar2 :: TcTyVar -> CtFlavourRole -> FlatM FlattenTvResult+-- The tyvar is not a filled-in meta-tyvar+-- Try in the inert equalities+-- See Definition [Applying a generalised substitution] in TcSMonad+-- See Note [Stability of flattening] in TcSMonad++flatten_tyvar2 tv fr@(_, eq_rel)+  = do { ieqs <- liftTcS $ getInertEqs+       ; mode <- getMode+       ; case lookupDVarEnv ieqs tv of+           Just (ct:_)   -- If the first doesn't work,+                         -- the subsequent ones won't either+             | CTyEqCan { cc_ev = ctev, cc_tyvar = tv+                        , 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"+                        (ppr mode <+>+                         ppr tv <+>+                         equals <+>+                         ppr rhs_ty $$ ppr ctev)+                    ; let rewrite_co1 = mkSymCo (ctEvCoercion ctev)+                          rewrite_co  = case (ct_eq_rel, eq_rel) of+                            (ReprEq, _rel)  -> ASSERT( _rel == ReprEq )+                                    -- if this ASSERT fails, then+                                    -- eqCanRewriteFR answered incorrectly+                                               rewrite_co1+                            (NomEq, NomEq)  -> rewrite_co1+                            (NomEq, ReprEq) -> mkSubCo rewrite_co1++                    ; return (FTRFollowed rhs_ty rewrite_co) }+                    -- NB: ct is Derived then fmode must be also, hence+                    -- we are not going to touch the returned coercion+                    -- so ctEvCoercion is fine.++           _other -> return FTRNotFollowed }++{-+Note [An alternative story for the inert substitution]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+(This entire note is just background, left here in case we ever want+ to return the previous state of affairs)++We used (GHC 7.8) to have this story for the inert substitution inert_eqs++ * 'a' is not in fvs(ty)+ * They are *inert* in the weaker sense that there is no infinite chain of+   (i1 `eqCanRewrite` i2), (i2 `eqCanRewrite` i3), etc++This means that flattening must be recursive, but it does allow+  [G] a ~ [b]+  [G] b ~ Maybe c++This avoids "saturating" the Givens, which can save a modest amount of work.+It is easy to implement, in TcInteract.kick_out, by only kicking out an inert+only if (a) the work item can rewrite the inert AND+        (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+is an example; all the constraints here are Givens++             [G] a ~ TF (a,Int)+    -->+    work     TF (a,Int) ~ fsk+    inert    fsk ~ a++    --->+    work     fsk ~ (TF a, TF Int)+    inert    fsk ~ a++    --->+    work     a ~ (TF a, TF Int)+    inert    fsk ~ a++    ---> (attempting to flatten (TF a) so that it does not mention a+    work     TF a ~ fsk2+    inert    a ~ (fsk2, TF Int)+    inert    fsk ~ (fsk2, TF Int)++    ---> (substitute for a)+    work     TF (fsk2, TF Int) ~ fsk2+    inert    a ~ (fsk2, TF Int)+    inert    fsk ~ (fsk2, TF Int)++    ---> (top-level reduction, re-orient)+    work     fsk2 ~ (TF fsk2, TF Int)+    inert    a ~ (fsk2, TF Int)+    inert    fsk ~ (fsk2, TF Int)++    ---> (attempt to flatten (TF fsk2) to get rid of fsk2+    work     TF fsk2 ~ fsk3+    work     fsk2 ~ (fsk3, TF Int)+    inert    a   ~ (fsk2, TF Int)+    inert    fsk ~ (fsk2, TF Int)++    --->+    work     TF fsk2 ~ fsk3+    inert    fsk2 ~ (fsk3, TF Int)+    inert    a   ~ ((fsk3, TF Int), TF Int)+    inert    fsk ~ ((fsk3, TF Int), TF Int)++Because the incoming given rewrites all the inert givens, we get more and+more duplication in the inert set.  But this really only happens in pathalogical+casee, so we don't care.+++************************************************************************+*                                                                      *+             Unflattening+*                                                                      *+************************************************************************++An unflattening example:+    [W] F a ~ alpha+flattens to+    [W] F a ~ fmv   (CFunEqCan)+    [W] fmv ~ alpha (CTyEqCan)+We must solve both!+-}++unflattenWanteds :: Cts -> Cts -> TcS Cts+unflattenWanteds tv_eqs funeqs+ = do { tclvl    <- getTcLevel++      ; traceTcS "Unflattening" $ braces $+        vcat [ text "Funeqs =" <+> pprCts funeqs+             , text "Tv eqs =" <+> pprCts tv_eqs ]++         -- Step 1: unflatten the CFunEqCans, except if that causes an occurs check+         -- Occurs check: consider  [W] alpha ~ [F alpha]+         --                 ==> (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+      ; traceTcS "Unflattening 1" $ braces (pprCts funeqs)++          -- Step 2: unify the tv_eqs, if possible+      ; tv_eqs  <- foldrBagM (unflatten_eq tclvl) emptyCts tv_eqs+      ; traceTcS "Unflattening 2" $ braces (pprCts tv_eqs)++          -- Step 3: fill any remaining fmvs with fresh unification variables+      ; funeqs <- mapBagM finalise_funeq funeqs+      ; 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++      ; let all_flat = tv_eqs `andCts` funeqs+      ; traceTcS "Unflattening done" $ braces (pprCts all_flat)++      ; return all_flat }+  where+    ----------------+    unflatten_funeq :: Ct -> Cts -> TcS Cts+    unflatten_funeq ct@(CFunEqCan { cc_fun = tc, cc_tyargs = xis+                                  , cc_fsk = fmv, cc_ev = ev }) rest+      = do {   -- fmv should be an un-filled flatten meta-tv;+               -- we now fix its final value by filling it, being careful+               -- to observe the occurs check.  Zonking will eliminate it+               -- altogether in due course+             rhs' <- zonkTcType (mkTyConApp tc xis)+           ; case occCheckExpand [fmv] rhs' of+               Just rhs''    -- Normal case: fill the tyvar+                 -> do { setReflEvidence ev NomEq rhs''+                       ; unflattenFmv fmv rhs''+                       ; return rest }++               Nothing ->  -- Occurs check+                          return (ct `consCts` rest) }++    unflatten_funeq other_ct _+      = pprPanic "unflatten_funeq" (ppr other_ct)++    ----------------+    finalise_funeq :: Ct -> TcS Ct+    finalise_funeq (CFunEqCan { cc_fsk = fmv, cc_ev = ev })+      = do { demoteUnfilledFmv fmv+           ; return (mkNonCanonical ev) }+    finalise_funeq ct = pprPanic "finalise_funeq" (ppr ct)++    ----------------+    unflatten_eq :: TcLevel -> Ct -> Cts -> TcS Cts+    unflatten_eq tclvl ct@(CTyEqCan { cc_ev = ev, cc_tyvar = tv+                                    , cc_rhs = rhs, cc_eq_rel = eq_rel }) rest++      | NomEq <- eq_rel -- See Note [Do not unify representational equalities]+                        --     in TcInteract+      , isFmvTyVar tv   -- Previously these fmvs were untouchable,+                        -- but now they are touchable+                        -- NB: unlike unflattenFmv, filling a fmv here /does/+                        --     bump the unification count; it is "improvement"+                        -- Note [Unflattening can force the solver to iterate]+      = ASSERT2( tyVarKind tv `eqType` typeKind rhs, ppr ct )+           -- CTyEqCan invariant should ensure this is true+        do { is_filled <- isFilledMetaTyVar tv+           ; elim <- case is_filled of+               False -> do { traceTcS "unflatten_eq 2" (ppr ct)+                           ; tryFill ev tv rhs }+               True  -> do { traceTcS "unflatten_eq 3" (ppr ct)+                           ; try_fill_rhs ev tclvl tv rhs }+           ; if elim+             then do { setReflEvidence ev eq_rel (mkTyVarTy tv)+                     ; return rest }+             else return (ct `consCts` rest) }++      | otherwise+      = return (ct `consCts` rest)++    unflatten_eq _ ct _ = pprPanic "unflatten_irred" (ppr ct)++    ----------------+    try_fill_rhs ev tclvl lhs_tv rhs+         -- Constraint is lhs_tv ~ rhs_tv,+         -- and lhs_tv is filled, so try RHS+      | Just (rhs_tv, co) <- getCastedTyVar_maybe rhs+                             -- co :: kind(rhs_tv) ~ kind(lhs_tv)+      , isFmvTyVar rhs_tv || (isTouchableMetaTyVar tclvl rhs_tv+                              && not (isSigTyVar rhs_tv))+                              -- LHS is a filled fmv, and so is a type+                              -- family application, which a SigTv should+                              -- not unify with+      = do { is_filled <- isFilledMetaTyVar rhs_tv+           ; if is_filled then return False+             else tryFill ev rhs_tv+                          (mkTyVarTy lhs_tv `mkCastTy` mkSymCo co) }++      | otherwise+      = return False++    ----------------+    finalise_eq :: Ct -> Cts -> TcS Cts+    finalise_eq (CTyEqCan { cc_ev = ev, cc_tyvar = tv+                          , cc_rhs = rhs, cc_eq_rel = eq_rel }) rest+      | isFmvTyVar tv+      = do { ty1 <- zonkTcTyVar tv+           ; rhs' <- zonkTcType rhs+           ; if ty1 `tcEqType` rhs'+             then do { setReflEvidence ev eq_rel rhs'+                     ; return rest }+             else return (mkNonCanonical ev `consCts` rest) }++      | otherwise+      = return (mkNonCanonical ev `consCts` rest)++    finalise_eq ct _ = pprPanic "finalise_irred" (ppr ct)++tryFill :: CtEvidence -> TcTyVar -> TcType -> TcS Bool+-- (tryFill tv rhs ev) assumes 'tv' is an /un-filled/ MetaTv+-- If tv does not appear in 'rhs', it set tv := rhs,+-- binds the evidence (which should be a CtWanted) to Refl<rhs>+-- and return True.  Otherwise returns False+tryFill ev tv rhs+  = ASSERT2( not (isGiven ev), ppr ev )+    do { rhs' <- zonkTcType rhs+       ; case () of+            _ | Just tv' <- tcGetTyVar_maybe rhs'+              , tv == tv'   -- tv == rhs+              -> return True++            _ | Just rhs'' <- occCheckExpand [tv] rhs'+              -> do {       -- Fill the tyvar+                      unifyTyVar tv rhs''+                    ; return True }++            _ | otherwise   -- Occurs check+              -> return False+    }++setReflEvidence :: CtEvidence -> EqRel -> TcType -> TcS ()+setReflEvidence ev eq_rel rhs+  = setEvBindIfWanted ev (evCoercion refl_co)+  where+    refl_co = mkTcReflCo (eqRelRole eq_rel) rhs++{-+Note [Unflatten using funeqs first]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+    [W] G a ~ Int+    [W] F (G a) ~ G a++do not want to end up with+    [W] F Int ~ Int+because that might actually hold!  Better to end up with the two above+unsolved constraints.  The flat form will be++    G a ~ fmv1     (CFunEqCan)+    F fmv1 ~ fmv2  (CFunEqCan)+    fmv1 ~ Int     (CTyEqCan)+    fmv1 ~ fmv2    (CTyEqCan)++Flatten using the fun-eqs first.+-}++-- | Like 'splitPiTys'' but comes with a 'Bool' which is 'True' iff there is at+-- least one named binder.+split_pi_tys' :: Type -> ([TyBinder], Type, Bool)+split_pi_tys' ty = split ty ty+  where+  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 orig_ty _                = ([], orig_ty, False)+{-# INLINE split_pi_tys' #-}++-- | Like 'tyConBindersTyBinders' but you also get a 'Bool' which is true iff+-- there is at least one named binder.+ty_con_binders_ty_binders' :: [TyConBinder] -> ([TyBinder], Bool)+ty_con_binders_ty_binders' = foldr go ([], False)+  where+    go (TvBndr tv (NamedTCB vis)) (bndrs, _)+      = (Named (TvBndr tv vis) : bndrs, True)+    go (TvBndr tv AnonTCB)        (bndrs, n)+      = (Anon (tyVarKind tv)   : bndrs, n)+    {-# INLINE go #-}+{-# INLINE ty_con_binders_ty_binders' #-}
typecheck/TcForeign.hs view
@@ -263,7 +263,7 @@           -- we need HsType Id hence the undefined        ; let fi_decl = ForeignImport { fd_name = L nloc id                                      , fd_sig_ty = undefined-                                     , fd_co = mkSymCo norm_co+                                     , fd_i_ext = mkSymCo norm_co                                      , fd_fi = imp_decl' }        ; return (id, L dloc fi_decl, gres) } tcFImport d = pprPanic "tcFImport" (ppr d)@@ -409,7 +409,7 @@     return ( mkVarBind id rhs            , ForeignExport { fd_name = L loc id                            , fd_sig_ty = undefined-                           , fd_co = norm_co, fd_fe = spec' }+                           , fd_e_ext = norm_co, fd_fe = spec' }            , gres) tcFExport d = pprPanic "tcFExport" (ppr d) 
typecheck/TcGenDeriv.hs view
@@ -214,7 +214,9 @@       where         nested_eq_expr []  [] [] = true_Expr         nested_eq_expr tys as bs-          = foldl1 and_Expr (zipWith3Equal "nested_eq" nested_eq 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.           where             nested_eq ty a b = nlHsPar (eq_Expr tycon ty (nlHsVar a) (nlHsVar b)) @@ -447,7 +449,7 @@                                  , mkHsCaseAlt nlWildPat (gtResult op) ]       where         tag     = get_tag data_con-        tag_lit = noLoc (HsLit (HsIntPrim NoSourceText (toInteger tag)))+        tag_lit = noLoc (HsLit noExt (HsIntPrim NoSourceText (toInteger tag)))      mkInnerEqAlt :: OrdOp -> DataCon -> LMatch GhcPs (LHsExpr GhcPs)     -- First argument 'a' known to be built with K@@ -614,7 +616,8 @@              (nlHsApp (nlHsVar (tag2con_RDR dflags tycon))                       (nlHsApps plus_RDR                             [ nlHsVarApps intDataCon_RDR [ah_RDR]-                            , nlHsLit (HsInt def (mkIntegralLit (-1 :: Int)))]))+                            , nlHsLit (HsInt noExt+                                                (mkIntegralLit (-1 :: Int)))]))      to_enum dflags       = mk_easy_FunBind loc toEnum_RDR [a_Pat] $@@ -774,7 +777,7 @@      enum_index dflags       = mk_easy_FunBind loc unsafeIndex_RDR-                [noLoc (AsPat (noLoc c_RDR)+                [noLoc (AsPat noExt (noLoc c_RDR)                            (nlTuplePat [a_Pat, nlWildPat] Boxed)),                                 d_Pat] (            untag_Expr dflags tycon [(a_RDR, ah_RDR)] (@@ -1146,7 +1149,7 @@       | otherwise   =          ([a_Pat, con_pat],           showParen_Expr (genOpApp a_Expr ge_RDR (nlHsLit-                                 (HsInt def (mkIntegralLit con_prec_plus_one))))+                         (HsInt noExt (mkIntegralLit con_prec_plus_one))))                          (nlHsPar (nested_compose_Expr show_thingies)))         where              data_con_RDR  = getRdrName data_con@@ -1230,7 +1233,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 def (mkIntegralLit p)), x]+  = nlHsApps showsPrec_RDR [nlHsLit (HsInt noExt (mkIntegralLit p)), x]  -- | shows :: Show a => a -> ShowS mk_shows_app :: LHsExpr GhcPs -> LHsExpr GhcPs@@ -1327,7 +1330,7 @@     genDataTyCon :: DerivStuff     genDataTyCon        --  $dT       = DerivHsBind (mkHsVarBind loc data_type_name rhs,-                     L loc (TypeSig [L loc data_type_name] sig_ty))+                     L loc (TypeSig noExt [L loc data_type_name] sig_ty))      sig_ty = mkLHsSigWcType (nlHsTyVar dataType_RDR)     rhs    = nlHsVar mkDataType_RDR@@ -1337,7 +1340,7 @@     genDataDataCon :: DataCon -> RdrName -> DerivStuff     genDataDataCon dc constr_name       --  $cT1 etc       = DerivHsBind (mkHsVarBind loc constr_name rhs,-                     L loc (TypeSig [L loc constr_name] sig_ty))+                     L loc (TypeSig noExt [L loc constr_name] sig_ty))       where         sig_ty   = mkLHsSigWcType (nlHsTyVar constr_RDR)         rhs      = nlHsApps mkConstr_RDR constr_args@@ -1582,40 +1585,56 @@ Note [Newtype-deriving instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We take every method in the original instance and `coerce` it to fit-into the derived instance. We need a type annotation on the argument+into the derived instance. We need type applications on the argument to `coerce` to make it obvious what instantiation of the method we're coercing from.  So from, say,+   class C a b where-    op :: a -> [b] -> Int+    op :: forall c. a -> [b] -> c -> Int    newtype T x = MkT <rep-ty>    instance C a <rep-ty> => C a (T x) where-    op = coerce @ (a -> [<rep-ty>] -> Int)-                @ (a -> [T x]      -> Int)-                op+    op = coerce @ (a -> [<rep-ty>] -> c -> Int)+                @ (a -> [T x]      -> c -> Int)+                op :: forall c. a -> [T x] -> c -> Int -Notice that we give the 'coerce' two explicitly-visible type arguments-to say how it should be instantiated.  Recall+In addition to the type applications, we also have an explicit+type signature on the entire RHS. This brings the method-bound variable+`c` into scope over the two type applications.+See Note [GND and QuantifiedConstraints] for more information on why this+is important. -  coerce :: Coeercible a b => a -> b+Giving 'coerce' two explicitly-visible type arguments grants us finer control+over how it should be instantiated. Recall +  coerce :: Coercible a b => a -> b+ By giving it explicit type arguments we deal with the case where 'op' has a higher rank type, and so we must instantiate 'coerce' with a polytype.  E.g.-   class C a where op :: forall b. a -> b -> b++   class C a where op :: a -> forall b. b -> b    newtype T x = MkT <rep-ty>    instance C <rep-ty> => C (T x) where-     op = coerce @ (forall b. <rep-ty> -> b -> b)-                 @ (forall b. T x -> b -> b)-                op+     op = coerce @ (<rep-ty> -> forall b. b -> b)+                 @ (T x      -> forall b. b -> b)+                op :: T x -> forall b. b -> b -The type checker checks this code, and it currently requires--XImpredicativeTypes to permit that polymorphic type instantiation,-so we have to switch that flag on locally in TcDeriv.genInst.+The use of type applications is crucial here. If we had tried using only+explicit type signatures, like so: -See #8503 for more discussion.+   instance C <rep-ty> => C (T x) where+     op = coerce (op :: <rep-ty> -> forall b. b -> b)+                     :: T x      -> forall b. b -> b +Then GHC will attempt to deeply skolemize the two type signatures, which will+wreak havoc with the Coercible solver. Therefore, we instead use type+applications, which do not deeply skolemize and thus avoid this issue.+The downside is that we currently require -XImpredicativeTypes to permit this+polymorphic type instantiation, so we have to switch that flag on locally in+TcDeriv.genInst. See #8503 for more discussion.+ Note [Newtype-deriving trickiness] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider (Trac #12768):@@ -1635,13 +1654,98 @@   instance C a => C (N a) where { op = opN }    opN :: (C a, D (N a)) => N a -> N a-  opN = coerce @(D [a]   => [a] -> [a])-               @(D (N a) => [N a] -> [N a]-               opList+  opN = coerce @([a]   -> [a])+               @([N a] -> [N a]+               opList :: D (N a) => [N a] -> [N a]  But there is no reason to suppose that (D [a]) and (D (N a)) are inter-coercible; these instances might completely different. So GHC rightly rejects this code.++Note [GND and QuantifiedConstraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider the following example from #15290:++  class C m where+    join :: m (m a) -> m a++  newtype T m a = MkT (m a)++  deriving instance+    (C m, forall p q. Coercible p q => Coercible (m p) (m q)) =>+    C (T m)++The code that GHC used to generate for this was:++  instance (C m, forall p q. Coercible p q => Coercible (m p) (m q)) =>+      C (T m) where+    join = coerce @(forall a.   m   (m a) ->   m a)+                  @(forall a. T m (T m a) -> T m a)+                  join++This instantiates `coerce` at a polymorphic type, a form of impredicative+polymorphism, so we're already on thin ice. And in fact the ice breaks,+as we'll explain:++The call to `coerce` gives rise to:++  Coercible (forall a.   m   (m a) ->   m a)+            (forall a. T m (T m a) -> T m a)++And that simplified to the following implication constraint:++  forall a <no-ev>. m (T m a) ~R# m (m a)++But because this constraint is under a `forall`, inside a type, we have to+prove it *without computing any term evidence* (hence the <no-ev>). Alas, we+*must* generate a term-level evidence binding in order to instantiate the+quantified constraint! In response, GHC currently chooses not to use such+a quantified constraint.+See Note [Instances in no-evidence implications] in TcInteract.++But this isn't the death knell for combining QuantifiedConstraints with GND.+On the contrary, if we generate GND bindings in a slightly different way, then+we can avoid this situation altogether. Instead of applying `coerce` to two+polymorphic types, we instead let an explicit type signature do the polymorphic+instantiation, and omit the `forall`s in the type applications.+More concretely, we generate the following code instead:++  instance (C m, forall p q. Coercible p q => Coercible (m p) (m q)) =>+      C (T m) where+    join = coerce @(  m   (m a) ->   m a)+                  @(T m (T m a) -> T m a)+                  join :: forall a. T m (T m a) -> T m a++Now the visible type arguments are both monotypes, so we need do any of this+funny quantified constraint instantiation business.++You might think that that second @(T m (T m a) -> T m a) argument is redundant+in the presence of the explicit `:: forall a. T m (T m a) -> T m a` type+signature, but in fact leaving it off will break this example (from the+T15290d test case):++  class C a where+    c :: Int -> forall b. b -> a++  instance C Int++  instance C Age where+    c = coerce @(Int -> forall b. b -> Int)+               c :: Int -> forall b. b -> Age++That is because the explicit type signature deeply skolemizes the forall-bound+`b`, which wreaks havoc with the `Coercible` solver. An additional visible type+argument of @(Int -> forall b. b -> Age) is enough to prevent this.++Be aware that the use of an explicit type signature doesn't /solve/ this+problem; it just makes it less likely to occur. For example, if a class has+a truly higher-rank type like so:++  class CProblem m where+    op :: (forall b. ... (m b) ...) -> Int++Then the same situation will arise again. But at least it won't arise for the+common case of methods with ordinary, prenex-quantified types. -}  gen_Newtype_binds :: SrcSpan@@ -1667,13 +1771,16 @@                                           [] rhs_expr]       where         Pair from_ty to_ty = mkCoerceClassMethEqn cls inst_tvs inst_tys rhs_ty meth_id+        (_, _, from_tau) = tcSplitSigmaTy from_ty+        (_, _, to_tau)   = tcSplitSigmaTy to_ty          meth_RDR = getRdrName meth_id          rhs_expr = nlHsVar (getRdrName coerceId)-                                      `nlHsAppType` from_ty-                                      `nlHsAppType` to_ty-                                      `nlHsApp`     nlHsVar meth_RDR+                                      `nlHsAppType`     from_tau+                                      `nlHsAppType`     to_tau+                                      `nlHsApp`         nlHsVar meth_RDR+                                      `nlExprWithTySig` to_ty      mk_atf_inst :: TyCon -> TcM FamInst     mk_atf_inst fam_tc = do@@ -1703,12 +1810,13 @@         pp_lhs      = ppr (mkTyConApp fam_tc rep_lhs_tys)  nlHsAppType :: LHsExpr GhcPs -> Type -> LHsExpr GhcPs-nlHsAppType e s = noLoc (e `HsAppType` hs_ty)+nlHsAppType e s = noLoc (HsAppType hs_ty e)   where-    hs_ty = mkHsWildCardBndrs $ nlHsParTy (typeToLHsType s)+    hs_ty = mkHsWildCardBndrs $ parenthesizeHsType appPrec (typeToLHsType s)  nlExprWithTySig :: LHsExpr GhcPs -> Type -> LHsExpr GhcPs-nlExprWithTySig e s = noLoc (e `ExprWithTySig` hs_ty)+nlExprWithTySig e s = noLoc $ ExprWithTySig hs_ty+                            $ parenthesizeHsExpr sigPrec e   where     hs_ty = mkLHsSigWcType (typeToLHsType s) @@ -1758,11 +1866,11 @@                   -> (LHsBind GhcPs, LSig GhcPs) genAuxBindSpec dflags loc (DerivCon2Tag tycon)   = (mkFunBindSE 0 loc rdr_name eqns,-     L loc (TypeSig [L loc rdr_name] sig_ty))+     L loc (TypeSig noExt [L loc rdr_name] sig_ty))   where     rdr_name = con2tag_RDR dflags tycon -    sig_ty = mkLHsSigWcType $ L loc $ HsCoreTy $+    sig_ty = mkLHsSigWcType $ L loc $ XHsType $ NHsCoreTy $              mkSpecSigmaTy (tyConTyVars tycon) (tyConStupidTheta tycon) $              mkParentType tycon `mkFunTy` intPrimTy @@ -1784,20 +1892,20 @@   = (mkFunBindSE 0 loc rdr_name         [([nlConVarPat intDataCon_RDR [a_RDR]],            nlHsApp (nlHsVar tagToEnum_RDR) a_Expr)],-     L loc (TypeSig [L loc rdr_name] sig_ty))+     L loc (TypeSig noExt [L loc rdr_name] sig_ty))   where     sig_ty = mkLHsSigWcType $ L loc $-             HsCoreTy $ mkSpecForAllTys (tyConTyVars tycon) $+             XHsType $ NHsCoreTy $ mkSpecForAllTys (tyConTyVars tycon) $              intTy `mkFunTy` mkParentType tycon      rdr_name = tag2con_RDR dflags tycon  genAuxBindSpec dflags loc (DerivMaxTag tycon)   = (mkHsVarBind loc rdr_name rhs,-     L loc (TypeSig [L loc rdr_name] sig_ty))+     L loc (TypeSig noExt [L loc rdr_name] sig_ty))   where     rdr_name = maxtag_RDR dflags tycon-    sig_ty = mkLHsSigWcType (L loc (HsCoreTy intTy))+    sig_ty = mkLHsSigWcType (L loc (XHsType (NHsCoreTy intTy)))     rhs = nlHsApp (nlHsVar intDataCon_RDR)                   (nlHsLit (HsIntPrim NoSourceText max_tag))     max_tag =  case (tyConDataCons tycon) of@@ -1854,7 +1962,7 @@   = mkRdrFunBindSE arity (L loc fun) matches   where     matches = [mkMatch (mkPrefixFunRhs (L loc fun))-                               (map parenthesizeCompoundPat p) e+                               (map (parenthesizePat appPrec) p) e                                (noLoc emptyLocalBinds)               | (p,e) <-pats_and_exprs] @@ -1875,7 +1983,7 @@   = mkRdrFunBindEC arity catch_all (L loc fun) matches   where     matches = [ mkMatch (mkPrefixFunRhs (L loc fun))-                                (map parenthesizeCompoundPat p) e+                                (map (parenthesizePat appPrec) p) e                                 (noLoc emptyLocalBinds)               | (p,e) <- pats_and_exprs ] @@ -2098,8 +2206,8 @@                                         (nlHsLit (mkHsString ")"))))))  parenify :: LHsExpr GhcPs -> LHsExpr GhcPs-parenify e@(L _ (HsVar _)) = e-parenify e                 = mkHsPar e+parenify e@(L _ (HsVar _ _)) = e+parenify e                   = mkHsPar e  -- genOpApp wraps brackets round the operator application, so that the -- renamer won't subsequently try to re-associate it.
typecheck/TcGenFunctor.hs view
@@ -8,6 +8,8 @@  {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE LambdaCase #-}  module TcGenFunctor (         FFoldType(..), functorLikeTraverse,@@ -434,20 +436,24 @@ mkSimpleLam :: (LHsExpr GhcPs -> State [RdrName] (LHsExpr GhcPs))             -> State [RdrName] (LHsExpr GhcPs) -- (mkSimpleLam fn) returns (\x. fn(x))-mkSimpleLam lam = do-    (n:names) <- get-    put names-    body <- lam (nlHsVar n)-    return (mkHsLam [nlVarPat n] body)+mkSimpleLam lam =+    get >>= \case+      n:names -> do+        put names+        body <- lam (nlHsVar n)+        return (mkHsLam [nlVarPat n] body)+      _ -> panic "mkSimpleLam"  mkSimpleLam2 :: (LHsExpr GhcPs -> LHsExpr GhcPs              -> State [RdrName] (LHsExpr GhcPs))              -> State [RdrName] (LHsExpr GhcPs)-mkSimpleLam2 lam = do-    (n1:n2:names) <- get-    put names-    body <- lam (nlHsVar n1) (nlHsVar n2)-    return (mkHsLam [nlVarPat n1,nlVarPat n2] body)+mkSimpleLam2 lam =+    get >>= \case+      n1:n2:names -> do+        put names+        body <- lam (nlHsVar n1) (nlHsVar n2)+        return (mkHsLam [nlVarPat n1,nlVarPat n2] body)+      _ -> panic "mkSimpleLam2"  -- "Con a1 a2 a3 -> fold [x1 a1, x2 a2, x3 a3]" --
typecheck/TcGenGenerics.hs view
@@ -420,7 +420,15 @@        -- type arguments before generating the Rep/Rep1 instance, since some        -- of the tyvars might have been instantiated when deriving.        -- See Note [Generating a correctly typed Rep instance].-     ; let env        = zipTyEnv tyvars inst_args+     ; let (env_tyvars, env_inst_args)+             = case gk_ of+                 Gen0_ -> (tyvars, inst_args)+                 Gen1_ last_tv+                          -- See the "wrinkle" in+                          -- Note [Generating a correctly typed Rep instance]+                       -> ( last_tv : tyvars+                          , anyTypeOfKind (tyVarKind last_tv) : inst_args )+           env        = zipTyEnv env_tyvars env_inst_args            in_scope   = mkInScopeSet (tyCoVarsOfTypes inst_tys)            subst      = mkTvSubst in_scope env            repTy'     = substTy  subst repTy@@ -922,6 +930,32 @@ the tyConTyVars of the TyCon to their counterparts in the fully instantiated type. (For example, using T above as example, you'd map a :-> Int.) We then apply the substitution to the RHS before generating the instance.++A wrinkle in all of this: when forming the type variable substitution for+Generic1 instances, we map the last type variable of the tycon to Any. Why?+It's because of wily data types like this one (#15012):++   data T a = MkT (FakeOut a)+   type FakeOut a = Int++If we ignore a, then we'll produce the following Rep1 instance:++   instance Generic1 T where+     type Rep1 T = ... (Rec0 (FakeOut a))+     ...++Oh no! Now we have `a` on the RHS, but it's completely unbound. Instead, we+ensure that `a` is mapped to Any:++   instance Generic1 T where+     type Rep1 T = ... (Rec0 (FakeOut Any))+     ...++And now all is good.++Alternatively, we could have avoided this problem by expanding all type+synonyms on the RHSes of Rep1 instances. But we might blow up the size of+these types even further by doing this, so we choose not to do so.  Note [Handling kinds in a Rep instance] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ typecheck/TcHoleErrors.hs view
@@ -0,0 +1,943 @@+{-# OPTIONS_GHC -fno-warn-orphans #-} -- We don't want to spread the HasOccName+                                      -- instance for Either+module TcHoleErrors ( findValidHoleFits ) where++import GhcPrelude++import TcRnTypes+import TcRnMonad+import TcMType+import TcEvidence+import TcType+import Type+import DataCon+import Name+import RdrName ( pprNameProvenance , GlobalRdrElt (..), globalRdrEnvElts )+import PrelNames ( gHC_ERR )+import Id+import VarSet+import VarEnv+import Bag+import ConLike          ( ConLike(..) )+import Util+import TcEnv (tcLookup)+import Outputable+import DynFlags+import Maybes+import FV ( fvVarList, fvVarSet, unionFV, mkFVs, FV )++import Control.Arrow ( (&&&) )++import Control.Monad    ( filterM, replicateM )+import Data.List        ( partition, sort, sortOn, nubBy )+import Data.Graph       ( graphFromEdges, topSort )+import Data.Function    ( on )+++import TcSimplify    ( simpl_top, runTcSDeriveds )+import TcUnify       ( tcSubType_NC )++{-+Note [Valid hole fits include ...]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+`findValidHoleFits` returns the "Valid hole fits include ..." message.+For example, look at the following definitions in a file called test.hs:++   import Data.List (inits)++   f :: [String]+   f = _ "hello, world"++The hole in `f` would generate the message:++  • Found hole: _ :: [Char] -> [String]+  • In the expression: _+    In the expression: _ "hello, world"+    In an equation for ‘f’: f = _ "hello, world"+  • Relevant bindings include f :: [String] (bound at test.hs:6:1)+    Valid hole fits include+      lines :: String -> [String]+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘base-4.11.0.0:Data.OldList’))+      words :: String -> [String]+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘base-4.11.0.0:Data.OldList’))+      inits :: forall a. [a] -> [[a]]+        with inits @Char+        (imported from ‘Data.List’ at mpt.hs:4:19-23+          (and originally defined in ‘base-4.11.0.0:Data.OldList’))+      repeat :: forall a. a -> [a]+        with repeat @String+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘GHC.List’))+      fail :: forall (m :: * -> *). Monad m => forall a. String -> m a+        with fail @[] @String+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘GHC.Base’))+      return :: forall (m :: * -> *). Monad m => forall a. a -> m a+        with return @[] @String+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘GHC.Base’))+      pure :: forall (f :: * -> *). Applicative f => forall a. a -> f a+        with pure @[] @String+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘GHC.Base’))+      read :: forall a. Read a => String -> a+        with read @[String]+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘Text.Read’))+      mempty :: forall a. Monoid a => a+        with mempty @([Char] -> [String])+        (imported from ‘Prelude’ at mpt.hs:3:8-9+          (and originally defined in ‘GHC.Base’))++Valid hole fits are found by checking top level identifiers and local bindings+in scope for whether their type can be instantiated to the the type of the hole.+Additionally, we also need to check whether all relevant constraints are solved+by choosing an identifier of that type as well, see Note [Relevant Constraints]++Since checking for subsumption results in the side-effect of type variables+being unified by the simplifier, we need to take care to restore them after+to being flexible type variables after we've checked for subsumption.+This is to avoid affecting the hole and later checks by prematurely having+unified one of the free unification variables.++When outputting, we sort the hole fits by the size of the types we'd need to+apply by type application to the type of the fit to to make it fit. This is done+in order to display "more relevant" suggestions first. Another option is to+sort by building a subsumption graph of fits, i.e. a graph of which fits subsume+what other fits, and then outputting those fits which are are subsumed by other+fits (i.e. those more specific than other fits) first. This results in the ones+"closest" to the type of the hole to be displayed first.++To help users understand how the suggested fit works, we also display the values+that the quantified type variables would take if that fit is used, like+`mempty @([Char] -> [String])` and `pure @[] @String` in the example above.+If -XTypeApplications is enabled, this can even be copied verbatim as a+replacement for the hole.+++Note [Nested implications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~++For the simplifier to be able to use any givens present in the enclosing+implications to solve relevant constraints, we nest the wanted subsumption+constraints and relevant constraints within the enclosing implications.++As an example, let's look at the following code:++  f :: Show a => a -> String+  f x = show _++The hole will result in the hole constraint:++  [WD] __a1ph {0}:: a0_a1pd[tau:2] (CHoleCan: ExprHole(_))++Here the nested implications are just one level deep, namely:++  [Implic {+      TcLevel = 2+      Skolems = a_a1pa[sk:2]+      No-eqs = True+      Status = Unsolved+      Given = $dShow_a1pc :: Show a_a1pa[sk:2]+      Wanted =+        WC {wc_simple =+              [WD] __a1ph {0}:: a_a1pd[tau:2] (CHoleCan: ExprHole(_))+              [WD] $dShow_a1pe {0}:: Show a_a1pd[tau:2] (CDictCan(psc))}+      Binds = EvBindsVar<a1pi>+      Needed inner = []+      Needed outer = []+      the type signature for:+        f :: forall a. Show a => a -> String }]++As we can see, the givens say that the information about the skolem+`a_a1pa[sk:2]` fulfills the Show constraint.++The simples are:++  [[WD] __a1ph {0}:: a0_a1pd[tau:2] (CHoleCan: ExprHole(_)),+    [WD] $dShow_a1pe {0}:: Show a0_a1pd[tau:2] (CNonCanonical)]++I.e. the hole `a0_a1pd[tau:2]` and the constraint that the type of the hole must+fulfill `Show a0_a1pd[tau:2])`.++So when we run the check, we need to make sure that the++  [WD] $dShow_a1pe {0}:: Show a0_a1pd[tau:2] (CNonCanonical)++Constraint gets solved. When we now check for whether `x :: a0_a1pd[tau:2]` fits+the hole in `tcCheckHoleFit`, the call to `tcSubType` will end up writing the+meta type variable `a0_a1pd[tau:2] := a_a1pa[sk:2]`. By wrapping the wanted+constraints needed by tcSubType_NC and the relevant constraints (see+Note [Relevant Constraints] for more details) in the nested implications, we+can pass the information in the givens along to the simplifier. For our example,+we end up needing to check whether the following constraints are soluble.++  WC {wc_impl =+        Implic {+          TcLevel = 2+          Skolems = a_a1pa[sk:2]+          No-eqs = True+          Status = Unsolved+          Given = $dShow_a1pc :: Show a_a1pa[sk:2]+          Wanted =+            WC {wc_simple =+                  [WD] $dShow_a1pe {0}:: Show a0_a1pd[tau:2] (CNonCanonical)}+          Binds = EvBindsVar<a1pl>+          Needed inner = []+          Needed outer = []+          the type signature for:+            f :: forall a. Show a => a -> String }}++But since `a0_a1pd[tau:2] := a_a1pa[sk:2]` and we have from the nested+implications that Show a_a1pa[sk:2] is a given, this is trivial, and we end up+with a final WC of WC {}, confirming x :: a0_a1pd[tau:2] as a match.++To avoid side-effects on the nested implications, we create a new EvBindsVar so+that any changes to the ev binds during a check remains localised to that check.+++Note [Valid refinement hole fits include ...]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When the `-frefinement-level-hole-fits=N` flag is given, we additionally look+for "valid refinement hole fits"", i.e. valid hole fits with up to N+additional holes in them.++With `-frefinement-level-hole-fits=0` (the default), GHC will find all+identifiers 'f' (top-level or nested) that will fit in the hole.++With `-frefinement-level-hole-fits=1`, GHC will additionally find all+applications 'f _' that will fit in the hole, where 'f' is an in-scope+identifier, applied to single argument.  It will also report the type of the+needed argument (a new hole).++And similarly as the number of arguments increases++As an example, let's look at the following code:++  f :: [Integer] -> Integer+  f = _++with `-frefinement-level-hole-fits=1`, we'd get:++  Valid refinement hole fits include++    foldl1 (_ :: Integer -> Integer -> Integer)+      with foldl1 @[] @Integer+      where foldl1 :: forall (t :: * -> *).+                      Foldable t =>+                      forall a. (a -> a -> a) -> t a -> a+    foldr1 (_ :: Integer -> Integer -> Integer)+      with foldr1 @[] @Integer+      where foldr1 :: forall (t :: * -> *).+                      Foldable t =>+                      forall a. (a -> a -> a) -> t a -> a+    const (_ :: Integer)+      with const @Integer @[Integer]+      where const :: forall a b. a -> b -> a+    ($) (_ :: [Integer] -> Integer)+      with ($) @'GHC.Types.LiftedRep @[Integer] @Integer+      where ($) :: forall a b. (a -> b) -> a -> b+    fail (_ :: String)+      with fail @((->) [Integer]) @Integer+      where fail :: forall (m :: * -> *).+                    Monad m =>+                    forall a. String -> m a+    return (_ :: Integer)+      with return @((->) [Integer]) @Integer+      where return :: forall (m :: * -> *). Monad m => forall a. a -> m a+    (Some refinement hole fits suppressed;+      use -fmax-refinement-hole-fits=N or -fno-max-refinement-hole-fits)++Which are hole fits with holes in them. This allows e.g. beginners to+discover the fold functions and similar, but also allows for advanced users+to figure out the valid functions in the Free monad, e.g.++  instance Functor f => Monad (Free f) where+      Pure a >>= f = f a+      Free f >>= g = Free (fmap _a f)++Will output (with -frefinment-level-hole-fits=1):+    Found hole: _a :: Free f a -> Free f b+          Where: ‘a’, ‘b’ are rigid type variables bound by+                  the type signature for:+                    (>>=) :: forall a b. Free f a -> (a -> Free f b) -> Free f b+                  at fms.hs:25:12-14+                ‘f’ is a rigid type variable bound by+    ...+    Relevant bindings include+      g :: a -> Free f b (bound at fms.hs:27:16)+      f :: f (Free f a) (bound at fms.hs:27:10)+      (>>=) :: Free f a -> (a -> Free f b) -> Free f b+        (bound at fms.hs:25:12)+    ...+    Valid refinement hole fits include+      ...+      (=<<) (_ :: a -> Free f b)+        with (=<<) @(Free f) @a @b+        where (=<<) :: forall (m :: * -> *) a b.+                      Monad m =>+                      (a -> m b) -> m a -> m b+        (imported from ‘Prelude’ at fms.hs:5:18-22+        (and originally defined in ‘GHC.Base’))+      ...++Where `(=<<) _` is precisely the function we want (we ultimately want `>>= g`).++We find these refinement suggestions by considering hole fits that don't+fit the type of the hole, but ones that would fit if given an additional+argument. We do this by creating a new type variable with `newOpenFlexiTyVar`+(e.g. `t_a1/m[tau:1]`), and then considering hole fits of the type+`t_a1/m[tau:1] -> v` where `v` is the type of the hole.++Since the simplifier is free to unify this new type variable with any type, we+can discover any identifiers that would fit if given another identifier of a+suitable type. This is then generalized so that we can consider any number of+additional arguments by setting the `-frefinement-level-hole-fits` flag to any+number, and then considering hole fits like e.g. `foldl _ _` with two additional+arguments.++To make sure that the refinement hole fits are useful, we check that the types+of the additional holes have a concrete value and not just an invented type+variable. This eliminates suggestions such as `head (_ :: [t0 -> a]) (_ :: t0)`,+and limits the number of less than useful refinement hole fits.++Additionally, to further aid the user in their implementation, we show the+types of the holes the binding would have to be applied to in order to work.+In the free monad example above, this is demonstrated with+`(=<<) (_ :: a -> Free f b)`, which tells the user that the `(=<<)` needs to+be applied to an expression of type `a -> Free f b` in order to match.+If -XScopedTypeVariables is enabled, this hole fit can even be copied verbatim.+++Note [Relevant Constraints]+~~~~~~~~~~~~~~~~~~~++As highlighted by Trac #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.++In the simplest case, these are all non-hole constraints in the simples, such+as is the case in++  f :: String+  f = show _++Where the simples will be :++  [[WD] __a1kz {0}:: a0_a1kv[tau:1] (CHoleCan: ExprHole(_)),+    [WD] $dShow_a1kw {0}:: Show a0_a1kv[tau:1] (CNonCanonical)]++However, when there are multiple holes, we need to be more careful. As an+example, Let's take a look at the following code:++  f :: Show a => a -> String+  f x = show (_b (show _a))++Here there are two holes, `_a` and `_b`, and the simple constraints passed to+findValidHoleFits are:++  [[WD] _a_a1pi {0}:: String+                        -> a0_a1pd[tau:2] (CHoleCan: ExprHole(_b)),+    [WD] _b_a1ps {0}:: a1_a1po[tau:2] (CHoleCan: ExprHole(_a)),+    [WD] $dShow_a1pe {0}:: Show a0_a1pd[tau:2] (CNonCanonical),+    [WD] $dShow_a1pp {0}:: Show a1_a1po[tau:2] (CNonCanonical)]+++Here we have the two hole constraints for `_a` and `_b`, but also additional+constraints that these holes must fulfill. When we are looking for a match for+the hole `_a`, we filter the simple constraints to the "Relevant constraints",+by throwing out all hole constraints and any constraints which do not mention+a variable mentioned in the type of the hole. For hole `_a`, we will then+only require that the `$dShow_a1pp` constraint is solved, since that is+the only non-hole constraint that mentions any free type variables mentioned in+the hole constraint for `_a`, namely `a_a1pd[tau:2]` , and similarly for the+hole `_b` we only require that the `$dShow_a1pe` constraint is solved.++Note [Leaking errors]+~~~~~~~~~~~~~~~~~~~++When considering candidates, GHC believes that we're checking for validity in+actual source. However, As evidenced by #15321, #15007 and #15202, this can+cause bewildering error messages. The solution here is simple: if a candidate+would cause the type checker to error, it is not a valid hole fit, and thus it+is discarded.++-}+++++data HoleFitDispConfig = HFDC { showWrap :: Bool+                              , showWrapVars :: Bool+                              , showType :: Bool+                              , showProv :: Bool+                              , showMatches :: Bool }++debugHoleFitDispConfig :: HoleFitDispConfig+debugHoleFitDispConfig = HFDC True True True False False+++-- We read the various -no-show-*-of-hole-fits flags+-- and set the display config accordingly.+getHoleFitDispConfig :: TcM HoleFitDispConfig+getHoleFitDispConfig+  = do { sWrap <- goptM Opt_ShowTypeAppOfHoleFits+       ; sWrapVars <- goptM Opt_ShowTypeAppVarsOfHoleFits+       ; sType <- goptM Opt_ShowTypeOfHoleFits+       ; sProv <- goptM Opt_ShowProvOfHoleFits+       ; sMatc <- goptM Opt_ShowMatchesOfHoleFits+       ; return HFDC{ showWrap = sWrap, showWrapVars = sWrapVars+                    , showProv = sProv, showType = sType+                    , showMatches = sMatc } }++-- Which sorting algorithm to use+data SortingAlg = NoSorting      -- Do not sort the fits at all+                | BySize         -- Sort them by the size of the match+                | BySubsumption  -- Sort by full subsumption+                deriving (Eq, Ord)++getSortingAlg :: TcM SortingAlg+getSortingAlg =+    do { shouldSort <- goptM Opt_SortValidHoleFits+       ; subsumSort <- goptM Opt_SortBySubsumHoleFits+       ; sizeSort <- goptM Opt_SortBySizeHoleFits+       -- We default to sizeSort unless it has been explicitly turned off+       -- or subsumption sorting has been turned on.+       ; return $ if not shouldSort+                    then NoSorting+                    else if subsumSort+                         then BySubsumption+                         else if sizeSort+                              then BySize+                              else NoSorting }++-- 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 { hfElem :: Maybe GlobalRdrElt -- The element that was+                                                      -- if a global, nothing+                                                      -- if it is a local.+                       , hfId :: Id       -- The elements id in the TcM+                       , 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++-- 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 gre_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` (idName . hfId)+                 else compare `on` hfRefLvl++instance Outputable HoleFit where+    ppr = pprHoleFit debugHoleFitDispConfig++instance (HasOccName a, HasOccName b) => HasOccName (Either a b) where+    occName = either occName occName++instance HasOccName GlobalRdrElt where+    occName = occName . gre_name+++-- 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 = case hfElem hf of+                      Just gre -> gre_name gre+                      Nothing -> idName (hfId 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+          funcInfo = ppWhen (has matches && sTy) $+                       text "where" <+> occDisp <+> tyDisp+          subDisp = occDisp <+> if has matches then holeDisp else tyDisp+          display =  subDisp $$ nest 2 (funcInfo $+$ wrapDisp)+          provenance = ppWhen sProv $+            parens $+                case hfElem hf of+                    Just gre -> pprNameProvenance gre+                    Nothing -> text "bound at" <+> ppr (getSrcLoc name)++getLocalBindings :: TidyEnv -> Ct -> TcM [Id]+getLocalBindings tidy_orig ct+ = do { (env1, _) <- zonkTidyOrigin tidy_orig (ctLocOrigin loc)+      ; go env1 [] (removeBindingShadowing $ tcl_bndrs lcl_env) }+  where+    loc     = ctEvLoc (ctEvidence ct)+    lcl_env = ctLocEnv loc++    go :: TidyEnv -> [Id] -> [TcBinder] -> TcM [Id]+    go _ sofar [] = return (reverse sofar)+    go env sofar (tc_bndr : tc_bndrs) =+        case tc_bndr of+          TcIdBndr id _ -> keep_it id+          _ -> discard_it+     where+        discard_it = go env sofar tc_bndrs+        keep_it id = go env (id:sofar) tc_bndrs++-- See Note [Valid hole fits include ...]+findValidHoleFits :: TidyEnv        --The tidy_env for zonking+                  -> [Implication]  --Enclosing implications for givens+                  -> [Ct] -- The  unsolved simple constraints in the+                          -- implication for the hole.+                  -> Ct   -- The hole constraint itself+                  -> TcM (TidyEnv, SDoc)+findValidHoleFits tidy_env implics simples ct | isExprHoleCt ct =+  do { rdr_env <- getGlobalRdrEnv+     ; lclBinds <- getLocalBindings tidy_env ct+     ; maxVSubs <- maxValidHoleFits <$> getDynFlags+     ; hfdc <- getHoleFitDispConfig+     ; sortingAlg <- getSortingAlg+     ; refLevel <- refLevelHoleFits <$> getDynFlags+     ; traceTc "findingValidHoleFitsFor { " $ ppr ct+     ; 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)+           -- We remove binding shadowings here, but only for the local level.+           -- this is so we e.g. suggest the global fmap from the Functor class+           -- even though there is a local definition as well, such as in the+           -- Free monad example.+           locals = removeBindingShadowing $ map Left lclBinds ++ map Right lcl+           globals = map Right gbl+           to_check = locals ++ globals+     ; (searchDiscards, subs) <-+        findSubs sortingAlg maxVSubs to_check (hole_ty, [])+     ; (tidy_env, tidy_subs) <- zonkSubs tidy_env subs+     ; tidy_sorted_subs <- sortFits sortingAlg tidy_subs+     ; let (pVDisc, limited_subs) = possiblyDiscard maxVSubs tidy_sorted_subs+           vDiscards = pVDisc || searchDiscards+     ; let vMsg = ppUnless (null limited_subs) $+                    hang (text "Valid hole fits include") 2 $+                      vcat (map (pprHoleFit hfdc) limited_subs)+                        $$ ppWhen vDiscards subsDiscardMsg+     -- Refinement hole fits. See Note [Valid refinement hole fits include ...]+     ; (tidy_env, refMsg) <- if refLevel >= Just 0 then+         do { maxRSubs <- maxRefHoleFits <$> getDynFlags+            -- We can use from just, since we know that Nothing >= _ is False.+            ; let refLvls = [1..(fromJust refLevel)]+            -- We make a new refinement type for each level of refinement, where+            -- the level of refinement indicates number of additional arguments+            -- to allow.+            ; ref_tys <- mapM mkRefTy refLvls+            ; traceTc "ref_tys are" $ ppr ref_tys+            ; refDs <- mapM (findSubs sortingAlg maxRSubs to_check) 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+            -- like id (_ :: t), head (_ :: [t]), asTypeOf (_ :: t),+            -- and others in that vein to appear last, since these are+            -- unlikely to be the most relevant fits.+            ; (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+                  rDiscards = pRDisc || any fst refDs+            ; return (tidy_env,+                ppUnless (null tidy_sorted_rsubs) $+                  hang (text "Valid refinement hole fits include") 2 $+                  vcat (map (pprHoleFit hfdc) exact_last_rfits)+                    $$ ppWhen rDiscards refSubsDiscardMsg) }+       else return (tidy_env, empty)+     ; traceTc "findingValidHoleFitsFor }" empty+     ; return (tidy_env, vMsg $$ refMsg) }+  where+    -- We extract the type, the tcLevel and the types free variables+    -- from from the constraint.+    hole_ty :: TcPredType+    hole_ty = ctPred ct+    hole_fvs = tyCoFVsOfType hole_ty+    hole_lvl = ctLocLevel $ ctEvLoc $ ctEvidence ct++    -- We make a refinement type by adding a new type variable in front+    -- of the type of t h hole, going from e.g. [Integer] -> Integer+    -- to t_a1/m[tau:1] -> [Integer] -> Integer. This allows the simplifier+    -- to unify the new type variable with any type, allowing us+    -- to suggest a "refinement hole fit", like `(foldl1 _)` instead+    -- of only concrete hole fits like `sum`.+    mkRefTy :: Int -> TcM (TcType, [TcTyVar])+    mkRefTy refLvl = (wrapWithVars &&& id) <$> newTyVars+      where newTyVars = replicateM refLvl $ setLvl <$>+                            (newOpenTypeKind >>= newFlexiTyVar)+            setLvl = flip setMetaTyVarTcLevel hole_lvl+            wrapWithVars vars = mkFunTys (map mkTyVarTy vars) hole_ty++    sortFits :: SortingAlg    -- How we should sort the hole fits+             -> [HoleFit]     -- The subs to sort+             -> TcM [HoleFit]+    sortFits NoSorting subs = return subs+    sortFits BySize subs+        = (++) <$> sortBySize (sort lclFits)+               <*> sortBySize (sort gblFits)+        where (lclFits, gblFits) = span isLocalHoleFit subs++    -- To sort by subsumption, we invoke the sortByGraph function, which+    -- builds the subsumption graph for the fits and then sorts them using a+    -- graph sort.  Since we want locals to come first anyway, we can sort+    -- them separately. The substitutions are already checked in local then+    -- global order, so we can get away with using span here.+    -- We use (<*>) to expose the parallelism, in case it becomes useful later.+    sortFits BySubsumption subs+        = (++) <$> sortByGraph (sort lclFits)+               <*> sortByGraph (sort gblFits)+        where (lclFits, gblFits) = span isLocalHoleFit subs++    isLocalHoleFit :: HoleFit -> Bool+    isLocalHoleFit hf = case hfElem hf of+                          Just gre -> gre_lcl gre+                          Nothing -> True++    -- See Note [Relevant Constraints]+    relevantCts :: [Ct]+    relevantCts = if isEmptyVarSet (fvVarSet hole_fvs) then []+                  else filter isRelevant simples+      where ctFreeVarSet :: Ct -> VarSet+            ctFreeVarSet = fvVarSet . tyCoFVsOfType . ctPred+            hole_fv_set = fvVarSet hole_fvs+            anyFVMentioned :: Ct -> Bool+            anyFVMentioned ct = not $ isEmptyVarSet $+                                  ctFreeVarSet ct `intersectVarSet` hole_fv_set+            -- We filter out those constraints that have no variables (since+            -- they won't be solved by finding a type for the type variable+            -- representing the hole) and also other holes, since we're not+            -- trying to find hole fits for many holes at once.+            isRelevant ct = not (isEmptyVarSet (ctFreeVarSet ct))+                            && anyFVMentioned ct+                            && not (isHoleCt ct)++    unfoldWrapper :: HsWrapper -> [Type]+    unfoldWrapper = reverse . unfWrp'+      where unfWrp' (WpTyApp ty) = [ty]+            unfWrp' (WpCompose w1 w2) = unfWrp' w1 ++ unfWrp' w2+            unfWrp' _ = []+++    -- We only clone flexi type variables, and we need to be able to check+    -- whether a variable is filled or not.+    isFlexiTyVar :: TcTyVar -> TcM Bool+    isFlexiTyVar tv | isMetaTyVar tv = isFlexi <$> readMetaTyVar tv+    isFlexiTyVar _ = return False++    -- Takes a list of free variables and restores any Flexi type variables+    -- in free_vars after the action is run.+    withoutUnification :: FV -> TcM a -> TcM a+    withoutUnification free_vars action+      = do { flexis <- filterM isFlexiTyVar fuvs+            ; result <- action+              -- Reset any mutated free variables+            ; mapM_ restore flexis+            ; return result }+      where restore = flip writeTcRef Flexi . metaTyVarRef+            fuvs = fvVarList free_vars++    -- The real work happens here, where we invoke the type checker using+    -- tcCheckHoleFit to see whether the given type fits the hole.+    fitsHole :: (TcType, [TcTyVar]) -- The type of the hole wrapped with the+                                    -- refinement variables created to simulate+                                    -- additional holes (if any), and the list+                                    -- of those variables (possibly empty).+                                    -- As an example: If the actual type of the+                                    -- hole (as specified by the hole+                                    -- constraint CHoleExpr passed to+                                    -- findValidHoleFits) is t and we want to+                                    -- simulate N additional holes, h_ty will+                                    -- be  r_1 -> ... -> r_N -> t, and+                                    -- ref_vars will be [r_1, ... , r_N].+                                    -- In the base case with no additional+                                    -- holes, h_ty will just be t and ref_vars+                                    -- will be [].+             -> TcType -- The type we're checking to whether it can be+                       -- instantiated to the type h_ty.+             -> TcM (Maybe ([TcType], [TcType])) -- If it is not a match, we+                                                 -- return Nothing. Otherwise,+                                                 -- we Just return the list of+                                                 -- types that quantified type+                                                 -- variables in ty would take+                                                 -- if used in place of h_ty,+                                                 -- and the list types of any+                                                 -- additional holes simulated+                                                 -- with the refinement+                                                 -- variables in ref_vars.+    fitsHole (h_ty, ref_vars) ty =+    -- We wrap this with the withoutUnification to avoid having side-effects+    -- beyond the check, but we rely on the side-effects when looking for+    -- 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+         ; traceTc "Did it fit?" $ ppr fits+         ; traceTc "wrap is: " $ ppr wrp+         ; traceTc "checkingFitOf }" empty+         ; z_wrp_tys <- zonkTcTypes (unfoldWrapper wrp)+         -- We'd like to avoid refinement suggestions like `id _ _` or+         -- `head _ _`, and only suggest refinements where our all phantom+         -- variables got unified during the checking. This can be disabled+         -- with the `-fabstract-refinement-hole-fits` flag.+         -- Here we do the additional handling when there are refinement+         -- variables, i.e. zonk them to read their final value to check for+         -- abstract refinements, and to report what the type of the simulated+         -- holes must be for this to be a match.+         ; if fits+           then if null ref_vars+                then return (Just (z_wrp_tys, []))+                else do { let -- To be concrete matches, matches have to+                              -- be more than just an invented type variable.+                              fvSet = fvVarSet fvs+                              notAbstract :: TcType -> Bool+                              notAbstract t = case getTyVar_maybe t of+                                                Just tv -> tv `elemVarSet` fvSet+                                                _ -> True+                              allConcrete = all notAbstract z_wrp_tys+                        ; z_vars  <- zonkTcTyVars ref_vars+                        ; let z_mtvs = mapMaybe tcGetTyVar_maybe z_vars+                        ; allFilled <- not <$> anyM isFlexiTyVar z_mtvs+                        ; allowAbstract <- goptM Opt_AbstractRefHoleFits+                        ; if allowAbstract || (allFilled && allConcrete )+                          then return $ Just (z_wrp_tys, z_vars)+                          else return Nothing }+           else return Nothing }+     where fvs = mkFVs ref_vars `unionFV` hole_fvs `unionFV` tyCoFVsOfType ty++    -- We zonk the hole fits so that the output aligns with the rest+    -- of the typed hole error message output.+    zonkSubs :: TidyEnv -> [HoleFit] -> TcM (TidyEnv, [HoleFit])+    zonkSubs = zonkSubs' []+      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 env hf@HoleFit{hfType = ty, hfMatches = m, hfWrap = wrp}+              = do { (env, ty') <- zonkTidyTcType env ty+                   ; (env, m') <- zonkTidyTcTypes env m+                   ; (env, wrp') <- zonkTidyTcTypes env wrp+                   ; let zFit = hf {hfType = ty', hfMatches = m', hfWrap = wrp'}+                   ; return (env, zFit ) }++    -- Based on the flags, we might possibly discard some or all the+    -- fits we've found.+    possiblyDiscard :: Maybe Int -> [HoleFit] -> (Bool, [HoleFit])+    possiblyDiscard (Just max) fits = (fits `lengthExceeds` max, take max fits)+    possiblyDiscard Nothing fits = (False, fits)+++    -- Sort by size uses as a measure for relevance the sizes of the+    -- different types needed to instantiate the fit to the type of the hole.+    -- This is much quicker than sorting by subsumption, and gives reasonable+    -- results in most cases.+    sortBySize :: [HoleFit] -> TcM [HoleFit]+    sortBySize = return . sortOn sizeOfFit+      where sizeOfFit :: HoleFit -> TypeSize+            sizeOfFit = sizeTypes . nubBy tcEqType .  hfWrap++    -- Based on a suggestion by phadej on #ghc, we can sort the found fits+    -- by constructing a subsumption graph, and then do a topological sort of+    -- the graph. This makes the most specific types appear first, which are+    -- probably those most relevant. This takes a lot of work (but results in+    -- much more useful output), and can be disabled by+    -- '-fno-sort-valid-hole-fits'.+    sortByGraph :: [HoleFit] -> TcM [HoleFit]+    sortByGraph fits = go [] fits+      where tcSubsumesWCloning :: TcType -> TcType -> TcM Bool+            tcSubsumesWCloning ht ty = withoutUnification fvs (tcSubsumes ht ty)+              where fvs = tyCoFVsOfTypes [ht,ty]+            go :: [(HoleFit, [HoleFit])] -> [HoleFit] -> TcM [HoleFit]+            go sofar [] = do { traceTc "subsumptionGraph was" $ ppr sofar+                             ; return $ uncurry (++)+                                         $ partition isLocalHoleFit topSorted }+              where toV (hf, adjs) = (hf, hfId hf, map hfId adjs)+                    (graph, fromV, _) = graphFromEdges $ map toV sofar+                    topSorted = map ((\(h,_,_) -> h) . fromV) $ topSort graph+            go sofar (hf:hfs) =+              do { adjs <-+                     filterM (tcSubsumesWCloning (hfType hf) . hfType) fits+                 ; go ((hf, adjs):sofar) hfs }++    findSubs :: SortingAlg         -- Whether we should sort the subs or not+             -> Maybe Int          -- How many we should output, if limited+             -> [Either Id GlobalRdrElt] -- The elements to check whether fit+             -> (TcType, [TcTyVar]) -- The type to check for fits and refinement+                                    -- variables for emulating additional holes+             -> TcM (Bool, [HoleFit]) -- We return whether or not we stopped due+                                      -- to running out of gas and the fits we+                                      -- found.+    -- We don't check if no output is desired.+    findSubs _ (Just 0) _ _ = return (False, [])+    findSubs sortAlg maxSubs to_check ht@(hole_ty, _) =+      do { traceTc "checkingFitsFor {" $ ppr hole_ty+         -- If we're not going to sort anyway, we can stop going after+         -- having found `maxSubs` hole fits.+         ; let limit = if sortAlg > NoSorting then Nothing else maxSubs+         ; (discards, subs) <- go [] emptyVarSet limit ht to_check+         ; traceTc "checkingFitsFor }" empty+         ; return (discards, subs) }+      where+        -- Kickoff the checking of the elements.+        -- We iterate over the elements, checking each one in turn for whether+        -- it fits, and adding it to the results if it does.+        go :: [HoleFit]            -- What we've found so far.+            -> VarSet              -- Ids we've already checked+            -> Maybe Int           -- How many we're allowed to find, if limited+            -> (TcType, [TcTyVar]) -- The type, and its refinement variables.+            -> [Either Id GlobalRdrElt] -- The elements we've yet to check.+            -> TcM (Bool, [HoleFit])+        go subs _ _ _ [] = return (False, reverse subs)+        go subs _ (Just 0) _ _ = return (True, reverse subs)+        go subs seen maxleft ty (el:elts) =+          -- See Note [Leaking errors]+          tryTcDiscardingErrs discard_it $+          do { traceTc "lookingUp" $ ppr el+             ; maybeThing <- lookup el+             ; case maybeThing of+                 Just id | not_trivial id ->+                           do { fits <- fitsHole ty (idType id)+                              ; case fits of+                                  Just (wrp, matches) -> keep_it id wrp matches+                                  _ -> discard_it }+                 _ -> discard_it }+          where discard_it = go subs seen maxleft ty elts+                keep_it id wrp ms = go (fit:subs) (extendVarSet seen id)+                                  ((\n -> n - 1) <$> maxleft) ty elts+                  where fit = HoleFit { hfElem = mbel , hfId = id+                                      , hfType = idType id+                                      , hfRefLvl = length (snd ty)+                                      , hfWrap = wrp , hfMatches = ms }+                        mbel = either (const Nothing) Just el+                -- We want to filter out undefined and the likes from GHC.Err+                not_trivial id = nameModule_maybe (idName id) /= Just gHC_ERR+                lookup :: Either Id GlobalRdrElt -> TcM (Maybe Id)+                lookup (Left id) = return $ Just id+                lookup (Right el) =+                  do { thing <- tcLookup (gre_name el)+                     ; case thing of+                         ATcId {tct_id = id} -> return $ Just id+                         AGlobal (AnId id)   -> return $ Just id+                         AGlobal (AConLike (RealDataCon con))  ->+                           return $ Just (dataConWrapId con)+                         _ -> return Nothing }+++-- We don't (as of yet) handle holes in types, only in expressions.+findValidHoleFits env _ _ _ = return (env, empty)++subsDiscardMsg :: SDoc+subsDiscardMsg =+    text "(Some hole fits suppressed;" <+>+    text "use -fmax-valid-hole-fits=N" <+>+    text "or -fno-max-valid-hole-fits)"++refSubsDiscardMsg :: SDoc+refSubsDiscardMsg =+    text "(Some refinement hole fits suppressed;" <+>+    text "use -fmax-refinement-hole-fits=N" <+>+    text "or -fno-max-refinement-hole-fits)"+++-- | Reports whether first type (ty_a) subsumes the second type (ty_b),+-- 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+++-- | A tcSubsumes which takes into account relevant constraints, to fix trac+-- #14273. This makes sure that when checking whether a type fits the hole,+-- the type has to be subsumed by type of the hole as well as fulfill all+-- 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.+               -> TcM (Bool, HsWrapper)+tcCheckHoleFit _ _ hole_ty ty | hole_ty `eqType` ty+    = return (True, idHsWrapper)+tcCheckHoleFit relevantCts implics 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+                          [] -> getTcLevel+                          -- imp is the innermost implication+                          (imp:_) -> return (ic_tclvl imp)+     ; (wrp, wanted) <- setTcLevel innermost_lvl $ captureConstraints $+                          tcSubType_NC ExprSigCtxt ty hole_ty+     ; traceTc "Checking hole fit {" empty+     ; traceTc "wanteds are: " $ ppr wanted+     ; if isEmptyWC wanted && isEmptyBag relevantCts+       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 cloneSimple relevantCts+                 -- We wrap the WC in the nested implications, see+                 -- Note [Nested Implications]+               ; let outermost_first = reverse implics+                     setWC = setWCAndBinds fresh_binds+                    -- We add the cloned relevants to the wanteds generated by+                    -- the call to tcSubType_NC, see Note [Relevant Constraints]+                    -- There's no need to clone the wanteds, because they are+                    -- freshly generated by `tcSubtype_NC`.+                     w_rel_cts = addSimples wanted cloned_relevants+                     w_givens = foldr setWC w_rel_cts outermost_first+               ; traceTc "w_givens are: " $ ppr w_givens+               ; rem <- runTcSDeriveds $ simpl_top w_givens+               -- We don't want any insoluble or simple constraints left, but+               -- solved implications are ok (and neccessary for e.g. undefined)+               ; traceTc "rems was:" $ ppr rem+               ; traceTc "}" empty+               ; return (isSolvedWC rem, wrp) } }+     where+       setWCAndBinds :: EvBindsVar         -- Fresh ev binds var.+                     -> Implication        -- The implication to put WC in.+                     -> WantedConstraints  -- The WC constraints to put implic.+                     -> WantedConstraints  -- The new constraints.+       setWCAndBinds binds imp wc+         = WC { wc_simple = emptyBag+              , wc_impl = unitBag $ imp { ic_wanted = wc , ic_binds = binds } }
+ typecheck/TcHoleErrors.hs-boot view
@@ -0,0 +1,12 @@+-- This boot file is in place to break the loop where:+-- + TcSimplify calls 'TcErrors.reportUnsolved',+-- + which calls 'TcHoleErrors.findValidHoleFits`+-- + which calls 'TcSimplify.simpl_top'+module TcHoleErrors where++import TcRnTypes  ( TcM, Ct, Implication )+import Outputable ( SDoc )+import VarEnv     ( TidyEnv )++findValidHoleFits :: TidyEnv -> [Implication] -> [Ct] -> Ct+                  -> TcM (TidyEnv, SDoc)
typecheck/TcHsSyn.hs view
@@ -10,7 +10,8 @@ -}  {-# LANGUAGE CPP, TupleSections #-}-{-# LANGUAGE CPP, TypeFamilies #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleContexts #-}  module TcHsSyn (         -- * Extracting types from HsSyn@@ -33,8 +34,9 @@         zonkTyVarBindersX, zonkTyVarBinderX,         emptyZonkEnv, mkEmptyZonkEnv,         zonkTcTypeToType, zonkTcTypeToTypes, zonkTyVarOcc,-        zonkCoToCo, zonkSigType,-        zonkEvBinds, zonkTcEvBinds+        zonkCoToCo,+        zonkEvBinds, zonkTcEvBinds,+        zonkTcMethInfoToMethInfo   ) where  #include "HsVersions.h"@@ -46,11 +48,13 @@ import IdInfo import TcRnMonad import PrelNames+import BuildTyCl ( TcMethInfo, MethInfo ) import TcType import TcMType+import TcEnv   ( tcLookupGlobalOnly ) import TcEvidence import TysPrim-import TyCon   ( isUnboxedTupleTyCon )+import TyCon import TysWiredIn import TyCoRep( CoercionHole(..) ) import Type@@ -71,6 +75,7 @@ import Outputable import Util import UniqFM+import CoreSyn  import Control.Monad import Data.List  ( partition )@@ -89,28 +94,27 @@ hsLPatType (L _ pat) = hsPatType pat  hsPatType :: Pat GhcTc -> Type-hsPatType (ParPat pat)                = hsLPatType pat-hsPatType (WildPat ty)                = ty-hsPatType (VarPat (L _ var))          = idType var-hsPatType (BangPat pat)               = hsLPatType pat-hsPatType (LazyPat pat)               = hsLPatType pat-hsPatType (LitPat lit)                = hsLitType lit-hsPatType (AsPat var _)               = idType (unLoc var)-hsPatType (ViewPat _ _ ty)            = ty-hsPatType (ListPat _ ty Nothing)      = mkListTy ty-hsPatType (ListPat _ _ (Just (ty,_))) = ty-hsPatType (PArrPat _ ty)              = mkPArrTy ty-hsPatType (TuplePat _ bx tys)         = mkTupleTy bx tys-hsPatType (SumPat _ _ _ tys)          = mkSumTy tys+hsPatType (ParPat _ pat)                = hsLPatType pat+hsPatType (WildPat ty)                  = ty+hsPatType (VarPat _ (L _ var))          = idType var+hsPatType (BangPat _ pat)               = hsLPatType pat+hsPatType (LazyPat _ pat)               = hsLPatType pat+hsPatType (LitPat _ lit)                = hsLitType lit+hsPatType (AsPat _ var _)               = idType (unLoc var)+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 (SumPat tys _ _ _ )           = mkSumTy tys hsPatType (ConPatOut { pat_con = L _ con, pat_arg_tys = tys })-                                      = conLikeResTy con tys-hsPatType (SigPatOut _ ty)            = ty-hsPatType (NPat _ _ _ ty)             = ty-hsPatType (NPlusKPat _ _ _ _ _ ty)    = ty-hsPatType (CoPat _ _ ty)              = ty-hsPatType p                           = pprPanic "hsPatType" (ppr p)+                                        = conLikeResTy con tys+hsPatType (SigPat ty _)                 = ty+hsPatType (NPat ty _ _ _)               = ty+hsPatType (NPlusKPat ty _ _ _ _ _)      = ty+hsPatType (CoPat _ _ _ ty)              = ty+hsPatType p                             = pprPanic "hsPatType" (ppr p) -hsLitType :: HsLit p -> TcType+hsLitType :: HsLit (GhcPass p) -> TcType hsLitType (HsChar _ _)       = charTy hsLitType (HsCharPrim _ _)   = charPrimTy hsLitType (HsString _ _)     = stringTy@@ -124,14 +128,15 @@ hsLitType (HsRat _ _ ty)     = ty hsLitType (HsFloatPrim _ _)  = floatPrimTy hsLitType (HsDoublePrim _ _) = doublePrimTy+hsLitType (XLit p)           = pprPanic "hsLitType" (ppr p)  -- 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 (HsInt def int))+  | isIntTy ty  && inIntRange  dflags i = Just (HsLit noExt (HsInt noExt int))   | isWordTy ty && inWordRange dflags i = Just (mkLit wordDataCon (HsWordPrim src i))-  | isIntegerTy ty = Just (HsLit (HsInteger src i ty))+  | isIntegerTy ty = Just (HsLit noExt (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,@@ -140,16 +145,16 @@         -- literals, compiled without -O  shortCutLit _ (HsFractional f) ty-  | isFloatTy ty  = Just (mkLit floatDataCon  (HsFloatPrim def f))-  | isDoubleTy ty = Just (mkLit doubleDataCon (HsDoublePrim def f))+  | isFloatTy ty  = Just (mkLit floatDataCon  (HsFloatPrim noExt f))+  | isDoubleTy ty = Just (mkLit doubleDataCon (HsDoublePrim noExt f))   | otherwise     = Nothing  shortCutLit _ (HsIsString src s) ty-  | isStringTy ty = Just (HsLit (HsString src s))+  | isStringTy ty = Just (HsLit noExt (HsString src s))   | otherwise     = Nothing  mkLit :: DataCon -> HsLit GhcTc -> HsExpr GhcTc-mkLit con lit = HsApp (nlHsDataCon con) (nlHsLit lit)+mkLit con lit = HsApp noExt (nlHsDataCon con) (nlHsLit lit)  ------------------------------ hsOverLitName :: OverLitVal -> Name@@ -312,7 +317,9 @@ zonkTopBndrs ids = zonkIdBndrs emptyZonkEnv ids  zonkFieldOcc :: ZonkEnv -> FieldOcc GhcTcId -> TcM (FieldOcc GhcTc)-zonkFieldOcc env (FieldOcc lbl sel) = fmap (FieldOcc lbl) $ zonkIdBndr env sel+zonkFieldOcc env (FieldOcc sel lbl)+  = fmap ((flip FieldOcc) lbl) $ zonkIdBndr env sel+zonkFieldOcc _ (XFieldOcc _) = panic "zonkFieldOcc"  zonkEvBndrsX :: ZonkEnv -> [EvVar] -> TcM (ZonkEnv, [Var]) zonkEvBndrsX = mapAccumLM zonkEvBndrX@@ -333,13 +340,24 @@            zonkTcTypeToType env var_ty        ; return (setVarType var ty) } +{- zonkEvVarOcc :: ZonkEnv -> EvVar -> TcM EvTerm zonkEvVarOcc env v   | isCoVar v   = EvCoercion <$> zonkCoVarOcc env v   | otherwise   = return (EvId $ zonkIdOcc env v)+-} +zonkCoreBndrX :: ZonkEnv -> Var -> TcM (ZonkEnv, Var)+zonkCoreBndrX env v+  | isId v = do { v' <- zonkIdBndr env v+                ; return (extendIdZonkEnv1 env v', v') }+  | otherwise = zonkTyBndrX env v++zonkCoreBndrsX :: ZonkEnv -> [Var] -> TcM (ZonkEnv, [Var])+zonkCoreBndrsX = mapAccumLM zonkCoreBndrX+ zonkTyBndrsX :: ZonkEnv -> [TcTyVar] -> TcM (ZonkEnv, [TyVar]) zonkTyBndrsX = mapAccumLM zonkTyBndrX @@ -372,37 +390,35 @@  zonkTopDecls :: Bag EvBind              -> LHsBinds GhcTcId-             -> [LRuleDecl GhcTcId] -> [LVectDecl GhcTcId] -> [LTcSpecPrag]+             -> [LRuleDecl GhcTcId] -> [LTcSpecPrag]              -> [LForeignDecl GhcTcId]              -> TcM (TypeEnv,                      Bag EvBind,                      LHsBinds GhcTc,                      [LForeignDecl GhcTc],                      [LTcSpecPrag],-                     [LRuleDecl    GhcTc],-                     [LVectDecl    GhcTc])-zonkTopDecls ev_binds binds rules vects imp_specs fords+                     [LRuleDecl    GhcTc])+zonkTopDecls ev_binds binds rules imp_specs fords   = do  { (env1, ev_binds') <- zonkEvBinds emptyZonkEnv ev_binds         ; (env2, binds') <- zonkRecMonoBinds env1 binds                         -- Top level is implicitly recursive         ; rules' <- zonkRules env2 rules-        ; vects' <- zonkVects env2 vects         ; specs' <- zonkLTcSpecPrags env2 imp_specs         ; fords' <- zonkForeignExports env2 fords-        ; return (zonkEnvIds env2, ev_binds', binds', fords', specs', rules', vects') }+        ; return (zonkEnvIds env2, ev_binds', binds', fords', specs', rules') }  --------------------------------------------- zonkLocalBinds :: ZonkEnv -> HsLocalBinds GhcTcId                -> TcM (ZonkEnv, HsLocalBinds GhcTc)-zonkLocalBinds env EmptyLocalBinds-  = return (env, EmptyLocalBinds)+zonkLocalBinds env (EmptyLocalBinds x)+  = return (env, (EmptyLocalBinds x)) -zonkLocalBinds _ (HsValBinds (ValBindsIn {}))+zonkLocalBinds _ (HsValBinds _ (ValBinds {}))   = panic "zonkLocalBinds" -- Not in typechecker output -zonkLocalBinds env (HsValBinds (ValBindsOut binds sigs))+zonkLocalBinds env (HsValBinds x (XValBindsLR (NValBinds binds sigs)))   = do  { (env1, new_binds) <- go env binds-        ; return (env1, HsValBinds (ValBindsOut new_binds sigs)) }+        ; return (env1, HsValBinds x (XValBindsLR (NValBinds new_binds sigs))) }   where     go env []       = return (env, [])@@ -411,18 +427,25 @@            ; (env2, bs') <- go env1 bs            ; return (env2, (r,b'):bs') } -zonkLocalBinds env (HsIPBinds (IPBinds binds dict_binds)) = do+zonkLocalBinds env (HsIPBinds x (IPBinds dict_binds binds )) = do     new_binds <- mapM (wrapLocM zonk_ip_bind) binds     let-        env1 = extendIdZonkEnvRec env [ n | L _ (IPBind (Right n) _) <- new_binds]+        env1 = extendIdZonkEnvRec env [ n+                                      | L _ (IPBind _ (Right n) _) <- new_binds]     (env2, new_dict_binds) <- zonkTcEvBinds env1 dict_binds-    return (env2, HsIPBinds (IPBinds new_binds new_dict_binds))+    return (env2, HsIPBinds x (IPBinds new_dict_binds new_binds))   where-    zonk_ip_bind (IPBind n e)+    zonk_ip_bind (IPBind x n e)         = do n' <- mapIPNameTc (zonkIdBndr env) n              e' <- zonkLExpr env e-             return (IPBind n' e')+             return (IPBind x n' e')+    zonk_ip_bind (XIPBind _) = panic "zonkLocalBinds : XCIPBind" +zonkLocalBinds _ (HsIPBinds _ (XHsIPBinds _))+  = panic "zonkLocalBinds" -- Not in typechecker output+zonkLocalBinds _ (XHsLocalBindsLR _)+  = panic "zonkLocalBinds" -- Not in typechecker output+ --------------------------------------------- zonkRecMonoBinds :: ZonkEnv -> LHsBinds GhcTcId -> TcM (ZonkEnv, LHsBinds GhcTc) zonkRecMonoBinds env binds@@ -439,16 +462,22 @@ zonk_lbind env = wrapLocM (zonk_bind env)  zonk_bind :: ZonkEnv -> HsBind GhcTcId -> TcM (HsBind GhcTc)-zonk_bind env bind@(PatBind { pat_lhs = pat, pat_rhs = grhss, pat_rhs_ty = ty})+zonk_bind env bind@(PatBind { pat_lhs = pat, pat_rhs = grhss+                            , pat_ext = NPatBindTc fvs ty})   = do  { (_env, new_pat) <- zonkPat env pat            -- Env already extended         ; new_grhss <- zonkGRHSs env zonkLExpr grhss         ; new_ty    <- zonkTcTypeToType env ty-        ; return (bind { pat_lhs = new_pat, pat_rhs = new_grhss, pat_rhs_ty = new_ty }) }+        ; return (bind { pat_lhs = new_pat, pat_rhs = new_grhss+                       , pat_ext = NPatBindTc fvs new_ty }) } -zonk_bind env (VarBind { var_id = var, var_rhs = expr, var_inline = inl })+zonk_bind env (VarBind { var_ext = x+                       , var_id = var, var_rhs = expr, var_inline = inl })   = do { new_var  <- zonkIdBndr env var        ; new_expr <- zonkLExpr env expr-       ; return (VarBind { var_id = new_var, var_rhs = new_expr, var_inline = inl }) }+       ; return (VarBind { var_ext = x+                         , var_id = new_var+                         , var_rhs = new_expr+                         , var_inline = inl }) }  zonk_bind env bind@(FunBind { fun_id = L loc var, fun_matches = ms                             , fun_co_fn = co_fn })@@ -473,7 +502,8 @@             ; 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_tvs = new_tyvars, abs_ev_vars = new_evs+       ; return (AbsBinds { abs_ext = noExt+                          , abs_tvs = new_tyvars, abs_ev_vars = new_evs                           , abs_ev_binds = new_ev_binds                           , abs_exports = new_exports, abs_binds = new_val_bind                           , abs_sig = has_sig }) }@@ -495,32 +525,38 @@       | otherwise       = zonk_lbind env lbind   -- The normal case -    zonk_export env (ABE{ abe_wrap = wrap+    zonk_export env (ABE{ abe_ext = x+                        , abe_wrap = wrap                         , abe_poly = poly_id                         , abe_mono = mono_id                         , abe_prags = prags })         = do new_poly_id <- zonkIdBndr env poly_id              (_, new_wrap) <- zonkCoFn env wrap              new_prags <- zonkSpecPrags env prags-             return (ABE{ abe_wrap = new_wrap+             return (ABE{ abe_ext = x+                        , abe_wrap = new_wrap                         , abe_poly = new_poly_id                         , abe_mono = zonkIdOcc env mono_id                         , abe_prags = new_prags })+    zonk_export _ (XABExport _) = panic "zonk_bind: XABExport" -zonk_bind env (PatSynBind bind@(PSB { psb_id = L loc id-                                    , psb_args = details-                                    , psb_def = lpat-                                    , psb_dir = dir }))+zonk_bind env (PatSynBind x bind@(PSB { psb_id = L loc id+                                      , psb_args = details+                                      , psb_def = lpat+                                      , psb_dir = dir }))   = do { id' <- zonkIdBndr env id        ; (env1, lpat') <- zonkPat env lpat        ; let details' = zonkPatSynDetails env1 details        ; (_env2, dir') <- zonkPatSynDir env1 dir-       ; return $ PatSynBind $+       ; return $ PatSynBind x $                   bind { psb_id = L loc id'                        , psb_args = details'                        , psb_def = lpat'                        , psb_dir = dir' } } +zonk_bind _ (PatSynBind _ (XPatSynBind _)) = panic "zonk_bind"+zonk_bind _ (XHsBindsLR _)                 = panic "zonk_bind"+ zonkPatSynDetails :: ZonkEnv                   -> HsPatSynDetails (Located TcId)                   -> HsPatSynDetails (Located Id)@@ -564,13 +600,16 @@             -> (ZonkEnv -> Located (body GhcTcId) -> TcM (Located (body GhcTc)))             -> MatchGroup GhcTcId (Located (body GhcTcId))             -> TcM (MatchGroup GhcTc (Located (body GhcTc)))-zonkMatchGroup env zBody (MG { mg_alts = L l ms, mg_arg_tys = arg_tys-                             , mg_res_ty = res_ty, mg_origin = origin })+zonkMatchGroup env zBody (MG { mg_alts = L l ms+                             , mg_ext = MatchGroupTc arg_tys res_ty+                             , mg_origin = origin })   = do  { ms' <- mapM (zonkMatch env zBody) ms         ; arg_tys' <- zonkTcTypeToTypes env arg_tys         ; res_ty'  <- zonkTcTypeToType env res_ty-        ; return (MG { mg_alts = L l ms', mg_arg_tys = arg_tys'-                     , mg_res_ty = res_ty', mg_origin = origin }) }+        ; return (MG { mg_alts = L l ms'+                     , mg_ext = MatchGroupTc arg_tys' res_ty'+                     , mg_origin = origin }) }+zonkMatchGroup _ _ (XMatchGroup {}) = panic "zonkMatchGroup"  zonkMatch :: ZonkEnv           -> (ZonkEnv -> Located (body GhcTcId) -> TcM (Located (body GhcTc)))@@ -580,6 +619,7 @@   = do  { (env1, new_pats) <- zonkPats env pats         ; new_grhss <- zonkGRHSs env1 zBody grhss         ; return (L loc (match { m_pats = new_pats, m_grhss = new_grhss })) }+zonkMatch _ _ (L  _ (XMatch _)) = panic "zonkMatch"  ------------------------------------------------------------------------- zonkGRHSs :: ZonkEnv@@ -587,15 +627,17 @@           -> GRHSs GhcTcId (Located (body GhcTcId))           -> TcM (GRHSs GhcTc (Located (body GhcTc))) -zonkGRHSs env zBody (GRHSs grhss (L l binds)) = do+zonkGRHSs env zBody (GRHSs x grhss (L l binds)) = do     (new_env, new_binds) <- zonkLocalBinds env binds     let-        zonk_grhs (GRHS guarded rhs)+        zonk_grhs (GRHS xx guarded rhs)           = do (env2, new_guarded) <- zonkStmts new_env zonkLExpr guarded                new_rhs <- zBody env2 rhs-               return (GRHS new_guarded new_rhs)+               return (GRHS xx new_guarded new_rhs)+        zonk_grhs (XGRHS _) = panic "zonkGRHSs"     new_grhss <- mapM (wrapLocM zonk_grhs) grhss-    return (GRHSs new_grhss (L l new_binds))+    return (GRHSs x new_grhss (L l new_binds))+zonkGRHSs _ _ (XGRHSs _) = panic "zonkGRHSs"  {- ************************************************************************@@ -612,134 +654,136 @@ zonkLExprs env exprs = mapM (zonkLExpr env) exprs zonkLExpr  env expr  = wrapLocM (zonkExpr env) expr -zonkExpr env (HsVar (L l id))+zonkExpr env (HsVar x (L l id))   = ASSERT2( isNothing (isDataConId_maybe id), ppr id )-    return (HsVar (L l (zonkIdOcc env id)))+    return (HsVar x (L l (zonkIdOcc env id)))  zonkExpr _ e@(HsConLikeOut {}) = return e -zonkExpr _ (HsIPVar id)-  = return (HsIPVar id)+zonkExpr _ (HsIPVar x id)+  = return (HsIPVar x id)  zonkExpr _ e@HsOverLabel{} = return e -zonkExpr env (HsLit (HsRat e f ty))+zonkExpr env (HsLit x (HsRat e f ty))   = do new_ty <- zonkTcTypeToType env ty-       return (HsLit (HsRat e f new_ty))+       return (HsLit x (HsRat e f new_ty)) -zonkExpr _ (HsLit lit)-  = return (HsLit lit)+zonkExpr _ (HsLit x lit)+  = return (HsLit x lit) -zonkExpr env (HsOverLit lit)+zonkExpr env (HsOverLit x lit)   = do  { lit' <- zonkOverLit env lit-        ; return (HsOverLit lit') }+        ; return (HsOverLit x lit') } -zonkExpr env (HsLam matches)+zonkExpr env (HsLam x matches)   = do new_matches <- zonkMatchGroup env zonkLExpr matches-       return (HsLam new_matches)+       return (HsLam x new_matches) -zonkExpr env (HsLamCase matches)+zonkExpr env (HsLamCase x matches)   = do new_matches <- zonkMatchGroup env zonkLExpr matches-       return (HsLamCase new_matches)+       return (HsLamCase x new_matches) -zonkExpr env (HsApp e1 e2)+zonkExpr env (HsApp x e1 e2)   = do new_e1 <- zonkLExpr env e1        new_e2 <- zonkLExpr env e2-       return (HsApp new_e1 new_e2)+       return (HsApp x new_e1 new_e2) -zonkExpr env (HsAppTypeOut e t)+zonkExpr env (HsAppType t e)   = do new_e <- zonkLExpr env e-       return (HsAppTypeOut new_e t)+       return (HsAppType t new_e)        -- NB: the type is an HsType; can't zonk that! -zonkExpr _ e@(HsRnBracketOut _ _)+zonkExpr _ e@(HsRnBracketOut _ _ _)   = pprPanic "zonkExpr: HsRnBracketOut" (ppr e) -zonkExpr env (HsTcBracketOut body bs)+zonkExpr env (HsTcBracketOut x body bs)   = do bs' <- mapM zonk_b bs-       return (HsTcBracketOut body bs')+       return (HsTcBracketOut x body bs')   where     zonk_b (PendingTcSplice n e) = do e' <- zonkLExpr env e                                       return (PendingTcSplice n e') -zonkExpr _ (HsSpliceE s) = WARN( True, ppr s ) -- Should not happen-                           return (HsSpliceE s)+zonkExpr _ (HsSpliceE x s) = WARN( True, ppr s ) -- Should not happen+                           return (HsSpliceE x s) -zonkExpr env (OpApp e1 op fixity e2)+zonkExpr env (OpApp fixity e1 op e2)   = do new_e1 <- zonkLExpr env e1        new_op <- zonkLExpr env op        new_e2 <- zonkLExpr env e2-       return (OpApp new_e1 new_op fixity new_e2)+       return (OpApp fixity new_e1 new_op new_e2) -zonkExpr env (NegApp expr op)+zonkExpr env (NegApp x expr op)   = do (env', new_op) <- zonkSyntaxExpr env op        new_expr <- zonkLExpr env' expr-       return (NegApp new_expr new_op)+       return (NegApp x new_expr new_op) -zonkExpr env (HsPar e)+zonkExpr env (HsPar x e)   = do new_e <- zonkLExpr env e-       return (HsPar new_e)+       return (HsPar x new_e) -zonkExpr env (SectionL expr op)+zonkExpr env (SectionL x expr op)   = do new_expr <- zonkLExpr env expr        new_op   <- zonkLExpr env op-       return (SectionL new_expr new_op)+       return (SectionL x new_expr new_op) -zonkExpr env (SectionR op expr)+zonkExpr env (SectionR x op expr)   = do new_op   <- zonkLExpr env op        new_expr <- zonkLExpr env expr-       return (SectionR new_op new_expr)+       return (SectionR x new_op new_expr) -zonkExpr env (ExplicitTuple tup_args boxed)+zonkExpr env (ExplicitTuple x tup_args boxed)   = do { new_tup_args <- mapM zonk_tup_arg tup_args-       ; return (ExplicitTuple new_tup_args boxed) }+       ; return (ExplicitTuple x new_tup_args boxed) }   where-    zonk_tup_arg (L l (Present e)) = do { e' <- zonkLExpr env e-                                        ; return (L l (Present e')) }+    zonk_tup_arg (L l (Present x e)) = do { e' <- zonkLExpr env e+                                          ; return (L l (Present x e')) }     zonk_tup_arg (L l (Missing t)) = do { t' <- zonkTcTypeToType env t                                         ; return (L l (Missing t')) }+    zonk_tup_arg (L _ (XTupArg{})) = panic "zonkExpr.XTupArg" -zonkExpr env (ExplicitSum alt arity expr args)+zonkExpr env (ExplicitSum args alt arity expr)   = do new_args <- mapM (zonkTcTypeToType env) args        new_expr <- zonkLExpr env expr-       return (ExplicitSum alt arity new_expr new_args)+       return (ExplicitSum new_args alt arity new_expr) -zonkExpr env (HsCase expr ms)+zonkExpr env (HsCase x expr ms)   = do new_expr <- zonkLExpr env expr        new_ms <- zonkMatchGroup env zonkLExpr ms-       return (HsCase new_expr new_ms)+       return (HsCase x new_expr new_ms) -zonkExpr env (HsIf Nothing e1 e2 e3)+zonkExpr env (HsIf x Nothing e1 e2 e3)   = do new_e1 <- zonkLExpr env e1        new_e2 <- zonkLExpr env e2        new_e3 <- zonkLExpr env e3-       return (HsIf Nothing new_e1 new_e2 new_e3)+       return (HsIf x Nothing new_e1 new_e2 new_e3) -zonkExpr env (HsIf (Just fun) e1 e2 e3)+zonkExpr env (HsIf x (Just fun) e1 e2 e3)   = do (env1, new_fun) <- zonkSyntaxExpr env fun        new_e1 <- zonkLExpr env1 e1        new_e2 <- zonkLExpr env1 e2        new_e3 <- zonkLExpr env1 e3-       return (HsIf (Just new_fun) new_e1 new_e2 new_e3)+       return (HsIf x (Just new_fun) new_e1 new_e2 new_e3)  zonkExpr env (HsMultiIf ty alts)   = do { alts' <- mapM (wrapLocM zonk_alt) alts        ; ty'   <- zonkTcTypeToType env ty        ; return $ HsMultiIf ty' alts' }-  where zonk_alt (GRHS guard expr)+  where zonk_alt (GRHS x guard expr)           = do { (env', guard') <- zonkStmts env zonkLExpr guard                ; expr'          <- zonkLExpr env' expr-               ; return $ GRHS guard' expr' }+               ; return $ GRHS x guard' expr' }+        zonk_alt (XGRHS _) = panic "zonkExpr.HsMultiIf" -zonkExpr env (HsLet (L l binds) expr)+zonkExpr env (HsLet x (L l binds) expr)   = do (new_env, new_binds) <- zonkLocalBinds env binds        new_expr <- zonkLExpr new_env expr-       return (HsLet (L l new_binds) new_expr)+       return (HsLet x (L l new_binds) new_expr) -zonkExpr env (HsDo do_or_lc (L l stmts) ty)+zonkExpr env (HsDo ty do_or_lc (L l stmts))   = do (_, new_stmts) <- zonkStmts env zonkLExpr stmts        new_ty <- zonkTcTypeToType env ty-       return (HsDo do_or_lc (L l new_stmts) new_ty)+       return (HsDo new_ty do_or_lc (L l new_stmts))  zonkExpr env (ExplicitList ty wit exprs)   = do (env1, new_wit) <- zonkWit env wit@@ -749,32 +793,31 @@    where zonkWit env Nothing    = return (env, Nothing)          zonkWit env (Just fln) = second Just <$> zonkSyntaxExpr env fln -zonkExpr env (ExplicitPArr ty exprs)-  = do new_ty <- zonkTcTypeToType env ty-       new_exprs <- zonkLExprs env exprs-       return (ExplicitPArr new_ty new_exprs)--zonkExpr env expr@(RecordCon { rcon_con_expr = con_expr, rcon_flds = rbinds })-  = do  { new_con_expr <- zonkExpr env con_expr+zonkExpr env expr@(RecordCon { rcon_ext = ext, rcon_flds = rbinds })+  = do  { new_con_expr <- zonkExpr env (rcon_con_expr ext)         ; new_rbinds   <- zonkRecFields env rbinds-        ; return (expr { rcon_con_expr = new_con_expr+        ; return (expr { rcon_ext  = ext { rcon_con_expr = new_con_expr }                        , rcon_flds = new_rbinds }) } -zonkExpr env (RecordUpd { rupd_expr = expr, rupd_flds = rbinds-                        , rupd_cons = cons, rupd_in_tys = in_tys-                        , rupd_out_tys = out_tys, rupd_wrap = req_wrap })+zonkExpr env (RecordUpd { rupd_flds = rbinds+                        , rupd_expr = expr+                        , rupd_ext = RecordUpdTc+                            { rupd_cons = cons, rupd_in_tys = in_tys+                            , rupd_out_tys = out_tys, rupd_wrap = req_wrap }})   = do  { new_expr    <- zonkLExpr env expr         ; new_in_tys  <- mapM (zonkTcTypeToType env) in_tys         ; new_out_tys <- mapM (zonkTcTypeToType env) out_tys         ; new_rbinds  <- zonkRecUpdFields env rbinds         ; (_, new_recwrap) <- zonkCoFn env req_wrap         ; return (RecordUpd { rupd_expr = new_expr, rupd_flds =  new_rbinds-                            , rupd_cons = cons, rupd_in_tys = new_in_tys-                            , rupd_out_tys = new_out_tys, rupd_wrap = new_recwrap }) }+                            , rupd_ext = RecordUpdTc+                                { rupd_cons = cons, rupd_in_tys = new_in_tys+                                , rupd_out_tys = new_out_tys+                                , rupd_wrap = new_recwrap }}) } -zonkExpr env (ExprWithTySigOut e ty)+zonkExpr env (ExprWithTySig ty e)   = do { e' <- zonkLExpr env e-       ; return (ExprWithTySigOut e' ty) }+       ; return (ExprWithTySig ty e') }  zonkExpr env (ArithSeq expr wit info)   = do (env1, new_wit) <- zonkWit env wit@@ -784,38 +827,33 @@    where zonkWit env Nothing    = return (env, Nothing)          zonkWit env (Just fln) = second Just <$> zonkSyntaxExpr env fln -zonkExpr env (PArrSeq expr info)-  = do new_expr <- zonkExpr env expr-       new_info <- zonkArithSeq env info-       return (PArrSeq new_expr new_info)--zonkExpr env (HsSCC src lbl expr)+zonkExpr env (HsSCC x src lbl expr)   = do new_expr <- zonkLExpr env expr-       return (HsSCC src lbl new_expr)+       return (HsSCC x src lbl new_expr) -zonkExpr env (HsTickPragma src info srcInfo expr)+zonkExpr env (HsTickPragma x src info srcInfo expr)   = do new_expr <- zonkLExpr env expr-       return (HsTickPragma src info srcInfo new_expr)+       return (HsTickPragma x src info srcInfo new_expr)  -- hdaume: core annotations-zonkExpr env (HsCoreAnn src lbl expr)+zonkExpr env (HsCoreAnn x src lbl expr)   = do new_expr <- zonkLExpr env expr-       return (HsCoreAnn src lbl new_expr)+       return (HsCoreAnn x src lbl new_expr)  -- arrow notation extensions-zonkExpr env (HsProc pat body)+zonkExpr env (HsProc x pat body)   = do  { (env1, new_pat) <- zonkPat env pat         ; new_body <- zonkCmdTop env1 body-        ; return (HsProc new_pat new_body) }+        ; return (HsProc x new_pat new_body) }  -- StaticPointers extension zonkExpr env (HsStatic fvs expr)   = HsStatic fvs <$> zonkLExpr env expr -zonkExpr env (HsWrap co_fn expr)+zonkExpr env (HsWrap x co_fn expr)   = do (env1, new_co_fn) <- zonkCoFn env co_fn        new_expr <- zonkExpr env1 expr-       return (HsWrap new_co_fn new_expr)+       return (HsWrap x new_co_fn new_expr)  zonkExpr _ e@(HsUnboundVar {}) = return e @@ -862,60 +900,60 @@  zonkLCmd  env cmd  = wrapLocM (zonkCmd env) cmd -zonkCmd env (HsCmdWrap w cmd)+zonkCmd env (HsCmdWrap x w cmd)   = do { (env1, w') <- zonkCoFn env w        ; cmd' <- zonkCmd env1 cmd-       ; return (HsCmdWrap w' cmd') }-zonkCmd env (HsCmdArrApp e1 e2 ty ho rl)+       ; return (HsCmdWrap x w' cmd') }+zonkCmd env (HsCmdArrApp ty e1 e2 ho rl)   = do new_e1 <- zonkLExpr env e1        new_e2 <- zonkLExpr env e2        new_ty <- zonkTcTypeToType env ty-       return (HsCmdArrApp new_e1 new_e2 new_ty ho rl)+       return (HsCmdArrApp new_ty new_e1 new_e2 ho rl) -zonkCmd env (HsCmdArrForm op f fixity args)+zonkCmd env (HsCmdArrForm x op f fixity args)   = do new_op <- zonkLExpr env op        new_args <- mapM (zonkCmdTop env) args-       return (HsCmdArrForm new_op f fixity new_args)+       return (HsCmdArrForm x new_op f fixity new_args) -zonkCmd env (HsCmdApp c e)+zonkCmd env (HsCmdApp x c e)   = do new_c <- zonkLCmd env c        new_e <- zonkLExpr env e-       return (HsCmdApp new_c new_e)+       return (HsCmdApp x new_c new_e) -zonkCmd env (HsCmdLam matches)+zonkCmd env (HsCmdLam x matches)   = do new_matches <- zonkMatchGroup env zonkLCmd matches-       return (HsCmdLam new_matches)+       return (HsCmdLam x new_matches) -zonkCmd env (HsCmdPar c)+zonkCmd env (HsCmdPar x c)   = do new_c <- zonkLCmd env c-       return (HsCmdPar new_c)+       return (HsCmdPar x new_c) -zonkCmd env (HsCmdCase expr ms)+zonkCmd env (HsCmdCase x expr ms)   = do new_expr <- zonkLExpr env expr        new_ms <- zonkMatchGroup env zonkLCmd ms-       return (HsCmdCase new_expr new_ms)+       return (HsCmdCase x new_expr new_ms) -zonkCmd env (HsCmdIf eCond ePred cThen cElse)+zonkCmd env (HsCmdIf x eCond ePred cThen cElse)   = do { (env1, new_eCond) <- zonkWit env eCond        ; new_ePred <- zonkLExpr env1 ePred        ; new_cThen <- zonkLCmd env1 cThen        ; new_cElse <- zonkLCmd env1 cElse-       ; return (HsCmdIf new_eCond new_ePred new_cThen new_cElse) }+       ; return (HsCmdIf x new_eCond new_ePred new_cThen new_cElse) }   where     zonkWit env Nothing  = return (env, Nothing)     zonkWit env (Just w) = second Just <$> zonkSyntaxExpr env w -zonkCmd env (HsCmdLet (L l binds) cmd)+zonkCmd env (HsCmdLet x (L l binds) cmd)   = do (new_env, new_binds) <- zonkLocalBinds env binds        new_cmd <- zonkLCmd new_env cmd-       return (HsCmdLet (L l new_binds) new_cmd)+       return (HsCmdLet x (L l new_binds) new_cmd) -zonkCmd env (HsCmdDo (L l stmts) ty)+zonkCmd env (HsCmdDo ty (L l stmts))   = do (_, new_stmts) <- zonkStmts env zonkLCmd stmts        new_ty <- zonkTcTypeToType env ty-       return (HsCmdDo (L l new_stmts) new_ty)-+       return (HsCmdDo new_ty (L l new_stmts)) +zonkCmd _ (XCmd{}) = panic "zonkCmd"   @@ -923,7 +961,7 @@ zonkCmdTop env cmd = wrapLocM (zonk_cmd_top env) cmd  zonk_cmd_top :: ZonkEnv -> HsCmdTop GhcTcId -> TcM (HsCmdTop GhcTc)-zonk_cmd_top env (HsCmdTop cmd stack_tys ty ids)+zonk_cmd_top env (HsCmdTop (CmdTopTc stack_tys ty ids) cmd)   = do new_cmd <- zonkLCmd env cmd        new_stack_tys <- zonkTcTypeToType env stack_tys        new_ty <- zonkTcTypeToType env ty@@ -934,7 +972,8 @@          -- but indeed it should always be lifted due to the typing          -- rules for arrows -       return (HsCmdTop new_cmd new_stack_tys new_ty new_ids)+       return (HsCmdTop (CmdTopTc new_stack_tys new_ty new_ids) new_cmd)+zonk_cmd_top _ (XCmdTop {}) = panic "zonk_cmd_top"  ------------------------------------------------------------------------- zonkCoFn :: ZonkEnv -> HsWrapper -> TcM (ZonkEnv, HsWrapper)@@ -962,11 +1001,13 @@  ------------------------------------------------------------------------- zonkOverLit :: ZonkEnv -> HsOverLit GhcTcId -> TcM (HsOverLit GhcTc)-zonkOverLit env lit@(OverLit { ol_witness = e, ol_type = ty })+zonkOverLit env lit@(OverLit {ol_ext = OverLitTc r ty, ol_witness = e })   = do  { ty' <- zonkTcTypeToType env ty         ; e' <- zonkExpr env e-        ; return (lit { ol_witness = e', ol_type = ty' }) }+        ; return (lit { ol_witness = e', ol_ext = OverLitTc r ty' }) } +zonkOverLit _ XOverLit{} = panic "zonkOverLit"+ ------------------------------------------------------------------------- zonkArithSeq :: ZonkEnv -> ArithSeqInfo GhcTcId -> TcM (ArithSeqInfo GhcTc) @@ -1005,25 +1046,32 @@          -> (ZonkEnv -> Located (body GhcTcId) -> TcM (Located (body GhcTc)))          -> Stmt GhcTcId (Located (body GhcTcId))          -> TcM (ZonkEnv, Stmt GhcTc (Located (body GhcTc)))-zonkStmt env _ (ParStmt stmts_w_bndrs mzip_op bind_op bind_ty)+zonkStmt env _ (ParStmt bind_ty stmts_w_bndrs mzip_op bind_op)   = do { (env1, new_bind_op) <- zonkSyntaxExpr env bind_op        ; new_bind_ty <- zonkTcTypeToType env1 bind_ty        ; new_stmts_w_bndrs <- mapM (zonk_branch env1) stmts_w_bndrs-       ; let new_binders = [b | ParStmtBlock _ bs _ <- new_stmts_w_bndrs, b <- bs]+       ; let new_binders = [b | ParStmtBlock _ _ bs _ <- new_stmts_w_bndrs+                              , b <- bs]              env2 = extendIdZonkEnvRec env1 new_binders        ; new_mzip <- zonkExpr env2 mzip_op-       ; return (env2, ParStmt new_stmts_w_bndrs new_mzip new_bind_op new_bind_ty) }+       ; return (env2+                , ParStmt new_bind_ty new_stmts_w_bndrs new_mzip new_bind_op)}   where-    zonk_branch env1 (ParStmtBlock stmts bndrs return_op)+    zonk_branch env1 (ParStmtBlock x stmts bndrs return_op)        = do { (env2, new_stmts)  <- zonkStmts env1 zonkLExpr stmts             ; (env3, new_return) <- zonkSyntaxExpr env2 return_op-            ; return (ParStmtBlock new_stmts (zonkIdOccs env3 bndrs) new_return) }+            ; return (ParStmtBlock x new_stmts (zonkIdOccs env3 bndrs)+                                                                   new_return) }+    zonk_branch _ (XParStmtBlock{}) = panic "zonkStmt"  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-                            , recS_bind_fn = bind_id, recS_bind_ty = bind_ty-                            , recS_later_rets = later_rets, recS_rec_rets = rec_rets-                            , recS_ret_ty = ret_ty })+                            , recS_bind_fn = bind_id+                            , recS_ext =+                                       RecStmtTc { recS_bind_ty = bind_ty+                                                 , recS_later_rets = later_rets+                                                 , recS_rec_rets = rec_rets+                                                 , recS_ret_ty = ret_ty} })   = do { (env1, new_bind_id) <- zonkSyntaxExpr env bind_id        ; (env2, new_mfix_id) <- zonkSyntaxExpr env1 mfix_id        ; (env3, new_ret_id)  <- zonkSyntaxExpr env2 ret_id@@ -1041,26 +1089,28 @@                  RecStmt { recS_stmts = new_segStmts, recS_later_ids = new_lvs                          , recS_rec_ids = new_rvs, recS_ret_fn = new_ret_id                          , recS_mfix_fn = new_mfix_id, recS_bind_fn = new_bind_id-                         , recS_bind_ty = new_bind_ty-                         , recS_later_rets = new_later_rets-                         , recS_rec_rets = new_rec_rets, recS_ret_ty = new_ret_ty }) }+                         , recS_ext = RecStmtTc+                             { recS_bind_ty = new_bind_ty+                             , recS_later_rets = new_later_rets+                             , recS_rec_rets = new_rec_rets+                             , recS_ret_ty = new_ret_ty } }) } -zonkStmt env zBody (BodyStmt body then_op guard_op ty)+zonkStmt env zBody (BodyStmt ty body then_op guard_op)   = do (env1, new_then_op)  <- zonkSyntaxExpr env then_op        (env2, new_guard_op) <- zonkSyntaxExpr env1 guard_op        new_body <- zBody env2 body        new_ty   <- zonkTcTypeToType env2 ty-       return (env2, BodyStmt new_body new_then_op new_guard_op new_ty)+       return (env2, BodyStmt new_ty new_body new_then_op new_guard_op) -zonkStmt env zBody (LastStmt body noret ret_op)+zonkStmt env zBody (LastStmt x body noret ret_op)   = do (env1, new_ret) <- zonkSyntaxExpr env ret_op        new_body <- zBody env1 body-       return (env, LastStmt new_body noret new_ret)+       return (env, LastStmt x new_body noret new_ret)  zonkStmt env _ (TransStmt { trS_stmts = stmts, trS_bndrs = binderMap                           , trS_by = by, trS_form = form, trS_using = using                           , trS_ret = return_op, trS_bind = bind_op-                          , trS_bind_arg_ty = bind_arg_ty+                          , trS_ext = bind_arg_ty                           , trS_fmap = liftM_op })   = do {     ; (env1, bind_op') <- zonkSyntaxExpr env bind_op@@ -1076,7 +1126,7 @@     ; return (env3', TransStmt { trS_stmts = stmts', trS_bndrs = binderMap'                                , trS_by = by', trS_form = form, trS_using = using'                                , trS_ret = return_op', trS_bind = bind_op'-                               , trS_bind_arg_ty = bind_arg_ty'+                               , trS_ext = bind_arg_ty'                                , trS_fmap = liftM_op' }) }   where     zonkBinderMapEntry env  (oldBinder, newBinder) = do@@ -1084,36 +1134,39 @@         newBinder' <- zonkIdBndr env newBinder         return (oldBinder', newBinder') -zonkStmt env _ (LetStmt (L l binds))+zonkStmt env _ (LetStmt x (L l binds))   = do (env1, new_binds) <- zonkLocalBinds env binds-       return (env1, LetStmt (L l new_binds))+       return (env1, LetStmt x (L l new_binds)) -zonkStmt env zBody (BindStmt pat body bind_op fail_op bind_ty)+zonkStmt env zBody (BindStmt bind_ty pat body bind_op fail_op)   = do  { (env1, new_bind) <- zonkSyntaxExpr env bind_op         ; new_bind_ty <- zonkTcTypeToType env1 bind_ty         ; new_body <- zBody env1 body         ; (env2, new_pat) <- zonkPat env1 pat         ; (_, new_fail) <- zonkSyntaxExpr env1 fail_op-        ; return (env2, BindStmt new_pat new_body new_bind new_fail new_bind_ty) }+        ; return ( env2+                 , BindStmt new_bind_ty new_pat new_body new_bind new_fail) }  -- Scopes: join > ops (in reverse order) > pats (in forward order) --              > rest of stmts-zonkStmt env _zBody (ApplicativeStmt args mb_join body_ty)+zonkStmt env _zBody (ApplicativeStmt body_ty args mb_join)   = do  { (env1, new_mb_join)   <- zonk_join env mb_join         ; (env2, new_args)      <- zonk_args env1 args         ; new_body_ty           <- zonkTcTypeToType env2 body_ty-        ; return (env2, ApplicativeStmt new_args new_mb_join new_body_ty) }+        ; 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 (_, ApplicativeArgMany _ _ pat) = pat+    get_pat (_, ApplicativeArgOne _ pat _ _) = pat+    get_pat (_, ApplicativeArgMany _ _ _ pat) = pat+    get_pat (_, XApplicativeArg _) = panic "zonkStmt" -    replace_pat pat (op, ApplicativeArgOne _ a isBody)-      = (op, ApplicativeArgOne pat a isBody)-    replace_pat pat (op, ApplicativeArgMany a b _)-      = (op, ApplicativeArgMany a b pat)+    replace_pat pat (op, ApplicativeArgOne x _ a isBody)+      = (op, ApplicativeArgOne x pat a isBody)+    replace_pat pat (op, ApplicativeArgMany x a b _)+      = (op, ApplicativeArgMany x a b pat)+    replace_pat _ (_, XApplicativeArg _) = panic "zonkStmt"      zonk_args env args       = do { (env1, new_args_rev) <- zonk_args_rev env (reverse args)@@ -1130,14 +1183,17 @@            ; return (env2, (new_op, new_arg) : new_args) }     zonk_args_rev env [] = return (env, []) -    zonk_arg env (ApplicativeArgOne pat expr isBody)+    zonk_arg env (ApplicativeArgOne x pat expr isBody)       = do { new_expr <- zonkLExpr env expr-           ; return (ApplicativeArgOne pat new_expr isBody) }-    zonk_arg env (ApplicativeArgMany stmts ret pat)+           ; return (ApplicativeArgOne x pat new_expr isBody) }+    zonk_arg env (ApplicativeArgMany x stmts ret pat)       = do { (env1, new_stmts) <- zonkStmts env zonkLExpr stmts            ; new_ret           <- zonkExpr env1 ret-           ; return (ApplicativeArgMany new_stmts new_ret pat) }+           ; return (ApplicativeArgMany x new_stmts new_ret pat) }+    zonk_arg _ (XApplicativeArg _) = panic "zonkStmt.XApplicativeArg" +zonkStmt _ _ (XStmtLR _) = panic "zonkStmt"+ ------------------------------------------------------------------------- zonkRecFields :: ZonkEnv -> HsRecordBinds GhcTcId -> TcM (HsRecordBinds GhcTcId) zonkRecFields env (HsRecFields flds dd)@@ -1182,9 +1238,9 @@ zonkPat env pat = wrapLocSndM (zonk_pat env) pat  zonk_pat :: ZonkEnv -> Pat GhcTcId -> TcM (ZonkEnv, Pat GhcTc)-zonk_pat env (ParPat p)+zonk_pat env (ParPat x p)   = do  { (env', p') <- zonkPat env p-        ; return (env', ParPat p') }+        ; return (env', ParPat x p') }  zonk_pat env (WildPat ty)   = do  { ty' <- zonkTcTypeToType env ty@@ -1192,55 +1248,50 @@             (text "In a wildcard pattern")         ; return (env, WildPat ty') } -zonk_pat env (VarPat (L l v))+zonk_pat env (VarPat x (L l v))   = do  { v' <- zonkIdBndr env v-        ; return (extendIdZonkEnv1 env v', VarPat (L l v')) }+        ; return (extendIdZonkEnv1 env v', VarPat x (L l v')) } -zonk_pat env (LazyPat pat)+zonk_pat env (LazyPat x pat)   = do  { (env', pat') <- zonkPat env pat-        ; return (env',  LazyPat pat') }+        ; return (env',  LazyPat x pat') } -zonk_pat env (BangPat pat)+zonk_pat env (BangPat x pat)   = do  { (env', pat') <- zonkPat env pat-        ; return (env',  BangPat pat') }+        ; return (env',  BangPat x pat') } -zonk_pat env (AsPat (L loc v) pat)+zonk_pat env (AsPat x (L loc v) pat)   = do  { v' <- zonkIdBndr env v         ; (env', pat') <- zonkPat (extendIdZonkEnv1 env v') pat-        ; return (env', AsPat (L loc v') pat') }+        ; return (env', AsPat x (L loc v') pat') } -zonk_pat env (ViewPat expr pat ty)+zonk_pat env (ViewPat ty expr pat)   = do  { expr' <- zonkLExpr env expr         ; (env', pat') <- zonkPat env pat         ; ty' <- zonkTcTypeToType env ty-        ; return (env', ViewPat expr' pat' ty') }+        ; return (env', ViewPat ty' expr' pat') } -zonk_pat env (ListPat pats ty Nothing)+zonk_pat env (ListPat (ListPatTc ty Nothing) pats)   = do  { ty' <- zonkTcTypeToType env ty         ; (env', pats') <- zonkPats env pats-        ; return (env', ListPat pats' ty' Nothing) }+        ; return (env', ListPat (ListPatTc ty' Nothing) pats') } -zonk_pat env (ListPat pats ty (Just (ty2,wit)))+zonk_pat env (ListPat (ListPatTc ty (Just (ty2,wit))) pats)   = do  { (env', wit') <- zonkSyntaxExpr env wit         ; ty2' <- zonkTcTypeToType env' ty2         ; ty' <- zonkTcTypeToType env' ty         ; (env'', pats') <- zonkPats env' pats-        ; return (env'', ListPat pats' ty' (Just (ty2',wit'))) }--zonk_pat env (PArrPat pats ty)-  = do  { ty' <- zonkTcTypeToType env ty-        ; (env', pats') <- zonkPats env pats-        ; return (env', PArrPat pats' ty') }+        ; return (env'', ListPat (ListPatTc ty' (Just (ty2',wit'))) pats') } -zonk_pat env (TuplePat pats boxed tys)+zonk_pat env (TuplePat tys pats boxed)   = do  { tys' <- mapM (zonkTcTypeToType env) tys         ; (env', pats') <- zonkPats env pats-        ; return (env', TuplePat pats' boxed tys') }+        ; return (env', TuplePat tys' pats' boxed) } -zonk_pat env (SumPat pat alt arity tys)+zonk_pat env (SumPat tys pat alt arity )   = do  { tys' <- mapM (zonkTcTypeToType env) tys         ; (env', pat') <- zonkPat env pat-        ; return (env', SumPat pat' alt arity tys') }+        ; return (env', SumPat tys' pat' alt arity) }  zonk_pat env p@(ConPatOut { pat_arg_tys = tys, pat_tvs = tyvars                           , pat_dicts = evs, pat_binds = binds@@ -1274,14 +1325,14 @@   where     doc = text "In the type of an element of an unboxed tuple pattern:" $$ ppr p -zonk_pat env (LitPat lit) = return (env, LitPat lit)+zonk_pat env (LitPat x lit) = return (env, LitPat x lit) -zonk_pat env (SigPatOut pat ty)+zonk_pat env (SigPat ty pat)   = do  { ty' <- zonkTcTypeToType env ty         ; (env', pat') <- zonkPat env pat-        ; return (env', SigPatOut pat' ty') }+        ; return (env', SigPat ty' pat') } -zonk_pat env (NPat (L l lit) mb_neg eq_expr ty)+zonk_pat env (NPat ty (L l lit) mb_neg eq_expr)   = do  { (env1, eq_expr') <- zonkSyntaxExpr env eq_expr         ; (env2, mb_neg') <- case mb_neg of             Nothing -> return (env1, Nothing)@@ -1289,9 +1340,9 @@          ; lit' <- zonkOverLit env2 lit         ; ty' <- zonkTcTypeToType env2 ty-        ; return (env2, NPat (L l lit') mb_neg' eq_expr' ty') }+        ; return (env2, NPat ty' (L l lit') mb_neg' eq_expr') } -zonk_pat env (NPlusKPat (L loc n) (L l lit1) lit2 e1 e2 ty)+zonk_pat env (NPlusKPat ty (L loc n) (L l lit1) lit2 e1 e2)   = do  { (env1, e1') <- zonkSyntaxExpr env  e1         ; (env2, e2') <- zonkSyntaxExpr env1 e2         ; n' <- zonkIdBndr env2 n@@ -1299,13 +1350,13 @@         ; lit2' <- zonkOverLit env2 lit2         ; ty' <- zonkTcTypeToType env2 ty         ; return (extendIdZonkEnv1 env2 n',-                  NPlusKPat (L loc n') (L l lit1') lit2' e1' e2' ty') }+                  NPlusKPat ty' (L loc n') (L l lit1') lit2' e1' e2') } -zonk_pat env (CoPat co_fn pat ty)+zonk_pat env (CoPat x co_fn pat ty)   = do { (env', co_fn') <- zonkCoFn env co_fn        ; (env'', pat') <- zonkPat env' (noLoc pat)        ; ty' <- zonkTcTypeToType env'' ty-       ; return (env'', CoPat co_fn' (unLoc pat') ty') }+       ; return (env'', CoPat x co_fn' (unLoc pat') ty') }  zonk_pat _ pat = pprPanic "zonk_pat" (ppr pat) @@ -1350,9 +1401,10 @@ zonkForeignExports env ls = mapM (wrapLocM (zonkForeignExport env)) ls  zonkForeignExport :: ZonkEnv -> ForeignDecl GhcTcId -> TcM (ForeignDecl GhcTc)-zonkForeignExport env (ForeignExport { fd_name = i, fd_co = co, fd_fe = spec })+zonkForeignExport env (ForeignExport { fd_name = i, fd_e_ext = co+                                     , fd_fe = spec })   = return (ForeignExport { fd_name = zonkLIdOcc env i-                          , fd_sig_ty = undefined, fd_co = co+                          , fd_sig_ty = undefined, fd_e_ext = co                           , fd_fe = spec }) zonkForeignExport _ for_imp   = return for_imp     -- Foreign imports don't need zonking@@ -1361,7 +1413,7 @@ zonkRules env rs = mapM (wrapLocM (zonkRule env)) rs  zonkRule :: ZonkEnv -> RuleDecl GhcTcId -> TcM (RuleDecl GhcTc)-zonkRule env (HsRule name act (vars{-::[RuleBndr TcId]-}) lhs fv_lhs rhs fv_rhs)+zonkRule env (HsRule fvs name act (vars{-::[RuleBndr TcId]-}) lhs rhs)   = do { (env_inside, new_bndrs) <- mapAccumLM zonk_bndr env vars         ; let env_lhs = setZonkType env_inside zonkTvSkolemising@@ -1370,12 +1422,13 @@        ; new_lhs <- zonkLExpr env_lhs    lhs        ; new_rhs <- zonkLExpr env_inside rhs -       ; return (HsRule name act new_bndrs new_lhs fv_lhs new_rhs fv_rhs) }+       ; return (HsRule fvs name act new_bndrs new_lhs new_rhs ) }   where-   zonk_bndr env (L l (RuleBndr (L loc v)))+   zonk_bndr env (L l (RuleBndr x (L loc v)))       = do { (env', v') <- zonk_it env v-           ; return (env', L l (RuleBndr (L loc v'))) }+           ; return (env', L l (RuleBndr x (L loc v'))) }    zonk_bndr _ (L _ (RuleBndrSig {})) = panic "zonk_bndr RuleBndrSig"+   zonk_bndr _ (L _ (XRuleBndr {})) = panic "zonk_bndr XRuleBndr"     zonk_it env v      | isId v     = do { v' <- zonkIdBndr env v@@ -1385,29 +1438,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!--zonkVects :: ZonkEnv -> [LVectDecl GhcTcId] -> TcM [LVectDecl GhcTc]-zonkVects env = mapM (wrapLocM (zonkVect env))--zonkVect :: ZonkEnv -> VectDecl GhcTcId -> TcM (VectDecl GhcTc)-zonkVect env (HsVect s v e)-  = do { v' <- wrapLocM (zonkIdBndr env) v-       ; e' <- zonkLExpr env e-       ; return $ HsVect s v' e'-       }-zonkVect env (HsNoVect s v)-  = do { v' <- wrapLocM (zonkIdBndr env) v-       ; return $ HsNoVect s v'-       }-zonkVect _env (HsVectTypeOut s t rt)-  = return $ HsVectTypeOut s t rt-zonkVect _ (HsVectTypeIn _ _ _ _) = panic "TcHsSyn.zonkVect: HsVectTypeIn"-zonkVect _env (HsVectClassOut c)-  = return $ HsVectClassOut c-zonkVect _ (HsVectClassIn _ _) = panic "TcHsSyn.zonkVect: HsVectClassIn"-zonkVect _env (HsVectInstOut i)-  = return $ HsVectInstOut i-zonkVect _ (HsVectInstIn _) = panic "TcHsSyn.zonkVect: HsVectInstIn"+zonkRule _ (XRuleDecl _) = panic "zonkRule"  {- ************************************************************************@@ -1418,40 +1449,77 @@ -}  zonkEvTerm :: ZonkEnv -> EvTerm -> TcM EvTerm-zonkEvTerm env (EvId v)           = ASSERT2( isId v, ppr v )-                                    zonkEvVarOcc env v-zonkEvTerm env (EvCoercion co)    = do { co' <- zonkCoToCo env co-                                       ; return (EvCoercion co') }-zonkEvTerm env (EvCast tm co)     = do { tm' <- zonkEvTerm env tm-                                       ; co' <- zonkCoToCo env co-                                       ; return (mkEvCast tm' co') }-zonkEvTerm _   (EvLit l)          = return (EvLit l)+zonkEvTerm env (EvExpr e)+  = EvExpr <$> zonkCoreExpr env e+zonkEvTerm env (EvTypeable ty ev)+  = EvTypeable <$> zonkTcTypeToType env ty <*> zonkEvTypeable env ev+zonkEvTerm env (EvFun { et_tvs = tvs, et_given = evs+                      , et_binds = ev_binds, et_body = body_id })+  = do { (env0, new_tvs) <- zonkTyBndrsX env tvs+       ; (env1, new_evs) <- zonkEvBndrsX env0 evs+       ; (env2, new_ev_binds) <- zonkTcEvBinds env1 ev_binds+       ; let new_body_id = zonkIdOcc env2 body_id+       ; return (EvFun { et_tvs = new_tvs, et_given = new_evs+                       , et_binds = new_ev_binds, et_body = new_body_id }) } -zonkEvTerm env (EvTypeable ty ev) =-  do { ev' <- zonkEvTypeable env ev-     ; ty' <- zonkTcTypeToType env ty-     ; return (EvTypeable ty' ev') }-zonkEvTerm env (EvCallStack cs)-  = case cs of-      EvCsEmpty -> return (EvCallStack cs)-      EvCsPushCall n l tm -> do { tm' <- zonkEvTerm env tm-                                ; return (EvCallStack (EvCsPushCall n l tm')) }+zonkCoreExpr :: ZonkEnv -> CoreExpr -> TcM CoreExpr+zonkCoreExpr env (Var v)+    | isCoVar v+    = Coercion <$> zonkCoVarOcc env v+    | otherwise+    = return (Var $ zonkIdOcc env v)+zonkCoreExpr _ (Lit l)+    = return $ Lit l+zonkCoreExpr env (Coercion co)+    = Coercion <$> zonkCoToCo env co+zonkCoreExpr env (Type ty)+    = Type <$> zonkTcTypeToType env ty -zonkEvTerm env (EvSuperClass d n) = do { d' <- zonkEvTerm env d-                                       ; return (EvSuperClass d' n) }-zonkEvTerm env (EvDFunApp df tys tms)-  = do { tys' <- zonkTcTypeToTypes env tys-       ; tms' <- mapM (zonkEvTerm env) tms-       ; return (EvDFunApp (zonkIdOcc env df) tys' tms') }-zonkEvTerm env (EvDelayedError ty msg)-  = do { ty' <- zonkTcTypeToType env ty-       ; return (EvDelayedError ty' msg) }-zonkEvTerm env (EvSelector sel_id tys tms)-  = do { sel_id' <- zonkIdBndr env sel_id-       ; tys'    <- zonkTcTypeToTypes env tys-       ; tms' <- mapM (zonkEvTerm env) tms-       ; return (EvSelector sel_id' tys' tms') }+zonkCoreExpr env (Cast e co)+    = Cast <$> zonkCoreExpr env e <*> zonkCoToCo env co+zonkCoreExpr env (Tick t e)+    = Tick t <$> zonkCoreExpr env e -- Do we need to zonk in ticks? +zonkCoreExpr env (App e1 e2)+    = App <$> zonkCoreExpr env e1 <*> zonkCoreExpr env e2+zonkCoreExpr env (Lam v e)+    = do { (env1, v') <- zonkCoreBndrX env v+         ; Lam v' <$> zonkCoreExpr env1 e }+zonkCoreExpr env (Let bind e)+    = do (env1, bind') <- zonkCoreBind env bind+         Let bind'<$> zonkCoreExpr env1 e+zonkCoreExpr env (Case scrut b ty alts)+    = do scrut' <- zonkCoreExpr env scrut+         ty' <- zonkTcTypeToType env ty+         b' <- zonkIdBndr env b+         let env1 = extendIdZonkEnv1 env b'+         alts' <- mapM (zonkCoreAlt env1) alts+         return $ Case scrut' b' ty' alts'++zonkCoreAlt :: ZonkEnv -> CoreAlt -> TcM CoreAlt+zonkCoreAlt env (dc, bndrs, rhs)+    = do (env1, bndrs') <- zonkCoreBndrsX env bndrs+         rhs' <- zonkCoreExpr env1 rhs+         return $ (dc, bndrs', rhs')++zonkCoreBind :: ZonkEnv -> CoreBind -> TcM (ZonkEnv, CoreBind)+zonkCoreBind env (NonRec v e)+    = do v' <- zonkIdBndr env v+         e' <- zonkCoreExpr env e+         let env1 = extendIdZonkEnv1 env v'+         return (env1, NonRec v' e')+zonkCoreBind env (Rec pairs)+    = do (env1, pairs') <- fixM go+         return (env1, Rec pairs')+  where+    go ~(_, new_pairs) = do+         let env1 = extendIdZonkEnvRec env (map fst new_pairs)+         pairs' <- mapM (zonkCorePair env1) pairs+         return (env1, pairs')++zonkCorePair :: ZonkEnv -> (CoreBndr, CoreExpr) -> TcM (CoreBndr, CoreExpr)+zonkCorePair env (v,e) = (,) <$> zonkIdBndr env v <*> zonkCoreExpr env e+ zonkEvTypeable :: ZonkEnv -> EvTypeable -> TcM EvTypeable zonkEvTypeable env (EvTypeableTyCon tycon e)   = do { e'  <- mapM (zonkEvTerm env) e@@ -1484,6 +1552,7 @@ zonkEvBindsVar env (EvBindsVar { ebv_binds = ref })   = do { bs <- readMutVar ref        ; zonkEvBinds env (evBindMapBinds bs) }+zonkEvBindsVar env (NoEvBindsVar {}) = return (env, emptyBag)  zonkEvBinds :: ZonkEnv -> Bag EvBind -> TcM (ZonkEnv, Bag EvBind) zonkEvBinds env binds@@ -1507,7 +1576,7 @@         ; term' <- case getEqPredTys_maybe (idType var') of            Just (r, ty1, ty2) | ty1 `eqType` ty2-                  -> return (EvCoercion (mkTcReflCo r ty1))+                  -> return (evCoercion (mkTcReflCo r ty1))            _other -> zonkEvTerm env term         ; return (bind { eb_lhs = var', eb_rhs = term' }) }@@ -1609,12 +1678,21 @@ zonk_tycomapper :: TyCoMapper ZonkEnv TcM zonk_tycomapper = TyCoMapper   { tcm_smart = True   -- Establish type invariants-                       -- See Note [Type-checking inside the knot] in TcHsType   , tcm_tyvar = zonkTyVarOcc   , tcm_covar = zonkCoVarOcc   , tcm_hole  = zonkCoHole-  , tcm_tybinder = \env tv _vis -> zonkTyBndrX env tv }+  , tcm_tybinder = \env tv _vis -> zonkTyBndrX env tv+  , tcm_tycon = zonkTcTyConToTyCon } +-- Zonk a TyCon by changing a TcTyCon to a regular TyCon+zonkTcTyConToTyCon :: TcTyCon -> TcM TyCon+zonkTcTyConToTyCon tc+  | isTcTyCon tc = do { thing <- tcLookupGlobalOnly (getName tc)+                      ; case thing of+                          ATyCon real_tc -> return real_tc+                          _              -> pprPanic "zonkTcTyCon" (ppr tc $$ ppr thing) }+  | otherwise    = return tc -- it's already zonked+ -- Confused by zonking? See Note [What is zonking?] in TcMType. zonkTcTypeToType :: ZonkEnv -> TcType -> TcM Type zonkTcTypeToType = mapType zonk_tycomapper@@ -1625,18 +1703,19 @@ zonkCoToCo :: ZonkEnv -> Coercion -> TcM Coercion zonkCoToCo = mapCoercion zonk_tycomapper -zonkSigType :: TcType -> TcM Type--- Zonk the type obtained from a user type signature--- We want to turn any quantified (forall'd) variables into TyVars--- but we may find some free TcTyVars, and we want to leave them--- completely alone.  They may even have unification variables inside--- e.g.  f (x::a) = ...(e :: a -> a)....--- The type sig for 'e' mentions a free 'a' which will be a--- unification SigTv variable.-zonkSigType = zonkTcTypeToType (mkEmptyZonkEnv zonk_unbound_tv)+zonkTcMethInfoToMethInfo :: TcMethInfo -> TcM MethInfo+zonkTcMethInfoToMethInfo (name, ty, gdm_spec)+  = do { ty' <- zonkTcTypeToType emptyZonkEnv ty+       ; gdm_spec' <- zonk_gdm gdm_spec+       ; return (name, ty', gdm_spec') }   where-    zonk_unbound_tv :: UnboundTyVarZonker-    zonk_unbound_tv tv = return (mkTyVarTy tv)+    zonk_gdm :: Maybe (DefMethSpec (SrcSpan, TcType))+             -> TcM (Maybe (DefMethSpec (SrcSpan, Type)))+    zonk_gdm Nothing = return Nothing+    zonk_gdm (Just VanillaDM) = return (Just VanillaDM)+    zonk_gdm (Just (GenericDM (loc, ty)))+      = do { ty' <- zonkTcTypeToType emptyZonkEnv ty+           ; return (Just (GenericDM (loc, ty'))) }  zonkTvSkolemising :: UnboundTyVarZonker -- This variant is used for the LHS of rules
typecheck/TcHsType.hs view
@@ -6,2460 +6,2769 @@ -}  {-# LANGUAGE CPP, TupleSections, MultiWayIf, RankNTypes #-}--module TcHsType (-        -- Type signatures-        kcHsSigType, tcClassSigType,-        tcHsSigType, tcHsSigWcType,-        tcHsPartialSigType,-        funsSigCtxt, addSigCtxt, pprSigCtxt,--        tcHsClsInstType,-        tcHsDeriv, tcHsVectInst,-        tcHsTypeApp,-        UserTypeCtxt(..),-        tcImplicitTKBndrs, tcImplicitTKBndrsType, tcExplicitTKBndrs,--                -- Type checking type and class decls-        kcLookupTcTyCon, kcTyClTyVars, tcTyClTyVars,-        tcDataKindSig,--        -- Kind-checking types-        -- No kind generalisation, no checkValidType-        kcLHsQTyVars, kcLHsTyVarBndrs,-        tcWildCardBinders,-        tcHsLiftedType,   tcHsOpenType,-        tcHsLiftedTypeNC, tcHsOpenTypeNC,-        tcLHsType, tcLHsTypeUnsaturated, tcCheckLHsType,-        tcHsContext, tcLHsPredType, tcInferApps,-        solveEqualities, -- useful re-export--        typeLevelMode, kindLevelMode,--        kindGeneralize, checkExpectedKindX, instantiateTyUntilN,--        reportFloatingKvs,--        -- Sort-checking kinds-        tcLHsKindSig, badKindSig,--        -- Pattern type signatures-        tcHsPatSigType, tcPatSig, funAppCtxt-   ) where--#include "HsVersions.h"--import GhcPrelude--import HsSyn-import TcRnMonad-import TcEvidence-import TcEnv-import TcMType-import TcValidity-import TcUnify-import TcIface-import TcSimplify ( solveEqualities )-import TcType-import TcHsSyn( zonkSigType )-import Inst   ( tcInstBinders, tcInstBinder )-import TyCoRep( TyBinder(..) )  -- Used in tcDataKindSig-import Type-import Kind-import RdrName( lookupLocalRdrOcc )-import Var-import VarSet-import TyCon-import ConLike-import DataCon-import Class-import Name-import NameEnv-import NameSet-import VarEnv-import TysWiredIn-import BasicTypes-import SrcLoc-import Constants ( mAX_CTUPLE_SIZE )-import ErrUtils( MsgDoc )-import Unique-import Util-import UniqSupply-import Outputable-import FastString-import PrelNames hiding ( wildCardName )-import qualified GHC.LanguageExtensions as LangExt--import Maybes-import Data.List ( partition, mapAccumR )-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.-This is because some type-checking is done in a mutually-recursive knot, and-if we look too closely at the tycons, we'll loop. This is why we always must-use mkNakedTyConApp and mkNakedAppTys, etc., which never look at a tycon.-The mkNamed... functions don't uphold Type invariants, but zonkTcTypeToType-will repair this for us. Note that zonkTcType *is* safe within a knot, and-can be done repeatedly with no ill effect: it just squeezes out metavariables.--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, and it's easier to wait-  until knots have been resolved before poking into them--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).--Knot tying-~~~~~~~~~~-During step (1) we might fault in a TyCon defined in another module, and it might-(via a loop) refer back to a TyCon defined in this module. So when we tie a big-knot around type declarations with ARecThing, so that the fault-in code can get-the TyCon being defined.--%************************************************************************-%*                                                                      *-              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 wildards aren't allowed. The renamer has--- already checked this, so we can simply ignore it.-tcHsSigWcType ctxt sig_ty = tcHsSigType ctxt (dropWildCards sig_ty)--kcHsSigType :: [Located Name] -> LHsSigType GhcRn -> TcM ()-kcHsSigType names (HsIB { hsib_body = hs_ty-                        , hsib_vars = sig_vars })-  = addSigCtxt (funsSigCtxt names) hs_ty $-    discardResult $-    tcImplicitTKBndrsType sig_vars $-    tc_lhs_type typeLevelMode hs_ty liftedTypeKind--tcClassSigType :: [Located Name] -> LHsSigType GhcRn -> TcM Type--- Does not do validity checking; this must be done outside--- the recursive class declaration "knot"-tcClassSigType names sig_ty-  = addSigCtxt (funsSigCtxt names) (hsSigType sig_ty) $-    tc_hs_sig_type_and_gen sig_ty liftedTypeKind--tcHsSigType :: UserTypeCtxt -> LHsSigType GhcRn -> TcM Type--- Does validity checking-tcHsSigType ctxt sig_ty-  = addSigCtxt ctxt (hsSigType sig_ty) $-    do { kind <- case expectedKindInCtxt ctxt of-                    AnythingKind -> newMetaKindVar-                    TheKind k    -> return k-                    OpenKind     -> newOpenTypeKind-              -- The kind is checked by checkValidType, and isn't necessarily-              -- of kind * in a Template Haskell quote eg [t| Maybe |]--          -- Generalise here: see Note [Kind generalisation]-       ; do_kind_gen <- decideKindGeneralisationPlan sig_ty-       ; ty <- if do_kind_gen-               then tc_hs_sig_type_and_gen sig_ty kind-               else tc_hs_sig_type         sig_ty kind >>= zonkTcType--       ; checkValidType ctxt ty-       ; return ty }--tc_hs_sig_type_and_gen :: LHsSigType GhcRn -> Kind -> TcM Type--- Kind-checks/desugars an 'LHsSigType',---   solve equalities,---   and then kind-generalizes.--- This will never emit constraints, as it uses solveEqualities interally.--- No validity checking, but it does zonk en route to generalization-tc_hs_sig_type_and_gen hs_ty kind-  = do { ty <- solveEqualities $-               tc_hs_sig_type hs_ty kind-         -- NB the call to solveEqualities, which unifies all those-         --    kind variables floating about, immediately prior to-         --    kind generalisation-       ; kindGeneralizeType ty }--tc_hs_sig_type :: LHsSigType GhcRn -> Kind -> TcM Type--- Kind-check/desugar a 'LHsSigType', but does not solve--- the equalities that arise from doing so; instead it may--- emit kind-equality constraints into the monad--- No zonking or validity checking-tc_hs_sig_type (HsIB { hsib_vars = sig_vars-                     , hsib_body = hs_ty }) kind-  = do { (tkvs, ty) <- tcImplicitTKBndrsType sig_vars $-                       tc_lhs_type typeLevelMode hs_ty kind-       ; return (mkSpecForAllTys tkvs ty) }--------------------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])-tcHsDeriv hs_ty-  = do { cls_kind <- newMetaKindVar-                    -- always safe to kind-generalize, because there-                    -- can be no covars in an outer scope-       ; ty <- checkNoErrs $-                 -- avoid redundant error report with "illegal deriving", below-               tc_hs_sig_type_and_gen hs_ty cls_kind-       ; cls_kind <- zonkTcType cls_kind-       ; let (tvs, pred) = splitForAllTys ty-       ; let (args, _) = splitFunTys cls_kind-       ; case getClassPredTys_maybe pred of-           Just (cls, tys) -> return (tvs, cls, tys, args)-           Nothing -> failWithTc (text "Illegal deriving item" <+> quotes (ppr hs_ty)) }--tcHsClsInstType :: UserTypeCtxt    -- InstDeclCtxt or SpecInstCtxt-                -> LHsSigType GhcRn-                -> TcM ([TyVar], ThetaType, Class, [Type])--- Like tcHsSigType, but for a class instance declaration-tcHsClsInstType user_ctxt hs_inst_ty-  = setSrcSpan (getLoc (hsSigType hs_inst_ty)) $-    do { inst_ty <- tc_hs_sig_type_and_gen hs_inst_ty constraintKind-       ; checkValidInstance user_ctxt hs_inst_ty inst_ty }---- Used for 'VECTORISE [SCALAR] instance' declarations-tcHsVectInst :: LHsSigType GhcRn -> TcM (Class, [Type])-tcHsVectInst ty-  | let hs_cls_ty = hsSigType ty-  , Just (L _ cls_name, tys) <- hsTyGetAppHead_maybe hs_cls_ty-    -- Ignoring the binders looks pretty dodgy to me-  = do { (cls, cls_kind) <- tcClass cls_name-       ; (applied_class, _res_kind)-           <- tcTyApps typeLevelMode hs_cls_ty (mkClassPred cls []) cls_kind tys-       ; case tcSplitTyConApp_maybe applied_class of-           Just (_tc, args) -> ASSERT( _tc == classTyCon cls )-                               return (cls, args)-           _ -> failWithTc (text "Too many arguments passed to" <+> ppr cls_name) }-  | otherwise-  = failWithTc $ text "Malformed instance type"--------------------------------------------------- | Type-check a visible type application-tcHsTypeApp :: LHsWcType GhcRn -> Kind -> TcM Type-tcHsTypeApp wc_ty kind-  | HsWC { hswc_wcs = sig_wcs, hswc_body = hs_ty } <- wc_ty-  = do { ty <- tcWildCardBindersX newWildTyVar sig_wcs $ \ _ ->-               tcCheckLHsType hs_ty kind-       ; ty <- zonkTcType ty-       ; checkValidType TypeAppCtxt ty-       ; return ty }-        -- NB: we don't call emitWildcardHoleConstraints here, because-        -- we want any holes in visible type applications to be used-        -- without fuss. No errors, warnings, extensions, etc.--{--************************************************************************-*                                                                      *-            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-------------------------------- | Should we generalise the kind of this type signature?--- We *should* generalise if the type is closed--- or if NoMonoLocalBinds is set. Otherwise, nope.--- See Note [Kind generalisation plan]-decideKindGeneralisationPlan :: LHsSigType GhcRn -> TcM Bool-decideKindGeneralisationPlan sig_ty@(HsIB { hsib_closed = closed })-  = do { mono_locals <- xoptM LangExt.MonoLocalBinds-       ; let should_gen = not mono_locals || closed-       ; traceTc "decideKindGeneralisationPlan"-           (ppr sig_ty $$ text "should gen?" <+> ppr should_gen)-       ; return should_gen }--{- Note [Kind generalisation plan]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When should we do kind-generalisation for user-written type signature?-Answer: we use the same rule as for value bindings:-- * We always kind-generalise if the type signature is closed- * Additionally, we attempt to generalise if we have NoMonoLocalBinds--Trac #13337 shows the problem if we kind-generalise an open type (i.e.-one that mentions in-scope tpe variable-  foo :: forall k (a :: k) proxy. (Typeable k, Typeable a)-      => proxy a -> String-  foo _ = case eqT :: Maybe (k :~: Type) of-            Nothing   -> ...-            Just Refl -> case eqT :: Maybe (a :~: Int) of ...--In the expression type sig on the last line, we have (a :: k)-but (Int :: Type).  Since (:~:) is kind-homogeneous, this requires-k ~ *, which is true in the Refl branch of the outer case.--That equality will be solved if we allow it to float out to the-implication constraint for the Refl match, bnot not if we aggressively-attempt to solve all equalities the moment they occur; that is, when-checking (Maybe (a :~: Int)).   (NB: solveEqualities fails unless it-solves all the kind equalities, which is the right thing at top level.)--So here the right thing is simply not to do kind generalisation!--************************************************************************-*                                                                      *-      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.-data TcTyMode-  = TcTyMode { mode_level :: TypeOrKind-             , mode_unsat :: Bool        -- True <=> allow unsaturated type families-             }- -- 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_unsat = False }--kindLevelMode :: TcTyMode-kindLevelMode = TcTyMode { mode_level = KindLevel, mode_unsat = False }--allowUnsaturated :: TcTyMode -> TcTyMode-allowUnsaturated mode = mode { mode_unsat = True }---- 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 tcInstBinders.--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 $-    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 (HsTyVar _ (L _ tv)) = tcTyVar mode tv-tc_infer_hs_type mode (HsAppTy ty1 ty2)-  = do { let (fun_ty, arg_tys) = splitHsAppTys ty1 [ty2]-       ; (fun_ty', fun_kind) <- tc_infer_lhs_type mode fun_ty-       ; fun_kind' <- zonkTcType fun_kind-       ; tcTyApps mode fun_ty fun_ty' fun_kind' arg_tys }-tc_infer_hs_type mode (HsParTy t)     = tc_infer_lhs_type mode t-tc_infer_hs_type mode (HsOpTy lhs (L loc_op op) rhs)-  | not (op `hasKey` funTyConKey)-  = do { (op', op_kind) <- tcTyVar mode op-       ; op_kind' <- zonkTcType op_kind-       ; tcTyApps mode (noLoc $ HsTyVar NotPromoted (L loc_op op)) op' op_kind' [lhs, rhs] }-tc_infer_hs_type mode (HsKindSig ty sig)-  = do { sig' <- tc_lhs_kind (kindLevel mode) 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 _    (HsCoreTy ty)  = return (ty, typeKind ty)-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 $-    do { ty' <- tc_hs_type mode ty exp_kind-       ; return ty' }---------------------------------------------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 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-       ; checkExpectedKind (HsFunTy ty1 ty2) (mkFunTy ty1' ty2') liftedTypeKind exp_kind }----------------------------------------------- See also Note [Bidirectional type checking]-tc_hs_type :: TcTyMode -> HsType GhcRn -> TcKind -> TcM TcType-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 {}) _-    -- 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)-    = failWithTc (text "Unexpected strictness annotation:" <+> ppr ty)-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 (HsForAllTy { hst_bndrs = hs_tvs, hst_body = ty }) exp_kind-  = fmap fst $-    tcExplicitTKBndrs hs_tvs $ \ tvs' ->-    -- Do not kind-generalise here!  See Note [Kind generalisation]-    -- Why exp_kind?  See Note [Body kind of HsForAllTy]-    do { ty' <- tc_lhs_type mode ty exp_kind-       ; let bound_vars = allBoundVariables ty'-             bndrs      = mkTyVarBinders Specified tvs'-       ; return (mkForAllTys bndrs ty', bound_vars) }--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 isConstraintKind exp_kind-                then tc_lhs_type mode ty constraintKind-                else do { ek <- newOpenTypeKind-                                -- The body kind (result of the function)-                                -- can be * or #, hence newOpenTypeKind-                        ; ty' <- tc_lhs_type mode ty ek-                        ; checkExpectedKind (unLoc 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-       ; checkExpectedKind rn_ty (mkListTy tau_ty) liftedTypeKind exp_kind }--tc_hs_type mode rn_ty@(HsPArrTy elt_ty) exp_kind-  = do { MASSERT( isTypeLevel (mode_level mode) )-       ; tau_ty <- tc_lhs_type mode elt_ty liftedTypeKind-       ; checkWiredInTyCon parrTyCon-       ; checkExpectedKind rn_ty (mkPArrTy 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 $-                            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 getRuntimeRepFromKind arg_kinds-             arg_tys  = arg_reps ++ tau_tys-       ; checkExpectedKind rn_ty-                           (mkTyConApp (sumTyCon arity) arg_tys)-                           (unboxedSumKind arg_reps)-                           exp_kind-       }----------- Promoted lists and tuples-tc_hs_type mode rn_ty@(HsExplicitListTy _ _k 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 mode rn_ty@(HsEqTy ty1 ty2) exp_kind-  = do { (ty1', kind1) <- tc_infer_lhs_type mode ty1-       ; (ty2', kind2) <- tc_infer_lhs_type mode ty2-       ; ty2'' <- checkExpectedKind (unLoc ty2) ty2' kind2 kind1-       ; eq_tc <- tcLookupTyCon eqTyConName-       ; let ty' = mkNakedTyConApp eq_tc [kind1, ty1', ty2'']-       ; checkExpectedKind rn_ty ty' constraintKind 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@(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@(HsCoreTy {})  ek = tc_infer_hs_type_ek mode ty ek--tc_hs_type _ (HsWildCardTy wc) exp_kind-  = do { wc_tv <- tcWildCardOcc wc exp_kind-       ; return (mkTyVarTy wc_tv) }---- disposed of by renamer-tc_hs_type _ ty@(HsAppsTy {}) _-  = pprPanic "tc_hs_tyep HsAppsTy" (ppr ty)--tcWildCardOcc :: HsWildCardInfo GhcRn -> Kind -> TcM TcTyVar-tcWildCardOcc wc_info exp_kind-  = do { wc_tv <- tcLookupTyVar (wildCardName wc_info)-          -- The wildcard's kind should be an un-filled-in meta tyvar-       ; let Just wc_kind_var = tcGetTyVar_maybe (tyVarKind wc_tv)-       ; writeMetaTyVar wc_kind_var exp_kind-       ; return wc_tv }-------------------------------- | Call 'tc_infer_hs_type' and check its result against an expected kind.-tc_infer_hs_type_ek :: 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 }------------------------------tupKindSort_maybe :: TcKind -> Maybe TupleSort-tupKindSort_maybe k-  | Just (k', _) <- splitCastTy_maybe k = tupKindSort_maybe k'-  | Just k'      <- tcView k            = tupKindSort_maybe k'-  | isConstraintKind k = Just ConstraintTuple-  | isLiftedTypeKind 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 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 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)-       ; checkExpectedKind rn_ty (mkTyConApp tycon arg_tys) res_kind exp_kind }-  where-    arity = length tau_tys-    tau_reps = map getRuntimeRepFromKind 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-            -> Maybe (VarEnv Kind)  -- ^ Possibly, kind info (see above)-            -> LHsType GhcRn        -- ^ Function (for printing only)-            -> TcType               -- ^ Function (could be knot-tied)-            -> TcKind               -- ^ Function kind (zonked)-            -> [LHsType GhcRn]      -- ^ Args-            -> TcM (TcType, [TcType], TcKind) -- ^ (f args, args, result kind)-tcInferApps mode mb_kind_info orig_hs_ty fun_ty fun_ki orig_hs_args-  = do { traceTc "tcInferApps" (ppr orig_hs_ty $$ ppr orig_hs_args $$ ppr fun_ki)-       ; go 1 [] empty_subst fun_ty orig_ki_binders orig_inner_ki orig_hs_args }-  where-    empty_subst                      = mkEmptyTCvSubst $ mkInScopeSet $-                                       tyCoVarsOfType fun_ki-    (orig_ki_binders, orig_inner_ki) = tcSplitPiTys fun_ki--    go :: Int             -- the # of the next argument-       -> [TcType]        -- already type-checked args, in reverse order-       -> TCvSubst        -- instantiating substitution-       -> TcType          -- function applied to some args, could be knot-tied-       -> [TyBinder]      -- binders in function kind (both vis. and invis.)-       -> TcKind          -- function kind body (not a Pi-type)-       -> [LHsType GhcRn] -- un-type-checked args-       -> TcM (TcType, [TcType], TcKind)  -- same as overall return type--      -- no user-written args left. We're done!-    go _ acc_args subst fun ki_binders inner_ki []-      = return (fun, reverse acc_args, substTy subst $ mkPiTys ki_binders inner_ki)--      -- The function's kind has a binder. Is it visible or invisible?-    go n acc_args subst fun (ki_binder:ki_binders) inner_ki-       all_args@(arg:args)-      | isInvisibleBinder ki_binder-        -- It's invisible. Instantiate.-      = do { traceTc "tcInferApps (invis)" (ppr ki_binder $$ ppr subst)-           ; (subst', arg') <- tcInstBinder mb_kind_info subst ki_binder-           ; go n (arg' : acc_args) subst' (mkNakedAppTy fun arg')-                ki_binders inner_ki all_args }--      | otherwise-        -- It's visible. Check the next user-written argument-      = do { traceTc "tcInferApps (vis)" (vcat [ ppr ki_binder, ppr arg-                                               , ppr (tyBinderType ki_binder)-                                               , ppr subst ])-           ; arg' <- addErrCtxt (funAppCtxt orig_hs_ty arg n) $-                     tc_lhs_type mode arg (substTy subst $ tyBinderType ki_binder)-           ; let subst' = extendTvSubstBinderAndInScope subst ki_binder arg'-           ; go (n+1) (arg' : acc_args) subst' (mkNakedAppTy fun arg')-                ki_binders inner_ki args }--       -- We've run out of known binders in the functions's kind.-    go n acc_args subst fun [] inner_ki all_args-      | not (null new_ki_binders)-         -- But, after substituting, we have more binders.-      = go n acc_args zapped_subst fun new_ki_binders new_inner_ki all_args--      | otherwise-         -- 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 (mkHsAppTys orig_hs_ty (take (n-1) orig_hs_args))-                                       substed_inner_ki-           ; let subst' = zapped_subst `extendTCvInScopeSet` tyCoVarsOfTypes [arg_k, res_k]-           ; go n acc_args subst' (fun `mkNakedCastTy` co)-                [mkAnonBinder arg_k] res_k all_args }-      where-        substed_inner_ki               = substTy subst inner_ki-        (new_ki_binders, new_inner_ki) = tcSplitPiTys substed_inner_ki-        zapped_subst                   = zapTCvSubst subst---- | 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 (could be knot-tied)-         -> TcKind               -- ^ Function kind (zonked)-         -> [LHsType GhcRn]      -- ^ Args-         -> TcM (TcType, TcKind) -- ^ (f args, result kind)-tcTyApps mode orig_hs_ty ty ki args-  = do { (ty', _args, ki') <- tcInferApps mode Nothing orig_hs_ty ty ki args-       ; return (ty', ki') }------------------------------- like checkExpectedKindX, but returns only the final type; convenient wrapper-checkExpectedKind :: HsType GhcRn-                  -> TcType-                  -> TcKind-                  -> TcKind-                  -> TcM TcType-checkExpectedKind hs_ty ty act exp-  = fstOf3 <$> checkExpectedKindX Nothing (ppr hs_ty) ty act exp--checkExpectedKindX :: Maybe (VarEnv Kind)  -- Possibly, instantiations for kind vars-                   -> SDoc                 -- HsType whose kind we're checking-                   -> TcType               -- the type whose kind we're checking-                   -> TcKind               -- the known kind of that type, k-                   -> TcKind               -- the expected kind, exp_kind-                   -> TcM (TcType, [TcType], TcCoercionN)-    -- (an possibly-inst'ed, casted type :: exp_kind, 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 mb_kind_env pp_hs_ty ty act_kind exp_kind- = do { (ty', new_args, act_kind') <- instantiate ty act_kind exp_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-      ; co_k <- uType KindLevel origin act_kind' exp_kind-      ; traceTc "checkExpectedKind" (vcat [ ppr act_kind-                                          , ppr exp_kind-                                          , ppr co_k ])-      ; let result_ty = ty' `mkNakedCastTy` co_k-      ; return (result_ty, new_args, 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.-    instantiate :: TcType    -- the type-                -> TcKind    -- of this kind-                -> TcKind   -- but expected to be of this one-                -> TcM ( TcType   -- the inst'ed type-                       , [TcType] -- the new args-                       , TcKind ) -- its new kind-    instantiate ty act_ki exp_ki-      = let (exp_bndrs, _) = splitPiTysInvisible exp_ki in-        instantiateTyUntilN mb_kind_env (length exp_bndrs) ty act_ki---- | Instantiate @n@ invisible arguments to a type. If @n <= 0@, no instantiation--- occurs. If @n@ is too big, then all available invisible arguments are instantiated.--- (In other words, this function is very forgiving about bad values of @n@.)-instantiateTyN :: Maybe (VarEnv Kind)              -- ^ Predetermined instantiations-                                                   -- (for assoc. type patterns)-               -> Int                              -- ^ @n@-               -> TcType                           -- ^ the type-               -> [TyBinder] -> TcKind             -- ^ its kind-               -> TcM (TcType, [TcType], TcKind)   -- ^ The inst'ed type, new args, kind-instantiateTyN mb_kind_env n ty bndrs inner_ki-  = let   -- NB: splitAt is forgiving with invalid numbers-        (inst_bndrs, leftover_bndrs) = splitAt n bndrs-        ki          = mkPiTys bndrs inner_ki-        empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfType ki))-    in-    if n <= 0 then return (ty, [], ki) else-    do { (subst, inst_args) <- tcInstBinders empty_subst mb_kind_env inst_bndrs-       ; let rebuilt_ki = mkPiTys leftover_bndrs inner_ki-             ki'        = substTy subst rebuilt_ki-       ; traceTc "instantiateTyN" (vcat [ ppr ki-                                        , ppr n-                                        , ppr subst-                                        , ppr rebuilt_ki-                                        , ppr ki' ])-       ; return (mkNakedAppTys ty inst_args, inst_args, ki') }---- | Instantiate a type to have at most @n@ invisible arguments.-instantiateTyUntilN :: Maybe (VarEnv Kind)   -- ^ Possibly, instantiations for vars-                    -> Int         -- ^ @n@-                    -> TcType      -- ^ the type-                    -> TcKind      -- ^ its kind-                    -> TcM (TcType, [TcType], TcKind)   -- ^ The inst'ed type, new args,-                                                        -- final kind-instantiateTyUntilN mb_kind_env n ty ki-  = let (bndrs, inner_ki) = splitPiTysInvisible ki-        num_to_inst       = length bndrs - n-    in-    instantiateTyN mb_kind_env num_to_inst ty bndrs inner_ki------------------------------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-                                ; tc <- get_loopy_tc name tc_tc-                                ; handle_tyfams tc tc_tc }-                             -- mkNakedTyConApp: see Note [Type-checking inside the knot]-                 -- NB: we really should check if we're at the kind level-                 -- and if the tycon is promotable if -XNoTypeInType is set.-                 -- But this is a terribly large amount of work! Not worth it.--           AGlobal (ATyCon tc)-             -> do { check_tc tc-                   ; handle_tyfams tc tc }--           AGlobal (AConLike (RealDataCon dc))-             -> do { data_kinds <- xoptM LangExt.DataKinds-                   ; unless (data_kinds || specialPromotedDc dc) $-                       promotionErr name NoDataKindsDC-                   ; type_in_type <- xoptM LangExt.TypeInType-                   ; unless ( type_in_type ||-                              ( isTypeLevel (mode_level mode) &&-                                isLegacyPromotableDataCon dc ) ||-                              ( isKindLevel (mode_level mode) &&-                                specialPromotedDc dc ) ) $-                       promotionErr name NoTypeInTypeDC-                   ; let tc = promoteDataCon dc-                   ; return (mkNakedTyConApp tc [], tyConKind tc) }--           APromotionErr err -> promotionErr name err--           _  -> wrongThingErr "type" thing name }-  where-    check_tc :: TyCon -> TcM ()-    check_tc tc = do { type_in_type <- xoptM LangExt.TypeInType-                     ; data_kinds   <- xoptM LangExt.DataKinds-                     ; unless (isTypeLevel (mode_level mode) ||-                               data_kinds ||-                               isKindTyCon tc) $-                       promotionErr name NoDataKindsTC-                     ; unless (isTypeLevel (mode_level mode) ||-                               type_in_type ||-                               isLegacyPromotableTyCon tc) $-                       promotionErr name NoTypeInTypeTC }--    -- if we are type-checking a type family tycon, we must instantiate-    -- any invisible arguments right away. Otherwise, we get #11246-    handle_tyfams :: TyCon     -- the tycon to instantiate (might be loopy)-                  -> TcTyCon   -- a non-loopy version of the tycon-                  -> TcM (TcType, TcKind)-    handle_tyfams tc tc_tc-      | mightBeUnsaturatedTyCon tc_tc || mode_unsat mode-                                         -- This is where mode_unsat is used-      = do { traceTc "tcTyVar2a" (ppr tc_tc $$ ppr tc_kind)-           ; return (ty, tc_kind) }--      | otherwise-      = do { (tc_ty, _, kind) <- instantiateTyN Nothing (length (tyConBinders tc_tc))-                                                ty tc_kind_bndrs tc_inner_ki-           -- tc and tc_ty must not be traced here, because that would-           -- force the evaluation of a potentially knot-tied variable (tc),-           -- and the typechecker would hang, as per #11708-           ; traceTc "tcTyVar2b" (vcat [ ppr tc_tc <+> dcolon <+> ppr tc_kind-                                       , ppr kind ])-           ; return (tc_ty, kind) }-      where-        ty                           = mkNakedTyConApp tc []-        tc_kind                      = tyConKind tc_tc-        (tc_kind_bndrs, tc_inner_ki) = splitPiTysInvisible tc_kind--    get_loopy_tc :: Name -> TyCon -> TcM TyCon-    -- Return the knot-tied global TyCon if there is one-    -- Otherwise the local TcTyCon; we must be doing kind checking-    -- but we still want to return a TyCon of some sort to use in-    -- error messages-    get_loopy_tc name tc_tc-      = do { env <- getGblEnv-           ; case lookupNameEnv (tcg_type_env env) name of-                Just (ATyCon tc) -> return tc-                _                -> do { traceTc "lk1 (loopy)" (ppr name)-                                       ; return tc_tc } }--tcClass :: Name -> TcM (Class, TcKind)-tcClass cls     -- Must be a class-  = do { thing <- tcLookup cls-       ; case thing of-           ATcTyCon tc -> return (aThingErr "tcClass" cls, tyConKind tc)-           AGlobal (ATyCon tc)-             | Just cls <- tyConClass_maybe tc-             -> return (cls, tyConKind tc)-           _ -> wrongThingErr "class" thing cls }---aThingErr :: String -> Name -> b--- The type checker for types is sometimes called simply to--- do *kind* checking; and in that case it ignores the type--- returned. Which is a good thing since it may not be available yet!-aThingErr str x = pprPanic "AThing evaluated unexpectedly" (text str <+> ppr x)--{--Note [Type-checking inside the knot]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we are checking the argument types of a data constructor.  We-must zonk the types before making the DataCon, because once built we-can't change it.  So we must traverse the type.--BUT the parent TyCon is knot-tied, so we can't look at it yet.--So we must be careful not to use "smart constructors" for types that-look at the TyCon or Class involved.--  * Hence the use of mkNakedXXX functions. These do *not* enforce-    the invariants (for example that we use (FunTy s t) rather-    than (TyConApp (->) [s,t])).--  * The zonking functions establish invariants (even zonkTcType, a change from-    previous behaviour). So we must never inspect the result of a-    zonk that might mention a knot-tied TyCon. This is generally OK-    because we zonk *kinds* while kind-checking types. And the TyCons-    in kinds shouldn't be knot-tied, because they come from a previous-    mutually recursive group.--  * TcHsSyn.zonkTcTypeToType also can safely check/establish-    invariants.--This is horribly delicate.  I hate it.  A good example of how-delicate it is can be seen in Trac #7903.--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 _ ty) thing-  = addErrCtxt doc thing-  where-    doc = text "In the type" <+> quotes (ppr ty)--{--************************************************************************-*                                                                      *-                Type-variable binders-%*                                                                      *-%************************************************************************--Note [Scope-check inferred kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--  data SameKind :: k -> k -> *-  foo :: forall a (b :: Proxy a) (c :: Proxy d). SameKind b c--d has no binding site. So it gets bound implicitly, at the top. The-problem is that d's kind mentions `a`. So it's all ill-scoped.--The way we check for this is to gather all variables *bound* in a-type variable's scope. The type variable's kind should not mention-any of these variables. That is, d's kind can't mention a, b, or c.-We can't just check to make sure that d's kind is in scope, because-we might be about to kindGeneralize.--A little messy, but it works.--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 [TyVarBndrs, TyVarBinders, 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 usually-called from getInitialKind.  The only other case is in kcConDecl.)-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 [Kind generalisation and SigTvs]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-  data T (a :: k1) x = MkT (S a ())-  data S (b :: k2) y = MkS (T b ())--While we are doing kind inference for the mutually-recursive S,T,-we will end up unifying k1 and k2 together. So they can't be skolems.-We therefore make them SigTvs, which can unify with type variables,-but not with general types.  All this is very similar at the level-of terms: see Note [Quantified variables in partial type signatures]-in TcBinds.--There are some wrinkles--* We always want to kind-generalise over SigTvs, and /not/ default-  them to Type.  Another way to say this is: a SigTV should /never/-  stand for a type, even via defaulting. 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.--* 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 delcaration.--  We sort this out using findDupSigTvs, in TcTyClTyVars; very much-  as we do with partial type signatures in mk_psig_qtvs in-  TcBinds.chooseInferredQuantifiers--}--tcWildCardBinders :: [Name]-                  -> ([(Name, TcTyVar)] -> TcM a)-                  -> TcM a-tcWildCardBinders = tcWildCardBindersX new_tv-  where-    new_tv name = do { kind <- newMetaKindVar-                     ; newSkolemTyVar name kind }--tcWildCardBindersX :: (Name -> TcM TcTyVar)-                   -> [Name]-                   -> ([(Name, TcTyVar)] -> TcM a)-                   -> TcM a-tcWildCardBindersX new_wc wc_names thing_inside-  = do { wcs <- mapM new_wc wc_names-       ; let wc_prs = wc_names `zip` wcs-       ; tcExtendTyVarEnv2 wc_prs $-         thing_inside wc_prs }---- | 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 also Note [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-             -> Bool    -- ^ True <=> all the hsq_implicit are *kind* vars-                        -- (will give these kind * if -XNoTypeInType)-             -> LHsQTyVars GhcRn-             -> TcM (Kind, r)     -- ^ The result kind, possibly with other info-             -> TcM (TcTyCon, r)  -- ^ A suitably-kinded TcTyCon-kcLHsQTyVars name flav cusk all_kind_vars-  (HsQTvs { hsq_implicit = kv_ns, hsq_explicit = hs_tvs-          , hsq_dependent = dep_names }) thing_inside-  | cusk-  = do { kv_kinds <- mk_kv_kinds-       ; lvl <- getTcLevel-       ; let scoped_kvs    = zipWith (mk_skolem_tv lvl) kv_ns kv_kinds-       ; tcExtendTyVarEnv scoped_kvs $-    do { (tc_tvs, (res_kind, stuff))-              <- solveEqualities $-                 kcLHsTyVarBndrs open_fam hs_tvs thing_inside--           -- Now, because we're in a CUSK, quantify over the mentioned-           -- kind vars, in dependency order.-       ; tc_tvs  <- mapM zonkTcTyVarToTyVar tc_tvs-       ; res_kind <- zonkTcType res_kind-       ; let tc_binders = zipWith mk_tc_binder hs_tvs tc_tvs-             qkvs = tyCoVarsOfTypeWellScoped (mkTyConKind tc_binders res_kind)-                   -- the visibility of tvs doesn't matter here; we just-                   -- want the free variables not to include the tvs--          -- If there are any meta-tvs left, the user has-          -- lied about having a CUSK. Error.-       ; let (meta_tvs, good_tvs) = partition isMetaTyVar qkvs-       ; when (not (null meta_tvs)) $-         report_non_cusk_tvs (qkvs ++ tc_tvs)--          -- If any of the scoped_kvs 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 all_tc_tvs        = good_tvs ++ tc_tvs-             all_mentioned_tvs = mapUnionVarSet (tyCoVarsOfType . tyVarKind)-                                                all_tc_tvs-                                 `unionVarSet` tyCoVarsOfType res_kind-             unmentioned_kvs   = filterOut (`elemVarSet` all_mentioned_tvs)-                                           scoped_kvs-       ; reportFloatingKvs name flav all_tc_tvs unmentioned_kvs--       ; let final_binders = map (mkNamedTyConBinder Specified) good_tvs-                            ++ tc_binders-             tycon = mkTcTyCon name final_binders res_kind-                               (mkTyVarNamePairs (scoped_kvs ++ tc_tvs))-                               flav-                           -- the tvs contain the binders already-                           -- in scope from an enclosing class, but-                           -- re-adding tvs to the env't doesn't cause-                           -- harm--       ; traceTc "kcLHsQTyVars: cusk" $-         vcat [ ppr name, ppr kv_ns, ppr hs_tvs, ppr dep_names-              , ppr tc_tvs, ppr (mkTyConKind final_binders res_kind)-              , ppr qkvs, ppr meta_tvs, ppr good_tvs, ppr final_binders ]--       ; return (tycon, stuff) }}--  | otherwise-  = do { kv_kinds <- mk_kv_kinds-       ; scoped_kvs <- zipWithM newSigTyVar kv_ns kv_kinds-           -- Why newSigTyVar?  See Note [Kind generalisation and sigTvs]-       ; (tc_tvs, (res_kind, stuff))-           <- tcExtendTyVarEnv2 (kv_ns `zip` scoped_kvs) $-              kcLHsTyVarBndrs open_fam hs_tvs thing_inside-       ; let   -- NB: Don't add scoped_kvs to tyConTyVars, because they-               -- must remain lined up with the binders-             tc_binders = zipWith mk_tc_binder hs_tvs tc_tvs-             tycon = mkTcTyCon name tc_binders res_kind-                               (mkTyVarNamePairs (scoped_kvs ++ tc_tvs))-                               flav--       ; traceTc "kcLHsQTyVars: not-cusk" $-         vcat [ ppr name, ppr kv_ns, ppr hs_tvs, ppr dep_names-              , ppr tc_tvs, ppr (mkTyConKind tc_binders res_kind) ]-       ; return (tycon, stuff) }-  where-    open_fam = tcFlavourIsOpen flav--    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---      -- if -XNoTypeInType and we know all the implicits are kind vars,-      -- just give the kind *. This prevents test-      -- dependent/should_fail/KindLevelsB from compiling, as it should-    mk_kv_kinds :: TcM [Kind]-    mk_kv_kinds = do { typeintype <- xoptM LangExt.TypeInType-                     ; if not typeintype && all_kind_vars-                       then return (map (const liftedTypeKind) kv_ns)-                       else mapM (const newMetaKindVar) kv_ns }--    report_non_cusk_tvs all_tvs-      = do { all_tvs <- mapM zonkTyCoVarKind all_tvs-           ; let (_, tidy_tvs)         = tidyOpenTyCoVars emptyTidyEnv all_tvs-                 (meta_tvs, other_tvs) = partition isMetaTyVar tidy_tvs--           ; addErr $-             vcat [ text "You have written a *complete user-suppled kind signature*,"-                  , hang (text "but the following variable" <> plural meta_tvs <+>-                          isOrAre meta_tvs <+> text "undetermined:")-                       2 (vcat (map pp_tv meta_tvs))-                  , text "Perhaps add a kind signature."-                  , hang (text "Inferred kinds of user-written variables:")-                       2 (vcat (map pp_tv other_tvs)) ] }-      where-        pp_tv tv = ppr tv <+> dcolon <+> ppr (tyVarKind tv)---kcLHsTyVarBndrs :: Bool   -- True <=> Default un-annotated tyvar-                          --          binders to kind *-                -> [LHsTyVarBndr GhcRn]-                -> TcM r-                -> TcM ([TyVar], r)--- There may be dependency between the explicit "ty" vars.--- So, we have to handle them one at a time.-kcLHsTyVarBndrs _ [] thing-  = do { stuff <- thing; return ([], stuff) }--kcLHsTyVarBndrs open_fam (L _ hs_tv : hs_tvs) thing-  = do { tv_pair@(tv, _) <- kc_hs_tv hs_tv-               -- NB: Bring all tvs into scope, even non-dependent ones,-               -- as they're needed in type synonyms, data constructors, etc.--       ; (tvs, stuff) <- bind_unless_scoped tv_pair $-                         kcLHsTyVarBndrs open_fam hs_tvs $-                         thing--       ; return ( tv : tvs, stuff ) }-  where--    -- | Bind the tyvar in the env't unless the bool is True-    bind_unless_scoped :: (TcTyVar, Bool) -> TcM a -> TcM a-    bind_unless_scoped (_, True)   thing_inside = thing_inside-    bind_unless_scoped (tv, False) thing_inside-      = tcExtendTyVarEnv [tv] thing_inside--    kc_hs_tv :: HsTyVarBndr GhcRn -> TcM (TcTyVar, Bool)-    kc_hs_tv (UserTyVar lname@(L _ name))-      = do { tv_pair@(tv, in_scope) <- tcHsTyVarName Nothing name--             -- Open type/data families default their variables to kind *.-             -- But don't default in-scope class tyvars, of course-           ; when (open_fam && not in_scope) $-             discardResult $ unifyKind (Just (HsTyVar NotPromoted lname)) liftedTypeKind-                                       (tyVarKind tv)--           ; return tv_pair }--    kc_hs_tv (KindedTyVar (L _ name) lhs_kind)-      = do { kind <- tcLHsKindSig lhs_kind-           ; tcHsTyVarName (Just kind) name }---tcImplicitTKBndrs :: [Name]-                  -> TcM (a, TyVarSet)   -- vars are bound somewhere in the scope-                                         -- see Note [Scope-check inferred kinds]-                  -> TcM ([TcTyVar], a)-tcImplicitTKBndrs = tcImplicitTKBndrsX (tcHsTyVarName Nothing)---- | Convenient specialization-tcImplicitTKBndrsType :: [Name]-                      -> TcM Type-                      -> TcM ([TcTyVar], Type)-tcImplicitTKBndrsType var_ns thing_inside-  = tcImplicitTKBndrs var_ns $-    do { res_ty <- thing_inside-       ; return (res_ty, allBoundVariables res_ty) }---- this more general variant is needed in tcHsPatSigType.--- See Note [Pattern signature binders]-tcImplicitTKBndrsX :: (Name -> TcM (TcTyVar, Bool))  -- new_tv function-                   -> [Name]-                   -> TcM (a, TyVarSet)-                   -> TcM ([TcTyVar], a)--- Returned TcTyVars have the supplied Names,--- but may be in different order to the original [Name]---   (because of sorting to respect dependency)--- Returned TcTyVars have zonked kinds-tcImplicitTKBndrsX new_tv var_ns thing_inside-  = do { tkvs_pairs <- mapM new_tv var_ns-       ; let must_scope_tkvs = [ tkv | (tkv, False) <- tkvs_pairs ]-             tkvs            = map fst tkvs_pairs-       ; (result, bound_tvs) <- tcExtendTyVarEnv must_scope_tkvs $-                                thing_inside--         -- Check that the implicitly-bound kind variable-         -- really can go at the beginning.-         -- e.g.   forall (a :: k) (b :: *). ...(forces k :: b)...-       ; tkvs <- mapM zonkTyCoVarKind tkvs-                 -- NB: /not/ zonkTcTyVarToTyVar. tcImplicitTKBndrsX-                 -- guarantees to return TcTyVars with the same Names-                 -- as the var_ns.  See [Pattern signature binders]--       ; let extra = text "NB: Implicitly-bound variables always come" <+>-                     text "before other ones."-       ; checkValidInferredKinds tkvs bound_tvs extra--       ; let final_tvs = toposortTyVars tkvs-       ; traceTc "tcImplicitTKBndrs" (ppr var_ns $$ ppr final_tvs)--       ; return (final_tvs, result) }--tcExplicitTKBndrs :: [LHsTyVarBndr GhcRn]-                  -> ([TyVar] -> TcM (a, TyVarSet))-                        -- ^ Thing inside returns the set of variables bound-                        -- in the scope. See Note [Scope-check inferred kinds]-                  -> TcM (a, TyVarSet)  -- ^ returns augmented bound vars--- No cloning: returned TyVars have the same Name as the incoming LHsTyVarBndrs-tcExplicitTKBndrs orig_hs_tvs thing_inside-  = tcExplicitTKBndrsX newSkolemTyVar orig_hs_tvs thing_inside--tcExplicitTKBndrsX :: (Name -> Kind -> TcM TyVar)-                   -> [LHsTyVarBndr GhcRn]-                   -> ([TyVar] -> TcM (a, TyVarSet))-                        -- ^ Thing inside returns the set of variables bound-                        -- in the scope. See Note [Scope-check inferred kinds]-                   -> TcM (a, TyVarSet)  -- ^ returns augmented bound vars--- See also Note [Associated type tyvar names] in Class-tcExplicitTKBndrsX new_tv orig_hs_tvs thing_inside-  = go orig_hs_tvs $ \ tvs ->-    do { (result, bound_tvs) <- thing_inside tvs--         -- Issue an error if the ordering is bogus.-         -- See Note [Bad telescopes] in TcValidity.-       ; tvs <- checkZonkValidTelescope (interppSP orig_hs_tvs) tvs empty-       ; checkValidInferredKinds tvs bound_tvs empty--       ; traceTc "tcExplicitTKBndrs" $-           vcat [ text "Hs vars:" <+> ppr orig_hs_tvs-                , text "tvs:" <+> sep (map pprTyVar tvs) ]--       ; return (result, bound_tvs `unionVarSet` mkVarSet tvs)-       }-  where-    go [] thing = thing []-    go (L _ hs_tv : hs_tvs) thing-      = do { tv <- tcHsTyVarBndr new_tv hs_tv-           ; tcExtendTyVarEnv [tv] $-             go hs_tvs $ \ tvs ->-             thing (tv : tvs) }--tcHsTyVarBndr :: (Name -> Kind -> TcM TyVar)-              -> HsTyVarBndr GhcRn -> TcM TcTyVar--- Return a SkolemTv TcTyVar, initialised with a kind variable.--- Typically the Kind inside the HsTyVarBndr will be a tyvar--- with a mutable kind in it.--- NB: These variables must not be in scope. This function--- is not appropriate for use with associated types, for example.------ Returned TcTyVar has the same name; no cloning------ See also Note [Associated type tyvar names] in Class----tcHsTyVarBndr new_tv (UserTyVar (L _ name))-  = do { kind <- newMetaKindVar-       ; new_tv name kind }--tcHsTyVarBndr new_tv (KindedTyVar (L _ name) kind)-  = do { kind <- tcLHsKindSig kind-       ; new_tv name kind }--newWildTyVar :: Name -> TcM TcTyVar--- ^ New unification variable for a wildcard-newWildTyVar _name-  = do { kind <- newMetaKindVar-       ; uniq <- newUnique-       ; details <- newMetaDetails TauTv-       ; let name = mkSysTvName uniq (fsLit "w")-       ; return (mkTcTyVar name kind details) }---- | Produce a tyvar of the given name (with the kind provided, or--- otherwise a meta-var kind). If--- the name is already in scope, return the scoped variable, checking--- to make sure the known kind matches any kind provided. The--- second return value says whether the variable is in scope (True)--- or not (False). (Use this for associated types, for example.)-tcHsTyVarName :: Maybe Kind -> Name -> TcM (TcTyVar, Bool)-tcHsTyVarName m_kind name-  = do { mb_tv <- tcLookupLcl_maybe name-       ; case mb_tv of-           Just (ATyVar _ tv)-             -> do { whenIsJust m_kind $ \ kind ->-                     discardResult $-                     unifyKind (Just (HsTyVar NotPromoted (noLoc name))) kind (tyVarKind tv)-                   ; return (tv, True) }-           _ -> do { kind <- case m_kind of-                               Just kind -> return kind-                               Nothing   -> newMetaKindVar-                   ; tv <- newSkolemTyVar name kind-                   ; return (tv, False) }}---- makes a new skolem tv-newSkolemTyVar :: Name -> Kind -> TcM TcTyVar-newSkolemTyVar name kind = do { lvl <- getTcLevel-                              ; return (mk_skolem_tv lvl name kind) }--mk_skolem_tv :: TcLevel -> Name -> Kind -> TcTyVar-mk_skolem_tv lvl n k = mkTcTyVar n k (SkolemTv lvl False)---------------------kindGeneralizeType :: Type -> TcM Type--- Result is zonked-kindGeneralizeType ty-  = do { kvs <- kindGeneralize ty-       ; ty <- zonkSigType (mkInvForAllTys kvs ty)-       ; return ty  }--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-kindGeneralize kind_or_type-  = do { kvs <- zonkTcTypeAndFV kind_or_type-       ; let dvs = DV { dv_kvs = kvs, dv_tvs = emptyDVarSet }-       ; gbl_tvs <- tcGetGlobalTyCoVars -- Already zonked-       ; quantifyTyVars gbl_tvs dvs }--{--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'.--Note [Free-floating kind vars]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider--  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). Also consider--  data S a = MkS (Proxy (a :: k))--According to the rules around implicitly-bound kind variables, in both-cases those k's scope over the whole declaration. The renamer grabs-it and adds it to the hsq_implicits field of the HsQTyVars of the-tycon. So it must be in scope during type-checking, but we want to-reject T while accepting S.--Why reject T? 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.--Why accept S? Because kind inference tells us that a has kind k, so it's-all OK.--Our approach depends on whether or not the datatype has a CUSK.--Non-CUSK: In the first pass (kcTyClTyVars) we just bring-k into scope. In the second pass (tcTyClTyVars),-we check to make sure that k has been unified with some other variable-(or generalized over, making k into a skolem). If it hasn't been, then-it must be a free-floating kind var. Error.--CUSK: 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 -> *)---}------------------------- 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) }---------------------------- | Bring tycon tyvars into scope. This is used during the "kind-checking"--- pass in TcTyClsDecls. (Never in getInitialKind, never in the--- "type-checking"/desugaring pass.)--- Never emits constraints, though the thing_inside might.-kcTyClTyVars :: Name -> TcM a -> TcM a-kcTyClTyVars tycon_name thing_inside-  = do { tycon <- kcLookupTcTyCon tycon_name-       ; tcExtendTyVarEnv2 (tcTyConScopedTyVars tycon) $ thing_inside }--tcTyClTyVars :: Name-             -> ([TyConBinder] -> Kind -> TcM a) -> TcM a--- ^ Used for the type variables of a type or class decl--- on the second full pass (type-checking/desugaring) in TcTyClDecls.--- This is *not* used in the initial-kind run, nor in the "kind-checking" pass.--- Accordingly, everything passed to the continuation is fully zonked.------ (tcTyClTyVars T [a,b] thing_inside)---   where T : forall k1 k2 (a:k1 -> *) (b:k1). k2 -> *---   calls thing_inside with arguments---      [k1,k2,a,b] [k1:*, k2:*, Anon (k1 -> *), Anon k1] (k2 -> *)---   having also extended the type environment with bindings---   for k1,k2,a,b------ Never emits constraints.------ The LHsTyVarBndrs is always user-written, and the full, generalised--- kind of the tycon is available in the local env.-tcTyClTyVars tycon_name thing_inside-  = do { tycon <- kcLookupTcTyCon tycon_name--       -- Do checks on scoped tyvars-       -- See Note [Free-floating kind vars]-       ; let scoped_prs = tcTyConScopedTyVars tycon-             scoped_tvs = map snd scoped_prs-             still_sig_tvs = filter isSigTyVar scoped_tvs--       ; mapM_ report_sig_tv_err (findDupSigTvs scoped_prs)--       ; checkNoErrs $ reportFloatingKvs tycon_name (tyConFlavour tycon)-                                         scoped_tvs still_sig_tvs--       ; let res_kind   = tyConResKind tycon-             binders    = correct_binders (tyConBinders tycon) res_kind-       ; traceTc "tcTyClTyVars" (ppr tycon_name <+> ppr binders)--       ; tcExtendTyVarEnv2 scoped_prs $-         thing_inside binders res_kind }-  where-    report_sig_tv_err (n1, n2)-      = setSrcSpan (getSrcSpan n2) $-        addErrTc (text "Couldn't match" <+> quotes (ppr n1)-                        <+> text "with" <+> quotes (ppr n2))--    -- Given some TyConBinders and a TyCon's result kind, make sure that the-    -- correct any wrong Named/Anon choices. For example, consider-    --   type Syn k = forall (a :: k). Proxy a-    -- At first, it looks like k should be named -- after all, it appears on the RHS.-    -- However, the correct kind for Syn is (* -> *).-    -- (Why? Because k is the kind of a type, so k's kind is *. And the RHS also has-    -- kind *.) See also #13963.-    correct_binders :: [TyConBinder] -> Kind -> [TyConBinder]-    correct_binders binders kind-      = binders'-      where-        (_, binders') = mapAccumR go (tyCoVarsOfType kind) binders--        go :: TyCoVarSet -> TyConBinder -> (TyCoVarSet, TyConBinder)-        go fvs binder-          | isNamedTyConBinder binder-          , not (tv `elemVarSet` fvs)-          = (new_fvs, mkAnonTyConBinder tv)--          | not (isNamedTyConBinder binder)-          , tv `elemVarSet` fvs-          = (new_fvs, mkNamedTyConBinder Required tv)-             -- always Required, because it was anonymous (i.e. visible) previously--          | otherwise-          = (new_fvs, binder)--          where-            tv      = binderVar binder-            new_fvs = fvs `delVarSet` tv `unionVarSet` tyCoVarsOfType (tyVarKind tv)--------------------------------------tcDataKindSig :: [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]-tcDataKindSig 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    = TvBndr tv AnonTCB-              (uniq:uniqs') = uniqs-              (occ:occs')   = occs--          Just (Named (TvBndr tv vis), kind')-            -> go loc occs uniqs subst' (tcb : acc) kind'-            where-              (subst', tv') = substTyVarBndr subst tv-              tcb = TvBndr 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)--{- 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 tcDataKindSig 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 TcTyVar      -- Extra-constraints wildcard-         , [TcTyVar]          -- Implicitly and explicitly bound type variables-         , TcThetaType        -- Theta part-         , TcType )           -- Tau part-tcHsPartialSigType ctxt sig_ty-  | HsWC { hswc_wcs  = sig_wcs,         hswc_body = ib_ty } <- sig_ty-  , HsIB { hsib_vars = 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, (wcs, wcx, explicit_tvs, theta, tau))-            <- tcWildCardBindersX newWildTyVar sig_wcs        $ \ wcs ->-               tcImplicitTKBndrsX new_implicit_tv implicit_hs_tvs $-               tcExplicitTKBndrs explicit_hs_tvs $ \ explicit_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--                  ; let bound_tvs = unionVarSets [ allBoundVariables tau-                                                 , mkVarSet explicit_tvs-                                                 , mkVarSet (map snd wcs) ]--                  ; return ( (wcs, wcx, explicit_tvs, theta, tau)-                           , bound_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--        ; explicit_tvs <- mapM zonkTyCoVarKind explicit_tvs-        ; let all_tvs = implicit_tvs ++ explicit_tvs-                        -- The implicit_tvs already have zonked kinds--        ; theta   <- mapM zonkTcType theta-        ; tau     <- zonkTcType tau--        ; checkValidType ctxt (mkSpecForAllTys all_tvs $ mkPhiTy theta tau)--        ; traceTc "tcHsPartialSigType" (ppr all_tvs)-        ; return (wcs, wcx, all_tvs, theta, tau) }-  where-    new_implicit_tv name-      = do { kind <- newMetaKindVar-           ; tv <- newSkolemTyVar name kind-           ; return (tv, False) }--tcPartialContext :: HsContext GhcRn -> TcM (TcThetaType, Maybe TcTyVar)-tcPartialContext hs_theta-  | Just (hs_theta1, hs_ctxt_last) <- snocView hs_theta-  , L _ (HsWildCardTy wc) <- ignoreParens hs_ctxt_last-  = do { wc_tv <- tcWildCardOcc wc constraintKind-       ; theta <- mapM tcLHsPredType hs_theta1-       ; return (theta, Just wc_tv) }-  | 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 makes a wildcard name for the "_", and puts it in-  the hswc_wcs field.--* Then, in tcHsPartialSigType, we make a new hole TcTyVar, in-  tcWildCardBindersX.--* 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--tcHsPatSigType ctxt sig_ty-  | HsWC { hswc_wcs = sig_wcs,   hswc_body = ib_ty } <- sig_ty-  , HsIB { hsib_vars = sig_vars, hsib_body = hs_ty } <- ib_ty-  = addSigCtxt ctxt hs_ty $-    do { (implicit_tvs, (wcs, sig_ty))-            <- tcWildCardBindersX newWildTyVar    sig_wcs  $ \ wcs ->-               tcImplicitTKBndrsX new_implicit_tv sig_vars $-               do { sig_ty <- tcHsOpenType hs_ty-                  ; return ((wcs, sig_ty), allBoundVariables sig_ty) }--        ; emitWildCardHoleConstraints wcs--        ; sig_ty <- zonkTcType sig_ty-        ; checkValidType ctxt sig_ty--        ; tv_pairs <- mapM mk_tv_pair implicit_tvs--        ; traceTc "tcHsPatSigType" (ppr sig_vars)-        ; return (wcs, tv_pairs, sig_ty) }-  where-    new_implicit_tv name = do { kind <- newMetaKindVar-                              ; tv <- new_tv name kind-                              ; return (tv, False) }-       -- "False" means that these tyvars aren't yet in scope-    new_tv = case ctxt of-               RuleSigCtxt {} -> newSkolemTyVar-               _              -> newSigTyVar-      -- See Note [Pattern signature binders]-      -- See Note [Unifying SigTvs]--    mk_tv_pair tv = do { tv' <- zonkTcTyVarToTyVar tv-                       ; return (tyVarName tv, tv') }-         -- The Name is one of sig_vars, the lexically scoped name-         -- But if it's a SigTyVar, it might have been unified-         -- with an existing in-scope skolem, so we must zonk-         -- here.  See Note [Pattern signature binders]--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 = [ tv | (_,tv) <- sig_tvs-                             , not (tv `elemVarSet` exactTyCoVarsOfType sig_ty) ]-        ; checkTc (null bad_tvs) (badPatSigTvs 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]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Consider-   data T = forall a. T a (a->Int)-   f (T x (f :: b->Int)) = blah--Here- * The pattern (T 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->Int) makes a fresh meta-tyvar b_sig-   (a SigTv), and binds "b" :-> b_sig in the envt-- * Then unification makes b_sig := a_sk-   That's why we must make b_sig a MetaTv (albeit a SigTv),-   not a SkolemTv, so that it can unify to a_sk.-- * Finally, in 'blah' we must have the envt "b" :-> a_sk.  The pair-   ("b" :-> a_sk) is returned by tcHsPatSigType, constructed by-   mk_tv_pair in that function.--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-SigTv, 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" :-> a_sk).--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.--Note [Unifying SigTvs]-~~~~~~~~~~~~~~~~~~~~~~-ALAS we have no decent way of avoiding two SigTvs getting unified.-Consider-  f (x::(a,b)) (y::c)) = [fst x, y]-Here we'd really like to complain that 'a' and 'c' are unified. But-for the reasons above we can't make a,b,c into skolems, so they-are just SigTvs that can unify.  And indeed, this would be ok,-  f x (y::c) = case x of-                 (x1 :: a1, True) -> [x,y]-                 (x1 :: a2, False) -> [x,y,y]-Here the type of x's first component is called 'a1' in one branch and-'a2' in the other.  We could try insisting on the same OccName, but-they definitely won't have the sane lexical Name.--I think we could solve this by recording in a SigTv a list of all the-in-scope variables that it should not unify with, but it's fiddly.---************************************************************************-*                                                                      *-        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 :: LHsKind GhcRn -> TcM Kind-tcLHsKindSig hs_kind-  = do { kind <- tc_lhs_kind kindLevelMode hs_kind-       ; zonkTcType 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--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-               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"-               NoTypeInTypeTC -> text "Perhaps you intended to use TypeInType"-               NoTypeInTypeDC -> text "Perhaps you intended to use TypeInType"-               PatSynPE       -> text "Pattern synonyms cannot be promoted"-               _ -> text "it is defined and used in the same recursive group"--{--************************************************************************-*                                                                      *-                Scoped type variables-*                                                                      *-************************************************************************--}--badPatSigTvs :: TcType -> [TyVar] -> SDoc-badPatSigTvs 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-*                                                                      *-************************************************************************--}---- | Make an appropriate message for an error in a function argument.--- Used for both expressions and types.-funAppCtxt :: (Outputable fun, Outputable arg) => fun -> arg -> Int -> SDoc-funAppCtxt fun arg arg_no-  = hang (hsep [ text "In the", speakNth arg_no, ptext (sLit "argument of"),-                    quotes (ppr fun) <> text ", namely"])-       2 (quotes (ppr arg))---- 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 (tidyTyVarOcc tidy_env) bad_tvs-       ; typeintype <- xoptM LangExt.TypeInType-       ; mapM_ (report typeintype tidy_all_tvs) tidy_bad_tvs }-  where-    report typeintype 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" <+> ppWhen (not typeintype)-                                            (text "(with TypeInType)") <+>-                                 text "explicitly somewhere?"+{-# LANGUAGE ScopedTypeVariables #-}++module TcHsType (+        -- Type signatures+        kcHsSigType, tcClassSigType,+        tcHsSigType, tcHsSigWcType,+        tcHsPartialSigType,+        funsSigCtxt, addSigCtxt, pprSigCtxt,++        tcHsClsInstType,+        tcHsDeriv, tcDerivStrategy,+        tcHsTypeApp,+        UserTypeCtxt(..),+        tcImplicitTKBndrs, tcImplicitQTKBndrs,+        tcExplicitTKBndrs,+        kcExplicitTKBndrs, kcImplicitTKBndrs,++                -- Type checking type and class decls+        kcLookupTcTyCon, kcTyClTyVars, tcTyClTyVars,+        tcDataKindSig,++          -- tyvars+        scopeTyVars, scopeTyVars2,++        -- Kind-checking types+        -- No kind generalisation, no checkValidType+        kcLHsQTyVars,+        tcWildCardBinders,+        tcHsLiftedType,   tcHsOpenType,+        tcHsLiftedTypeNC, tcHsOpenTypeNC,+        tcLHsType, tcLHsTypeUnsaturated, tcCheckLHsType,+        tcHsMbContext, tcHsContext, tcLHsPredType, tcInferApps,+        solveEqualities, -- useful re-export++        typeLevelMode, kindLevelMode,++        kindGeneralize, checkExpectedKindX, instantiateTyUntilN,+        reportFloatingKvs,++        -- Sort-checking kinds+        tcLHsKindSig, badKindSig,++        -- Zonking and promoting+        zonkPromoteType,++        -- Pattern type signatures+        tcHsPatSigType, tcPatSig, funAppCtxt+   ) 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 TcType+import Inst   ( tcInstTyBinders, tcInstTyBinder )+import TyCoRep( TyBinder(..) )  -- Used in tcDataKindSig+import Type+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 Util+import UniqSupply+import Outputable+import FastString+import PrelNames hiding ( wildCardName )+import qualified GHC.LanguageExtensions as LangExt++import Maybes+import Data.List ( find, mapAccumR )+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+++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 wildards aren't allowed. The renamer has+-- already checked this, so we can simply ignore it.+tcHsSigWcType ctxt sig_ty = tcHsSigType ctxt (dropWildCards sig_ty)++kcHsSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM ()+kcHsSigType skol_info names (HsIB { hsib_body = hs_ty+                                  , hsib_ext = HsIBRn { hsib_vars = sig_vars }})+  = addSigCtxt (funsSigCtxt names) hs_ty $+    discardResult $+    tcImplicitTKBndrs skol_info sig_vars $+    tc_lhs_type typeLevelMode hs_ty liftedTypeKind+kcHsSigType  _ _ (XHsImplicitBndrs _) = panic "kcHsSigType"++tcClassSigType :: SkolemInfo -> [Located Name] -> LHsSigType GhcRn -> TcM Type+tcClassSigType skol_info names sig_ty+  = addSigCtxt (funsSigCtxt names) (hsSigType sig_ty) $+    tc_hs_sig_type_and_gen skol_info sig_ty liftedTypeKind++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)+       ; kind <- case expectedKindInCtxt ctxt of+                    AnythingKind -> newMetaKindVar+                    TheKind k    -> return k+                    OpenKind     -> newOpenTypeKind+              -- The kind is checked by checkValidType, and isn't necessarily+              -- of kind * in a Template Haskell quote eg [t| Maybe |]++          -- Generalise here: see Note [Kind generalisation]+       ; do_kind_gen <- decideKindGeneralisationPlan sig_ty+       ; ty <- if do_kind_gen+               then tc_hs_sig_type_and_gen skol_info sig_ty kind >>= zonkTcType+               else tc_hs_sig_type         skol_info sig_ty kind++       ; checkValidType ctxt ty+       ; traceTc "end tcHsSigType }" (ppr ty)+       ; return ty }+  where+    skol_info = SigTypeSkol ctxt++tc_hs_sig_type_and_gen :: SkolemInfo -> LHsSigType GhcRn -> Kind -> TcM Type+-- 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+tc_hs_sig_type_and_gen skol_info (HsIB { hsib_ext+                                              = HsIBRn { hsib_vars = sig_vars }+                                       , hsib_body = hs_ty }) kind+  = do { (tkvs, ty) <- solveEqualities $+                       tcImplicitTKBndrs skol_info sig_vars $+                       tc_lhs_type typeLevelMode hs_ty kind+         -- NB the call to solveEqualities, which unifies all those+         --    kind variables floating about, immediately prior to+         --    kind generalisation++       ; ty1 <- zonkPromoteType $ mkSpecForAllTys tkvs ty+       ; kvs <- kindGeneralize ty1+       ; return (mkInvForAllTys kvs ty1) }++tc_hs_sig_type_and_gen _ (XHsImplicitBndrs _) _ = panic "tc_hs_sig_type_and_gen"++tc_hs_sig_type :: SkolemInfo -> LHsSigType GhcRn -> Kind -> TcM Type+-- Kind-check/desugar a 'LHsSigType', but does not solve+-- the equalities that arise from doing so; instead it may+-- emit kind-equality constraints into the monad+-- Zonking, but no validity checking+tc_hs_sig_type skol_info (HsIB { hsib_ext = HsIBRn { hsib_vars = sig_vars }+                               , hsib_body = hs_ty }) kind+  = do { (tkvs, ty) <- tcImplicitTKBndrs skol_info sig_vars $+                       tc_lhs_type typeLevelMode hs_ty kind++          -- need to promote any remaining metavariables; test case:+          -- dependent/should_fail/T14066e.+       ; zonkPromoteType (mkSpecForAllTys tkvs ty) }++tc_hs_sig_type _ (XHsImplicitBndrs _) _ = panic "tc_hs_sig_type"++-----------------+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 { cls_kind <- newMetaKindVar+                    -- always safe to kind-generalize, because there+                    -- can be no covars in an outer scope+       ; ty <- checkNoErrs $+                 -- avoid redundant error report with "illegal deriving", below+               tc_hs_sig_type_and_gen (SigTypeSkol DerivClauseCtxt) hs_ty cls_kind+       ; cls_kind <- zonkTcTypeToType emptyZonkEnv cls_kind+       ; ty <- zonkTcTypeToType emptyZonkEnv ty+       ; let (tvs, pred) = splitForAllTys ty+       ; let (args, _) = splitFunTys cls_kind+       ; case getClassPredTys_maybe pred of+           Just (cls, tys) -> return (tvs, (cls, tys, 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.+     UserTypeCtxt+  -> 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 user_ctxt 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+      cls_kind <- newMetaKindVar+      ty' <- checkNoErrs $+             tc_hs_sig_type_and_gen (SigTypeSkol user_ctxt) ty cls_kind+      ty' <- zonkTcTypeToType emptyZonkEnv ty'+      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 ([TyVar], ThetaType, Class, [Type])+-- Like tcHsSigType, but for a class instance declaration+tcHsClsInstType user_ctxt hs_inst_ty+  = setSrcSpan (getLoc (hsSigType hs_inst_ty)) $+    do { inst_ty <- tc_hs_sig_type_and_gen (SigTypeSkol user_ctxt) hs_inst_ty constraintKind+       ; inst_ty <- zonkTcTypeToType emptyZonkEnv inst_ty+       ; checkValidInstance user_ctxt hs_inst_ty 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 $+               -- We are looking at a user-written type, very like a+               -- signature so we want to solve its equalities right now+               tcWildCardBinders sig_wcs $ \ _ ->+               tcCheckLHsType hs_ty kind+       ; ty <- zonkPromoteType ty+       ; checkValidType TypeAppCtxt ty+       ; return ty }+        -- NB: we don't call emitWildcardHoleConstraints here, because+        -- we want any holes in visible type applications to be used+        -- without fuss. No errors, warnings, extensions, etc.+tcHsTypeApp (XHsWildCardBndrs _) _ = panic "tcHsTypeApp"++{-+************************************************************************+*                                                                      *+            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++---------------------------+-- | Should we generalise the kind of this type signature?+-- We *should* generalise if the type is closed+-- or if NoMonoLocalBinds is set. Otherwise, nope.+-- See Note [Kind generalisation plan]+decideKindGeneralisationPlan :: LHsSigType GhcRn -> TcM Bool+decideKindGeneralisationPlan sig_ty@(HsIB { hsib_ext+                                            = HsIBRn { hsib_closed = closed } })+  = do { mono_locals <- xoptM LangExt.MonoLocalBinds+       ; let should_gen = not mono_locals || closed+       ; traceTc "decideKindGeneralisationPlan"+           (ppr sig_ty $$ text "should gen?" <+> ppr should_gen)+       ; return should_gen }+decideKindGeneralisationPlan(XHsImplicitBndrs _)+  = panic "decideKindGeneralisationPlan"++{- Note [Kind generalisation plan]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When should we do kind-generalisation for user-written type signature?+Answer: we use the same rule as for value bindings:++ * We always kind-generalise if the type signature is closed+ * Additionally, we attempt to generalise if we have NoMonoLocalBinds++Trac #13337 shows the problem if we kind-generalise an open type (i.e.+one that mentions in-scope type variable+  foo :: forall k (a :: k) proxy. (Typeable k, Typeable a)+      => proxy a -> String+  foo _ = case eqT :: Maybe (k :~: Type) of+            Nothing   -> ...+            Just Refl -> case eqT :: Maybe (a :~: Int) of ...++In the expression type sig on the last line, we have (a :: k)+but (Int :: Type).  Since (:~:) is kind-homogeneous, this requires+k ~ *, which is true in the Refl branch of the outer case.++That equality will be solved if we allow it to float out to the+implication constraint for the Refl match, but not not if we aggressively+attempt to solve all equalities the moment they occur; that is, when+checking (Maybe (a :~: Int)).   (NB: solveEqualities fails unless it+solves all the kind equalities, which is the right thing at top level.)++So here the right thing is simply not to do kind generalisation!++************************************************************************+*                                                                      *+      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.+data TcTyMode+  = TcTyMode { mode_level :: TypeOrKind+             , mode_unsat :: Bool        -- True <=> allow unsaturated type families+             }+ -- 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_unsat = False }++kindLevelMode :: TcTyMode+kindLevelMode = TcTyMode { mode_level = KindLevel, mode_unsat = False }++allowUnsaturated :: TcTyMode -> TcTyMode+allowUnsaturated mode = mode { mode_unsat = True }++-- 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 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  typeKind 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+        typeKind 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 typeKind 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 typeKind 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 (HsAppTy _ ty1 ty2)+  = do { let (hs_fun_ty, hs_arg_tys) = splitHsAppTys ty1 [ty2]+       ; (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_arg_tys }++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+                       [lhs, 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, typeKind ty) }+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+       ; checkExpectedKind (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+       ; checkExpectedKind (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 { (tvs', ty') <- tcExplicitTKBndrs (ForAllSkol (ppr forall)) 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'+       ; 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+                        ; checkExpectedKind (unLoc 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+       ; checkExpectedKind 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 $+                            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 getRuntimeRepFromKind arg_kinds+             arg_tys  = arg_reps ++ tau_tys+       ; checkExpectedKind 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')+       ; 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@(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 _ (HsWildCardTy wc) exp_kind+  = do { wc_ty <- tcWildCardOcc 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 :: HsWildCardInfo -> Kind -> TcM TcType+tcWildCardOcc wc_info exp_kind+  = do { wc_tv <- tcLookupTyVar (wildCardName wc_info)+          -- The wildcard's kind should be an un-filled-in meta tyvar+       ; checkExpectedKind (HsWildCardTy wc_info) (mkTyVarTy wc_tv)+                           (tyVarKind wc_tv) exp_kind }++---------------------------+-- | Call 'tc_infer_hs_type' and check its result against an expected kind.+tc_infer_hs_type_ek :: 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 }++---------------------------+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 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 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)+       ; checkExpectedKind rn_ty (mkTyConApp tycon arg_tys) res_kind exp_kind }+  where+    arity = length tau_tys+    tau_reps = map getRuntimeRepFromKind 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+            -> Maybe (VarEnv Kind)  -- ^ Possibly, kind info (see above)+            -> LHsType GhcRn        -- ^ Function (for printing only)+            -> TcType               -- ^ Function+            -> TcKind               -- ^ Function kind (zonked)+            -> [LHsType GhcRn]      -- ^ Args+            -> TcM (TcType, [TcType], TcKind) -- ^ (f args, args, result kind)+-- Precondition: typeKind 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 mb_kind_info 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, 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  -- nec'y to uphold (IT4) of Note [The tcType invariant]+       ; return (f_args, 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+       -> [TcType]        -- already type-checked args, in reverse order+       -> 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)+       -> [LHsType GhcRn] -- un-type-checked args+       -> TcM (TcType, [TcType], TcKind)  -- same as overall return type++      -- no user-written args left. We're done!+    go _ acc_args subst fun ki_binders inner_ki []+      = return ( fun+               , reverse acc_args+               , nakedSubstTy subst $ mkPiTys ki_binders inner_ki)+                 -- nakedSubstTy: see Note [The well-kinded type invariant]++      -- The function's kind has a binder. Is it visible or invisible?+    go n acc_args subst fun (ki_binder:ki_binders) inner_ki+       all_args@(arg:args)+      | isInvisibleBinder ki_binder+        -- It's invisible. Instantiate.+      = do { traceTc "tcInferApps (invis)" (ppr ki_binder $$ ppr subst)+           ; (subst', arg') <- tcInstTyBinder mb_kind_info subst ki_binder+           ; go n (arg' : acc_args) subst' (mkNakedAppTy fun arg')+                ki_binders inner_ki all_args }++      | otherwise+        -- It's visible. Check the next user-written argument+      = do { traceTc "tcInferApps (vis)" (vcat [ ppr ki_binder, ppr arg+                                               , 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 arg n) $+                     tc_lhs_type mode arg exp_kind+           ; traceTc "tcInferApps (vis 1)" (ppr exp_kind)+           ; let subst' = extendTvSubstBinderAndInScope subst ki_binder arg'+           ; go (n+1) (arg' : acc_args) subst'+                (mkNakedAppTy fun arg') -- See Note [The well-kinded type invariant]+                ki_binders inner_ki args }++       -- We've run out of known binders in the functions's kind.+    go n acc_args subst fun [] inner_ki all_args+      | not (null new_ki_binders)+         -- But, after substituting, we have more binders.+      = go n acc_args zapped_subst fun new_ki_binders new_inner_ki all_args++      | otherwise+         -- 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 acc_args subst'+                (fun `mkNakedCastTy` co)  -- See Note [The well-kinded type invariant]+                [mkAnonBinder arg_k]+                res_k all_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 = mkHsAppTys orig_hs_ty (take (n-1) orig_hs_args)+++-- | 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)+         -> [LHsType 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', _args, ki') <- tcInferApps mode Nothing orig_hs_ty fun_ty fun_ki args+       ; return (ty' `mkNakedCastTy` mkNomReflCo ki', ki') }+          -- The mkNakedCastTy is for (IT3) of Note [The tcType invariant]++--------------------------+-- Like checkExpectedKindX, but returns only the final type; convenient wrapper+-- Obeys Note [The tcType invariant]+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+checkExpectedKind hs_ty ty act exp+  = fstOf3 <$> checkExpectedKindX Nothing (ppr hs_ty) ty act exp++checkExpectedKindX :: Maybe (VarEnv Kind)  -- Possibly, instantiations for kind vars+                   -> SDoc                 -- HsType whose kind we're checking+                   -> TcType               -- the type whose kind we're checking+                   -> TcKind               -- the known kind of that type, k+                   -> TcKind               -- the expected kind, exp_kind+                   -> TcM (TcType, [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 mb_kind_env pp_hs_ty 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 (exp_bndrs, _) = splitPiTysInvisible exp_kind+            n_exp          = length exp_bndrs+      ; (new_args, act_kind') <- instantiateTyUntilN mb_kind_env n_exp 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+            ty' = mkNakedAppTys ty new_args++      ; traceTc "checkExpectedKind" $+        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 (ty', 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 ])+                ; let result_ty = ty' `mkNakedCastTy` co_k+                      -- See Note [The tcType invariant]+                ; return (result_ty, new_args, co_k) } }++-- | Instantiate @n@ invisible arguments to a type. If @n <= 0@, no instantiation+-- occurs. If @n@ is too big, then all available invisible arguments are instantiated.+-- (In other words, this function is very forgiving about bad values of @n@.)+-- Why zonk the result? So that tcTyVar can obey (IT6) of Note [The tcType invariant]+instantiateTyN :: Maybe (VarEnv Kind)              -- ^ Predetermined instantiations+                                                   -- (for assoc. type patterns)+               -> Int                              -- ^ @n@+               -> [TyBinder] -> TcKind             -- ^ its kind (zonked)+               -> TcM ([TcType], TcKind)   -- ^ The inst'ed type, new args, kind (zonked)+instantiateTyN mb_kind_env n bndrs inner_ki+  | n <= 0+  = return ([], ki)++  | otherwise+  = do { (subst, inst_args) <- tcInstTyBinders empty_subst mb_kind_env inst_bndrs+       ; let rebuilt_ki = mkPiTys leftover_bndrs inner_ki+       ; ki' <- zonkTcType (substTy subst rebuilt_ki)+       ; traceTc "instantiateTyN" (vcat [ ppr ki+                                        , ppr n+                                        , ppr subst+                                        , ppr rebuilt_ki+                                        , ppr ki' ])+       ; return (inst_args, ki') }+  where+     -- NB: splitAt is forgiving with invalid numbers+     (inst_bndrs, leftover_bndrs) = splitAt n bndrs+     ki          = mkPiTys bndrs inner_ki+     empty_subst = mkEmptyTCvSubst (mkInScopeSet (tyCoVarsOfType ki))++-- | Instantiate a type to have at most @n@ invisible arguments.+instantiateTyUntilN :: Maybe (VarEnv Kind)   -- ^ Possibly, instantiations for vars+                    -> Int         -- ^ @n@+                    -> TcKind      -- ^ its kind+                    -> TcM ([TcType], TcKind)   -- ^ The new args, final kind+instantiateTyUntilN mb_kind_env n ki+  = let (bndrs, inner_ki) = splitPiTysInvisible ki+        num_to_inst       = length bndrs - n+    in+    instantiateTyN mb_kind_env num_to_inst bndrs inner_ki++---------------------------+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 #114873)+                          do { ty <- zonkTcTyVar tv+                             ; return (ty, typeKind ty) }++           ATcTyCon tc_tc -> do { -- See Note [GADT kind self-reference]+                                  unless+                                    (isTypeLevel (mode_level mode))+                                    (promotionErr name TyConPE)+                                ; check_tc tc_tc+                                ; handle_tyfams tc_tc }++           AGlobal (ATyCon tc)+             -> do { check_tc tc+                   ; handle_tyfams 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 }++    -- if we are type-checking a type family tycon, we must instantiate+    -- any invisible arguments right away. Otherwise, we get #11246+    handle_tyfams :: TyCon     -- the tycon to instantiate+                  -> TcM (TcType, TcKind)+    handle_tyfams tc+      | mightBeUnsaturatedTyCon tc || mode_unsat mode+                                         -- This is where mode_unsat is used+      = do { tc_kind <- zonkTcType (tyConKind tc)   -- (IT6) of Note [The tcType invariant]+           ; traceTc "tcTyVar2a" (ppr tc $$ ppr tc_kind)+           ; return (mkTyConApp tc [] `mkNakedCastTy` mkNomReflCo tc_kind, tc_kind) }+              -- the mkNakedCastTy ensures (IT5) of Note [The tcType invariant]++      | otherwise+      = do { tc_kind <- zonkTcType (tyConKind tc)+           ; let (tc_kind_bndrs, tc_inner_ki) = splitPiTysInvisible tc_kind+           ; (tc_args, kind) <- instantiateTyN Nothing (length (tyConBinders tc))+                                               tc_kind_bndrs tc_inner_ki+           ; let is_saturated = tc_args `lengthAtLeast` tyConArity tc+                 tc_ty+                   | is_saturated = mkTyConApp tc tc_args `mkNakedCastTy` mkNomReflCo kind+                      -- mkNakedCastTy is for (IT5) of Note [The tcType invariant]+                   | otherwise    = mkTyConApp tc tc_args+                      -- if the tycon isn't yet saturated, then we don't want mkNakedCastTy,+                      -- because that means we'll have an unsaturated type family+                      -- We don't need it anyway, because we can be sure that the+                      -- type family kind will accept further arguments (because it is+                      -- not yet saturated)+           ; traceTc "tcTyVar2b" (vcat [ ppr tc <+> dcolon <+> ppr tc_kind+                                       , ppr kind ])+           ; return (tc_ty, kind) }++    -- 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 *).++Note [Don't promote data constructors with non-equality contexts]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+With -XTypeInType, one can promote almost any data constructor. There is a+notable exception to this rule, however: data constructors that contain+non-equality constraints, such as:++  data Foo a where+    MkFoo :: Show a => Foo a++MkFoo cannot be promoted since GHC cannot produce evidence for (Show a) at the+kind level. Therefore, we check the context of each data constructor before+promotion, and give a sensible error message if the context contains an illegal+constraint.++Note that equality constraints (i.e, (~) and (~~)) /are/+permitted inside data constructor contexts. All other constraints are+off-limits, however (and likely will remain off-limits until dependent types+become a reality in GHC).++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 _ 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 [TyVarBndrs, TyVarBinders, 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 [Kind generalisation and SigTvs]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  data T (a :: k1) x = MkT (S a ())+  data S (b :: k2) y = MkS (T b ())++While we are doing kind inference for the mutually-recursive S,T,+we will end up unifying k1 and k2 together. So they can't be skolems.+We therefore make them SigTvs, which can unify with type variables,+but not with general types.  All this is very similar at the level+of terms: see Note [Quantified variables in partial type signatures]+in TcBinds.++There are some wrinkles++* We always want to kind-generalise over SigTvs, and /not/ default+  them to Type.  Another way to say this is: a SigTV should /never/+  stand for a type, even via defaulting. 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.++* 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 delcaration.++  We sort this out using findDupSigTvs, in TcTyClTyVars; very much+  as we do with partial type signatures in mk_psig_qtvs in+  TcBinds.chooseInferredQuantifiers++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 toposortTyVars.++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 and promote tyvars.+ 4. (Optional) Kind-generalize.+ 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.++Step 3 requires *promoting* type variables. If there are any foralls+in a type, the TcLevel will be bumped within the forall. This might+lead to the generation of matavars with a high level. If we don't promote,+we violate MetaTvInv of Note [TcLevel and untouchable type variables]+in TcType.++-}++tcWildCardBinders :: [Name]+                  -> ([(Name, TcTyVar)] -> TcM a)+                  -> TcM a+tcWildCardBinders wc_names thing_inside+  = do { wcs <- mapM newWildTyVar wc_names+       ; let wc_prs = wc_names `zip` wcs+       ; tcExtendNameTyVarEnv wc_prs $+         thing_inside wc_prs }++-- | 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 also Note [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+  user_tyvars@(HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = kv_ns+                                           , hsq_dependent = dep_names }+                      , hsq_explicit = hs_tvs }) thing_inside+  | cusk+  = do { (scoped_kvs, (tc_tvs, res_kind))+           <- solveEqualities                    $+              tcImplicitQTKBndrs skol_info kv_ns $+              kcLHsQTyVarBndrs cusk open_fam skol_info hs_tvs thing_inside++           -- Now, because we're in a CUSK, quantify over the mentioned+           -- kind vars, in dependency order.+       ; let tc_binders_unzonked = zipWith mk_tc_binder hs_tvs tc_tvs+       ; dvs  <- zonkTcTypeAndSplitDepVars (mkSpecForAllTys scoped_kvs $+                                            mkTyConKind tc_binders_unzonked res_kind)+       ; qkvs <- quantifyTyVars emptyVarSet dvs+         -- don't call tcGetGlobalTyCoVars. For associated types, it gets the+         -- tyvars from the enclosing class -- but that's wrong. We *do* want+         -- to quantify over those tyvars.++       ; scoped_kvs <- mapM zonkTcTyVarToTyVar scoped_kvs+       ; tc_tvs     <- mapM zonkTcTyVarToTyVar tc_tvs+       ; res_kind   <- zonkTcType res_kind+       ; let tc_binders = zipWith mk_tc_binder hs_tvs tc_tvs++          -- If any of the scoped_kvs 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 all_tc_tvs        = scoped_kvs ++ tc_tvs+             all_mentioned_tvs = mapUnionVarSet (tyCoVarsOfType . tyVarKind)+                                                all_tc_tvs+                                 `unionVarSet` tyCoVarsOfType res_kind+             unmentioned_kvs   = filterOut (`elemVarSet` all_mentioned_tvs)+                                           scoped_kvs+       ; reportFloatingKvs name flav all_tc_tvs unmentioned_kvs++       ; let final_binders =  map (mkNamedTyConBinder Inferred) qkvs+                           ++ map (mkNamedTyConBinder Specified) scoped_kvs+                           ++ tc_binders+             tycon = mkTcTyCon name (ppr user_tyvars) final_binders res_kind+                               (mkTyVarNamePairs (scoped_kvs ++ tc_tvs))+                               flav+                           -- the tvs contain the binders already+                           -- in scope from an enclosing class, but+                           -- re-adding tvs to the env't doesn't cause+                           -- harm++       ; traceTc "kcLHsQTyVars: cusk" $+         vcat [ ppr name, ppr kv_ns, ppr hs_tvs, ppr dep_names+              , ppr tc_tvs, ppr (mkTyConKind final_binders res_kind)+              , ppr qkvs, ppr final_binders ]++       ; return tycon }++  | otherwise+  = do { (scoped_kvs, (tc_tvs, res_kind))+           -- Why kcImplicitTKBndrs which uses newSigTyVar?+           -- See Note [Kind generalisation and sigTvs]+           <- kcImplicitTKBndrs kv_ns $+              kcLHsQTyVarBndrs cusk open_fam skol_info hs_tvs thing_inside++       ; let   -- NB: Don't add scoped_kvs to tyConTyVars, because they+               -- must remain lined up with the binders+             tc_binders = zipWith mk_tc_binder hs_tvs tc_tvs+             tycon = mkTcTyCon name (ppr user_tyvars) tc_binders res_kind+                               (mkTyVarNamePairs (scoped_kvs ++ tc_tvs))+                               flav++       ; traceTc "kcLHsQTyVars: not-cusk" $+         vcat [ ppr name, ppr kv_ns, ppr hs_tvs, ppr dep_names+              , ppr tc_tvs, ppr (mkTyConKind tc_binders res_kind) ]+       ; return tycon }+  where+    open_fam = tcFlavourIsOpen flav+    skol_info = TyConSkol flav name++    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 _ _ _ (XLHsQTyVars _) _ = panic "kcLHsQTyVars"++kcLHsQTyVarBndrs :: Bool   -- True <=> bump the TcLevel when bringing vars into scope+                 -> Bool   -- True <=> Default un-annotated tyvar+                           --          binders to kind *+                 -> SkolemInfo+                 -> [LHsTyVarBndr GhcRn]+                 -> TcM r+                 -> TcM ([TyVar], r)+-- There may be dependency between the explicit "ty" vars.+-- So, we have to handle them one at a time.+kcLHsQTyVarBndrs _ _ _ [] thing+  = do { stuff <- thing; return ([], stuff) }++kcLHsQTyVarBndrs cusk open_fam skol_info (L _ hs_tv : hs_tvs) thing+  = do { tv_pair@(tv, _) <- kc_hs_tv hs_tv+               -- NB: Bring all tvs into scope, even non-dependent ones,+               -- as they're needed in type synonyms, data constructors, etc.++       ; (tvs, stuff) <- bind_unless_scoped tv_pair $+                         kcLHsQTyVarBndrs cusk open_fam skol_info hs_tvs $+                         thing++       ; return ( tv : tvs, stuff ) }+  where+    -- | Bind the tyvar in the env't unless the bool is True+    bind_unless_scoped :: (TcTyVar, Bool) -> TcM a -> TcM a+    bind_unless_scoped (_, True)   thing_inside = thing_inside+    bind_unless_scoped (tv, False) thing_inside+      | cusk      = scopeTyVars skol_info [tv] thing_inside+      | otherwise = tcExtendTyVarEnv      [tv] thing_inside+         -- These variables haven't settled down yet, so we don't want to bump+         -- the TcLevel. If we do, then we'll have metavars of too high a level+         -- floating about. Changing this causes many, many failures in the+         -- `dependent` testsuite directory.++    kc_hs_tv :: HsTyVarBndr GhcRn -> TcM (TcTyVar, Bool)+      -- Special handling for the case where the binder is already in scope+      -- See Note [Associated type tyvar names] in Class and+      --     Note [TyVar binders for associated decls] in HsDecls+    kc_hs_tv (UserTyVar _ (L _ name))+      = do { mb_tv <- tcLookupLcl_maybe name+           ; case mb_tv of  -- See Note [TyVar binders for associated decls]+                Just (ATyVar _ tv) -> return (tv, True)+                _ -> do { kind <- if open_fam+                                  then return liftedTypeKind+                                  else newMetaKindVar+                                  -- Open type/data families default their variables+                                  -- variables to kind *.  But don't default in-scope+                                  -- class tyvars, of course+                        ; tv <- newSkolemTyVar name kind+                        ; return (tv, False) } }++    kc_hs_tv (KindedTyVar _ lname@(L _ name) lhs_kind)+      = do { kind <- tcLHsKindSig (TyVarBndrKindCtxt name) lhs_kind+           ; mb_tv <- tcLookupLcl_maybe name+           ; case mb_tv of+               Just (ATyVar _ tv)+                 -> do { discardResult $+                           unifyKind (Just (HsTyVar noExt NotPromoted lname))+                                     kind (tyVarKind tv)+                       ; return (tv, True) }+               _ -> do { tv <- newSkolemTyVar name kind+                       ; return (tv, False) } }++    kc_hs_tv (XTyVarBndr{}) = panic "kc_hs_tv"++{- 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 tcFamTyPats.+-}+++--------------------------------------+-- Implicit binders+--------------------------------------++-- | Bring implicitly quantified type/kind variables into scope during+-- kind checking. Uses SigTvs, as per Note [Use SigTvs in kind-checking pass]+-- in TcTyClsDecls.+kcImplicitTKBndrs :: [Name]     -- of the vars+                  -> TcM a+                  -> TcM ([TcTyVar], a)  -- returns the tyvars created+                                         -- these are *not* dependency ordered+kcImplicitTKBndrs var_ns thing_inside+  = do { tkvs <- mapM newFlexiKindedSigTyVar var_ns+       ; result <- tcExtendTyVarEnv tkvs thing_inside+       ; return (tkvs, result) }+++tcImplicitTKBndrs, tcImplicitTKBndrsSig, tcImplicitQTKBndrs+  :: SkolemInfo+  -> [Name]+  -> TcM a+  -> TcM ([TcTyVar], a)+tcImplicitTKBndrs    = tcImplicitTKBndrsX newFlexiKindedSkolemTyVar+tcImplicitTKBndrsSig = tcImplicitTKBndrsX newFlexiKindedSigTyVar+tcImplicitQTKBndrs   = tcImplicitTKBndrsX newFlexiKindedQTyVar++tcImplicitTKBndrsX :: (Name -> TcM TcTyVar) -- new_tv function+                   -> SkolemInfo+                   -> [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]+tcImplicitTKBndrsX new_tv skol_info tv_names thing_inside+  | null tv_names -- Short cut for the common case where there+                  -- are no implicit type variables to bind+  = do { result <- solveLocalEqualities thing_inside+       ; return ([], result) }++  | otherwise+  = do { (skol_tvs, result)+           <- solveLocalEqualities $+              checkTvConstraints skol_info Nothing $+              do { tkvs <- mapM new_tv tv_names+                 ; result <- tcExtendTyVarEnv tkvs thing_inside+                 ; return (tkvs, result) }++       ; skol_tvs <- mapM zonkTcTyCoVarBndr skol_tvs+          -- use zonkTcTyCoVarBndr because a skol_tv might be a SigTv++       ; let final_tvs = toposortTyVars skol_tvs+       ; traceTc "tcImplicitTKBndrs" (ppr tv_names $$ ppr final_tvs)+       ; return (final_tvs, result) }++newFlexiKindedQTyVar :: Name -> TcM TcTyVar+-- Make a new skolem for an implicit binder in a type/class/type+-- instance declaration, with a flexi-kind+-- But check for in-scope-ness, and if so return that instead+newFlexiKindedQTyVar name+  = do { mb_tv <- tcLookupLcl_maybe name+       ; case mb_tv of+           Just (ATyVar _ tv) -> return tv+           _ -> newFlexiKindedSkolemTyVar 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++newFlexiKindedSigTyVar :: Name -> TcM TyVar+newFlexiKindedSigTyVar = newFlexiKindedTyVar newSigTyVar++--------------------------------------+-- Explicit binders+--------------------------------------++-- | Used during the "kind-checking" pass in TcTyClsDecls only,+-- and even then only for data-con declarations.+-- See Note [Use SigTvs in kind-checking pass] in TcTyClsDecls+kcExplicitTKBndrs :: [LHsTyVarBndr GhcRn]+                  -> TcM a+                  -> TcM a+kcExplicitTKBndrs [] thing_inside = thing_inside+kcExplicitTKBndrs (L _ hs_tv : hs_tvs) thing_inside+  = do { tv <- tcHsTyVarBndr newSigTyVar hs_tv+       ; tcExtendTyVarEnv [tv] $+         kcExplicitTKBndrs hs_tvs thing_inside }++tcExplicitTKBndrs :: SkolemInfo+                  -> [LHsTyVarBndr GhcRn]+                  -> TcM a+                  -> TcM ([TcTyVar], a)+tcExplicitTKBndrs skol_info hs_tvs thing_inside+-- Used for the forall'd binders in type signatures of various kinds:+--     - function signatures+--     - data con signatures in GADT-style decls+--     - pattern synonym signatures+--     - expression type signatures+--+-- Specifically NOT used for the binders of a data type+-- or type family decl. So the forall'd variables always /shadow/+-- anything already in scope, and the complications of+-- tcHsQTyVarName to not apply.+--+-- This function brings into scope a telescope of binders as written by+-- the user. At first blush, it would then seem that we should bring+-- them into scope one at a time, bumping the TcLevel each time.+-- (Recall that we bump the level to prevent skolem escape from happening.)+-- However, this leads to terrible error messages, because we end up+-- failing to unify with some `k0`. Better would be to allow type inference+-- to work, potentially creating a skolem-escape problem, and then to+-- notice that the telescope is out of order. That's what we do here,+-- following the logic of tcImplicitTKBndrsX.+-- See also Note [Keeping scoped variables in order: Explicit]+--+-- No cloning: returned TyVars have the same Name as the incoming LHsTyVarBndrs+  | null hs_tvs  -- Short cut that avoids creating an implication+                 -- constraint in the common case where none is needed+  = do { result <- thing_inside+       ; return ([], result) }++  | otherwise+  = do { (skol_tvs, result) <- checkTvConstraints skol_info (Just doc) $+                               bind_tvbs hs_tvs++       ; traceTc "tcExplicitTKBndrs" $+           vcat [ text "Hs vars:" <+> ppr hs_tvs+                , text "tvs:" <+> pprTyVars skol_tvs ]++       ; return (skol_tvs, result) }++  where+    bind_tvbs [] = do { result <- thing_inside+                      ; return ([], result) }+    bind_tvbs (L _ tvb : tvbs)+      = do { tv <- tcHsTyVarBndr newSkolemTyVar tvb+           ; tcExtendTyVarEnv [tv] $+        do { (tvs, result) <- bind_tvbs tvbs+           ; return (tv : tvs, result) }}++    doc = sep (map ppr hs_tvs)++-----------------+tcHsTyVarBndr :: (Name -> Kind -> TcM TyVar)+              -> HsTyVarBndr GhcRn -> TcM TcTyVar+-- Return a TcTyVar, built using the provided function+-- Typically the Kind inside the HsTyVarBndr will be a tyvar+-- with a mutable kind in it.+--+-- Returned TcTyVar has the same name; no cloning+tcHsTyVarBndr new_tv (UserTyVar _ (L _ tv_nm))+  = newFlexiKindedTyVar new_tv tv_nm+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"++-----------------+newWildTyVar :: Name -> TcM TcTyVar+-- ^ New unification variable for a wildcard+newWildTyVar _name+  = do { kind <- newMetaKindVar+       ; uniq <- newUnique+       ; details <- newMetaDetails TauTv+       ; let name = mkSysTvName uniq (fsLit "w")+             tyvar = (mkTcTyVar name kind details)+       ; traceTc "newWildTyVar" (ppr tyvar)+       ; return tyvar }++--------------------------+-- Bringing tyvars into scope+--------------------------++-- | Bring tyvars into scope, wrapping the thing_inside in an implication+-- constraint. The implication constraint is necessary to provide SkolemInfo+-- for the tyvars and to ensure that no unification variables made outside+-- the scope of these tyvars (i.e. lower TcLevel) unify with the locally-scoped+-- tyvars (i.e. higher TcLevel).+--+-- INVARIANT: The thing_inside must check only types, never terms.+--+-- Use this (not tcExtendTyVarEnv) wherever you expect a Λ or ∀ in Core.+-- Use tcExtendTyVarEnv otherwise.+scopeTyVars :: SkolemInfo -> [TcTyVar] -> TcM a -> TcM a+scopeTyVars skol_info tvs = scopeTyVars2 skol_info [(tyVarName tv, tv) | tv <- tvs]++-- | Like 'scopeTyVars', but allows you to specify different scoped names+-- than the Names stored within the tyvars.+scopeTyVars2 :: SkolemInfo -> [(Name, TcTyVar)] -> TcM a -> TcM a+scopeTyVars2 skol_info prs thing_inside+  = fmap snd $ -- discard the TcEvBinds, which will always be empty+    checkConstraints skol_info (map snd prs) [{- no EvVars -}] $+    tcExtendNameTyVarEnv prs $+    thing_inside++------------------+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 must be zonked.+-- NB: You must call solveEqualities or solveLocalEqualities before+-- kind generalization+kindGeneralize kind_or_type+  = do { let kvs = tyCoVarsOfTypeDSet kind_or_type+             dvs = DV { dv_kvs = kvs, dv_tvs = emptyDVarSet }+       ; gbl_tvs <- tcGetGlobalTyCoVars -- Already zonked+       ; quantifyTyVars gbl_tvs dvs }++{-+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'.++Note [Free-floating kind vars]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++  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). Also consider++  data S a = MkS (Proxy (a :: k))++According to the rules around implicitly-bound kind variables, in both+cases those k's scope over the whole declaration. The renamer grabs+it and adds it to the hsq_implicits field of the HsQTyVars of the+tycon. So it must be in scope during type-checking, but we want to+reject T while accepting S.++Why reject T? 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.++Why accept S? Because kind inference tells us that a has kind k, so it's+all OK.++Our approach depends on whether or not the datatype has a CUSK.++Non-CUSK: In the first pass (kcTyClTyVars) we just bring+k into scope. In the second pass (tcTyClTyVars),+we check to make sure that k has been unified with some other variable+(or generalized over, making k into a skolem). If it hasn't been, then+it must be a free-floating kind var. Error.++CUSK: 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 -> *)++-}++--------------------+-- 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) }++-----------------------+-- | Bring tycon tyvars into scope. This is used during the "kind-checking"+-- pass in TcTyClsDecls. (Never in getInitialKind, never in the+-- "type-checking"/desugaring pass.)+-- Never emits constraints, though the thing_inside might.+kcTyClTyVars :: Name -> TcM a -> TcM a+kcTyClTyVars tycon_name thing_inside+  -- See Note [Use SigTvs in kind-checking pass] in TcTyClsDecls+  = do { tycon <- kcLookupTcTyCon tycon_name+       ; tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon) $ thing_inside }++tcTyClTyVars :: Name+             -> ([TyConBinder] -> Kind -> TcM a) -> TcM a+-- ^ Used for the type variables of a type or class decl+-- on the second full pass (type-checking/desugaring) in TcTyClDecls.+-- This is *not* used in the initial-kind run, nor in the "kind-checking" pass.+-- Accordingly, everything passed to the continuation is fully zonked.+--+-- (tcTyClTyVars T [a,b] thing_inside)+--   where T : forall k1 k2 (a:k1 -> *) (b:k1). k2 -> *+--   calls thing_inside with arguments+--      [k1,k2,a,b] [k1:*, k2:*, Anon (k1 -> *), Anon k1] (k2 -> *)+--   having also extended the type environment with bindings+--   for k1,k2,a,b+--+-- Never emits constraints.+--+-- The LHsTyVarBndrs is always user-written, and the full, generalised+-- kind of the tycon is available in the local env.+tcTyClTyVars tycon_name thing_inside+  = do { tycon <- kcLookupTcTyCon tycon_name++       -- Do checks on scoped tyvars+       -- See Note [Free-floating kind vars]+       ; let flav = tyConFlavour tycon+             scoped_prs = tcTyConScopedTyVars tycon+             scoped_tvs = map snd scoped_prs+             still_sig_tvs = filter isSigTyVar scoped_tvs++       ; mapM_ report_sig_tv_err (findDupSigTvs scoped_prs)++       ; checkNoErrs $ reportFloatingKvs tycon_name flav+                                         scoped_tvs still_sig_tvs++       ; let res_kind   = tyConResKind tycon+             binders    = correct_binders (tyConBinders tycon) res_kind+       ; traceTc "tcTyClTyVars" (ppr tycon_name <+> ppr binders)+       ; scopeTyVars2 (TyConSkol flav tycon_name) scoped_prs $+         thing_inside binders res_kind }+  where+    report_sig_tv_err (n1, n2)+      = setSrcSpan (getSrcSpan n2) $+        addErrTc (text "Couldn't match" <+> quotes (ppr n1)+                        <+> text "with" <+> quotes (ppr n2))++    -- Given some TyConBinders and a TyCon's result kind, make sure that the+    -- correct any wrong Named/Anon choices. For example, consider+    --   type Syn k = forall (a :: k). Proxy a+    -- At first, it looks like k should be named -- after all, it appears on the RHS.+    -- However, the correct kind for Syn is (* -> *).+    -- (Why? Because k is the kind of a type, so k's kind is *. And the RHS also has+    -- kind *.) See also #13963.+    correct_binders :: [TyConBinder] -> Kind -> [TyConBinder]+    correct_binders binders kind+      = binders'+      where+        (_, binders') = mapAccumR go (tyCoVarsOfType kind) binders++        go :: TyCoVarSet -> TyConBinder -> (TyCoVarSet, TyConBinder)+        go fvs binder+          | isNamedTyConBinder binder+          , not (tv `elemVarSet` fvs)+          = (new_fvs, mkAnonTyConBinder tv)++          | not (isNamedTyConBinder binder)+          , tv `elemVarSet` fvs+          = (new_fvs, mkNamedTyConBinder Required tv)+             -- always Required, because it was anonymous (i.e. visible) previously++          | otherwise+          = (new_fvs, binder)++          where+            tv      = binderVar binder+            new_fvs = fvs `delVarSet` tv `unionVarSet` tyCoVarsOfType (tyVarKind tv)++-----------------------------------+tcDataKindSig :: [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]+tcDataKindSig 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    = TvBndr tv AnonTCB+              (uniq:uniqs') = uniqs+              (occ:occs')   = occs++          Just (Named (TvBndr tv vis), kind')+            -> go loc occs uniqs subst' (tcb : acc) kind'+            where+              (subst', tv') = substTyVarBndr subst tv+              tcb = TvBndr 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)++{- 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 tcDataKindSig 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 = HsIBRn { hsib_vars = 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 ->+               tcImplicitTKBndrsSig skol_info implicit_hs_tvs      $+               tcExplicitTKBndrs    skol_info 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 SigTv. 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 SigTvs 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 SigTvs so we don't violate the TcLevel+         -- invariant+       ; all_tvs <- mapM zonkPromoteTyCoVarBndr (implicit_tvs ++ explicit_tvs)+            -- zonkPromoteTyCoVarBndr deals well with SigTvs++       ; theta   <- mapM zonkPromoteType theta+       ; tau     <- zonkPromoteType tau++       ; checkValidType ctxt (mkSpecForAllTys all_tvs $ mkPhiTy theta tau)++       ; traceTc "tcHsPartialSigType" (ppr all_tvs)+       ; return (wcs, wcx, tv_names, all_tvs, theta, tau) }+  where+    skol_info   = SigTypeSkol ctxt+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 _ (HsWildCardTy wc) <- ignoreParens hs_ctxt_last+  = do { wc_tv_ty <- tcWildCardOcc 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 makes a wildcard name for the "_", and puts it in+  the hswc_wcs field.++* 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 = HsIBRn { hsib_vars = sig_vars}+         , hsib_body = hs_ty } <- ib_ty+  = addSigCtxt ctxt hs_ty $+    do { sig_tkvs <- mapM new_implicit_tv sig_vars+       ; (wcs, sig_ty)+            <- 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.+        ; sig_ty <- zonkPromoteType sig_ty+        ; checkValidType ctxt sig_ty++        ; tv_pairs <- mapM mk_tv_pair 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+               _              -> newSigTyVar+      -- See Note [Pattern signature binders]+      -- See Note [Unifying SigTvs]++    mk_tv_pair tv = do { tv' <- zonkTcTyVarToTyVar tv+                       ; return (tyVarName tv, tv') }+         -- The Name is one of sig_vars, the lexically scoped name+         -- But if it's a SigTyVar, it might have been unified+         -- with an existing in-scope skolem, so we must zonk+         -- here.  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 = [ tv | (_,tv) <- sig_tvs+                             , not (tv `elemVarSet` exactTyCoVarsOfType sig_ty) ]+        ; checkTc (null bad_tvs) (badPatSigTvs 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]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+   data T = forall a. T a (a->Int)+   f (T x (f :: b->Int)) = blah++Here+ * The pattern (T 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->Int) makes a fresh meta-tyvar b_sig+   (a SigTv), and binds "b" :-> b_sig in the envt++ * Then unification makes b_sig := a_sk+   That's why we must make b_sig a MetaTv (albeit a SigTv),+   not a SkolemTv, so that it can unify to a_sk.++ * Finally, in 'blah' we must have the envt "b" :-> a_sk.  The pair+   ("b" :-> a_sk) is returned by tcHsPatSigType, constructed by+   mk_tv_pair in that function.++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-SigTv, 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" :-> a_sk).++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.++Note [Unifying SigTvs]+~~~~~~~~~~~~~~~~~~~~~~+ALAS we have no decent way of avoiding two SigTvs getting unified.+Consider+  f (x::(a,b)) (y::c)) = [fst x, y]+Here we'd really like to complain that 'a' and 'c' are unified. But+for the reasons above we can't make a,b,c into skolems, so they+are just SigTvs that can unify.  And indeed, this would be ok,+  f x (y::c) = case x of+                 (x1 :: a1, True) -> [x,y]+                 (x1 :: a2, False) -> [x,y,y]+Here the type of x's first component is called 'a1' in one branch and+'a2' in the other.  We could try insisting on the same OccName, but+they definitely won't have the sane lexical Name.++I think we could solve this by recording in a SigTv a list of all the+in-scope variables that it should not unify with, but it's fiddly.+++************************************************************************+*                                                                      *+        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) }++{-+************************************************************************+*                                                                      *+    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.+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_tybinder = 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 <- promoteTyVar tv+                       ; if promoted+                         then zonkPromoteTcTyVar tv   -- read it again+                         else mkTyVarTy <$> zonkPromoteTyCoVarKind 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++zonkPromoteTyCoVarBndr :: TyCoVar -> TcM TyCoVar+zonkPromoteTyCoVarBndr tv+  | isSigTyVar tv+  = tcGetTyVar "zonkPromoteTyCoVarBndr SigTv" <$> zonkPromoteTcTyVar tv++  | isTcTyVar tv && isSkolemTyVar tv+  = do { tc_lvl <- getTcLevel+       ; zonkPromoteTyCoVarKind (promoteSkolem tc_lvl tv) }++  | otherwise+  = zonkPromoteTyCoVarKind tv++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 $+                 tc_lhs_kind kindLevelMode hs_kind+       ; 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+       ; 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+*                                                                      *+************************************************************************+-}++badPatSigTvs :: TcType -> [TyVar] -> SDoc+badPatSigTvs 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+*                                                                      *+************************************************************************+-}++-- | Make an appropriate message for an error in a function argument.+-- Used for both expressions and types.+funAppCtxt :: (Outputable fun, Outputable arg) => fun -> arg -> Int -> SDoc+funAppCtxt fun arg arg_no+  = hang (hsep [ text "In the", speakNth arg_no, ptext (sLit "argument of"),+                    quotes (ppr fun) <> text ", namely"])+       2 (quotes (ppr arg))++-- 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 (tidyTyVarOcc 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) ]
typecheck/TcInstDcls.hs view
@@ -19,6 +19,7 @@ import HsSyn import TcBinds import TcTyClsDecls+import TcTyDecls ( addTyConsToGblEnv ) import TcClassDcl( tcClassDecl2, tcATDefault,                    HsSigFun, mkHsSigFun,                    findMethodBind, instantiateMethod )@@ -41,7 +42,6 @@ import CoreSyn    ( Expr(..), mkApps, mkVarApps, mkLams ) import MkCore     ( nO_METHOD_BINDING_ERROR_ID ) import CoreUnfold ( mkInlineUnfoldingWithArity, mkDFunUnfolding )-import Kind import Type import TcEvidence import TyCon@@ -60,6 +60,7 @@ import ErrUtils import FastString import Id+import ListSetOps import MkId import Name import NameSet@@ -415,13 +416,12 @@ --        (b) the type envt with stuff from data type decls addFamInsts fam_insts thing_inside   = tcExtendLocalFamInstEnv fam_insts $-    tcExtendGlobalEnv axioms $-    tcExtendTyConEnv data_rep_tycons  $+    tcExtendGlobalEnv axioms          $     do { traceTc "addFamInsts" (pprFamInsts fam_insts)-       ; tcg_env <- tcAddImplicits data_rep_tycons-                    -- Does not add its axiom; that comes from-                    -- adding the 'axioms' above-       ; setGblEnv tcg_env thing_inside }+       ; gbl_env <- addTyConsToGblEnv data_rep_tycons+                    -- Does not add its axiom; that comes+                    -- from adding the 'axioms' above+       ; setGblEnv gbl_env thing_inside }   where     axioms = map (ACoAxiom . toBranchedAxiom . famInstAxiom) fam_insts     data_rep_tycons = famInstsRepTyCons fam_insts@@ -463,6 +463,8 @@   = do { (insts, fam_insts, deriv_infos) <- tcClsInstDecl (L loc decl)        ; return (insts, fam_insts, deriv_infos) } +tcLocalInstDecl (L _ (XInstDecl _)) = panic "tcLocalInstDecl"+ tcClsInstDecl :: LClsInstDecl GhcRn               -> TcM ([InstInfo GhcRn], [FamInst], [DerivInfo]) -- The returned DerivInfos are for any associated data families@@ -479,9 +481,9 @@          -- Next, process any associated types.         ; traceTc "tcLocalInstDecl" (ppr poly_ty)-        ; tyfam_insts0  <- tcExtendTyVarEnv tyvars $+        ; tyfam_insts0  <- scopeTyVars InstSkol tyvars $                            mapAndRecoverM (tcTyFamInstDecl mb_info) ats-        ; datafam_stuff <- tcExtendTyVarEnv tyvars $+        ; datafam_stuff <- scopeTyVars InstSkol tyvars $                            mapAndRecoverM (tcDataFamInstDecl mb_info) adts         ; let (datafam_insts, m_deriv_infos) = unzip datafam_stuff               deriv_infos                    = catMaybes m_deriv_infos@@ -517,7 +519,7 @@          ; return ( [inst_info], tyfam_insts0 ++ concat tyfam_insts1 ++ datafam_insts                  , deriv_infos ) }-+tcClsInstDecl (L _ (XClsInstDecl _)) = panic "tcClsInstDecl"  doClsInstErrorChecks :: InstInfo GhcRn -> TcM () doClsInstErrorChecks inst_info@@ -630,8 +632,9 @@                   -> LDataFamInstDecl GhcRn -> TcM (FamInst, Maybe DerivInfo)   -- "newtype instance" and "data instance" tcDataFamInstDecl mb_clsinfo-    (L loc decl@(DataFamInstDecl { dfid_eqn = HsIB { hsib_vars = tv_names-                                                   , hsib_body =+    (L loc decl@(DataFamInstDecl { dfid_eqn = HsIB { hsib_ext+                                               = HsIBRn { hsib_vars = tv_names }+                                 , hsib_body =       FamEqn { feqn_pats   = pats              , feqn_tycon  = fam_tc_name              , feqn_fixity = fixity@@ -681,7 +684,7 @@          -- Deal with any kind signature.          -- See also Note [Arity of data families] in FamInstEnv        ; (extra_tcbs, final_res_kind) <- tcDataKindSig full_tcbs res_kind'-       ; checkTc (tcIsStarKind final_res_kind) (badKindSig True res_kind')+       ; checkTc (tcIsLiftedTypeKind final_res_kind) (badKindSig True res_kind')         ; let extra_pats  = map (mkTyVarTy . binderVar) extra_tcbs              all_pats    = pats' `chkAppend` extra_pats@@ -723,7 +726,7 @@        ; checkValidFamPats mb_clsinfo fam_tc tvs' [] pats' extra_pats pp_hs_pats           -- Result kind must be '*' (otherwise, we have too few patterns)-       ; checkTc (tcIsStarKind final_res_kind) $+       ; checkTc (tcIsLiftedTypeKind final_res_kind) $          tooFewParmsErr (tyConArity fam_tc)         ; checkValidTyCon rep_tc@@ -755,6 +758,16 @@      pp_hs_pats = pprFamInstLHS fam_tc_name pats fixity (unLoc ctxt) m_ksig +tcDataFamInstDecl _+    (L _ (DataFamInstDecl+         { dfid_eqn = HsIB { hsib_body = FamEqn { feqn_rhs = XHsDataDefn _ }}}))+  = panic "tcDataFamInstDecl"+tcDataFamInstDecl _ (L _ (DataFamInstDecl (XHsImplicitBndrs _)))+  = panic "tcDataFamInstDecl"+tcDataFamInstDecl _ (L _ (DataFamInstDecl (HsIB _ (XFamEqn _))))+  = panic "tcDataFamInstDecl"++ {- ********************************************************************* *                                                                      *       Type-checking instance declarations, pass 2@@ -843,15 +856,14 @@                             , sc_binds   `unionBags` meth_binds                             , sc_implics `unionBags` meth_implics ) } -       ; env <- getLclEnv+       ; imp <- newImplication        ; emitImplication $-         newImplication { ic_tclvl  = tclvl-                        , ic_skols  = inst_tyvars-                        , ic_given  = dfun_ev_vars-                        , ic_wanted = mkImplicWC sc_meth_implics-                        , ic_binds  = dfun_ev_binds_var-                        , ic_env    = env-                        , ic_info   = InstSkol }+         imp { ic_tclvl  = tclvl+             , ic_skols  = inst_tyvars+             , ic_given  = dfun_ev_vars+             , ic_wanted = mkImplicWC sc_meth_implics+             , ic_binds  = dfun_ev_binds_var+             , ic_info   = InstSkol }         -- Create the result bindings        ; self_dict <- newDict clas inst_tys@@ -869,14 +881,15 @@                      --    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 (RealDataCon dict_constr))+                                  (HsConLikeOut noExt (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 = L loc fun `HsApp` L loc (wrapId arg_wrapper meth_id)+             app_to_meth fun meth_id = HsApp noExt (L loc fun)+                                            (L loc (wrapId arg_wrapper meth_id))               inst_tv_tys = mkTyVarTys inst_tyvars              arg_wrapper = mkWpEvVarApps dfun_ev_vars <.> mkWpTyApps inst_tv_tys@@ -889,12 +902,14 @@                     -- Newtype dfuns just inline unconditionally,                     -- so don't attempt to specialise them -             export = ABE { abe_wrap = idHsWrapper+             export = ABE { abe_ext  = noExt+                          , 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_tvs = inst_tyvars+             main_bind = AbsBinds { abs_ext = noExt+                                  , abs_tvs = inst_tyvars                                   , abs_ev_vars = dfun_ev_vars                                   , abs_exports = [export]                                   , abs_ev_binds = []@@ -939,8 +954,8 @@    [dict_con]  = tyConDataCons clas_tc    is_newtype  = isNewTyCon clas_tc -wrapId :: HsWrapper -> IdP id -> HsExpr id-wrapId wrapper id = mkHsWrap wrapper (HsVar (noLoc id))+wrapId :: HsWrapper -> IdP (GhcPass id) -> HsExpr (GhcPass id)+wrapId wrapper id = mkHsWrap wrapper (HsVar noExt (noLoc id))  {- Note [Typechecking plan for instance declarations] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -989,7 +1004,7 @@    into *every* method or superclass definition.  (Some of it will    be usused in some, but dead-code elimination will drop it.) -   We achieve this by putting the the evidence variable for the overall+   We achieve this by putting the evidence variable for the overall    instance implication into the AbsBinds for each method/superclass.    Hence the 'dfun_ev_binds' passed into tcMethods and tcSuperClasses.    (And that in turn is why the abs_ev_binds field of AbBinds is a@@ -1038,12 +1053,14 @@            ; addTcEvBind ev_binds_var $ mkWantedEvBind sc_ev_id sc_ev_tm            ; let sc_top_ty = mkInvForAllTys tyvars (mkLamTypes dfun_evs sc_pred)                  sc_top_id = mkLocalId sc_top_name sc_top_ty-                 export = ABE { abe_wrap = idHsWrapper+                 export = ABE { abe_ext  = noExt+                              , 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_tvs      = tyvars+                 bind = AbsBinds { abs_ext      = noExt+                                 , abs_tvs      = tyvars                                  , abs_ev_vars  = dfun_evs                                  , abs_exports  = [export]                                  , abs_ev_binds = [dfun_ev_binds, local_ev_binds]@@ -1060,14 +1077,13 @@                                     thing_inside         ; ev_binds_var <- newTcEvBinds-       ; env <- getLclEnv-       ; let implic = newImplication { ic_tclvl  = tclvl-                                     , ic_wanted = wanted-                                     , ic_binds  = ev_binds_var-                                     , ic_env    = env-                                     , ic_info   = InstSkol }+       ; implic <- newImplication+       ; let implic' = implic { ic_tclvl  = tclvl+                              , ic_wanted = wanted+                              , ic_binds  = ev_binds_var+                              , ic_info   = InstSkol } -       ; return (implic, ev_binds_var, result) }+       ; return (implic', ev_binds_var, result) }  {- Note [Recursive superclasses]@@ -1282,17 +1298,27 @@                                 , ib_pragmas    = sigs                                 , ib_extensions = exts                                 , ib_derived    = is_derived })-  = tcExtendTyVarEnv2 (lexical_tvs `zip` tyvars) $+      -- tcExtendTyVarEnv (not scopeTyVars) is OK because the TcLevel is pushed+      -- in checkInstConstraints+  = tcExtendNameTyVarEnv (lexical_tvs `zip` tyvars) $        -- The lexical_tvs scope over the 'where' part     do { traceTc "tcInstMeth" (ppr sigs $$ ppr binds)        ; checkMinimalDefinition+       ; checkMethBindMembership        ; (ids, binds, mb_implics) <- set_exts exts $+                                     unset_warnings_deriving $                                      mapAndUnzip3M tc_item op_items        ; return (ids, listToBag binds, listToBag (catMaybes mb_implics)) }   where     set_exts :: [LangExt.Extension] -> TcM a -> TcM a     set_exts es thing = foldr setXOptM thing es +    -- See Note [Avoid -Winaccessible-code when deriving]+    unset_warnings_deriving :: TcM a -> TcM a+    unset_warnings_deriving+      | is_derived = unsetWOptM Opt_WarnInaccessibleCode+      | otherwise  = id+     hs_sig_fn = mkHsSigFun sigs     inst_loc  = getSrcSpan dfun_id @@ -1328,12 +1354,12 @@                              mkLHsWrap lam_wrapper (error_rhs dflags)            ; return (meth_id, meth_bind, Nothing) }       where-        error_rhs dflags = L inst_loc $ HsApp error_fun (error_msg dflags)+        error_rhs dflags = L inst_loc $ HsApp noExt 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 (HsStringPrim noSourceText+        error_msg dflags = L inst_loc (HsLit noExt (HsStringPrim NoSourceText                                               (unsafeMkByteString (error_string dflags))))         meth_tau     = funResultTy (piResultTys (idType sel_id) inst_tys)         error_string dflags = showSDoc dflags@@ -1348,6 +1374,90 @@      methodExists meth = isJust (findMethodBind meth binds prag_fn) +    ----------------------+    -- Check if any method bindings do not correspond to the class.+    -- See Note [Mismatched class methods and associated type families].+    checkMethBindMembership+      = let bind_nms         = map unLoc $ collectMethodBinders binds+            cls_meth_nms     = map (idName . fst) op_items+            mismatched_meths = bind_nms `minusList` cls_meth_nms+        in forM_ mismatched_meths $ \mismatched_meth ->+             addErrTc $ hsep+             [ text "Class", quotes (ppr (className clas))+             , text "does not have a method", quotes (ppr mismatched_meth)]++{-+Note [Mismatched class methods and associated type families]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+It's entirely possible for someone to put methods or associated type family+instances inside of a class in which it doesn't belong. For instance, we'd+want to fail if someone wrote this:++  instance Eq () where+    type Rep () = Maybe+    compare = undefined++Since neither the type family `Rep` nor the method `compare` belong to the+class `Eq`. Normally, this is caught in the renamer when resolving RdrNames,+since that would discover that the parent class `Eq` is incorrect.++However, there is a scenario in which the renamer could fail to catch this:+if the instance was generated through Template Haskell, as in #12387. In that+case, Template Haskell will provide fully resolved names (e.g.,+`GHC.Classes.compare`), so the renamer won't notice the sleight-of-hand going+on. For this reason, we also put an extra validity check for this in the+typechecker as a last resort.++Note [Avoid -Winaccessible-code when deriving]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+-Winaccessible-code can be particularly noisy when deriving instances for+GADTs. Consider the following example (adapted from #8128):++  data T a where+    MkT1 :: Int -> T Int+    MkT2 :: T Bool+    MkT3 :: T Bool+  deriving instance Eq (T a)+  deriving instance Ord (T a)++In the derived Ord instance, GHC will generate the following code:++  instance Ord (T a) where+    compare x y+      = case x of+          MkT2+            -> case y of+                 MkT1 {} -> GT+                 MkT2    -> EQ+                 _       -> LT+          ...++However, that MkT1 is unreachable, since the type indices for MkT1 and MkT2+differ, so if -Winaccessible-code is enabled, then deriving this instance will+result in unwelcome warnings.++One conceivable approach to fixing this issue would be to change `deriving Ord`+such that it becomes smarter about not generating unreachable cases. This,+however, would be a highly nontrivial refactor, as we'd have to propagate+through typing information everywhere in the algorithm that generates Ord+instances in order to determine which cases were unreachable. This seems like+a lot of work for minimal gain, so we have opted not to go for this approach.++Instead, we take the much simpler approach of always disabling+-Winaccessible-code for derived code. To accomplish this, we do the following:++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.+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+   disabled, then don't bother reporting it. That's it!+-}+ ------------------------ tcMethodBody :: Class -> [TcTyVar] -> [EvVar] -> [TcType]              -> TcEvBinds -> Bool@@ -1379,13 +1489,15 @@        ; spec_prags     <- tcSpecPrags global_meth_id prags          ; let specs  = mk_meth_spec_prags global_meth_id spec_inst_prags spec_prags-              export = ABE { abe_poly  = global_meth_id+              export = ABE { abe_ext   = noExt+                           , 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_tvs      = tyvars+              full_bind = AbsBinds { abs_ext      = noExt+                                   , abs_tvs      = tyvars                                    , abs_ev_vars  = dfun_ev_vars                                    , abs_exports  = [export]                                    , abs_ev_binds = [dfun_ev_binds, local_ev_binds]@@ -1427,13 +1539,14 @@         ; (tc_bind, [inner_id]) <- tcPolyCheck no_prag_fn inner_meth_sig meth_bind -       ; let export = ABE { abe_poly  = local_meth_id+       ; let export = ABE { abe_ext   = noExt+                          , abe_poly  = local_meth_id                           , abe_mono  = inner_id                           , abe_wrap  = hs_wrap                           , abe_prags = noSpecPrags }         ; return (unitBag $ L (getLoc meth_bind) $-                 AbsBinds { abs_tvs = [], abs_ev_vars = []+                 AbsBinds { abs_ext = noExt, abs_tvs = [], abs_ev_vars = []                           , abs_exports = [export]                           , abs_binds = tc_bind, abs_ev_binds = []                           , abs_sig = True }) }@@ -1540,7 +1653,7 @@  * The middle one is only present if there is an instance signature,    and does the impedance matching for that signature  * The inner one is for the method binding itself against either the-   signature from the class, or the the instance signature.+   signature from the class, or the instance signature. -}  ----------------------@@ -1579,7 +1692,7 @@         ; dm_id <- tcLookupId dm_name         ; let inline_prag = idInlinePragma dm_id               inline_prags | isAnyInlinePragma inline_prag-                           = [noLoc (InlineSig fn inline_prag)]+                           = [noLoc (InlineSig noExt fn inline_prag)]                            | otherwise                            = []                  -- Copy the inline pragma (if any) from the default method@@ -1599,8 +1712,8 @@        ; return (bind, inline_prags) }   where     mk_vta :: LHsExpr GhcRn -> Type -> LHsExpr GhcRn-    mk_vta fun ty = noLoc (HsAppType fun (mkEmptyWildCardBndrs-                                          $ nlHsParTy $ noLoc $ HsCoreTy ty))+    mk_vta fun ty = noLoc (HsAppType (mkEmptyWildCardBndrs $ nlHsParTy+                                      $ noLoc $ XHsType $ NHsCoreTy ty) fun)        -- NB: use visible type application        -- See Note [Default methods in instances] @@ -1802,7 +1915,7 @@  ------------------------------ tcSpecInst :: Id -> Sig GhcRn -> TcM TcSpecPrag-tcSpecInst dfun_id prag@(SpecInstSig _ hs_ty)+tcSpecInst dfun_id prag@(SpecInstSig _ _ hs_ty)   = addErrCtxt (spec_ctxt prag) $     do  { (tyvars, theta, clas, tys) <- tcHsClsInstType SpecInstCtxt hs_ty         ; let spec_dfun_ty = mkDictFunTy tyvars theta clas tys
typecheck/TcInteract.hs view
@@ -16,7 +16,6 @@ import TcUnify( canSolveByUnification ) import VarSet import Type-import Kind( isConstraintKind ) import InstEnv( DFunInstType, lookupInstEnv               , instanceDFunId, isOverlappable ) import CoAxiom( sfInteractTop, sfInteractInert )@@ -44,15 +43,16 @@ import FunDeps import FamInst import FamInstEnv-import Unify ( tcUnifyTyWithTFs )+import Unify ( tcUnifyTyWithTFs, ruleMatchTyKiX )  import TcEvidence+import MkCore ( mkStringExprFS, mkNaturalExpr ) import Outputable  import TcRnTypes import TcSMonad import Bag-import MonadUtils ( concatMapM )+import MonadUtils ( concatMapM, foldlM )  import Data.List( partition, foldl', deleteFirstsBy ) import SrcLoc@@ -392,9 +392,11 @@ runSolverPipeline pipeline workItem   = do { wl <- getWorkList        ; inerts <- getTcSInerts+       ; tclevel <- getTcLevel        ; traceTcS "----------------------------- " empty        ; traceTcS "Start solver pipeline {" $-                  vcat [ text "work item =" <+> ppr workItem+                  vcat [ text "tclevel =" <+> ppr tclevel+                       , text "work item =" <+> ppr workItem                        , text "inerts =" <+> ppr inerts                        , text "rest of worklist =" <+> ppr wl ] @@ -470,7 +472,7 @@     c1: [W] beta ~ [alpha], c2 : [W] blah, c3 :[W] alpha ~ Int After processing the first two, we get      c1: [G] beta ~ [alpha], c2 : [W] blah-Now, c3 does not interact with the the given c1, so when we spontaneously+Now, c3 does not interact with the given c1, so when we spontaneously solve c3, we must re-react it with the inert set.  So we can attempt a reaction between inert c2 [W] and work-item c3 [G]. @@ -567,6 +569,8 @@      loc_w = ctEvLoc ev_w      lvl_i = ctLocLevel loc_i      lvl_w = ctLocLevel loc_w+     ev_id_i = ctEvEvId ev_i+     ev_id_w = ctEvEvId ev_w       different_level_strategy        | isIPPred pred, lvl_w > lvl_i = KeepWork@@ -583,14 +587,15 @@        | GivenOrigin (InstSC {}) <- ctLocOrigin loc_w        = KeepInert -       | has_binding binds ev_w-       , not (has_binding binds ev_i)+       | has_binding binds ev_id_w+       , not (has_binding binds ev_id_i)+       , not (ev_id_i `elemVarSet` findNeededEvVars binds (unitVarSet ev_id_w))        = KeepWork         | otherwise        = KeepInert -     has_binding binds ev = isJust (lookupEvBind binds (ctEvEvId ev))+     has_binding binds ev_id = isJust (lookupEvBind binds ev_id)  {- Note [Replacement vs keeping]@@ -615,23 +620,35 @@    * Constraints coming from the same level (i.e. same implication) -       - Always get rid of InstSC ones if possible, since they are less-         useful for solving.  If both are InstSC, choose the one with-         the smallest TypeSize-         See Note [Solving superclass constraints] in TcInstDcls+       (a) Always get rid of InstSC ones if possible, since they are less+           useful for solving.  If both are InstSC, choose the one with+           the smallest TypeSize+           See Note [Solving superclass constraints] in TcInstDcls -       - Keep the one that has a non-trivial evidence binding.-            Example:  f :: (Eq a, Ord a) => blah-            then we may find [G] d3 :: Eq a-                             [G] d2 :: Eq a-              with bindings  d3 = sc_sel (d1::Ord a)+       (b) Keep the one that has a non-trivial evidence binding.+              Example:  f :: (Eq a, Ord a) => blah+              then we may find [G] d3 :: Eq a+                               [G] d2 :: Eq a+                with bindings  d3 = sc_sel (d1::Ord a)             We want to discard d2 in favour of the superclass selection from             the Ord dictionary.-         Why? See Note [Tracking redundant constraints] in TcSimplify again.+            Why? See Note [Tracking redundant constraints] in TcSimplify again. -  * Finally, when there is still a choice, use IRKeep rather than-    IRReplace, to avoid unnecessary munging of the inert set.+       (c) But don't do (b) if the evidence binding depends transitively on the+           one without a binding.  Example (with RecursiveSuperClasses)+              class C a => D a+              class D a => C a+           Inert:     d1 :: C a, d2 :: D a+           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. +  * Finally, when there is still a choice, use KeepInert rather than+    KeepWork, for two reasons:+      - to avoid unnecessary munging of the inert set.+      - to cut off superclass loops; see Note [Superclass loops] in TcCanonical+ Doing the depth-check for implicit parameters, rather than making the work item always override, is important.  Consider @@ -657,6 +674,18 @@                    interactIrred *                                                                               * *********************************************************************************++Note [Multiple matching irreds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+You might think that it's impossible to have multiple irreds all match the+work item; after all, interactIrred looks for matches and solves one from the+other. However, note that interacting insoluble, non-droppable irreds does not+do this matching. We thus might end up with several insoluble, non-droppable,+matching irreds in the inert set. When another irred comes along that we have+not yet labeled insoluble, we can find multiple matches. These multiple matches+cause no harm, but it would be wrong to ASSERT that they aren't there (as we+once had done). This problem can be tickled by typecheck/should_compile/holes.+ -}  -- Two pieces of irreducible evidence: if their types are *exactly identical*@@ -674,10 +703,10 @@   = continueWith workItem    | let (matching_irreds, others) = findMatchingIrreds (inert_irreds inerts) ev_w-  , ((ct_i, swap) : rest) <- bagToList matching_irreds+  , ((ct_i, swap) : _rest) <- bagToList matching_irreds+        -- See Note [Multiple matching irreds]   , let ev_i = ctEvidence ct_i-  = ASSERT( null rest )-    do { what_next <- solveOneFromTheOther ev_i ev_w+  = do { what_next <- solveOneFromTheOther ev_i ev_w        ; traceTcS "iteractIrred" (ppr workItem $$ ppr what_next $$ ppr ct_i)        ; case what_next of             KeepInert -> do { setEvBindIfWanted ev_w (swap_me swap ev_i)@@ -694,7 +723,7 @@     swap_me swap ev       = case swap of            NotSwapped -> ctEvTerm ev-           IsSwapped  -> EvCoercion (mkTcSymCo (evTermCoercion (ctEvTerm ev)))+           IsSwapped  -> evCoercion (mkTcSymCo (evTermCoercion (ctEvTerm ev)))  interactIrred _ wi = pprPanic "interactIrred" (ppr wi) @@ -978,6 +1007,39 @@ The output of `main` if we avoid the optimization under the effect of IncoherentInstances is `1`. If we were to do the optimization, the output of `main` would be `2`.++Note [Shortcut try_solve_from_instance]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The workhorse of the short-cut solver is+    try_solve_from_instance :: CtLoc+                            -> (EvBindMap, DictMap CtEvidence)+                            -> CtEvidence       -- Solve this+                            -> MaybeT TcS (EvBindMap, DictMap CtEvidence)+Note that:++* The CtEvidence is teh goal to be solved++* The MaybeT anages early failure if we find a subgoal that+  cannot be solved from instances.++* The (EvBindMap, DictMap CtEvidence) is an accumulating purely-functional+  state that allows try_solve_from_instance to augmennt the evidence+  bindings and inert_solved_dicts as it goes.++  If it succeeds, we commit all these bindings and solved dicts to the+  main TcS InertSet.  If not, we abandon it all entirely.++Passing along the solved_dicts important for two reasons:++* We need to be able to handle recursive super classes. The+  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+  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+  behaviour. -}  interactDict :: InertCans -> Ct -> TcS (StopOrContinue Ct)@@ -987,24 +1049,21 @@     do { -- First to try to solve it /completely/ from top level instances          -- See Note [Shortcut solving]          dflags <- getDynFlags-       ; try_inst_res <- shortCutSolver dflags ev_w ev_i-       ; case try_inst_res of-           Just evs -> do { flip mapM_ evs $ \ (ev_t, ct_ev, cls, typ) ->-                               do { setWantedEvBind (ctEvEvId ct_ev) ev_t-                                  ; addSolvedDict ct_ev cls typ }-                          ; stopWith ev_w "interactDict/solved from instance" }+       ; short_cut_worked <- shortCutSolver dflags ev_w ev_i+       ; if short_cut_worked+         then stopWith ev_w "interactDict/solved from instance"+         else -           -- We were unable to solve the [W] constraint from in-scope instances-           -- so we solve it from the matching inert we found-           Nothing ->  do-             { what_next <- solveOneFromTheOther ev_i ev_w-             ; traceTcS "lookupInertDict" (ppr what_next)-             ; case what_next of-                 KeepInert -> do { setEvBindIfWanted ev_w (ctEvTerm ev_i)-                                 ; return $ Stop ev_w (text "Dict equal" <+> parens (ppr what_next)) }-                 KeepWork  -> do { setEvBindIfWanted ev_i (ctEvTerm ev_w)-                                 ; updInertDicts $ \ ds -> delDict ds cls tys-                                 ; continueWith workItem } } }+    do { -- Ths short-cut solver didn't fire, so we+         -- solve ev_w from the matching inert ev_i we found+         what_next <- solveOneFromTheOther ev_i ev_w+       ; traceTcS "lookupInertDict" (ppr what_next)+       ; case what_next of+           KeepInert -> do { setEvBindIfWanted ev_w (ctEvTerm ev_i)+                           ; return $ Stop ev_w (text "Dict equal" <+> parens (ppr what_next)) }+           KeepWork  -> do { setEvBindIfWanted ev_i (ctEvTerm ev_w)+                           ; updInertDicts $ \ ds -> delDict ds cls tys+                           ; continueWith workItem } } }    | cls `hasKey` ipClassKey   , isGiven ev_w@@ -1020,9 +1079,7 @@ shortCutSolver :: DynFlags                -> CtEvidence -- Work item                -> CtEvidence -- Inert we want to try to replace-               -> TcS (Maybe [(EvTerm, CtEvidence, Class, [TcPredType])])-                      -- Everything we need to bind a solution for the work item-                      -- and add the solved Dict to the cache in the main solver.+               -> TcS Bool   -- True <=> success shortCutSolver dflags ev_w ev_i   | isWanted ev_w  && isGiven ev_i@@ -1040,65 +1097,78 @@   && gopt Opt_SolveConstantDicts dflags  -- Enabled by the -fsolve-constant-dicts flag-  = runMaybeT $ try_solve_from_instance loc_w emptyDictMap ev_w+  = do { ev_binds_var <- getTcEvBindsVar+       ; ev_binds <- ASSERT2( not (isNoEvBindsVar ev_binds_var ), ppr ev_w )+                     getTcEvBindsMap ev_binds_var+       ; solved_dicts <- getSolvedDicts -  | otherwise = return Nothing+       ; mb_stuff <- runMaybeT $ try_solve_from_instance loc_w+                                   (ev_binds, solved_dicts) ev_w++       ; case mb_stuff of+           Nothing -> return False+           Just (ev_binds', solved_dicts')+              -> do { setTcEvBindsMap ev_binds_var ev_binds'+                    ; setSolvedDicts solved_dicts'+                    ; return True } }++  | otherwise+  = return False   where     -- This `CtLoc` is used only to check the well-staged condition of any     -- candidate DFun. Our subgoals all have the same stage as our root     -- [W] constraint so it is safe to use this while solving them.     loc_w = ctEvLoc ev_w -    -- Use a local cache of solved dicts while emitting EvVars for new work-    -- We bail out of the entire computation if we need to emit an EvVar for-    -- a subgoal that isn't a ClassPred.-    new_wanted_cached :: DictMap CtEvidence -> TcPredType -> MaybeT TcS MaybeNew-    new_wanted_cached cache pty-      | ClassPred cls tys <- classifyPredType pty-      = lift $ case findDict cache loc_w cls tys of-          Just ctev -> return $ Cached (ctEvTerm ctev)-          Nothing -> Fresh <$> newWantedNC loc_w pty-      | otherwise = mzero--    -- MaybeT manages early failure if we find a subgoal that cannot be solved-    -- from instances.-    -- Why do we need a local cache here?-    -- 1. We can't use the global cache because it contains givens that-    --    we specifically don't want to use to solve.-    -- 2. We need to be able to handle recursive super classes. The-    --    cache ensures that we remember what we have already tried to-    --    solve to avoid looping.-    try_solve_from_instance-      :: CtLoc -> DictMap CtEvidence -> CtEvidence-      -> MaybeT TcS [(EvTerm, CtEvidence, Class, [TcPredType])]-    try_solve_from_instance loc cache ev+    try_solve_from_instance   -- See Note [Shortcut try_solve_from_instance]+      :: CtLoc -> (EvBindMap, DictMap CtEvidence) -> CtEvidence+      -> MaybeT TcS (EvBindMap, DictMap CtEvidence)+    try_solve_from_instance loc (ev_binds, solved_dicts) ev       | let pred = ctEvPred ev       , ClassPred cls tys <- classifyPredType pred-      -- It is important that we add our goal to the cache before we solve!-      -- Otherwise we may end up in a loop while solving recursive dictionaries.-      = do { let cache' = addDict cache cls tys ev-                 loc'   = bumpCtLocDepth loc-           ; inst_res <- lift $ match_class_inst dflags True cls tys loc_w+      = do { inst_res <- lift $ matchGlobalInst dflags True cls tys loc_w            ; case inst_res of-               GenInst { lir_new_theta = preds+               OneInst { lir_new_theta = preds                        , lir_mk_ev = mk_ev                        , lir_safe_over = safeOverlap }                  | safeOverlap                  , all isTyFamFree preds  -- Note [Shortcut solving: type families]-                 -> do { lift $ traceTcS "shortCutSolver: found instance" (ppr preds)+                 -> do { let solved_dicts' = addDict solved_dicts cls tys ev+                             loc'          = bumpCtLocDepth loc+                             -- solved_dicts': it is important that we add our goal+                             -- to the cache before we solve! Otherwise we may end+                             -- up in a loop while solving recursive dictionaries.++                       ; lift $ traceTcS "shortCutSolver: found instance" (ppr preds)                        ; lift $ checkReductionDepth loc' pred-                       ; evc_vs <- mapM (new_wanted_cached cache') preds++                       ; evc_vs <- mapM (new_wanted_cached solved_dicts') preds                                   -- Emit work for subgoals but use our local cache                                   -- so we can solve recursive dictionaries.-                       ; subgoalBinds <- mapM (try_solve_from_instance loc' cache')-                                              (freshGoals evc_vs)-                       ; return $ (mk_ev (map getEvTerm evc_vs), ev, cls, preds)-                                : concat subgoalBinds } -                 | otherwise -> mzero+                       ; let ev_tm     = mk_ev (map getEvExpr evc_vs)+                             ev_binds' = extendEvBinds ev_binds $+                                         mkWantedEvBind (ctEvEvId ev) ev_tm++                       ; foldlM (try_solve_from_instance loc')+                                (ev_binds', solved_dicts')+                                (freshGoals evc_vs) }+                _ -> mzero }       | otherwise = mzero ++    -- Use a local cache of solved dicts while emitting EvVars for new work+    -- We bail out of the entire computation if we need to emit an EvVar for+    -- a subgoal that isn't a ClassPred.+    new_wanted_cached :: DictMap CtEvidence -> TcPredType -> MaybeT TcS MaybeNew+    new_wanted_cached cache pty+      | ClassPred cls tys <- classifyPredType pty+      = lift $ case findDict cache loc_w cls tys of+          Just ctev -> return $ Cached (ctEvExpr ctev)+          Nothing -> Fresh <$> newWantedNC loc_w pty+      | otherwise = mzero+ addFunDepWork :: InertCans -> CtEvidence -> Class -> TcS () -- Add derived constraints from type-class functional dependencies. addFunDepWork inerts work_ev cls@@ -1116,12 +1186,19 @@      add_fds inert_ct       | isImprovable inert_ev-      = emitFunDepDeriveds $+      = do { traceTcS "addFunDepWork" (vcat+                [ ppr work_ev+                , pprCtLoc work_loc, ppr (isGivenLoc work_loc)+                , pprCtLoc inert_loc, ppr (isGivenLoc inert_loc)+                , pprCtLoc derived_loc, ppr (isGivenLoc derived_loc) ]) ;++        emitFunDepDeriveds $         improveFromAnother derived_loc inert_pred work_pred                -- We don't really rewrite tys2, see below _rewritten_tys2, so that's ok                -- NB: We do create FDs for given to report insoluble equations that arise                -- from pairs of Givens, and also because of floating when we approximate                -- implications. The relevant test is: typecheck/should_fail/FDsFromGivens.hs+        }       | otherwise       = return ()       where@@ -1354,26 +1431,9 @@            -> CtEvidence -> TcTyVar    -- Solve this :: F args2 ~ fsk2            -> TcS () reactFunEq from_this fsk1 solve_this fsk2-  | CtGiven { ctev_evar = evar, ctev_loc = loc } <- solve_this-  = do { let fsk_eq_co = mkTcSymCo (mkTcCoVarCo evar) `mkTcTransCo`-                         ctEvCoercion from_this-                         -- :: fsk2 ~ fsk1-             fsk_eq_pred = mkTcEqPredLikeEv solve_this-                             (mkTyVarTy fsk2) (mkTyVarTy fsk1)--       ; new_ev <- newGivenEvVar loc (fsk_eq_pred, EvCoercion fsk_eq_co)-       ; emitWorkNC [new_ev] }--  | CtDerived { ctev_loc = loc } <- solve_this-  = do { traceTcS "reactFunEq (Derived)" (ppr from_this $$ ppr fsk1 $$-                                          ppr solve_this $$ ppr fsk2)-       ; emitNewDerivedEq loc Nominal (mkTyVarTy fsk1) (mkTyVarTy fsk2) }-              -- FunEqs are always at Nominal role--  | otherwise  -- Wanted-  = do { traceTcS "reactFunEq" (ppr from_this $$ ppr fsk1 $$-                                ppr solve_this $$ ppr fsk2)-       ; dischargeFmv solve_this fsk2 (ctEvCoercion from_this) (mkTyVarTy fsk1)+  = do { traceTcS "reactFunEq"+            (vcat [ppr from_this, ppr fsk1, ppr solve_this, ppr fsk2])+       ; dischargeFunEq solve_this fsk2 (ctEvCoercion from_this) (mkTyVarTy fsk1)        ; traceTcS "reactFunEq done" (ppr from_this $$ ppr fsk1 $$                                      ppr solve_this $$ ppr fsk2) } @@ -1549,7 +1609,7 @@   | Just (ev_i, swapped, keep_deriv)        <- inertsCanDischarge inerts tv rhs (ctEvFlavour ev, eq_rel)   = do { setEvBindIfWanted ev $-         EvCoercion (maybeSym swapped $+         evCoercion (maybeSym swapped $                      tcDowngradeRole (eqRelRole eq_rel)                                      (ctEvRole ev_i)                                      (ctEvCoercion ev_i))@@ -1563,31 +1623,20 @@         ; stopWith ev "Solved from inert" } -  | ReprEq <- eq_rel   -- We never solve representational-  = unsolved_inert     -- equalities by unification+  | ReprEq <- eq_rel   -- See Note [Do not unify representational equalities]+  = continueWith workItem    | isGiven ev         -- See Note [Touchables and givens]-  = unsolved_inert+  = continueWith workItem    | otherwise   = do { tclvl <- getTcLevel        ; if canSolveByUnification tclvl tv rhs          then do { solveByUnification ev tv rhs                  ; n_kicked <- kickOutAfterUnification tv-                 ; return (Stop ev (text "Solved by unification" <+> ppr_kicked n_kicked)) }--         else unsolved_inert }+                 ; return (Stop ev (text "Solved by unification" <+> pprKicked n_kicked)) } -  where-    unsolved_inert-      = do { traceTcS "Can't solve tyvar equality"-                (vcat [ text "LHS:" <+> ppr tv <+> dcolon <+> ppr (tyVarKind tv)-                      , ppWhen (isMetaTyVar tv) $-                        nest 4 (text "TcLevel of" <+> ppr tv-                                <+> text "is" <+> ppr (metaTyVarTcLevel tv))-                      , text "RHS:" <+> ppr rhs <+> dcolon <+> ppr (typeKind rhs) ])-           ; addInertEq workItem-           ; stopWith ev "Kept as inert" }+         else continueWith workItem }  interactTyVarEq _ wi = pprPanic "interactTyVarEq" (ppr wi) @@ -1615,11 +1664,7 @@                              text "Right Kind is:" <+> ppr (typeKind xi) ]         ; unifyTyVar tv xi-       ; setEvBindIfWanted wd (EvCoercion (mkTcNomReflCo xi)) }--ppr_kicked :: Int -> SDoc-ppr_kicked 0 = empty-ppr_kicked n = parens (int n <+> text "kicked out")+       ; setEvBindIfWanted wd (evCoercion (mkTcNomReflCo xi)) }  {- Note [Avoid double unifications] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1639,7 +1684,23 @@ double unifications is the main reason we disallow touchable unification variables as RHS of type family equations: F xis ~ alpha. +Note [Do not unify representational equalities]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider   [W] alpha ~R# b+where alpha is touchable. Should we unify alpha := b? +Certainly not!  Unifying forces alpha and be to be the same; but they+only need to be representationally equal types.++For example, we might have another constraint [W] alpha ~# N b+where+  newtype N b = MkN b+and we want to get alpha := N b.++See also Trac #15144, which was caused by unifying a representational+equality (in the unflattener).++ ************************************************************************ *                                                                      * *          Functional dependencies, instantiation of equations@@ -1738,10 +1799,10 @@   where     do_one_FDEqn (FDEqn { fd_qtvs = tvs, fd_eqs = eqs, fd_loc = loc })      | null tvs  -- Common shortcut-     = do { traceTcS "emitFunDepDeriveds 1" (ppr (ctl_depth loc) $$ ppr eqs)+     = do { traceTcS "emitFunDepDeriveds 1" (ppr (ctl_depth loc) $$ ppr eqs $$ ppr (isGivenLoc loc))           ; mapM_ (unifyDerived loc Nominal) eqs }      | otherwise-     = do { traceTcS "emitFunDepDeriveds 2" (ppr (ctl_depth loc) $$ ppr eqs)+     = do { traceTcS "emitFunDepDeriveds 2" (ppr (ctl_depth loc) $$ ppr tvs $$ ppr eqs)           ; subst <- instFlexi tvs  -- Takes account of kind substitution           ; mapM_ (do_one_eq loc subst) eqs } @@ -1758,31 +1819,33 @@ -}  topReactionsStage :: WorkItem -> TcS (StopOrContinue Ct)-topReactionsStage wi- = do { tir <- doTopReact wi-      ; case tir of-          ContinueWith wi -> continueWith wi-          Stop ev s       -> return (Stop ev (text "Top react:" <+> s)) }--doTopReact :: WorkItem -> TcS (StopOrContinue Ct)--- The work item does not react with the inert set, so try interaction with top-level--- instances. Note:------   (a) The place to add superclasses in not here in doTopReact stage.---       Instead superclasses are added in the worklist as part of the---       canonicalization process. See Note [Adding superclasses].--doTopReact work_item+-- The work item does not react with the inert set,+-- so try interaction with top-level instances. Note:+topReactionsStage work_item   = do { traceTcS "doTopReact" (ppr work_item)        ; case work_item of            CDictCan {}  -> do { inerts <- getTcSInerts                               ; doTopReactDict inerts work_item }            CFunEqCan {} -> doTopReactFunEq work_item+           CIrredCan {} -> doTopReactOther work_item+           CTyEqCan {}  -> doTopReactOther work_item            _  -> -- Any other work item does not react with any top-level equations                  continueWith work_item  }   --------------------+doTopReactOther :: Ct -> TcS (StopOrContinue Ct)+doTopReactOther work_item+  = do { -- Try local quantified constraints+         res <- matchLocalInst pred (ctEvLoc ev)+       ; case res of+           OneInst {} -> chooseInstance work_item res+           _          -> continueWith work_item }+  where+    ev = ctEvidence work_item+    pred = ctEvPred ev++-------------------- doTopReactFunEq :: Ct -> TcS (StopOrContinue Ct) doTopReactFunEq work_item@(CFunEqCan { cc_ev = old_ev, cc_fun = fam_tc                                      , cc_tyargs = args, cc_fsk = fsk })@@ -1808,40 +1871,25 @@                   -> TcS (StopOrContinue Ct) -- We have found an applicable top-level axiom: use it to reduce -- Precondition: fsk is not free in rhs_ty---               old_ev is not Derived reduce_top_fun_eq old_ev fsk (ax_co, rhs_ty)-  | isDerived old_ev-  = do { emitNewDerivedEq loc Nominal (mkTyVarTy fsk) rhs_ty-       ; stopWith old_ev "Fun/Top (derived)" }--  | Just (tc, tc_args) <- tcSplitTyConApp_maybe rhs_ty+  | not (isDerived old_ev)  -- Precondition of shortCutReduction+  , Just (tc, tc_args) <- tcSplitTyConApp_maybe rhs_ty   , isTypeFamilyTyCon tc   , tc_args `lengthIs` tyConArity tc    -- Short-cut   = -- RHS is another type-family application     -- Try shortcut; see Note [Top-level reductions for type functions]-    shortCutReduction old_ev fsk ax_co tc tc_args--  | isGiven old_ev  -- Not shortcut-  = do { let final_co = mkTcSymCo (ctEvCoercion old_ev) `mkTcTransCo` ax_co-              -- final_co :: fsk ~ rhs_ty-       ; new_ev <- newGivenEvVar deeper_loc (mkPrimEqPred (mkTyVarTy fsk) rhs_ty,-                                             EvCoercion final_co)-       ; emitWorkNC [new_ev] -- Non-cannonical; that will mean we flatten rhs_ty-       ; stopWith old_ev "Fun/Top (given)" }+    do { shortCutReduction old_ev fsk ax_co tc tc_args+       ; stopWith old_ev "Fun/Top (shortcut)" } -  | otherwise   -- So old_ev is Wanted (cannot be Derived)+  | otherwise   = ASSERT2( not (fsk `elemVarSet` tyCoVarsOfType rhs_ty)            , ppr old_ev $$ ppr rhs_ty )            -- Guaranteed by Note [FunEq occurs-check principle]-    do { dischargeFmv old_ev fsk ax_co rhs_ty+    do { dischargeFunEq old_ev fsk ax_co rhs_ty        ; traceTcS "doTopReactFunEq" $          vcat [ text "old_ev:" <+> ppr old_ev               , nest 2 (text ":=") <+> ppr ax_co ]-       ; stopWith old_ev "Fun/Top (wanted)" }--  where-    loc = ctEvLoc old_ev-    deeper_loc = bumpCtLocDepth loc+       ; stopWith old_ev "Fun/Top" }  improveTopFunEqs :: CtEvidence -> TyCon -> [TcType] -> TcTyVar -> TcS () -- See Note [FunDep and implicit parameter reactions]@@ -1936,61 +1984,35 @@   shortCutReduction :: CtEvidence -> TcTyVar -> TcCoercion-                  -> TyCon -> [TcType] -> TcS (StopOrContinue Ct)+                  -> TyCon -> [TcType] -> TcS () -- See Note [Top-level reductions for type functions]+-- Previously, we flattened the tc_args here, but there's no need to do so.+-- And, if we did, this function would have all the complication of+-- TcCanonical.canCFunEqCan. See Note [canCFunEqCan] shortCutReduction old_ev fsk ax_co fam_tc tc_args   = ASSERT( ctEvEqRel old_ev == NomEq)-    do { (xis, cos) <- flattenManyNom old_ev tc_args                -- ax_co :: F args ~ G tc_args-               -- cos   :: xis ~ tc_args                -- old_ev :: F args ~ fsk-               -- G cos ; sym ax_co ; old_ev :: G xis ~ fsk--       ; new_ev <- case ctEvFlavour old_ev of+    do { new_ev <- case ctEvFlavour old_ev of            Given -> newGivenEvVar deeper_loc-                         ( mkPrimEqPred (mkTyConApp fam_tc xis) (mkTyVarTy fsk)-                         , EvCoercion (mkTcTyConAppCo Nominal fam_tc cos-                                        `mkTcTransCo` mkTcSymCo ax_co-                                        `mkTcTransCo` ctEvCoercion old_ev) )+                         ( mkPrimEqPred (mkTyConApp fam_tc tc_args) (mkTyVarTy fsk)+                         , evCoercion (mkTcSymCo ax_co+                                       `mkTcTransCo` ctEvCoercion old_ev) )             Wanted {} ->              do { (new_ev, new_co) <- newWantedEq deeper_loc Nominal-                                        (mkTyConApp fam_tc xis) (mkTyVarTy fsk)-                ; setWantedEq (ctev_dest old_ev) $-                     ax_co `mkTcTransCo` mkTcSymCo (mkTcTyConAppCo Nominal-                                                      fam_tc cos)-                           `mkTcTransCo` new_co+                                        (mkTyConApp fam_tc tc_args) (mkTyVarTy fsk)+                ; setWantedEq (ctev_dest old_ev) $ ax_co `mkTcTransCo` new_co                 ; return new_ev }             Derived -> pprPanic "shortCutReduction" (ppr old_ev)         ; let new_ct = CFunEqCan { cc_ev = new_ev, cc_fun = fam_tc-                                , cc_tyargs = xis, cc_fsk = fsk }-       ; updWorkListTcS (extendWorkListFunEq new_ct)-       ; stopWith old_ev "Fun/Top (shortcut)" }+                                , cc_tyargs = tc_args, cc_fsk = fsk }+       ; updWorkListTcS (extendWorkListFunEq new_ct) }   where     deeper_loc = bumpCtLocDepth (ctEvLoc old_ev) -dischargeFmv :: CtEvidence -> TcTyVar -> TcCoercion -> TcType -> TcS ()--- (dischargeFmv x fmv co ty)---     [W] ev :: F tys ~ fmv---         co :: F tys ~ xi--- Precondition: fmv is not filled, and fmv `notElem` xi---               ev is Wanted------ Then set fmv := xi,---      set ev  := co---      kick out any inert things that are now rewritable------ Does not evaluate 'co' if 'ev' is Derived-dischargeFmv ev@(CtWanted { ctev_dest = dest }) fmv co xi-  = ASSERT2( not (fmv `elemVarSet` tyCoVarsOfType xi), ppr ev $$ ppr fmv $$ ppr xi )-    do { setWantedEvTerm dest (EvCoercion co)-       ; unflattenFmv fmv xi-       ; n_kicked <- kickOutAfterUnification fmv-       ; traceTcS "dischargeFmv" (ppr fmv <+> equals <+> ppr xi $$ ppr_kicked n_kicked) }-dischargeFmv ev _ _ _ = pprPanic "dischargeFmv" (ppr ev)- {- Note [Top-level reductions for type functions] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ c.f. Note [The flattening story] in TcFlatten@@ -2195,54 +2217,87 @@  doTopReactDict :: InertSet -> Ct -> TcS (StopOrContinue Ct) -- Try to use type-class instance declarations to simplify the constraint-doTopReactDict inerts work_item@(CDictCan { cc_ev = fl, cc_class = cls+doTopReactDict inerts work_item@(CDictCan { cc_ev = ev, cc_class = cls                                           , cc_tyargs = xis })-  | isGiven fl   -- Never use instances for Given constraints+  | isGiven ev   -- Never use instances for Given constraints   = do { try_fundep_improvement        ; continueWith work_item } -  | Just ev <- lookupSolvedDict inerts dict_loc cls xis   -- Cached-  = do { setEvBindIfWanted fl (ctEvTerm ev)-       ; stopWith fl "Dict/Top (cached)" }+  | Just solved_ev <- lookupSolvedDict inerts dict_loc cls xis   -- Cached+  = do { setEvBindIfWanted ev (ctEvTerm solved_ev)+       ; stopWith ev "Dict/Top (cached)" }    | otherwise  -- Wanted or Derived, but not cached    = do { dflags <- getDynFlags-        ; lkup_inst_res <- matchClassInst dflags inerts cls xis dict_loc-        ; case lkup_inst_res of-               GenInst { lir_new_theta = theta-                       , lir_mk_ev     = mk_ev-                       , lir_safe_over = s } ->-                 do { traceTcS "doTopReact/found instance for" $ ppr fl-                    ; checkReductionDepth deeper_loc dict_pred-                    ; unless s $ insertSafeOverlapFailureTcS work_item-                    ; if isDerived fl then finish_derived theta-                                      else finish_wanted  theta mk_ev }-               NoInstance ->-                 do { when (isImprovable fl) $-                      try_fundep_improvement-                    ; continueWith work_item } }+        ; lkup_res <- matchClassInst dflags inerts cls xis dict_loc+        ; case lkup_res of+               OneInst { lir_safe_over = s }+                  -> do { unless s $ insertSafeOverlapFailureTcS work_item+                        ; when (isWanted ev) $ addSolvedDict ev cls xis+                        ; chooseInstance work_item lkup_res }+               _  ->  -- NoInstance or NotSure+                     do { when (isImprovable ev) $+                          try_fundep_improvement+                        ; continueWith work_item } }    where      dict_pred   = mkClassPred cls xis-     dict_loc    = ctEvLoc fl+     dict_loc    = ctEvLoc ev      dict_origin = ctLocOrigin dict_loc-     deeper_loc  = zap_origin (bumpCtLocDepth dict_loc) +     -- We didn't solve it; so try functional dependencies with+     -- the instance environment, and return+     -- See also Note [Weird fundeps]+     try_fundep_improvement+        = do { traceTcS "try_fundeps" (ppr work_item)+             ; instEnvs <- getInstEnvs+             ; emitFunDepDeriveds $+               improveFromInstEnv instEnvs mk_ct_loc dict_pred }++     mk_ct_loc :: PredType   -- From instance decl+               -> SrcSpan    -- also from instance deol+               -> CtLoc+     mk_ct_loc inst_pred inst_loc+       = dict_loc { ctl_origin = FunDepOrigin2 dict_pred dict_origin+                                               inst_pred inst_loc }++doTopReactDict _ w = pprPanic "doTopReactDict" (ppr w)+++chooseInstance :: Ct -> LookupInstResult -> TcS (StopOrContinue Ct)+chooseInstance work_item+               (OneInst { lir_new_theta = theta+                        , lir_mk_ev     = mk_ev })+  = do { traceTcS "doTopReact/found instance for" $ ppr ev+       ; checkReductionDepth deeper_loc pred+       ; if isDerived ev then finish_derived theta+                         else finish_wanted  theta mk_ev }+  where+     ev         = ctEvidence work_item+     pred       = ctEvPred ev+     loc        = ctEvLoc ev+     origin     = ctLocOrigin loc+     deeper_loc = zap_origin (bumpCtLocDepth loc)+      zap_origin loc  -- After applying an instance we can set ScOrigin to                      -- infinity, so that prohibitedSuperClassSolve never fires-       | ScOrigin {} <- dict_origin+       | ScOrigin {} <- origin        = setCtLocOrigin loc (ScOrigin infinity)        | otherwise        = loc       finish_wanted :: [TcPredType]-                   -> ([EvTerm] -> EvTerm) -> TcS (StopOrContinue Ct)+                   -> ([EvExpr] -> EvTerm) -> TcS (StopOrContinue Ct)       -- Precondition: evidence term matches the predicate workItem      finish_wanted theta mk_ev-        = do { addSolvedDict fl cls xis-             ; evc_vars <- mapM (newWanted deeper_loc) theta-             ; setWantedEvBind (ctEvEvId fl) (mk_ev (map getEvTerm evc_vars))+        = do { evb <- getTcEvBindsVar+             ; if isNoEvBindsVar evb+               then -- See Note [Instances in no-evidence implications]+                    continueWith work_item+               else+          do { evc_vars <- mapM (newWanted deeper_loc) theta+             ; setEvBindIfWanted ev (mk_ev (map getEvExpr evc_vars))              ; emitWorkNC (freshGoals evc_vars)-             ; stopWith fl "Dict/Top (solved wanted)" }+             ; stopWith ev "Dict/Top (solved wanted)" } }       finish_derived theta  -- Use type-class instances for Deriveds, in the hope        =                   -- of generating some improvements@@ -2250,27 +2305,31 @@                            -- It's easy because no evidence is involved          do { emitNewDeriveds deeper_loc theta             ; traceTcS "finish_derived" (ppr (ctl_depth deeper_loc))-            ; stopWith fl "Dict/Top (solved derived)" }+            ; stopWith ev "Dict/Top (solved derived)" } -     -- We didn't solve it; so try functional dependencies with-     -- the instance environment, and return-     -- See also Note [Weird fundeps]-     try_fundep_improvement-        = do { traceTcS "try_fundeps" (ppr work_item)-             ; instEnvs <- getInstEnvs-             ; emitFunDepDeriveds $-               improveFromInstEnv instEnvs mk_ct_loc dict_pred }+chooseInstance work_item lookup_res+  = pprPanic "chooseInstance" (ppr work_item $$ ppr lookup_res) -     mk_ct_loc :: PredType   -- From instance decl-               -> SrcSpan    -- also from instance deol-               -> CtLoc-     mk_ct_loc inst_pred inst_loc-       = dict_loc { ctl_origin = FunDepOrigin2 dict_pred dict_origin-                                               inst_pred inst_loc }+{- Note [Instances in no-evidence implications]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In Trac #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#+                        m (Int, StateT Int m a) -doTopReactDict _ w = pprPanic "doTopReactDict" (ppr w)+The Given is an ordinary quantified constraint; the Wanted is an implication+equality that arises from+  [W] (forall a. t1) ~R# (forall a. t2) +But because the (t1 ~R# t2) is solved "inside a type" (under that forall a)+we can't generate any term evidence.  So we can't actually use that+lovely quantified constraint.  Alas! +This test arranges to ignore the instance-based solution under these+(rare) circumstances.   It's sad, but I  really don't see what else we can do.+-}+ {- ******************************************************************* *                                                                    *                        Class lookup@@ -2285,24 +2344,31 @@ type SafeOverlapping = Bool  data LookupInstResult-  = NoInstance-  | GenInst { lir_new_theta :: [TcPredType]-            , lir_mk_ev     :: [EvTerm] -> EvTerm+  = NoInstance   -- Definitely no instance++  | OneInst { lir_new_theta :: [TcPredType]+            , lir_mk_ev     :: [EvExpr] -> EvTerm             , lir_safe_over :: SafeOverlapping } +  | NotSure      -- Multiple matches and/or one or more unifiers+ instance Outputable LookupInstResult where   ppr NoInstance = text "NoInstance"-  ppr (GenInst { lir_new_theta = ev+  ppr NotSure    = text "NotSure"+  ppr (OneInst { lir_new_theta = ev                , lir_safe_over = s })-    = text "GenInst" <+> vcat [ppr ev, ss]+    = text "OneInst" <+> vcat [ppr ev, ss]     where ss = text $ if s then "[safe]" else "[unsafe]"  -matchClassInst :: DynFlags -> InertSet -> Class -> [Type] -> CtLoc -> TcS LookupInstResult+matchClassInst :: DynFlags -> InertSet+               -> Class -> [Type]+               -> CtLoc -> TcS LookupInstResult matchClassInst dflags inerts clas tys loc -- First check whether there is an in-scope Given that could--- match this constraint.  In that case, do not use top-level--- instances.  See Note [Instance and Given overlap]+-- match this constraint.  In that case, do not use any instance+-- whether top level, or local quantified constraints.+-- ee Note [Instance and Given overlap]   | not (xopt LangExt.IncoherentInstances dflags)   , not (naturallyCoherentClass clas)   , let matchable_givens = matchableGivens loc pred inerts@@ -2310,21 +2376,33 @@   = do { traceTcS "Delaying instance application" $            vcat [ text "Work item=" <+> pprClassPred clas tys                 , text "Potential matching givens:" <+> ppr matchable_givens ]-       ; return NoInstance }-  where-     pred = mkClassPred clas tys+       ; return NotSure } -matchClassInst dflags _ clas tys loc- = do { traceTcS "matchClassInst" $ text "pred =" <+> ppr (mkClassPred clas tys) <+> char '{'-      ; res <- match_class_inst dflags False clas tys loc-      ; traceTcS "} matchClassInst result" $ ppr res-      ; return res }+  | otherwise+  = do { traceTcS "matchClassInst" $ text "pred =" <+> ppr pred <+> char '{'+       ; local_res <- matchLocalInst pred loc+       ; case local_res of+           OneInst {} ->  -- See Note [Local instances and incoherence]+                do { traceTcS "} matchClassInst local match" $ ppr local_res+                   ; return local_res } -match_class_inst :: DynFlags-                 -> Bool      -- True <=> caller is the short-cut solver-                              -- See Note [Shortcut solving: overlap]-                 -> Class -> [Type] -> CtLoc -> TcS LookupInstResult-match_class_inst dflags short_cut clas tys loc+           NotSure -> -- In the NotSure case for local instances+                      -- we don't want to try global instances+                do { traceTcS "} matchClassInst local not sure" empty+                   ; return local_res }++           NoInstance  -- No local instances, so try global ones+              -> do { global_res <- matchGlobalInst dflags False clas tys loc+                    ; traceTcS "} matchClassInst global result" $ ppr global_res+                    ; return global_res } }+  where+    pred = mkClassPred clas tys++matchGlobalInst :: DynFlags+                -> Bool      -- True <=> caller is the short-cut solver+                             -- See Note [Shortcut solving: overlap]+                -> Class -> [Type] -> CtLoc -> TcS LookupInstResult+matchGlobalInst dflags short_cut clas tys loc   | cls_name == knownNatClassName     = matchKnownNat        clas tys   | cls_name == knownSymbolClassName  = matchKnownSymbol     clas tys   | isCTupleClass clas                = matchCTuple          clas tys@@ -2347,6 +2425,7 @@     || cls `hasKey` eqTyConKey     || cls `hasKey` coercibleTyConKey + {- Note [Instance and Given overlap] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example, from the OutsideIn(X) paper:@@ -2473,66 +2552,130 @@  PS: the term "naturally coherent" doesn't really seem helpful. Perhaps "invertible" or something?  I left it for now though.++Note [Local instances and incoherence]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+   f :: forall b c. (Eq b, forall a. Eq a => Eq (c a))+                 => c b -> Bool+   f x = x==x++We get [W] Eq (c b), and we must use the local instance to solve it.++BUT that wanted also unifies with the top-level Eq [a] instance,+and Eq (Maybe a) etc.  We want the local instance to "win", otherwise+we can't solve the wanted at all.  So we mark it as Incohherent.+According to Note [Rules for instance lookup] in InstEnv, that'll+make it win even if there are other instances that unify.++Moreover this is not a hack!  The evidence for this local instance+will be constructed by GHC at a call site... from the very instances+that unify with it here.  It is not like an incoherent user-written+instance which might have utterly different behaviour.++Consdider  f :: Eq a => blah.  If we have [W] Eq a, we certainly+get it from the Eq a context, without worrying that there are+lots of top-level instances that unify with [W] Eq a!  We'll use+those instances to build evidence to pass to f. That's just the+nullary case of what's happening here. -} +matchLocalInst :: TcPredType -> CtLoc -> TcS LookupInstResult+-- Try any Given quantified constraints, which are+-- effectively just local instance declarations.+matchLocalInst pred loc+  = do { ics <- getInertCans+       ; case match_local_inst (inert_insts ics) of+           ([], False) -> return NoInstance+           ([(dfun_ev, inst_tys)], unifs)+             | not unifs+             -> match_one pred loc True (ctEvEvId dfun_ev) inst_tys+           _ -> return NotSure }+  where+    pred_tv_set = tyCoVarsOfType pred -{- *******************************************************************-*                                                                    *-                Class lookup in the instance environment-*                                                                    *-**********************************************************************-}+    match_local_inst :: [QCInst]+                     -> ( [(CtEvidence, [DFunInstType])]+                        , Bool )      -- True <=> Some unify but do not match+    match_local_inst []+      = ([], False)+    match_local_inst (qci@(QCI { qci_tvs = qtvs, qci_pred = qpred+                               , qci_ev = ev })+                     : qcis)+      | let in_scope = mkInScopeSet (qtv_set `unionVarSet` pred_tv_set)+      , Just tv_subst <- ruleMatchTyKiX qtv_set (mkRnEnv2 in_scope)+                                        emptyTvSubstEnv qpred pred+      , let match = (ev, map (lookupVarEnv tv_subst) qtvs)+      = (match:matches, unif) +      | otherwise+      = ASSERT2( disjointVarSet qtv_set (tyCoVarsOfType pred)+               , ppr qci $$ ppr pred )+            -- ASSERT: unification relies on the+            -- quantified variables being fresh+        (matches, unif || this_unif)+      where+        qtv_set = mkVarSet qtvs+        this_unif = mightMatchLater qpred (ctEvLoc ev) pred loc+        (matches, unif) = match_local_inst qcis+ matchInstEnv :: DynFlags -> Bool -> Class -> [Type] -> CtLoc -> TcS LookupInstResult matchInstEnv dflags short_cut_solver clas tys loc    = do { instEnvs <- getInstEnvs         ; let safeOverlapCheck = safeHaskell dflags `elem` [Sf_Safe, Sf_Trustworthy]               (matches, unify, unsafeOverlaps) = lookupInstEnv True instEnvs clas tys               safeHaskFail = safeOverlapCheck && not (null unsafeOverlaps)+        ; traceTcS "matchInstEnv" $+            vcat [ text "goal:" <+> ppr clas <+> ppr tys+                 , text "matches:" <+> ppr matches+                 , text "unify:" <+> ppr unify ]         ; case (matches, unify, safeHaskFail) of              -- Nothing matches-            ([], _, _)+            ([], [], _)                 -> do { traceTcS "matchClass not matching" (ppr pred)                       ; return NoInstance }              -- A single match (& no safe haskell failure)             ([(ispec, inst_tys)], [], False)-                | short_cut_solver+                | short_cut_solver      -- Called from the short-cut solver                 , isOverlappable ispec-                -- If the instance has OVERLAPPABLE or OVERLAPS then-                -- don't let the short-cut solver choose it, because a+                -- 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                 -- See Note [Shortcut solving: overlap]-                -> do { traceTcS "matchClass: ingnoring overlappable" (ppr pred)-                      ; return NoInstance }+                -> do { traceTcS "matchClass: ignoring overlappable" (ppr pred)+                      ; return NotSure }                  | otherwise-                -> do   { let dfun_id = instanceDFunId ispec-                        ; traceTcS "matchClass success" $-                          vcat [text "dict" <+> ppr pred,-                                text "witness" <+> ppr dfun_id-                                               <+> ppr (idType dfun_id) ]-                                  -- Record that this dfun is needed-                        ; match_one (null unsafeOverlaps) dfun_id inst_tys }+                -> do { let dfun_id = instanceDFunId ispec+                      ; traceTcS "matchClass success" $+                        vcat [text "dict" <+> ppr pred,+                              text "witness" <+> ppr dfun_id+                                             <+> ppr (idType dfun_id) ]+                                -- Record that this dfun is needed+                      ; match_one pred loc (null unsafeOverlaps) dfun_id inst_tys }              -- More than one matches (or Safe Haskell fail!). Defer any             -- reactions of a multitude until we learn more about the reagent-            (matches, _, _)-                -> do   { traceTcS "matchClass multiple matches, deferring choice" $-                          vcat [text "dict" <+> ppr pred,-                                text "matches" <+> ppr matches]-                        ; return NoInstance } }+            _   -> do { traceTcS "matchClass multiple matches, deferring choice" $+                        vcat [text "dict" <+> ppr pred,+                              text "matches" <+> ppr matches]+                      ; return NotSure } }    where      pred = mkClassPred clas tys -     match_one :: SafeOverlapping -> DFunId -> [DFunInstType] -> TcS LookupInstResult-                  -- See Note [DFunInstType: instantiating types] in InstEnv-     match_one so dfun_id mb_inst_tys-       = do { checkWellStagedDFun pred dfun_id loc-            ; (tys, theta) <- instDFunType dfun_id mb_inst_tys-            ; return $ GenInst { lir_new_theta = theta-                               , lir_mk_ev     = EvDFunApp dfun_id tys-                               , lir_safe_over = so } }+match_one :: TcPredType -> CtLoc -> SafeOverlapping+          -> DFunId -> [DFunInstType] -> TcS LookupInstResult+             -- See Note [DFunInstType: instantiating types] in InstEnv+match_one pred loc so dfun_id mb_inst_tys+  = do { traceTcS "match_one" (ppr dfun_id $$ ppr mb_inst_tys)+       ; checkWellStagedDFun pred dfun_id loc+       ; (tys, theta) <- instDFunType dfun_id mb_inst_tys+       ; traceTcS "match_one 2" (ppr dfun_id $$ ppr tys $$ ppr theta)+       ; return $ OneInst { lir_new_theta = theta+                          , lir_mk_ev     = evDFunApp dfun_id tys+                          , lir_safe_over = so } }   {- ********************************************************************@@ -2543,13 +2686,13 @@  matchCTuple :: Class -> [Type] -> TcS LookupInstResult matchCTuple clas tys   -- (isCTupleClass clas) holds-  = return (GenInst { lir_new_theta = tys+  = return (OneInst { lir_new_theta = tys                     , lir_mk_ev     = tuple_ev                     , lir_safe_over = True })             -- The dfun *is* the data constructor!   where      data_con = tyConSingleDataCon (classTyCon clas)-     tuple_ev = EvDFunApp (dataConWrapId data_con) tys+     tuple_ev = evDFunApp (dataConWrapId data_con) tys  {- ******************************************************************** *                                                                     *@@ -2557,17 +2700,70 @@ *                                                                     * ***********************************************************************-} +{-+Note [KnownNat & KnownSymbol and EvLit]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+A part of the type-level literals implementation are the classes+"KnownNat" and "KnownSymbol", which provide a "smart" constructor for+defining singleton values.  Here is the key stuff from GHC.TypeLits++  class KnownNat (n :: Nat) where+    natSing :: SNat n++  newtype SNat (n :: Nat) = SNat Integer++Conceptually, this class has infinitely many instances:++  instance KnownNat 0       where natSing = SNat 0+  instance KnownNat 1       where natSing = SNat 1+  instance KnownNat 2       where natSing = SNat 2+  ...++In practice, we solve `KnownNat` predicates in the type-checker+(see typecheck/TcInteract.hs) because we can't have infinitely many instances.+The evidence (aka "dictionary") for `KnownNat` is of the form `EvLit (EvNum n)`.++We make the following assumptions about dictionaries in GHC:+  1. The "dictionary" for classes with a single method---like `KnownNat`---is+     a newtype for the type of the method, so using a evidence amounts+     to a coercion, and+  2. Newtypes use the same representation as their definition types.++So, the evidence for `KnownNat` is just a value of the representation type,+wrapped in two newtype constructors: one to make it into a `SNat` value,+and another to make it into a `KnownNat` dictionary.++Also note that `natSing` and `SNat` are never actually exposed from the+library---they are just an implementation detail.  Instead, users see+a more convenient function, defined in terms of `natSing`:++  natVal :: KnownNat n => proxy n -> Integer++The reason we don't use this directly in the class is that it is simpler+and more efficient to pass around an integer rather than an entire function,+especially when the `KnowNat` evidence is packaged up in an existential.++The story for kind `Symbol` is analogous:+  * class KnownSymbol+  * newtype SSymbol+  * Evidence: a Core literal (e.g. mkNaturalExpr)+-}+ matchKnownNat :: Class -> [Type] -> TcS LookupInstResult matchKnownNat clas [ty]     -- clas = KnownNat-  | Just n <- isNumLitTy ty = makeLitDict clas ty (EvNum n)+  | Just n <- isNumLitTy ty = do+        et <- mkNaturalExpr n+        makeLitDict clas ty et matchKnownNat _ _           = return NoInstance  matchKnownSymbol :: Class -> [Type] -> TcS LookupInstResult matchKnownSymbol clas [ty]  -- clas = KnownSymbol-  | Just n <- isStrLitTy ty = makeLitDict clas ty (EvStr n)+  | Just s <- isStrLitTy ty = do+        et <- mkStringExprFS s+        makeLitDict clas ty et matchKnownSymbol _ _       = return NoInstance -makeLitDict :: Class -> Type -> EvLit -> TcS LookupInstResult+makeLitDict :: Class -> Type -> EvExpr -> TcS LookupInstResult -- makeLitDict adds a coercion that will convert the literal into a dictionary -- of the appropriate type.  See Note [KnownNat & KnownSymbol and EvLit] -- in TcEvidence.  The coercion happens in 2 steps:@@ -2578,7 +2774,7 @@ --     The process is mirrored for Symbols: --     String    -> SSymbol n --     SSymbol n -> KnownSymbol n-makeLitDict clas ty evLit+makeLitDict clas ty et     | Just (_, co_dict) <- tcInstNewTyCon_maybe (classTyCon clas) [ty]           -- co_dict :: KnownNat n ~ SNat n     , [ meth ]   <- classMethods clas@@ -2588,8 +2784,8 @@                       $ idType meth         -- forall n. KnownNat n => SNat n     , Just (_, co_rep) <- tcInstNewTyCon_maybe tcRep [ty]           -- SNat n ~ Integer-    , let ev_tm = mkEvCast (EvLit evLit) (mkTcSymCo (mkTcTransCo co_dict co_rep))-    = return $ GenInst { lir_new_theta = []+    , let ev_tm = mkEvCast et (mkTcSymCo (mkTcTransCo co_dict co_rep))+    = return $ OneInst { lir_new_theta = []                        , lir_mk_ev     = \_ -> ev_tm                        , lir_safe_over = True } @@ -2614,7 +2810,7 @@   -- Now cases that do work   | k `eqType` typeNatKind                 = doTyLit knownNatClassName         t   | k `eqType` typeSymbolKind              = doTyLit knownSymbolClassName      t-  | isConstraintKind t                     = doTyConApp clas t constraintKindTyCon []+  | tcIsConstraintKind t                   = doTyConApp clas t constraintKindTyCon []   | Just (arg,ret) <- splitFunTy_maybe t   = doFunTy    clas t arg ret   | Just (tc, ks) <- splitTyConApp_maybe t -- See Note [Typeable (T a b c)]   , onlyNamedBndrsApplied tc ks            = doTyConApp clas t tc ks@@ -2625,21 +2821,29 @@ -- | Representation for a type @ty@ of the form @arg -> ret@. doFunTy :: Class -> Type -> Type -> Type -> TcS LookupInstResult doFunTy clas ty arg_ty ret_ty-  = do { let preds = map (mk_typeable_pred clas) [arg_ty, ret_ty]-             build_ev [arg_ev, ret_ev] =-                 EvTypeable ty $ EvTypeableTrFun arg_ev ret_ev-             build_ev _ = panic "TcInteract.doFunTy"-       ; return $ GenInst preds build_ev True-       }+  = return $ OneInst { lir_new_theta = preds+                     , lir_mk_ev     = mk_ev+                     , lir_safe_over = True }+  where+    preds = map (mk_typeable_pred clas) [arg_ty, ret_ty]+    mk_ev [arg_ev, ret_ev] = evTypeable ty $+                             EvTypeableTrFun (EvExpr arg_ev) (EvExpr ret_ev)+    mk_ev _ = panic "TcInteract.doFunTy" + -- | Representation for type constructor applied to some kinds. -- 'onlyNamedBndrsApplied' has ensured that this application results in a type -- of monomorphic kind (e.g. all kind variables have been instantiated). doTyConApp :: Class -> Type -> TyCon -> [Kind] -> TcS LookupInstResult doTyConApp clas ty tc kind_args-  = return $ GenInst (map (mk_typeable_pred clas) kind_args)-                     (\kinds -> EvTypeable ty $ EvTypeableTyCon tc kinds)-                     True+  | Just _ <- tyConRepName_maybe tc+  = return $ OneInst { lir_new_theta = (map (mk_typeable_pred clas) kind_args)+                     , lir_mk_ev = mk_ev+                     , lir_safe_over = True }+  | otherwise+  = return NoInstance+  where+    mk_ev kinds = evTypeable ty $ EvTypeableTyCon tc (map EvExpr kinds)  -- | Representation for TyCon applications of a concrete kind. We just use the -- kind itself, but first we must make sure that we've instantiated all kind-@@ -2664,10 +2868,14 @@   | isForAllTy (typeKind f)   = return NoInstance -- We can't solve until we know the ctr.   | otherwise-  = return $ GenInst (map (mk_typeable_pred clas) [f, tk])-                     (\[t1,t2] -> EvTypeable ty $ EvTypeableTyApp t1 t2)-                     True+  = return $ OneInst { lir_new_theta = map (mk_typeable_pred clas) [f, tk]+                     , lir_mk_ev     = mk_ev+                     , lir_safe_over = True }+  where+    mk_ev [t1,t2] = evTypeable ty $ EvTypeableTyApp (EvExpr t1) (EvExpr t2)+    mk_ev _ = panic "doTyApp" + -- Emit a `Typeable` constraint for the given type. mk_typeable_pred :: Class -> Type -> PredType mk_typeable_pred clas ty = mkClassPred clas [ typeKind ty, ty ]@@ -2678,9 +2886,11 @@ doTyLit :: Name -> Type -> TcS LookupInstResult doTyLit kc t = do { kc_clas <- tcLookupClass kc                   ; let kc_pred    = mkClassPred kc_clas [ t ]-                        mk_ev [ev] = EvTypeable t $ EvTypeableTyLit ev+                        mk_ev [ev] = evTypeable t $ EvTypeableTyLit (EvExpr ev)                         mk_ev _    = panic "doTyLit"-                  ; return (GenInst [kc_pred] mk_ev True) }+                  ; return (OneInst { lir_new_theta = [kc_pred]+                                    , lir_mk_ev     = mk_ev+                                    , lir_safe_over   = True }) }  {- Note [Typeable (T a b c)] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2730,15 +2940,15 @@ -- See also Note [The equality types story] in TysPrim matchLiftedEquality :: [Type] -> TcS LookupInstResult matchLiftedEquality args-  = return (GenInst { lir_new_theta = [ mkTyConApp eqPrimTyCon args ]-                    , lir_mk_ev     = EvDFunApp (dataConWrapId heqDataCon) args+  = return (OneInst { lir_new_theta = [ mkTyConApp eqPrimTyCon args ]+                    , lir_mk_ev     = evDFunApp (dataConWrapId heqDataCon) args                     , lir_safe_over = True })  -- See also Note [The equality types story] in TysPrim matchLiftedCoercible :: [Type] -> TcS LookupInstResult matchLiftedCoercible args@[k, t1, t2]-  = return (GenInst { lir_new_theta = [ mkTyConApp eqReprPrimTyCon args' ]-                    , lir_mk_ev     = EvDFunApp (dataConWrapId coercibleDataCon)+  = return (OneInst { lir_new_theta = [ mkTyConApp eqReprPrimTyCon args' ]+                    , lir_mk_ev     = evDFunApp (dataConWrapId coercibleDataCon)                                                 args                     , lir_safe_over = True })   where@@ -2840,9 +3050,9 @@                          -- Use the equality proof to cast the selector Id to                          -- type (r -> a), then use the newtype coercion to cast                          -- it to a HasField dictionary.-                         mk_ev (ev1:evs) = EvSelector sel_id tvs evs `EvCast` co+                         mk_ev (ev1:evs) = evSelector sel_id tvs evs `evCast` co                            where-                             co = mkTcSubCo (evTermCoercion ev1)+                             co = mkTcSubCo (evTermCoercion (EvExpr ev1))                                       `mkTcTransCo` mkTcSymCo co2                          mk_ev [] = panic "matchHasField.mk_ev" @@ -2856,7 +3066,7 @@                      -- it must not be higher-rank.                    ; if not (isNaughtyRecordSelector sel_id) && isTauTy sel_ty                      then do { addUsedGRE True gre-                             ; return GenInst { lir_new_theta = theta+                             ; return OneInst { lir_new_theta = theta                                               , lir_mk_ev     = mk_ev                                               , lir_safe_over = True                                               } }
typecheck/TcMType.hs view
@@ -43,9 +43,9 @@   --------------------------------   -- Creating new evidence variables   newEvVar, newEvVars, newDict,-  newWanted, newWanteds, cloneWanted, cloneWC,+  newWanted, newWanteds, cloneWanted, cloneSimple, cloneWC,   emitWanted, emitWantedEq, emitWantedEvVar, emitWantedEvVars,-  newTcEvBinds, addTcEvBind,+  newTcEvBinds, newNoTcEvBinds, addTcEvBind,    newCoercionHole, fillCoercionHole, isFilledCoercionHole,   unpackCoercionHole, unpackCoercionHole_maybe,@@ -55,17 +55,17 @@   -- Instantiation   newMetaTyVars, newMetaTyVarX, newMetaTyVarsX,   newMetaSigTyVars, newMetaSigTyVarX,-  newSigTyVar, newWildCardX,+  newSigTyVar, newSkolemTyVar, newWildCardX,   tcInstType,   tcInstSkolTyVars,tcInstSkolTyVarsX,   tcInstSuperSkolTyVarsX,   tcSkolDFunType, tcSuperSkolTyVars, -  instSkolTyCoVars, freshenTyVarBndrs, freshenCoVarBndrsX,+  instSkolTyCoVarsX, freshenTyVarBndrs, freshenCoVarBndrsX,    --------------------------------   -- Zonking and tidying-  zonkTidyTcType, zonkTidyOrigin,+  zonkTidyTcType, zonkTidyTcTypes, zonkTidyOrigin,   tidyEvVar, tidyCt, tidySkolemInfo,   skolemiseRuntimeUnk,   zonkTcTyVar, zonkTcTyVars,@@ -98,7 +98,6 @@ import TyCoRep import TcType import Type-import Kind import Coercion import Class import Var@@ -147,6 +146,7 @@ newMetaKindVar = do { uniq <- newUnique                     ; details <- newMetaDetails TauTv                     ; let kv = mkTcTyVar (mkKindName uniq) liftedTypeKind details+                    ; traceTc "newMetaKindVar" (ppr kv)                     ; return (mkTyVarTy kv) }  newMetaKindVars :: Int -> TcM [TcKind]@@ -190,14 +190,15 @@   where     ev = ctEvidence ct +cloneSimple :: Ct -> TcM Ct+cloneSimple = fmap mkNonCanonical . cloneWanted+ cloneWC :: WantedConstraints -> TcM WantedConstraints cloneWC wc@(WC { wc_simple = simples, wc_impl = implics })-  = do { simples' <- mapBagM clone_one simples+  = do { simples' <- mapBagM cloneSimple simples        ; implics' <- mapBagM clone_implic implics        ; return (wc { wc_simple = simples', wc_impl = implics' }) }   where-    clone_one ct = do { ev <- cloneWanted ct; return (mkNonCanonical ev) }-     clone_implic implic@(Implic { ic_wanted = inner_wanted })       = do { inner_wanted' <- cloneWC inner_wanted            ; return (implic { ic_wanted = inner_wanted' }) }@@ -245,8 +246,9 @@ predTypeOccName :: PredType -> OccName predTypeOccName ty = case classifyPredType ty of     ClassPred cls _ -> mkDictOcc (getOccName cls)-    EqPred _ _ _    -> mkVarOccFS (fsLit "co")-    IrredPred _     -> mkVarOccFS (fsLit "irred")+    EqPred {}       -> mkVarOccFS (fsLit "co")+    IrredPred {}    -> mkVarOccFS (fsLit "irred")+    ForAllPred {}   -> mkVarOccFS (fsLit "df")  {- ************************************************************************@@ -293,8 +295,7 @@ unpackCoercionHole_maybe (CoercionHole { ch_ref = ref }) = readTcRef ref  -- | Check that a coercion is appropriate for filling a hole. (The hole--- itself is needed only for printing. NB: This must be /lazy/ in the coercion,--- as it's used in TcHsSyn in the presence of knots.+-- itself is needed only for printing. -- Always returns the checked coercion, but this return value is necessary -- so that the input coercion is forced only when the output is forced. checkCoercionHole :: CoVar -> Coercion -> TcM Coercion@@ -510,14 +511,25 @@        ; instSkolTyCoVarsX (mkTcSkolTyVar lvl loc overlappable) subst tvs }  mkTcSkolTyVar :: TcLevel -> SrcSpan -> Bool -> TcTyCoVarMaker gbl lcl-mkTcSkolTyVar lvl loc overlappable old_name kind+-- Allocates skolems whose level is ONE GREATER THAN the passed-in tc_lvl+-- See Note [Skolem level allocation]+mkTcSkolTyVar tc_lvl loc overlappable old_name kind   = do { uniq <- newUnique        ; let name = mkInternalName uniq (getOccName old_name) loc        ; return (mkTcTyVar name kind details) }   where-    details = SkolemTv (pushTcLevel lvl) overlappable-              -- NB: skolems bump the level+    details = SkolemTv (pushTcLevel tc_lvl) overlappable+              -- pushTcLevel: see Note [Skolem level allocation] +{- Note [Skolem level allocation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We generally allocate skolems /before/ calling pushLevelAndCaptureConstraints.+So we want their level to the level of the soon-to-be-created implication,+which has a level one higher than the current level.  Hence the pushTcLevel.+It feels like a slight hack.  Applies also to vanillaSkolemTv.++-}+ ------------------ freshenTyVarBndrs :: [TyVar] -> TcRnIf gbl lcl (TCvSubst, [TyVar]) -- ^ Give fresh uniques to a bunch of TyVars, but they stay@@ -567,9 +579,10 @@ newFskTyVar fam_ty   = do { uniq <- newUnique        ; ref  <- newMutVar Flexi+       ; tclvl <- getTcLevel        ; let details = MetaTv { mtv_info  = FlatSkolTv                               , mtv_ref   = ref-                              , mtv_tclvl = fmvTcLevel }+                              , mtv_tclvl = tclvl }              name = mkMetaTyVarName uniq (fsLit "fsk")        ; return (mkTcTyVar name (typeKind fam_ty) details) } @@ -597,20 +610,35 @@ ************************************************************************ -} +-- a SigTv can unify with type *variables* only, including other SigTvs+-- and skolems. Sometimes, they can unify with type variables that the+-- user would rather keep distinct; see #11203 for an example.+-- So, any client of this+-- function needs to either allow the SigTvs to unify with each other+-- (say, for pattern-bound scoped type variables), or check that they+-- don't (say, with a call to findDubSigTvs). newSigTyVar :: Name -> Kind -> TcM TcTyVar newSigTyVar name kind   = do { details <- newMetaDetails SigTv-       ; return (mkTcTyVar name kind details) }+       ; let tyvar = mkTcTyVar name kind details+       ; traceTc "newSigTyVar" (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)) }+ 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 = fmvTcLevel }+                              , mtv_tclvl = tclvl }              name = mkMetaTyVarName uniq (fsLit "s")        ; return (mkTcTyVar name (typeKind fam_ty) details) } @@ -631,7 +659,9 @@               details' = case tcTyVarDetails tv of                            details@(MetaTv {}) -> details { mtv_ref = ref }                            _ -> pprPanic "cloneMetaTyVar" (ppr tv)-        ; return (mkTcTyVar name' (tyVarKind tv) details') }+              tyvar = mkTcTyVar name' (tyVarKind tv) details'+        ; traceTc "cloneMetaTyVar" (ppr tyvar)+        ; return tyvar }  -- Works for both type and kind variables readMetaTyVar :: TyVar -> TcM MetaDetails@@ -690,18 +720,18 @@   = do { meta_details <- readMutVar ref;        -- Zonk kinds to allow the error check to work        ; zonked_tv_kind <- zonkTcType tv_kind-       ; zonked_ty_kind <- zonkTcType ty_kind-       ; let kind_check_ok = isPredTy tv_kind  -- Don't check kinds for updates-                                               -- to coercion variables.  Why not??-                          || isConstraintKind zonked_tv_kind+       ; zonked_ty      <- zonkTcType ty+       ; let zonked_ty_kind = typeKind zonked_ty  -- need to zonk even before typeKind;+                                                  -- otherwise, we can panic in piResultTy+             kind_check_ok = tcIsConstraintKind zonked_tv_kind                           || tcEqKind zonked_ty_kind zonked_tv_kind-             -- Hack alert! isConstraintKind: see TcHsType+             -- Hack alert! tcIsConstraintKind: see TcHsType              -- Note [Extra-constraint holes in partial type signatures]               kind_msg = hang (text "Ill-kinded update to meta tyvar")                            2 (    ppr tyvar <+> text "::" <+> (ppr tv_kind $$ ppr zonked_tv_kind)                               <+> text ":="-                              <+> ppr ty <+> text "::" <+> (ppr ty_kind $$ ppr zonked_ty_kind) )+                              <+> ppr ty <+> text "::" <+> (ppr zonked_ty_kind) )         ; traceTc "writeMetaTyVar" (ppr tyvar <+> text ":=" <+> ppr ty) @@ -719,13 +749,11 @@        ; writeMutVar ref (Indirect ty) }   where     tv_kind = tyVarKind tyvar-    ty_kind = typeKind ty      tv_lvl = tcTyVarLevel tyvar     ty_lvl = tcTypeLevel ty -    level_check_ok = isFlattenTyVar tyvar-                  || not (ty_lvl `strictlyDeeperThan` tv_lvl)+    level_check_ok  = not (ty_lvl `strictlyDeeperThan` tv_lvl)     level_check_msg = ppr ty_lvl $$ ppr tv_lvl $$ ppr tyvar $$ ppr ty      double_upd_msg details = hang (text "Double update of meta tyvar")@@ -794,7 +822,9 @@                         FlatSkolTv  -> fsLit "fsk"                         SigTv       -> fsLit "a"         ; details <- newMetaDetails meta_info-        ; return (mkTcTyVar name kind details) }+        ; 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@@ -803,7 +833,9 @@         ; details <- newMetaDetails info         ; let name = mkSystemName uniq (getOccName tv)                        -- See Note [Name of an instantiated type variable]-        ; return (mkTcTyVar name kind details) }+              tyvar = mkTcTyVar name kind details+        ; traceTc "cloneAnonMetaTyVar" (ppr tyvar)+        ; return tyvar }  {- Note [Name of an instantiated type variable] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -877,7 +909,7 @@       -- is not yet fixed so leaving as unchecked for now.       -- OLD NOTE:       -- Unchecked because we call newMetaTyVarX from-      -- tcInstBinder, which is called from tc_infer_args+      -- 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       -- if we use substTy here@@ -914,7 +946,7 @@      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 (3).+has free vars {f,a}, but we must add 'k' as well! Hence step (2).  * This function distinguishes between dependent and non-dependent   variables only to keep correct defaulting behavior with -XNoPolyKinds.@@ -999,6 +1031,10 @@     --    * Kind variables, with -XNoPolyKinds: don't quantify over these     --    * RuntimeRep variables: we never quantify over these     zonk_quant default_kind tkv+      | not (isTyVar tkv)+      = return Nothing   -- this can happen for a covar that's associated with+                         -- a coercion hole. Test case: typecheck/should_compile/T2494+       | not (isTcTyVar tkv)       = return (Just tkv)  -- For associated types, we have the class variables                            -- in scope, and they are TyVars not TcTyVars@@ -1068,7 +1104,7 @@        -- It takes an (unconstrained) meta tyvar and defaults it.        -- Works only on vars of type *; for other kinds, it issues an error.     default_kind_var kv-      | isStarKind (tyVarKind kv)+      | isLiftedTypeKind (tyVarKind kv)       = do { traceTc "Defaulting a kind var to *" (ppr kv)            ; writeMetaTyVar kv liftedTypeKind }       | otherwise@@ -1277,11 +1313,6 @@        ; writeMutVar gtv_var gbl_tvs'        ; return gbl_tvs' } --- | Zonk a type without using the smart constructors; the result type--- is available for inspection within the type-checking knot.-zonkTcTypeInKnot :: TcType -> TcM TcType-zonkTcTypeInKnot = mapType (zonkTcTypeMapper { tcm_smart = False }) ()- zonkTcTypeAndFV :: TcType -> TcM DTyCoVarSet -- Zonk a type and take its free variables -- With kind polymorphism it can be essential to zonk *first*@@ -1289,20 +1320,17 @@ --    forall k1. forall (a:k2). a -- where k2:=k1 is in the substitution.  We don't want -- k2 to look free in this type!--- NB: This might be called from within the knot, so don't use--- smart constructors. See Note [Type-checking inside the knot] in TcHsType zonkTcTypeAndFV ty-  = tyCoVarsOfTypeDSet <$> zonkTcTypeInKnot ty+  = tyCoVarsOfTypeDSet <$> zonkTcType ty  -- | Zonk a type and call 'candidateQTyVarsOfType' on it.--- Works within the knot. zonkTcTypeAndSplitDepVars :: TcType -> TcM CandidatesQTvs zonkTcTypeAndSplitDepVars ty-  = candidateQTyVarsOfType <$> zonkTcTypeInKnot ty+  = candidateQTyVarsOfType <$> zonkTcType ty  zonkTcTypesAndSplitDepVars :: [TcType] -> TcM CandidatesQTvs zonkTcTypesAndSplitDepVars tys-  = candidateQTyVarsOfTypes <$> mapM zonkTcTypeInKnot tys+  = candidateQTyVarsOfTypes <$> mapM zonkTcType tys  zonkTyCoVar :: TyCoVar -> TcM TcType -- Works on TyVars and TcTyVars@@ -1440,7 +1468,7 @@   = ASSERT( not (isCFunEqCan ct) )   -- We do not expect to see any CFunEqCans, because zonkCt is only called on   -- unflattened constraints.-    do { fl' <- zonkCtEvidence (cc_ev ct)+    do { fl' <- zonkCtEvidence (ctEvidence ct)        ; return (mkNonCanonical fl') }  zonkCtEvidence :: CtEvidence -> TcM CtEvidence@@ -1487,7 +1515,7 @@ zonkCoVar :: CoVar -> TcM CoVar zonkCoVar = zonkId --- | A suitable TyCoMapper for zonking a type inside the knot, and+-- | A suitable TyCoMapper for zonking a type during type-checking, -- before all metavars are filled in. zonkTcTypeMapper :: TyCoMapper () TcM zonkTcTypeMapper = TyCoMapper@@ -1495,7 +1523,8 @@   , tcm_tyvar = const zonkTcTyVar   , tcm_covar = const (\cv -> mkCoVarCo <$> zonkTyCoVarKind cv)   , tcm_hole  = hole-  , tcm_tybinder = \_env tv _vis -> ((), ) <$> zonkTcTyCoVarBndr tv }+  , tcm_tybinder = \_env tv _vis -> ((), ) <$> zonkTcTyCoVarBndr tv+  , tcm_tycon = return }   where     hole :: () -> CoercionHole -> TcM Coercion     hole _ hole@(CoercionHole { ch_ref = ref, ch_co_var = cv })@@ -1506,7 +1535,6 @@                Nothing -> do { cv' <- zonkCoVar cv                              ; return $ HoleCo (hole { ch_co_var = cv' }) } } - -- 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@@ -1518,11 +1546,17 @@ zonkCo = mapCoercion zonkTcTypeMapper ()  zonkTcTyCoVarBndr :: TcTyCoVar -> TcM TcTyCoVar--- A tyvar binder is never a unification variable (MetaTv),--- rather it is always a skolems.  BUT it may have a kind+-- A tyvar binder is never a unification variable (TauTv),+-- rather it is always a skolem. It *might* be a SigTv.+-- (Because non-CUSK type declarations use SigTvs.)+-- Regardless, it may have a kind -- that has not yet been zonked, and may include kind -- unification variables. zonkTcTyCoVarBndr tyvar+  | isSigTyVar tyvar+  = tcGetTyVar "zonkTcTyCoVarBndr SigTv" <$> zonkTcTyVar tyvar++  | otherwise     -- can't use isCoVar, because it looks at a TyCon. Argh.   = ASSERT2( isImmutableTyVar tyvar || (not $ isTyVar tyvar), pprTyVar tyvar )     updateTyVarKindM zonkTcType tyvar@@ -1553,10 +1587,14 @@  -- Variant that assumes that any result of zonking is still a TyVar. -- Should be used only on skolems and SigTvs-zonkTcTyVarToTyVar :: TcTyVar -> TcM TcTyVar+zonkTcTyVarToTyVar :: HasDebugCallStack => TcTyVar -> TcM TcTyVar zonkTcTyVarToTyVar tv   = do { ty <- zonkTcTyVar tv-       ; return (tcGetTyVar "zonkTcTyVarToVar" ty) }+       ; let tv' = case tcGetTyVar_maybe ty of+                     Just tv' -> tv'+                     Nothing  -> pprPanic "zonkTcTyVarToTyVar"+                                          (ppr tv $$ ppr ty)+       ; return tv' }  zonkSigTyVarPairs :: [(Name,TcTyVar)] -> TcM [(Name,TcTyVar)] zonkSigTyVarPairs prs@@ -1577,6 +1615,13 @@ zonkTidyTcType env ty = do { ty' <- zonkTcType ty                            ; return (tidyOpenType env ty') } +zonkTidyTcTypes :: TidyEnv -> [TcType] -> TcM (TidyEnv, [TcType])+zonkTidyTcTypes = zonkTidyTcTypes' []+  where zonkTidyTcTypes' zs env [] = return (env, reverse zs)+        zonkTidyTcTypes' zs env (ty:tys)+          = do { (env', ty') <- zonkTidyTcType env ty+               ; zonkTidyTcTypes' (ty':zs) env' tys }+ zonkTidyOrigin :: TidyEnv -> CtOrigin -> TcM (TidyEnv, CtOrigin) zonkTidyOrigin env (GivenOrigin skol_info)   = do { skol_info1 <- zonkSkolemInfo skol_info@@ -1712,8 +1757,8 @@                  -> SDoc formatLevPolyErr ty   = hang (text "A levity-polymorphic type is not allowed here:")-       2 (vcat [ text "Type:" <+> ppr tidy_ty-               , text "Kind:" <+> ppr tidy_ki ])+       2 (vcat [ text "Type:" <+> pprWithTYPE tidy_ty+               , text "Kind:" <+> pprWithTYPE tidy_ki ])   where     (tidy_env, tidy_ty) = tidyOpenType emptyTidyEnv ty     tidy_ki             = tidyType tidy_env (typeKind ty)
typecheck/TcMatches.hs view
@@ -220,9 +220,9 @@        ; pat_tys  <- mapM readExpType pat_tys        ; rhs_ty   <- readExpType rhs_ty        ; return (MG { mg_alts = L l matches'-                    , mg_arg_tys = pat_tys-                    , mg_res_ty = rhs_ty+                    , mg_ext = MatchGroupTc pat_tys rhs_ty                     , mg_origin = origin }) }+tcMatches _ _ _ (XMatchGroup {}) = panic "tcMatches"  ------------- tcMatch :: (Outputable (body GhcRn)) => TcMatchCtxt body@@ -239,8 +239,10 @@       = add_match_ctxt match $         do { (pats', grhss') <- tcPats (mc_what ctxt) pats pat_tys $                                 tcGRHSs ctxt grhss rhs_ty-           ; return (Match { m_ctxt = mc_what ctxt, m_pats = pats'+           ; return (Match { m_ext = noExt+                           , m_ctxt = mc_what ctxt, m_pats = pats'                            , m_grhss = grhss' }) }+    tc_match  _ _ _ (XMatch _) = panic "tcMatch"          -- 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"@@ -259,24 +261,26 @@ -- We used to force it to be a monotype when there was more than one guard -- but we don't need to do that any more -tcGRHSs ctxt (GRHSs grhss (L l binds)) res_ty+tcGRHSs ctxt (GRHSs _ grhss (L l binds)) res_ty   = do  { (binds', grhss')             <- tcLocalBinds binds $                mapM (wrapLocM (tcGRHS ctxt res_ty)) grhss -        ; return (GRHSs grhss' (L l binds')) }+        ; return (GRHSs noExt grhss' (L l binds')) }+tcGRHSs _ (XGRHSs _) _ = panic "tcGRHSs"  ------------- tcGRHS :: TcMatchCtxt body -> ExpRhoType -> GRHS GhcRn (Located (body GhcRn))        -> TcM (GRHS GhcTcId (Located (body GhcTcId))) -tcGRHS ctxt res_ty (GRHS guards rhs)+tcGRHS ctxt res_ty (GRHS _ guards rhs)   = do  { (guards', rhs')             <- tcStmtsAndThen stmt_ctxt tcGuardStmt guards res_ty $                mc_body ctxt rhs-        ; return (GRHS guards' rhs') }+        ; return (GRHS noExt guards' rhs') }   where     stmt_ctxt  = PatGuard (mc_what ctxt)+tcGRHS _ _ (XGRHS _) = panic "tcGRHS"  {- ************************************************************************@@ -296,30 +300,22 @@         ; let list_ty = mkListTy elt_ty         ; stmts' <- tcStmts ListComp (tcLcStmt listTyCon) stmts                             (mkCheckExpType elt_ty)-        ; return $ mkHsWrapCo co (HsDo ListComp (L l stmts') list_ty) }--tcDoStmts PArrComp (L l stmts) res_ty-  = do  { res_ty <- expTypeToType res_ty-        ; (co, elt_ty) <- matchExpectedPArrTy res_ty-        ; let parr_ty = mkPArrTy elt_ty-        ; stmts' <- tcStmts PArrComp (tcLcStmt parrTyCon) stmts-                            (mkCheckExpType elt_ty)-        ; return $ mkHsWrapCo co (HsDo PArrComp (L l stmts') parr_ty) }+        ; return $ mkHsWrapCo co (HsDo list_ty ListComp (L l stmts')) }  tcDoStmts DoExpr (L l stmts) res_ty   = do  { stmts' <- tcStmts DoExpr tcDoStmt stmts res_ty         ; res_ty <- readExpType res_ty-        ; return (HsDo DoExpr (L l stmts') res_ty) }+        ; return (HsDo res_ty DoExpr (L l stmts')) }  tcDoStmts MDoExpr (L l stmts) res_ty   = do  { stmts' <- tcStmts MDoExpr tcDoStmt stmts res_ty         ; res_ty <- readExpType res_ty-        ; return (HsDo MDoExpr (L l stmts') res_ty) }+        ; return (HsDo res_ty MDoExpr (L l stmts')) }  tcDoStmts MonadComp (L l stmts) res_ty   = do  { stmts' <- tcStmts MonadComp tcMcStmt stmts res_ty         ; res_ty <- readExpType res_ty-        ; return (HsDo MonadComp (L l stmts') res_ty) }+        ; return (HsDo res_ty MonadComp (L l stmts')) }  tcDoStmts ctxt _ _ = pprPanic "tcDoStmts" (pprStmtContext ctxt) @@ -372,11 +368,11 @@         ; return ([], thing) }  -- LetStmts are handled uniformly, regardless of context-tcStmtsAndThen ctxt stmt_chk (L loc (LetStmt (L l binds)) : stmts)+tcStmtsAndThen ctxt stmt_chk (L loc (LetStmt x (L l binds)) : stmts)                                                              res_ty thing_inside   = do  { (binds', (stmts',thing)) <- tcLocalBinds binds $               tcStmtsAndThen ctxt stmt_chk stmts res_ty thing_inside-        ; return (L loc (LetStmt (L l binds')) : stmts', thing) }+        ; return (L loc (LetStmt x (L l binds')) : stmts', thing) }  -- Don't set the error context for an ApplicativeStmt.  It ought to be -- possible to do this with a popErrCtxt in the tcStmt case for@@ -405,12 +401,12 @@ ---------------------------------------------------  tcGuardStmt :: TcExprStmtChecker-tcGuardStmt _ (BodyStmt guard _ _ _) res_ty thing_inside+tcGuardStmt _ (BodyStmt _ guard _ _) res_ty thing_inside   = do  { guard' <- tcMonoExpr guard (mkCheckExpType boolTy)         ; thing  <- thing_inside res_ty-        ; return (BodyStmt guard' noSyntaxExpr noSyntaxExpr boolTy, thing) }+        ; return (BodyStmt boolTy guard' noSyntaxExpr noSyntaxExpr, thing) } -tcGuardStmt ctxt (BindStmt pat rhs _ _ _) res_ty thing_inside+tcGuardStmt ctxt (BindStmt _ pat rhs _ _) res_ty thing_inside   = do  { (rhs', rhs_ty) <- tcInferSigmaNC rhs                                    -- Stmt has a context already         ; (pat', thing)  <- tcPat_O (StmtCtxt ctxt) (lexprCtOrigin rhs)@@ -423,29 +419,28 @@   ------------------------------------------------------           List comprehensions and PArrays+--           List comprehensions --               (no rebindable syntax) ---------------------------------------------------  -- Dealt with separately, rather than by tcMcStmt, because---   a) PArr isn't (yet) an instance of Monad, so the generality seems overkill---   b) We have special desugaring rules for list comprehensions,+--   a) We have special desugaring rules for list comprehensions, --      which avoid creating intermediate lists.  They in turn --      assume that the bind/return operations are the regular --      polymorphic ones, and in particular don't have any --      coercion matching stuff in them.  It's hard to avoid the --      potential for non-trivial coercions in tcMcStmt -tcLcStmt :: TyCon       -- The list/Parray type constructor ([] or PArray)+tcLcStmt :: TyCon       -- The list type constructor ([])          -> TcExprStmtChecker -tcLcStmt _ _ (LastStmt body noret _) elt_ty thing_inside+tcLcStmt _ _ (LastStmt x body noret _) elt_ty thing_inside   = do { body' <- tcMonoExprNC body elt_ty        ; thing <- thing_inside (panic "tcLcStmt: thing_inside")-       ; return (LastStmt body' noret noSyntaxExpr, thing) }+       ; return (LastStmt x body' noret noSyntaxExpr, thing) }  -- A generator, pat <- rhs-tcLcStmt m_tc ctxt (BindStmt pat rhs _ _ _) elt_ty thing_inside+tcLcStmt m_tc ctxt (BindStmt _ pat rhs _ _) elt_ty thing_inside  = do   { pat_ty <- newFlexiTyVarTy liftedTypeKind         ; rhs'   <- tcMonoExpr rhs (mkCheckExpType $ mkTyConApp m_tc [pat_ty])         ; (pat', thing)  <- tcPat (StmtCtxt ctxt) pat (mkCheckExpType pat_ty) $@@ -453,28 +448,29 @@         ; return (mkTcBindStmt pat' rhs', thing) }  -- A boolean guard-tcLcStmt _ _ (BodyStmt rhs _ _ _) elt_ty thing_inside+tcLcStmt _ _ (BodyStmt _ rhs _ _) elt_ty thing_inside   = do  { rhs'  <- tcMonoExpr rhs (mkCheckExpType boolTy)         ; thing <- thing_inside elt_ty-        ; return (BodyStmt rhs' noSyntaxExpr noSyntaxExpr boolTy, thing) }+        ; return (BodyStmt boolTy rhs' noSyntaxExpr noSyntaxExpr, thing) }  -- ParStmt: See notes with tcMcStmt-tcLcStmt m_tc ctxt (ParStmt bndr_stmts_s _ _ _) elt_ty thing_inside+tcLcStmt m_tc ctxt (ParStmt _ bndr_stmts_s _ _) elt_ty thing_inside   = do  { (pairs', thing) <- loop bndr_stmts_s-        ; return (ParStmt pairs' noExpr noSyntaxExpr unitTy, thing) }+        ; return (ParStmt unitTy pairs' noExpr noSyntaxExpr, thing) }   where     -- loop :: [([LStmt GhcRn], [GhcRn])]     --      -> TcM ([([LStmt GhcTcId], [GhcTcId])], thing)     loop [] = do { thing <- thing_inside elt_ty                  ; return ([], thing) }         -- matching in the branches -    loop (ParStmtBlock stmts names _ : pairs)+    loop (ParStmtBlock x stmts names _ : pairs)       = do { (stmts', (ids, pairs', thing))                 <- tcStmtsAndThen ctxt (tcLcStmt m_tc) stmts elt_ty $ \ _elt_ty' ->                    do { ids <- tcLookupLocalIds names                       ; (pairs', thing) <- loop pairs                       ; return (ids, pairs', thing) }-           ; return ( ParStmtBlock stmts' ids noSyntaxExpr : pairs', thing ) }+           ; return ( ParStmtBlock x stmts' ids noSyntaxExpr : pairs', thing ) }+    loop (XParStmtBlock{}:_) = panic "tcLcStmt"  tcLcStmt m_tc ctxt (TransStmt { trS_form = form, trS_stmts = stmts                               , trS_bndrs =  bindersMap@@ -536,7 +532,7 @@                            , trS_ret = noSyntaxExpr                            , trS_bind = noSyntaxExpr                            , trS_fmap = noExpr-                           , trS_bind_arg_ty = unitTy+                           , trS_ext = unitTy                            , trS_form = form }, thing) }  tcLcStmt _ _ stmt _ _@@ -550,13 +546,13 @@  tcMcStmt :: TcExprStmtChecker -tcMcStmt _ (LastStmt body noret return_op) res_ty thing_inside+tcMcStmt _ (LastStmt x body noret return_op) res_ty thing_inside   = do  { (body', return_op')             <- tcSyntaxOp MCompOrigin return_op [SynRho] res_ty $                \ [a_ty] ->                tcMonoExprNC body (mkCheckExpType a_ty)         ; thing      <- thing_inside (panic "tcMcStmt: thing_inside")-        ; return (LastStmt body' noret return_op', thing) }+        ; return (LastStmt x body' noret return_op', thing) }  -- Generators for monad comprehensions ( pat <- rhs ) --@@ -564,7 +560,7 @@ --                            q   ::   a -- -tcMcStmt ctxt (BindStmt pat rhs bind_op fail_op _) res_ty thing_inside+tcMcStmt ctxt (BindStmt _ pat rhs bind_op fail_op) res_ty thing_inside            -- (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty   = do  { ((rhs', pat', thing, new_res_ty), bind_op')             <- tcSyntaxOp MCompOrigin bind_op@@ -579,13 +575,13 @@         -- If (but only if) the pattern can fail, typecheck the 'fail' operator         ; fail_op' <- tcMonadFailOp (MCompPatOrigin pat) pat' fail_op new_res_ty -        ; return (BindStmt pat' rhs' bind_op' fail_op' new_res_ty, thing) }+        ; return (BindStmt new_res_ty pat' rhs' bind_op' fail_op', thing) }  -- Boolean expressions. -- --   [ body | stmts, expr ]  ->  expr :: m Bool ---tcMcStmt _ (BodyStmt rhs then_op guard_op _) res_ty thing_inside+tcMcStmt _ (BodyStmt _ rhs then_op guard_op) res_ty thing_inside   = do  { -- Deal with rebindable syntax:           --    guard_op :: test_ty -> rhs_ty           --    then_op  :: rhs_ty -> new_res_ty -> res_ty@@ -600,7 +596,7 @@                          tcMonoExpr rhs (mkCheckExpType test_ty)                   ; thing <- thing_inside (mkCheckExpType new_res_ty)                   ; return (thing, rhs', rhs_ty, guard_op') }-        ; return (BodyStmt rhs' then_op' guard_op' rhs_ty, thing) }+        ; return (BodyStmt rhs_ty rhs' then_op' guard_op', thing) }  -- Grouping statements --@@ -715,7 +711,7 @@        ; return (TransStmt { trS_stmts = stmts', trS_bndrs = bindersMap'                            , trS_by = by', trS_using = final_using                            , trS_ret = return_op', trS_bind = bind_op'-                           , trS_bind_arg_ty = n_app tup_ty+                           , trS_ext = n_app tup_ty                            , trS_fmap = fmap_op', trS_form = form }, thing) }  -- A parallel set of comprehensions@@ -747,7 +743,7 @@ --        -> (m st2 -> m st3 -> m (st2, st3))   -- recursive call --        -> m (st1, (st2, st3)) ---tcMcStmt ctxt (ParStmt bndr_stmts_s mzip_op bind_op _) res_ty thing_inside+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 @@ -761,7 +757,7 @@          -- type dummies since we don't know all binder types yet        ; id_tys_s <- (mapM . mapM) (const (newFlexiTyVarTy liftedTypeKind))-                       [ names | ParStmtBlock _ names _ <- bndr_stmts_s ]+                       [ names | ParStmtBlock _ _ names _ <- bndr_stmts_s ]         -- Typecheck bind:        ; let tup_tys  = [ mkBigCoreTupTy id_tys | id_tys <- id_tys_s ]@@ -776,7 +772,7 @@                                  tup_tys bndr_stmts_s                  ; return (stuff, inner_res_ty) } -       ; return (ParStmt blocks' mzip_op' bind_op' inner_res_ty, thing) }+       ; return (ParStmt inner_res_ty blocks' mzip_op' bind_op', thing) }    where     mk_tuple_ty tys = foldr1 (\tn tm -> mkBoxedTupleTy [tn, tm]) tys@@ -791,7 +787,7 @@                                    -- matching in the branches      loop m_ty inner_res_ty (tup_ty_in : tup_tys_in)-                           (ParStmtBlock stmts names return_op : pairs)+                           (ParStmtBlock x stmts names return_op : pairs)       = do { let m_tup_ty = m_ty `mkAppTy` tup_ty_in            ; (stmts', (ids, return_op', pairs', thing))                 <- tcStmtsAndThen ctxt tcMcStmt stmts (mkCheckExpType m_tup_ty) $@@ -804,7 +800,7 @@                                      \ _ -> return ()                       ; (pairs', thing) <- loop m_ty inner_res_ty tup_tys_in pairs                       ; return (ids, return_op', pairs', thing) }-           ; return (ParStmtBlock stmts' ids return_op' : pairs', thing) }+           ; return (ParStmtBlock x stmts' ids return_op' : pairs', thing) }     loop _ _ _ _ = panic "tcMcStmt.loop"  tcMcStmt _ stmt _ _@@ -818,12 +814,12 @@  tcDoStmt :: TcExprStmtChecker -tcDoStmt _ (LastStmt body noret _) res_ty thing_inside+tcDoStmt _ (LastStmt x body noret _) res_ty thing_inside   = do { body' <- tcMonoExprNC body res_ty        ; thing <- thing_inside (panic "tcDoStmt: thing_inside")-       ; return (LastStmt body' noret noSyntaxExpr, thing) }+       ; return (LastStmt x body' noret noSyntaxExpr, thing) } -tcDoStmt ctxt (BindStmt pat rhs bind_op fail_op _) res_ty thing_inside+tcDoStmt ctxt (BindStmt _ pat rhs bind_op fail_op) res_ty thing_inside   = do  {       -- Deal with rebindable syntax:                 --       (>>=) :: rhs_ty -> (pat_ty -> new_res_ty) -> res_ty                 -- This level of generality is needed for using do-notation@@ -841,9 +837,9 @@         -- If (but only if) the pattern can fail, typecheck the 'fail' operator         ; fail_op' <- tcMonadFailOp (DoPatOrigin pat) pat' fail_op new_res_ty -        ; return (BindStmt pat' rhs' bind_op' fail_op' new_res_ty, thing) }+        ; return (BindStmt new_res_ty pat' rhs' bind_op' fail_op', thing) } -tcDoStmt ctxt (ApplicativeStmt pairs mb_join _) res_ty thing_inside+tcDoStmt ctxt (ApplicativeStmt _ pairs mb_join) res_ty thing_inside   = do  { let tc_app_stmts ty = tcApplicativeStmts ctxt pairs ty $                                 thing_inside . mkCheckExpType         ; ((pairs', body_ty, thing), mb_join') <- case mb_join of@@ -853,9 +849,9 @@               (tcSyntaxOp DoOrigin join_op [SynRho] res_ty $                \ [rhs_ty] -> tc_app_stmts (mkCheckExpType rhs_ty)) -        ; return (ApplicativeStmt pairs' mb_join' body_ty, thing) }+        ; return (ApplicativeStmt body_ty pairs' mb_join', thing) } -tcDoStmt _ (BodyStmt rhs then_op _ _) res_ty thing_inside+tcDoStmt _ (BodyStmt _ rhs then_op _) res_ty thing_inside   = do  {       -- Deal with rebindable syntax;                 --   (>>) :: rhs_ty -> new_res_ty -> res_ty         ; ((rhs', rhs_ty, thing), then_op')@@ -864,7 +860,7 @@                do { rhs' <- tcMonoExprNC rhs (mkCheckExpType rhs_ty)                   ; thing <- thing_inside (mkCheckExpType new_res_ty)                   ; return (rhs', rhs_ty, thing) }-        ; return (BodyStmt rhs' then_op' noSyntaxExpr rhs_ty, thing) }+        ; return (BodyStmt rhs_ty rhs' then_op' noSyntaxExpr, thing) }  tcDoStmt ctxt (RecStmt { recS_stmts = stmts, recS_later_ids = later_names                        , recS_rec_ids = rec_names, recS_ret_fn = ret_op@@ -910,9 +906,11 @@         ; return (RecStmt { recS_stmts = stmts', recS_later_ids = later_ids                           , recS_rec_ids = rec_ids, recS_ret_fn = ret_op'                           , recS_mfix_fn = mfix_op', recS_bind_fn = bind_op'-                          , recS_bind_ty = new_res_ty-                          , recS_later_rets = [], recS_rec_rets = tup_rets-                          , recS_ret_ty = stmts_ty }, thing)+                          , recS_ext = RecStmtTc+                            { recS_bind_ty = new_res_ty+                            , recS_later_rets = []+                            , recS_rec_rets = tup_rets+                            , recS_ret_ty = stmts_ty} }, thing)         }}  tcDoStmt _ stmt _ _@@ -988,7 +986,7 @@ we want to typecheck 'bar' in the knowledge that it should be an IO thing, 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 cheking the rebindable syntax, and+Otherwise the error shows up when checking the rebindable syntax, and the expected/inferred stuff is back to front (see Trac #3613).  Note [typechecking ApplicativeStmt]@@ -1011,10 +1009,10 @@  tcApplicativeStmts   :: HsStmtContext Name-  -> [(SyntaxExpr GhcRn, ApplicativeArg GhcRn GhcRn)]+  -> [(SyntaxExpr GhcRn, ApplicativeArg GhcRn)]   -> ExpRhoType                         -- rhs_ty   -> (TcRhoType -> TcM t)               -- thing_inside-  -> TcM ([(SyntaxExpr GhcTcId, ApplicativeArg GhcTcId GhcTcId)], Type, t)+  -> TcM ([(SyntaxExpr GhcTcId, ApplicativeArg GhcTcId)], Type, t)  tcApplicativeStmts ctxt pairs rhs_ty thing_inside  = do { body_ty <- newFlexiTyVarTy liftedTypeKind@@ -1052,18 +1050,18 @@            ; ops' <- goOps t_i ops            ; return (op' : ops') } -    goArg :: (ApplicativeArg GhcRn GhcRn, Type, Type)-          -> TcM (ApplicativeArg GhcTcId GhcTcId)+    goArg :: (ApplicativeArg GhcRn, Type, Type)+          -> TcM (ApplicativeArg GhcTcId) -    goArg (ApplicativeArgOne pat rhs isBody, pat_ty, exp_ty)+    goArg (ApplicativeArgOne x pat rhs isBody, 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 pat' rhs' isBody) }+           ; return (ApplicativeArgOne x pat' rhs' isBody) } -    goArg (ApplicativeArgMany stmts ret pat, pat_ty, exp_ty)+    goArg (ApplicativeArgMany x stmts ret pat, pat_ty, exp_ty)       = do { (stmts', (ret',pat')) <-                 tcStmtsAndThen ctxt tcDoStmt stmts (mkCheckExpType exp_ty) $                 \res_ty  -> do@@ -1072,13 +1070,16 @@                                  return ()                   ; return (ret', pat')                   }-           ; return (ApplicativeArgMany stmts' ret' pat') }+           ; return (ApplicativeArgMany x stmts' ret' pat') } -    get_arg_bndrs :: ApplicativeArg GhcTcId GhcTcId -> [Id]-    get_arg_bndrs (ApplicativeArgOne pat _ _)  = collectPatBinders pat-    get_arg_bndrs (ApplicativeArgMany _ _ pat) = collectPatBinders pat+    goArg (XApplicativeArg _, _, _) = panic "tcApplicativeStmts" +    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" + {- Note [ApplicativeDo and constraints] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ An applicative-do is supposed to take place in parallel, so@@ -1133,3 +1134,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"
typecheck/TcPat.hs view
@@ -324,21 +324,21 @@         -> TcM (Pat GhcTcId,    -- Translated pattern                 a)              -- Result of thing inside -tc_pat penv (VarPat (L l name)) pat_ty thing_inside+tc_pat penv (VarPat x (L l name)) pat_ty thing_inside   = do  { (wrap, id) <- tcPatBndr penv name pat_ty         ; res <- tcExtendIdEnv1 name id thing_inside         ; pat_ty <- readExpType pat_ty-        ; return (mkHsWrapPat wrap (VarPat (L l id)) pat_ty, res) }+        ; return (mkHsWrapPat wrap (VarPat x (L l id)) pat_ty, res) } -tc_pat penv (ParPat pat) pat_ty thing_inside+tc_pat penv (ParPat x pat) pat_ty thing_inside   = do  { (pat', res) <- tc_lpat pat pat_ty penv thing_inside-        ; return (ParPat pat', res) }+        ; return (ParPat x pat', res) } -tc_pat penv (BangPat pat) pat_ty thing_inside+tc_pat penv (BangPat x pat) pat_ty thing_inside   = do  { (pat', res) <- tc_lpat pat pat_ty penv thing_inside-        ; return (BangPat pat', res) }+        ; return (BangPat x pat', res) } -tc_pat penv (LazyPat pat) pat_ty thing_inside+tc_pat penv (LazyPat x pat) pat_ty thing_inside   = do  { (pat', (res, pat_ct))                 <- tc_lpat pat pat_ty (makeLazy penv) $                    captureConstraints thing_inside@@ -352,14 +352,14 @@         ; pat_ty <- readExpType pat_ty         ; _ <- unifyType Nothing (typeKind pat_ty) liftedTypeKind -        ; return (LazyPat pat', res) }+        ; return (LazyPat x pat', res) }  tc_pat _ (WildPat _) pat_ty thing_inside   = do  { res <- thing_inside         ; pat_ty <- expTypeToType pat_ty         ; return (WildPat pat_ty, res) } -tc_pat penv (AsPat (L nm_loc name) pat) pat_ty thing_inside+tc_pat penv (AsPat x (L nm_loc name) pat) pat_ty thing_inside   = do  { (wrap, bndr_id) <- setSrcSpan nm_loc (tcPatBndr penv name pat_ty)         ; (pat', res) <- tcExtendIdEnv1 name bndr_id $                          tc_lpat pat (mkCheckExpType $ idType bndr_id)@@ -372,9 +372,10 @@             --             -- If you fix it, don't forget the bindInstsOfPatIds!         ; pat_ty <- readExpType pat_ty-        ; return (mkHsWrapPat wrap (AsPat (L nm_loc bndr_id) pat') pat_ty, res) }+        ; return (mkHsWrapPat wrap (AsPat x (L nm_loc bndr_id) pat') pat_ty,+                  res) } -tc_pat penv (ViewPat expr pat _) overall_pat_ty thing_inside+tc_pat penv (ViewPat _ expr pat) overall_pat_ty thing_inside   = do  {          -- Expr must have type `forall a1...aN. OPT' -> B`          -- where overall_pat_ty is an instance of OPT'.@@ -401,30 +402,35 @@                --                (overall_pat_ty -> inf_res_ty)               expr_wrap = expr_wrap2' <.> expr_wrap1               doc = text "When checking the view pattern function:" <+> (ppr expr)-        ; return (ViewPat (mkLHsWrap expr_wrap expr') pat' overall_pat_ty, res) }+        ; return (ViewPat overall_pat_ty (mkLHsWrap expr_wrap expr') pat', res)}  -- Type signatures in patterns -- See Note [Pattern coercions] below-tc_pat penv (SigPatIn pat sig_ty) pat_ty thing_inside+tc_pat penv (SigPat sig_ty pat ) pat_ty thing_inside   = do  { (inner_ty, tv_binds, wcs, wrap) <- tcPatSig (inPatBind penv)                                                             sig_ty pat_ty-        ; (pat', res) <- tcExtendTyVarEnv2 wcs      $-                         tcExtendTyVarEnv2 tv_binds $+                -- Using tcExtendNameTyVarEnv is appropriate here (not scopeTyVars2)+                -- because we're not really bringing fresh tyvars into scope.+                -- We're *naming* existing tyvars. Note that it is OK for a tyvar+                -- from an outer scope to mention one of these tyvars in its kind.+        ; (pat', res) <- tcExtendNameTyVarEnv wcs      $+                         tcExtendNameTyVarEnv tv_binds $                          tc_lpat pat (mkCheckExpType inner_ty) penv thing_inside         ; pat_ty <- readExpType pat_ty-        ; return (mkHsWrapPat wrap (SigPatOut pat' inner_ty) pat_ty, res) }+        ; return (mkHsWrapPat wrap (SigPat inner_ty pat') pat_ty, res) }  ------------------------ -- Lists, tuples, arrays-tc_pat penv (ListPat pats _ Nothing) pat_ty thing_inside+tc_pat penv (ListPat Nothing pats) pat_ty thing_inside   = do  { (coi, elt_ty) <- matchExpectedPatTy matchExpectedListTy penv pat_ty         ; (pats', res) <- tcMultiple (\p -> tc_lpat p (mkCheckExpType elt_ty))                                      pats penv thing_inside         ; pat_ty <- readExpType pat_ty-        ; return (mkHsWrapPat coi (ListPat pats' elt_ty Nothing) pat_ty, res)-        }+        ; return (mkHsWrapPat coi+                         (ListPat (ListPatTc elt_ty Nothing) pats') pat_ty, res)+} -tc_pat penv (ListPat pats _ (Just (_,e))) pat_ty thing_inside+tc_pat penv (ListPat (Just e) pats) pat_ty thing_inside   = do  { tau_pat_ty <- expTypeToType pat_ty         ; ((pats', res, elt_ty), e')             <- tcSyntaxOpGen ListOrigin e [SynType (mkCheckExpType tau_pat_ty)]@@ -433,18 +439,10 @@                  do { (pats', res) <- tcMultiple (\p -> tc_lpat p (mkCheckExpType elt_ty))                                                  pats penv thing_inside                     ; return (pats', res, elt_ty) }-        ; return (ListPat pats' elt_ty (Just (tau_pat_ty,e')), res)-        }--tc_pat penv (PArrPat pats _) pat_ty thing_inside-  = do  { (coi, elt_ty) <- matchExpectedPatTy matchExpectedPArrTy penv pat_ty-        ; (pats', res) <- tcMultiple (\p -> tc_lpat p (mkCheckExpType elt_ty))-                                     pats penv thing_inside-        ; pat_ty <- readExpType pat_ty-        ; return (mkHsWrapPat coi (PArrPat pats' elt_ty) pat_ty, res)-        }+        ; return (ListPat (ListPatTc elt_ty (Just (tau_pat_ty,e'))) pats', res)+} -tc_pat penv (TuplePat pats boxity _) pat_ty thing_inside+tc_pat penv (TuplePat _ pats boxity) pat_ty thing_inside   = do  { let arity = length pats               tc = tupleTyCon boxity arity         ; (coi, arg_tys) <- matchExpectedPatTy (matchExpectedTyConApp tc)@@ -463,19 +461,19 @@         -- This is a pretty odd place to make the switch, but         -- it was easy to do.         ; let-              unmangled_result = TuplePat pats' boxity con_arg_tys+              unmangled_result = TuplePat con_arg_tys pats' boxity                                  -- pat_ty /= pat_ty iff coi /= IdCo               possibly_mangled_result                 | gopt Opt_IrrefutableTuples dflags &&-                  isBoxed boxity            = LazyPat (noLoc unmangled_result)-                | otherwise                 = unmangled_result+                  isBoxed boxity      = LazyPat noExt (noLoc unmangled_result)+                | otherwise           = unmangled_result          ; pat_ty <- readExpType pat_ty         ; ASSERT( con_arg_tys `equalLength` pats ) -- Syntactically enforced           return (mkHsWrapPat coi possibly_mangled_result pat_ty, res)         } -tc_pat penv (SumPat pat alt arity _) pat_ty thing_inside+tc_pat penv (SumPat _ pat alt arity ) pat_ty thing_inside   = do  { let tc = sumTyCon arity         ; (coi, arg_tys) <- matchExpectedPatTy (matchExpectedTyConApp tc)                                                penv pat_ty@@ -484,7 +482,8 @@         ; (pat', res) <- tc_lpat pat (mkCheckExpType (con_arg_tys `getNth` (alt - 1)))                                  penv thing_inside         ; pat_ty <- readExpType pat_ty-        ; return (mkHsWrapPat coi (SumPat pat' alt arity con_arg_tys) pat_ty, res)+        ; return (mkHsWrapPat coi (SumPat con_arg_tys pat' alt arity) pat_ty+                 , res)         }  ------------------------@@ -494,12 +493,12 @@  ------------------------ -- Literal patterns-tc_pat penv (LitPat simple_lit) pat_ty thing_inside+tc_pat penv (LitPat x simple_lit) pat_ty thing_inside   = do  { let lit_ty = hsLitType simple_lit         ; wrap   <- tcSubTypePat penv pat_ty lit_ty         ; res    <- thing_inside         ; pat_ty <- readExpType pat_ty-        ; return ( mkHsWrapPat wrap (LitPat (convertLit simple_lit)) pat_ty+        ; return ( mkHsWrapPat wrap (LitPat x (convertLit simple_lit)) pat_ty                  , res) }  ------------------------@@ -520,7 +519,7 @@ -- where lit_ty is the type of the overloaded literal 5. -- -- When there is no negation, neg_lit_ty and lit_ty are the same-tc_pat _ (NPat (L l over_lit) mb_neg eq _) pat_ty thing_inside+tc_pat _ (NPat _ (L l over_lit) mb_neg eq) pat_ty thing_inside   = do  { let orig = LiteralOrigin over_lit         ; ((lit', mb_neg'), eq')             <- tcSyntaxOp orig eq [SynType pat_ty, SynAny]@@ -538,7 +537,7 @@          ; res <- thing_inside         ; pat_ty <- readExpType pat_ty-        ; return (NPat (L l lit') mb_neg' eq' pat_ty, res) }+        ; return (NPat pat_ty (L l lit') mb_neg' eq', res) }  {- Note [NPlusK patterns]@@ -569,7 +568,8 @@ -}  -- See Note [NPlusK patterns]-tc_pat penv (NPlusKPat (L nm_loc name) (L loc lit) _ ge minus _) pat_ty thing_inside+tc_pat penv (NPlusKPat _ (L nm_loc name) (L loc lit) _ ge minus) pat_ty+              thing_inside   = do  { pat_ty <- expTypeToType pat_ty         ; let orig = LiteralOrigin lit         ; (lit1', ge')@@ -598,15 +598,15 @@          ; let minus'' = minus' { syn_res_wrap =                                     minus_wrap <.> syn_res_wrap minus' }-              pat' = NPlusKPat (L nm_loc bndr_id) (L loc lit1') lit2'-                               ge' minus'' pat_ty+              pat' = NPlusKPat pat_ty (L nm_loc bndr_id) (L loc lit1') lit2'+                               ge' minus''         ; return (pat', res) }  -- HsSpliced is an annotation produced by 'RnSplice.rnSplicePat'. -- Here we get rid of it and add the finalizers to the global environment. -- -- See Note [Delaying modFinalizers in untyped splices] in RnSplice.-tc_pat penv (SplicePat (HsSpliced mod_finalizers (HsSplicedPat pat)))+tc_pat penv (SplicePat _ (HsSpliced _ mod_finalizers (HsSplicedPat pat)))             pat_ty thing_inside   = do addModFinalizersWithLclEnv mod_finalizers        tc_pat penv pat pat_ty thing_inside@@ -982,14 +982,16 @@   where     tc_field :: Checker (LHsRecField GhcRn (LPat GhcRn))                         (LHsRecField GhcTcId (LPat GhcTcId))-    tc_field (L l (HsRecField (L loc (FieldOcc (L lr rdr) sel)) pat pun)) penv+    tc_field (L l (HsRecField (L loc (FieldOcc sel (L lr rdr))) pat pun)) penv                                                                     thing_inside       = do { sel'   <- tcLookupId sel            ; pat_ty <- setSrcSpan loc $ find_field_ty sel                                           (occNameFS $ rdrNameOcc rdr)            ; (pat', res) <- tcConArg (pat, pat_ty) penv thing_inside-           ; return (L l (HsRecField (L loc (FieldOcc (L lr rdr) sel')) pat'+           ; return (L l (HsRecField (L loc (FieldOcc sel' (L lr rdr))) pat'                                                                     pun), res) }+    tc_field (L _ (HsRecField (L _ (XFieldOcc _)) _ _)) _ _+           = panic "tcConArgs"      find_field_ty :: Name -> FieldLabelString -> TcM TcType     find_field_ty sel lbl
typecheck/TcPatSyn.hs view
@@ -9,8 +9,8 @@ {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE TypeFamilies #-} -module TcPatSyn ( tcInferPatSynDecl, tcCheckPatSynDecl-                , tcPatSynBuilderBind, tcPatSynBuilderOcc, nonBidirectionalErr+module TcPatSyn ( tcPatSynDecl, tcPatSynBuilderBind+                , tcPatSynBuilderOcc, nonBidirectionalErr   ) where  import GhcPrelude@@ -53,7 +53,7 @@ import Bag import Util import ErrUtils-import Control.Monad ( zipWithM )+import Control.Monad ( zipWithM, when ) import Data.List( partition )  #include "HsVersions.h"@@ -66,26 +66,82 @@ ************************************************************************ -} +tcPatSynDecl :: PatSynBind GhcRn GhcRn+             -> Maybe TcSigInfo+             -> TcM (LHsBinds GhcTc, TcGblEnv)+tcPatSynDecl psb@(PSB { psb_id = L _ name, psb_args = details }) mb_sig+  = recoverM recover $+    case mb_sig of+      Nothing                 -> tcInferPatSynDecl psb+      Just (TcPatSynSig tpsi) -> tcCheckPatSynDecl psb tpsi+      _ -> panic "tcPatSynDecl"++  where+    -- See Note [Pattern synonym error recovery]+    recover = do { matcher_name <- newImplicitBinder name mkMatcherOcc+                 ; let placeholder = AConLike $ PatSynCon $+                                     mk_placeholder matcher_name+                 ; gbl_env <- tcExtendGlobalEnv [placeholder] getGblEnv+                 ; return (emptyBag, gbl_env) }++    (_arg_names, _rec_fields, is_infix) = collectPatSynArgInfo details+    mk_placeholder matcher_name+      = mkPatSyn name is_infix+                        ([mkTyVarBinder Specified alphaTyVar], []) ([], [])+                        [] -- Arg tys+                        alphaTy+                        (matcher_id, True) Nothing+                        []  -- Field labels+       where+         -- The matcher_id is used only by the desugarer, so actually+         -- and error-thunk would probably do just as well here.+         matcher_id = mkLocalId matcher_name $+                      mkSpecForAllTys [alphaTyVar] alphaTy++tcPatSynDecl (XPatSynBind {}) _ = panic "tcPatSynDecl"++{- Note [Pattern synonym error recovery]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If type inference for a pattern synonym fails , we can't continue with+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).+Hence the 'when insoluble failM' in tcInferPatSyn.++But does that abort compilation entirely?  No -- we can recover+and carry on, just as we do for value bindings, provided we plug in+placeholder for the pattern synonym.  The goal of the placeholder+is not to cause a raft of follow-on errors.  I've used the simplest+thing for now, but we might need to elaborate it a bit later.  (e.g.+I've given it zero args, which may cause knock-on errors if it is+used in a pattern.) But it'll do for now.+-}+ tcInferPatSynDecl :: PatSynBind GhcRn GhcRn                   -> TcM (LHsBinds GhcTc, TcGblEnv) tcInferPatSynDecl PSB{ psb_id = lname@(L _ name), psb_args = details,                        psb_def = lpat, psb_dir = dir }   = addPatSynCtxt lname $     do { traceTc "tcInferPatSynDecl {" $ ppr name-       ; tcCheckPatSynPat lpat         ; let (arg_names, rec_fields, is_infix) = collectPatSynArgInfo details        ; (tclvl, wanted, ((lpat', args), pat_ty))             <- pushLevelAndCaptureConstraints  $-               tcInferNoInst $ \ exp_ty ->-               tcPat PatSyn lpat exp_ty $+               tcInferNoInst                   $ \ exp_ty ->+               tcPat PatSyn lpat exp_ty        $                mapM tcLookupId arg_names         ; let named_taus = (name, pat_ty) : map (\arg -> (getName arg, varType arg)) args -       ; (qtvs, req_dicts, ev_binds, _) <- simplifyInfer tclvl NoRestrictions []-                                                         named_taus wanted+       ; (qtvs, req_dicts, ev_binds, insoluble)+               <- simplifyInfer tclvl NoRestrictions [] named_taus wanted +       ; when insoluble failM+              -- simplifyInfer doesn't fail if there are errors.  But to avoid+              -- knock-on errors, or even crashes, we want to stop here.+              -- See Note [Pattern synonym error recovery]+        ; let (ex_tvs, prov_dicts) = tcCollectEx lpat'              ex_tv_set  = mkVarSet ex_tvs              univ_tvs   = filterOut (`elemVarSet` ex_tv_set) qtvs@@ -96,15 +152,63 @@              prov_theta = map evVarPred filtered_prov_dicts              -- Filtering: see Note [Remove redundant provided dicts] +       -- Report bad universal type variables+       -- See Note [Type variables whose kind is captured]+       ; let bad_tvs    = [ tv | tv <- univ_tvs+                               , tyCoVarsOfType (tyVarKind tv)+                                 `intersectsVarSet` ex_tv_set ]+       ; mapM_ (badUnivTvErr ex_tvs) bad_tvs++       -- Report coercions that esacpe+       -- See Note [Coercions that escape]+       ; args <- mapM zonkId args+       ; let bad_args = [ (arg, bad_cos) | arg <- args ++ prov_dicts+                              , let bad_cos = filterDVarSet isId $+                                              (tyCoVarsOfTypeDSet (idType arg))+                              , not (isEmptyDVarSet bad_cos) ]+       ; mapM_ dependentArgErr bad_args+        ; traceTc "tcInferPatSynDecl }" $ (ppr name $$ ppr ex_tvs)        ; tc_patsyn_finish lname dir is_infix lpat'                           (mkTyVarBinders Inferred univ_tvs                             , req_theta,  ev_binds, req_dicts)                           (mkTyVarBinders Inferred ex_tvs-                            , mkTyVarTys ex_tvs, prov_theta, map EvId filtered_prov_dicts)+                            , mkTyVarTys ex_tvs, prov_theta+                            , map (EvExpr . evId) filtered_prov_dicts)                           (map nlHsVar args, map idType args)                           pat_ty rec_fields }+tcInferPatSynDecl (XPatSynBind _) = panic "tcInferPatSynDecl" +badUnivTvErr :: [TyVar] -> TyVar -> TcM ()+-- See Note [Type variables whose kind is captured]+badUnivTvErr ex_tvs bad_tv+  = addErrTc $+    vcat [ text "Universal type variable" <+> quotes (ppr bad_tv)+                <+> text "has existentially bound kind:"+         , nest 2 (ppr_with_kind bad_tv)+         , hang (text "Existentially-bound variables:")+              2 (vcat (map ppr_with_kind ex_tvs))+         , text "Probable fix: give the pattern synoym a type signature"+         ]+  where+    ppr_with_kind tv = ppr tv <+> dcolon <+> ppr (tyVarKind tv)++dependentArgErr :: (Id, DTyCoVarSet) -> TcM ()+-- See Note [Coercions that escape]+dependentArgErr (arg, bad_cos)+  = addErrTc $+    vcat [ text "Iceland Jack!  Iceland Jack! Stop torturing me!"+         , hang (text "Pattern-bound variable")+              2 (ppr arg <+> dcolon <+> ppr (idType arg))+         , nest 2 $+           hang (text "has a type that mentions pattern-bound coercion"+                 <> plural bad_co_list <> colon)+              2 (pprWithCommas ppr bad_co_list)+         , text "Hint: use -fprint-explicit-coercions to see the coercions"+         , text "Probable fix: add a pattern signature" ]+  where+    bad_co_list = dVarSetElems bad_cos+ {- Note [Remove redundant provided dicts] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Recall that@@ -126,6 +230,65 @@  The pattern (Bam x y) binds two (Ord a) dictionaries, but we only need one.  Agian mkMimimalWithSCs removes the redundant one.++Note [Type variables whose kind is captured]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider+  data AST a = Sym [a]+  class Prj s where { prj :: [a] -> Maybe (s a)+  pattern P x <= Sym (prj -> Just x)++Here we get a matcher with this type+  $mP :: forall s a. Prj s => AST a -> (s a -> r) -> r -> r++No problem.  But note that 's' is not fixed by the type of the+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+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+But neither is 's' itself existentially bound, so the forall (s::k->*)+can't go in the inner forall either.  (What would the matcher apply+the continuation to?)++So we just fail in this case, with a pretty terrible error message.+Maybe we could do better, but I can't see how.  (It'd be possible to+default 's' to (Any k), but that probably isn't what the user wanted,+and it not straightforward to implement, because by the time we see+the problem, simplifyInfer has already skolemised 's'.)++This stuff can only happen in the presence of view patterns, with+PolyKinds, so it's a bit of a corner case.++Note [Coercions that escape]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Trac #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+           -> ((Bool ~ k) => TypeRep Bool (a |> co_a2sv) -> r)+           -> (Void# -> r)+           -> r++What is that co_a2sv :: Bool ~# *??  It was bound (via a superclass+selection) by the pattern being matched; and indeed it is implicit in+the context (Bool ~ k).  You could imagine trying to extract it like+this:+   $mSO :: forall (r :: TYPE rep) kk (a :: k).+           TypeRep k a+           -> ( co :: ((Bool :: *) ~ (k :: *)) =>+                  let co_a2sv = sc_sel co+                  in TypeRep Bool (a |> co_a2sv) -> r)+           -> (Void# -> r)+           -> r++But we simply don't allow that in types.  Maybe one day but not now.++How to detect this situation?  We just look for free coercion variables+in the types of any of the arguments to the matcher.  The error message+is not very helpful, but at least we don't get a Lint error. -}  tcCheckPatSynDecl :: PatSynBind GhcRn GhcRn@@ -145,8 +308,6 @@          vcat [ ppr implicit_tvs, ppr explicit_univ_tvs, ppr req_theta               , ppr explicit_ex_tvs, ppr prov_theta, ppr sig_body_ty ] -       ; tcCheckPatSynPat lpat-        ; (arg_tys, pat_ty) <- case tcSplitFunTysN decl_arity sig_body_ty of                                  Right stuff  -> return stuff                                  Left missing -> wrongNumberOfParmsErr name decl_arity missing@@ -161,7 +322,7 @@             2 (text "mentions existential type variable" <> plural bad_tvs                <+> pprQuotedList bad_tvs) -         -- See Note [The pattern-synonym signature splitting rule]+         -- See Note [The pattern-synonym signature splitting rule] in TcSigs        ; let univ_fvs = closeOverKinds $                         (tyCoVarsOfTypes (pat_ty : req_theta) `extendVarSetList` explicit_univ_tvs)              (extra_univ, extra_ex) = partition ((`elemVarSet` univ_fvs) . binderVar) implicit_tvs@@ -177,6 +338,9 @@            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@@ -227,6 +391,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"  {- [Pattern synonyms and higher rank types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -240,6 +405,98 @@ 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)+++Note [The pattern-synonym signature splitting rule]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given a pattern signature, we must split+     the kind-generalised variables, and+     the implicitly-bound variables+into universal and existential.  The rule is this+(see discussion on Trac #11224):++     The universal tyvars are the ones mentioned in+          - univ_tvs: the user-specified (forall'd) universals+          - req_theta+          - res_ty+     The existential tyvars are all the rest++For example++   pattern P :: () => b -> T a+   pattern P x = ...++Here 'a' is universal, and 'b' is existential.  But there is a wrinkle:+how do we split the arg_tys from req_ty?  Consider++   pattern Q :: () => b -> S c -> T a+   pattern Q x = ...++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).++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,+and hence which variables are existential and which are universal.++And that in turn is why TcPatSynInfo has a separate field,+patsig_implicit_bndrs, to capture the implicitly bound type variables,+because we don't yet know how to split them up.++It's a slight compromise, because it means we don't really know the+pattern synonym's real signature until we see its declaration.  So,+for example, in hs-boot file, we may need to think what to do...+(eg don't have any implicitly-bound variables).++ Note [Checking against a pattern signature] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When checking the actual supplied pattern against the pattern synonym@@ -437,9 +694,9 @@                 (args, arg_tys) pat_ty   = do { rr_name <- newNameAt (mkTyVarOcc "rep") loc        ; tv_name <- newNameAt (mkTyVarOcc "r")   loc-       ; let rr_tv  = mkTcTyVar rr_name runtimeRepTy vanillaSkolemTv+       ; let rr_tv  = mkTyVar rr_name runtimeRepTy              rr     = mkTyVarTy rr_tv-             res_tv = mkTcTyVar tv_name (tYPE rr) vanillaSkolemTv+             res_tv = mkTyVar tv_name (tYPE rr)              res_ty = mkTyVarTy res_tv              is_unlifted = null args && null prov_dicts              (cont_args, cont_arg_tys)@@ -473,35 +730,32 @@                            mkHsCaseAlt lwpat fail']              body = mkLHsWrap (mkWpLet req_ev_binds) $                     L (getLoc lpat) $-                    HsCase (nlHsVar scrutinee) $+                    HsCase noExt (nlHsVar scrutinee) $                     MG{ mg_alts = L (getLoc lpat) cases-                      , mg_arg_tys = [pat_ty]-                      , mg_res_ty = res_ty+                      , mg_ext = MatchGroupTc [pat_ty] res_ty                       , mg_origin = Generated                       }              body' = noLoc $-                     HsLam $+                     HsLam noExt $                      MG{ mg_alts = noLoc [mkSimpleMatch LambdaExpr                                                         args body]-                       , mg_arg_tys = [pat_ty, cont_ty, fail_ty]-                       , mg_res_ty = res_ty+                       , mg_ext = MatchGroupTc [pat_ty, cont_ty, fail_ty] res_ty                        , mg_origin = Generated                        }              match = mkMatch (mkPrefixFunRhs (L loc name)) []                              (mkHsLams (rr_tv:res_tv:univ_tvs)-                             req_dicts body')-                             (noLoc EmptyLocalBinds)+                                       req_dicts body')+                             (noLoc (EmptyLocalBinds noExt))              mg :: MatchGroup GhcTc (LHsExpr GhcTc)              mg = MG{ mg_alts = L (getLoc match) [match]-                    , mg_arg_tys = []-                    , mg_res_ty = res_ty+                    , mg_ext = MatchGroupTc [] res_ty                     , mg_origin = Generated                     } -       ; let bind = FunBind{ fun_id = L loc matcher_id+       ; let bind = FunBind{ fun_ext = emptyNameSet+                           , fun_id = L loc matcher_id                            , fun_matches = mg                            , fun_co_fn = idHsWrapper-                           , bind_fvs = emptyNameSet                            , fun_tick = [] }              matcher_bind = unitBag (noLoc bind) @@ -512,12 +766,10 @@  mkPatSynRecSelBinds :: PatSyn                     -> [FieldLabel]  -- ^ Visible field labels-                    -> HsValBinds GhcRn+                    -> [(Id, LHsBind GhcRn)] mkPatSynRecSelBinds ps fields-  = ValBindsOut selector_binds sigs-  where-    (sigs, selector_binds) = unzip (map mkRecSel fields)-    mkRecSel fld_lbl = mkOneRecordSelector [PatSynCon ps] (RecSelPatSyn ps) fld_lbl+  = [ mkOneRecordSelector [PatSynCon ps] (RecSelPatSyn ps) fld_lbl+    | fld_lbl <- fields ]  isUnidirectional :: HsPatSynDir a -> Bool isUnidirectional Unidirectional          = True@@ -577,16 +829,21 @@    | Right match_group <- mb_match_group  -- Bidirectional   = do { patsyn <- tcLookupPatSyn name-       ; let Just (builder_id, need_dummy_arg) = patSynBuilder patsyn-                   -- Bidirectional, so patSynBuilder returns Just+       ; case patSynBuilder patsyn of {+           Nothing -> return emptyBag ;+             -- This case happens if we found a type error in the+             -- pattern synonym, recovered, and put a placeholder+             -- with patSynBuilder=Nothing in the environment -             match_group' | need_dummy_arg = add_dummy_arg match_group+           Just (builder_id, need_dummy_arg) ->  -- Normal case+    do { -- Bidirectional, so patSynBuilder returns Just+         let match_group' | need_dummy_arg = add_dummy_arg match_group                           | otherwise      = match_group -             bind = FunBind { fun_id      = L loc (idName builder_id)+             bind = FunBind { fun_ext = placeHolderNamesTc+                            , fun_id      = L loc (idName builder_id)                             , fun_matches = match_group'                             , fun_co_fn   = idHsWrapper-                            , bind_fvs    = placeHolderNamesTc                             , fun_tick    = [] }               sig = completeSigFromId (PatSynCtxt name) builder_id@@ -595,7 +852,7 @@          ppr patsyn $$ ppr builder_id <+> dcolon <+> ppr (idType builder_id)        ; (builder_binds, _) <- tcPolyCheck emptyPragEnv sig (noLoc bind)        ; traceTc "tcPatSynBuilderBind }" $ ppr builder_binds-       ; return builder_binds }+       ; return builder_binds } } }    | otherwise = panic "tcPatSynBuilderBind"  -- Both cases dealt with   where@@ -607,11 +864,11 @@      mk_mg :: LHsExpr GhcRn -> MatchGroup GhcRn (LHsExpr GhcRn)     mk_mg body = mkMatchGroup Generated [builder_match]-             where-               builder_args  = [L loc (VarPat (L loc n)) | L loc n <- args]-               builder_match = mkMatch (mkPrefixFunRhs (L loc name))-                                       builder_args body-                                       (noLoc EmptyLocalBinds)+          where+            builder_args  = [L loc (VarPat noExt (L loc n)) | L loc n <- args]+            builder_match = mkMatch (mkPrefixFunRhs (L loc name))+                                    builder_args body+                                    (noLoc (EmptyLocalBinds noExt))      args = case details of               PrefixCon args     -> args@@ -624,12 +881,13 @@       = mg { mg_alts = L l [L loc (match { m_pats = nlWildPatName : pats })] }     add_dummy_arg other_mg = pprPanic "add_dummy_arg" $                              pprMatches other_mg+tcPatSynBuilderBind (XPatSynBind _) = panic "tcPatSynBuilderBind"  tcPatSynBuilderOcc :: PatSyn -> TcM (HsExpr GhcTcId, TcSigmaType) -- monadic only for failure tcPatSynBuilderOcc ps   | Just (builder_id, add_void_arg) <- builder-  , let builder_expr = HsConLikeOut (PatSynCon ps)+  , let builder_expr = HsConLikeOut noExt (PatSynCon ps)         builder_ty   = idType builder_id   = return $     if add_void_arg@@ -668,14 +926,14 @@                     -> Either MsgDoc (HsExpr GhcRn)     mkPrefixConExpr lcon@(L loc _) pats       = do { exprs <- mapM go pats-           ; return (foldl (\x y -> HsApp (L loc x) y)-                           (HsVar lcon) exprs) }+           ; return (foldl (\x y -> HsApp noExt (L loc x) y)+                           (HsVar noExt lcon) exprs) }      mkRecordConExpr :: Located Name -> HsRecFields GhcRn (LPat GhcRn)                     -> Either MsgDoc (HsExpr GhcRn)     mkRecordConExpr con fields       = do { exprFields <- mapM go fields-           ; return (RecordCon con PlaceHolder noPostTcExpr exprFields) }+           ; return (RecordCon noExt con exprFields) }      go :: LPat GhcRn -> Either MsgDoc (LHsExpr GhcRn)     go (L loc p) = L loc <$> go1 p@@ -687,48 +945,50 @@           InfixCon l r  -> mkPrefixConExpr con [l,r]           RecCon fields -> mkRecordConExpr con fields -    go1 (SigPatIn pat _) = go1 (unLoc pat)+    go1 (SigPat _ pat) = go1 (unLoc pat)         -- See Note [Type signatures and the builder expression] -    go1 (VarPat (L l var))+    go1 (VarPat _ (L l var))         | var `elemNameSet` lhsVars-        = return $ HsVar (L l var)+        = return $ HsVar noExt (L l var)         | otherwise         = Left (quotes (ppr var) <+> text "is not bound by the LHS of the pattern synonym")-    go1 (ParPat pat)                = fmap HsPar $ go pat-    go1 (PArrPat pats ptt)          = do { exprs <- mapM go pats-                                         ; return $ ExplicitPArr ptt exprs }-    go1 p@(ListPat pats ptt reb)-      | Nothing <- reb              = do { exprs <- mapM go pats-                                         ; return $ ExplicitList ptt Nothing exprs }+    go1 (ParPat _ pat)          = fmap (HsPar noExt) $ go pat+    go1 p@(ListPat reb pats)+      | Nothing <- reb = do { exprs <- mapM go pats+                            ; return $ ExplicitList noExt Nothing exprs }       | otherwise                   = notInvertibleListPat p-    go1 (TuplePat pats box _)       = do { exprs <- mapM go pats-                                         ; return $ ExplicitTuple-                                              (map (noLoc . Present) exprs) box }-    go1 (SumPat pat alt arity _)    = do { expr <- go1 (unLoc pat)-                                         ; return $ ExplicitSum alt arity (noLoc expr) PlaceHolder+    go1 (TuplePat _ pats box)       = do { exprs <- mapM go pats+                                         ; return $ ExplicitTuple noExt+                                           (map (noLoc . (Present noExt)) exprs)+                                                                           box }+    go1 (SumPat _ pat alt arity)    = do { expr <- go1 (unLoc pat)+                                         ; return $ ExplicitSum noExt alt arity+                                                                   (noLoc expr)                                          }-    go1 (LitPat lit)                = return $ HsLit lit-    go1 (NPat (L _ n) mb_neg _ _)-        | Just neg <- mb_neg        = return $ unLoc $ nlHsSyntaxApps neg [noLoc (HsOverLit n)]-        | otherwise                 = return $ HsOverLit n+    go1 (LitPat _ lit)              = return $ HsLit noExt lit+    go1 (NPat _ (L _ n) mb_neg _)+        | Just neg <- mb_neg        = return $ unLoc $ nlHsSyntaxApps neg+                                                     [noLoc (HsOverLit noExt n)]+        | otherwise                 = return $ HsOverLit noExt n     go1 (ConPatOut{})               = panic "ConPatOut in output of renamer"-    go1 (SigPatOut{})               = panic "SigPatOut in output of renamer"     go1 (CoPat{})                   = panic "CoPat in output of renamer"-    go1 (SplicePat (HsSpliced _ (HsSplicedPat pat)))+    go1 (SplicePat _ (HsSpliced _ _ (HsSplicedPat pat)))                                     = go1 pat-    go1 (SplicePat (HsSpliced{}))   = panic "Invalid splice variety"+    go1 (SplicePat _ (HsSpliced{})) = panic "Invalid splice variety"      -- The following patterns are not invertible.-    go1 p@(BangPat {})                     = notInvertible p -- #14112-    go1 p@(LazyPat {})                     = notInvertible p-    go1 p@(WildPat {})                     = notInvertible p-    go1 p@(AsPat {})                       = notInvertible p-    go1 p@(ViewPat {})                     = notInvertible p-    go1 p@(NPlusKPat {})                   = notInvertible p-    go1 p@(SplicePat (HsTypedSplice {}))   = notInvertible p-    go1 p@(SplicePat (HsUntypedSplice {})) = notInvertible p-    go1 p@(SplicePat (HsQuasiQuote {}))    = notInvertible p+    go1 p@(BangPat {})                       = notInvertible p -- #14112+    go1 p@(LazyPat {})                       = notInvertible p+    go1 p@(WildPat {})                       = notInvertible p+    go1 p@(AsPat {})                         = notInvertible p+    go1 p@(ViewPat {})                       = notInvertible p+    go1 p@(NPlusKPat {})                     = notInvertible p+    go1 p@(XPat {})                          = notInvertible p+    go1 p@(SplicePat _ (HsTypedSplice {}))   = notInvertible p+    go1 p@(SplicePat _ (HsUntypedSplice {})) = notInvertible p+    go1 p@(SplicePat _ (HsQuasiQuote {}))    = notInvertible p+    go1 p@(SplicePat _ (XSplice {}))         = notInvertible p      notInvertible p = Left (not_invertible_msg p) @@ -832,69 +1092,7 @@ want to avoid difficult to decipher core lint errors!  -} -tcCheckPatSynPat :: LPat GhcRn -> TcM ()-tcCheckPatSynPat = go-  where-    go :: LPat GhcRn -> TcM ()-    go = addLocM go1 -    go1 :: Pat GhcRn -> TcM ()-    -- See Note [Bad patterns]-    go1 p@(AsPat _ _)         = asPatInPatSynErr p-    go1 p@NPlusKPat{}         = nPlusKPatInPatSynErr p--    go1   (ConPatIn _ info)   = mapM_ go (hsConPatArgs info)-    go1   VarPat{}            = return ()-    go1   WildPat{}           = return ()-    go1   (LazyPat pat)       = go pat-    go1   (ParPat pat)        = go pat-    go1   (BangPat pat)       = go pat-    go1   (PArrPat pats _)    = mapM_ go pats-    go1   (ListPat pats _ _)  = mapM_ go pats-    go1   (TuplePat pats _ _) = mapM_ go pats-    go1   (SumPat pat _ _ _)  = go pat-    go1   LitPat{}            = return ()-    go1   NPat{}              = return ()-    go1   (SigPatIn pat _)    = go pat-    go1   (ViewPat _ pat _)   = go pat-    go1   (SplicePat splice)-      | HsSpliced mod_finalizers (HsSplicedPat pat) <- splice-                              = do addModFinalizersWithLclEnv mod_finalizers-                                   go1 pat-      | otherwise             = panic "non-pattern from spliced thing"-    go1   ConPatOut{}         = panic "ConPatOut in output of renamer"-    go1   SigPatOut{}         = panic "SigPatOut in output of renamer"-    go1   CoPat{}             = panic "CoPat in output of renamer"--asPatInPatSynErr :: (SourceTextX p, OutputableBndrId p) => Pat p -> TcM a-asPatInPatSynErr pat-  = failWithTc $-    hang (text "Pattern synonym definition cannot contain as-patterns (@):")-       2 (ppr pat)--nPlusKPatInPatSynErr :: (SourceTextX p, OutputableBndrId p) => Pat p -> TcM a-nPlusKPatInPatSynErr pat-  = failWithTc $-    hang (text "Pattern synonym definition cannot contain n+k-pattern:")-       2 (ppr pat)--{- Note [Bad patterns]-~~~~~~~~~~~~~~~~~~~~~~-We don't currently allow as-patterns or n+k patterns in a pattern synonym.-Reason: consider-  pattern P x y = x@(Just y)--What would-  f (P Nothing False) = e-mean?  Presumably something like-  f Nothing@(Just False) = e-But as-patterns don't allow a pattern before the @ sign!  Perhaps they-should -- with p1@p2 meaning match both p1 and p2 -- but they don't-currently.  Hence bannning them in pattern synonyms.  Actually lifting-the restriction would be simple and well-defined.  See Trac #9793.--}-- nonBidirectionalErr :: Outputable name => name -> TcM a nonBidirectionalErr name = failWithTc $     text "non-bidirectional pattern synonym"@@ -918,20 +1116,19 @@     go = go1 . unLoc      go1 :: Pat GhcTc -> ([TyVar], [EvVar])-    go1 (LazyPat p)         = go p-    go1 (AsPat _ p)         = go p-    go1 (ParPat p)          = go p-    go1 (BangPat p)         = go p-    go1 (ListPat ps _ _)    = mergeMany . map go $ ps-    go1 (TuplePat ps _ _)   = mergeMany . map go $ ps-    go1 (SumPat p _ _ _)    = go p-    go1 (PArrPat ps _)      = mergeMany . map go $ ps-    go1 (ViewPat _ p _)     = go p-    go1 con@ConPatOut{}     = merge (pat_tvs con, pat_dicts con) $+    go1 (LazyPat _ p)      = go p+    go1 (AsPat _ _ p)      = go p+    go1 (ParPat _ p)       = go p+    go1 (BangPat _ p)      = go p+    go1 (ListPat _ ps)     = mergeMany . map go $ ps+    go1 (TuplePat _ ps _)  = mergeMany . map go $ ps+    go1 (SumPat _ p _ _)   = go p+    go1 (ViewPat _ _ p)    = go p+    go1 con@ConPatOut{}    = merge (pat_tvs con, pat_dicts con) $                               goConDetails $ pat_args con-    go1 (SigPatOut p _)     = go p-    go1 (CoPat _ p _)       = go1 p-    go1 (NPlusKPat n k _ geq subtract _)+    go1 (SigPat _ p)       = go p+    go1 (CoPat _ _ p _)    = go1 p+    go1 (NPlusKPat _ n k _ geq subtract)       = pprPanic "TODO: NPlusKPat" $ ppr n $$ ppr k $$ ppr geq $$ ppr subtract     go1 _                   = empty 
typecheck/TcPatSyn.hs-boot view
@@ -1,17 +1,15 @@ module TcPatSyn where  import HsSyn     ( PatSynBind, LHsBinds )-import TcRnTypes ( TcM, TcPatSynInfo )+import TcRnTypes ( TcM, TcSigInfo ) import TcRnMonad ( TcGblEnv) import Outputable ( Outputable ) import HsExtension ( GhcRn, GhcTc )--tcInferPatSynDecl :: PatSynBind GhcRn GhcRn-                  -> TcM (LHsBinds GhcTc, TcGblEnv)+import Data.Maybe  ( Maybe ) -tcCheckPatSynDecl :: PatSynBind GhcRn GhcRn-                  -> TcPatSynInfo-                  -> TcM (LHsBinds GhcTc, TcGblEnv)+tcPatSynDecl :: PatSynBind GhcRn GhcRn+             -> Maybe TcSigInfo+             -> TcM (LHsBinds GhcTc, TcGblEnv)  tcPatSynBuilderBind :: PatSynBind GhcRn GhcRn -> TcM (LHsBinds GhcTc) 
typecheck/TcPluginM.hs view
@@ -69,8 +69,8 @@                   , liftIO, traceTc ) import TcMType    ( TcTyVar, TcType ) import TcEnv      ( TcTyThing )-import TcEvidence ( TcCoercion, CoercionHole-                  , EvTerm, EvBind, mkGivenEvBind )+import TcEvidence ( TcCoercion, CoercionHole, EvTerm(..)+                  , EvExpr, EvBind, mkGivenEvBind ) import TcRnTypes  ( CtEvidence(..) ) import Var        ( EvVar ) @@ -170,10 +170,10 @@ -- | Create a new given constraint, with the supplied evidence.  This -- must not be invoked from 'tcPluginInit' or 'tcPluginStop', or it -- will panic.-newGiven :: CtLoc -> PredType -> EvTerm -> TcPluginM CtEvidence+newGiven :: CtLoc -> PredType -> EvExpr -> TcPluginM CtEvidence newGiven loc pty evtm = do    new_ev <- newEvVar pty-   setEvBind $ mkGivenEvBind new_ev evtm+   setEvBind $ mkGivenEvBind new_ev (EvExpr evtm)    return CtGiven { ctev_pred = pty, ctev_evar = new_ev, ctev_loc = loc }  -- | Create a fresh evidence variable.
typecheck/TcRnDriver.hs view
@@ -2,17 +2,19 @@ (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -\section[TcMovectle]{Typechecking a whole module}+\section[TcRnDriver]{Typechecking a whole module}  https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/TypeChecker -}  {-# LANGUAGE CPP #-}+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE NondecreasingIndentation #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleContexts #-}  module TcRnDriver (         tcRnStmt, tcRnExpr, TcRnExprMode(..), tcRnType,@@ -40,6 +42,7 @@         badReexportedBootThing,         checkBootDeclM,         missingBootThing,+        getRenamedStuff, RenamedStuff     ) where  import GhcPrelude@@ -58,11 +61,7 @@ import MkId import TidyPgm    ( globaliseAndTidyId ) import TysWiredIn ( unitTy, mkListTy )-#if defined(GHCI)-import DynamicLoading ( loadPlugins )-import Plugins ( tcPlugin )-#endif-+import Plugins import DynFlags import HsSyn import IfaceSyn ( ShowSub(..), showToHeader )@@ -135,6 +134,7 @@ import HsDumpAst import qualified Data.Set as S +import Control.DeepSeq import Control.Monad  #include "HsVersions.h"@@ -149,12 +149,12 @@  -- | Top level entry point for typechecker and renamer tcRnModule :: HscEnv-           -> HscSource+           -> ModSummary            -> Bool              -- True <=> save renamed syntax            -> HsParsedModule            -> IO (Messages, Maybe TcGblEnv) -tcRnModule hsc_env hsc_src save_rn_syntax+tcRnModule hsc_env mod_sum save_rn_syntax    parsedModule@HsParsedModule {hpm_module=L loc this_module}  | RealSrcSpan real_loc <- loc  = withTiming (pure dflags)@@ -163,12 +163,13 @@    initTc hsc_env hsc_src save_rn_syntax this_mod real_loc $           withTcPlugins hsc_env $ -          tcRnModuleTcRnM hsc_env hsc_src parsedModule pair+          tcRnModuleTcRnM hsc_env mod_sum parsedModule pair    | otherwise   = return ((emptyBag, unitBag err_msg), Nothing)    where+    hsc_src = ms_hsc_src mod_sum     dflags = hsc_dflags hsc_env     err_msg = mkPlainErrMsg (hsc_dflags hsc_env) loc $               text "Module does not have a RealSrcSpan:" <+> ppr this_mod@@ -187,13 +188,13 @@   tcRnModuleTcRnM :: HscEnv-                -> HscSource+                -> ModSummary                 -> HsParsedModule                 -> (Module, SrcSpan)                 -> TcRn TcGblEnv -- Factored out separately from tcRnModule so that a Core plugin can -- call the type checker directly-tcRnModuleTcRnM hsc_env hsc_src+tcRnModuleTcRnM hsc_env mod_sum                 (HsParsedModule {                    hpm_module =                       (L loc (HsModule maybe_mod export_ies@@ -203,8 +204,8 @@                 })                 (this_mod, prel_imp_loc)  = setSrcSpan loc $-   do { let { explicit_mod_hdr = isJust maybe_mod } ;-+   do { let { explicit_mod_hdr = isJust maybe_mod+            ; hsc_src = ms_hsc_src mod_sum };                 -- Load the hi-boot interface for this module, if any                 -- We do this now so that the boot_names can be passed                 -- to tcTyAndClassDecls, because the boot_names are@@ -241,7 +242,7 @@            -- If the whole module is warned about or deprecated           -- (via mod_deprec) record that in tcg_warns. If we do thereby add-          -- a WarnAll, it will override any subseqent depracations added to tcg_warns+          -- a WarnAll, it will override any subsequent deprecations added to tcg_warns         let { tcg_env1 = case mod_deprec of                          Just (L _ txt) -> tcg_env { tcg_warns = WarnAll txt }                          Nothing        -> tcg_env@@ -289,6 +290,8 @@                 -- add extra source files to tcg_dependent_files         addDependentFiles src_files ; +        tcg_env <- runTypecheckerPlugin mod_sum hsc_env tcg_env ;+                 -- Dump output and return         tcDump tcg_env ;         return tcg_env@@ -436,13 +439,12 @@                          tcg_ev_binds  = cur_ev_binds,                          tcg_imp_specs = imp_specs,                          tcg_rules     = rules,-                         tcg_vects     = vects,                          tcg_fords     = fords } = tcg_env             ; all_ev_binds = cur_ev_binds `unionBags` new_ev_binds } ; -      ; (bind_env, ev_binds', binds', fords', imp_specs', rules', vects')+      ; (bind_env, ev_binds', binds', fords', imp_specs', rules')             <- {-# SCC "zonkTopDecls" #-}-               zonkTopDecls all_ev_binds binds rules vects+               zonkTopDecls all_ev_binds binds rules                             imp_specs fords ;       ; traceTc "Tc11" empty @@ -451,7 +453,6 @@                                    tcg_ev_binds = ev_binds',                                    tcg_imp_specs = imp_specs',                                    tcg_rules    = rules',-                                   tcg_vects    = vects',                                    tcg_fords    = fords' } } ;        ; setGlobalTypeEnv tcg_env' final_type_env@@ -512,9 +513,10 @@             else do { (th_group, th_group_tail) <- findSplice th_ds                     ; case th_group_tail of                         { Nothing -> return () ;-                        ; Just (SpliceDecl (L loc _) _, _)+                        ; Just (SpliceDecl _ (L loc _) _, _)                             -> setSrcSpan loc $                                addErr (text "Declaration splices are not permitted inside top-level declarations added with addTopDecls")+                        ; Just (XSpliceDecl _, _) -> panic "tc_rn_src_decls"                         } ;                      -- Rename TH-generated top-level declarations@@ -541,7 +543,7 @@           { Nothing -> return (tcg_env, tcl_env)              -- If there's a splice, we must carry on-          ; Just (SpliceDecl (L loc splice) _, rest_ds) ->+          ; Just (SpliceDecl _ (L loc splice) _, rest_ds) ->             do { recordTopLevelSpliceLoc loc                   -- Rename the splice expression, and get its supporting decls@@ -552,6 +554,7 @@                ; setGblEnv (tcg_env `addTcgDUs` usesOnly splice_fvs) $                  tc_rn_src_decls (spliced_decls ++ rest_ds)                }+          ; Just (XSpliceDecl _, _) -> panic "tc_rn_src_decls"           }       } @@ -574,9 +577,9 @@                             , hs_fords  = for_decls                             , hs_defds  = def_decls                             , hs_ruleds = rule_decls-                            , hs_vects  = vect_decls                             , hs_annds  = _-                            , hs_valds  = ValBindsOut 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@@ -585,12 +588,12 @@                  -- Check for illegal declarations         ; case group_tail of-             Just (SpliceDecl d _, _) -> badBootDecl hsc_src "splice" d+             Just (SpliceDecl _ d _, _) -> badBootDecl hsc_src "splice" d+             Just (XSpliceDecl _, _) -> panic "tcRnHsBootDecls"              Nothing                  -> return ()         ; mapM_ (badBootDecl hsc_src "foreign") for_decls         ; mapM_ (badBootDecl hsc_src "default") def_decls         ; mapM_ (badBootDecl hsc_src "rule")    rule_decls-        ; mapM_ (badBootDecl hsc_src "vect")    vect_decls                  -- Typecheck type/class/instance decls         ; traceTc "Tc2 (boot)" empty@@ -1301,6 +1304,8 @@         traceRn "rn12" empty ;         (tcg_env, rn_decls) <- checkNoErrs $ rnSrcDecls group ;         traceRn "rn13" empty ;+        (tcg_env, rn_decls) <- runRenamerPlugin tcg_env rn_decls ;+        traceRn "rn13-plugin" empty ;          -- save the renamed syntax, if we want it         let { tcg_env'@@ -1321,8 +1326,8 @@                          hs_defds  = default_decls,                          hs_annds  = annotation_decls,                          hs_ruleds = rule_decls,-                         hs_vects  = vect_decls,-                         hs_valds  = hs_val_binds@(ValBindsOut val_binds val_sigs) })+                         hs_valds  = hs_val_binds@(XValBindsLR+                                              (NValBinds val_binds val_sigs)) })  = do {         -- Type-check the type and class decls, and all imported decls                 -- The latter come in via tycl_decls         traceTc "Tc2 (src)" empty ;@@ -1330,7 +1335,7 @@                 -- Source-language instances, including derivings,                 -- and import the supporting declarations         traceTc "Tc3" empty ;-        (tcg_env, inst_infos, ValBindsOut deriv_binds deriv_sigs)+        (tcg_env, inst_infos, XValBindsLR (NValBinds deriv_binds deriv_sigs))             <- tcTyClsInstDecls tycl_decls deriv_decls val_binds ;          setGblEnv tcg_env       $ do {@@ -1383,9 +1388,6 @@                 -- Rules         rules <- tcRules rule_decls ; -                -- Vectorisation declarations-        vects <- tcVectDecls vect_decls ;-                 -- Wrap up         traceTc "Tc7a" empty ;         let { all_binds = inst_binds     `unionBags`@@ -1404,7 +1406,6 @@                                  , tcg_sigs    = tcg_sigs tcg_env `unionNameSet` sig_names                                  , tcg_rules   = tcg_rules tcg_env                                                       ++ flattenRuleDecls rules-                                 , tcg_vects   = tcg_vects tcg_env ++ vects                                  , tcg_anns    = tcg_anns tcg_env ++ annotations                                  , tcg_ann_env = extendAnnEnvList (tcg_ann_env tcg_env) annotations                                  , tcg_fords   = tcg_fords tcg_env ++ foe_decls ++ fi_decls@@ -1675,7 +1676,7 @@         ; (ev_binds, main_expr)                <- checkConstraints skol_info [] [] $                   addErrCtxt mainCtxt    $-                  tcMonoExpr (L loc (HsVar (L loc main_name)))+                  tcMonoExpr (L loc (HsVar noExt (L loc main_name)))                              (mkCheckExpType io_ty)                  -- See Note [Root-main Id]@@ -1688,8 +1689,12 @@               ; root_main_id = Id.mkExportedVanillaId root_main_name                                                       (mkTyConApp ioTyCon [res_ty])               ; co  = mkWpTyApps [res_ty]-              ; rhs = mkHsDictLet ev_binds $-                      nlHsApp (mkLHsWrap co (nlHsVar run_main_id)) main_expr+              -- 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.+              ; rhs = nlHsApp (mkLHsWrap co (nlHsVar run_main_id)) $+                        mkHsDictLet ev_binds main_expr               ; main_bind = mkVarBind root_main_id rhs }          ; return (tcg_env { tcg_main  = Just main_name,@@ -1786,8 +1791,8 @@                                  (loadSrcInterface (text "runTcInteractive") m                                                    False mb_pkg) -       ; orphs <- fmap concat . forM (ic_imports icxt) $ \i ->-            case i of+       ; !orphs <- fmap (force . concat) . forM (ic_imports icxt) $ \i ->+            case i of                   -- force above: see #15111                 IIModule n -> getOrphans n Nothing                 IIDecl i ->                   let mb_pkg = sl_fs <$> ideclPkgQual i in@@ -1796,6 +1801,7 @@        ; let imports = emptyImportAvails {                             imp_orphs = orphs                         }+        ; (gbl_env, lcl_env) <- getEnvs        ; let gbl_env' = gbl_env {                            tcg_rdr_env      = ic_rn_gbl_env icxt@@ -1850,7 +1856,7 @@  {- Note [Initialising the type environment for GHCi] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Most of the the Ids in ic_things, defined by the user in 'let' stmts,+Most of the Ids in ic_things, defined by the user in 'let' stmts, have closed types. E.g.    ghci> let foo x y = x && not y @@ -1979,7 +1985,7 @@ tcUserStmt :: GhciLStmt GhcPs -> TcM (PlanResult, FixityEnv)  -- An expression typed at the prompt is treated very specially-tcUserStmt (L loc (BodyStmt expr _ _ _))+tcUserStmt (L loc (BodyStmt _ expr _ _))   = do  { (rn_expr, fvs) <- checkNoErrs (rnLExpr expr)                -- Don't try to typecheck if the renamer fails!         ; ghciStep <- getGhciStepIO@@ -1989,38 +1995,49 @@               matches   = [mkMatch (mkPrefixFunRhs (L loc fresh_it)) [] rn_expr                                    (noLoc emptyLocalBinds)]               -- [it = expr]-              the_bind  = L loc $ (mkTopFunBind FromSource (L loc fresh_it) matches) { bind_fvs = fvs }+              the_bind  = L loc $ (mkTopFunBind FromSource+                                     (L loc fresh_it) matches) { fun_ext = fvs }                           -- Care here!  In GHCi the expression might have                           -- free variables, and they in turn may have free type variables                           -- (if we are at a breakpoint, say).  We must put those free vars                -- [let it = expr]-              let_stmt  = L loc $ LetStmt $ noLoc $ HsValBinds $-                          ValBindsOut [(NonRecursive,unitBag the_bind)] []+              let_stmt  = L loc $ LetStmt noExt $ noLoc $ HsValBinds noExt+                           $ XValBindsLR+                               (NValBinds [(NonRecursive,unitBag the_bind)] [])                -- [it <- e]-              bind_stmt = L loc $ BindStmt (L loc (VarPat (L loc fresh_it)))-                                           (nlHsApp ghciStep rn_expr)-                                           (mkRnSyntaxExpr bindIOName)-                                           noSyntaxExpr-                                           PlaceHolder+              bind_stmt = L loc $ BindStmt noExt+                                       (L loc (VarPat noExt (L loc fresh_it)))+                                       (nlHsApp ghciStep rn_expr)+                                       (mkRnSyntaxExpr bindIOName)+                                       noSyntaxExpr                -- [; print it]-              print_it  = L loc $ BodyStmt (nlHsApp (nlHsVar interPrintName) (nlHsVar fresh_it))+              print_it  = L loc $ BodyStmt noExt+                                           (nlHsApp (nlHsVar interPrintName)+                                           (nlHsVar fresh_it))                                            (mkRnSyntaxExpr thenIOName)-                                                  noSyntaxExpr placeHolderType+                                                  noSyntaxExpr -        -- The plans are:-        --   A. [it <- e; print it]     but not if it::()-        --   B. [it <- e]-        --   C. [let it = e; print it]-        ---        -- Ensure that type errors don't get deferred when type checking the-        -- naked expression. Deferring type errors here is unhelpful because the-        -- expression gets evaluated right away anyway. It also would potentially-        -- emit two redundant type-error warnings, one from each plan.-        ; plan <- unsetGOptM Opt_DeferTypeErrors $-                  unsetGOptM Opt_DeferTypedHoles $ runPlans [+              -- NewA+              no_it_a = L loc $ BodyStmt noExt (nlHsApps bindIOName+                                       [rn_expr , nlHsVar interPrintName])+                                       (mkRnSyntaxExpr thenIOName)+                                       noSyntaxExpr++              no_it_b = L loc $ BodyStmt noExt (rn_expr)+                                       (mkRnSyntaxExpr thenIOName)+                                       noSyntaxExpr++              no_it_c = L loc $ BodyStmt noExt+                                      (nlHsApp (nlHsVar interPrintName) rn_expr)+                                      (mkRnSyntaxExpr thenIOName)+                                      noSyntaxExpr++              -- See Note [GHCi Plans]++              it_plans = [                     -- Plan A                     do { stuff@([it_id], _) <- tcGhciStmts [bind_stmt, print_it]                        ; it_ty <- zonkTcType (idType it_id)@@ -2039,9 +2056,80 @@                                 --- checkNoErrs defeats the error recovery of let-bindings                        ; tcGhciStmts [let_stmt, print_it] } ] +              -- Plans where we don't bind "it"+              no_it_plans = [+                    tcGhciStmts [no_it_a] ,+                    tcGhciStmts [no_it_b] ,+                    tcGhciStmts [no_it_c] ]++        ; generate_it <- goptM Opt_NoIt++        -- We disable `-fdefer-type-errors` in GHCi for naked expressions.+        -- See Note [Deferred type errors in GHCi]++        -- NB: The flag `-fdefer-type-errors` implies `-fdefer-type-holes`+        -- and `-fdefer-out-of-scope-variables`. However the flag+        -- `-fno-defer-type-errors` doesn't imply `-fdefer-type-holes` and+        -- `-fno-defer-out-of-scope-variables`. Thus the later two flags+        -- also need to be unset here.+        ; plan <- unsetGOptM Opt_DeferTypeErrors $+                  unsetGOptM Opt_DeferTypedHoles $+                  unsetGOptM Opt_DeferOutOfScopeVariables $+                    runPlans $ if generate_it+                                 then no_it_plans+                                 else it_plans+         ; fix_env <- getFixityEnv         ; return (plan, fix_env) } +{- Note [Deferred type errors in GHCi]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+In GHCi, we ensure that type errors don't get deferred when type checking the+naked expressions. Deferring type errors here is unhelpful because the+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+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.++The interactively issued declarations, statements, as well as the modules+loaded into GHCi, are not affected. That means, for declaration, you could+have++    Prelude> :set -fdefer-type-errors+    Prelude> x :: IO (); x = putStrLn True+    <interactive>:14:26: warning: [-Wdeferred-type-errors]+        ? Couldn't match type ‘Bool’ with ‘[Char]’+          Expected type: String+            Actual type: Bool+        ? In the first argument of ‘putStrLn’, namely ‘True’+          In the expression: putStrLn True+          In an equation for ‘x’: x = putStrLn True++But for naked expressions, you will have++    Prelude> :set -fdefer-type-errors+    Prelude> putStrLn True+    <interactive>:2:10: error:+        ? Couldn't match type ‘Bool’ with ‘[Char]’+          Expected type: String+            Actual type: Bool+        ? In the first argument of ‘putStrLn’, namely ‘True’+          In the expression: putStrLn True+          In an equation for ‘it’: it = putStrLn True++    Prelude> let x = putStrLn True+    <interactive>:2:18: warning: [-Wdeferred-type-errors]+        ? Couldn't match type ‘Bool’ with ‘[Char]’+          Expected type: String+            Actual type: Bool+        ? In the first argument of ‘putStrLn’, namely ‘True’+          In the expression: putStrLn True+          In an equation for ‘x’: x = putStrLn True+-}+ tcUserStmt rdr_stmt@(L loc _)   = do { (([rn_stmt], fix_env), fvs) <- checkNoErrs $            rnStmts GhciStmtCtxt rnLExpr [rdr_stmt] $ \_ -> do@@ -2053,8 +2141,8 @@         ; ghciStep <- getGhciStepIO        ; let gi_stmt-               | (L loc (BindStmt pat expr op1 op2 ty)) <- rn_stmt-                           = L loc $ BindStmt pat (nlHsApp ghciStep expr) op1 op2 ty+               | (L loc (BindStmt ty pat expr op1 op2)) <- rn_stmt+                     = L loc $ BindStmt ty pat (nlHsApp ghciStep expr) op1 op2                | otherwise = rn_stmt         ; opt_pr_flag <- goptM Opt_PrintBindResult@@ -2076,10 +2164,31 @@            ; when (isUnitTy v_ty || not (isTauTy v_ty)) failM            ; return stuff }       where-        print_v  = L loc $ BodyStmt (nlHsApp (nlHsVar printName) (nlHsVar v))+        print_v  = L loc $ BodyStmt noExt (nlHsApp (nlHsVar printName)+                                    (nlHsVar v))                                     (mkRnSyntaxExpr thenIOName) noSyntaxExpr-                                    placeHolderType +{-+Note [GHCi Plans]+~~~~~~~~~~~~~~~~~+When a user types an expression in the repl we try to print it in three different+ways. Also, depending on whether -fno-it is set, we bind a variable called `it`+which can be used to refer to the result of the expression subsequently in the repl.++The normal plans are :+  A. [it <- e; print e]     but not if it::()+  B. [it <- e]+  C. [let it = e; print it]++When -fno-it is set, the plans are:+  A. [e >>= print]+  B. [e]+  C. [let it = e in print it]++The reason for -fno-it is explained in #14336. `it` can lead to the repl+leaking memory as it is repeatedly queried.+-}+ -- | Typecheck the statements given and then return the results of the -- statement in the form 'IO [()]'. tcGhciStmts :: [GhciLStmt GhcRn] -> TcM PlanResult@@ -2120,7 +2229,8 @@                 -- get their *polymorphic* values.  (And we'd get ambiguity errs                 -- if they were overloaded, since they aren't applied to anything.)             ret_expr = nlHsApp (nlHsTyApp ret_id [ret_ty])-                       (noLoc $ ExplicitList unitTy Nothing (map mk_item ids)) ;+                       (noLoc $ ExplicitList unitTy Nothing+                                                            (map mk_item ids)) ;             mk_item id = let ty_args = [idType id, unitTy] in                          nlHsApp (nlHsTyApp unsafeCoerceId                                    (map getRuntimeRep ty_args ++ ty_args))@@ -2128,7 +2238,7 @@             stmts = tc_stmts ++ [noLoc (mkLastStmt ret_expr)]         } ;         return (ids, mkHsDictLet (EvBinds const_binds) $-                     noLoc (HsDo GhciStmtCtxt (noLoc stmts) io_ret_ty))+                     noLoc (HsDo io_ret_ty GhciStmtCtxt (noLoc stmts)))     }  -- | Generate a typed ghciStepIO expression (ghciStep :: Ty a -> IO a)@@ -2139,13 +2249,15 @@     let ghciM   = nlHsAppTy (nlHsTyVar ghciTy) (nlHsTyVar a_tv)         ioM     = nlHsAppTy (nlHsTyVar ioTyConName) (nlHsTyVar a_tv) -        step_ty = noLoc $ HsForAllTy { hst_bndrs = [noLoc $ UserTyVar (noLoc a_tv)]-                                     , hst_body  = nlHsFunTy ghciM ioM }+        step_ty = noLoc $ HsForAllTy+                     { hst_bndrs = [noLoc $ UserTyVar noExt (noLoc a_tv)]+                     , hst_xforall = noExt+                     , hst_body  = nlHsFunTy ghciM ioM }          stepTy :: LHsSigWcType GhcRn         stepTy = mkEmptyWildCardBndrs (mkEmptyImplicitBndrs step_ty) -    return (noLoc $ ExprWithTySig (nlHsVar ghciStepIoMName) stepTy)+    return (noLoc $ ExprWithTySig stepTy (nlHsVar ghciStepIoMName))  isGHCiMonad :: HscEnv -> String -> IO (Messages, Maybe Name) isGHCiMonad hsc_env ty@@ -2246,7 +2358,7 @@ tcRnType hsc_env normalise rdr_type   = runTcInteractive hsc_env $     setXOptM LangExt.PolyKinds $   -- See Note [Kind-generalise in tcRnType]-    do { (HsWC { hswc_wcs = wcs, hswc_body = rn_type }, _fvs)+    do { (HsWC { hswc_ext = wcs, hswc_body = rn_type }, _fvs)                <- rnHsWcType GHCiCtx (mkHsWildCardBndrs rdr_type)                   -- The type can have wild cards, but no implicit                   -- generalisation; e.g.   :kind (T _)@@ -2256,11 +2368,15 @@         -- It can have any rank or kind         -- First bring into scope any wildcards        ; traceTc "tcRnType" (vcat [ppr wcs, ppr rn_type])-       ; (ty, kind) <- solveEqualities $-                       tcWildCardBinders wcs  $ \ _ ->-                       tcLHsTypeUnsaturated rn_type+       ; ((ty, kind), lie)  <-+                       captureConstraints $+                       tcWildCardBinders wcs $ \ wcs' ->+                       do { emitWildCardHoleConstraints wcs'+                          ; tcLHsTypeUnsaturated rn_type }+       ; _ <- checkNoErrs (simplifyInteractive lie)         -- Do kind generalisation; see Note [Kind-generalise in tcRnType]+       ; kind <- zonkTcType kind        ; kvs <- kindGeneralize kind        ; ty  <- zonkTcTypeToType emptyZonkEnv ty @@ -2544,14 +2660,12 @@                         tcg_insts     = insts,                         tcg_fam_insts = fam_insts,                         tcg_rules     = rules,-                        tcg_vects     = vects,                         tcg_imports   = imports })   = vcat [ ppr_types type_env          , ppr_tycons fam_insts type_env          , ppr_insts insts          , ppr_fam_insts fam_insts          , vcat (map ppr rules)-         , vcat (map ppr vects)          , text "Dependent modules:" <+>                 pprUFM (imp_dep_mods imports) (ppr . sort)          , text "Dependent packages:" <+>@@ -2624,7 +2738,7 @@  withTcPlugins :: HscEnv -> TcM a -> TcM a withTcPlugins hsc_env m =-  do plugins <- liftIO (loadTcPlugins hsc_env)+  do let plugins = getTcPlugins (hsc_dflags hsc_env)      case plugins of        [] -> m  -- Common fast case        _  -> do ev_binds_var <- newTcEvBinds@@ -2642,13 +2756,45 @@     do s <- runTcPluginM start ev_binds_var        return (solve s, stop s) -loadTcPlugins :: HscEnv -> IO [TcPlugin]-#if !defined(GHCI)-loadTcPlugins _ = return []-#else-loadTcPlugins hsc_env =- do named_plugins <- loadPlugins hsc_env-    return $ catMaybes $ map load_plugin named_plugins+getTcPlugins :: DynFlags -> [TcPlugin]+getTcPlugins dflags = catMaybes $ map get_plugin (plugins dflags)+  where get_plugin p = tcPlugin (lpPlugin p) (lpArguments p)++runRenamerPlugin :: TcGblEnv+                 -> HsGroup GhcRn+                 -> TcM (TcGblEnv, HsGroup GhcRn)+runRenamerPlugin gbl_env hs_group = do+    dflags <- getDynFlags+    withPlugins dflags+      (\p opts (e, g) -> ( mark_plugin_unsafe dflags >> renamedResultAction p opts e g))+      (gbl_env, hs_group)+++-- XXX: should this really be a Maybe X?  Check under which circumstances this+-- can become a Nothing and decide whether this should instead throw an+-- exception/signal an error.+type RenamedStuff =+        (Maybe (HsGroup GhcRn, [LImportDecl GhcRn], Maybe [(LIE GhcRn, Avails)],+                Maybe LHsDocString))++-- | Extract the renamed information from TcGblEnv.+getRenamedStuff :: TcGblEnv -> RenamedStuff+getRenamedStuff tc_result+  = fmap (\decls -> ( decls, tcg_rn_imports tc_result+                    , tcg_rn_exports tc_result, tcg_doc_hdr tc_result ) )+         (tcg_rn_decls tc_result)++runTypecheckerPlugin :: ModSummary -> HscEnv -> TcGblEnv -> TcM TcGblEnv+runTypecheckerPlugin sum hsc_env gbl_env = do+    let dflags = hsc_dflags hsc_env+    withPlugins dflags+      (\p opts env -> mark_plugin_unsafe dflags+                        >> typeCheckResultAction p opts sum env)+      gbl_env++mark_plugin_unsafe :: DynFlags -> TcM ()+mark_plugin_unsafe dflags = recordUnsafeInfer pluginUnsafe   where-    load_plugin (_, plug, opts) = tcPlugin plug opts-#endif+    unsafeText = "Use of plugins makes the module unsafe"+    pluginUnsafe = unitBag ( mkPlainWarnMsg dflags noSrcSpan+                                   (Outputable.text unsafeText) )
typecheck/TcRnExports.hs view
@@ -135,8 +135,8 @@                  | explicit_mod = exports                  | ghcLink dflags == LinkInMemory = Nothing                  | otherwise-                          = Just (noLoc [noLoc-                              (IEVar (noLoc (IEName $ noLoc main_RDR_Unqual)))])+                          = Just (noLoc [noLoc (IEVar noExt+                                     (noLoc (IEName $ noLoc main_RDR_Unqual)))])                         -- ToDo: the 'noLoc' here is unhelpful if 'main'                         --       turns out to be out of scope @@ -225,9 +225,10 @@      exports_from_item :: ExportAccum -> LIE GhcPs -> RnM ExportAccum     exports_from_item acc@(ExportAccum ie_avails occs)-                      (L loc (IEModuleContents (L lm mod)))-        | let earlier_mods = [ mod-                             | ((L _ (IEModuleContents (L _ mod))), _) <- ie_avails ]+                      (L loc ie@(IEModuleContents _ (L lm mod)))+        | let earlier_mods+                = [ mod+                  | ((L _ (IEModuleContents _ (L _ mod))), _) <- ie_avails ]         , mod `elem` earlier_mods    -- Duplicate export of M         = do { warnIfFlag Opt_WarnDuplicateExports True                           (dupModuleExport mod) ;@@ -238,9 +239,8 @@                                 || (moduleName this_mod == mod)                    ; gre_prs     = pickGREsModExp mod (globalRdrEnvElts rdr_env)                    ; new_exports = map (availFromGRE . fst) gre_prs-                   ; names       = map (gre_name     . fst) gre_prs                    ; all_gres    = foldr (\(gre1,gre2) gres -> gre1 : gre2 : gres) [] gre_prs-               }+                   }               ; checkErr exportValid (moduleNotImported mod)              ; warnIfFlag Opt_WarnDodgyExports@@ -250,7 +250,7 @@              ; traceRn "efa" (ppr mod $$ ppr all_gres)              ; addUsedGREs all_gres -             ; occs' <- check_occs (IEModuleContents (noLoc mod)) occs names+             ; occs' <- check_occs ie occs new_exports                       -- This check_occs not only finds conflicts                       -- between this item and others, but also                       -- internally within this item.  That is, if@@ -261,8 +261,8 @@                        (vcat [ ppr mod                              , ppr new_exports ]) -             ; return (ExportAccum (((L loc (IEModuleContents (L lm mod))), new_exports) : ie_avails)-                                   occs') }+             ; return (ExportAccum (((L loc (IEModuleContents noExt (L lm mod)))+                                    , new_exports) : ie_avails) occs') }      exports_from_item acc@(ExportAccum lie_avails occs) (L loc ie)         | isDoc ie@@ -276,29 +276,30 @@                   then return acc    -- Avoid error cascade                   else do -                    occs' <- check_occs ie occs (availNames avail)+                    occs' <- check_occs ie occs [avail]                      return (ExportAccum ((L loc new_ie, [avail]) : lie_avails) occs')      -------------     lookup_ie :: IE GhcPs -> RnM (IE GhcRn, AvailInfo)-    lookup_ie (IEVar (L l rdr))+    lookup_ie (IEVar _ (L l rdr))         = do (name, avail) <- lookupGreAvailRn $ ieWrappedName rdr-             return (IEVar (L l (replaceWrappedName rdr name)), avail)+             return (IEVar noExt (L l (replaceWrappedName rdr name)), avail) -    lookup_ie (IEThingAbs (L l rdr))+    lookup_ie (IEThingAbs _ (L l rdr))         = do (name, avail) <- lookupGreAvailRn $ ieWrappedName rdr-             return (IEThingAbs (L l (replaceWrappedName rdr name)), avail)+             return (IEThingAbs noExt (L l (replaceWrappedName rdr name))+                    , avail) -    lookup_ie ie@(IEThingAll n')+    lookup_ie ie@(IEThingAll _ n')         = do             (n, avail, flds) <- lookup_ie_all ie n'             let name = unLoc n-            return (IEThingAll (replaceLWrappedName n' (unLoc n))+            return (IEThingAll noExt (replaceLWrappedName n' (unLoc n))                    , AvailTC name (name:avail) flds)  -    lookup_ie ie@(IEThingWith l wc sub_rdrs _)+    lookup_ie ie@(IEThingWith _ l wc sub_rdrs _)         = do             (lname, subs, avails, flds)               <- addExportErrCtxt ie $ lookup_ie_with l sub_rdrs@@ -307,7 +308,7 @@                 NoIEWildcard -> return (lname, [], [])                 IEWildcard _ -> lookup_ie_all ie l             let name = unLoc lname-            return (IEThingWith (replaceLWrappedName l name) wc subs+            return (IEThingWith noExt (replaceLWrappedName l name) wc subs                                 (flds ++ (map noLoc all_flds)),                     AvailTC name (name : avails ++ all_avail)                                  (map unLoc flds ++ all_flds))@@ -348,11 +349,11 @@      -------------     lookup_doc_ie :: IE GhcPs -> RnM (IE GhcRn)-    lookup_doc_ie (IEGroup lev doc) = do rn_doc <- rnHsDoc doc-                                         return (IEGroup lev rn_doc)-    lookup_doc_ie (IEDoc doc)       = do rn_doc <- rnHsDoc doc-                                         return (IEDoc rn_doc)-    lookup_doc_ie (IEDocNamed str)  = return (IEDocNamed str)+    lookup_doc_ie (IEGroup _ lev doc) = do rn_doc <- rnHsDoc doc+                                           return (IEGroup noExt 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)     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@@ -373,9 +374,9 @@     n = gre_name gre  isDoc :: IE GhcPs -> Bool-isDoc (IEDoc _)      = True-isDoc (IEDocNamed _) = True-isDoc (IEGroup _ _)  = True+isDoc (IEDoc {})      = True+isDoc (IEDocNamed {}) = True+isDoc (IEGroup {})    = True isDoc _ = False  -- Renaming and typechecking of exports happens after everything else has@@ -582,11 +583,21 @@   {-===========================================================================-}-check_occs :: IE GhcPs -> ExportOccMap -> [Name] -> RnM ExportOccMap-check_occs ie occs names  -- 'names' are the entities specifed by 'ie'-  = foldlM check occs names+check_occs :: IE GhcPs -> ExportOccMap -> [AvailInfo]+           -> RnM ExportOccMap+check_occs ie occs avails+  -- 'names' and 'fls' are the entities specified by 'ie'+  = foldlM check occs names_with_occs   where-    check occs name+    -- Each Name specified by 'ie', paired with the OccName used to+    -- refer to it in the GlobalRdrEnv+    -- (see Note [Representing fields in AvailInfo] in Avail).+    --+    -- We check for export clashes using the selector Name, but need+    -- the field label OccName for presenting error messages.+    names_with_occs = availsNamesWithOccs avails++    check occs (name, occ)       = case lookupOccEnv occs name_occ of           Nothing -> return (extendOccEnv occs name_occ (name, ie)) @@ -596,12 +607,12 @@             -- by two different module exports. See ticket #4478.             -> do { warnIfFlag Opt_WarnDuplicateExports                                (not (dupExport_ok name ie ie'))-                               (dupExportWarn name_occ ie ie')+                               (dupExportWarn occ ie ie')                   ; return occs }              | otherwise    -- Same occ name but different names: an error             ->  do { global_env <- getGlobalRdrEnv ;-                     addErr (exportClashErr global_env name' name ie' ie) ;+                     addErr (exportClashErr global_env occ name' name ie' ie) ;                      return occs }       where         name_occ = nameOccName name@@ -638,8 +649,8 @@   = not (  single ie1 || single ie2         || (explicit_in ie1 && explicit_in ie2) )   where-    explicit_in (IEModuleContents _) = False                   -- module M-    explicit_in (IEThingAll r)+    explicit_in (IEModuleContents {}) = False                   -- module M+    explicit_in (IEThingAll _ r)       = nameOccName n == rdrNameOcc (ieWrappedName $ unLoc r)  -- T(..)     explicit_in _              = True @@ -682,7 +693,8 @@   text "In the" <+> text (herald ++ ":") <+> ppr exp  -addExportErrCtxt :: (OutputableBndrId s) => IE s -> TcM a -> TcM a+addExportErrCtxt :: (OutputableBndrId (GhcPass p))+                 => IE (GhcPass p) -> TcM a -> TcM a addExportErrCtxt ie = addErrCtxt exportCtxt   where     exportCtxt = text "In the export:" <+> ppr ie@@ -723,21 +735,29 @@     tyThingCategory' i = tyThingCategory i  -exportClashErr :: GlobalRdrEnv -> Name -> Name -> IE GhcPs -> IE GhcPs+exportClashErr :: GlobalRdrEnv -> OccName+               -> Name -> Name+               -> IE GhcPs -> IE GhcPs                -> MsgDoc-exportClashErr global_env name1 name2 ie1 ie2+exportClashErr global_env occ name1 name2 ie1 ie2   = vcat [ text "Conflicting exports for" <+> quotes (ppr occ) <> colon          , ppr_export ie1' name1'          , ppr_export ie2' name2' ]   where-    occ = nameOccName name1     ppr_export ie name = nest 3 (hang (quotes (ppr ie) <+> text "exports" <+>-                                       quotes (ppr name))+                                       quotes (ppr_name name))                                     2 (pprNameProvenance (get_gre name))) +    -- DuplicateRecordFields means that nameOccName might be a mangled+    -- $sel-prefixed thing, in which case show the correct OccName alone+    ppr_name name+      | nameOccName name == occ = ppr name+      | otherwise               = ppr occ+     -- get_gre finds a GRE for the Name, so that we can show its provenance     get_gre name-        = fromMaybe (pprPanic "exportClashErr" (ppr name)) (lookupGRE_Name global_env name)+        = fromMaybe (pprPanic "exportClashErr" (ppr name))+                    (lookupGRE_Name_OccName global_env name occ)     get_loc name = greSrcSpan (get_gre name)     (name1', ie1', name2', ie2') = if get_loc name1 < get_loc name2                                    then (name1, ie1, name2, ie2)
typecheck/TcRnMonad.hs view
@@ -10,7 +10,7 @@  module TcRnMonad(   -- * Initalisation-  initTc, initTcWithGbl, initTcInteractive, initTcForLookup, initTcRnIf,+  initTc, initTcWithGbl, initTcInteractive, initTcRnIf,    -- * Simple accessors   discardResult,@@ -88,7 +88,7 @@   mkErrInfo,    -- * Type constraints-  newTcEvBinds,+  newTcEvBinds, newNoTcEvBinds,   addTcEvBind,   getTcEvTyCoVars, getTcEvBindsMap, setTcEvBindsMap,   chooseUniqueOccTc,@@ -97,7 +97,7 @@   emitImplication, emitImplications, emitInsoluble,   discardConstraints, captureConstraints, tryCaptureConstraints,   pushLevelAndCaptureConstraints,-  pushTcLevelM_, pushTcLevelM,+  pushTcLevelM_, pushTcLevelM, pushTcLevelsM,   getTcLevel, setTcLevel, isTouchableTcM,   getLclTypeEnv, setLclTypeEnv,   traceTcConstraints, emitWildCardHoleConstraints,@@ -128,6 +128,9 @@    withException, +  -- * Stuff for cost centres.+  ContainsCostCentreState(..), getCCIndexM,+   -- * Types etc.   module TcRnTypes,   module IOEnv@@ -170,10 +173,10 @@ import Annotations import BasicTypes( TopLevelFlag ) import Maybes+import CostCentreState  import qualified GHC.LanguageExtensions as LangExt -import Control.Exception import Data.IORef import Control.Monad import Data.Set ( Set )@@ -217,6 +220,7 @@          dependent_files_var <- newIORef [] ;         static_wc_var       <- newIORef emptyWC ;+        cc_st_var           <- newIORef newCostCentreState ;         th_topdecls_var      <- newIORef [] ;         th_foreign_files_var <- newIORef [] ;         th_topnames_var      <- newIORef emptyNameSet ;@@ -230,6 +234,12 @@              maybe_rn_syntax :: forall a. a -> Maybe a ;              maybe_rn_syntax empty_val                 | dopt Opt_D_dump_rn_ast dflags = Just empty_val++                  -- We want to serialize the documentation in the .hi-files,+                  -- and need to extract it from the renamed syntax first.+                  -- See 'ExtractDocs.extractDocs'.+                | gopt Opt_Haddock dflags       = Just empty_val+                 | keep_rn_syntax                = Just empty_val                 | otherwise                     = Nothing ; @@ -244,9 +254,7 @@                  tcg_mod            = mod,                 tcg_semantic_mod   =-                    if thisPackage dflags == moduleUnitId mod-                        then canonicalizeHomeModule dflags (moduleName mod)-                        else mod,+                    canonicalizeModuleIfHome dflags mod,                 tcg_src            = hsc_src,                 tcg_rdr_env        = emptyGlobalRdrEnv,                 tcg_fix_env        = emptyNameEnv,@@ -288,7 +296,6 @@                 tcg_fam_insts      = [],                 tcg_rules          = [],                 tcg_fords          = [],-                tcg_vects          = [],                 tcg_patsyns        = [],                 tcg_merged         = [],                 tcg_dfun_n         = dfun_n_var,@@ -302,7 +309,8 @@                 tcg_tc_plugins     = [],                 tcg_top_loc        = loc,                 tcg_static_wc      = static_wc_var,-                tcg_complete_matches = []+                tcg_complete_matches = [],+                tcg_cc_st          = cc_st_var              } ;         } ; @@ -370,15 +378,6 @@   where     interactive_src_loc = mkRealSrcLoc (fsLit "<interactive>") 1 1 -initTcForLookup :: HscEnv -> TcM a -> IO a--- The thing_inside is just going to look up something--- in the environment, so we don't need much setup-initTcForLookup hsc_env thing_inside-  = do { (msgs, m) <- initTcInteractive hsc_env thing_inside-       ; case m of-             Nothing -> throwIO $ mkSrcErr $ snd msgs-             Just x -> return x }- {- Note [Default types] ~~~~~~~~~~~~~~~~~~~~~~~ The Integer type is simply not available in package ghc-prim (it is@@ -1364,17 +1363,35 @@                                        , ebv_tcvs = tcvs_ref                                        , ebv_uniq = uniq }) } +-- | Creates an EvBindsVar incapable of holding any bindings. It still+-- tracks covar usages (see comments on ebv_tcvs in TcEvidence), thus+-- must be made monadically+newNoTcEvBinds :: TcM EvBindsVar+newNoTcEvBinds+  = do { tcvs_ref  <- newTcRef emptyVarSet+       ; uniq <- newUnique+       ; traceTc "newNoTcEvBinds" (text "unique =" <+> ppr uniq)+       ; return (NoEvBindsVar { ebv_tcvs = tcvs_ref+                              , ebv_uniq = uniq }) }+ getTcEvTyCoVars :: EvBindsVar -> TcM TyCoVarSet-getTcEvTyCoVars (EvBindsVar { ebv_tcvs = ev_ref })-  = readTcRef ev_ref+getTcEvTyCoVars ev_binds_var+  = readTcRef (ebv_tcvs ev_binds_var)  getTcEvBindsMap :: EvBindsVar -> TcM EvBindMap getTcEvBindsMap (EvBindsVar { ebv_binds = ev_ref })   = readTcRef ev_ref+getTcEvBindsMap (NoEvBindsVar {})+  = return emptyEvBindMap  setTcEvBindsMap :: EvBindsVar -> EvBindMap -> TcM () setTcEvBindsMap (EvBindsVar { ebv_binds = ev_ref }) binds   = writeTcRef ev_ref binds+setTcEvBindsMap v@(NoEvBindsVar {}) ev_binds+  | isEmptyEvBindMap ev_binds+  = return ()+  | otherwise+  = pprPanic "setTcEvBindsMap" (ppr v $$ ppr ev_binds)  addTcEvBind :: EvBindsVar -> EvBind -> TcM () -- Add a binding to the TcEvBinds by side effect@@ -1383,6 +1400,8 @@                                  ppr ev_bind        ; bnds <- readTcRef ev_ref        ; writeTcRef ev_ref (extendEvBinds bnds ev_bind) }+addTcEvBind (NoEvBindsVar { ebv_uniq = u }) ev_bind+  = pprPanic "addTcEvBind NoEvBindsVar" (ppr ev_bind $$ ppr u)  chooseUniqueOccTc :: (OccSet -> OccName) -> TcM OccName chooseUniqueOccTc fn =@@ -1479,6 +1498,7 @@            Left _    -> do { emitConstraints lie; failM }            Right res -> return (res, lie) } +-- | The name says it all. The returned TcLevel is the *inner* TcLevel. pushLevelAndCaptureConstraints :: TcM a -> TcM (TcLevel, WantedConstraints, a) pushLevelAndCaptureConstraints thing_inside   = do { env <- getLclEnv@@ -1499,6 +1519,15 @@                           thing_inside        ; return (res, tclvl') } +-- Returns pushed TcLevel+pushTcLevelsM :: Int -> TcM a -> TcM (a, TcLevel)+pushTcLevelsM num_levels thing_inside+  = do { env <- getLclEnv+       ; let tclvl' = nTimes num_levels pushTcLevel (tcl_tclvl env)+       ; res <- setLclEnv (env { tcl_tclvl = tclvl' }) $+                thing_inside+       ; return (res, tclvl') }+ getTcLevel :: TcM TcLevel getTcLevel = do { env <- getLclEnv                 ; return (tcl_tclvl env) }@@ -1509,8 +1538,8 @@  isTouchableTcM :: TcTyVar -> TcM Bool isTouchableTcM tv-  = do { env <- getLclEnv-       ; return (isTouchableMetaTyVar (tcl_tclvl env) tv) }+  = do { lvl <- getTcLevel+       ; return (isTouchableMetaTyVar lvl tv) }  getLclTypeEnv :: TcM TcTypeEnv getLclTypeEnv = do { env <- getLclEnv; return (tcl_env env) }@@ -1872,3 +1901,24 @@ discussion).  We don't currently know a general solution to this problem, but we can use uninterruptibleMask_ to avoid the situation. -}++-- | Environments which track 'CostCentreState'+class ContainsCostCentreState e where+  extractCostCentreState :: e -> TcRef CostCentreState++instance ContainsCostCentreState TcGblEnv where+  extractCostCentreState = tcg_cc_st++instance ContainsCostCentreState DsGblEnv where+  extractCostCentreState = ds_cc_st++-- | Get the next cost centre index associated with a given name.+getCCIndexM :: (ContainsCostCentreState gbl)+            => FastString -> TcRnIf gbl lcl CostCentreIndex+getCCIndexM nm = do+  env <- getGblEnv+  let cc_st_ref = extractCostCentreState env+  cc_st <- readTcRef cc_st_ref+  let (idx, cc_st') = getCCIndex nm cc_st+  writeTcRef cc_st_ref cc_st'+  return idx
typecheck/TcRnTypes.hs view
@@ -46,7 +46,7 @@         pprTcTyThingCategory, pprPECategory, CompleteMatch(..),          -- Desugaring types-        DsM, DsLclEnv(..), DsGblEnv(..), PArrBuiltin(..),+        DsM, DsLclEnv(..), DsGblEnv(..),         DsMetaEnv, DsMetaVal(..), CompleteMatchMap,         mkCompleteMatchMap, extendCompleteMatchMap, @@ -64,11 +64,14 @@         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,+        isPendingScDict, superClassesMightHelp, getPendingWantedScs,         isCDictCan_Maybe, isCFunEqCan_maybe,         isCNonCanonical, isWantedCt, isDerivedCt,         isGivenCt, isHoleCt, isOutOfScopeCt, isExprHoleCt, isTypeHoleCt,@@ -78,25 +81,25 @@         mkNonCanonical, mkNonCanonicalCt, mkGivens,         mkIrredCt, mkInsolubleCt,         ctEvPred, ctEvLoc, ctEvOrigin, ctEvEqRel,-        ctEvTerm, ctEvCoercion, ctEvEvId,+        ctEvExpr, ctEvTerm, ctEvCoercion, ctEvEvId,         tyCoVarsOfCt, tyCoVarsOfCts,         tyCoVarsOfCtList, tyCoVarsOfCtsList,          WantedConstraints(..), insolubleWC, emptyWC, isEmptyWC,-        andWC, unionsWC, mkSimpleWC, mkImplicWC,+        isSolvedWC, andWC, unionsWC, mkSimpleWC, mkImplicWC,         addInsols, insolublesOnly, addSimples, addImplics,         tyCoVarsOfWC, dropDerivedWC, dropDerivedSimples,         tyCoVarsOfWCList, insolubleWantedCt, insolubleEqCt,         isDroppableCt, insolubleImplic,         arisesFromGivens, -        Implication(..), newImplication,+        Implication(..), newImplication, implicLclEnv, implicDynFlags,         ImplicStatus(..), isInsolubleStatus, isSolvedStatus,         SubGoalDepth, initialSubGoalDepth, maxSubGoalDepth,         bumpSubGoalDepth, subGoalDepthExceeded,         CtLoc(..), ctLocSpan, ctLocEnv, ctLocLevel, ctLocOrigin,         ctLocTypeOrKind_maybe,-        ctLocDepth, bumpCtLocDepth,+        ctLocDepth, bumpCtLocDepth, isGivenLoc,         setCtLocOrigin, updateCtLocOrigin, setCtLocEnv, setCtLocSpan,         CtOrigin(..), exprCtOrigin, lexprCtOrigin, matchesCtOrigin, grhssCtOrigin,         isVisibleOrigin, toInvisibleOrigin,@@ -106,7 +109,6 @@           SkolemInfo(..), pprSigSkolInfo, pprSkolInfo,-        termEvidenceAllowed,          CtEvidence(..), TcEvDest(..),         mkKindLoc, toKindLoc, mkGivenLoc,@@ -114,6 +116,7 @@         ctEvRole,          wrapType, wrapTypeWithImplication,+        removeBindingShadowing,          -- Constraint solver plugins         TcPlugin(..), TcPluginResult(..), TcPluginSolver,@@ -151,7 +154,7 @@ import TcEvidence import Type import Class    ( Class )-import TyCon    ( TyCon, tyConKind )+import TyCon    ( TyCon, TyConFlavour, tyConKind ) import TyCoRep  ( CoercionHole(..), coHoleCoVar ) import Coercion ( Coercion, mkHoleCo ) import ConLike  ( ConLike(..) )@@ -189,6 +192,7 @@ import Fingerprint import Util import PrelNames ( isUnboundName )+import CostCentreState  import Control.Monad (ap, liftM, msum) import qualified Control.Monad.Fail as MonadFail@@ -269,8 +273,9 @@ -- the lcl type). data Env gbl lcl   = Env {-        env_top  :: HscEnv,  -- Top-level stuff that never changes+        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@@ -360,25 +365,6 @@ presumably include source-file location information: -} --- If '-XParallelArrays' is given, the desugarer populates this table with the corresponding--- variables found in 'Data.Array.Parallel'.----data PArrBuiltin-        = PArrBuiltin-        { lengthPVar         :: Var     -- ^ lengthP-        , replicatePVar      :: Var     -- ^ replicateP-        , singletonPVar      :: Var     -- ^ singletonP-        , mapPVar            :: Var     -- ^ mapP-        , filterPVar         :: Var     -- ^ filterP-        , zipPVar            :: Var     -- ^ zipP-        , crossMapPVar       :: Var     -- ^ crossMapP-        , indexPVar          :: Var     -- ^ (!:)-        , emptyPVar          :: Var     -- ^ emptyP-        , appPVar            :: Var     -- ^ (+:+)-        , enumFromToPVar     :: Var     -- ^ enumFromToP-        , enumFromThenToPVar :: Var     -- ^ enumFromThenToP-        }- data DsGblEnv         = DsGblEnv         { ds_mod          :: Module             -- For SCC profiling@@ -387,13 +373,10 @@         , ds_msgs    :: IORef Messages          -- Warning messages         , ds_if_env  :: (IfGblEnv, IfLclEnv)    -- Used for looking up global,                                                 -- possibly-imported things-        , ds_dph_env :: GlobalRdrEnv            -- exported entities of 'Data.Array.Parallel.Prim'-                                                -- iff '-fvectorise' flag was given as well as-                                                -- exported entities of 'Data.Array.Parallel' iff-                                                -- '-XParallelArrays' was given; otherwise, empty-        , ds_parr_bi :: PArrBuiltin             -- desugarer names for '-XParallelArrays'         , ds_complete_matches :: CompleteMatchMap            -- Additional complete pattern matches+        , ds_cc_st   :: IORef CostCentreState+           -- Tracking indices for cost centre annotations         }  instance ContainsModule DsGblEnv where@@ -523,10 +506,12 @@                 -- 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,+        tcg_inst_env     :: !InstEnv,           -- ^ Instance envt for all /home-package/ modules;           -- Includes the dfuns in tcg_insts-        tcg_fam_inst_env :: FamInstEnv, -- ^ Ditto for family instances+          -- 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@@ -635,7 +620,7 @@         tcg_th_topdecls :: TcRef [LHsDecl GhcPs],         -- ^ Top-level declarations from addTopDecls -        tcg_th_foreign_files :: TcRef [(ForeignSrcLang, String)],+        tcg_th_foreign_files :: TcRef [(ForeignSrcLang, FilePath)],         -- ^ Foreign files emitted from TH.          tcg_th_topnames :: TcRef NameSet,@@ -672,12 +657,12 @@         tcg_fam_insts :: [FamInst],          -- ...Family instances         tcg_rules     :: [LRuleDecl GhcTc],  -- ...Rules         tcg_fords     :: [LForeignDecl GhcTc], -- ...Foreign import & exports-        tcg_vects     :: [LVectDecl GhcTc],   -- ...Vectorisation declarations         tcg_patsyns   :: [PatSyn],            -- ...Pattern synonyms          tcg_doc_hdr   :: Maybe LHsDocString, -- ^ Maybe Haddock header docs-        tcg_hpc       :: AnyHpcUsage,        -- ^ @True@ if any part of the+        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@@ -700,7 +685,10 @@         tcg_static_wc :: TcRef WantedConstraints,           -- ^ Wanted constraints of static forms.         -- See Note [Constraints in static forms].-        tcg_complete_matches :: [CompleteMatch]+        tcg_complete_matches :: [CompleteMatch],++        -- ^ Tracking indices for cost centre annotations+        tcg_cc_st   :: TcRef CostCentreState     }  -- NB: topModIdentity, not topModSemantic!@@ -926,6 +914,23 @@     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 ---------------------------@@ -1091,15 +1096,20 @@   | 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)-  | NoTypeInTypeTC   -- -XTypeInType not enabled (for a tycon)-  | NoTypeInTypeDC   -- -XTypeInType not enabled (for a datacon)  instance Outputable TcTyThing where     -- Debugging only    ppr (AGlobal g)      = ppr g@@ -1244,15 +1254,16 @@     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 RecDataConPE   = text "RecDataConPE"-  ppr NoDataKindsTC  = text "NoDataKindsTC"-  ppr NoDataKindsDC  = text "NoDataKindsDC"-  ppr NoTypeInTypeTC = text "NoTypeInTypeTC"-  ppr NoTypeInTypeDC = text "NoTypeInTypeDC"+  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@@ -1262,15 +1273,15 @@ 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 RecDataConPE   = text "Data constructor"-pprPECategory NoDataKindsTC  = text "Type constructor"-pprPECategory NoDataKindsDC  = text "Data constructor"-pprPECategory NoTypeInTypeTC = text "Type constructor"-pprPECategory NoTypeInTypeDC = text "Data constructor"+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"  {- ************************************************************************@@ -1392,10 +1403,13 @@                    imp_orphs         = orphs1 `unionLists` orphs2,                    imp_finsts        = finsts1 `unionLists` finsts2 }   where-    plus_mod_dep (m1, boot1) (m2, boot2)-        = WARN( not (m1 == m2), (ppr m1 <+> ppr m2) $$ (ppr boot1 <+> ppr boot2) )-                -- Check mod-names match-          (m1, boot1 && boot2) -- If either side can "see" a non-hi-boot interface, use that+    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  {- ************************************************************************@@ -1502,8 +1516,11 @@                -- wildcards scope over the binding, and hence their                -- Names may appear in type signatures in the binding -         , sig_inst_wcx   :: Maybe TcTyVar+         , 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]@@ -1540,7 +1557,7 @@         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+          -- See Note [The pattern-synonym signature splitting rule] in TcSigs         patsig_univ_bndrs     :: [TyVar],       -- Bound by explicit user forall         patsig_req            :: TcThetaType,         patsig_ex_bndrs       :: [TyVar],       -- Bound by explicit user forall@@ -1670,8 +1687,8 @@         --    *never* over-saturated (because if so         --    we should have decomposed) -      cc_fsk    :: TcTyVar  -- [Given]  always a FlatSkolTv-                            -- [Wanted] always a FlatMetaTv+      cc_fsk    :: TcTyVar  -- [G]  always a FlatSkolTv+                            -- [W], [WD], or [D] always a FlatMetaTv         -- See Note [The flattening story] in TcFlatten     } @@ -1686,6 +1703,26 @@       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@@ -1726,7 +1763,7 @@  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 subequently unifed with (say) *->*, because then+            '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. @@ -1772,7 +1809,8 @@                                        , ctev_loc = loc })  ctEvidence :: Ct -> CtEvidence-ctEvidence = cc_ev+ctEvidence (CQuantCan (QCI { qci_ev = ev })) = ev+ctEvidence ct = cc_ev ct  ctLoc :: Ct -> CtLoc ctLoc = ctEvLoc . ctEvidence@@ -1785,7 +1823,7 @@  ctPred :: Ct -> PredType -- See Note [Ct/evidence invariant]-ctPred ct = ctEvPred (cc_ev ct)+ctPred ct = ctEvPred (ctEvidence ct)  ctEvId :: Ct -> EvVar -- The evidence Id for this Ct@@ -1810,7 +1848,7 @@ ctEqRel = ctEvEqRel . ctEvidence  instance Outputable Ct where-  ppr ct = ppr (cc_ev ct) <+> parens pp_sort+  ppr ct = ppr (ctEvidence ct) <+> parens pp_sort     where       pp_sort = case ct of          CTyEqCan {}      -> text "CTyEqCan"@@ -1823,6 +1861,9 @@             | 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"  {- ************************************************************************@@ -1853,9 +1894,7 @@   = tyCoFVsOfTypes tys `unionFV` FV.unitFV fsk                        `unionFV` tyCoFVsOfType (tyVarKind fsk) tyCoFVsOfCt (CDictCan { cc_tyargs = tys }) = tyCoFVsOfTypes tys-tyCoFVsOfCt (CIrredCan { cc_ev = ev }) = tyCoFVsOfType (ctEvPred ev)-tyCoFVsOfCt (CHoleCan { cc_ev = ev }) = tyCoFVsOfType (ctEvPred ev)-tyCoFVsOfCt (CNonCanonical { cc_ev = ev }) = tyCoFVsOfType (ctEvPred ev)+tyCoFVsOfCt ct = tyCoFVsOfType (ctPred ct)  -- | Returns free variables of a bag of constraints as a non-deterministic -- set. See Note [Deterministic FV] in FV.@@ -1964,7 +2003,7 @@        = definitely_insoluble  -- Keep only definitely insoluble        | otherwise        = case orig of-           KindEqOrigin {} -> True    -- Why?+           KindEqOrigin {} -> True    -- See Note [Dropping derived constraints]             -- See Note [Dropping derived constraints]            -- For fundeps, drop wanted/wanted interactions@@ -2014,6 +2053,9 @@  * 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.+   These need to be kept because the kind equalities might have different+   source locations and hence different error messages.+   E.g., test case dependent/should_fail/T11471   * We keep most derived equalities arising from functional dependencies       - Given/Given interactions (subset of FunDepOrigin1):@@ -2053,13 +2095,13 @@ -}  isWantedCt :: Ct -> Bool-isWantedCt = isWanted . cc_ev+isWantedCt = isWanted . ctEvidence  isGivenCt :: Ct -> Bool-isGivenCt = isGiven . cc_ev+isGivenCt = isGiven . ctEvidence  isDerivedCt :: Ct -> Bool-isDerivedCt = isDerived . cc_ev+isDerivedCt = isDerived . ctEvidence  isCTyEqCan :: Ct -> Bool isCTyEqCan (CTyEqCan {})  = True@@ -2154,27 +2196,49 @@                          _      -> False  isPendingScDict :: Ct -> Maybe Ct--- Says whether cc_pend_sc is True, AND if so flips the flag+-- 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 :: Ct -> Bool+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 ct-  = isWantedCt ct && not (is_ip ct)+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.@@ -2185,6 +2249,11 @@ 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@@ -2280,6 +2349,14 @@ 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 })@@ -2315,8 +2392,9 @@ isSolvedStatus _              = False  isInsolubleStatus :: ImplicStatus -> Bool-isInsolubleStatus IC_Insoluble = True-isInsolubleStatus _            = False+isInsolubleStatus IC_Insoluble    = True+isInsolubleStatus IC_BadTelescope = True+isInsolubleStatus _               = False  insolubleImplic :: Implication -> Bool insolubleImplic ic = isInsolubleStatus (ic_status ic)@@ -2409,13 +2487,20 @@ -}  data Implication-  = Implic {+  = 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)@@ -2424,11 +2509,21 @@       ic_no_eqs :: Bool,         -- True  <=> ic_givens have no equalities, for sure                                  -- False <=> ic_givens might have equalities -      ic_env   :: TcLclEnv,      -- Gives the source location and error context-                                 -- for the implication, and hence for all the-                                 -- given evidence variables+      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 wanted+      ic_wanted :: WantedConstraints,  -- The wanteds+                                       -- See Invariang (WantedInf) in TcType        ic_binds  :: EvBindsVar,    -- Points to the place to fill in the                                   -- abstraction and bindings.@@ -2445,23 +2540,41 @@       ic_status   :: ImplicStatus     } -newImplication :: Implication+-- | 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-  = Implic { -- These fields must be initialisad-             ic_tclvl = panic "newImplic:tclvl"-           , ic_binds = panic "newImplic:binds"-           , ic_info  = panic "newImplic:info"-           , ic_env   = panic "newImplic:env"+  = do env <- getEnv+       pure $ Implic { -- These fields must be initialised+                       ic_tclvl      = panic "newImplic:tclvl"+                     , ic_binds      = panic "newImplic:binds"+                     , ic_info       = panic "newImplic:info" -             -- The rest have sensible default values-           , ic_skols      = []-           , ic_given      = []-           , ic_wanted     = emptyWC-           , ic_no_eqs     = False-           , ic_status     = IC_Unsolved-           , ic_need_inner = emptyVarSet-           , ic_need_outer = emptyVarSet }+                       -- The rest have sensible default values+                     , ic_env        = env+                     , 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@@ -2469,14 +2582,18 @@    | 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 })+              , 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@@ -2485,13 +2602,14 @@                , hang (text "Given =")  2 (pprEvVars given)                , hang (text "Wanted =") 2 (ppr wanted)                , text "Binds =" <+> ppr binds-               , text "Needed inner =" <+> ppr need_in-               , text "Needed outer =" <+> ppr need_out+--               , text "Needed inner =" <+> ppr need_in+--               , text "Needed outer =" <+> ppr need_out                , pprSkolInfo info ] <+> rbrace)  instance Outputable ImplicStatus where-  ppr IC_Insoluble   = text "Insoluble"-  ppr IC_Unsolved    = text "Unsolved"+  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)) @@ -2581,17 +2699,17 @@  -- | 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.+-- 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 (ic_skols impl) (map idType $ ic_given impl)+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 =-    wrapWithAllSkols $ mkFunTys givens ty-    where forAllTy :: Type -> TyVar -> Type-          forAllTy ty tv = mkForAllTy tv Specified ty-          wrapWithAllSkols ty = foldl forAllTy ty skols+wrapType ty skols givens = mkSpecForAllTys skols $ mkFunTys givens ty   {-@@ -2631,15 +2749,6 @@  So a Given has EvVar inside it rather than (as previously) an EvTerm. -Note [Given in ctEvCoercion]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When retrieving the evidence from a Given equality, we update the type of the EvVar-from the ctev_pred field. In Note [Evidence field of CtEvidence], we claim that-the type of the evidence is never looked at -- but this isn't true in the case of-a coercion that is used in a type. (See the comments in Note [Flattening] in TcFlatten-about the FTRNotFollowed case of flattenTyVar.) So, right here where we are retrieving-the coercion from a Given, we update the type to make sure it's zonked.- -}  -- | A place for type-checking evidence to go after it is generated.@@ -2693,14 +2802,16 @@ ctEvRole = eqRelRole . ctEvEqRel  ctEvTerm :: CtEvidence -> EvTerm-ctEvTerm ev@(CtWanted { ctev_dest = HoleDest _ }) = EvCoercion $ ctEvCoercion ev-ctEvTerm ev = EvId (ctEvEvId ev)+ctEvTerm ev = EvExpr (ctEvExpr ev) --- Always returns a coercion whose type is precisely ctev_pred of the CtEvidence.--- See also Note [Given in ctEvCoercion]+ctEvExpr :: CtEvidence -> EvExpr+ctEvExpr ev@(CtWanted { ctev_dest = HoleDest _ })+            = Coercion $ ctEvCoercion ev+ctEvExpr ev = evId (ctEvEvId ev)+ ctEvCoercion :: CtEvidence -> Coercion-ctEvCoercion (CtGiven { ctev_pred = pred_ty, ctev_evar = ev_id })-  = mkTcCoVarCo (setVarType ev_id pred_ty)  -- See Note [Given in ctEvCoercion]+ctEvCoercion (CtGiven { ctev_evar = ev_id })+  = mkTcCoVarCo ev_id ctEvCoercion (CtWanted { ctev_dest = dest })   | HoleDest hole <- dest   = -- ctEvCoercion is only called on type equalities@@ -2828,7 +2939,7 @@ ctFlavourRole (CHoleCan { cc_ev = ev })   = (ctEvFlavour ev, NomEq) ctFlavourRole ct-  = ctEvFlavourRole (cc_ev ct)+  = ctEvFlavourRole (ctEvidence ct)  {- Note [eqCanRewrite] ~~~~~~~~~~~~~~~~~~~~~~@@ -3148,8 +3259,12 @@        [(Name,TcTyVar)]    -- Maps the original name of the skolemised tyvar                            -- to its instantiated version -  | ClsSkol Class       -- Bound at a class decl+  | 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 @@ -3160,7 +3275,6 @@                         --    then TypeSize = sizeTypes [ty1, .., tyn]                         -- See Note [Solving superclass constraints] in TcInstDcls -  | DataSkol            -- Bound at a data type declaration   | 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.@@ -3186,29 +3300,31 @@   | 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 -termEvidenceAllowed :: SkolemInfo -> Bool--- Whether an implication constraint with this SkolemInfo--- is permitted to have term-level evidence.  There is--- only one that is not, associated with unifiying--- forall-types-termEvidenceAllowed (UnifyForAllSkol {}) = False-termEvidenceAllowed _                    = True- 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 (ClsSkol cls)     = text "the class declaration for" <+> quotes (ppr cls) 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 DataSkol          = text "a data type declaration" pprSkolInfo FamInstSkol       = text "a family instance declaration" pprSkolInfo BracketSkol       = text "a Template Haskell bracket" pprSkolInfo (RuleSkol name)   = text "the RULE" <+> pprRuleName name@@ -3219,7 +3335,12 @@                                    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@@ -3325,7 +3446,6 @@   | NegateOrigin                        -- Occurrence of syntactic negation    | ArithSeqOrigin (ArithSeqInfo GhcRn) -- [x..], [x..y] etc-  | PArrSeqOrigin  (ArithSeqInfo GhcRn) -- [:x..y:] and [:x,y..z:]   | SectionOrigin   | TupleOrigin                        -- (..,..)   | ExprSigOrigin       -- e :: ty@@ -3342,13 +3462,24 @@                         --    then TypeSize = sizeTypes [ty1, .., tyn]                         -- See Note [Solving superclass constraints] in TcInstDcls -  | DerivOrigin         -- Typechecking deriving-  | DerivOriginDC DataCon Int-                        -- Checking constraints arising from this data con and field index-  | DerivOriginCoerce Id Type Type+  | 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+  | 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@@ -3428,58 +3559,55 @@ 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 (HsAppTypeOut {})  = panic "exprCtOrigin HsAppTypeOut"-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 (ExplicitPArr {})  = Shouldn'tHappenOrigin "parallel array"-exprCtOrigin (RecordCon {})     = Shouldn'tHappenOrigin "record construction"-exprCtOrigin (RecordUpd {})     = Shouldn'tHappenOrigin "record update"-exprCtOrigin (ExprWithTySig {}) = ExprSigOrigin-exprCtOrigin (ExprWithTySigOut {}) = panic "exprCtOrigin ExprWithTySigOut"-exprCtOrigin (ArithSeq {})      = Shouldn'tHappenOrigin "arithmetic sequence"-exprCtOrigin (PArrSeq {})       = Shouldn'tHappenOrigin "parallel array sequence"-exprCtOrigin (HsSCC _ _ e)      = lexprCtOrigin e-exprCtOrigin (HsCoreAnn _ _ e)  = lexprCtOrigin e-exprCtOrigin (HsBracket {})     = Shouldn'tHappenOrigin "TH bracket"+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 (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@@ -3490,14 +3618,17 @@    | 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 _ (GRHS _ _ (L _ e))] = exprCtOrigin e+lGRHSCtOrigin [L _ (XGRHS _)] = panic "lGRHSCtOrigin" lGRHSCtOrigin _ = Shouldn'tHappenOrigin "multi-way GRHS"  pprCtLoc :: CtLoc -> SDoc@@ -3541,14 +3672,14 @@ pprCtOrigin (UnboundOccurrenceOf name)   = ctoHerald <+> text "an undeclared identifier" <+> quotes (ppr name) -pprCtOrigin (DerivOriginDC dc n)+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)+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) ])@@ -3604,13 +3735,12 @@ 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 (PArrSeqOrigin seq)   = hsep [text "the parallel array sequence", quotes (ppr seq)] pprCtO SectionOrigin         = text "an operator section" 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 DerivOrigin           = text "the 'deriving' clause of a data type declaration"+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"
typecheck/TcRules.hs view
@@ -58,41 +58,30 @@ tcRules decls = mapM (wrapLocM tcRuleDecls) decls  tcRuleDecls :: RuleDecls GhcRn -> TcM (RuleDecls GhcTcId)-tcRuleDecls (HsRules src decls)+tcRuleDecls (HsRules _ src decls)    = do { tc_decls <- mapM (wrapLocM tcRule) decls-        ; return (HsRules src tc_decls) }+        ; return (HsRules noExt src tc_decls) }+tcRuleDecls (XRuleDecls _) = panic "tcRuleDecls"  tcRule :: RuleDecl GhcRn -> TcM (RuleDecl GhcTcId)-tcRule (HsRule name act hs_bndrs lhs fv_lhs rhs fv_rhs)-  = addErrCtxt (ruleCtxt $ snd $ unLoc name)  $-    do { traceTc "---- Rule ------" (pprFullRuleName name)+tcRule (HsRule fvs rname@(L _ (_,name))+               act hs_bndrs lhs rhs)+  = addErrCtxt (ruleCtxt name)  $+    do { traceTc "---- Rule ------" (pprFullRuleName rname)          -- Note [Typechecking rules]-       ; (vars, bndr_wanted) <- captureConstraints $-                                tcRuleBndrs hs_bndrs-              -- 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+       ; (stuff, tc_lvl) <- pushTcLevelM $+                            generateRuleConstraints hs_bndrs lhs rhs -       ; let (id_bndrs, tv_bndrs) = partition isId vars-       ; (lhs', lhs_wanted, rhs', rhs_wanted, rule_ty)-            <- tcExtendTyVarEnv tv_bndrs $-               tcExtendIdEnv    id_bndrs $-               do { -- See Note [Solve order for RULES]-                    ((lhs', rule_ty), lhs_wanted) <- captureConstraints (tcInferRho lhs)-                  ; (rhs', rhs_wanted) <- captureConstraints $-                                          tcMonoExpr rhs (mkCheckExpType rule_ty)-                  ; return (lhs', lhs_wanted, rhs', rhs_wanted, rule_ty) }+       ; let ( id_bndrs, lhs', lhs_wanted, rhs', rhs_wanted, rule_ty) = stuff -       ; traceTc "tcRule 1" (vcat [ pprFullRuleName name+       ; traceTc "tcRule 1" (vcat [ pprFullRuleName rname                                   , ppr lhs_wanted                                   , ppr rhs_wanted ])-       ; let all_lhs_wanted = bndr_wanted `andWC` lhs_wanted-       ; (lhs_evs, residual_lhs_wanted) <- simplifyRule (snd $ unLoc name)-                                              all_lhs_wanted-                                              rhs_wanted +       ; (lhs_evs, residual_lhs_wanted)+            <- simplifyRule name tc_lvl lhs_wanted rhs_wanted+        -- SimplfyRule Plan, step 4        -- Now figure out what to quantify over        -- c.f. TcSimplify.simplifyInfer@@ -112,7 +101,7 @@        ; gbls  <- tcGetGlobalTyCoVars -- Even though top level, there might be top-level                                       -- monomorphic bindings from the MR; test tc111        ; qtkvs <- quantifyTyVars gbls forall_tkvs-       ; traceTc "tcRule" (vcat [ pprFullRuleName name+       ; traceTc "tcRule" (vcat [ pprFullRuleName rname                                 , ppr forall_tkvs                                 , ppr qtkvs                                 , ppr rule_ty@@ -124,26 +113,52 @@        -- For the LHS constraints we must solve the remaining constraints        -- (a) so that we report insoluble ones        -- (b) so that we bind any soluble ones-       ; let skol_info = RuleSkol (snd (unLoc name))-       ; (lhs_implic, lhs_binds) <- buildImplicationFor topTcLevel skol_info qtkvs+       ; let skol_info = RuleSkol name+       ; (lhs_implic, lhs_binds) <- buildImplicationFor tc_lvl skol_info qtkvs                                          lhs_evs residual_lhs_wanted-       ; (rhs_implic, rhs_binds) <- buildImplicationFor topTcLevel skol_info qtkvs+       ; (rhs_implic, rhs_binds) <- buildImplicationFor tc_lvl skol_info qtkvs                                          lhs_evs rhs_wanted         ; emitImplications (lhs_implic `unionBags` rhs_implic)-       ; return (HsRule name act-                    (map (noLoc . RuleBndr . noLoc) (qtkvs ++ tpl_ids))-                    (mkHsDictLet lhs_binds lhs') fv_lhs-                    (mkHsDictLet rhs_binds rhs') fv_rhs) }+       ; return (HsRule fvs rname act+                    (map (noLoc . RuleBndr noExt . noLoc) (qtkvs ++ tpl_ids))+                    (mkHsDictLet lhs_binds lhs')+                    (mkHsDictLet rhs_binds rhs')) }+tcRule (XRuleDecl _) = panic "tcRule" +generateRuleConstraints :: [LRuleBndr GhcRn] -> LHsExpr GhcRn -> LHsExpr GhcRn+                        -> TcM ( [TcId]+                               , LHsExpr GhcTc, WantedConstraints+                               , LHsExpr GhcTc, WantedConstraints+                               , TcType )+generateRuleConstraints hs_bndrs lhs rhs+  = do { (vars, bndr_wanted) <- captureConstraints $+                                tcRuleBndrs hs_bndrs+              -- 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++       ; let (id_bndrs, tv_bndrs) = partition isId vars+       ; tcExtendTyVarEnv tv_bndrs $+         tcExtendIdEnv    id_bndrs $+    do { -- See Note [Solve order for RULES]+         ((lhs', rule_ty), lhs_wanted) <- captureConstraints (tcInferRho lhs)+       ; (rhs',            rhs_wanted) <- captureConstraints $+                                          tcMonoExpr rhs (mkCheckExpType rule_ty)+       ; let all_lhs_wanted = bndr_wanted `andWC` lhs_wanted+       ; return (id_bndrs, lhs', all_lhs_wanted, rhs', rhs_wanted, rule_ty) } }+                -- Slightly curious that tv_bndrs is not returned++ tcRuleBndrs :: [LRuleBndr GhcRn] -> TcM [Var] tcRuleBndrs []   = return []-tcRuleBndrs (L _ (RuleBndr (L _ name)) : rule_bndrs)+tcRuleBndrs (L _ (RuleBndr _ (L _ name)) : rule_bndrs)   = do  { ty <- newOpenFlexiTyVarTy         ; vars <- tcRuleBndrs rule_bndrs         ; return (mkLocalId name ty : vars) }-tcRuleBndrs (L _ (RuleBndrSig (L _ name) rn_ty) : rule_bndrs)+tcRuleBndrs (L _ (RuleBndrSig _ (L _ name) rn_ty) : rule_bndrs) --  e.g         x :: a->a --  The tyvar 'a' is brought into scope first, just as if you'd written --              a::*, x :: a->a@@ -153,9 +168,10 @@                     -- See Note [Pattern signature binders] in TcHsType                -- The type variables scope over subsequent bindings; yuk-        ; vars <- tcExtendTyVarEnv2 tvs $+        ; vars <- tcExtendNameTyVarEnv tvs $                   tcRuleBndrs rule_bndrs         ; return (map snd tvs ++ id : vars) }+tcRuleBndrs (L _ (XRuleBndr _) : _) = panic "tcRuleBndrs"  ruleCtxt :: FastString -> SDoc ruleCtxt name = text "When checking the transformation rule" <+>@@ -304,6 +320,7 @@ -}  simplifyRule :: RuleName+             -> TcLevel                 -- Level at which to solve the constraints              -> WantedConstraints       -- Constraints from LHS              -> WantedConstraints       -- Constraints from RHS              -> TcM ( [EvVar]               -- Quantify over these LHS vars@@ -311,7 +328,7 @@ -- See Note [The SimplifyRule Plan] -- NB: This consumes all simple constraints on the LHS, but not -- any LHS implication constraints.-simplifyRule name lhs_wanted rhs_wanted+simplifyRule name tc_lvl lhs_wanted rhs_wanted   = do {        -- Note [The SimplifyRule Plan] step 1        -- First solve the LHS and *then* solve the RHS@@ -319,12 +336,13 @@        -- Why clone?  See Note [Simplify cloned constraints]        ; lhs_clone <- cloneWC lhs_wanted        ; rhs_clone <- cloneWC rhs_wanted-       ; runTcSDeriveds $-             do { _ <- solveWanteds lhs_clone-                ; _ <- solveWanteds rhs_clone+       ; setTcLevel tc_lvl $+         runTcSDeriveds    $+         do { _ <- solveWanteds lhs_clone+            ; _ <- solveWanteds rhs_clone                   -- Why do them separately?                   -- See Note [Solve order for RULES]-                ; return () }+            ; return () }         -- Note [The SimplifyRule Plan] step 2        ; lhs_wanted <- zonkWC lhs_wanted
typecheck/TcSMonad.hs view
@@ -16,28 +16,32 @@     TcS, runTcS, runTcSDeriveds, runTcSWithEvBinds,     failTcS, warnTcS, addErrTcS,     runTcSEqualities,-    nestTcS, nestImplicTcS, setEvBindsTcS, buildImplication,+    nestTcS, nestImplicTcS, setEvBindsTcS,+    checkConstraintsTcS, checkTvConstraintsTcS,      runTcPluginTcS, addUsedGRE, addUsedGREs, +    QCInst(..),+     -- Tracing etc     panicTcS, traceTcS,     traceFireTcS, bumpStepCountTcS, csTraceTcS,     wrapErrTcS, wrapWarnTcS,      -- Evidence creation and transformation-    MaybeNew(..), freshGoals, isFresh, getEvTerm,+    MaybeNew(..), freshGoals, isFresh, getEvExpr, -    newTcEvBinds,+    newTcEvBinds, newNoTcEvBinds,     newWantedEq, emitNewWantedEq,     newWanted, newWantedEvVar, newWantedNC, newWantedEvVarNC, newDerivedNC,     newBoundEvVarId,     unifyTyVar, unflattenFmv, reportUnifications,-    setEvBind, setWantedEq, setEqIfWanted,-    setWantedEvTerm, setWantedEvBind, setEvBindIfWanted,+    setEvBind, setWantedEq,+    setWantedEvTerm, setEvBindIfWanted,     newEvVar, newGivenEvVar, newGivenEvVars,     emitNewDeriveds, emitNewDerivedEq,     checkReductionDepth,+    getSolvedDicts, setSolvedDicts,      getInstEnvs, getFamInstEnvs,                -- Getting the environments     getTopEnv, getGblEnv, getLclEnv,@@ -52,10 +56,10 @@     getInertEqs, getInertCans, getInertGivens,     getInertInsols,     getTcSInerts, setTcSInerts,-    matchableGivens, prohibitedSuperClassSolve,+    matchableGivens, prohibitedSuperClassSolve, mightMatchLater,     getUnsolvedInerts,-    removeInertCts, getPendingScDicts,-    addInertCan, addInertEq, insertFunEq,+    removeInertCts, getPendingGivenScs,+    addInertCan, insertFunEq, addInertForAll,     emitWorkNC, emitWork,     isImprovable, @@ -82,6 +86,7 @@      -- The flattening cache     lookupFlatCache, extendFlatCache, newFlattenSkolem,            -- Flatten skolems+    dischargeFunEq, pprKicked,      -- Inert CFunEqCans     updInertFunEqs, findFunEq,@@ -94,11 +99,12 @@     cloneMetaTyVar, demoteUnfilledFmv,     tcInstType, tcInstSkolTyVarsX, -    TcLevel, isTouchableMetaTyVarTcS,+    TcLevel,     isFilledMetaTyVar_maybe, isFilledMetaTyVar,     zonkTyCoVarsAndFV, zonkTcType, zonkTcTypes, zonkTcTyVar, zonkCo,     zonkTyCoVarsAndFVList,     zonkSimples, zonkWC,+    zonkTcTyCoVarBndr,      -- References     newTcRef, readTcRef, updTcRef,@@ -134,6 +140,7 @@ import TcType import DynFlags import Type+import TyCoRep( coHoleCoVar ) import Coercion import Unify @@ -143,6 +150,7 @@ import TcErrors   ( solverDepthErrorTcS )  import Name+import Module ( HasModule, getModule ) import RdrName ( GlobalRdrEnv, GlobalRdrElt ) import qualified RnEnv as TcM import Var@@ -159,12 +167,12 @@ import UniqDFM import Maybes -import TrieMap+import CoreMap import Control.Monad import qualified Control.Monad.Fail as MonadFail import MonadUtils import Data.IORef-import Data.List ( foldl', partition )+import Data.List ( foldl', partition, mapAccumL )  #if defined(DEBUG) import Digraph@@ -418,29 +426,38 @@               -- NB: An ExactFunEqMap -- this doesn't match via loose types!         , inert_solved_dicts   :: DictMap CtEvidence-              -- Of form ev :: C t1 .. tn+              -- All Wanteds, of form ev :: C t1 .. tn               -- See Note [Solved dictionaries]               -- and Note [Do not add superclasses of solved dictionaries]        }  instance Outputable InertSet where-  ppr is = vcat [ ppr $ inert_cans is-                , ppUnless (null dicts) $-                  text "Solved dicts" <+> vcat (map ppr dicts) ]+  ppr (IS { inert_cans = ics+          , inert_fsks = ifsks+          , inert_solved_dicts = solved_dicts })+      = vcat [ ppr ics+             , text "Inert fsks =" <+> ppr ifsks+             , ppUnless (null dicts) $+               text "Solved dicts =" <+> vcat (map ppr dicts) ]          where-           dicts = bagToList (dictsToBag (inert_solved_dicts is))+           dicts = bagToList (dictsToBag solved_dicts) +emptyInertCans :: InertCans+emptyInertCans+  = IC { inert_count    = 0+       , inert_eqs      = emptyDVarEnv+       , inert_dicts    = emptyDicts+       , inert_safehask = emptyDicts+       , inert_funeqs   = emptyFunEqs+       , inert_insts    = []+       , inert_irreds   = emptyCts }+ emptyInert :: InertSet emptyInert-  = IS { inert_cans = IC { inert_count    = 0-                         , inert_eqs      = emptyDVarEnv-                         , inert_dicts    = emptyDicts-                         , inert_safehask = emptyDicts-                         , inert_funeqs   = emptyFunEqs-                         , inert_irreds   = emptyCts }-       , inert_flat_cache    = emptyExactFunEqs-       , inert_fsks          = []-       , inert_solved_dicts  = emptyDictMap }+  = IS { inert_cans         = emptyInertCans+       , inert_fsks         = []+       , inert_flat_cache   = emptyExactFunEqs+       , inert_solved_dicts = emptyDictMap }   {- Note [Solved dictionaries]@@ -467,9 +484,17 @@  * See also Note [Do not add superclasses of solved dictionaries] -* The inert_solved_dicts field is not rewritten by equalities, so it may-  get out of date.+* 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++* We only cache dictionaries from top-level instances, not from+  local quantified constraints.  Reason: if we cached the latter+  we'd need to purge the cache when bringing new quantified+  constraints into scope, because quantified constraints "shadow"+  top-level instances.+ Note [Do not add superclasses of solved dictionaries] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Every member of inert_solved_dicts is the result of applying a dictionary@@ -629,6 +654,8 @@               -- All fully rewritten (modulo flavour constraints)               --     wrt inert_eqs +       , inert_insts :: [QCInst]+        , inert_safehask :: DictMap Ct               -- Failed dictionary resolution due to Safe Haskell overlapping               -- instances restriction. We keep this separate from inert_dicts@@ -874,7 +901,7 @@     (NB: we could strengten K1) in this way too, but see K3.    - (K2b): If this holds then, by (T2), b is not in t.  So applying the-    work item does not genenerate any new opportunities for applying S+    work item does not generate any new opportunities for applying S    - (K2c): If this holds, we can't pass through this triple infinitely     often, because if we did then fs>=f, fw>=f, hence by (R2)@@ -985,6 +1012,7 @@   ppr (IC { inert_eqs = eqs           , inert_funeqs = funeqs, inert_dicts = dicts           , inert_safehask = safehask, inert_irreds = irreds+          , inert_insts = insts           , inert_count = count })     = braces $ vcat       [ ppUnless (isEmptyDVarEnv eqs) $@@ -998,6 +1026,8 @@         text "Safe Haskell unsafe overlap =" <+> pprCts (dictsToBag safehask)       , ppUnless (isEmptyCts irreds) $         text "Irreds =" <+> pprCts irreds+      , ppUnless (null insts) $+        text "Given instances =" <+> vcat (map ppr insts)       , text "Unsolved goals =" <+> int count       ] @@ -1129,8 +1159,78 @@   because even tyvars in the casts and coercions could give   an infinite loop if we don't expose it +* CIrredCan: Yes if the inert set can rewrite the constraint.+  We used to think splitting irreds was unnecessary, but+  see Note [Splitting Irred WD constraints]+ * Others: nothing is gained by splitting. +Note [Splitting Irred WD constraints]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Splitting Irred constraints can make a difference. Here is the+scenario:++  a[sk] :: F v     -- F is a type family+  beta :: alpha++  work item: [WD] a ~ beta++This is heterogeneous, so we try flattening the kinds.++  co :: F v ~ fmv+  [WD] (a |> co) ~ beta++This is still hetero, so we emit a kind equality and make the work item an+inert Irred.++  work item: [D] fmv ~ alpha+  inert: [WD] (a |> co) ~ beta (CIrredCan)++Can't make progress on the work item. Add to inert set. This kicks out the+old inert, because a [D] can rewrite a [WD].++  work item: [WD] (a |> co) ~ beta+  inert: [D] fmv ~ alpha (CTyEqCan)++Can't make progress on this work item either (although GHC tries by+decomposing the cast and reflattening... but that doesn't make a difference),+which is still hetero. Emit a new kind equality and add to inert set. But,+critically, we split the Irred.++  work list:+   [D] fmv ~ alpha (CTyEqCan)+   [D] (a |> co) ~ beta (CIrred) -- this one was split off+  inert:+   [W] (a |> co) ~ beta+   [D] fmv ~ alpha++We quickly solve the first work item, as it's the same as an inert.++  work item: [D] (a |> co) ~ beta+  inert:+   [W] (a |> co) ~ beta+   [D] fmv ~ alpha++We decompose the cast, yielding++  [D] a ~ beta++We then flatten the kinds. The lhs kind is F v, which flattens to fmv which+then rewrites to alpha.++  co' :: F v ~ alpha+  [D] (a |> co') ~ beta++Now this equality is homo-kinded. So we swizzle it around to++  [D] beta ~ (a |> co')++and set beta := a |> co', and go home happy.++If we don't split the Irreds, we loop. This is all dangerously subtle.++This is triggered by test case typecheck/should_compile/SplitWD.+ Note [Examples of how Derived shadows helps completeness] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Trac #10009, a very nasty example:@@ -1293,8 +1393,10 @@   || anyRewritableTyVar False eq_rel (canRewriteTv inert_eqs) ty   -- NB False: do not ignore casts and coercions   -- See Note [Splitting WD constraints]-  where +shouldSplitWD inert_eqs (CIrredCan { cc_ev = ev })+  = anyRewritableTyVar False (ctEvEqRel ev) (canRewriteTv inert_eqs) (ctEvPred ev)+ shouldSplitWD _ _ = False   -- No point in splitting otherwise  should_split_match_args :: InertEqs -> [TcType] -> Bool@@ -1375,6 +1477,45 @@  {- ********************************************************************* *                                                                      *+                   Inert instances: inert_insts+*                                                                      *+********************************************************************* -}++addInertForAll :: QCInst -> TcS ()+-- Add a local Given instance, typically arising from a type signature+addInertForAll new_qci+  = updInertCans $ \ics ->+    ics { inert_insts = add_qci (inert_insts ics) }+  where+    add_qci :: [QCInst] -> [QCInst]+    -- See Note [Do not add duplicate quantified instances]+    add_qci qcis | any same_qci qcis = qcis+                 | otherwise         = new_qci : qcis++    same_qci old_qci = tcEqType (ctEvPred (qci_ev old_qci))+                                (ctEvPred (qci_ev new_qci))++{- Note [Do not add duplicate quantified instances]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider this (Trac #15244):++  f :: (C g, D g) => ....+  class S g => C g where ...+  class S g => D g where ...+  class (forall a. Eq a => Eq (g a)) => S g where ...++Then in f's RHS there are two identical quantified constraints+available, one via the superclasses of C and one via the superclasses+of D.  The two are identical, and it seems wrong to reject the program+because of that. But without doing duplicate-elimination we will have+two matching QCInsts when we try to solve constraints arising from f's+RHS.++The simplest thing is simply to eliminate duplicattes, which we do here.+-}++{- *********************************************************************+*                                                                      *                   Adding an inert *                                                                      * ************************************************************************@@ -1413,43 +1554,37 @@ CFunEqCan, including the fsk. -} -addInertEq :: Ct -> TcS ()--- This is a key function, because of the kick-out stuff+addInertCan :: Ct -> TcS ()  -- Constraints *other than* equalities -- Precondition: item /is/ canonical -- See Note [Adding an equality to the InertCans]-addInertEq ct-  = do { traceTcS "addInertEq {" $-         text "Adding new inert equality:" <+> ppr ct--       ; ics <- getInertCans--       ; ct@(CTyEqCan { cc_tyvar = tv, cc_ev = ev, cc_eq_rel = eq_rel })-             <- maybeEmitShadow ics ct--       ; (_, ics1) <- kickOutRewritable (ctEvFlavour ev, eq_rel) tv ics--       ; let ics2 = ics1 { inert_eqs   = addTyEq (inert_eqs ics1) tv ct-                         , inert_count = bumpUnsolvedCount ev (inert_count ics1) }-       ; setInertCans ics2--       ; traceTcS "addInertEq }" $ empty }-----------------addInertCan :: Ct -> TcS ()  -- Constraints *other than* equalities addInertCan ct   = do { traceTcS "insertInertCan {" $-         text "Trying to insert new non-eq inert item:" <+> ppr ct+         text "Trying to insert new inert item:" <+> ppr ct         ; ics <- getInertCans-       ; ct <- maybeEmitShadow ics ct+       ; ct  <- maybeEmitShadow ics ct+       ; ics <- maybeKickOut ics ct        ; setInertCans (add_item ics ct)         ; traceTcS "addInertCan }" $ empty } +maybeKickOut :: InertCans -> Ct -> TcS InertCans+-- For a CTyEqCan, kick out any inert that can be rewritten by the CTyEqCan+maybeKickOut ics ct+  | CTyEqCan { cc_tyvar = tv, cc_ev = ev, cc_eq_rel = eq_rel } <- ct+  = do { (_, ics') <- kickOutRewritable (ctEvFlavour ev, eq_rel) tv ics+       ; return ics' }+  | otherwise+  = return ics+ add_item :: InertCans -> Ct -> InertCans add_item ics item@(CFunEqCan { cc_fun = tc, cc_tyargs = tys })   = ics { inert_funeqs = insertFunEq (inert_funeqs ics) tc tys item } +add_item ics item@(CTyEqCan { cc_tyvar = tv, cc_ev = ev })+  = ics { inert_eqs   = addTyEq (inert_eqs ics) tv item+        , inert_count = bumpUnsolvedCount ev (inert_count ics) }+ add_item ics@(IC { inert_irreds = irreds, inert_count = count })          item@(CIrredCan { cc_ev = ev, cc_insol = insoluble })   = ics { inert_irreds = irreds `Bag.snocBag` item@@ -1463,8 +1598,7 @@  add_item _ item   = pprPanic "upd_inert set: can't happen! Inserting " $-    ppr item   -- CTyEqCan is dealt with by addInertEq-               -- Can't be CNonCanonical, CHoleCan,+    ppr item   -- Can't be CNonCanonical, CHoleCan,                -- because they only land in inert_irreds  bumpUnsolvedCount :: CtEvidence -> Int -> Int@@ -1498,12 +1632,14 @@                     -> InertCans                     -> (WorkList, InertCans) -- See Note [kickOutRewritable]-kick_out_rewritable new_fr new_tv ics@(IC { inert_eqs      = tv_eqs-                                        , inert_dicts    = dictmap-                                        , inert_safehask = safehask-                                        , inert_funeqs   = funeqmap-                                        , inert_irreds   = irreds-                                        , inert_count    = n })+kick_out_rewritable new_fr new_tv+                    ics@(IC { inert_eqs      = tv_eqs+                            , inert_dicts    = dictmap+                            , inert_safehask = safehask+                            , inert_funeqs   = funeqmap+                            , inert_irreds   = irreds+                            , inert_insts    = old_insts+                            , inert_count    = n })   | not (new_fr `eqMayRewriteFR` new_fr)   = (emptyWorkList, ics)         -- If new_fr can't rewrite itself, it can't rewrite@@ -1519,6 +1655,7 @@                        , inert_safehask = safehask   -- ??                        , inert_funeqs   = feqs_in                        , inert_irreds   = irs_in+                       , inert_insts    = insts_in                        , inert_count    = n - workListWantedCount kicked_out }      kicked_out :: WorkList@@ -1531,7 +1668,8 @@     kicked_out = foldrBag extendWorkListCt                           (emptyWorkList { wl_eqs    = tv_eqs_out                                          , wl_funeqs = feqs_out })-                          (dicts_out `andCts` irs_out)+                          ((dicts_out `andCts` irs_out)+                            `extendCtsList` insts_out)      (tv_eqs_out, tv_eqs_in) = foldDVarEnv kick_out_eqs ([], emptyDVarEnv) tv_eqs     (feqs_out,   feqs_in)   = partitionFunEqs  kick_out_ct funeqmap@@ -1542,6 +1680,22 @@       -- Of course we must kick out irreducibles like (c a), in case       -- we can rewrite 'c' to something more useful +    -- Kick-out for inert instances+    -- See Note [Quantified constraints] in TcCanonical+    insts_out :: [Ct]+    insts_in  :: [QCInst]+    (insts_out, insts_in)+       | fr_may_rewrite (Given, NomEq)  -- All the insts are Givens+       = partitionWith kick_out_qci old_insts+       | otherwise+       = ([], old_insts)+    kick_out_qci qci+      | let ev = qci_ev qci+      , fr_can_rewrite_ty NomEq (ctEvPred (qci_ev qci))+      = Left (mkNonCanonical ev)+      | otherwise+      = Right qci+     (_, new_role) = new_fr      fr_can_rewrite_ty :: EqRel -> Type -> Bool@@ -1700,6 +1854,15 @@        ; updInertTcS $ \ ics ->              ics { inert_solved_dicts = addDict (inert_solved_dicts ics) cls tys item } } +getSolvedDicts :: TcS (DictMap CtEvidence)+getSolvedDicts = do { ics <- getTcSInerts; return (inert_solved_dicts ics) }++setSolvedDicts :: DictMap CtEvidence -> TcS ()+setSolvedDicts solved_dicts+  = updInertTcS $ \ ics ->+    ics { inert_solved_dicts = solved_dicts }++ {- ********************************************************************* *                                                                      *                   Other inert-set operations@@ -1772,30 +1935,54 @@                      $ concat (dVarEnvElts (inert_eqs inerts))        ; return (filter isGivenCt all_cts) } -getPendingScDicts :: TcS [Ct]--- Find all inert Given dictionaries whose cc_pend_sc flag is True--- Set the flag to False in the inert set, and return that Ct-getPendingScDicts = updRetInertCans get_sc_dicts+getPendingGivenScs :: TcS [Ct]+-- Find all inert Given dictionaries, or quantified constraints,+--     whose cc_pend_sc flag is True+--     and that belong to the current level+-- Set their cc_pend_sc flag to False in the inert set, and return that Ct+getPendingGivenScs = do { lvl <- getTcLevel+                        ; updRetInertCans (get_sc_pending lvl) }++get_sc_pending :: TcLevel -> InertCans -> ([Ct], InertCans)+get_sc_pending this_lvl ic@(IC { inert_dicts = dicts, inert_insts = insts })+  = ASSERT2( all isGivenCt sc_pending, ppr sc_pending )+       -- When getPendingScDics is called,+       -- there are never any Wanteds in the inert set+    (sc_pending, ic { inert_dicts = dicts', inert_insts = insts' })   where-    get_sc_dicts ic@(IC { inert_dicts = dicts })-      = (sc_pend_dicts, ic')-      where-        ic' = ic { inert_dicts = foldr add dicts sc_pend_dicts }+    sc_pending = sc_pend_insts ++ sc_pend_dicts -        sc_pend_dicts :: [Ct]-        sc_pend_dicts = foldDicts get_pending dicts []+    sc_pend_dicts = foldDicts get_pending dicts []+    dicts' = foldr add dicts sc_pend_dicts +    (sc_pend_insts, insts') = mapAccumL get_pending_inst [] insts+     get_pending :: Ct -> [Ct] -> [Ct]  -- Get dicts with cc_pend_sc = True                                        -- but flipping the flag     get_pending dict dicts-        | Just dict' <- isPendingScDict dict = dict' : dicts-        | otherwise                          = dicts+        | Just dict' <- isPendingScDict dict+        , belongs_to_this_level (ctEvidence dict)+        = dict' : dicts+        | otherwise+        = dicts      add :: Ct -> DictMap Ct -> DictMap Ct     add ct@(CDictCan { cc_class = cls, cc_tyargs = tys }) dicts         = addDict dicts cls tys ct     add ct _ = pprPanic "getPendingScDicts" (ppr ct) +    get_pending_inst :: [Ct] -> QCInst -> ([Ct], QCInst)+    get_pending_inst cts qci@(QCI { qci_ev = ev })+       | Just qci' <- isPendingScInst qci+       , belongs_to_this_level ev+       = (CQuantCan qci' : cts, qci')+       | otherwise+       = (cts, qci)++    belongs_to_this_level ev = ctLocLevel (ctEvLoc ev) == this_lvl+    -- We only want Givens from this level; see (3a) in+    -- Note [The superclass story] in TcCanonical+ getUnsolvedInerts :: TcS ( Bag Implication                          , Cts     -- Tyvar eqs: a ~ ty                          , Cts     -- Fun eqs:   F a ~ ty@@ -1837,7 +2024,7 @@     -- For CFunEqCans we ignore the Derived ones, and keep     -- only the Wanteds for flattening.  The Derived ones     -- share a unification variable with the corresponding-    -- Wanted, so we definitely don't want to to participate+    -- Wanted, so we definitely don't want to participate     -- in unflattening     -- See Note [Type family equations]     add_if_wanted ct cts | isWantedCt ct = ct `consCts` cts@@ -1871,8 +2058,12 @@                       -- outer context but were refined to an insoluble by                       -- a local equality; so do /not/ add ct_given_here. -       ; traceTcS "getNoGivenEqs" (vcat [ ppr has_given_eqs, ppr inerts-                                        , ppr insols])+       ; traceTcS "getNoGivenEqs" $+         vcat [ if has_given_eqs then text "May have given equalities"+                                 else text "No given equalities"+              , text "Skols:" <+> ppr skol_tvs+              , text "Inerts:" <+> ppr inerts+              , text "Insols:" <+> ppr insols]        ; return (not has_given_eqs, insols) }   where     eqs_given_here :: EqualCtList -> Bool@@ -1900,7 +2091,7 @@ -- Given might overlap with an instance. See Note [Instance and Given overlap] -- in TcInteract. matchableGivens :: CtLoc -> PredType -> InertSet -> Cts-matchableGivens loc_w pred (IS { inert_cans = inert_cans })+matchableGivens loc_w pred_w (IS { inert_cans = inert_cans })   = filterBag matchable_given all_relevant_givens   where     -- just look in class constraints and irreds. matchableGivens does get called@@ -1909,7 +2100,7 @@     -- non-canonical -- that is, irreducible -- equalities.     all_relevant_givens :: Cts     all_relevant_givens-      | Just (clas, _) <- getClassPredTys_maybe pred+      | Just (clas, _) <- getClassPredTys_maybe pred_w       = findDictsByClass (inert_dicts inert_cans) clas         `unionBags` inert_irreds inert_cans       | otherwise@@ -1917,16 +2108,17 @@      matchable_given :: Ct -> Bool     matchable_given ct-      | CtGiven { ctev_loc = loc_g } <- ctev-      , Just _ <- tcUnifyTys bind_meta_tv [ctEvPred ctev] [pred]-      , not (prohibitedSuperClassSolve loc_g loc_w)-      = True+      | CtGiven { ctev_loc = loc_g, ctev_pred = pred_g } <- ctEvidence ct+      = mightMatchLater pred_g loc_g pred_w loc_w        | otherwise       = False-      where-        ctev = cc_ev ct +mightMatchLater :: TcPredType -> CtLoc -> TcPredType -> CtLoc -> Bool+mightMatchLater given_pred given_loc wanted_pred wanted_loc+  =  not (prohibitedSuperClassSolve given_loc wanted_loc)+  && isJust (tcUnifyTys bind_meta_tv [given_pred] [wanted_pred])+  where     bind_meta_tv :: TcTyVar -> BindFlag     -- Any meta tyvar may be unified later, so we treat it as     -- bindable when unifying with givens. That ensures that we@@ -2015,6 +2207,10 @@    returned as part of 'fsks'  For an example, see Trac #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+tyvars. -}  removeInertCts :: [Ct] -> InertCans -> InertCans@@ -2035,6 +2231,7 @@     CTyEqCan  { cc_tyvar = x,  cc_rhs    = ty } ->       is { inert_eqs    = delTyEq (inert_eqs is) x ty } +    CQuantCan {}     -> panic "removeInertCt: CQuantCan"     CIrredCan {}     -> panic "removeInertCt: CIrredEvCan"     CNonCanonical {} -> panic "removeInertCt: CNonCanonical"     CHoleCan {}      -> panic "removeInertCt: CHoleCan"@@ -2395,6 +2592,12 @@ instance MonadUnique TcS where    getUniqueSupplyM = wrapTcS getUniqueSupplyM +instance HasModule TcS where+   getModule = wrapTcS getModule++instance MonadThings TcS where+   lookupThing n = wrapTcS (lookupThing n)+ -- Basic functionality -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ wrapTcS :: TcM a -> TcS a@@ -2482,7 +2685,7 @@ -- | This can deal only with equality constraints. runTcSEqualities :: TcS a -> TcM a runTcSEqualities thing_inside-  = do { ev_binds_var <- TcM.newTcEvBinds+  = do { ev_binds_var <- TcM.newNoTcEvBinds        ; runTcSWithEvBinds ev_binds_var thing_inside }  runTcSWithEvBinds :: EvBindsVar@@ -2557,9 +2760,10 @@                    , tcs_count         = count                    } ->     do { inerts <- TcM.readTcRef old_inert_var-       ; let nest_inert = emptyInert { inert_cans         = inert_cans inerts-                                     , inert_solved_dicts = inert_solved_dicts inerts }-                          -- See Note [Do not inherit the flat cache]+       ; let nest_inert = emptyInert+                            { inert_cans = inert_cans inerts+                            , inert_solved_dicts = inert_solved_dicts inerts }+                              -- See Note [Do not inherit the flat cache]        ; new_inert_var <- TcM.newTcRef nest_inert        ; new_wl_var    <- TcM.newTcRef emptyWorkList        ; let nest_env = TcSEnv { tcs_ev_binds      = ref@@ -2619,41 +2823,82 @@         ; return res } -buildImplication :: SkolemInfo-                 -> [TcTyVar]        -- Skolems-                 -> [EvVar]          -- Givens-                 -> TcS result-                 -> TcS (Bag Implication, TcEvBinds, result)--- Just like TcUnify.buildImplication, but in the TcS monnad,--- using the work-list to gather the constraints-buildImplication skol_info skol_tvs givens (TcS thing_inside)-  = TcS $ \ env ->-    do { new_wl_var <- TcM.newTcRef emptyWorkList-       ; tc_lvl <- TcM.getTcLevel-       ; let new_tclvl = pushTcLevel tc_lvl+checkTvConstraintsTcS :: SkolemInfo+                      -> [TcTyVar]        -- Skolems+                      -> TcS (result, Cts)+                      -> TcS result+-- Just like TcUnify.checkTvConstraints, but+--   - In the TcS monnad+--   - The thing-inside should not put things in the work-list+--     Instead, it returns the Wanted constraints it needs+--   - No 'givens', and no TcEvBinds; this is type-level constraints only+checkTvConstraintsTcS skol_info skol_tvs (TcS thing_inside)+  = TcS $ \ tcs_env ->+    do { let wl_panic  = pprPanic "TcSMonad.buildImplication" $+                         ppr skol_info $$ ppr skol_tvs+                         -- This panic checks that the thing-inside+                         -- does not emit any work-list constraints+             new_tcs_env = tcs_env { tcs_worklist = wl_panic } -       ; res <- TcM.setTcLevel new_tclvl $-                thing_inside (env { tcs_worklist = new_wl_var })+       ; ((res, wanteds), new_tclvl) <- TcM.pushTcLevelM $+                                        thing_inside new_tcs_env -       ; wl@WL { wl_eqs = eqs } <- TcM.readTcRef new_wl_var-       ; if null eqs-         then return (emptyBag, emptyTcEvBinds, res)-         else-    do { env <- TcM.getLclEnv+       ; unless (null wanteds) $+         do { ev_binds_var <- TcM.newNoTcEvBinds+            ; imp <- newImplication+            ; let wc = emptyWC { wc_simple = wanteds }+                  imp' = imp { ic_tclvl  = new_tclvl+                             , ic_skols  = skol_tvs+                             , ic_wanted = wc+                             , ic_binds  = ev_binds_var+                             , ic_info   = skol_info }++           -- Add the implication to the work-list+           ; TcM.updTcRef (tcs_worklist tcs_env)+                          (extendWorkListImplic (unitBag imp')) }++      ; return res }++checkConstraintsTcS :: SkolemInfo+                    -> [TcTyVar]        -- Skolems+                    -> [EvVar]          -- Givens+                    -> TcS (result, Cts)+                    -> TcS (result, TcEvBinds)+-- Just like checkConstraintsTcS, but+--   - In the TcS monnad+--   - The thing-inside should not put things in the work-list+--     Instead, it returns the Wanted constraints it needs+--   - I did not bother to put in the fast-path for+--     empty-skols/empty-givens, or for empty-wanteds, because+--     this function is used only for "quantified constraints" in+--     with both tests are pretty much guaranteed to fail+checkConstraintsTcS skol_info skol_tvs given (TcS thing_inside)+  = TcS $ \ tcs_env ->+    do { let wl_panic  = pprPanic "TcSMonad.buildImplication" $+                         ppr skol_info $$ ppr skol_tvs+                         -- This panic checks that the thing-inside+                         -- does not emit any work-list constraints+             new_tcs_env = tcs_env { tcs_worklist = wl_panic }++       ; ((res, wanteds), new_tclvl) <- TcM.pushTcLevelM $+                                        thing_inside new_tcs_env+        ; ev_binds_var <- TcM.newTcEvBinds-       ; let wc  = ASSERT2( null (wl_funeqs wl) && null (wl_rest wl) &&-                            null (wl_implics wl), ppr wl )-                   WC { wc_simple = listToCts eqs-                      , wc_impl   = emptyBag }-             imp = newImplication { ic_tclvl  = new_tclvl-                                  , ic_skols  = skol_tvs-                                  , ic_given  = givens-                                  , ic_wanted = wc-                                  , ic_binds  = ev_binds_var-                                  , ic_env    = env-                                  , ic_info   = skol_info }-      ; return (unitBag imp, TcEvBinds ev_binds_var, res) } }+       ; imp <- newImplication+       ; let wc = emptyWC { wc_simple = wanteds }+             imp' = imp { ic_tclvl  = new_tclvl+                        , ic_skols  = skol_tvs+                        , ic_given  = given+                        , ic_wanted = wc+                        , ic_binds  = ev_binds_var+                        , ic_info   = skol_info } +           -- Add the implication to the work-list+       ; TcM.updTcRef (tcs_worklist tcs_env)+                      (extendWorkListImplic (unitBag imp'))++       ; return (res, TcEvBinds ev_binds_var) }+ {- Note [Propagate the solved dictionaries] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -2693,9 +2938,7 @@ updWorkListTcS :: (WorkList -> WorkList) -> TcS () updWorkListTcS f   = do { wl_var <- getTcSWorkListRef-       ; wl_curr <- wrapTcS (TcM.readTcRef wl_var)-       ; let new_work = f wl_curr-       ; wrapTcS (TcM.writeTcRef wl_var new_work) }+       ; wrapTcS (TcM.updTcRef wl_var f)}  emitWorkNC :: [CtEvidence] -> TcS () emitWorkNC evs@@ -2809,11 +3052,6 @@ pprEq :: TcType -> TcType -> SDoc pprEq ty1 ty2 = pprParendType ty1 <+> char '~' <+> pprParendType ty2 -isTouchableMetaTyVarTcS :: TcTyVar -> TcS Bool-isTouchableMetaTyVarTcS tv-  = do { tclvl <- getTcLevel-       ; return $ isTouchableMetaTyVar tclvl tv }- isFilledMetaTyVar_maybe :: TcTyVar -> TcS (Maybe Type) isFilledMetaTyVar_maybe tv  = case tcTyVarDetails tv of@@ -2851,6 +3089,8 @@ zonkWC :: WantedConstraints -> TcS WantedConstraints zonkWC wc = wrapTcS (TcM.zonkWC wc) +zonkTcTyCoVarBndr :: TcTyCoVar -> TcS TcTyCoVar+zonkTcTyCoVarBndr tv = wrapTcS (TcM.zonkTcTyCoVarBndr tv)  {- ********************************************************************* *                                                                      *@@ -2879,7 +3119,7 @@            -- Construct the Refl evidence            ; let pred = mkPrimEqPred fam_ty (mkTyVarTy fsk)                  co   = mkNomReflCo fam_ty-           ; ev  <- newGivenEvVar loc (pred, EvCoercion co)+           ; ev  <- newGivenEvVar loc (pred, evCoercion co)            ; return (ev, co, fsk) }        | otherwise  -- Generate a [WD] for both Wanted and Derived@@ -2902,6 +3142,7 @@ -- is nicely paired with the creation an empty inert_fsks list. unflattenGivens inert_var  = do { inerts <- TcM.readTcRef inert_var+       ; TcM.traceTc "unflattenGivens" (ppr (inert_fsks inerts))        ; mapM_ flatten_one (inert_fsks inerts) }   where     flatten_one (fsk, ty) = TcM.writeMetaTyVar fsk ty@@ -2942,7 +3183,52 @@                    do { tv_ty <- TcM.newFlexiTyVarTy (tyVarKind fmv)                       ; TcM.writeMetaTyVar fmv tv_ty } } +-----------------------------+dischargeFunEq :: CtEvidence -> TcTyVar -> TcCoercion -> TcType -> TcS ()+-- (dischargeFunEqCan ev tv co ty)+--     Preconditions+--       - ev :: F tys ~ tv   is a CFunEqCan+--       - tv is a FlatMetaTv of FlatSkolTv+--       - co :: F tys ~ xi+--       - fmv/fsk `notElem` xi+--       - fmv not filled (for Wanteds)+--+-- Then for [W] or [WD], we actually fill in the fmv:+--      set fmv := xi,+--      set ev  := co+--      kick out any inert things that are now rewritable+--+-- For [D], we instead emit an equality that must ultimately hold+--      [D] xi ~ fmv+--      Does not evaluate 'co' if 'ev' is Derived+--+-- For [G], emit this equality+--     [G] (sym ev; co) :: fsk ~ xi +-- See TcFlatten Note [The flattening story],+-- especially "Ownership of fsk/fmv"+dischargeFunEq (CtGiven { ctev_evar = old_evar, ctev_loc = loc }) fsk co xi+  = do { new_ev <- newGivenEvVar loc ( new_pred, evCoercion new_co  )+       ; emitWorkNC [new_ev] }+  where+    new_pred = mkPrimEqPred (mkTyVarTy fsk) xi+    new_co   = mkTcSymCo (mkTcCoVarCo old_evar) `mkTcTransCo` co++dischargeFunEq ev@(CtWanted { ctev_dest = dest }) fmv co xi+  = ASSERT2( not (fmv `elemVarSet` tyCoVarsOfType xi), ppr ev $$ ppr fmv $$ ppr xi )+    do { setWantedEvTerm dest (evCoercion co)+       ; unflattenFmv fmv xi+       ; n_kicked <- kickOutAfterUnification fmv+       ; traceTcS "dischargeFmv" (ppr fmv <+> equals <+> ppr xi $$ pprKicked n_kicked) }++dischargeFunEq (CtDerived { ctev_loc = loc }) fmv _co xi+  = emitNewDerivedEq loc Nominal xi (mkTyVarTy fmv)+              -- FunEqs are always at Nominal role++pprKicked :: Int -> SDoc+pprKicked 0 = empty+pprKicked n = parens (int n <+> text "kicked out")+ {- ********************************************************************* *                                                                      * *                Instantiation etc.@@ -2976,6 +3262,7 @@        ; let name = setNameUnique (tyVarName tv) uniq              kind = substTyUnchecked subst (tyVarKind tv)              ty'  = mkTyVarTy (mkTcTyVar name kind details)+       ; TcM.traceTc "instFlexi" (ppr ty')        ; return (extendTvSubst subst tv ty') }  tcInstType :: ([TyVar] -> TcM (TCvSubst, [TcTyVar]))@@ -2991,7 +3278,7 @@ -- Creating and setting evidence variables and CtFlavors -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -data MaybeNew = Fresh CtEvidence | Cached EvTerm+data MaybeNew = Fresh CtEvidence | Cached EvExpr  isFresh :: MaybeNew -> Bool isFresh (Fresh {})  = True@@ -3000,9 +3287,9 @@ freshGoals :: [MaybeNew] -> [CtEvidence] freshGoals mns = [ ctev | Fresh ctev <- mns ] -getEvTerm :: MaybeNew -> EvTerm-getEvTerm (Fresh ctev) = ctEvTerm ctev-getEvTerm (Cached evt) = evt+getEvExpr :: MaybeNew -> EvExpr+getEvExpr (Fresh ctev) = ctEvExpr ctev+getEvExpr (Cached evt) = evt  setEvBind :: EvBind -> TcS () setEvBind ev_bind@@ -3012,7 +3299,8 @@ -- | Mark variables as used filling a coercion hole useVars :: CoVarSet -> TcS () useVars vars-  = do { EvBindsVar { ebv_tcvs = ref } <- getTcEvBindsVar+  = do { ev_binds_var <- getTcEvBindsVar+       ; let ref = ebv_tcvs ev_binds_var        ; wrapTcS $          do { tcvs <- TcM.readTcRef ref             ; let tcvs' = tcvs `unionVarSet` vars@@ -3025,32 +3313,32 @@        ; wrapTcS $ TcM.fillCoercionHole hole co } setWantedEq (EvVarDest ev) _ = pprPanic "setWantedEq" (ppr ev) --- | Equalities only-setEqIfWanted :: CtEvidence -> Coercion -> TcS ()-setEqIfWanted (CtWanted { ctev_dest = dest }) co = setWantedEq dest co-setEqIfWanted _ _ = return ()---- | Good for equalities and non-equalities+-- | Good for both equalities and non-equalities setWantedEvTerm :: TcEvDest -> EvTerm -> TcS () setWantedEvTerm (HoleDest hole) tm-  = do { let co = evTermCoercion tm-       ; useVars (coVarsOfCo co)+  | Just co <- evTermCoercion_maybe tm+  = do { useVars (coVarsOfCo co)        ; wrapTcS $ TcM.fillCoercionHole hole co }-setWantedEvTerm (EvVarDest ev) tm = setWantedEvBind ev tm+  | otherwise+  = do { let co_var = coHoleCoVar hole+       ; setEvBind (mkWantedEvBind co_var tm)+       ; wrapTcS $ TcM.fillCoercionHole hole (mkTcCoVarCo co_var) } -setWantedEvBind :: EvVar -> EvTerm -> TcS ()-setWantedEvBind ev_id tm = setEvBind (mkWantedEvBind ev_id tm)+setWantedEvTerm (EvVarDest ev_id) tm+  = setEvBind (mkWantedEvBind ev_id tm)  setEvBindIfWanted :: CtEvidence -> EvTerm -> TcS () setEvBindIfWanted ev tm   = case ev of-      CtWanted { ctev_dest = dest }-        -> setWantedEvTerm dest tm-      _ -> return ()+      CtWanted { ctev_dest = dest } -> setWantedEvTerm dest tm+      _                             -> return ()  newTcEvBinds :: TcS EvBindsVar newTcEvBinds = wrapTcS TcM.newTcEvBinds +newNoTcEvBinds :: TcS EvBindsVar+newNoTcEvBinds = wrapTcS TcM.newNoTcEvBinds+ newEvVar :: TcPredType -> TcS EvVar newEvVar pred = wrapTcS (TcM.newEvVar pred) @@ -3114,7 +3402,7 @@             Just ctev               | not (isDerived ctev)               -> do { traceTcS "newWantedEvVar/cache hit" $ ppr ctev-                    ; return $ Cached (ctEvTerm ctev) }+                    ; return $ Cached (ctEvExpr ctev) }             _ -> do { ctev <- newWantedEvVarNC loc pty                     ; return (Fresh ctev) } } @@ -3200,4 +3488,3 @@    (forall a. t1 ~ t2) See TcSMonad.deferTcSForAllEq -}-
typecheck/TcSigs.hs view
@@ -41,7 +41,9 @@ import Type( mkTyVarBinders )  import DynFlags-import Var      ( TyVar, tyVarName, tyVarKind )+import Var      ( TyVar, tyVarKind )+import VarSet+import VarEnv   ( mkInScopeSet ) import Id       ( Id, idName, idType, idInlinePragma, setInlinePragma, mkLocalId ) import PrelNames( mkUnboundName ) import BasicTypes@@ -49,7 +51,6 @@ import Module( getModule ) import Name import NameEnv-import VarSet import Outputable import SrcLoc import Util( singleton )@@ -70,7 +71,7 @@     f = ...g...     g = ...f... -* HsSyn: a signature in a binding starts of as a TypeSig, in+* HsSyn: a signature in a binding starts off as a TypeSig, in   type HsBinds.Sig  * When starting a mutually recursive group, like f/g above, we@@ -180,20 +181,20 @@        ; return (poly_ids, lookupNameEnv env) }  tcTySig :: LSig GhcRn -> TcM [TcSigInfo]-tcTySig (L _ (IdSig id))+tcTySig (L _ (IdSig _ id))   = do { let ctxt = FunSigCtxt (idName id) False                     -- False: do not report redundant constraints                     -- The user has no control over the signature!              sig = completeSigFromId ctxt id        ; return [TcIdSig sig] } -tcTySig (L loc (TypeSig names sig_ty))+tcTySig (L loc (TypeSig _ names sig_ty))   = setSrcSpan loc $     do { sigs <- sequence [ tcUserTypeSig loc sig_ty (Just name)                           | L _ name <- names ]        ; return (map TcIdSig sigs) } -tcTySig (L loc (PatSynSig names sig_ty))+tcTySig (L loc (PatSynSig _ names sig_ty))   = setSrcSpan loc $     do { tpsigs <- sequence [ tcPatSynSig name sig_ty                             | L _ name <- names ]@@ -250,7 +251,8 @@  isCompleteHsSig :: LHsSigWcType GhcRn -> Bool -- ^ If there are no wildcards, return a LHsSigType-isCompleteHsSig (HsWC { hswc_wcs = wcs }) = null wcs+isCompleteHsSig (HsWC { hswc_ext = wcs }) = null wcs+isCompleteHsSig (XHsWildCardBndrs _) = panic "isCompleteHsSig"  {- Note [Fail eagerly on bad signatures] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -289,89 +291,44 @@  * Note that 'forall univ_tvs' and 'req_theta =>'         and 'forall ex_tvs'   and 'prov_theta =>'-  are all optional.  We gather the pieces at the the top of tcPatSynSig+  are all optional.  We gather the pieces at the top of tcPatSynSig  * Initially the implicitly-bound tyvars (added by the renamer) include both   universal and existential vars.  * After we kind-check the pieces and convert to Types, we do kind generalisation.--Note [The pattern-synonym signature splitting rule]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-Given a pattern signature, we must split-     the kind-generalised variables, and-     the implicitly-bound variables-into universal and existential.  The rule is this-(see discussion on Trac #11224):--     The universal tyvars are the ones mentioned in-          - univ_tvs: the user-specified (forall'd) universals-          - req_theta-          - res_ty-     The existential tyvars are all the rest--For example--   pattern P :: () => b -> T a-   pattern P x = ...--Here 'a' is universal, and 'b' is existential.  But there is a wrinkle:-how do we split the arg_tys from req_ty?  Consider--   pattern Q :: () => b -> S c -> T a-   pattern Q x = ...--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).--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,-and hence which variables are existential and which are universal.--And that in turn is why TcPatSynInfo has a separate field,-patsig_implicit_bndrs, to capture the implicitly bound type variables,-because we don't yet know how to split them up.--It's a slight compromise, because it means we don't really know the-pattern synonym's real signature until we see its declaration.  So,-for example, in hs-boot file, we may need to think what to do...-(eg don't have any implicitly-bound variables). -}  tcPatSynSig :: Name -> LHsSigType GhcRn -> TcM TcPatSynInfo+-- See Note [Pattern synonym signatures]+-- See Note [Recipe for checking a signature] in TcHsType tcPatSynSig name sig_ty-  | HsIB { hsib_vars = implicit_hs_tvs+  | HsIB { hsib_ext = HsIBRn { hsib_vars = 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-  = do { (implicit_tvs, (univ_tvs, req, ex_tvs, prov, body_ty))-           <- solveEqualities $-              tcImplicitTKBndrs implicit_hs_tvs $-              tcExplicitTKBndrs univ_hs_tvs  $ \ univ_tvs ->-              tcExplicitTKBndrs ex_hs_tvs    $ \ ex_tvs   ->+  = do { (implicit_tvs, (univ_tvs, (ex_tvs, (req, prov, body_ty))))+           <-  -- NB: tcImplicitTKBndrs calls solveEqualities+              tcImplicitTKBndrs skol_info implicit_hs_tvs $+              tcExplicitTKBndrs skol_info univ_hs_tvs     $+              tcExplicitTKBndrs skol_info ex_hs_tvs       $               do { req     <- tcHsContext hs_req                  ; prov    <- tcHsContext hs_prov                  ; body_ty <- tcHsOpenType hs_body_ty                      -- A (literal) pattern can be unlifted;                      -- e.g. pattern Zero <- 0#   (Trac #12094)-                 ; let bound_tvs-                         = unionVarSets [ allBoundVariabless req-                                        , allBoundVariabless prov-                                        , allBoundVariables body_ty-                                        ]-                 ; return ( (univ_tvs, req, ex_tvs, prov, body_ty)-                          , bound_tvs) }+                 ; return (req, prov, body_ty) } +       ; ungen_patsyn_ty <- zonkPromoteType $+                            build_patsyn_type [] implicit_tvs univ_tvs req+                                              ex_tvs prov body_ty+        -- Kind generalisation-       ; kvs <- kindGeneralize $-                build_patsyn_type [] implicit_tvs univ_tvs req-                                  ex_tvs prov body_ty+       ; kvs <- kindGeneralize ungen_patsyn_ty         -- These are /signatures/ so we zonk to squeeze out any kind-       -- unification variables.  Do this after quantifyTyVars which may+       -- unification variables.  Do this after kindGeneralize which may        -- default kind variables to *.-       ; traceTc "about zonk" empty        ; implicit_tvs <- mapM zonkTcTyCoVarBndr implicit_tvs        ; univ_tvs     <- mapM zonkTcTyCoVarBndr univ_tvs        ; ex_tvs       <- mapM zonkTcTyCoVarBndr ex_tvs@@ -379,33 +336,46 @@        ; prov         <- zonkTcTypes prov        ; body_ty      <- zonkTcType  body_ty +       -- Skolems have TcLevels too, though they're used only for debugging.+       -- If you don't do this, the debugging checks fail in TcPatSyn.+       -- Test case: patsyn/should_compile/T13441+       ; tclvl <- getTcLevel+       ; let env0                  = mkEmptyTCvSubst $ mkInScopeSet $ mkVarSet kvs+             (env1, implicit_tvs') = promoteSkolemsX tclvl env0 implicit_tvs+             (env2, univ_tvs')     = promoteSkolemsX tclvl env1 univ_tvs+             (env3, ex_tvs')       = promoteSkolemsX tclvl env2 ex_tvs+             req'                  = substTys env3 req+             prov'                 = substTys env3 prov+             body_ty'              = substTy  env3 body_ty+        -- Now do validity checking        ; checkValidType ctxt $-         build_patsyn_type kvs implicit_tvs univ_tvs req ex_tvs prov body_ty+         build_patsyn_type kvs implicit_tvs' univ_tvs' req' ex_tvs' prov' body_ty'         -- arguments become the types of binders. We thus cannot allow        -- levity polymorphism here-       ; let (arg_tys, _) = tcSplitFunTys body_ty+       ; let (arg_tys, _) = tcSplitFunTys body_ty'        ; mapM_ (checkForLevPoly empty) arg_tys         ; traceTc "tcTySig }" $-         vcat [ text "implicit_tvs" <+> ppr_tvs implicit_tvs+         vcat [ text "implicit_tvs" <+> ppr_tvs implicit_tvs'               , text "kvs" <+> ppr_tvs kvs-              , text "univ_tvs" <+> ppr_tvs univ_tvs-              , text "req" <+> ppr req-              , text "ex_tvs" <+> ppr_tvs ex_tvs-              , text "prov" <+> ppr prov-              , text "body_ty" <+> ppr body_ty ]+              , text "univ_tvs" <+> ppr_tvs univ_tvs'+              , text "req" <+> ppr req'+              , text "ex_tvs" <+> ppr_tvs ex_tvs'+              , text "prov" <+> ppr prov'+              , text "body_ty" <+> ppr body_ty' ]        ; return (TPSI { patsig_name = name-                      , patsig_implicit_bndrs = mkTyVarBinders Inferred kvs ++-                                                mkTyVarBinders Specified implicit_tvs-                      , patsig_univ_bndrs     = univ_tvs-                      , patsig_req            = req-                      , patsig_ex_bndrs       = ex_tvs-                      , patsig_prov           = prov-                      , patsig_body_ty        = body_ty }) }+                      , patsig_implicit_bndrs = mkTyVarBinders Inferred  kvs +++                                                mkTyVarBinders Specified implicit_tvs'+                      , patsig_univ_bndrs     = univ_tvs'+                      , patsig_req            = req'+                      , patsig_ex_bndrs       = ex_tvs'+                      , patsig_prov           = prov'+                      , patsig_body_ty        = body_ty' }) }   where     ctxt = PatSynCtxt name+    skol_info = SigTypeSkol ctxt      build_patsyn_type kvs imp univ req ex prov body       = mkInvForAllTys kvs $@@ -414,6 +384,7 @@         mkSpecForAllTys ex $         mkFunTys prov $         body+tcPatSynSig _ (XHsImplicitBndrs _) = panic "tcPatSynSig"  ppr_tvs :: [TyVar] -> SDoc ppr_tvs tvs = braces (vcat [ ppr tv <+> dcolon <+> ppr (tyVarKind tv)@@ -445,7 +416,7 @@                           , sig_ctxt = ctxt                           , sig_loc = loc })   = setSrcSpan loc $  -- Set the binding site of the tyvars-    do { (wcs, wcx, tvs, theta, tau) <- tcHsPartialSigType ctxt hs_ty+    do { (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@@ -454,8 +425,17 @@         --         the easiest way to do so, and is very similar to         --         the tcInstType in the CompleteSig case         -- See Trac #14643-        ; (subst, tvs') <- instSkolTyCoVars mk_sig_tv tvs-        ; let tv_prs = map tyVarName tvs `zip` tvs'+       ; let in_scope = mkInScopeSet $ closeOverKinds $ unionVarSets+                          [ mkVarSet (map snd wcs)+                          , maybe emptyVarSet tyCoVarsOfType wcx+                          , mkVarSet tvs+                          , tyCoVarsOfTypes theta+                          , tyCoVarsOfType tau ]+               -- the in_scope is a bit bigger than nec'y, but too big is always+               -- safe+             empty_subst = mkEmptyTCvSubst in_scope+       ; (subst, tvs') <- instSkolTyCoVarsX mk_sig_tv empty_subst tvs+       ; let tv_prs = tv_names `zip` tvs'         ; return (TISI { sig_inst_sig   = sig                       , sig_inst_skols = tv_prs@@ -518,10 +498,13 @@     prs = mapMaybe get_sig sigs      get_sig :: LSig GhcRn -> Maybe (Name, LSig GhcRn)-    get_sig (L l (SpecSig lnm@(L _ nm) ty inl)) = Just (nm, L l $ SpecSig   lnm ty (add_arity nm inl))-    get_sig (L l (InlineSig lnm@(L _ nm) inl))  = Just (nm, L l $ InlineSig lnm    (add_arity nm inl))-    get_sig (L l (SCCFunSig st lnm@(L _ nm) str))  = Just (nm, L l $ SCCFunSig st lnm str)-    get_sig _                                   = Nothing+    get_sig (L l (SpecSig x lnm@(L _ nm) ty inl))+      = Just (nm, L l $ SpecSig   x lnm ty (add_arity nm inl))+    get_sig (L l (InlineSig x lnm@(L _ nm) inl))+      = Just (nm, L l $ InlineSig x lnm    (add_arity nm inl))+    get_sig (L l (SCCFunSig x st lnm@(L _ nm) str))+      = Just (nm, L l $ SCCFunSig x st lnm str)+    get_sig _ = Nothing      add_arity n inl_prag   -- Adjust inl_sat field to match visible arity of function       | Inline <- inl_inline inl_prag@@ -554,7 +537,7 @@   | otherwise   = return poly_id   where-    inl_prags = [L loc prag | L loc (InlineSig _ prag) <- prags_for_me]+    inl_prags = [L loc prag | L loc (InlineSig _ _ prag) <- prags_for_me]      warn_multiple_inlines _ [] = return () @@ -706,7 +689,7 @@  -------------- tcSpecPrag :: TcId -> Sig GhcRn -> TcM [TcSpecPrag]-tcSpecPrag poly_id prag@(SpecSig fun_name hs_tys inl)+tcSpecPrag poly_id prag@(SpecSig _ fun_name hs_tys inl) -- See Note [Handling SPECIALISE pragmas] -- -- The Name fun_name in the SpecSig may not be the same as that of the poly_id@@ -762,8 +745,8 @@          else do             { pss <- mapAndRecoverM (wrapLocM tcImpSpec)                      [L loc (name,prag)-                               | (L loc prag@(SpecSig (L _ name) _ _)) <- prags-                               , not (nameIsLocalOrFrom this_mod name) ]+                             | (L loc prag@(SpecSig _ (L _ name) _ _)) <- prags+                             , not (nameIsLocalOrFrom this_mod name) ]             ; return $ concatMap (\(L l ps) -> map (L l) ps) pss } }   where     -- Ignore SPECIALISE pragmas for imported things
typecheck/TcSimplify.hs view
@@ -6,12 +6,16 @@        simplifyAmbiguityCheck,        simplifyDefault,        simplifyTop, simplifyTopImplic, captureTopConstraints,-       simplifyInteractive, solveEqualities,+       simplifyInteractive,+       solveEqualities, solveLocalEqualities,        simplifyWantedsTcM,        tcCheckSatisfiability,-       tcSubsumes,-       tcCheckHoleFit, +       simpl_top,++       promoteTyVar,+       promoteTyVarSet,+        -- For Rules we need these        solveWanteds, solveWantedsAndDrop,        approximateWC, runTcSDeriveds@@ -45,7 +49,6 @@ import Type import TysWiredIn    ( liftedRepTy ) import Unify         ( tcMatchTyKi )-import TcUnify       ( tcSubType_NC ) import Util import Var import VarSet@@ -58,6 +61,7 @@ import Data.Foldable      ( toList ) import Data.List          ( partition ) import Data.List.NonEmpty ( NonEmpty(..) )+import Maybes             ( isJust )  {- *********************************************************************************@@ -134,14 +138,37 @@         ; return (evBindMapBinds binds1 `unionBags` binds2) } +-- | Type-check a thing that emits only equality constraints, solving any+-- constraints we can and re-emitting constraints that we can't. The thing_inside+-- should generally bump the TcLevel to make sure that this run of the solver+-- doesn't affect anything lying around.+solveLocalEqualities :: TcM a -> TcM a+solveLocalEqualities thing_inside+  = do { traceTc "solveLocalEqualities {" empty++       ; (result, wanted) <- captureConstraints thing_inside++       ; traceTc "solveLocalEqualities: running solver {" (ppr wanted)+       ; reduced_wanted <- runTcSEqualities (solveWanteds wanted)+       ; traceTc "solveLocalEqualities: running solver }" (ppr reduced_wanted)++       ; emitConstraints reduced_wanted++       ; traceTc "solveLocalEqualities end }" empty+       ; return result }+ -- | Type-check a thing that emits only equality constraints, then -- solve those constraints. Fails outright if there is trouble.+-- Use this if you're not going to get another crack at solving+-- (because, e.g., you're checking a datatype declaration) solveEqualities :: TcM a -> TcM a solveEqualities thing_inside   = checkNoErrs $  -- See Note [Fail fast on kind errors]     do { (result, wanted) <- captureConstraints thing_inside        ; traceTc "solveEqualities {" $ text "wanted = " <+> ppr wanted        ; final_wc <- runTcSEqualities $ simpl_top wanted+          -- NB: Use simpl_top here so that we potentially default RuntimeRep+          -- vars to LiftedRep. This is needed to avoid #14991.        ; traceTc "End solveEqualities }" empty         ; traceTc "reportAllUnsolved {" empty@@ -149,6 +176,8 @@        ; traceTc "reportAllUnsolved }" empty        ; return result } +-- | Simplify top-level constraints, but without reporting any unsolved+-- constraints nor unsafe overlapping. simpl_top :: WantedConstraints -> TcS WantedConstraints     -- See Note [Top-level Defaulting Plan] simpl_top wanteds@@ -225,7 +254,7 @@   defaultCallStack ct     | ClassPred cls tys <- classifyPredType (ctPred ct)     , Just {} <- isCallStackPred cls tys-    = do { solveCallStack (cc_ev ct) EvCsEmpty+    = do { solveCallStack (ctEvidence ct) EvCsEmpty          ; return Nothing }    defaultCallStack ct@@ -483,30 +512,6 @@        ; traceTc "reportUnsolved }" empty        ; return () } --- | Reports whether first type (ty_a) subsumes the second type (ty_b),--- 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.--- N.B.: Make sure that the types contain all the constraints--- contained in any associated implications.-tcSubsumes :: TcSigmaType -> TcSigmaType -> TcM Bool-tcSubsumes = tcCheckHoleFit emptyBag----- | A tcSubsumes which takes into account relevant constraints, to fix trac--- #14273. Make sure that the constraints are cloned, since the simplifier may--- perform unification-tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool-tcCheckHoleFit _ hole_ty ty | hole_ty `eqType` ty = return True-tcCheckHoleFit relevantCts hole_ty ty = discardErrs $- do {  (_, wanted, _) <- pushLevelAndCaptureConstraints $-                           tcSubType_NC ExprSigCtxt ty hole_ty-    ; (rem, _) <- runTcS (simpl_top $ addSimples wanted relevantCts)-    -- We don't want any insoluble or simple constraints left,-    -- but solved implications are ok (and neccessary for e.g. undefined)-    ; return (isEmptyBag (wc_simple rem)-              && allBag (isSolvedStatus . ic_status) (wc_impl rem))-    }- ------------------ tcCheckSatisfiability :: Bag EvVar -> TcM Bool -- Return True if satisfiable, False if definitely contradictory@@ -532,7 +537,7 @@       | not (isEmptyBag insols)   -- We've found that it's definitely unsatisfiable       = return insols             -- Hurrah -- stop now.       | otherwise-      = do { pending_given <- getPendingScDicts+      = do { pending_given <- getPendingGivenScs            ; new_given <- makeSuperClasses pending_given            ; solveSimpleGivens new_given            ; getInertInsols }@@ -638,13 +643,14 @@        -- bindings, so we can't just revert to the input        -- constraint. -       ; tc_lcl_env      <- TcM.getLclEnv+       ; tc_env          <- TcM.getEnv        ; ev_binds_var    <- TcM.newTcEvBinds        ; psig_theta_vars <- mapM TcM.newEvVar psig_theta        ; wanted_transformed_incl_derivs             <- setTcLevel rhs_tclvl $                runTcSWithEvBinds ev_binds_var $-               do { let loc         = mkGivenLoc rhs_tclvl UnkSkol tc_lcl_env+               do { let loc         = mkGivenLoc rhs_tclvl UnkSkol $+                                      env_lcl tc_env                         psig_givens = mkGivens loc psig_theta_vars                   ; _ <- solveSimpleGivens psig_givens                          -- See Note [Add signature contexts as givens]@@ -687,7 +693,7 @@                            | psig_theta_var <- psig_theta_vars ]         -- Now we can emil the residual constraints-       ; emitResidualConstraints rhs_tclvl tc_lcl_env ev_binds_var+       ; emitResidualConstraints rhs_tclvl tc_env ev_binds_var                                  name_taus co_vars qtvs                                  bound_theta_vars                                  (wanted_transformed `andWC` mkSimpleWC psig_wanted)@@ -705,13 +711,13 @@   ---------------------emitResidualConstraints :: TcLevel -> TcLclEnv -> EvBindsVar+emitResidualConstraints :: TcLevel -> Env TcGblEnv TcLclEnv -> EvBindsVar                         -> [(Name, TcTauType)]                         -> VarSet -> [TcTyVar] -> [EvVar]                         -> WantedConstraints -> TcM () -- Emit the remaining constraints from the RHS. -- See Note [Emitting the residual implication in simplifyInfer]-emitResidualConstraints rhs_tclvl tc_lcl_env ev_binds_var+emitResidualConstraints rhs_tclvl tc_env ev_binds_var                         name_taus co_vars qtvs full_theta_vars wanteds   | isEmptyWC wanteds   = return ()@@ -720,28 +726,28 @@        ; let (outer_simple, inner_simple) = partitionBag is_mono wanted_simple              is_mono ct = isWantedCt ct && ctEvId ct `elemVarSet` co_vars -        ; tc_lvl <- TcM.getTcLevel-        ; mapM_ (promoteTyVar tc_lvl) (tyCoVarsOfCtsList outer_simple)+        ; _ <- promoteTyVarSet (tyCoVarsOfCts outer_simple)          ; unless (isEmptyCts outer_simple) $           do { traceTc "emitResidualConstrants:simple" (ppr outer_simple)              ; emitSimples outer_simple } +        ; implic <- newImplication         ; let inner_wanted = wanteds { wc_simple = inner_simple }-              implic       = mk_implic inner_wanted+              implic'      = mk_implic inner_wanted implic         ; unless (isEmptyWC inner_wanted) $-          do { traceTc "emitResidualConstraints:implic" (ppr implic)-             ; emitImplication implic }+          do { traceTc "emitResidualConstraints:implic" (ppr implic')+             ; emitImplication implic' }      }   where-    mk_implic inner_wanted-       = newImplication { ic_tclvl    = rhs_tclvl-                        , ic_skols    = qtvs-                        , ic_given    = full_theta_vars-                        , ic_wanted   = inner_wanted-                        , ic_binds    = ev_binds_var-                        , ic_info     = skol_info-                        , ic_env      = tc_lcl_env }+    mk_implic inner_wanted implic+       = implic { ic_tclvl  = rhs_tclvl+                , ic_skols  = qtvs+                , ic_given  = full_theta_vars+                , ic_wanted = inner_wanted+                , ic_binds  = ev_binds_var+                , ic_info   = skol_info+                , ic_env    = tc_env }      full_theta = map idType full_theta_vars     skol_info  = InferSkol [ (name, mkSigmaTy [] full_theta ty)@@ -759,7 +765,7 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider    f = e-where f's type is infeered to be something like (a, Proxy k (Int |> co))+where f's type is inferred to be something like (a, Proxy k (Int |> co)) and we have an as-yet-unsolved, or perhaps insoluble, constraint    [W] co :: Type ~ k We can't form types like (forall co. blah), so we can't generalise over@@ -871,15 +877,15 @@ -- See Note [Deciding quantification] decideQuantification infer_mode rhs_tclvl name_taus psigs candidates   = do { -- Step 1: find the mono_tvs-       ; (mono_tvs, candidates) <- decideMonoTyVars infer_mode-                                        name_taus psigs candidates+       ; (mono_tvs, candidates, co_vars) <- decideMonoTyVars infer_mode+                                              name_taus psigs candidates         -- Step 2: default any non-mono tyvars, and re-simplify        -- This step may do some unification, but result candidates is zonked        ; candidates <- defaultTyVarsAndSimplify rhs_tclvl mono_tvs candidates         -- Step 3: decide which kind/type variables to quantify over-       ; (qtvs, co_vars) <- decideQuantifiedTyVars mono_tvs name_taus psigs candidates+       ; qtvs <- decideQuantifiedTyVars mono_tvs name_taus psigs candidates         -- Step 4: choose which of the remaining candidate        --         predicates to actually quantify over@@ -889,7 +895,7 @@        ; psig_theta <- TcM.zonkTcTypes (concatMap sig_inst_theta psigs)        ; let quantifiable_candidates                = pickQuantifiablePreds (mkVarSet qtvs) candidates-             -- NB: do /not/ run pickQuantifieablePreds over psig_theta,+             -- 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 @@ -911,12 +917,13 @@                  -> [(Name,TcType)]                  -> [TcIdSigInst]                  -> [PredType]-                 -> TcM (TcTyCoVarSet, [PredType])+                 -> TcM (TcTyCoVarSet, [PredType], CoVarSet) -- Decide which tyvars and covars cannot be generalised: --   (a) Free in the environment --   (b) Mentioned in a constraint we can't generalise --   (c) Connected by an equality to (a) or (b)--- Also return the reduced set of constraint we can generalise+-- Also return CoVars that appear free in the final quatified types+--   we can't quantify over these, and we must make sure they are in scope decideMonoTyVars infer_mode name_taus psigs candidates   = do { (no_quant, maybe_quant) <- pick infer_mode candidates @@ -925,13 +932,30 @@        ; psig_qtvs <- mapM zonkTcTyVarToTyVar $                       concatMap (map snd . sig_inst_skols) psigs +       ; psig_theta <- mapM TcM.zonkTcType $+                       concatMap sig_inst_theta psigs++       ; taus <- mapM (TcM.zonkTcType . snd) name_taus+        ; mono_tvs0 <- tcGetGlobalTyCoVars-       ; let eq_constraints = filter isEqPred candidates-             mono_tvs1     = growThetaTyVars eq_constraints mono_tvs0+       ; let psig_tys = mkTyVarTys psig_qtvs ++ psig_theta +             co_vars = coVarsOfTypes (psig_tys ++ taus)+             co_var_tvs = closeOverKinds co_vars+               -- The co_var_tvs are tvs mentioned in the types of covars or+               -- coercion holes. We can't quantify over these covars, so we+               -- must include the variable in their types in the mono_tvs.+               -- E.g.  If we can't quantify over co :: k~Type, then we can't+               --       quantify over k either!  Hence closeOverKinds++             mono_tvs1 = mono_tvs0 `unionVarSet` co_var_tvs++             eq_constraints = filter isEqPred candidates+             mono_tvs2      = growThetaTyVars eq_constraints mono_tvs1+              constrained_tvs = (growThetaTyVars eq_constraints                                                (tyCoVarsOfTypes no_quant)-                                `minusVarSet` mono_tvs1)+                                `minusVarSet` mono_tvs2)                                `delVarSetList` psig_qtvs              -- constrained_tvs: the tyvars that we are not going to              -- quantify solely because of the moonomorphism restriction@@ -947,15 +971,14 @@              --   be quantified (Trac #14479); see              --   Note [Quantification and partial signatures], Wrinkle 3, 4 -             mono_tvs = mono_tvs1 `unionVarSet` constrained_tvs+             mono_tvs = mono_tvs2 `unionVarSet` constrained_tvs             -- Warn about the monomorphism restriction        ; warn_mono <- woptM Opt_WarnMonomorphism        ; when (case infer_mode of { ApplyMR -> warn_mono; _ -> False}) $-         do { taus <- mapM (TcM.zonkTcType . snd) name_taus-            ; warnTc (Reason Opt_WarnMonomorphism)+         warnTc (Reason Opt_WarnMonomorphism)                 (constrained_tvs `intersectsVarSet` tyCoVarsOfTypes taus)-                mr_msg }+                mr_msg         ; traceTc "decideMonoTyVars" $ vcat            [ text "mono_tvs0 =" <+> ppr mono_tvs0@@ -963,9 +986,10 @@            , text "no_quant =" <+> ppr no_quant            , text "maybe_quant =" <+> ppr maybe_quant            , text "eq_constraints =" <+> ppr eq_constraints-           , text "mono_tvs =" <+> ppr mono_tvs ]+           , text "mono_tvs =" <+> ppr mono_tvs+           , text "co_vars =" <+> ppr co_vars ] -       ; return (mono_tvs, maybe_quant) }+       ; return (mono_tvs, maybe_quant, co_vars) }   where     pick :: InferMode -> [PredType] -> TcM ([PredType], [PredType])     -- Split the candidates into ones we definitely@@ -1002,12 +1026,8 @@ defaultTyVarsAndSimplify rhs_tclvl mono_tvs candidates   = do {  -- Promote any tyvars that we cannot generalise           -- See Note [Promote momomorphic tyvars]-       ; outer_tclvl <- TcM.getTcLevel-       ; let prom_tvs = nonDetEltsUniqSet mono_tvs-                        -- It's OK to use nonDetEltsUniqSet here-                        -- because promoteTyVar is commutative-       ; traceTc "decideMonoTyVars: promotion:" (ppr prom_tvs)-       ; proms <- mapM (promoteTyVar outer_tclvl) prom_tvs+       ; traceTc "decideMonoTyVars: promotion:" (ppr mono_tvs)+       ; prom <- promoteTyVarSet mono_tvs         -- Default any kind/levity vars        ; let DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs}@@ -1021,7 +1041,7 @@         ; case () of            _ | some_default -> simplify_cand candidates-             | or proms     -> mapM TcM.zonkTcType candidates+             | prom         -> mapM TcM.zonkTcType candidates              | otherwise    -> return candidates        }   where@@ -1051,10 +1071,8 @@    -> [(Name,TcType)]   -- Annotated theta and (name,tau) pairs    -> [TcIdSigInst]     -- Partial signatures    -> [PredType]        -- Candidates, zonked-   -> TcM ([TyVar], CoVarSet)+   -> TcM [TyVar] -- Fix what tyvars we are going to quantify over, and quantify them--- Also return CoVars that appear free in the final quatified types---   we can't quantify over these, and we must make sure they are in scope decideQuantifiedTyVars mono_tvs name_taus psigs candidates   = do {     -- Why psig_tys? We try to quantify over everything free in here              -- See Note [Quantification and partial signatures]@@ -1073,15 +1091,6 @@              -- Now "grow" those seeds to find ones reachable via 'candidates'              grown_tcvs = growThetaTyVars candidates (tyCoVarsOfTypes seed_tys) -       -- We cannot quantify a type over a coercion (term-level) variable-       -- So, if any CoVars appear in grow_tcvs (they might for example-       -- appear in a cast in a type) we must remove them from the quantified-       -- variables, along with any type variables free in their kinds-       -- E.g.  If we can't quantify over co :: k~Type, then we can't-       --       quantify over k either!  Hence closeOverKinds-       ; let co_vars    = filterVarSet isCoVar grown_tcvs-             proto_qtvs = grown_tcvs `minusVarSet` closeOverKinds co_vars-        -- Now we have to classify them into kind variables and type variables        -- (sigh) just for the benefit of -XNoPolyKinds; see quantifyTyVars        --@@ -1091,18 +1100,15 @@        ; let DV {dv_kvs = cand_kvs, dv_tvs = cand_tvs}                       = candidateQTyVarsOfTypes $                         psig_tys ++ candidates ++ tau_tys-             pick     = (`dVarSetIntersectVarSet` proto_qtvs)+             pick     = (`dVarSetIntersectVarSet` grown_tcvs)              dvs_plus = DV { dv_kvs = pick cand_kvs, dv_tvs = pick cand_tvs }         ; traceTc "decideQuantifiedTyVars" (vcat            [ text "seed_tys =" <+> ppr seed_tys            , text "seed_tcvs =" <+> ppr (tyCoVarsOfTypes seed_tys)-           , text "grown_tcvs =" <+> ppr grown_tcvs-           , text "co_vars =" <+> ppr co_vars-           , text "proto_qtvs =" <+> ppr proto_qtvs])+           , text "grown_tcvs =" <+> ppr grown_tcvs]) -       ; qtvs <- quantifyTyVars mono_tvs dvs_plus-       ; return (qtvs, co_vars) }+       ; quantifyTyVars mono_tvs dvs_plus }  ------------------ growThetaTyVars :: ThetaType -> TyCoVarSet -> TyCoVarSet@@ -1123,6 +1129,7 @@        where          pred_tcvs = tyCoVarsOfType pred + {- Note [Promote momomorphic tyvars] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Promote any type variables that are free in the environment.  Eg@@ -1248,7 +1255,7 @@       fail spuriously, thereby obfuscating the original insoluble error.       Trac #14000 is an example -I tried an alterantive approach: simply failM, after emitting the+I tried an alternative approach: simply failM, after emitting the residual implication constraint; the exception will be caught in TcBinds.tcPolyBinds, which gives all the binders in the group the type (forall a. a).  But that didn't work with -fdefer-type-errors, because@@ -1369,19 +1376,12 @@                 -- Any insoluble constraints are in 'simples' and so get rewritten                 -- See Note [Rewrite insolubles] in TcSMonad -       ; let WC { wc_simple = simples1, wc_impl = implics1 } = wc1--       ; (floated_eqs, implics2) <- solveNestedImplications (implics `unionBags` implics1)-       ; (no_new_scs, simples2)  <- expandSuperClasses simples1--       ; traceTcS "solveWanteds middle" $ vcat [ text "simples1 =" <+> ppr simples1-                                               , text "simples2 =" <+> ppr simples2 ]+       ; (floated_eqs, implics2) <- solveNestedImplications $+                                    implics `unionBags` wc_impl wc1 -       ; dflags <- getDynFlags+       ; dflags   <- getDynFlags        ; final_wc <- simpl_loop 0 (solverIterations dflags) floated_eqs-                                no_new_scs-                                (WC { wc_simple = simples2-                                    , wc_impl   = implics2 })+                                (wc1 { wc_impl = implics2 })         ; ev_binds_var <- getTcEvBindsVar        ; bb <- TcS.getTcEvBindsMap ev_binds_var@@ -1391,14 +1391,9 @@         ; return final_wc } -simpl_loop :: Int -> IntWithInf -> Cts -> Bool-           -> WantedConstraints-           -> TcS WantedConstraints-simpl_loop n limit floated_eqs no_new_deriveds-           wc@(WC { wc_simple = simples, wc_impl = implics })-  | isEmptyBag floated_eqs && no_new_deriveds-  = return wc  -- Done!-+simpl_loop :: Int -> IntWithInf -> Cts+           -> WantedConstraints -> TcS WantedConstraints+simpl_loop n limit floated_eqs wc@(WC { wc_simple = simples })   | n `intGtLimit` limit   = do { -- Add an error (not a warning) if we blow the limit,          -- Typically if we blow the limit we are going to report some other error@@ -1409,72 +1404,67 @@                 2 (vcat [ text "Unsolved:" <+> ppr wc                         , ppUnless (isEmptyBag floated_eqs) $                           text "Floated equalities:" <+> ppr floated_eqs-                        , ppUnless no_new_deriveds $-                          text "New deriveds found"                         , text "Set limit with -fconstraint-solver-iterations=n; n=0 for no limit"                   ]))        ; return wc } +  | not (isEmptyBag floated_eqs)+  = simplify_again n limit True (wc { wc_simple = floated_eqs `unionBags` simples })+            -- Put floated_eqs first so they get solved first+            -- NB: the floated_eqs may include /derived/ equalities+            -- arising from fundeps inside an implication++  | superClassesMightHelp wc+  = -- We still have unsolved goals, and apparently no way to solve them,+    -- so try expanding superclasses at this level, both Given and Wanted+    do { pending_given <- getPendingGivenScs+       ; let (pending_wanted, simples1) = getPendingWantedScs simples+       ; if null pending_given && null pending_wanted+           then return wc  -- After all, superclasses did not help+           else+    do { new_given  <- makeSuperClasses pending_given+       ; new_wanted <- makeSuperClasses pending_wanted+       ; solveSimpleGivens new_given -- Add the new Givens to the inert set+       ; simplify_again n limit (null pending_given)+         wc { wc_simple = simples1 `unionBags` listToBag new_wanted } } }+   | otherwise-  = do { let n_floated = lengthBag floated_eqs-       ; csTraceTcS $+  = return wc++simplify_again :: Int -> IntWithInf -> Bool+               -> WantedConstraints -> TcS WantedConstraints+-- We have definitely decided to have another go at solving+-- the wanted constraints (we have tried at least once already+simplify_again n limit no_new_given_scs+               wc@(WC { wc_simple = simples, wc_impl = implics })+  = do { csTraceTcS $          text "simpl_loop iteration=" <> int n-         <+> (parens $ hsep [ text "no new deriveds =" <+> ppr no_new_deriveds <> comma-                            , int n_floated <+> text "floated eqs" <> comma+         <+> (parens $ hsep [ text "no new given superclasses =" <+> ppr no_new_given_scs <> comma                             , int (lengthBag simples) <+> text "simples to solve" ])+       ; traceTcS "simpl_loop: wc =" (ppr wc) -       -- solveSimples may make progress if either float_eqs hold        ; (unifs1, wc1) <- reportUnifications $                           solveSimpleWanteds $-                          floated_eqs `unionBags` simples-            -- Notes:-            --   - Put floated_eqs first so they get solved first-            --     NB: the floated_eqs may include /derived/ equalities-            --     arising from fundeps inside an implication--       ; let WC { wc_simple = simples1, wc_impl = implics1 } = wc1-       ; (no_new_scs, simples2) <- expandSuperClasses simples1+                          simples +       -- See Note [Cutting off simpl_loop]        -- We have already tried to solve the nested implications once        -- Try again only if we have unified some meta-variables-       -- (which is a bit like adding more givens)-       -- See Note [Cutting off simpl_loop]-       ; (floated_eqs2, implics2) <- if unifs1 == 0 && isEmptyBag implics1-                                     then return (emptyBag, implics)-                                     else solveNestedImplications (implics `unionBags` implics1)--       ; simpl_loop (n+1) limit floated_eqs2 no_new_scs-                    (WC { wc_simple = simples2-                        , wc_impl   = implics2 }) }+       -- (which is a bit like adding more givens), or we have some+       -- new Given superclasses+       ; let new_implics = wc_impl wc1+       ; if unifs1 == 0       &&+            no_new_given_scs  &&+            isEmptyBag new_implics +           then -- Do not even try to solve the implications+                simpl_loop (n+1) limit emptyBag (wc1 { wc_impl = implics }) -expandSuperClasses :: Cts -> TcS (Bool, Cts)--- If there are any unsolved wanteds, expand one step of--- superclasses for deriveds--- Returned Bool is True <=> no new superclass constraints added--- See Note [The superclass story] in TcCanonical-expandSuperClasses unsolved-  | not (anyBag superClassesMightHelp unsolved)-  = return (True, unsolved)-  | otherwise-  = do { traceTcS "expandSuperClasses {" empty-       ; let (pending_wanted, unsolved') = mapAccumBagL get [] unsolved-             get acc ct | Just ct' <- isPendingScDict ct-                        = (ct':acc, ct')-                        | otherwise-                        = (acc,     ct)-       ; pending_given <- getPendingScDicts-       ; if null pending_given && null pending_wanted-         then do { traceTcS "End expandSuperClasses no-op }" empty-                 ; return (True, unsolved) }-         else-    do { new_given  <- makeSuperClasses pending_given-       ; solveSimpleGivens new_given-       ; new_wanted <- makeSuperClasses pending_wanted-       ; traceTcS "End expandSuperClasses }"-                  (vcat [ text "Given:" <+> ppr pending_given-                        , text "Wanted:" <+> ppr new_wanted ])-       ; return (False, unsolved' `unionBags` listToBag new_wanted) } }+           else -- Try to solve the implications+                do { (floated_eqs2, implics2) <- solveNestedImplications $+                                                 implics `unionBags` new_implics+                   ; simpl_loop (n+1) limit floated_eqs2 (wc1 { wc_impl = implics2 })+    } }  solveNestedImplications :: Bag Implication                         -> TcS (Cts, Bag Implication)@@ -1508,8 +1498,7 @@                              , ic_given  = given_ids                              , ic_wanted = wanteds                              , ic_info   = info-                             , ic_status = status-                             , ic_env    = env })+                             , ic_status = status })   | isSolvedStatus status   = return (emptyCts, Just imp)  -- Do nothing @@ -1520,10 +1509,12 @@   = do { inerts <- getTcSInerts        ; traceTcS "solveImplication {" (ppr imp $$ text "Inerts" <+> ppr inerts) +       ; when debugIsOn check_tc_level+          -- Solve the nested constraints        ; (no_given_eqs, given_insols, residual_wanted)             <- nestImplicTcS ev_binds_var tclvl $-               do { let loc    = mkGivenLoc tclvl info env+               do { let loc    = mkGivenLoc tclvl info (implicLclEnv imp)                         givens = mkGivens loc given_ids                   ; solveSimpleGivens givens @@ -1563,6 +1554,15 @@         ; return (floated_eqs, res_implic) } +  where+    -- TcLevels must be strictly increasing (see (ImplicInv) in+    -- Note [TcLevel and untouchable type variables] in TcType),+    -- and in fact I thinkthey should always increase one level at a time.+    check_tc_level = do { cur_lvl <- TcS.getTcLevel+                        ; MASSERT2( tclvl == pushTcLevel cur_lvl+                                  , text "Cur lvl =" <+> ppr cur_lvl $$+                                    text "Imp lvl =" <+> ppr tclvl ) }+ ---------------------- setImplicationStatus :: Implication -> TcS (Maybe Implication) -- Finalise the implication returned from solveImplication:@@ -1570,13 +1570,13 @@ --    * Trim the ic_wanted field to remove Derived constraints -- Precondition: the ic_status field is not already IC_Solved -- Return Nothing if we can discard the implication altogether-setImplicationStatus implic@(Implic { ic_status = status-                                    , ic_info   = info-                                    , ic_wanted = wc-                                    , ic_given  = givens })+setImplicationStatus implic@(Implic { ic_status     = status+                                    , ic_info       = info+                                    , ic_wanted     = wc+                                    , ic_given      = givens })  | ASSERT2( not (isSolvedStatus status ), ppr info )    -- Precondition: we only set the status if it is not already solved-   not all_solved+   not (isSolvedWC pruned_wc)  = do { traceTcS "setImplicationStatus(not-all-solved) {" (ppr implic)        ; implic <- neededEvVars implic@@ -1596,18 +1596,24 @@               -- See Note [Tracking redundant constraints]  = do { traceTcS "setImplicationStatus(all-solved) {" (ppr implic) -      ; implic <- neededEvVars implic+      ; implic@(Implic { ic_need_inner = need_inner+                       , ic_need_outer = need_outer }) <- neededEvVars implic +      ; bad_telescope <- checkBadTelescope implic+       ; let dead_givens | warnRedundantGivens info-                        = filterOut (`elemVarSet` ic_need_inner implic) givens+                        = filterOut (`elemVarSet` need_inner) givens                         | otherwise = []   -- None to report              discard_entire_implication  -- Can we discard the entire implication?               =  null dead_givens           -- No warning from this implication-              && isEmptyBag pruned_implics  -- No live children-              && isEmptyVarSet (ic_need_outer implic) -- No needed vars to pass up to parent+              && not bad_telescope+              && isEmptyWC pruned_wc        -- No live children+              && isEmptyVarSet need_outer   -- No needed vars to pass up to parent -            final_status = IC_Solved { ics_dead = dead_givens }+            final_status+              | bad_telescope = IC_BadTelescope+              | otherwise     = IC_Solved { ics_dead = dead_givens }             final_implic = implic { ic_status = final_status                                   , ic_wanted = pruned_wc } @@ -1626,9 +1632,6 @@    pruned_wc = WC { wc_simple = pruned_simples                   , wc_impl   = pruned_implics } -   all_solved = isEmptyBag pruned_simples-             && allBag (isSolvedStatus . ic_status) pruned_implics-    keep_me :: Implication -> Bool    keep_me ic      | IC_Solved { ics_dead = dead_givens } <- ic_status ic@@ -1640,6 +1643,29 @@      | otherwise      = True        -- Otherwise, keep it +checkBadTelescope :: Implication -> TcS Bool+-- True <=> the skolems form a bad telescope+-- See Note [Keeping scoped variables in order: Explicit] in TcHsType+checkBadTelescope (Implic { ic_telescope  = m_telescope+                          , ic_skols      = skols })+  | isJust m_telescope+  = do{ skols <- mapM TcS.zonkTcTyCoVarBndr skols+      ; return (go emptyVarSet (reverse skols))}++  | otherwise+  = return False++  where+    go :: TyVarSet   -- skolems that appear *later* than the current ones+       -> [TcTyVar]  -- ordered skolems, in reverse order+       -> Bool       -- True <=> there is an out-of-order skolem+    go _ [] = False+    go later_skols (one_skol : earlier_skols)+      | tyCoVarsOfType (tyVarKind one_skol) `intersectsVarSet` later_skols+      = True+      | otherwise+      = go (later_skols `extendVarSet` one_skol) earlier_skols+ warnRedundantGivens :: SkolemInfo -> Bool warnRedundantGivens (SigSkol ctxt _ _)   = case ctxt of@@ -1674,23 +1700,17 @@ --   - From the 'needed' set, delete ev_bndrs, the binders of the --     evidence bindings, to give the final needed variables ---neededEvVars implic@(Implic { ic_info = info-                            , ic_given = givens+neededEvVars implic@(Implic { ic_given = givens                             , ic_binds = ev_binds_var                             , ic_wanted = WC { wc_impl = implics }                             , ic_need_inner = old_needs })  = do { ev_binds <- TcS.getTcEvBindsMap ev_binds_var       ; tcvs     <- TcS.getTcEvTyCoVars ev_binds_var -        -- Check that there are no term-level evidence bindings-        -- in the cases where we have no place to put them-      ; MASSERT2( termEvidenceAllowed info || isEmptyEvBindMap ev_binds-                , ppr info $$ ppr ev_binds )-       ; let seeds1        = foldrBag add_implic_seeds old_needs implics             seeds2        = foldEvBindMap add_wanted seeds1 ev_binds             seeds3        = seeds2 `unionVarSet` tcvs-            need_inner    = transCloVarSet (also_needs ev_binds) seeds3+            need_inner    = findNeededEvVars ev_binds seeds3             live_ev_binds = filterEvBindMap (needed_ev_bind need_inner) ev_binds             need_outer    = foldEvBindMap del_ev_bndr need_inner live_ev_binds                             `delVarSetList` givens@@ -1723,19 +1743,6 @@      | is_given  = needs  -- Add the rhs vars of the Wanted bindings only      | otherwise = evVarsOfTerm rhs `unionVarSet` needs -   also_needs :: EvBindMap -> VarSet -> VarSet-   also_needs ev_binds needs-     = nonDetFoldUniqSet add emptyVarSet needs-     -- It's OK to use nonDetFoldUFM here because we immediately-     -- forget about the ordering by creating a set-     where-       add v needs-        | Just ev_bind <- lookupEvBind ev_binds v-        , EvBind { eb_is_given = is_given, eb_rhs = rhs } <- ev_bind-        , is_given-        = evVarsOfTerm rhs `unionVarSet` needs-        | otherwise-        = needs  {- Note [Delete dead Given evidence bindings] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -1902,33 +1909,38 @@ allow the implication to make progress. -} -promoteTyVar :: TcLevel -> TcTyVar  -> TcM Bool+promoteTyVar :: TcTyVar -> TcM Bool -- When we float a constraint out of an implication we must restore--- invariant (MetaTvInv) in Note [TcLevel and untouchable type variables] in TcType+-- invariant (WantedInv) in Note [TcLevel and untouchable type variables] in TcType -- Return True <=> we did some promotion -- See Note [Promoting unification variables]-promoteTyVar tclvl tv-  | isFloatedTouchableMetaTyVar tclvl tv-  = do { cloned_tv <- TcM.cloneMetaTyVar tv-       ; let rhs_tv = setMetaTyVarTcLevel cloned_tv tclvl-       ; TcM.writeMetaTyVar tv (mkTyVarTy rhs_tv)-       ; return True }-  | otherwise-  = return False+promoteTyVar tv+  = do { tclvl <- TcM.getTcLevel+       ; if (isFloatedTouchableMetaTyVar tclvl tv)+         then do { cloned_tv <- TcM.cloneMetaTyVar tv+                 ; let rhs_tv = setMetaTyVarTcLevel cloned_tv tclvl+                 ; TcM.writeMetaTyVar tv (mkTyVarTy rhs_tv)+                 ; return True }+         else return False } -promoteTyVarTcS :: TcLevel -> TcTyVar  -> TcS ()+-- Returns whether or not *any* tyvar is defaulted+promoteTyVarSet :: TcTyVarSet -> TcM Bool+promoteTyVarSet tvs+  = or <$> mapM promoteTyVar (nonDetEltsUniqSet tvs)+    -- non-determinism is OK because order of promotion doesn't matter++promoteTyVarTcS :: TcTyVar  -> TcS () -- When we float a constraint out of an implication we must restore--- invariant (MetaTvInv) in Note [TcLevel and untouchable type variables] in TcType+-- invariant (WantedInv) in Note [TcLevel and untouchable type variables] in TcType -- See Note [Promoting unification variables] -- We don't just call promoteTyVar because we want to use unifyTyVar, -- not writeMetaTyVar-promoteTyVarTcS tclvl tv-  | isFloatedTouchableMetaTyVar tclvl tv-  = do { cloned_tv <- TcS.cloneMetaTyVar tv-       ; let rhs_tv = setMetaTyVarTcLevel cloned_tv tclvl-       ; unifyTyVar tv (mkTyVarTy rhs_tv) }-  | otherwise-  = return ()+promoteTyVarTcS tv+  = do { tclvl <- TcS.getTcLevel+       ; when (isFloatedTouchableMetaTyVar tclvl tv) $+         do { cloned_tv <- TcS.cloneMetaTyVar tv+            ; let rhs_tv = setMetaTyVarTcLevel cloned_tv tclvl+            ; unifyTyVar tv (mkTyVarTy rhs_tv) } }  -- | Like 'defaultTyVar', but in the TcS monad. defaultTyVarTcS :: TcTyVar -> TcS Bool@@ -2061,7 +2073,7 @@ approximateWC to produce a list of candidate constraints.  Then we MUST    a) Promote any meta-tyvars that have been floated out by-     approximateWC, to restore invariant (MetaTvInv) described in+     approximateWC, to restore invariant (WantedInv) described in      Note [TcLevel and untouchable type variables] in TcType.    b) Default the kind of any meta-tyvars that are not mentioned in@@ -2078,8 +2090,8 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we float an equality out of an implication we must "promote" free unification variables of the equality, in order to maintain Invariant-(MetaTvInv) from Note [TcLevel and untouchable type variables] in TcType.  for the-leftover implication.+(WantedInv) from Note [TcLevel and untouchable type variables] in+TcType.  for the leftover implication.  This is absolutely necessary. Consider the following example. We start with two implications and a class with a functional dependency.@@ -2216,9 +2228,7 @@         -- Promote any unification variables mentioned in the floated equalities        -- See Note [Promoting unification variables]-       ; outer_tclvl <- TcS.getTcLevel-       ; mapM_ (promoteTyVarTcS outer_tclvl)-               (tyCoVarsOfCtsList flt_eqs)+       ; mapM_ promoteTyVarTcS (tyCoVarsOfCtsList flt_eqs)         ; traceTcS "floatEqualities" (vcat [ text "Skols =" <+> ppr skols                                           , text "Extended skols =" <+> ppr extended_skols@@ -2340,13 +2350,14 @@   3. The binders of all evidence bindings in `ic_binds`. Example          forall a. (d :: t1 ~ t2)             EvBinds { (co :: t1 ~# t2) = superclass-sel d }-            => [W] co : (a ~# b |> co)-     Here `co` is gotten by superclass selection from `d`.+            => [W] co2 : (a ~# b |> co)+     Here `co` is gotten by superclass selection from `d`, and the+     wanted constraint co2 must not float. -  4. And the evidence variable of any equality constraint whose type-     mentions a bound variable.  Example:+  4. And the evidence variable of any equality constraint (incl+     Wanted ones) whose type mentions a bound variable.  Example:         forall k. [W] co1 :: t1 ~# t2 |> co2-            [W] co2 :: k ~# *+                  [W] co2 :: k ~# *      Here, since `k` is bound, so is `co2` and hence so is `co1`.  Here (1,2,3) are handled by the "seed_skols" calculation, and
− typecheck/TcSimplify.hs-boot
@@ -1,9 +0,0 @@-module TcSimplify where--import GhcPrelude-import TcRnTypes  ( TcM, Cts )-import TcType ( TcSigmaType )---- This boot file exists solely to make tcCheckHoleFit avaialble in TcErrors--tcCheckHoleFit :: Cts -> TcSigmaType -> TcSigmaType -> TcM Bool
typecheck/TcSplice.hs view
@@ -46,6 +46,7 @@ import THNames import TcUnify import TcEnv+import FileCleanup ( newTempName, TempFileLifetime(..) )  import Control.Monad @@ -68,7 +69,6 @@ import TcHsSyn import TcSimplify import Type-import Kind import NameSet import TcMType import TcHsType@@ -102,7 +102,7 @@ import Util import Unique import VarSet-import Data.List        ( find, mapAccumL )+import Data.List        ( find ) import Data.Maybe import FastString import BasicTypes hiding( SuccessFlag(..) )@@ -111,6 +111,7 @@ import Panic import Lexeme import qualified EnumSet+import Plugins  import qualified Language.Haskell.TH as TH -- THSyntax gives access to internal functions and data types@@ -161,7 +162,7 @@  -- See Note [How brackets and nested splices are handled] -- tcTypedBracket :: HsBracket Name -> TcRhoType -> TcM (HsExpr TcId)-tcTypedBracket rn_expr brack@(TExpBr expr) res_ty+tcTypedBracket rn_expr brack@(TExpBr _ expr) res_ty   = addErrCtxt (quotationCtxtDoc brack) $     do { cur_stage <- getStage        ; ps_ref <- newMutVar []@@ -182,7 +183,7 @@        ; tcWrapResultO (Shouldn'tHappenOrigin "TExpBr")                        rn_expr                        (unLoc (mkHsApp (nlHsTyApp texpco [expr_ty])-                                              (noLoc (HsTcBracketOut brack ps'))))+                                      (noLoc (HsTcBracketOut noExt brack ps'))))                        meta_ty res_ty } tcTypedBracket _ other_brack _   = pprPanic "tcTypedBracket" (ppr other_brack)@@ -194,17 +195,19 @@        ; meta_ty <- tcBrackTy brack        ; traceTc "tc_bracket done untyped" (ppr meta_ty)        ; tcWrapResultO (Shouldn'tHappenOrigin "untyped bracket")-                       rn_expr (HsTcBracketOut brack ps') meta_ty res_ty }+                       rn_expr (HsTcBracketOut noExt brack ps') meta_ty res_ty }  --------------- tcBrackTy :: HsBracket GhcRn -> TcM TcType-tcBrackTy (VarBr _ _) = tcMetaTy nameTyConName  -- Result type is Var (not Q-monadic)-tcBrackTy (ExpBr _)   = tcMetaTy expQTyConName  -- Result type is ExpQ (= Q Exp)-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 (VarBr {})  = tcMetaTy nameTyConName+                                           -- Result type is Var (not Q-monadic)+tcBrackTy (ExpBr {})  = tcMetaTy expQTyConName  -- Result type is ExpQ (= Q Exp)+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"  --------------- tcPendingSplice :: PendingRnSplice -> TcM PendingTcSplice@@ -432,7 +435,7 @@ ************************************************************************ -} -tcSpliceExpr splice@(HsTypedSplice _ name expr) res_ty+tcSpliceExpr splice@(HsTypedSplice _ _ name expr) res_ty   = addErrCtxt (spliceCtxtDoc splice) $     setSrcSpan (getLoc expr)    $ do     { stage <- getStage@@ -582,8 +585,9 @@               ; wrapper <- instCall AnnOrigin [expr_ty] [mkClassPred data_class [expr_ty]]               ; let specialised_to_annotation_wrapper_expr                       = L loc (mkHsWrap wrapper-                                        (HsVar (L loc to_annotation_wrapper_id)))-              ; return (L loc (HsApp specialised_to_annotation_wrapper_expr expr')) }+                                 (HsVar noExt (L loc to_annotation_wrapper_id)))+              ; return (L loc (HsApp noExt+                                specialised_to_annotation_wrapper_expr expr')) }      -- Run the appropriately wrapped expression to get the value of     -- the annotation and its dictionaries. The return value is of@@ -731,10 +735,13 @@         -- in type-correct programs.         ; failIfErrsM +        -- run plugins+        ; hsc_env <- getTopEnv+        ; expr' <- withPlugins (hsc_dflags hsc_env) spliceRunAction expr+         -- Desugar-        ; ds_expr <- initDsTc (dsLExpr expr)+        ; ds_expr <- initDsTc (dsLExpr expr')         -- Compile and link it; might fail if linking fails-        ; hsc_env <- getTopEnv         ; src_span <- getSrcSpanM         ; traceTc "About to run (desugared)" (ppr ds_expr)         ; either_hval <- tryM $ liftIO $@@ -879,6 +886,10 @@     dep_files <- readTcRef ref     writeTcRef ref (fp:dep_files) +  qAddTempFile suffix = do+    dflags <- getDynFlags+    liftIO $ newTempName dflags TFL_GhcSession suffix+   qAddTopDecls thds = do       l <- getSrcSpanM       let either_hval = convertToHsDecls l thds@@ -890,13 +901,13 @@       updTcRef th_topdecls_var (\topds -> ds ++ topds)     where       checkTopDecl :: HsDecl GhcPs -> TcM ()-      checkTopDecl (ValD binds)+      checkTopDecl (ValD _ binds)         = mapM_ bindName (collectHsBindBinders binds)-      checkTopDecl (SigD _)+      checkTopDecl (SigD _ _)         = return ()-      checkTopDecl (AnnD _)+      checkTopDecl (AnnD _ _)         = return ()-      checkTopDecl (ForD (ForeignImport { fd_name = L _ name }))+      checkTopDecl (ForD _ (ForeignImport { fd_name = L _ name }))         = bindName name       checkTopDecl _         = addErr $ text "Only function, value, annotation, and foreign import declarations may be added with addTopDecl"@@ -912,9 +923,9 @@           hang (text "The binder" <+> quotes (ppr name) <+> ptext (sLit "is not a NameU."))              2 (text "Probable cause: you used mkName instead of newName to generate a binding.") -  qAddForeignFile lang str = do+  qAddForeignFilePath lang fp = do     var <- fmap tcg_th_foreign_files getGblEnv-    updTcRef var ((lang, str) :)+    updTcRef var ((lang, fp) :)    qAddModFinalizer fin = do       r <- liftIO $ mkRemoteRef fin@@ -1118,12 +1129,13 @@   ReifyModule m -> wrapTHResult $ TH.qReifyModule m   ReifyConStrictness nm -> wrapTHResult $ TH.qReifyConStrictness nm   AddDependentFile f -> wrapTHResult $ TH.qAddDependentFile f+  AddTempFile s -> wrapTHResult $ TH.qAddTempFile s   AddModFinalizer r -> do     hsc_env <- env_top <$> getEnv     wrapTHResult $ liftIO (mkFinalizedHValue hsc_env r) >>= addModFinalizerRef   AddCorePlugin str -> wrapTHResult $ TH.qAddCorePlugin str   AddTopDecls decs -> wrapTHResult $ TH.qAddTopDecls decs-  AddForeignFile lang str -> wrapTHResult $ TH.qAddForeignFile lang str+  AddForeignFilePath lang str -> wrapTHResult $ TH.qAddForeignFilePath lang str   IsExtEnabled ext -> wrapTHResult $ TH.qIsExtEnabled ext   ExtsEnabled -> wrapTHResult $ TH.qExtsEnabled   _ -> panic ("handleTHMessage: unexpected message " ++ show msg)@@ -1167,7 +1179,7 @@                   ; return ((tv_names, rn_ty), fvs) }         ; (_tvs, ty)             <- solveEqualities $-               tcImplicitTKBndrsType tv_names $+               tcImplicitTKBndrs ReifySkol tv_names $                fst <$> tcLHsType rn_ty         ; ty <- zonkTcTypeToType emptyZonkEnv ty                 -- Substitute out the meta type variables@@ -1482,8 +1494,7 @@               -- See Note [Freshen reified GADT constructors' universal tyvars]            <- freshenTyVarBndrs $               filterOut (`elemVarSet` eq_spec_tvs) g_univ_tvs-       ; let (tvb_subst, g_user_tvs)-                       = mapAccumL substTyVarBndr univ_subst g_user_tvs'+       ; let (tvb_subst, g_user_tvs) = substTyVarBndrs univ_subst g_user_tvs'              g_theta   = substTys tvb_subst g_theta'              g_arg_tys = substTys tvb_subst g_arg_tys'              g_res_ty  = substTy  tvb_subst g_res_ty'@@ -1707,8 +1718,9 @@ ------------------------------ reifyType :: TyCoRep.Type -> TcM TH.Type -- Monadic only because of failure-reifyType ty                | isLiftedTypeKind ty = return TH.StarT-                            | isConstraintKind ty = return TH.ConstraintT+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 (LitTy t)         = do { r <- reifyTyLit t; return (TH.LitT r) } reifyType (TyVarTy tv)      = return (TH.VarT (reifyName tv))@@ -1881,6 +1893,9 @@          | isTupleTyCon tc                = if isPromotedDataCon tc                                             then TH.PromotedTupleT arity                                             else TH.TupleT arity+         | tc `hasKey` constraintKindTyConKey+                                          = TH.ConstraintT+         | tc `hasKey` funTyConKey        = TH.ArrowT          | tc `hasKey` listTyConKey       = TH.ListT          | tc `hasKey` nilDataConKey      = TH.PromotedNilT          | tc `hasKey` consDataConKey     = TH.PromotedConsT
typecheck/TcTyClsDecls.hs view
@@ -10,3428 +10,3602 @@ {-# LANGUAGE TypeFamilies #-}  module TcTyClsDecls (-        tcTyAndClassDecls, tcAddImplicits,--        -- Functions used by TcInstDcls to check-        -- data/type family instance declarations-        kcDataDefn, tcConDecls, dataDeclChecks, checkValidTyCon,-        tcFamTyPats, tcTyFamInstEqn,-        tcAddTyFamInstCtxt, tcMkDataFamInstCtxt, tcAddDataFamInstCtxt,-        wrongKindOfFamily, dataConCtxt-    ) 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 TcEvidence  ( tcCoercionKind, isEmptyTcEvBinds )-import TcUnify     ( checkConstraints )-import TcHsType-import TcMType-import TysWiredIn ( unitTy )-import TcType-import RnEnv( lookupConstructorFields )-import FamInst-import FamInstEnv-import Coercion-import Type-import TyCoRep   -- for checkValidRoles-import Kind-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 Pair-import SrcLoc-import ListSetOps-import DynFlags-import Unique-import BasicTypes-import qualified GHC.LanguageExtensions as LangExt--import Control.Monad-import Data.List-import Data.List.NonEmpty ( NonEmpty(..) )--{--************************************************************************-*                                                                      *-\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 <- mapM checkValidTyCl tyclss-       ; traceTc "Done validity check" (ppr tyclss)-       ; mapM_ (recoverM (return ()) . checkValidRoleAnnots role_annots) tyclss-           -- See Note [Check role annotations in a second pass]--           -- Step 3: Add the implicit things;-           -- we want them in the environment because-           -- they may be mentioned in interface files-       ; tcExtendTyConEnv tyclss $-    do { gbl_env <- tcAddImplicits tyclss-       ; setGblEnv gbl_env $-    do {-            -- Step 4: check instance declarations-       ; (gbl_env, inst_info, datafam_deriv_info) <- tcInstDecls1 instds--       ; return (gbl_env, inst_info, datafam_deriv_info) } } }--tcTyClDecls :: [LTyClDecl GhcRn] -> RoleAnnotEnv -> TcM [TyCon]-tcTyClDecls tyclds 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 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-                 -- the (polymorphic) kind of each knot-tied TyCon or Class-                 -- See Note [Type checking recursive type and class declarations]-             tcExtendKindEnv (foldl extendEnvWithTcTyCon emptyNameEnv tc_tycons) $--                 -- Kind and type check declarations for this group-               mapM (tcTyClDecl roles) tyclds-           } }-  where-    ppr_tc_tycon tc = parens (sep [ ppr (tyConName tc) <> comma-                                  , ppr (tyConBinders tc) <> comma-                                  , ppr (tyConResKind 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.--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]-o~~~~~~~~~~~~~~~~~~~~~~~~-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.--      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 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.--    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 kcTyClTyVars and tcTyClTyVars, both in TcHsType.--    In a TcTyCon, everything is zonked after the kind-checking pass (S2).--}----- 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.----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]--- Third return value is Nothing if the tycon be unsaturated; otherwise,--- the arity-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]--        ; lcl_env <- solveEqualities $-                     do { -- Step 1: Bind kind variables for all decls-                          initial_kinds <- getInitialKinds decls-                        ; traceTc "kcTyClGroup: initial kinds" $-                          ppr initial_kinds--                        -- Step 2: Set extended envt, kind-check the decls-                        ; tcExtendKindEnv initial_kinds $-                          do { mapM_ kcLTyClDecl decls-                             ; getLclEnv } }--        -- Step 3: generalisation-        -- Kind checking done for this group-        -- Now we have to kind generalize the flexis-        ; res <- concatMapM (generaliseTCD (tcl_env lcl_env)) decls--        ; traceTc "kcTyClGroup result" (vcat (map pp_res res))-        ; return res }--  where-    generalise :: TcTypeEnv -> Name -> TcM TcTyCon-    -- For polymorphic things this is a no-op-    generalise kind_env name-      = do { let tc = case lookupNameEnv kind_env name of-                        Just (ATcTyCon tc) -> tc-                        _ -> pprPanic "kcTyClGroup" (ppr name $$ ppr kind_env)-                 tc_binders  = tyConBinders tc-                 tc_res_kind = tyConResKind tc-                 tc_tyvars   = tyConTyVars tc-                 scoped_tvs  = tcTyConScopedTyVars tc--           ; kvs <- kindGeneralize (mkTyConKind tc_binders tc_res_kind)--           ; let all_binders = mkNamedTyConBinders Inferred kvs ++ tc_binders--           ; (env, all_binders') <- zonkTyVarBindersX emptyZonkEnv all_binders-           ; tc_res_kind'        <- zonkTcTypeToType env tc_res_kind-           ; scoped_tvs'         <- zonkSigTyVarPairs scoped_tvs--                      -- Make sure tc_kind' has the final, zonked kind variables-           ; traceTc "Generalise kind" $-             vcat [ ppr name, ppr tc_binders, ppr (mkTyConKind tc_binders tc_res_kind)-                  , ppr kvs, ppr all_binders, ppr tc_res_kind-                  , ppr all_binders', ppr tc_res_kind'-                  , ppr tc_tyvars, ppr (tcTyConScopedTyVars tc)]--           ; return (mkTcTyCon name all_binders' tc_res_kind'-                               scoped_tvs'-                               (tyConFlavour tc)) }--    generaliseTCD :: TcTypeEnv-                  -> LTyClDecl GhcRn -> TcM [TcTyCon]-    generaliseTCD kind_env (L _ decl)-      | ClassDecl { tcdLName = (L _ name), tcdATs = ats } <- decl-      = do { first <- generalise kind_env name-           ; rest <- mapM ((generaliseFamDecl kind_env) . unLoc) ats-           ; return (first : rest) }--      | FamDecl { tcdFam = fam } <- decl-      = do { res <- generaliseFamDecl kind_env fam-           ; return [res] }--      | otherwise-      = do { res <- generalise kind_env (tcdName decl)-           ; return [res] }--    generaliseFamDecl :: TcTypeEnv-                      -> FamilyDecl GhcRn -> TcM TcTyCon-    generaliseFamDecl kind_env (FamilyDecl { fdLName = L _ name })-      = generalise kind_env name--    pp_res tc = ppr (tyConName tc) <+> dcolon <+> ppr (tyConKind tc)-----------------mkTcTyConEnv :: TcTyCon -> TcTypeEnv-mkTcTyConEnv tc = unitNameEnv (getName tc) (ATcTyCon tc)--extendEnvWithTcTyCon :: TcTypeEnv -> TcTyCon -> TcTypeEnv--- Makes a binding to put in the local envt, binding--- a name to a TcTyCon-extendEnvWithTcTyCon env tc-  = extendNameEnv env (getName tc) (ATcTyCon tc)-----------------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)-              | L _ (FamilyDecl { fdLName = L _ name }) <- ats ]--mk_prom_err_env (DataDecl { tcdLName = L _ name-                          , tcdDataDefn = HsDataDefn { dd_cons = cons } })-  = unitNameEnv name (APromotionErr TyConPE)-    `plusNameEnv`-    mkNameEnv [ (con, APromotionErr RecDataConPE)-              | L _ con' <- cons, L _ con <- getConNames con' ]--mk_prom_err_env decl-  = unitNameEnv (tcdName decl) (APromotionErr TyConPE)-    -- Works for family declarations too-----------------getInitialKinds :: [LTyClDecl GhcRn] -> TcM (NameEnv TcTyThing)--- Maps each tycon to its initial kind,--- and each datacon to a suitable promotion error---    tc :-> ATcTyCon (tc:initial_kind)---    dc :-> APromotionErr RecDataConPE---    See Note [Recursion and promoting data constructors]--getInitialKinds decls-  = tcExtendKindEnv promotion_err_env $-    do { tc_kinds <- mapM (addLocM getInitialKind) decls-       ; return (foldl plusNameEnv promotion_err_env tc_kinds) }-  where-    promotion_err_env = mkPromotionErrorEnv decls--getInitialKind :: TyClDecl GhcRn-               -> TcM (NameEnv TcTyThing)--- Allocate a fresh kind variable for each TyCon and Class--- For each tycon, return a NameEnv with---      name :-> ATcTyCon (TcCyCon 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 decl@(ClassDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdATs = ats })-  = do { let cusk = hsDeclHasCusk decl-       ; (tycon, inner_prs) <--           kcLHsQTyVars name ClassFlavour cusk True ktvs $-           do { inner_prs <- getFamDeclInitialKinds (Just cusk) ats-              ; return (constraintKind, inner_prs) }-       ; return (extendEnvWithTcTyCon inner_prs tycon) }--getInitialKind decl@(DataDecl { tcdLName = L _ name-                              , tcdTyVars = ktvs-                              , tcdDataDefn = HsDataDefn { dd_kindSig = m_sig-                                                         , dd_ND = new_or_data } })-  = do  { (tycon, _) <--           kcLHsQTyVars name flav (hsDeclHasCusk decl) True ktvs $-           do { res_k <- case m_sig of-                           Just ksig -> tcLHsKindSig ksig-                           Nothing   -> return liftedTypeKind-              ; return (res_k, ()) }-        ; return (mkTcTyConEnv tycon) }-  where-    flav = case new_or_data of-             NewType  -> NewtypeFlavour-             DataType -> DataTypeFlavour--getInitialKind (FamDecl { tcdFam = decl })-  = getFamDeclInitialKind Nothing decl--getInitialKind decl@(SynDecl { tcdLName = L _ name-                             , tcdTyVars = ktvs-                             , tcdRhs = rhs })-  = do  { (tycon, _) <- kcLHsQTyVars name TypeSynonymFlavour-                            (hsDeclHasCusk decl)-                            True ktvs $-            do  { res_k <- case kind_annotation rhs of-                            Nothing -> newMetaKindVar-                            Just ksig -> tcLHsKindSig ksig-                ; return (res_k, ()) }-        ; return (mkTcTyConEnv tycon) }-  where-    -- Keep this synchronized with 'hsDeclHasCusk'.-    kind_annotation (L _ ty) = case ty of-        HsParTy lty     -> kind_annotation lty-        HsKindSig _ k   -> Just k-        _               -> Nothing------------------------------------getFamDeclInitialKinds :: Maybe Bool  -- if assoc., CUSKness of assoc. class-                       -> [LFamilyDecl GhcRn]-                       -> TcM TcTypeEnv-getFamDeclInitialKinds mb_cusk decls-  = do { tc_kinds <- mapM (addLocM (getFamDeclInitialKind mb_cusk)) decls-       ; return (foldr plusNameEnv emptyNameEnv tc_kinds) }--getFamDeclInitialKind :: Maybe Bool  -- if assoc., CUSKness of assoc. class-                      -> FamilyDecl GhcRn-                      -> TcM TcTypeEnv-getFamDeclInitialKind mb_cusk decl@(FamilyDecl { fdLName     = L _ name-                                               , fdTyVars    = ktvs-                                               , fdResultSig = L _ resultSig-                                               , fdInfo      = info })-  = do { (tycon, _) <--           kcLHsQTyVars name flav cusk True ktvs $-           do { res_k <- case resultSig of-                      KindSig ki                        -> tcLHsKindSig ki-                      TyVarSig (L _ (KindedTyVar _ ki)) -> tcLHsKindSig 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-              ; return (res_k, ()) }-       ; return (mkTcTyConEnv tycon) }-  where-    cusk  = famDeclHasCusk mb_cusk decl-    flav  = case info of-      DataFamily         -> DataFamilyFlavour-      OpenTypeFamily     -> OpenTypeFamilyFlavour-      ClosedTypeFamily _ -> ClosedTypeFamilyFlavour---------------------------------------------------------------------------kcLTyClDecl :: LTyClDecl GhcRn -> TcM ()-  -- See Note [Kind checking for type and class decls]-kcLTyClDecl (L loc decl)-  = setSrcSpan loc $-    tcAddDeclCtxt decl $-    do { traceTc "kcTyClDecl {" (ppr (tyClDeclLName decl))-       ; kcTyClDecl decl-       ; traceTc "kcTyClDecl done }" (ppr (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 = L _ name, tcdDataDefn = defn })-  | HsDataDefn { dd_cons = cons, dd_kindSig = Just _ } <- defn-  = mapM_ (wrapLocM kcConDecl) cons-    -- hs_tvs and dd_kindSig already dealt with in getInitialKind-    -- If dd_kindSig is Just, 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-  = kcTyClTyVars name $-    do  { _ <- tcHsContext ctxt-        ; mapM_ (wrapLocM kcConDecl) cons }--kcTyClDecl (SynDecl { tcdLName = L _ name, tcdRhs = lrhs })-  = kcTyClTyVars name $-    do  { syn_tc <- kcLookupTcTyCon name-        -- NB: check against the result kind that we allocated-        -- in getInitialKinds.-        ; discardResult $ tcCheckLHsType lrhs (tyConResKind syn_tc) }--kcTyClDecl (ClassDecl { tcdLName = L _ name-                      , tcdCtxt = ctxt, tcdSigs = sigs })-  = kcTyClTyVars name $-    do  { _ <- tcHsContext ctxt-        ; mapM_ (wrapLocM kc_sig)     sigs }-  where-    kc_sig (ClassOpSig _ nms op_ty) = kcHsSigType nms op_ty-    kc_sig _                        = return ()--kcTyClDecl (FamDecl (FamilyDecl { fdLName  = 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 ()----------------------kcConDecl :: ConDecl GhcRn -> TcM ()-kcConDecl (ConDeclH98 { con_name = name, con_qvars = ex_tvs-                      , con_cxt = ex_ctxt, con_details = details })-  = addErrCtxt (dataConCtxtName [name]) $-         -- the 'False' says that the existentials don't have a CUSK, as the-         -- concept doesn't really apply here. We just need to bring the variables-         -- into scope. (Similarly, the choice of PromotedDataConFlavour isn't-         -- particularly important.)-    do { _ <- kcLHsQTyVars (unLoc name) PromotedDataConFlavour-                           False False-                           ((fromMaybe emptyLHsQTvs ex_tvs)) $-              do { _ <- tcHsContext (fromMaybe (noLoc []) ex_ctxt)-                 ; mapM_ (tcHsOpenType . getBangType) (hsConDeclArgTys details)-                 ; return (panic "kcConDecl", ()) }-              -- We don't need to check the telescope here, because that's-              -- done in tcConDecl-       ; return () }--kcConDecl (ConDeclGADT { con_names = names-                       , con_type = ty })-  = addErrCtxt (dataConCtxtName names) $-      do { _ <- tcGadtSigType (ppr names) (unLoc $ head names) ty-                -- Even though the data constructor's type is closed, we-                -- must still call tcGadtSigType, because that influences-                -- 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-         ; return () }--{--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.---************************************************************************-*                                                                      *-\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.kcTyVar we look in the *local* env, to get the-    known kind for T.--  * But in TcHsType.ds_type (and ds_var_app in particular) we look in-    the *global* env to get the TyCon. But we must be careful not to-    force the TyCon or we'll get a loop.--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 (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 "tcTyAndCl-x" (ppr decl)-       ; tcTyClDecl1 Nothing roles_info decl }--  -- "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 = L _ tc_name, tcdRhs = rhs })-  = ASSERT( isNothing _parent )-    tcTyClTyVars tc_name $ \ binders res_kind ->-    tcTySynRhs roles_info tc_name binders res_kind rhs--  -- "data/newtype" declaration-tcTyClDecl1 _parent roles_info-            (DataDecl { tcdLName = L _ tc_name, tcdDataDefn = defn })-  = ASSERT( isNothing _parent )-    tcTyClTyVars tc_name $ \ tycon_binders res_kind ->-    tcDataDefn roles_info tc_name tycon_binders res_kind defn--tcTyClDecl1 _parent roles_info-            (ClassDecl { tcdLName = L _ class_name-            , tcdCtxt = ctxt, tcdMeths = meths-            , tcdFDs = fundeps, tcdSigs = sigs-            , tcdATs = ats, tcdATDefs = at_defs })-  = ASSERT( isNothing _parent )-    do { clas <- fixM $ \ clas ->-            -- We need the knot because 'clas' is passed into tcClassATs-            tcTyClTyVars class_name $ \ binders res_kind ->-            do { MASSERT( isConstraintKind 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' <- solveEqualities $ tcHsContext ctxt-               ; ctxt' <- zonkTcTypeToTypes emptyZonkEnv ctxt'-                       -- Squeeze out any kind unification variables-               ; fds'  <- mapM (addLocM tc_fundep) fundeps-               ; sig_stuff <- tcClassSigs class_name sigs meths-               ; at_stuff <- tcClassATs class_name clas ats at_defs-               ; mindef <- tcClassMinimalDef class_name sigs sig_stuff-               -- TODO: Allow us to distinguish between abstract class,-               -- and concrete class with no methods (maybe by-               -- specifying a trailing where or not-               ; 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 }--         ; return (classTyCon clas) }-  where-    tc_fundep (tvs1, tvs2) = do { tvs1' <- mapM (tcLookupTyVar . unLoc) tvs1 ;-                                ; tvs2' <- mapM (tcLookupTyVar . unLoc) tvs2 ;-                                ; return (tvs1', tvs2') }--tcFamDecl1 :: Maybe Class -> FamilyDecl GhcRn -> TcM TyCon-tcFamDecl1 parent (FamilyDecl { fdInfo = fam_info, fdLName = tc_lname@(L _ tc_name)-                              , fdResultSig = L _ sig-                              , fdInjectivityAnn = inj })-  | DataFamily <- fam_info-  = tcTyClTyVars tc_name $ \ binders res_kind -> do-  { traceTc "data family:" (ppr tc_name)-  ; checkFamFlag tc_name--  -- Check the kind signature, if any.-  -- Data families might have a variable return kind.-  -- See See Note [Arity of data families] in FamInstEnv.-  ; (extra_binders, final_res_kind) <- tcDataKindSig binders res_kind-  ; checkTc (tcIsStarKind 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 `chkAppend` extra_binders)-                              final_res_kind-                              (resultVariableName sig)-                              (DataFamilyTyCon tc_rep_name)-                              parent NotInjective-  ; return tycon }--  | OpenTypeFamily <- fam_info-  = tcTyClTyVars 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)-            <- tcTyClTyVars 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 binders res_kind-                                   [] ClosedTypeFamilyFlavour--       ; branches <- mapM (tcTyFamInstEqn tc_fam_tc Nothing) 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. It is Vitally-         -- Important that we do not pass the branches into-         -- newFamInstAxiomName. They have types that have been zonked inside-         -- the knot and we will die if we look at them. This is OK here-         -- because there will only be one axiom, so we don't need to-         -- differentiate names.-         -- See [Zonking inside the knot] in TcHsType-       ; 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----- | 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 (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 <- solveEqualities $ tcCheckLHsType hs_ty res_kind-       ; rhs_ty <- zonkTcTypeToType emptyZonkEnv 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-                     , dd_cons = cons })- =  do { tcg_env         <- getGblEnv-       ; let hsc_src = tcg_src tcg_env-       ; (extra_bndrs, final_res_kind) <- tcDataKindSig tycon_binders res_kind-       ; unless (mk_permissive_kind hsc_src cons) $-         checkTc (tcIsStarKind final_res_kind) (badKindSig True res_kind)--       ; let final_bndrs  = tycon_binders `chkAppend` extra_bndrs-             roles        = roles_info tc_name--       ; stupid_tc_theta <- solveEqualities $ tcHsContext ctxt-       ; stupid_theta    <- zonkTcTypeToTypes emptyZonkEnv-                                              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)--       ; gadt_syntax <- dataDeclChecks tc_name new_or_data stupid_theta cons--       ; tycon <- fixM $ \ tycon -> do-             { let res_ty = mkTyConApp tycon (mkTyVarTys (binderVars final_bndrs))-             ; 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)--{--************************************************************************-*                                                                      *-               Typechecking associated types (in class decls)-               (including the associated-type defaults)-*                                                                      *-************************************************************************--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 (L _ eqn) = unLoc (feqn_tycon eqn)--    at_fam_name :: LFamilyDecl GhcRn -> Name-    at_fam_name (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 (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 [L loc (FamEqn { feqn_tycon = lname@(L _ tc_name)-                                         , feqn_pats = hs_tvs-                                         , feqn_fixity = fixity-                                         , feqn_rhs = rhs })]-  | HsQTvs { 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 all_vars = imp_vars ++ map hsLTyVarName exp_vars-             pats     = map hsLTyVarBndrToType exp_vars-             pp_lhs   = pprFamInstLHS lname pats fixity [] Nothing--          -- NB: Use tcFamTyPats, not tcTyClTyVars. 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 ClsInstInfo, 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.-       ; (pats', rhs_ty)-           <- tcFamTyPats fam_tc Nothing all_vars pats-              (kcTyFamEqnRhs Nothing pp_lhs rhs) $-              \tvs pats rhs_kind ->-              do { rhs_ty <- solveEqualities $-                             tcCheckLHsType rhs rhs_kind--                     -- Zonk the patterns etc into the Type world-                 ; (ze, _) <- zonkTyBndrsX emptyZonkEnv tvs-                 ; pats'   <- zonkTcTypeToTypes ze pats-                 ; rhs_ty'  <- zonkTcTypeToType ze rhs_ty-                 ; return (pats', rhs_ty') }--         -- See Note [Type-checking default assoc decls]-       ; 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-     }--{- 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.)  -}----------------------------kcTyFamInstEqn :: TcTyCon -> LTyFamInstEqn GhcRn -> TcM ()-kcTyFamInstEqn tc_fam_tc-    (L loc (HsIB { hsib_vars = tv_names-                 , hsib_body = FamEqn { feqn_tycon  = lname@(L _ eqn_tc_name)-                                      , feqn_pats   = pats-                                      , feqn_fixity = fixity-                                      , feqn_rhs    = hs_ty }}))-  = setSrcSpan loc $-    do { checkTc (fam_name == eqn_tc_name)-                 (wrongTyFamName fam_name eqn_tc_name)-       ; discardResult $-         tc_fam_ty_pats tc_fam_tc Nothing -- not an associated type-                        tv_names pats (kcTyFamEqnRhs Nothing pp_lhs hs_ty) }-  where-    fam_name = tyConName tc_fam_tc-    pp_lhs = pprFamInstLHS lname pats fixity [] Nothing---- Infer the kind of the type on the RHS of a type family eqn. Then use--- this kind to check the kind of the LHS of the equation. This is useful--- as the callback to tc_fam_ty_pats and the kind-checker to--- tcFamTyPats.-kcTyFamEqnRhs :: Maybe ClsInstInfo-              -> SDoc                 -- ^ Eqn LHS (for errors only)-              -> LHsType GhcRn        -- ^ Eqn RHS-              -> TcKind               -- ^ Inferred kind of left-hand side-              -> TcM ([TcType], TcKind)  -- ^ New pats, inst'ed kind of left-hand side-kcTyFamEqnRhs mb_clsinfo pp_lhs_ty rhs_hs_ty lhs_ki-  = do { -- It's still possible the lhs_ki has some foralls. Instantiate these away.-         (_lhs_ty', new_pats, insted_lhs_ki)-           <- instantiateTyUntilN mb_kind_env 0 bogus_ty lhs_ki-       ; _ <- tcCheckLHsType rhs_hs_ty insted_lhs_ki--       ; return (new_pats, insted_lhs_ki) }-  where-    mb_kind_env = thdOf3 <$> mb_clsinfo--    bogus_ty = pprPanic "kcTyFamEqnRhs" (pp_lhs_ty $$ ppr rhs_hs_ty)--tcTyFamInstEqn :: TcTyCon -> Maybe ClsInstInfo -> LTyFamInstEqn GhcRn-               -> TcM CoAxBranch--- Needs to be here, not in TcInstDcls, because closed families--- (typechecked here) have TyFamInstEqns-tcTyFamInstEqn fam_tc mb_clsinfo-    (L loc (HsIB { hsib_vars = tv_names-                 , hsib_body = FamEqn { feqn_tycon  = lname@(L _ eqn_tc_name)-                                      , feqn_pats   = pats-                                      , feqn_fixity = fixity-                                      , feqn_rhs    = hs_ty }}))-  = ASSERT( getName fam_tc == eqn_tc_name )-    setSrcSpan loc $-    tcFamTyPats fam_tc mb_clsinfo tv_names pats-                (kcTyFamEqnRhs mb_clsinfo pp_lhs hs_ty) $-                    \tvs pats res_kind ->-    do { rhs_ty <- solveEqualities $ tcCheckLHsType hs_ty res_kind--       ; (ze, tvs') <- zonkTyBndrsX emptyZonkEnv tvs-       ; pats'      <- zonkTcTypeToTypes ze pats-       ; rhs_ty'    <- zonkTcTypeToType ze rhs_ty-       ; traceTc "tcTyFamInstEqn" (ppr fam_tc <+> pprTyVars tvs')-          -- don't print out the pats here, as they might be zonked inside the knot-       ; return (mkCoAxBranch tvs' [] pats' rhs_ty'-                              (map (const Nominal) tvs')-                              loc) }-  where-    pp_lhs = pprFamInstLHS lname pats fixity [] Nothing--kcDataDefn :: Maybe (VarEnv Kind) -- ^ Possibly, instantiations for vars-                                  -- (associated types only)-           -> DataFamInstDecl GhcRn-           -> TcKind              -- ^ the kind of the tycon applied to pats-           -> TcM ([TcType], TcKind)-             -- ^ the kind signature might force instantiation-             -- of the tycon; this returns any extra args and the inst'ed kind-             -- See Note [Instantiating a family tycon]--- Used for 'data instance' only--- Ordinary 'data' is handled by kcTyClDec-kcDataDefn mb_kind_env-           (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =-              FamEqn { feqn_tycon  = fam_name-                     , feqn_pats   = pats-                     , feqn_fixity = fixity-                     , feqn_rhs    = HsDataDefn { dd_ctxt = ctxt-                                                , dd_cons = cons-                                                , dd_kindSig = mb_kind } }}})-           res_k-  = do  { _ <- tcHsContext ctxt-        ; checkNoErrs $ mapM_ (wrapLocM kcConDecl) cons-          -- See Note [Failing early in kcDataDefn]-        ; exp_res_kind <- case mb_kind of-            Nothing -> return liftedTypeKind-            Just k  -> tcLHsKindSig k--          -- The expected type might have a forall at the type. Normally, we-          -- can't skolemise in kinds because we don't have type-level lambda.-          -- But here, we're at the top-level of an instance declaration, so-          -- we actually have a place to put the regeneralised variables.-          -- Thus: skolemise away. cf. Inst.deeplySkolemise and TcUnify.tcSkolemise-          -- Examples in indexed-types/should_compile/T12369-        ; let (tvs_to_skolemise, inner_res_kind) = tcSplitForAllTys exp_res_kind--        ; (skol_subst, tvs') <- tcInstSkolTyVars tvs_to_skolemise-            -- we don't need to do anything substantive with the tvs' because the-            -- quantifyTyVars in tcFamTyPats will catch them.--        ; let inner_res_kind' = substTyAddInScope skol_subst inner_res_kind-              tv_prs          = zip (map tyVarName tvs_to_skolemise) tvs'-              skol_info       = SigSkol InstDeclCtxt exp_res_kind tv_prs--        ; (ev_binds, (_, new_args, co))-            <- solveEqualities $-               checkConstraints skol_info tvs' [] $-               checkExpectedKindX mb_kind_env pp_fam_app-                                  bogus_ty res_k inner_res_kind'--        ; let Pair lhs_ki rhs_ki = tcCoercionKind co--        ; when debugIsOn $-          do { (_, ev_binds) <- zonkTcEvBinds emptyZonkEnv ev_binds-             ; MASSERT( isEmptyTcEvBinds ev_binds )-             ; lhs_ki <- zonkTcType lhs_ki-             ; rhs_ki <- zonkTcType rhs_ki-             ; MASSERT( lhs_ki `tcEqType` rhs_ki ) }--        ; return (new_args, lhs_ki) }-  where-    bogus_ty   = pprPanic "kcDataDefn" (ppr fam_name <+> ppr pats)-    pp_fam_app = pprFamInstLHS fam_name pats fixity (unLoc ctxt) mb_kind--{--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 [tc_fam_ty_pats vs tcFamTyPats]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-tc_fam_ty_pats does the type checking of the patterns, but it doesn't-zonk or generate any desugaring. It is used when kind-checking closed-type families.--tcFamTyPats type checks the patterns, zonks, and then calls thing_inside-to generate a desugaring. It is used during type-checking (not kind-checking).--Note [Type-checking type patterns]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-When typechecking the patterns of a family instance declaration, we can't-rely on using the family TyCon itself, because this is sometimes called-from within a type-checking knot. (Specifically for closed type families.)-The TcTyCon gives just enough information to do the job.--See also Note [tc_fam_ty_pats vs tcFamTyPats]--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 both the new args (that is, Type-(Type -> Type) for the equations above) and the instantiated kind.--Because we don't need this information in the kind-checking phase of-checking closed type families, we don't require these extra pieces of-information in tc_fam_ty_pats. See also Note [tc_fam_ty_pats vs tcFamTyPats].--Note [Failing early in kcDataDefn]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-We need to use checkNoErrs when calling kcConDecl. This is because kcConDecl-calls tcConDecl, which checks that the return type of a GADT-like constructor-is actually an instance of the type head. Without the checkNoErrs, potentially-two bad things could happen:-- 1) Duplicate error messages, because tcConDecl will be called again during-    *type* checking (as opposed to kind checking)- 2) If we just keep blindly forging forward after both kind checking and type-    checking, we can get a panic in rejigConRes. See Trac #8368.--}--------------------tc_fam_ty_pats :: TcTyCon    -- The family TcTyCon-                             -- See Note [Type-checking type patterns]-               -> Maybe ClsInstInfo-               -> [Name]              -- Bound kind/type variable names-               -> HsTyPats GhcRn      -- Type patterns-               -> (TcKind -> TcM r)   -- Kind checker for RHS-               -> TcM ( [TcTyVar]     -- Returns the type-checked patterns,-                      , [TcType]      -- the type variables that scope over-                      , r )           -- them, and the thing inside--- Check the type patterns of a type or data family instance---     type instance F <pat1> <pat2> = <type>--- The 'tyvars' are the free type variables of pats------ NB: The family instance declaration may be an associated one,--- nested inside an instance decl, thus---        instance C [a] where---          type F [a] = ...--- In that case, the type variable 'a' will *already be in scope*--- (and, if C is poly-kinded, so will its kind parameter).--tc_fam_ty_pats tc_fam_tc mb_clsinfo tv_names arg_pats-               kind_checker-  = do { -- First, check the arity.-         -- If we wait until validity checking, we'll get kind-         -- errors below when an arity error will be much easier to-         -- understand.-         let should_check_arity-               | DataFamilyFlavour <- flav = False-                  -- why not check data families? See [Arity of data families] in FamInstEnv-               | otherwise                 = True--       ; when should_check_arity $-         checkTc (arg_pats `lengthIs` vis_arity) $-         wrongNumberOfParmsErr vis_arity-                      -- report only explicit arguments--         -- Kind-check and quantify-         -- See Note [Quantifying over family patterns]-       ; (arg_tvs, (args, stuff)) <- tcImplicitTKBndrs tv_names $-         do { let loc          = nameSrcSpan name-                  lhs_fun      = L loc (HsTyVar NotPromoted (L loc name))-                  fun_ty       = mkTyConApp tc_fam_tc []-                  fun_kind     = tyConKind tc_fam_tc-                  mb_kind_env  = thdOf3 <$> mb_clsinfo--            ; (_, args, res_kind_out)-                <- tcInferApps typeLevelMode mb_kind_env-                               lhs_fun fun_ty fun_kind arg_pats--            ; stuff <- kind_checker res_kind_out--            ; return ((args, stuff), emptyVarSet) }--       ; return (arg_tvs, args, stuff) }-  where-    name      = tyConName tc_fam_tc-    vis_arity = length (tyConVisibleTyVars tc_fam_tc)-    flav      = tyConFlavour tc_fam_tc---- See Note [tc_fam_ty_pats vs tcFamTyPats]-tcFamTyPats :: TcTyCon-            -> Maybe ClsInstInfo-            -> [Name]          -- Implicitly bound kind/type variable names-            -> HsTyPats GhcRn  -- Type patterns-            -> (TcKind -> TcM ([TcType], TcKind))-                -- kind-checker for RHS-                -- See Note [Instantiating a family tycon]-            -> (   [TcTyVar]         -- Kind and type variables-                -> [TcType]          -- Kind and type arguments-                -> TcKind-                -> TcM a)            -- NB: You can use solveEqualities here.-            -> TcM a-tcFamTyPats tc_fam_tc mb_clsinfo-            tv_names arg_pats kind_checker thing_inside-  = do { (fam_used_tvs, typats, (more_typats, res_kind))-            <- solveEqualities $  -- See Note [Constraints in patterns]-               tc_fam_ty_pats tc_fam_tc mb_clsinfo-                              tv_names arg_pats kind_checker--          {- TODO (RAE): This should be cleverer. Consider this:--                 type family F a--                 data G a where-                   MkG :: F a ~ Bool => G a--                 type family Foo (x :: G a) :: F a-                 type instance Foo MkG = False--             This should probably be accepted. Yet the solveEqualities-             will fail, unable to solve (F a ~ Bool)-             We want to quantify over that proof.-             But see Note [Constraints in patterns]-             below, which is missing this piece. -}---            -- Find free variables (after zonking) and turn-            -- them into skolems, so that we don't subsequently-            -- replace a meta kind var with (Any *)-            -- Very like kindGeneralize-       ; let all_pats = typats `chkAppend` more_typats-       ; vars  <- zonkTcTypesAndSplitDepVars all_pats-       ; qtkvs <- quantifyTyVars emptyVarSet vars--       ; MASSERT( isEmptyVarSet $ coVarsOfTypes typats )-           -- This should be the case, because otherwise the solveEqualities-           -- above would fail. TODO (RAE): Update once the solveEqualities-           -- bit is cleverer.--       ; traceTc "tcFamTyPats" (ppr (getName tc_fam_tc)-                                $$ ppr all_pats $$ ppr qtkvs)-           -- Don't print out too much, as we might be in the knot--           -- See Note [Free-floating kind vars] in TcHsType-       ; let tc_flav = tyConFlavour tc_fam_tc-             all_mentioned_tvs = mkVarSet qtkvs-                                   -- qtkvs has all the tyvars bound by LHS-                                   -- type patterns-             unmentioned_tvs   = filterOut (`elemVarSet` all_mentioned_tvs)-                                           fam_used_tvs-                                   -- If there are tyvars left over, we can-                                   -- assume they're free-floating, since they-                                   -- aren't bound by a type pattern-       ; checkNoErrs $ reportFloatingKvs (getName tc_fam_tc) tc_flav-                                         qtkvs unmentioned_tvs--       ; tcExtendTyVarEnv qtkvs $-            -- Extend envt with TcTyVars not TyVars, because the-            -- kind checking etc done by thing_inside does not expect-            -- to encounter TyVars; it expects TcTyVars-         thing_inside qtkvs all_pats res_kind }--{--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 -> ThetaType -> [LConDecl GhcRn] -> TcM Bool-dataDeclChecks tc_name new_or_data 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 (L _ (ConDeclGADT { }) : _) = True-consUseGadtSyntax _                           = False-                 -- All constructors have same shape--------------------------------------tcConDecls :: TyCon -> ([TyConBinder], 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 tmpl_bndrs res_tmpl--tcConDecl :: TyCon             -- Representation tycon. Knot-tied!-          -> [TyConBinder] -> Type-                 -- Return type template (with its template tyvars)-                 --    (tvs, T tys), where T is the family TyCon-          -> ConDecl GhcRn-          -> TcM [DataCon]--tcConDecl rep_tycon tmpl_bndrs res_tmpl-          (ConDeclH98 { con_name = name-                      , con_qvars = hs_qvars, con_cxt = hs_ctxt-                      , con_details = hs_details })-  = addErrCtxt (dataConCtxtName [name]) $-    do { -- Get hold of the existential type variables-         -- e.g. data T a = forall (b::k) f. MkT a (f b)-         -- Here tmpl_bndrs = {a}-         --          hs_kvs = {k}-         --          hs_tvs = {f,b}-       ; let (hs_kvs, hs_tvs) = case hs_qvars of-               Nothing -> ([], [])-               Just (HsQTvs { hsq_implicit = kvs, hsq_explicit = tvs })-                       -> (kvs, tvs)--       ; traceTc "tcConDecl 1" (vcat [ ppr name, ppr hs_kvs, ppr hs_tvs ])--       ; (imp_tvs, (exp_tvs, ctxt, arg_tys, field_lbls, stricts))-           <- solveEqualities $-              tcImplicitTKBndrs hs_kvs $-              tcExplicitTKBndrs hs_tvs $ \ exp_tvs ->-              do { traceTc "tcConDecl" (ppr name <+> text "tvs:" <+> ppr hs_tvs)-                 ; ctxt <- tcHsContext (fromMaybe (noLoc []) hs_ctxt)-                 ; btys <- tcConArgs hs_details-                 ; field_lbls <- lookupConstructorFields (unLoc name)-                 ; let (arg_tys, stricts) = unzip btys-                       bound_vars  = allBoundVariabless ctxt `unionVarSet`-                                     allBoundVariabless arg_tys-                 ; return ((exp_tvs, ctxt, arg_tys, field_lbls, stricts), bound_vars)-                 }--         -- exp_tvs have explicit, user-written binding sites-         -- imp_tvs are user-written kind variables, without an explicit binding site-         -- the kvs below are those kind variables entirely unmentioned by the user-         --   and discovered only by generalization--             -- Kind generalisation-       ; let all_user_tvs = imp_tvs ++ exp_tvs-       ; vars <- zonkTcTypeAndSplitDepVars (mkSpecForAllTys all_user_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 doing this to get the right behavior around removing-                 -- any vars bound in exp_binders.--       ; kvs <- quantifyTyVars (mkVarSet (binderVars tmpl_bndrs)) vars--             -- Zonk to Types-       ; (ze, qkvs)      <- zonkTyBndrsX emptyZonkEnv kvs-       ; (ze, user_qtvs) <- zonkTyBndrsX ze all_user_tvs-       ; arg_tys         <- zonkTcTypeToTypes ze arg_tys-       ; ctxt            <- zonkTcTypeToTypes 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 (L _ name) = do-             { is_infix <- tcConIsInfixH98 name hs_details-             ; 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-                  -- 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 tmpl_bndrs res_tmpl-          (ConDeclGADT { con_names = names, con_type = ty })-  = addErrCtxt (dataConCtxtName names) $-    do { traceTc "tcConDecl 1" (ppr names)-       ; (user_tvs, ctxt, stricts, field_lbls, arg_tys, res_ty,hs_details)-           <- tcGadtSigType (ppr names) (unLoc $ head names) ty--       ; vars <- zonkTcTypeAndSplitDepVars (mkSpecForAllTys user_tvs $-                                            mkFunTys ctxt $-                                            mkFunTys arg_tys $-                                            res_ty)-       ; tkvs <- quantifyTyVars emptyVarSet vars--             -- Zonk to Types-       ; (ze, tkvs)     <- zonkTyBndrsX emptyZonkEnv tkvs-       ; (ze, user_tvs) <- zonkTyBndrsX ze user_tvs-       ; arg_tys <- zonkTcTypeToTypes ze arg_tys-       ; ctxt    <- zonkTcTypeToTypes ze ctxt-       ; res_ty  <- zonkTcTypeToType 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 (L _ name) = do-             { is_infix <- tcConIsInfixGADT name hs_details-             ; 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-                  -- 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-       }---tcGadtSigType :: SDoc -> Name -> LHsSigType GhcRn-              -> TcM ( [TcTyVar], [PredType],[HsSrcBang], [FieldLabel], [Type], Type-                     , HsConDetails (LHsType GhcRn)-                                    (Located [LConDeclField GhcRn]) )-tcGadtSigType doc name ty@(HsIB { hsib_vars = vars })-  = do { let (hs_details', res_ty', cxt, gtvs) = gadtDeclDetails ty-       ; (hs_details, res_ty) <- updateGadtResult failWithTc doc hs_details' res_ty'-       ; (imp_tvs, (exp_tvs, ctxt, arg_tys, res_ty, field_lbls, stricts))-           <- solveEqualities $-              tcImplicitTKBndrs vars $-              tcExplicitTKBndrs gtvs $ \ exp_tvs ->-              do { ctxt <- tcHsContext cxt-                 ; btys <- tcConArgs hs_details-                 ; ty' <- tcHsLiftedType res_ty-                 ; field_lbls <- lookupConstructorFields name-                 ; let (arg_tys, stricts) = unzip btys-                       bound_vars = allBoundVariabless ctxt `unionVarSet`-                                    allBoundVariabless arg_tys--                 ; return ((exp_tvs, ctxt, arg_tys, ty', field_lbls, stricts), bound_vars)-                 }-       ; return (imp_tvs ++ exp_tvs, ctxt, stricts, field_lbls, arg_tys, res_ty, hs_details)-       }--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 (\(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 :: [TyConBinder] -> 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 user-written, inferred-                                  -- type variables-            -> [TyVar]            -- The constructor's user-written, specified-                                  -- type variables-            -> 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--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 (typeKind res_ty) )-                  ASSERT( isLiftedTypeKind (typeKind 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)-          = mapAccumL substTyVarBndr 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-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 fake_tc }-    fake_tc | isFamilyTyCon tc || isTypeSynonymTyCon tc-            = makeRecoveryTyCon tc-            | otherwise-            = 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--Painfully, though, 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.--}------------------------------ 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))-       ; checkValidTyConTyVars 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------------------------------------ | Check for ill-scoped telescopes in a tycon.--- For example:------ > data SameKind :: k -> k -> *   -- this is OK--- > data Bad a (c :: Proxy b) (d :: Proxy a) (x :: SameKind b d)------ The problem is that @b@ should be bound (implicitly) at the beginning,--- but its kind mentions @a@, which is not yet in scope. Kind generalization--- makes a mess of this, and ends up including @a@ twice in the final--- tyvars. So this function checks for duplicates and, if there are any,--- produces the appropriate error message.-checkValidTyConTyVars :: TyCon -> TcM ()-checkValidTyConTyVars tc-  = do { -- strip off the duplicates and look for ill-scoped things-         -- but keep the *last* occurrence of each variable, as it's-         -- most likely the one the user wrote-         let stripped_tvs | duplicate_vars-                          = reverse $ nub $ reverse tvs-                          | otherwise-                          = tvs-             vis_tvs      = tyConVisibleTyVars tc-             extra | not (vis_tvs `equalLength` stripped_tvs)-                   = text "NB: Implicitly declared kind variables are put first."-                   | otherwise-                   = empty-       ; traceTc "checkValidTyConTyVars" (ppr tc <+> ppr tvs)-       ; checkValidTelescope (pprTyVars vis_tvs) stripped_tvs extra-         `and_if_that_doesn't_error`-           -- This triggers on test case dependent/should_fail/InferDependency-           -- It reports errors around Note [Dependent LHsQTyVars] in TcHsType-         when duplicate_vars (-          addErr (vcat [ text "Invalid declaration for" <+>-                         quotes (ppr tc) <> semi <+> text "you must explicitly"-                       , text "declare which variables are dependent on which others."-                       , hang (text "Inferred variable kinds:")-                         2 (vcat (map pp_tv stripped_tvs)) ])) }-  where-    tvs = tyConTyVars tc-    duplicate_vars = tvs `lengthExceeds` sizeVarSet (mkVarSet tvs)--    pp_tv tv = ppr tv <+> dcolon <+> ppr (tyVarKind tv)--     -- only run try_second if the first reports no errors-    and_if_that_doesn't_error :: TcM () -> TcM () -> TcM ()-    try_first `and_if_that_doesn't_error` try_second-      = recoverM (return ()) $-        do { checkNoErrs try_first-           ; try_second }----------------------------------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 (typeKind res_ty_tmpl)-              , ppr orig_res_ty <+> dcolon <+> ppr (typeKind 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)--        ; typeintype <- xoptM LangExt.TypeInType-        ; let (_, _, eq_specs, _, _, _) = dataConFullSig con-                -- dataConEqSpec retrieves both the real GADT equalities-                -- plus any user-written GADT-like equalities. But we don't-                -- want anything user-written. If we don't exclude user-written-                -- ones, test case polykinds/T13391a fails.--              invisible_gadt_eq_specs = filter is_invisible_eq_spec eq_specs-              univ_tvs = dataConUnivTyVars con-              tc_bndrs = tyConBinders tc--              vis_map :: VarEnv ArgFlag-              vis_map = zipVarEnv univ_tvs (map tyConBinderArgFlag tc_bndrs)--                -- See Note [Wrong visibility for GADTs] for why we have to build the map-                -- above instead of just looking at the datacon tyvar binder-              is_invisible_eq_spec eq_spec-                = isInvisibleArgFlag arg_flag-                where-                  eq_tv    = eqSpecTyVar eq_spec-                  arg_flag = expectJust "checkValidDataCon" $-                             lookupVarEnv vis_map eq_tv--        ; checkTc (typeintype || null invisible_gadt_eq_specs)-                  (badGADT con invisible_gadt_eq_specs)--          -- 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..]--        ; 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-    mini_env   = zipVarEnv tyvars (mkTyVarTys tyvars)-    mb_cls     = Just (cls, tyvars, mini_env)--    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) ->-             checkValidTyFamEqn mb_cls fam_tc-                                fam_tvs [] (mkTyVarTys fam_tvs) rhs pp_lhs loc }-        where-          fam_tvs = tyConTyVars fam_tc-          pp_lhs  = ppr (mkTyConApp fam_tc (mkTyVarTys fam_tvs))--    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 costrains 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-    tyvars                 = tyConTyVars tc-    roles                  = tyConRoles tc-    (vis_roles, vis_vars)  = unzip $ snd $-                             partitionInvisibles tc (mkTyVarTy . snd) $-                             zip roles tyvars-    role_annot_decl_maybe  = lookupRoleAnnot role_annots name--    check_roles-      = whenIsJust role_annot_decl_maybe $-          \decl@(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 _  (L _ Nothing)   _  = return ()-checkRoleAnnot tv (L _ (Just r1)) r2-  = when (r1 /= r2) $-    addErrTc $ badRoleAnnot (tyVarName tv) r1 r2---- 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 (TvBndr 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: http://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))--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-  | 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 = dataConExTyVars 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" ])--badGADT :: DataCon -> [EqSpec] -> SDoc-badGADT con eq_specs-  = hang (text "Data constructor" <+> quotes (ppr con) <+>-               text "constrains the choice of kind parameter" <> plural eq_specs <> colon)-       2 (vcat (map ppr_eq_spec eq_specs)) $$-    text "Use TypeInType to allow this"-  where-    ppr_eq_spec eq_spec = ppr (eqSpecTyVar eq_spec) <+> char '~' <+> ppr (eqSpecType eq_spec)--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)--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)--wrongTyFamName :: Name -> Name -> SDoc-wrongTyFamName fam_tc_name eqn_tc_name-  = hang (text "Mismatched type name in type family instance.")-       2 (vcat [ text "Expected:" <+> ppr fam_tc_name-               , text "  Actual:" <+> ppr eqn_tc_name ])--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@(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)--illegalRoleAnnotDecl :: LRoleAnnotDecl GhcRn -> TcM ()-illegalRoleAnnotDecl (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.")+        tcTyAndClassDecls,++        -- Functions used by TcInstDcls to check+        -- data/type family instance declarations+        kcDataDefn, tcConDecls, dataDeclChecks, checkValidTyCon,+        tcFamTyPats, tcTyFamInstEqn,+        tcAddTyFamInstCtxt, tcMkDataFamInstCtxt, tcAddDataFamInstCtxt,+        wrongKindOfFamily, dataConCtxt+    ) 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 TcEvidence  ( tcCoercionKind, isEmptyTcEvBinds )+import TcUnify     ( checkConstraints )+import TcHsType+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 Pair+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(..) )++{-+************************************************************************+*                                                                      *+\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.++      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 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.++    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 kcTyClTyVars and tcTyClTyVars, both in TcHsType.++    In a TcTyCon, everything is zonked after the kind-checking pass (S2).++    See also Note [Type checking recursive type and class declarations].++Note [Check telescope again during generalisation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The telescope check before kind generalisation is useful to catch something+like this:++  data T a k = MkT (Proxy (a :: k))++Clearly, the k has to come first. Checking for this problem must come before+kind generalisation, as described in Note [Bad telescopes] in+TcValidity.++However, we have to check again *after* kind generalisation, to catch something+like this:++  data SameKind :: k -> k -> Type  -- to force unification+  data S a (b :: a) (d :: SameKind c b)++Note that c has no explicit binding site. As such, it's quantified by kind+generalisation. (Note that kcHsTyVarBndrs does not return such variables+as binders in its returned TcTyCon.) The user-written part of this telescope+is well-ordered; no earlier variables depend on later ones. However, after+kind generalisation, we put c up front, like so:++  data S {c :: a} a (b :: a) (d :: SameKind c b)++We now have a problem. We could detect this problem just by looking at the+free vars of the kinds of the generalised variables (the kvs), but we get+such a nice error message out of checkValidTelescope that it seems like the+right thing to do.++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]+-- Third return value is Nothing if the tycon be unsaturated; otherwise,+-- the arity+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]++          -- Step 1: Bind kind variables for all decls+        ; initial_tcs <- getInitialKinds decls+        ; traceTc "kcTyClGroup: initial kinds" $+          ppr_tc_kinds initial_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]++        ; solveEqualities $+          tcExtendKindEnvWithTyCons initial_tcs $+          mapM_ kcLTyClDecl decls++        -- Step 3: generalisation+        -- Kind checking done for this group+        -- Now we have to kind generalize the flexis+        ; poly_tcs <- mapAndReportM generalise initial_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)++    generalise :: TcTyCon -> TcM TcTyCon+    -- For polymorphic things this is a no-op+    generalise tc+      = setSrcSpan (getSrcSpan tc) $+        addTyConCtxt tc $+        do { let name = tyConName tc+           ; tc_binders  <- mapM zonkTcTyVarBinder (tyConBinders tc)+           ; tc_res_kind <- zonkTcType (tyConResKind tc)+           ; let scoped_tvs  = tcTyConScopedTyVars tc+                 user_tyvars = tcTyConUserTyVars tc++              -- See Note [checkValidDependency]+           ; checkValidDependency tc_binders tc_res_kind++               -- See Note [Bad telescopes] in TcValidity+           ; checkValidTelescope tc_binders user_tyvars empty+           ; kvs <- kindGeneralize (mkTyConKind tc_binders tc_res_kind)++           ; let all_binders = mkNamedTyConBinders Inferred kvs ++ tc_binders++           ; (env, all_binders') <- zonkTyVarBindersX emptyZonkEnv all_binders+           ; tc_res_kind'        <- zonkTcTypeToType env tc_res_kind+           ; scoped_tvs'         <- zonkSigTyVarPairs scoped_tvs++             -- See Note [Check telescope again during generalisation]+           ; let extra = text "NB: Implicitly declared variables come before others."+           ; checkValidTelescope all_binders user_tyvars extra++                      -- Make sure tc_kind' has the final, zonked kind variables+           ; traceTc "Generalise kind" $+             vcat [ ppr name, ppr tc_binders, ppr (mkTyConKind tc_binders tc_res_kind)+                  , ppr kvs, ppr all_binders, ppr tc_res_kind+                  , ppr all_binders', ppr tc_res_kind'+                  , ppr scoped_tvs ]++           ; return (mkTcTyCon name user_tyvars all_binders' tc_res_kind'+                               scoped_tvs'+                               (tyConFlavour tc)) }+++--------------+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)+              | L _ (FamilyDecl { fdLName = L _ name }) <- ats ]++mk_prom_err_env (DataDecl { tcdLName = L _ name+                          , tcdDataDefn = HsDataDefn { dd_cons = cons } })+  = unitNameEnv name (APromotionErr TyConPE)+    `plusNameEnv`+    mkNameEnv [ (con, APromotionErr RecDataConPE)+              | L _ con' <- cons, L _ con <- getConNames con' ]++mk_prom_err_env decl+  = unitNameEnv (tcdName decl) (APromotionErr TyConPE)+    -- Works for family declarations too++--------------+getInitialKinds :: [LTyClDecl GhcRn] -> TcM [TcTyCon]+-- Returns a TcTyCon for each TyCon bound by the decls,+-- each with its initial kind++getInitialKinds decls = concatMapM (addLocM getInitialKind) decls++getInitialKind :: 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 decl@(ClassDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdATs = ats })+  = do { let cusk = hsDeclHasCusk decl+       ; tycon <- kcLHsQTyVars name ClassFlavour cusk ktvs $+                  return constraintKind+            -- See Note [Don't process associated types in kcLHsQTyVars]+       ; inner_tcs <- tcExtendNameTyVarEnv (tcTyConScopedTyVars tycon) $+                      getFamDeclInitialKinds (Just cusk) ats+       ; return (tycon : inner_tcs) }++getInitialKind decl@(DataDecl { tcdLName = L _ name+                              , tcdTyVars = ktvs+                              , tcdDataDefn = HsDataDefn { dd_kindSig = m_sig+                                                         , dd_ND = new_or_data } })+  = do  { tycon <-+           kcLHsQTyVars name (newOrDataToFlavour new_or_data) (hsDeclHasCusk decl) ktvs $+           case m_sig of+             Just ksig -> tcLHsKindSig (DataKindCtxt name) ksig+             Nothing   -> return liftedTypeKind+        ; return [tycon] }++getInitialKind (FamDecl { tcdFam = decl })+  = do { tc <- getFamDeclInitialKind Nothing decl+       ; return [tc] }++getInitialKind decl@(SynDecl { tcdLName = L _ name+                             , tcdTyVars = ktvs+                             , tcdRhs = rhs })+  = do  { tycon <- kcLHsQTyVars name TypeSynonymFlavour (hsDeclHasCusk decl) ktvs $+            case kind_annotation rhs of+              Nothing -> newMetaKindVar+              Just ksig -> tcLHsKindSig (TySynKindCtxt name) ksig+        ; return [tycon] }+  where+    -- Keep this synchronized with 'hsDeclHasCusk'.+    kind_annotation (L _ ty) = case ty of+        HsParTy _ lty     -> kind_annotation lty+        HsKindSig _ _ k   -> Just k+        _                 -> Nothing++getInitialKind (DataDecl _ (L _ _) _ _ (XHsDataDefn _)) = panic "getInitialKind"+getInitialKind (XTyClDecl _) = panic "getInitialKind"++---------------------------------+getFamDeclInitialKinds :: Maybe Bool  -- if assoc., CUSKness of assoc. class+                       -> [LFamilyDecl GhcRn]+                       -> TcM [TcTyCon]+getFamDeclInitialKinds mb_cusk decls+  = mapM (addLocM (getFamDeclInitialKind mb_cusk)) decls++getFamDeclInitialKind :: Maybe Bool  -- if assoc., CUSKness of assoc. class+                      -> FamilyDecl GhcRn+                      -> TcM TcTyCon+getFamDeclInitialKind mb_cusk decl@(FamilyDecl { fdLName     = L _ name+                                               , fdTyVars    = ktvs+                                               , fdResultSig = L _ resultSig+                                               , fdInfo      = info })+  = do { tycon <- kcLHsQTyVars name flav cusk ktvs $+           case resultSig of+             KindSig _ ki                          -> tcLHsKindSig ctxt ki+             TyVarSig _ (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+       ; return tycon }+  where+    cusk  = famDeclHasCusk mb_cusk decl+    flav  = case info of+      DataFamily         -> DataFamilyFlavour (isJust mb_cusk)+      OpenTypeFamily     -> OpenTypeFamilyFlavour (isJust mb_cusk)+      ClosedTypeFamily _ -> ClosedTypeFamilyFlavour+    ctxt  = TyFamResKindCtxt name+getFamDeclInitialKind _ (XFamilyDecl _) = panic "getFamDeclInitialKind"++------------------------------------------------------------------------+kcLTyClDecl :: LTyClDecl GhcRn -> TcM ()+  -- See Note [Kind checking for type and class decls]+kcLTyClDecl (L loc decl)+  | hsDeclHasCusk decl  -- See Note [Skip decls with CUSKs in kcLTyClDecl]+  = traceTc "kcTyClDecl skipped due to cusk" (ppr tc_name)++  | otherwise+  = 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 = L _ name, tcdDataDefn = defn })+  | HsDataDefn { dd_cons = cons@(L _ (ConDeclGADT {}) : _), dd_ctxt = 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+  = kcTyClTyVars name $+    do  { _ <- tcHsContext ctxt+        ; mapM_ (wrapLocM kcConDecl) cons }++kcTyClDecl (SynDecl { tcdLName = L _ name, tcdRhs = lrhs })+  = kcTyClTyVars name $+    do  { syn_tc <- kcLookupTcTyCon name+        -- NB: check against the result kind that we allocated+        -- in getInitialKinds.+        ; discardResult $ tcCheckLHsType lrhs (tyConResKind syn_tc) }++kcTyClDecl (ClassDecl { tcdLName = L _ name+                      , tcdCtxt = ctxt, tcdSigs = sigs })+  = kcTyClTyVars name $+    do  { _ <- tcHsContext ctxt+        ; mapM_ (wrapLocM kc_sig)     sigs }+  where+    kc_sig (ClassOpSig _ _ nms op_ty)+             = kcHsSigType (TyConSkol ClassFlavour name) nms op_ty+    kc_sig _ = return ()++kcTyClDecl (FamDecl _ (FamilyDecl { fdLName  = 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 _ (L _ _) _ _ (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]) $+      -- See Note [Use SigTvs in kind-checking pass]+    kcExplicitTKBndrs ex_tvs $+    do { _ <- tcHsMbContext ex_ctxt+       ; mapM_ (tcHsOpenType . getBangType) (hsConDeclArgTys args) }+              -- 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 $+    kcImplicitTKBndrs implicit_tkv_nms $+    kcExplicitTKBndrs explicit_tkv_nms $+    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 [Use SigTvs in kind-checking pass]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+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 SigTvs 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 SigTvs. This is correctly rejected+in the second pass, though. Test case: polykinds/SigTvKinds3)+Recall that the kind-checking pass exists solely to collect constraints+on the kinds and to power unification.++To achieve the use of SigTvs, we must be careful to use specialized functions+that produce SigTvs, 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 SigTvs+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+SigTvs 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 (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 = L _ tc_name, tcdRhs = rhs })+  = ASSERT( isNothing _parent )+    tcTyClTyVars tc_name $ \ binders res_kind ->+    tcTySynRhs roles_info tc_name binders res_kind rhs++  -- "data/newtype" declaration+tcTyClDecl1 _parent roles_info+            (DataDecl { tcdLName = L _ tc_name+                      , tcdDataDefn = defn })+  = ASSERT( isNothing _parent )+    tcTyClTyVars tc_name $ \ tycon_binders res_kind ->+    tcDataDefn roles_info tc_name tycon_binders res_kind defn++tcTyClDecl1 _parent roles_info+            (ClassDecl { tcdLName = L _ class_name+            , tcdCtxt = ctxt, tcdMeths = meths+            , tcdFDs = fundeps, tcdSigs = sigs+            , tcdATs = ats, tcdATDefs = at_defs })+  = ASSERT( isNothing _parent )+    do { clas <- fixM $ \ clas ->+            -- We need the knot because 'clas' is passed into tcClassATs+            tcTyClTyVars 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' <- solveEqualities $ tcHsContext ctxt+               ; ctxt' <- zonkTcTypeToTypes emptyZonkEnv ctxt'+                       -- Squeeze out any kind unification variables+               ; fds'  <- mapM (addLocM tc_fundep) fundeps+               ; sig_stuff <- tcClassSigs class_name sigs meths+               ; at_stuff <- tcClassATs class_name clas ats at_defs+               ; mindef <- tcClassMinimalDef class_name sigs sig_stuff+               -- TODO: Allow us to distinguish between abstract class,+               -- and concrete class with no methods (maybe by+               -- specifying a trailing where or not+               ; sig_stuff' <- mapM zonkTcMethInfoToMethInfo sig_stuff+                  -- this zonk is really just to squeeze out the TcTyCons+                  -- and convert, e.g., Skolems to tyvars. We won't+                  -- see any unfilled metavariables here.++               ; 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 }++         ; return (classTyCon clas) }+  where+    tc_fundep (tvs1, tvs2) = do { tvs1' <- mapM (tcLookupTyVar . unLoc) tvs1 ;+                                ; tvs2' <- mapM (tcLookupTyVar . unLoc) tvs2 ;+                                ; return (tvs1', tvs2') }++tcTyClDecl1 _ _ (XTyClDecl _) = panic "tcTyClDecl1"++tcFamDecl1 :: Maybe Class -> FamilyDecl GhcRn -> TcM TyCon+tcFamDecl1 parent (FamilyDecl { fdInfo = fam_info, fdLName = tc_lname@(L _ tc_name)+                              , fdResultSig = L _ sig, fdTyVars = user_tyvars+                              , fdInjectivityAnn = inj })+  | DataFamily <- fam_info+  = tcTyClTyVars tc_name $ \ binders res_kind -> do+  { traceTc "data family:" (ppr tc_name)+  ; checkFamFlag tc_name++  -- Check the kind signature, if any.+  -- Data families might have a variable return kind.+  -- See See Note [Arity of data families] in FamInstEnv.+  ; (extra_binders, final_res_kind) <- tcDataKindSig binders 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 `chkAppend` extra_binders)+                              final_res_kind+                              (resultVariableName sig)+                              (DataFamilyTyCon tc_rep_name)+                              parent NotInjective+  ; return tycon }++  | OpenTypeFamily <- fam_info+  = tcTyClTyVars 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)+            <- tcTyClTyVars 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+                                   [] ClosedTypeFamilyFlavour++       ; branches <- mapAndReportM (tcTyFamInstEqn tc_fam_tc Nothing) 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 (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 <- solveEqualities $ tcCheckLHsType hs_ty res_kind+       ; rhs_ty <- zonkTcTypeToType emptyZonkEnv 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+                     , dd_cons = cons })+ =  do { tcg_env         <- getGblEnv+       ; let hsc_src = tcg_src tcg_env+       ; (extra_bndrs, final_res_kind) <- tcDataKindSig tycon_binders res_kind+       ; unless (mk_permissive_kind hsc_src cons) $+         checkTc (tcIsLiftedTypeKind final_res_kind) (badKindSig True res_kind)++       ; let final_bndrs  = tycon_binders `chkAppend` extra_bndrs+             roles        = roles_info tc_name++       ; stupid_tc_theta <- solveEqualities $ tcHsContext ctxt+       ; stupid_theta    <- zonkTcTypeToTypes emptyZonkEnv+                                              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)++       ; gadt_syntax <- dataDeclChecks tc_name new_or_data stupid_theta cons++       ; tycon <- fixM $ \ tycon -> do+             { let res_ty = mkTyConApp tycon (mkTyVarTys (binderVars final_bndrs))+             ; 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"++{-+************************************************************************+*                                                                      *+               Typechecking associated types (in class decls)+               (including the associated-type defaults)+*                                                                      *+************************************************************************++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 (L _ eqn) = unLoc (feqn_tycon eqn)++    at_fam_name :: LFamilyDecl GhcRn -> Name+    at_fam_name (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 [L loc (FamEqn { feqn_tycon = L _ tc_name+                                         , feqn_pats = hs_tvs+                                         , feqn_rhs = rhs })]+  | 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 all_vars = imp_vars ++ map hsLTyVarName exp_vars+             pats     = map hsLTyVarBndrToType exp_vars++          -- NB: Use tcFamTyPats, not tcTyClTyVars. 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 ClsInstInfo, 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.+       ; (pats', rhs_ty)+           <- tcFamTyPats fam_tc Nothing all_vars pats+              (kcTyFamEqnRhs Nothing rhs) $+              \tvs pats rhs_kind ->+              do { rhs_ty <- solveEqualities $+                             tcCheckLHsType rhs rhs_kind++                     -- Zonk the patterns etc into the Type world+                 ; (ze, _) <- zonkTyBndrsX emptyZonkEnv tvs+                 ; pats'   <- zonkTcTypeToTypes ze pats+                 ; rhs_ty'  <- zonkTcTypeToType ze rhs_ty+                 ; return (pats', rhs_ty') }++         -- See Note [Type-checking default assoc decls]+       ; 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 _ [L _ (XFamEqn _)] = panic "tcDefaultAssocDecl"+tcDefaultAssocDecl _ [L _ (FamEqn _ (L _ _) (XLHsQTyVars _) _ _)]+  = panic "tcDefaultAssocDecl"++{- 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.++-}++-------------------------+kcTyFamInstEqn :: TcTyCon -> LTyFamInstEqn GhcRn -> TcM ()+kcTyFamInstEqn tc_fam_tc+    (L loc (HsIB { hsib_ext = HsIBRn { hsib_vars = tv_names }+                 , hsib_body = FamEqn { feqn_tycon  = L _ eqn_tc_name+                                      , feqn_pats   = pats+                                      , feqn_rhs    = hs_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 tv_names+           , text "feqn_pats =" <+> ppr pats ])+       ; checkTc (fam_name == eqn_tc_name)+                 (wrongTyFamName fam_name eqn_tc_name)+          -- this check reports an arity error instead of a kind error; easier for user+       ; checkTc (pats `lengthIs` vis_arity) $+                  wrongNumberOfParmsErr vis_arity+       ; kcFamTyPats tc_fam_tc tv_names pats $ \ rhs_kind ->+         discardResult $ kcTyFamEqnRhs Nothing hs_ty rhs_kind }+  where+    fam_name = tyConName tc_fam_tc+    vis_arity = length (tyConVisibleTyVars tc_fam_tc)+kcTyFamInstEqn _ (L _ (XHsImplicitBndrs _)) = panic "kcTyFamInstEqn"+kcTyFamInstEqn _ (L _ (HsIB _ (XFamEqn _))) = panic "kcTyFamInstEqn"++-- Infer the kind of the type on the RHS of a type family eqn. Then use+-- this kind to check the kind of the LHS of the equation. This is useful+-- as the callback to tcFamTyPats.+kcTyFamEqnRhs :: Maybe ClsInstInfo+              -> LHsType GhcRn        -- ^ Eqn RHS+              -> TcKind               -- ^ Inferred kind of left-hand side+              -> TcM ([TcType], TcKind)  -- ^ New pats, inst'ed kind of left-hand side+kcTyFamEqnRhs mb_clsinfo rhs_hs_ty lhs_ki+  = do { -- It's still possible the lhs_ki has some foralls. Instantiate these away.+         (new_pats, insted_lhs_ki)+           <- instantiateTyUntilN mb_kind_env 0 lhs_ki++       ; traceTc "kcTyFamEqnRhs" (vcat+           [ text "rhs_hs_ty =" <+> ppr rhs_hs_ty+           , text "lhs_ki =" <+> ppr lhs_ki+           , text "insted_lhs_ki =" <+> ppr insted_lhs_ki+           , text "new_pats =" <+> ppr new_pats+           ])++       ; _ <- tcCheckLHsType rhs_hs_ty insted_lhs_ki++       ; return (new_pats, insted_lhs_ki) }+  where+    mb_kind_env = thdOf3 <$> mb_clsinfo++tcTyFamInstEqn :: TcTyCon -> Maybe ClsInstInfo -> LTyFamInstEqn GhcRn+               -> TcM (KnotTied CoAxBranch)+-- Needs to be here, not in TcInstDcls, because closed families+-- (typechecked here) have TyFamInstEqns+tcTyFamInstEqn fam_tc mb_clsinfo+    (L loc (HsIB { hsib_ext = HsIBRn { hsib_vars = tv_names }+                 , hsib_body = FamEqn { feqn_tycon  = L _ eqn_tc_name+                                      , feqn_pats   = pats+                                      , feqn_rhs    = hs_ty }}))+  = ASSERT( getName fam_tc == eqn_tc_name )+    setSrcSpan loc $+    tcFamTyPats fam_tc mb_clsinfo tv_names pats+                (kcTyFamEqnRhs mb_clsinfo hs_ty) $+                    \tvs pats res_kind ->+    do { rhs_ty <- solveEqualities $ tcCheckLHsType hs_ty res_kind++       ; (ze, tvs') <- zonkTyBndrsX emptyZonkEnv tvs+       ; pats'      <- zonkTcTypeToTypes ze pats+       ; rhs_ty'    <- zonkTcTypeToType ze rhs_ty+       ; traceTc "tcTyFamInstEqn" (ppr fam_tc <+> pprTyVars tvs')+       ; return (mkCoAxBranch tvs' [] pats' rhs_ty'+                              (map (const Nominal) tvs')+                              loc) }+tcTyFamInstEqn _ _ (L _ (XHsImplicitBndrs _)) = panic "tcTyFamInstEqn"+tcTyFamInstEqn _ _ (L _ (HsIB _ (XFamEqn _))) = panic "tcTyFamInstEqn"++kcDataDefn :: Maybe (VarEnv Kind) -- ^ Possibly, instantiations for vars+                                  -- (associated types only)+           -> DataFamInstDecl GhcRn+           -> TcKind              -- ^ the kind of the tycon applied to pats+           -> TcM ([TcType], TcKind)+             -- ^ the kind signature might force instantiation+             -- of the tycon; this returns any extra args and the inst'ed kind+             -- See Note [Instantiating a family tycon]+-- Used for 'data instance' only+-- Ordinary 'data' is handled by kcTyClDec+kcDataDefn mb_kind_env+           (DataFamInstDecl { dfid_eqn = HsIB { hsib_body =+              FamEqn { feqn_tycon  = fam_name+                     , feqn_pats   = pats+                     , feqn_fixity = fixity+                     , feqn_rhs    = HsDataDefn { dd_ctxt = ctxt+                                                , dd_cons = cons+                                                , dd_kindSig = mb_kind } }}})+           res_k+  = do  { _ <- tcHsContext ctxt+        ; checkNoErrs $ mapM_ (wrapLocM kcConDecl) cons+          -- See Note [Failing early in kcDataDefn]+        ; exp_res_kind <- case mb_kind of+            Nothing -> return liftedTypeKind+            Just k  -> tcLHsKindSig (DataKindCtxt (unLoc fam_name)) k++          -- The expected type might have a forall at the type. Normally, we+          -- can't skolemise in kinds because we don't have type-level lambda.+          -- But here, we're at the top-level of an instance declaration, so+          -- we actually have a place to put the regeneralised variables.+          -- Thus: skolemise away. cf. Inst.deeplySkolemise and TcUnify.tcSkolemise+          -- Examples in indexed-types/should_compile/T12369+        ; let (tvs_to_skolemise, inner_res_kind) = tcSplitForAllTys exp_res_kind++        ; (skol_subst, tvs') <- tcInstSkolTyVars tvs_to_skolemise+            -- we don't need to do anything substantive with the tvs' because the+            -- quantifyTyVars in tcFamTyPats will catch them.++        ; let inner_res_kind' = substTyAddInScope skol_subst inner_res_kind+              tv_prs          = zip (map tyVarName tvs_to_skolemise) tvs'+              skol_info       = SigSkol InstDeclCtxt exp_res_kind tv_prs++        ; (ev_binds, (_, new_args, co))+            <- solveEqualities $+               checkConstraints skol_info tvs' [] $+               checkExpectedKindX mb_kind_env pp_fam_app+                                  bogus_ty res_k inner_res_kind'++        ; let Pair lhs_ki rhs_ki = tcCoercionKind co++        ; when debugIsOn $+          do { (_, ev_binds) <- zonkTcEvBinds emptyZonkEnv ev_binds+             ; MASSERT( isEmptyTcEvBinds ev_binds )+             ; lhs_ki <- zonkTcType lhs_ki+             ; rhs_ki <- zonkTcType rhs_ki+             ; MASSERT( lhs_ki `tcEqType` rhs_ki ) }++        ; return (new_args, lhs_ki) }+  where+    bogus_ty   = pprPanic "kcDataDefn" (ppr fam_name <+> ppr pats)+    pp_fam_app = pprFamInstLHS fam_name pats fixity (unLoc ctxt) mb_kind+kcDataDefn _ (DataFamInstDecl (XHsImplicitBndrs _)) _+  = panic "kcDataDefn"+kcDataDefn _ (DataFamInstDecl (HsIB _ (FamEqn _ _ _ _ (XHsDataDefn _)))) _+  = panic "kcDataDefn"+kcDataDefn _ (DataFamInstDecl (HsIB _ (XFamEqn _))) _+  = panic "kcDataDefn"++{-+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 both the new args (that is, Type+(Type -> Type) for the equations above) and the instantiated kind.++Because we don't need this information in the kind-checking phase of+checking closed type families, we don't require these extra pieces of+information in tc_fam_ty_pats.++Note [Failing early in kcDataDefn]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+We need to use checkNoErrs when calling kcConDecl. This is because kcConDecl+calls tcConDecl, which checks that the return type of a GADT-like constructor+is actually an instance of the type head. Without the checkNoErrs, potentially+two bad things could happen:++ 1) Duplicate error messages, because tcConDecl will be called again during+    *type* checking (as opposed to kind checking)+ 2) If we just keep blindly forging forward after both kind checking and type+    checking, we can get a panic in rejigConRes. See Trac #8368.+-}++-----------------+kcFamTyPats :: TcTyCon+            -> [Name]+            -> HsTyPats GhcRn+            -> (TcKind -> TcM ())+            -> TcM ()+kcFamTyPats tc_fam_tc tv_names arg_pats kind_checker+  = discardResult $+    kcImplicitTKBndrs tv_names $+    do { let loc     = nameSrcSpan name+             lhs_fun = L loc (HsTyVar noExt NotPromoted (L loc name))+               -- lhs_fun is for error messages only+             no_fun  = pprPanic "kcFamTyPats" (ppr name)+             fun_kind = tyConKind tc_fam_tc++       ; (_, _, res_kind_out) <- tcInferApps typeLevelMode Nothing lhs_fun no_fun+                                             fun_kind arg_pats+       ; kind_checker res_kind_out }+  where+    name = tyConName tc_fam_tc++tcFamTyPats :: TyCon+            -> Maybe ClsInstInfo+            -> [Name]          -- Implicitly bound kind/type variable names+            -> HsTyPats GhcRn  -- Type patterns+            -> (TcKind -> TcM ([TcType], TcKind))+                -- kind-checker for RHS+                -- See Note [Instantiating a family tycon]+            -> (   [TcTyVar]         -- Kind and type variables+                -> [TcType]          -- Kind and type arguments+                -> TcKind+                -> TcM a)            -- NB: You can use solveEqualities here.+            -> TcM a+-- Check the type patterns of a type or data family instance+--     type instance F <pat1> <pat2> = <type>+-- The 'tyvars' are the free type variables of pats+--+-- NB: The family instance declaration may be an associated one,+-- nested inside an instance decl, thus+--        instance C [a] where+--          type F [a] = ...+-- In that case, the type variable 'a' will *already be in scope*+-- (and, if C is poly-kinded, so will its kind parameter).+tcFamTyPats fam_tc mb_clsinfo+            tv_names arg_pats kind_checker thing_inside+  = do { -- First, check the arity.+         -- If we wait until validity checking, we'll get kind+         -- errors below when an arity error will be much easier to+         -- understand.+         let should_check_arity+               | DataFamilyFlavour _ <- flav = False+                  -- why not check data families? See [Arity of data families] in FamInstEnv+               | otherwise                   = True++       ; when should_check_arity $+         checkTc (arg_pats `lengthIs` vis_arity) $+         wrongNumberOfParmsErr vis_arity+                      -- report only explicit arguments++       ; (fam_used_tvs, (typats, (more_typats, res_kind)))+            <- solveEqualities $  -- See Note [Constraints in patterns]+               tcImplicitQTKBndrs FamInstSkol tv_names $+                  -- See Note [Kind-checking tyvar binders for associated types]+               do { let loc = nameSrcSpan fam_name+                        lhs_fun = L loc (HsTyVar noExt NotPromoted+                                                               (L loc fam_name))+                        fun_ty = mkTyConApp fam_tc []+                        fun_kind = tyConKind fam_tc+                        mb_kind_env = thdOf3 <$> mb_clsinfo++                  ; (_, args, res_kind_out)+                      <- tcInferApps typeLevelMode mb_kind_env+                                     lhs_fun fun_ty fun_kind arg_pats++                  ; stuff <- kind_checker res_kind_out+                  ; return (args, stuff) }++          {- TODO (RAE): This should be cleverer. Consider this:++                 type family F a++                 data G a where+                   MkG :: F a ~ Bool => G a++                 type family Foo (x :: G a) :: F a+                 type instance Foo MkG = False++             This should probably be accepted. Yet the solveEqualities+             will fail, unable to solve (F a ~ Bool)+             We want to quantify over that proof.+             But see Note [Constraints in patterns]+             below, which is missing this piece. -}+++            -- Find free variables (after zonking) and turn+            -- them into skolems, so that we don't subsequently+            -- replace a meta kind var with (Any *)+            -- Very like kindGeneralize+       ; let all_pats = typats `chkAppend` more_typats+       ; vars  <- zonkTcTypesAndSplitDepVars all_pats+       ; qtkvs <- quantifyTyVars emptyVarSet vars++       ; when debugIsOn $+         do { all_pats <- mapM zonkTcType all_pats+            ; MASSERT2( isEmptyVarSet $ coVarsOfTypes all_pats, ppr all_pats ) }+           -- This should be the case, because otherwise the solveEqualities+           -- above would fail. TODO (RAE): Update once the solveEqualities+           -- bit is cleverer.++       ; traceTc "tcFamTyPats" (ppr (getName fam_tc)+                                $$ ppr all_pats $$ ppr qtkvs)++           -- See Note [Free-floating kind vars] in TcHsType+       ; let all_mentioned_tvs = mkVarSet qtkvs+                                   -- qtkvs has all the tyvars bound by LHS+                                   -- type patterns+             unmentioned_tvs   = filterOut (`elemVarSet` all_mentioned_tvs)+                                           fam_used_tvs+                                   -- If there are tyvars left over, we can+                                   -- assume they're free-floating, since they+                                   -- aren't bound by a type pattern+       ; checkNoErrs $ reportFloatingKvs fam_name flav+                                         qtkvs unmentioned_tvs++       ; scopeTyVars FamInstSkol qtkvs $+            -- Extend envt with TcTyVars not TyVars, because the+            -- kind checking etc done by thing_inside does not expect+            -- to encounter TyVars; it expects TcTyVars+         thing_inside qtkvs all_pats res_kind }+  where+    fam_name  = tyConName fam_tc+    flav      = tyConFlavour fam_tc+    vis_arity = length (tyConVisibleTyVars fam_tc)+++{-+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 -> ThetaType -> [LConDecl GhcRn] -> TcM Bool+dataDeclChecks tc_name new_or_data 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 (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 { -- 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))+           <- solveEqualities $+              tcExplicitTKBndrs skol_info 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 <- quantifyConDecl (mkVarSet (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 doing this to get the right behavior around removing+                 -- any vars bound in exp_binders.++             -- Zonk to Types+       ; (ze, qkvs)      <- zonkTyBndrsX emptyZonkEnv kvs+       ; (ze, user_qtvs) <- zonkTyBndrsX ze exp_tvs+       ; arg_tys         <- zonkTcTypeToTypes ze arg_tys+       ; ctxt            <- zonkTcTypeToTypes 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 (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]+       }+  where+    skol_info = SigTypeSkol (ConArgCtxt (unLoc 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 = res_ty })+  | HsQTvs { hsq_ext = HsQTvsRn { hsq_implicit = implicit_tkv_nms }+           , hsq_explicit = explicit_tkv_nms } <- qtvs+  = addErrCtxt (dataConCtxtName names) $+    do { traceTc "tcConDecl 1" (ppr names)+       ; let (L _ name : _) = names+             skol_info      = DataConSkol name++       ; (imp_tvs, (exp_tvs, (ctxt, arg_tys, res_ty, field_lbls, stricts)))+           <- solveEqualities $+              tcImplicitTKBndrs skol_info implicit_tkv_nms $+              tcExplicitTKBndrs skol_info explicit_tkv_nms $+              do { ctxt <- tcHsMbContext cxt+                 ; btys <- tcConArgs hs_args+                 ; res_ty' <- tcHsLiftedType res_ty+                 ; field_lbls <- lookupConstructorFields name+                 ; let (arg_tys, stricts) = unzip btys+                 ; return (ctxt, arg_tys, res_ty', field_lbls, stricts)+                 }+       ; let user_tvs = imp_tvs ++ exp_tvs++       ; tkvs <- quantifyConDecl emptyVarSet (mkSpecForAllTys user_tvs $+                                              mkFunTys ctxt $+                                              mkFunTys arg_tys $+                                              res_ty)++             -- Zonk to Types+       ; (ze, tkvs)     <- zonkTyBndrsX emptyZonkEnv tkvs+       ; (ze, user_tvs) <- zonkTyBndrsX ze user_tvs+       ; arg_tys <- zonkTcTypeToTypes ze arg_tys+       ; ctxt    <- zonkTcTypeToTypes ze ctxt+       ; res_ty  <- zonkTcTypeToType 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 (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"++-- | Produce the telescope of kind variables that this datacon is+-- implicitly quantified over. Incoming type need not be zonked.+quantifyConDecl :: TcTyCoVarSet  -- outer tvs, not to be quantified over; zonked+                -> TcType -> TcM [TcTyVar]+quantifyConDecl gbl_tvs ty+  = do { ty <- zonkTcType ty+       ; let fvs = candidateQTyVarsOfType ty+       ; quantifyTyVars gbl_tvs fvs }++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 (\(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 user-written, 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 (typeKind res_ty) )+                  ASSERT( isLiftedTypeKind (typeKind 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 (typeKind res_ty_tmpl)+              , ppr orig_res_ty <+> dcolon <+> ppr (typeKind 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..]++        ; 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+    mini_env   = zipVarEnv tyvars (mkTyVarTys tyvars)+    mb_cls     = Just (cls, tyvars, mini_env)++    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) ->+             checkValidTyFamEqn mb_cls fam_tc+                                fam_tvs [] (mkTyVarTys fam_tvs) rhs pp_lhs loc }+        where+          fam_tvs = tyConTyVars fam_tc+          pp_lhs  = ppr (mkTyConApp fam_tc (mkTyVarTys fam_tvs))++    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 }++Note [checkValidDependency]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Consider++  data Proxy k (a :: k)+  data Proxy2 k a = P (Proxy k a)++(This is test dependent/should_fail/InferDependency.) While it seems GHC can+figure out the dependency between the arguments to Proxy2, this case errors.+The problem is that when we build the initial kind (getInitialKind) for+a tycon, we need to decide whether an argument is dependent or not. At first,+I thought we could just assume that *all* arguments are dependent, and then+patch it up later. However, this causes problems in error messages (where+tycon's have mysterious kinds "forall (a :: k) -> blah") and in unification+(where we try to unify kappa ~ forall (a :: k) -> blah, failing because the+RHS is not a tau-type). Perhaps a cleverer algorithm could sort this out+(say, by storing the dependency flag in a mutable cell and by avoiding+these fancy kinds in error messages depending on the extension in effect)+but it doesn't seem worth it.++So: we choose the dependency for each argument variable once and for all+in getInitialKind. This means that any dependency must be lexically manifest.++checkValidDependency checks to make sure that no lexically non-dependent+argument actually appears in a kind. Note the example above, where the k+in Proxy2 is a dependent argument, but this fact is not lexically+manifest. checkValidDependency will reject. This function must be called+*before* kind generalization, because kind generalization works with+the result of mkTyConKind, which will think that Proxy2's kind is+Type -> k -> Type, where k is unbound. (It won't use a forall for a+"non-dependent" argument k.)+-}++-- | See Note [checkValidDependency]+checkValidDependency :: [TyConBinder]  -- zonked+                     -> TcKind         -- zonked (result kind)+                     -> TcM ()+checkValidDependency binders res_kind+  = go (tyCoVarsOfType res_kind) (reverse binders)+  where+    go :: TyCoVarSet     -- fvs from scope+       -> [TyConBinder]  -- binders, in reverse order+       -> TcM ()+    go _   []           = return ()  -- all set+    go fvs (tcb : tcbs)+      | not (isNamedTyConBinder tcb) && tcb_var `elemVarSet` fvs+      = do { setSrcSpan (getSrcSpan tcb_var) $+             addErrTc (vcat [ text "Type constructor argument" <+> quotes (ppr tcb_var) <+>+                              text "is used dependently."+                            , text "Any dependent arguments must be obviously so, not inferred"+                            , text "by the type-checker."+                            , hang (text "Inferred argument kinds:")+                                 2 (vcat (map pp_binder binders))+                            , text "Suggestion: use" <+> quotes (ppr tcb_var) <+>+                              text "in a kind to make the dependency clearer." ])+           ; go new_fvs tcbs }++      | otherwise+      = go new_fvs tcbs+      where+        new_fvs = fvs `delVarSet` tcb_var+                      `unionVarSet` tyCoVarsOfType tcb_kind++        tcb_var  = binderVar tcb+        tcb_kind = tyVarKind tcb_var++        pp_binder binder = ppr (binderVar binder) <+> dcolon <+> ppr (binderKind binder)++{-+************************************************************************+*                                                                      *+                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+    tyvars                 = tyConTyVars tc+    roles                  = tyConRoles tc+    (vis_roles, vis_vars)  = unzip $ snd $+                             partitionInvisibles tc (mkTyVarTy . snd) $+                             zip roles tyvars+    role_annot_decl_maybe  = lookupRoleAnnot role_annots name++    check_roles+      = whenIsJust role_annot_decl_maybe $+          \decl@(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 _  (L _ Nothing)   _  = return ()+checkRoleAnnot tv (L _ (Just r1)) r2+  = when (r1 /= r2) $+    addErrTc $ badRoleAnnot (tyVarName tv) r1 r2++-- 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 (TvBndr 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: http://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+  | 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 = dataConExTyVars 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)++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)++wrongTyFamName :: Name -> Name -> SDoc+wrongTyFamName fam_tc_name eqn_tc_name+  = hang (text "Mismatched type name in type family instance.")+       2 (vcat [ text "Expected:" <+> ppr fam_tc_name+               , text "  Actual:" <+> ppr eqn_tc_name ])++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@(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 _ (L _ (XRoleAnnotDecl _)) = panic "wrongNumberOfRoles"++illegalRoleAnnotDecl :: LRoleAnnotDecl GhcRn -> TcM ()+illegalRoleAnnotDecl (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 (L _ (XRoleAnnotDecl _)) = panic "illegalRoleAnnotDecl"  needXRoleAnnotations :: TyCon -> SDoc needXRoleAnnotations tc
typecheck/TcTyDecls.hs view
@@ -19,10 +19,10 @@         checkClassCycles,          -- * Implicits-        tcAddImplicits, mkDefaultMethodType,+        addTyConsToGblEnv, mkDefaultMethodType,          -- * Record selectors-        mkRecSelBinds, mkOneRecordSelector+        tcRecSelBinds, mkRecSelBinds, mkOneRecordSelector     ) where  #include "HsVersions.h"@@ -31,7 +31,7 @@  import TcRnMonad import TcEnv-import TcBinds( tcRecSelBinds )+import TcBinds( tcValBinds, addTypecheckedBinds ) import TyCoRep( Type(..), Coercion(..), UnivCoProvenance(..) ) import TcType import TysWiredIn( unitTy )@@ -122,7 +122,7 @@      go_co (UnivCo p _ ty ty')    = go_prov p `plusNameEnv` go ty `plusNameEnv` go ty'      go_co (SymCo co)             = go_co co      go_co (TransCo co co')       = go_co co `plusNameEnv` go_co co'-     go_co (NthCo _ co)           = go_co co+     go_co (NthCo _ _ co)         = go_co co      go_co (LRCo _ co)            = go_co co      go_co (InstCo co co')        = go_co co `plusNameEnv` go_co co'      go_co (CoherenceCo co co')   = go_co co `plusNameEnv` go_co co'@@ -481,7 +481,7 @@           -- is wrong, just ignore it. We check this in the validity check.         role_annots           = case lookupRoleAnnot annots_env name of-              Just (L _ (RoleAnnotDecl _ annots))+              Just (L _ (RoleAnnotDecl _ _ annots))                 | annots `lengthIs` num_exps -> map unLoc annots               _                              -> replicate num_exps Nothing         default_roles = build_default_roles argflags role_annots@@ -743,23 +743,24 @@ *                                                                      * ********************************************************************* -} -tcAddImplicits :: [TyCon] -> TcM TcGblEnv+addTyConsToGblEnv :: [TyCon] -> TcM TcGblEnv -- Given a [TyCon], add to the TcGblEnv+--   * extend the TypeEnv with the tycons --   * extend the TypeEnv with their implicitTyThings --   * extend the TypeEnv with any default method Ids --   * add bindings for record selectors---   * add bindings for type representations for the TyThings-tcAddImplicits tycons-  = discardWarnings $+addTyConsToGblEnv tyclss+  = tcExtendTyConEnv tyclss                    $     tcExtendGlobalEnvImplicit implicit_things  $     tcExtendGlobalValEnv def_meth_ids          $-    do { traceTc "tcAddImplicits" $ vcat-            [ text "tycons" <+> ppr tycons+    do { traceTc "tcAddTyCons" $ vcat+            [ text "tycons" <+> ppr tyclss             , text "implicits" <+> ppr implicit_things ]-       ; tcRecSelBinds (mkRecSelBinds tycons) }+       ; gbl_env <- tcRecSelBinds (mkRecSelBinds tyclss)+       ; return gbl_env }  where-   implicit_things = concatMap implicitTyConThings tycons-   def_meth_ids    = mkDefaultMethodIds tycons+   implicit_things = concatMap implicitTyConThings tyclss+   def_meth_ids    = mkDefaultMethodIds tyclss  mkDefaultMethodIds :: [TyCon] -> [Id] -- We want to put the default-method Ids (both vanilla and generic)@@ -783,7 +784,7 @@      -- NB: the Class doesn't have TyConBinders; we reach into its      --     TyCon to get those.  We /do/ need the TyConBinders because      --     we need the correct visibility: these default methods are-     --     used in code generated by the the fill-in for missing+     --     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)@@ -822,30 +823,37 @@ ************************************************************************ -} -mkRecSelBinds :: [TyCon] -> HsValBinds GhcRn+tcRecSelBinds :: [(Id, LHsBind GhcRn)] -> TcM TcGblEnv+tcRecSelBinds sel_bind_prs+  = tcExtendGlobalValEnv [sel_id | L _ (IdSig _ sel_id) <- sigs] $+    do { (rec_sel_binds, tcg_env) <- discardWarnings $+                                     tcValBinds TopLevel binds sigs getGblEnv+       ; return (tcg_env `addTypecheckedBinds` map snd rec_sel_binds) }+  where+    sigs = [ L loc (IdSig noExt 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)] -- NB We produce *un-typechecked* bindings, rather like 'deriving' --    This makes life easier, because the later type checking will add --    all necessary type abstractions and applications mkRecSelBinds tycons-  = ValBindsOut binds sigs-  where-    (sigs, binds) = unzip rec_sels-    rec_sels = map mkRecSelBind [ (tc,fld)-                                | tc <- tycons+  = map mkRecSelBind [ (tc,fld) | tc <- tycons                                 , fld <- tyConFieldLabels tc ] -mkRecSelBind :: (TyCon, FieldLabel) -> (LSig GhcRn, (RecFlag, LHsBinds GhcRn))+mkRecSelBind :: (TyCon, FieldLabel) -> (Id, LHsBind GhcRn) mkRecSelBind (tycon, fl)   = mkOneRecordSelector all_cons (RecSelData tycon) fl   where     all_cons = map RealDataCon (tyConDataCons tycon)  mkOneRecordSelector :: [ConLike] -> RecSelParent -> FieldLabel-                    -> (LSig GhcRn, (RecFlag, LHsBinds GhcRn))+                    -> (Id, LHsBind GhcRn) mkOneRecordSelector all_cons idDetails fl-  = (L loc (IdSig sel_id), (NonRecursive, unitBag (L loc sel_bind)))+  = (sel_id, L loc sel_bind)   where-    loc    = getSrcSpan sel_name+    loc      = getSrcSpan sel_name     lbl      = flLabel fl     sel_name = flSelector fl @@ -882,13 +890,14 @@              | otherwise =  map mk_match cons_w_field ++ deflt     mk_match con = mkSimpleMatch (mkPrefixFunRhs sel_lname)                                  [L loc (mk_sel_pat con)]-                                 (L loc (HsVar (L loc field_var)))+                                 (L loc (HsVar noExt (L loc field_var)))     mk_sel_pat con = ConPatIn (L loc (getName con)) (RecCon rec_fields)     rec_fields = HsRecFields { rec_flds = [rec_field], rec_dotdot = Nothing }     rec_field  = noLoc (HsRecField                         { hsRecFieldLbl-                           = L loc (FieldOcc (L loc $ mkVarUnqual lbl) sel_name)-                        , hsRecFieldArg = L loc (VarPat (L loc field_var))+                           = L loc (FieldOcc sel_name (L loc $ mkVarUnqual lbl))+                        , hsRecFieldArg+                           = L loc (VarPat noExt (L loc field_var))                         , hsRecPun = False })     sel_lname = L loc sel_name     field_var = mkInternalName (mkBuiltinUnique 1) (getOccName sel_name) loc@@ -898,10 +907,10 @@     -- mentions this particular record selector     deflt | all dealt_with all_cons = []           | otherwise = [mkSimpleMatch CaseAlt-                            [L loc (WildPat placeHolderType)]-                            (mkHsApp (L loc (HsVar+                            [L loc (WildPat noExt)]+                            (mkHsApp (L loc (HsVar noExt                                             (L loc (getName rEC_SEL_ERROR_ID))))-                                     (L loc (HsLit msg_lit)))]+                                     (L loc (HsLit noExt msg_lit)))]          -- Do not add a default case unless there are unmatched         -- constructors.  We must take account of GADTs, else we
typecheck/TcType.hs view
@@ -23,6 +23,7 @@   TcType, TcSigmaType, TcRhoType, TcTauType, TcPredType, TcThetaType,   TcTyVar, TcTyVarSet, TcDTyVarSet, TcTyCoVarSet, TcDTyCoVarSet,   TcKind, TcCoVar, TcTyCoVar, TcTyVarBinder, TcTyCon,+  KnotTied,    ExpType(..), InferResult(..), ExpSigmaType, ExpRhoType, mkCheckExpType, @@ -30,9 +31,9 @@    -- TcLevel   TcLevel(..), topTcLevel, pushTcLevel, isTopTcLevel,-  strictlyDeeperThan, sameDepthAs, fmvTcLevel,+  strictlyDeeperThan, sameDepthAs,   tcTypeLevel, tcTyVarLevel, maxTcLevel,-+  promoteSkolem, promoteSkolemX, promoteSkolemsX,   --------------------------------   -- MetaDetails   UserTypeCtxt(..), pprUserTypeCtxt, isSigMaybe,@@ -44,15 +45,14 @@   isAmbiguousTyVar, metaTyVarRef, metaTyVarInfo,   isFlexi, isIndirect, isRuntimeUnkSkol,   metaTyVarTcLevel, setMetaTyVarTcLevel, metaTyVarTcLevel_maybe,-  isTouchableMetaTyVar, isTouchableOrFmv,+  isTouchableMetaTyVar,   isFloatedTouchableMetaTyVar,   findDupSigTvs, mkTyVarNamePairs,    --------------------------------   -- Builders   mkPhiTy, mkInfSigmaTy, mkSpecSigmaTy, mkSigmaTy,-  mkNakedTyConApp, mkNakedAppTys, mkNakedAppTy,-  mkNakedCastTy,+  mkNakedAppTy, mkNakedAppTys, mkNakedCastTy, nakedSubstTy,    --------------------------------   -- Splitters@@ -108,9 +108,6 @@   candidateQTyVarsOfType, candidateQTyVarsOfTypes, CandidatesQTvs(..),   anyRewritableTyVar, -  -- * Extracting bound variables-  allBoundVariables, allBoundVariabless,-   ---------------------------------   -- Foreign import and export   isFFIArgumentTy,     -- :: DynFlags -> Safety -> Type -> Bool@@ -151,7 +148,7 @@    -- Type substitutions   TCvSubst(..),         -- Representation visible to a few friends-  TvSubstEnv, emptyTCvSubst,+  TvSubstEnv, emptyTCvSubst, mkEmptyTCvSubst,   zipTvSubst,   mkTvSubstPrs, notElemTCvSubst, unionTCvSubst,   getTvSubstEnv, setTvSubstEnv, getTCvInScope, extendTCvInScope,@@ -179,10 +176,6 @@   noFreeVarsOfType,    ---------------------------------  -- Transforming Types to TcTypes-  toTcType,    -- :: Type -> TcType-  toTcTypeBag, -- :: Bag EvVar -> Bag EvVar-   pprKind, pprParendKind, pprSigmaType,   pprType, pprParendType, pprTypeApp, pprTyThingCategory, tyThingCategory,   pprTheta, pprParendTheta, pprThetaArrowTy, pprClassPred,@@ -225,18 +218,17 @@                  , listTyCon, constraintKind ) import BasicTypes import Util-import Bag import Maybes import ListSetOps ( getNth, findDupsEq ) import Outputable import FastString import ErrUtils( Validity(..), MsgDoc, isValid )-import FV import qualified GHC.LanguageExtensions as LangExt +import Data.List  ( mapAccumL )+import Data.Functor.Identity( Identity(..) ) import Data.IORef import Data.List.NonEmpty( NonEmpty(..) )-import Data.Functor.Identity import qualified Data.Semigroup as Semi  {-@@ -275,18 +267,23 @@ -- In all cases, a (saturated) type synonym application is legal, -- provided it expands to the required form. -Note [TcTyVars in the typechecker]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [TcTyVars and TyVars in the typechecker]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The typechecker uses a lot of type variables with special properties, notably being a unification variable with a mutable reference.  These use the 'TcTyVar' variant of Var.Var. -However, the type checker and constraint solver can encounter type+Note, though, that a /bound/ type variable can (and probably should)+be a TyVar.  E.g+    forall a. a -> a+Here 'a' is really just a deBruijn-number; it certainly does not have+a signficant TcLevel (as every TcTyVar does).  So a forall-bound type+variable should be TyVars; and hence a TyVar can appear free in a TcType.++The type checker and constraint solver can also encounter /free/ type variables that use the 'TyVar' variant of Var.Var, for a couple of reasons: -  - When unifying or flattening under (forall a. ty)-   - When typechecking a class decl, say        class C (a :: k) where           foo :: T a -> Int@@ -298,10 +295,14 @@      See calls to tcExtendTyVarEnv for other places that ordinary     TyVars are bought into scope, and hence may show up in the types-    and inds generated by TcHsType.+    and kinds generated by TcHsType. +  - The pattern-match overlap checker calls the constraint solver,+    long afer TcTyVars have been zonked away+ It's convenient to simply treat these TyVars as skolem constants,-which of course they are.  So+which of course they are.  We give them a level number of "outermost",+so they behave as global constants.  Specifically:  * Var.tcTyVarDetails succeeds on a TyVar, returning   vanillaSkolemTv, as well as on a TcTyVar.@@ -328,8 +329,7 @@ GHC Trac #12785. -} --- See Note [TcTyVars in the typechecker]-type TcTyVar = TyVar    -- Used only during type inference+-- See Note [TcTyVars and TyVars in the typechecker] type TcCoVar = CoVar    -- Used only during type inference type TcType = Type      -- A TcType can have mutable type variables type TcTyCoVar = Var    -- Either a TcTyVar or a CoVar@@ -353,7 +353,6 @@ type TcDTyVarSet    = DTyVarSet type TcDTyCoVarSet  = DTyCoVarSet - {- ********************************************************************* *                                                                      *           ExpType: an "expected type" in the type checker@@ -507,6 +506,8 @@ data TcTyVarDetails   = SkolemTv      -- A skolem        TcLevel    -- Level of the implication that binds it+                  -- See TcUnify Note [Deeper level on the left] for+                  --     how this level number is used        Bool       -- True <=> this skolem type variable can be overlapped                   --          when looking up instances                   -- See Note [Binding when looking up instances] in InstEnv@@ -520,8 +521,10 @@  vanillaSkolemTv, superSkolemTv :: TcTyVarDetails -- See Note [Binding when looking up instances] in InstEnv-vanillaSkolemTv = SkolemTv (pushTcLevel topTcLevel) False  -- Might be instantiated-superSkolemTv   = SkolemTv (pushTcLevel topTcLevel) True   -- Treat this as a completely distinct type+vanillaSkolemTv = SkolemTv topTcLevel False  -- Might be instantiated+superSkolemTv   = SkolemTv topTcLevel True   -- Treat this as a completely distinct type+                  -- The choice of level number here is a bit dodgy, but+                  -- topTcLevel works in the places that vanillaSkolemTv is used  ----------------------------- data MetaDetails@@ -591,6 +594,7 @@    | 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@@ -618,6 +622,10 @@   | 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@@ -637,6 +645,7 @@ 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)@@ -654,6 +663,10 @@ 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@@ -682,25 +695,41 @@  * INVARIANTS.  In a tree of Implications, -    (ImplicInv) The level number of an Implication is+    (ImplicInv) The level number (ic_tclvl) of an Implication is                 STRICTLY GREATER THAN that of its parent -    (MetaTvInv) The level number of a unification variable is-                LESS THAN OR EQUAL TO that of its parent-                implication+    (SkolInv)   The level number of the skolems (ic_skols) of an+                Implication is equal to the level of the implication+                itself (ic_tclvl) +    (GivenInv)  The level number of a unification variable appearing+                in the 'ic_given' of an implication I should be+                STRICTLY LESS THAN the ic_tclvl of I++    (WantedInv) The level number of a unification variable appearing+                in the 'ic_wanted' of an implication I should be+                LESS THAN OR EQUAL TO the ic_tclvl of I+                See Note [WantedInv]+ * A unification variable is *touchable* if its level number-  is EQUAL TO that of its immediate parent implication.+  is EQUAL TO that of its immediate parent implication,+  and it is a TauTv or SigTv (but /not/ FlatMetaTv or FlatSkolTv -* INVARIANT-    (GivenInv)  The free variables of the ic_given of an-                implication are all untouchable; ie their level-                numbers are LESS THAN the ic_tclvl of the implication+Note [WantedInv]+~~~~~~~~~~~~~~~~+Why is WantedInv important?  Consider this implication, where+the constraint (C alpha[3]) disobeys WantedInv: +   forall[2] a. blah => (C alpha[3])+                        (forall[3] b. alpha[3] ~ b)++We can unify alpha:=b in the inner implication, because 'alpha' is+touchable; but then 'b' has excaped its scope into the outer implication.+ Note [Skolem escape prevention] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We only unify touchable unification variables.  Because of-(MetaTvInv), there can be no occurrences of the variable further out,+(WantedInv), there can be no occurrences of the variable further out, so the unification can't cause the skolems to escape. Example:      data T = forall a. MkT a (a->Int)      f x (MkT v f) = length [v,x]@@ -734,28 +763,21 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~ We arrange the TcLevels like this -   0   Level for all flatten meta-vars-   1   Top level-   2   First-level implication constraints-   3   Second-level implication constraints+   0   Top level+   1   First-level implication constraints+   2   Second-level implication constraints    ...etc...--The flatten meta-vars are all at level 0, just to make them untouchable. -}  maxTcLevel :: TcLevel -> TcLevel -> TcLevel maxTcLevel (TcLevel a) (TcLevel b) = TcLevel (a `max` b) -fmvTcLevel :: TcLevel--- See Note [TcLevel assignment]-fmvTcLevel = TcLevel 0- topTcLevel :: TcLevel -- See Note [TcLevel assignment]-topTcLevel = TcLevel 1   -- 1 = outermost level+topTcLevel = TcLevel 0   -- 0 = outermost level  isTopTcLevel :: TcLevel -> Bool-isTopTcLevel (TcLevel 1) = True+isTopTcLevel (TcLevel 0) = True isTopTcLevel _           = False  pushTcLevel :: TcLevel -> TcLevel@@ -772,7 +794,7 @@                              --     So <= would be equivalent  checkTcLevelInvariant :: TcLevel -> TcLevel -> Bool--- Checks (MetaTvInv) from Note [TcLevel and untouchable type variables]+-- Checks (WantedInv) from Note [TcLevel and untouchable type variables] checkTcLevelInvariant (TcLevel ctxt_tclvl) (TcLevel tv_tclvl)   = ctxt_tclvl >= tv_tclvl @@ -784,6 +806,7 @@           SkolemTv tv_lvl _             -> tv_lvl           RuntimeUnk                    -> topTcLevel + tcTypeLevel :: TcType -> TcLevel -- Max level of any free var of the type tcTypeLevel ty@@ -791,11 +814,37 @@   where     add v lvl       | isTcTyVar v = lvl `maxTcLevel` tcTyVarLevel v-      | otherwise   = lvl+      | otherwise = lvl  instance Outputable TcLevel where   ppr (TcLevel us) = ppr us +promoteSkolem :: TcLevel -> TcTyVar -> TcTyVar+promoteSkolem tclvl skol+  | tclvl < tcTyVarLevel skol+  = ASSERT( isTcTyVar skol && isSkolemTyVar skol )+    setTcTyVarDetails skol (SkolemTv tclvl (isOverlappableTyVar skol))++  | otherwise+  = skol++-- | Change the TcLevel in a skolem, extending a substitution+promoteSkolemX :: TcLevel -> TCvSubst -> TcTyVar -> (TCvSubst, TcTyVar)+promoteSkolemX tclvl subst skol+  = ASSERT( isTcTyVar skol && isSkolemTyVar skol )+    (new_subst, new_skol)+  where+    new_skol+      | tclvl < tcTyVarLevel skol+      = setTcTyVarDetails (updateTyVarKind (substTy subst) skol)+                          (SkolemTv tclvl (isOverlappableTyVar skol))+      | otherwise+      = updateTyVarKind (substTy subst) skol+    new_subst = extendTvSubstWithClone subst skol new_skol++promoteSkolemsX :: TcLevel -> TCvSubst -> [TcTyVar] -> (TCvSubst, [TcTyVar])+promoteSkolemsX tclvl = mapAccumL (promoteSkolemX tclvl)+ {- ********************************************************************* *                                                                      *     Finding type family instances@@ -899,7 +948,7 @@     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 (NthCo _ _ co)      = goCo co     goCo (LRCo _ co)         = goCo co     goCo (InstCo co arg)     = goCo co `unionVarSet` goCo arg     goCo (CoherenceCo c1 c2) = goCo c1 `unionVarSet` goCo c2@@ -977,33 +1026,6 @@  {- ********************************************************************* *                                                                      *-          Bound variables in a type-*                                                                      *-********************************************************************* -}---- | Find all variables bound anywhere in a type.--- See also Note [Scope-check inferred kinds] in TcHsType-allBoundVariables :: Type -> TyVarSet-allBoundVariables ty = fvVarSet $ go ty-  where-    go :: Type -> FV-    go (TyVarTy tv)     = go (tyVarKind tv)-    go (TyConApp _ tys) = mapUnionFV go tys-    go (AppTy t1 t2)    = go t1 `unionFV` go t2-    go (FunTy t1 t2)    = go t1 `unionFV` go t2-    go (ForAllTy (TvBndr tv _) t2) = FV.unitFV tv `unionFV`-                                    go (tyVarKind tv) `unionFV` go t2-    go (LitTy {})       = emptyFV-    go (CastTy ty _)    = go ty-    go (CoercionTy {})  = emptyFV-      -- any types mentioned in a coercion should also be mentioned in-      -- a type.--allBoundVariabless :: [Type] -> TyVarSet-allBoundVariabless = mapUnionVarSet allBoundVariables--{- *********************************************************************-*                                                                      *           Type and kind variables in a type *                                                                      * ********************************************************************* -}@@ -1154,40 +1176,28 @@ -}  tcIsTcTyVar :: TcTyVar -> Bool--- See Note [TcTyVars in the typechecker]+-- See Note [TcTyVars and TyVars in the typechecker] tcIsTcTyVar tv = isTyVar tv -isTouchableOrFmv :: TcLevel -> TcTyVar -> Bool-isTouchableOrFmv ctxt_tclvl tv-  = ASSERT2( tcIsTcTyVar tv, ppr tv )-    case tcTyVarDetails tv of-      MetaTv { mtv_tclvl = tv_tclvl, mtv_info = info }-        -> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,-                    ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tclvl )-           case info of-             FlatMetaTv -> True-             _          -> tv_tclvl `sameDepthAs` ctxt_tclvl-      _          -> False- isTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool isTouchableMetaTyVar ctxt_tclvl tv   | isTyVar tv -- See Note [Coercion variables in free variable lists]-  = ASSERT2( tcIsTcTyVar tv, ppr tv )-    case tcTyVarDetails tv of-      MetaTv { mtv_tclvl = tv_tclvl }-        -> ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,-                    ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tclvl )-           tv_tclvl `sameDepthAs` ctxt_tclvl-      _ -> False+  , MetaTv { mtv_tclvl = tv_tclvl, mtv_info = info } <- tcTyVarDetails tv+  , not (isFlattenInfo info)+  = ASSERT2( checkTcLevelInvariant ctxt_tclvl tv_tclvl,+             ppr tv $$ ppr tv_tclvl $$ ppr ctxt_tclvl )+    tv_tclvl `sameDepthAs` ctxt_tclvl+   | otherwise = False  isFloatedTouchableMetaTyVar :: TcLevel -> TcTyVar -> Bool isFloatedTouchableMetaTyVar ctxt_tclvl tv   | isTyVar tv -- See Note [Coercion variables in free variable lists]+  , MetaTv { mtv_tclvl = tv_tclvl, mtv_info = info } <- tcTyVarDetails tv+  , not (isFlattenInfo info)   = ASSERT2( tcIsTcTyVar tv, ppr tv )-    case tcTyVarDetails tv of-      MetaTv { mtv_tclvl = tv_tclvl } -> tv_tclvl `strictlyDeeperThan` ctxt_tclvl-      _ -> False+    tv_tclvl `strictlyDeeperThan` ctxt_tclvl+   | otherwise = False  isImmutableTyVar :: TyVar -> Bool@@ -1222,7 +1232,10 @@  -- | True of both given and wanted flatten-skolems (fak and usk) isFlattenTyVar tv-  = isFmvTyVar tv || isFskTyVar tv+  = ASSERT2( tcIsTcTyVar tv, ppr tv )+    case tcTyVarDetails tv of+        MetaTv { mtv_info = info } -> isFlattenInfo info+        _                          -> False  isSkolemTyVar tv   = ASSERT2( tcIsTcTyVar tv, ppr tv )@@ -1269,6 +1282,11 @@       MetaTv { mtv_info = info } -> info       _ -> pprPanic "metaTyVarInfo" (ppr tv) +isFlattenInfo :: MetaInfo -> Bool+isFlattenInfo FlatMetaTv = True+isFlattenInfo FlatSkolTv = True+isFlattenInfo _          = False+ metaTyVarTcLevel :: TcTyVar -> TcLevel metaTyVarTcLevel tv   = case tcTyVarDetails tv of@@ -1367,37 +1385,106 @@ getDFunTyLitKey (NumTyLit n) = mkOccName Name.varName (show n) getDFunTyLitKey (StrTyLit n) = mkOccName Name.varName (show n)  -- hm -----------------mkNakedTyConApp :: TyCon -> [Type] -> Type--- Builds a TyConApp---   * without being strict in TyCon,---   * without satisfying the invariants of TyConApp--- A subsequent zonking will establish the invariants--- See Note [Type-checking inside the knot] in TcHsType-mkNakedTyConApp tc tys = TyConApp tc tys+{- *********************************************************************+*                                                                      *+           Maintaining the well-kinded type invariant+*                                                                      *+********************************************************************* -} +{- Note [The well-kinded type invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+See also Note [The tcType invariant] in TcHsType.++During type inference, we maintain the invariant that++   INVARIANT: every type is well-kinded /without/ zonking++   EXCEPT: you are allowed (ty |> co) even if the kind of ty+           does not match the from-kind of co.++Main goal: if this invariant is respected, then typeKind cannot fail+(as it can for ill-kinded types).++In particular, we can get types like+     (k |> co) Int+where+    k :: kappa+    co :: Refl (Type -> Type)+    kappa is a unification variable and kappa := Type already++So in the un-zonked form (k Int) would be ill-kinded,+but (k |> co) Int is well-kinded.  So 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::*))+bacause 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, bucause the latter uses smart constructors that do+  Refl-elimination.++-}++--------------- mkNakedAppTys :: Type -> [Type] -> Type--- See Note [Type-checking inside the knot] in TcHsType+-- See Note [The well-kinded type invariant] mkNakedAppTys ty1                []   = ty1-mkNakedAppTys (TyConApp tc tys1) tys2 = mkNakedTyConApp tc (tys1 ++ tys2)+mkNakedAppTys (TyConApp tc tys1) tys2 = mkTyConApp tc (tys1 ++ tys2) mkNakedAppTys ty1                tys2 = foldl AppTy ty1 tys2  mkNakedAppTy :: Type -> Type -> Type--- See Note [Type-checking inside the knot] in TcHsType+-- See Note [The well-kinded type invariant] mkNakedAppTy ty1 ty2 = mkNakedAppTys ty1 [ty2]  mkNakedCastTy :: Type -> Coercion -> Type--- Do simple, fast compaction; especially dealing with Refl--- for which it's plain stupid to create a cast--- This simple function killed off a huge number of Refl casts--- in types, at birth.--- Note that it's fine to do this even for a "mkNaked" function,--- because we don't look at TyCons.  isReflCo checks if the coercion--- is structurally Refl; it does not check for shape k ~ k.-mkNakedCastTy ty co | isReflCo co = ty-mkNakedCastTy (CastTy ty co1) co2 = CastTy ty (co1 `mkTransCo` co2)+-- 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 +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++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_tybinder = \subst tv _ -> return (substTyVarBndr subst tv)+               , tcm_tycon    = return }+ {- ************************************************************************ *                                                                      *@@ -1675,7 +1762,7 @@ --     df :: forall m. (forall b. Eq b => Eq (m b)) -> C m -- -- Also NB splitFunTys, not tcSplitFunTys;--- the latter  specifically stops at PredTy arguments,+-- the latter specifically stops at PredTy arguments, -- and we don't want to do that here tcSplitDFunTy ty   = case tcSplitForAllTys ty   of { (tvs, rho)    ->@@ -1711,10 +1798,10 @@ *                                                                      * ********************************************************************* -} -tcEqKind :: TcKind -> TcKind -> Bool+tcEqKind :: HasDebugCallStack => TcKind -> TcKind -> Bool tcEqKind = tcEqType -tcEqType :: TcType -> TcType -> Bool+tcEqType :: HasDebugCallStack => TcType -> TcType -> Bool -- tcEqType is a proper implements the same Note [Non-trivial definitional -- equality] (in TyCoRep) as `eqType`, but Type.eqType believes (* == -- Constraint), and that is NOT what we want in the type checker!@@ -1947,6 +2034,7 @@            EqPred NomEq ty1 ty2  -> quant_fun ty1 || quant_fun ty2           IrredPred ty          -> tyCoVarsOfType ty `intersectsVarSet` qtvs+          ForAllPred {}         -> False      pick_cls_pred flex_ctxt cls tys       = tyCoVarsOfTypes tys `intersectsVarSet` qtvs@@ -2051,7 +2139,42 @@       EqPred ReprEq _ _  -> False       ClassPred cls _    -> classHasFds cls       IrredPred {}       -> True -- Might have equalities after reduction?+      ForAllPred {}      -> False +-- | Is the equality+--        a ~r ...a....+-- definitely insoluble or not?+--      a ~r Maybe a      -- Definitely insoluble+--      a ~N ...(F a)...  -- Not definitely insoluble+--                        -- Perhaps (F a) reduces to Int+--      a ~R ...(N a)...  -- Not definitely insoluble+--                        -- Perhaps newtype N a = MkN Int+-- See Note [Occurs check error] in+-- TcCanonical for the motivation for this function.+isInsolubleOccursCheck :: EqRel -> TcTyVar -> TcType -> Bool+isInsolubleOccursCheck eq_rel tv ty+  = go ty+  where+    go ty | Just ty' <- tcView ty = go ty'+    go (TyVarTy tv') = tv == tv' || go (tyVarKind tv')+    go (LitTy {})    = False+    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 (ForAllTy (TvBndr tv' _) inner_ty)+      | tv' == tv = False+      | otherwise = go (tyVarKind tv') || go inner_ty+    go (CastTy ty _)  = go ty   -- ToDo: what about the coercion+    go (CoercionTy _) = False   -- ToDo: what about the coercion+    go (TyConApp tc tys)+      | isGenerativeTyCon tc role = any go tys+      | otherwise                 = any go (drop (tyConArity tc) tys)+         -- (a ~ F b a), where F has arity 1,+         -- has an insoluble occurs check++    role = eqRelRole eq_rel+ {- Note [Expanding superclasses] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we expand superclasses, we use the following algorithm:@@ -2123,7 +2246,7 @@  ************************************************************************ *                                                                      *-\subsection{Predicates}+      Classifying types *                                                                      * ************************************************************************ -}@@ -2225,40 +2348,7 @@ isTyVarHead _  (FunTy {})      = False isTyVarHead _  (CoercionTy {}) = False --- | Is the equality---        a ~r ...a....--- definitely insoluble or not?---      a ~r Maybe a      -- Definitely insoluble---      a ~N ...(F a)...  -- Not definitely insoluble---                        -- Perhaps (F a) reduces to Int---      a ~R ...(N a)...  -- Not definitely insoluble---                        -- Perhaps newtype N a = MkN Int--- See Note [Occurs check error] in--- TcCanonical for the motivation for this function.-isInsolubleOccursCheck :: EqRel -> TcTyVar -> TcType -> Bool-isInsolubleOccursCheck eq_rel tv ty-  = go ty-  where-    go ty | Just ty' <- tcView ty = go ty'-    go (TyVarTy tv') = tv == tv' || go (tyVarKind tv')-    go (LitTy {})    = False-    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 (ForAllTy (TvBndr tv' _) inner_ty)-      | tv' == tv = False-      | otherwise = go (tyVarKind tv') || go inner_ty-    go (CastTy ty _)  = go ty   -- ToDo: what about the coercion-    go (CoercionTy _) = False   -- ToDo: what about the coercion-    go (TyConApp tc tys)-      | isGenerativeTyCon tc role = any go tys-      | otherwise                 = any go (drop (tyConArity tc) tys)-         -- (a ~ F b a), where F has arity 1,-         -- has an insoluble occurs check -    role = eqRelRole eq_rel- {- Note [AppTy and ReprEq] ~~~~~~~~~~~~~~~~~~~~~~~~~~ Consider   a ~R# b a@@ -2278,56 +2368,6 @@   | isForAllTy ty                           = True   | otherwise                               = False -{--************************************************************************-*                                                                      *-\subsection{Transformation of Types to TcTypes}-*                                                                      *-************************************************************************--}--toTcType :: Type -> TcType--- The constraint solver expects EvVars to have TcType, in which the--- free type variables are TcTyVars. So we convert from Type to TcType here--- A bit tiresome; but one day I expect the two types to be entirely separate--- in which case we'll definitely need to do this-toTcType = runIdentity . to_tc_type emptyVarSet--toTcTypeBag :: Bag EvVar -> Bag EvVar -- All TyVars are transformed to TcTyVars-toTcTypeBag evvars = mapBag (\tv -> setTyVarKind tv (toTcType (tyVarKind tv))) evvars--to_tc_mapper :: TyCoMapper VarSet Identity-to_tc_mapper-  = TyCoMapper { tcm_smart    = False   -- more efficient not to use smart ctors-               , tcm_tyvar    = tyvar-               , tcm_covar    = covar-               , tcm_hole     = hole-               , tcm_tybinder = tybinder }-  where-    tyvar :: VarSet -> TyVar -> Identity Type-    tyvar ftvs tv-      | Just var <- lookupVarSet ftvs tv = return $ TyVarTy var-      | isTcTyVar tv = TyVarTy <$> updateTyVarKindM (to_tc_type ftvs) tv-      | otherwise-      = do { kind' <- to_tc_type ftvs (tyVarKind tv)-           ; return $ TyVarTy $ mkTcTyVar (tyVarName tv) kind' vanillaSkolemTv }--    covar :: VarSet -> CoVar -> Identity Coercion-    covar ftvs cv-      | Just var <- lookupVarSet ftvs cv = return $ CoVarCo var-      | otherwise = CoVarCo <$> updateVarTypeM (to_tc_type ftvs) cv--    hole :: VarSet -> CoercionHole -> Identity Coercion-    hole _ hole = pprPanic "toTcType: found a coercion hole" (ppr hole)--    tybinder :: VarSet -> TyVar -> ArgFlag -> Identity (VarSet, TyVar)-    tybinder ftvs tv _vis = do { kind' <- to_tc_type ftvs (tyVarKind tv)-                               ; let tv' = mkTcTyVar (tyVarName tv) kind'-                                                     vanillaSkolemTv-                               ; return (ftvs `extendVarSet` tv', tv') }--to_tc_type :: VarSet -> Type -> Identity TcType-to_tc_type = mapType to_tc_mapper  {- ************************************************************************
typecheck/TcTypeNats.hs view
@@ -949,7 +949,7 @@   -{- | Compute the the n-th root of a natural number, rounded down to+{- | Compute the n-th root of a natural number, rounded down to the closest natural number.  The boolean indicates if the result is exact (i.e., True means no rounding was done, False means rounded down). The second argument specifies which root we are computing. -}
typecheck/TcTypeable.hs view
@@ -12,7 +12,7 @@  import GhcPrelude -import BasicTypes ( Boxity(..), neverInlinePragma )+import BasicTypes ( Boxity(..), neverInlinePragma, SourceText(..) ) import TcBinds( addTypecheckedBinds ) import IfaceEnv( newGlobalBinder ) import TyCoRep( Type(..), TyLit(..) )@@ -37,7 +37,7 @@ import DynFlags import Bag import Var ( TyVarBndr(..) )-import TrieMap+import CoreMap import Constants import Fingerprint(Fingerprint(..), fingerprintString, fingerprintFingerprints) import Outputable@@ -631,12 +631,12 @@                                                    ]      int :: Int -> HsLit GhcTc-    int n = HsIntPrim (sourceText $ show n) (toInteger n)+    int n = HsIntPrim (SourceText $ show n) (toInteger n)  word64 :: DynFlags -> Word64 -> HsLit GhcTc word64 dflags n-  | wORD_SIZE dflags == 4 = HsWord64Prim noSourceText (toInteger n)-  | otherwise             = HsWordPrim   noSourceText (toInteger n)+  | wORD_SIZE dflags == 4 = HsWord64Prim NoSourceText (toInteger n)+  | otherwise             = HsWordPrim   NoSourceText (toInteger n)  {- Note [Representing TyCon kinds: KindRep]
typecheck/TcUnify.hs view
@@ -13,7 +13,8 @@   tcWrapResult, tcWrapResultO, tcSkolemise, tcSkolemiseET,   tcSubTypeHR, tcSubTypeO, tcSubType_NC, tcSubTypeDS,   tcSubTypeDS_NC_O, tcSubTypeET,-  checkConstraints, buildImplicationFor,+  checkConstraints, checkTvConstraints,+  buildImplicationFor,    -- Various unifications   unifyType, unifyTheta, unifyKind,@@ -24,15 +25,13 @@   -- Holes   tcInferInst, tcInferNoInst,   matchExpectedListTy,-  matchExpectedPArrTy,   matchExpectedTyConApp,   matchExpectedAppTy,   matchExpectedFunTys,   matchActualFunTys, matchActualFunTysPart,   matchExpectedFunKind, -  occCheckExpand, metaTyVarUpdateOK,-  occCheckForErrors, OccCheckResult(..)+  metaTyVarUpdateOK, occCheckForErrors, OccCheckResult(..)    ) where @@ -48,7 +47,7 @@ import Type import Coercion import TcEvidence-import Name ( isSystemName )+import Name( isSystemName ) import Inst import TyCon import TysWiredIn@@ -61,7 +60,6 @@ import BasicTypes import Bag import Util-import Pair( pFst ) import qualified GHC.LanguageExtensions as LangExt import Outputable @@ -361,13 +359,6 @@  = do { (co, [elt_ty]) <- matchExpectedTyConApp listTyCon exp_ty       ; return (co, elt_ty) } ------------------------matchExpectedPArrTy :: TcRhoType -> TcM (TcCoercionN, TcRhoType)--- Special case for parrs-matchExpectedPArrTy exp_ty-  = do { (co, [elt_ty]) <- matchExpectedTyConApp parrTyCon exp_ty-       ; return (co, elt_ty) }- --------------------- matchExpectedTyConApp :: TyCon                -- T :: forall kv1 ... kvm. k1 -> ... -> kn -> *                       -> TcRhoType            -- orig_ty@@ -565,7 +556,13 @@  tcSubTypeET _ _ (Infer inf_res) ty_expected   = ASSERT2( not (ir_inst inf_res), ppr inf_res $$ ppr ty_expected )-    do { co <- fillInferResult ty_expected inf_res+      -- An (Infer inf_res) ExpSigmaType passed into tcSubTypeET never+      -- has the ir_inst field set.  Reason: in patterns (which is what+      -- tcSubTypeET is used for) do not agressively instantiate+    do { co <- fill_infer_result ty_expected inf_res+               -- Since ir_inst is false, we can skip fillInferResult+               -- and go straight to fill_infer_result+        ; return (mkWpCastN (mkTcSymCo co)) }  ------------------------@@ -638,7 +635,7 @@ -- ty_expected is deeply skolemised tcSubTypeDS_NC_O inst_orig ctxt m_thing ty_actual ty_expected   = case ty_expected of-      Infer inf_res -> fillInferResult_Inst inst_orig ty_actual inf_res+      Infer inf_res -> fillInferResult inst_orig ty_actual inf_res       Check ty      -> tc_sub_type_ds eq_orig inst_orig ctxt ty_actual ty          where            eq_orig = TypeEqOrigin { uo_actual = ty_actual, uo_expected = ty@@ -852,24 +849,24 @@        ; res_ty <- readExpType res_ty        ; return (result, res_ty) } -fillInferResult_Inst :: CtOrigin -> TcType -> InferResult -> TcM HsWrapper--- If wrap = fillInferResult_Inst t1 t2+fillInferResult :: CtOrigin -> TcType -> InferResult -> TcM HsWrapper+-- If wrap = fillInferResult t1 t2 --    => wrap :: t1 ~> t2 -- See Note [Deep instantiation of InferResult]-fillInferResult_Inst orig ty inf_res@(IR { ir_inst = instantiate_me })+fillInferResult orig ty inf_res@(IR { ir_inst = instantiate_me })   | instantiate_me   = do { (wrap, rho) <- deeplyInstantiate orig ty-       ; co <- fillInferResult rho inf_res+       ; co <- fill_infer_result rho inf_res        ; return (mkWpCastN co <.> wrap) }    | otherwise-  = do { co <- fillInferResult ty inf_res+  = do { co <- fill_infer_result ty inf_res        ; return (mkWpCastN co) } -fillInferResult :: TcType -> InferResult -> TcM TcCoercionN--- If wrap = fillInferResult t1 t2+fill_infer_result :: TcType -> InferResult -> TcM TcCoercionN+-- If wrap = fill_infer_result t1 t2 --    => wrap :: t1 ~> t2-fillInferResult orig_ty (IR { ir_uniq = u, ir_lvl = res_lvl+fill_infer_result orig_ty (IR { ir_uniq = u, ir_lvl = res_lvl                             , ir_ref = ref })   = do { (ty_co, ty_to_fill_with) <- promoteTcType res_lvl orig_ty @@ -886,7 +883,7 @@       = do { let ty_lvl = tcTypeLevel ty            ; MASSERT2( not (ty_lvl `strictlyDeeperThan` res_lvl),                        ppr u $$ ppr res_lvl $$ ppr ty_lvl $$-                       ppr ty <+> ppr (typeKind ty) $$ ppr orig_ty )+                       ppr ty <+> dcolon <+> ppr (typeKind ty) $$ ppr orig_ty )            ; cts <- readTcRef ref            ; case cts of                Just already_there -> pprPanic "writeExpType"@@ -910,7 +907,7 @@     f :: forall {a}. a -> forall b. Num b => b -> b -> b   This is surely confusing for users. -  And worse, the the monomorphism restriction won't properly. The MR is+  And worse, the monomorphism restriction won't 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.@@ -1118,30 +1115,45 @@                  -> TcM (TcEvBinds, result)  checkConstraints skol_info skol_tvs given thing_inside-  = do { (implics, ev_binds, result)-            <- buildImplication skol_info skol_tvs given thing_inside-       ; emitImplications implics-       ; return (ev_binds, result) }--buildImplication :: SkolemInfo-                 -> [TcTyVar]           -- Skolems-                 -> [EvVar]             -- Given-                 -> TcM result-                 -> TcM (Bag Implication, TcEvBinds, result)-buildImplication skol_info skol_tvs given thing_inside   = do { implication_needed <- implicationNeeded skol_tvs given         ; if implication_needed          then do { (tclvl, wanted, result) <- pushLevelAndCaptureConstraints thing_inside                  ; (implics, ev_binds) <- buildImplicationFor tclvl skol_info skol_tvs given wanted-                 ; return (implics, ev_binds, result) }+                 ; traceTc "checkConstraints" (ppr tclvl $$ ppr skol_tvs)+                 ; emitImplications implics+                 ; return (ev_binds, result) }           else -- Fast path.  We check every function argument with               -- tcPolyExpr, which uses tcSkolemise and hence checkConstraints.               -- So this fast path is well-exercised               do { res <- thing_inside-                 ; return (emptyBag, emptyTcEvBinds, res) } }+                 ; return (emptyTcEvBinds, res) } } +checkTvConstraints :: SkolemInfo+                   -> Maybe SDoc  -- User-written telescope, if present+                   -> TcM ([TcTyVar], result)+                   -> TcM ([TcTyVar], result)++checkTvConstraints skol_info m_telescope thing_inside+  = do { (tclvl, wanted, (skol_tvs, result))+             <- pushLevelAndCaptureConstraints thing_inside++       ; if isEmptyWC wanted+         then return ()+         else do { ev_binds <- newNoTcEvBinds+                 ; implic   <- newImplication+                 ; emitImplication $+                   implic { ic_tclvl     = tclvl+                          , ic_skols     = skol_tvs+                          , ic_no_eqs    = True+                          , ic_telescope = m_telescope+                          , ic_wanted    = wanted+                          , ic_binds     = ev_binds+                          , ic_info      = skol_info } }+       ; return (skol_tvs, result) }++ implicationNeeded :: [TcTyVar] -> [EvVar] -> TcM Bool -- With the solver producing unlifted equalities, we need -- to have an EvBindsVar for them when they might be deferred to@@ -1177,18 +1189,21 @@   = return (emptyBag, emptyTcEvBinds)    | otherwise-  = ASSERT2( all isSkolemTyVar skol_tvs, ppr skol_tvs )+  = ASSERT2( all (isSkolemTyVar <||> isSigTyVar) skol_tvs, ppr skol_tvs )+      -- Why allow SigTvs? Because implicitly declared kind variables in+      -- non-CUSK type declarations are SigTvs, and we need to bring them+      -- into scope as a skolem in an implication. This is OK, though,+      -- because SigTvs will always remain tyvars, even after unification.     do { ev_binds_var <- newTcEvBinds-       ; env <- getLclEnv-       ; let implic = newImplication { ic_tclvl  = tclvl-                                     , ic_skols  = skol_tvs-                                     , ic_given  = given-                                     , ic_wanted = wanted-                                     , ic_binds  = ev_binds_var-                                     , ic_env    = env-                                     , ic_info   = skol_info }+       ; implic <- newImplication+       ; let implic' = implic { ic_tclvl  = tclvl+                              , ic_skols  = skol_tvs+                              , ic_given  = given+                              , ic_wanted = wanted+                              , ic_binds  = ev_binds_var+                              , ic_info   = skol_info } -       ; return (unitBag implic, TcEvBinds ev_binds_var) }+       ; return (unitBag implic', TcEvBinds ev_binds_var) }  {- ************************************************************************@@ -1309,6 +1324,14 @@       | tc1 == tc2       = return $ mkReflCo Nominal ty1 +    go (CastTy t1 co1) t2+      = do { co_tys <- go t1 t2+           ; return (mkCoherenceLeftCo co_tys co1) }++    go t1 (CastTy t2 co2)+      = do { co_tys <- go t1 t2+           ; return (mkCoherenceRightCo co_tys co2) }+         -- See Note [Expanding synonyms during unification]         --         -- Also NB that we recurse to 'go' so that we don't push a@@ -1321,14 +1344,6 @@       | Just ty1' <- tcView ty1 = go ty1' ty2       | Just ty2' <- tcView ty2 = go ty1  ty2' -    go (CastTy t1 co1) t2-      = do { co_tys <- go t1 t2-           ; return (mkCoherenceLeftCo co_tys co1) }--    go t1 (CastTy t2 co2)-      = do { co_tys <- go t1 t2-           ; return (mkCoherenceRightCo co_tys co2) }-         -- Functions (or predicate functions) just check the two parts     go (FunTy fun1 arg1) (FunTy fun2 arg2)       = do { co_l <- uType t_or_k origin fun1 fun2@@ -1443,6 +1458,9 @@    more likely that the inferred types will mention type synonyms    understandable to the user + * Similarly, we expand *after* the CastTy case, just in case the+   CastTy wraps a variable.+  * We expand *before* the TyConApp case.  For example, if we have       type Phantom a = Int    and are unifying@@ -1572,64 +1590,113 @@  swapOverTyVars :: TcTyVar -> TcTyVar -> Bool swapOverTyVars tv1 tv2-  | isFmvTyVar tv1 = False  -- See Note [Fmv Orientation Invariant]-  | isFmvTyVar tv2 = True--  | Just lvl1 <- metaTyVarTcLevel_maybe tv1-      -- If tv1 is touchable, swap only if tv2 is also-      -- touchable and it's strictly better to update the latter-      -- But see Note [Avoid unnecessary swaps]-  = case metaTyVarTcLevel_maybe tv2 of-      Nothing   -> False-      Just lvl2 | lvl2 `strictlyDeeperThan` lvl1 -> True-                | lvl1 `strictlyDeeperThan` lvl2 -> False-                | otherwise                      -> nicer_to_update tv2--  -- So tv1 is not a meta tyvar-  -- If only one is a meta tyvar, put it on the left-  -- This is not because it'll be solved; but because-  -- the floating step looks for meta tyvars on the left-  | isMetaTyVar tv2 = True+  -- Level comparison: see Note [TyVar/TyVar orientation]+  | lvl1 `strictlyDeeperThan` lvl2 = False+  | lvl2 `strictlyDeeperThan` lvl1 = True -  -- So neither is a meta tyvar (including FlatMetaTv)+  -- Priority: see Note [TyVar/TyVar orientation]+  | pri1 > pri2 = False+  | pri2 > pri1 = True -  -- If only one is a flatten skolem, put it on the left-  -- See Note [Eliminate flat-skols]-  | not (isFlattenTyVar tv1), isFlattenTyVar tv2 = True+  -- Names: see Note [TyVar/TyVar orientation]+  | isSystemName tv2_name, not (isSystemName tv1_name) = True    | otherwise = False    where-    nicer_to_update tv2-      =  (isSigTyVar tv1                 && not (isSigTyVar tv2))-      || (isSystemName (Var.varName tv2) && not (isSystemName (Var.varName tv1)))+    lvl1 = tcTyVarLevel tv1+    lvl2 = tcTyVarLevel tv2+    pri1 = lhsPriority tv1+    pri2 = lhsPriority tv2+    tv1_name = Var.varName tv1+    tv2_name = Var.varName tv2 --- @trySpontaneousSolve wi@ solves equalities where one side is a--- touchable unification variable.--- Returns True <=> spontaneous solve happened-canSolveByUnification :: TcLevel -> TcTyVar -> TcType -> Bool-canSolveByUnification tclvl tv xi-  | isTouchableMetaTyVar tclvl tv-  = case metaTyVarInfo tv of-      SigTv -> is_tyvar xi-      _     -> True -  | otherwise    -- Untouchable-  = False-  where-    is_tyvar xi-      = case tcGetTyVar_maybe xi of-          Nothing -> False-          Just tv -> case tcTyVarDetails tv of-                       MetaTv { mtv_info = info }-                                   -> case info of-                                        SigTv -> True-                                        _     -> False-                       SkolemTv {} -> True-                       RuntimeUnk  -> True+lhsPriority :: TcTyVar -> Int+-- Higher => more important to be on the LHS+-- See Note [TyVar/TyVar orientation]+lhsPriority tv+  = ASSERT2( isTyVar tv, ppr tv)+    case tcTyVarDetails tv of+      RuntimeUnk  -> 0+      SkolemTv {} -> 0+      MetaTv { mtv_info = info } -> case info of+                                     FlatSkolTv -> 1+                                     SigTv      -> 2+                                     TauTv      -> 3+                                     FlatMetaTv -> 4+{- Note [TyVar/TyVar orientation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given (a ~ b), should we orient the CTyEqCan as (a~b) or (b~a)?+This is a surprisingly tricky question! -{- Note [Fmv Orientation Invariant]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+First note: only swap if you have to!+   See Note [Avoid unnecessary swaps]++So we look for a positive reason to swap, using a three-step test:++* Level comparison. If 'a' has deeper level than 'b',+  put 'a' on the left.  See Note [Deeper level on the left]++* Priority.  If the levels are the same, look at what kind of+  type variable it is, using 'lhsPriority'++  - FlatMetaTv: Always put on the left.+    See Note [Fmv Orientation Invariant]+    NB: FlatMetaTvs always have the current level, never an+        outer one.  So nothing can be deeper than a FlatMetaTv+++  - SigTv/TauTv:  if we have  sig_tv ~ tau_tv, put tau_tv+                  on the left because there are fewer+                  restrictions on updating TauTvs++  - SigTv/TauTv:  put on the left eitehr+     a) Because it's touchable and can be unified, or+     b) Even if it's not touchable, TcSimplify.floatEqualities+        looks for meta tyvars on the left++  - FlatSkolTv: Put on the left in preference to a SkolemTv+                See Note [Eliminate flat-skols]++* Names. If the level and priority comparisons are all+  equal, try to eliminate a TyVars with a System Name in+  favour of ones with a Name derived from a user type signature++* Age.  At one point in the past we tried to break any remaining+  ties by eliminating the younger type variable, based on their+  Uniques.  See Note [Eliminate younger unification variables]+  (which also explains why we don't do this any more)++Note [Deeper level on the left]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+The most important thing is that we want to put tyvars with+the deepest level on the left.  The reason to do so differs for+Wanteds and Givens, but either way, deepest wins!  Simple.++* Wanteds.  Putting the deepest variable on the left maximise the+  chances that it's a touchable meta-tyvar which can be solved.++* Givens. Suppose we have something like+     forall a[2]. b[1] ~ a[2] => beta[1] ~ a[2]++  If we orient the Given a[2] on the left, we'll rewrite the Wanted to+  (beta[1] ~ b[1]), and that can float out of the implication.+  Otherwise it can't.  By putting the deepest variable on the left+  we maximise our changes of elminating skolem capture.++  See also TcSMonad Note [Let-bound skolems] for another reason+  to orient with the deepest skolem on the left.++  IMPORTANT NOTE: this test does a level-number comparison on+  skolems, so it's important that skolems have (accurate) level+  numbers.++See Trac #15009 for an further analysis of why "deepest on the left"+is a good plan.++Note [Fmv Orientation Invariant]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    * We always orient a constraint         fmv ~ alpha      with fmv on the left, even if alpha is@@ -1662,14 +1729,88 @@           [WD] F fmv ~ fmv, [WD] fmv ~ a     And now we are stuck. -So instead the Fmv Orientation Invariant puts te fmv on the+So instead the Fmv Orientation Invariant puts the fmv on the left, giving       [WD] fmv ~ alpha, [WD] F alpha ~ fmv, [WD] alpha ~ a      Now we get alpha:=a, and everything works out -Note [Prevent unification with type families]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Note [Eliminate flat-skols]+~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have  [G] Num (F [a])+then we flatten to+     [G] Num fsk+     [G] F [a] ~ fsk+where fsk is a flatten-skolem (FlatSkolTv). Suppose we have+      type instance F [a] = a+then we'll reduce the second constraint to+     [G] a ~ fsk+and then replace all uses of 'a' with fsk.  That's bad because+in error messages intead 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.++Solution: re-orient a~fsk to fsk~a, so that we preferentially eliminate+the fsk.++Note [Avoid unnecessary swaps]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+If we swap without actually improving matters, we can get an infinite loop.+Consider+    work item:  a ~ b+   inert item:  b ~ c+We canonicalise the work-item to (a ~ c).  If we then swap it before+adding to the inert set, we'll add (c ~ a), and therefore kick out the+inert guy, so we get+   new work item:  b ~ c+   inert item:     c ~ a+And now the cycle just repeats++Note [Eliminate younger unification variables]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Given a choice of unifying+     alpha := beta   or   beta := alpha+we try, if possible, to elimiate the "younger" one, as determined+by `ltUnique`.  Reason: the younger one is less likely to appear free in+an existing inert constraint, and hence we are less likely to be forced+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!++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+to the compiler's performance, so I didn't take it any further.  Still+it seemed to too nice to discard altogether, so I'm leaving these+notes.  SLPJ Jan 18.+-}++-- @trySpontaneousSolve wi@ solves equalities where one side is a+-- touchable unification variable.+-- Returns True <=> spontaneous solve happened+canSolveByUnification :: TcLevel -> TcTyVar -> TcType -> Bool+canSolveByUnification tclvl tv xi+  | isTouchableMetaTyVar tclvl tv+  = case metaTyVarInfo tv of+      SigTv -> is_tyvar xi+      _     -> True++  | otherwise    -- Untouchable+  = False+  where+    is_tyvar xi+      = case tcGetTyVar_maybe xi of+          Nothing -> False+          Just tv -> case tcTyVarDetails tv of+                       MetaTv { mtv_info = info }+                                   -> case info of+                                        SigTv -> True+                                        _     -> False+                       SkolemTv {} -> True+                       RuntimeUnk  -> True++{- Note [Prevent unification with type families]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We prevent unification with type families because of an uneasy compromise. It's perfectly sound to unify with type families, and it even improves the error messages in the testsuite. It also modestly improves performance, at@@ -1796,7 +1937,7 @@ Note [Unifying untouchables] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We treat an untouchable type variable as if it was a skolem.  That-ensures it won't unify with anything.  It's a slight had, because+ensures it won't unify with anything.  It's a slight hack, because we return a made-up TcTyVarDetails, but I think it works smoothly. -} @@ -1840,34 +1981,8 @@ ********************************************************************* -}  -{- 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.--The two variants of the function are to support TcUnify.checkTauTvUpdate,-which wants to prevent unification with type families. For more on this-point, see Note [Prevent unification with type families] in TcUnify.--Note [Occurrence checking: look inside kinds]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+{-  Note [Occurrence checking: look inside kinds]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Suppose we are considering unifying    (alpha :: *)  ~  Int -> (beta :: alpha -> alpha) This may be an error (what is that alpha doing inside beta's kind?),@@ -1938,7 +2053,7 @@   = case preCheck dflags True tv ty of       OC_OK _   -> OC_OK ()       OC_Bad    -> OC_Bad-      OC_Occurs -> case occCheckExpand tv ty of+      OC_Occurs -> case occCheckExpand [tv] ty of                      Nothing -> OC_Occurs                      Just _  -> OC_OK () @@ -1976,7 +2091,7 @@          -- See Note [Prevent unification with type families]       OC_OK _   -> Just ty       OC_Bad    -> Nothing  -- forall or type function-      OC_Occurs -> occCheckExpand tv ty+      OC_Occurs -> occCheckExpand [tv] ty  preCheck :: DynFlags -> Bool -> TcTyVar -> TcType -> OccCheckResult () -- A quick check for@@ -2036,121 +2151,6 @@       | not (impredicative_ok || isTauTyCon tc)     = True       | not (ty_fam_ok        || isFamFreeTyCon tc) = True       | otherwise                                   = False--occCheckExpand :: TcTyVar -> TcType -> Maybe TcType--- 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 tv ty-  = go emptyVarEnv ty-  where-    go :: VarEnv TyVar -> Type -> Maybe Type-          -- The VarEnv carries mappings necessary-          -- because of kind expansion-    go env (TyVarTy tv')-      | tv == tv'                         = Nothing-      | Just tv'' <- lookupVarEnv env tv' = return (mkTyVarTy tv'')-      | otherwise                         = do { tv'' <- go_var env tv'-                                               ; return (mkTyVarTy tv'') }--    go _   ty@(LitTy {}) = return ty-    go env (AppTy ty1 ty2) = do { ty1' <- go env ty1-                                ; ty2' <- go env ty2-                                ; return (mkAppTy ty1' ty2') }-    go env (FunTy ty1 ty2) = do { ty1' <- go env ty1-                                ; ty2' <- go env ty2-                                ; return (mkFunTy ty1' ty2') }-    go env ty@(ForAllTy (TvBndr tv' vis) body_ty)-       | tv == tv'         = return ty-       | otherwise         = do { ki' <- go env (tyVarKind tv')-                                ; let tv'' = setTyVarKind tv' ki'-                                      env' = extendVarEnv env tv' tv''-                                ; body' <- go env' body_ty-                                ; return (ForAllTy (TvBndr 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 env ty@(TyConApp tc tys)-      = case mapM (go env) tys of-          Just tys' -> return (mkTyConApp tc tys')-          Nothing | Just ty' <- tcView ty -> go env ty'-                  | otherwise             -> Nothing-                      -- Failing that, try to expand a synonym--    go env (CastTy ty co) =  do { ty' <- go env ty-                                ; co' <- go_co env co-                                ; return (mkCastTy ty' co') }-    go env (CoercionTy co) = do { co' <- go_co env co-                                ; return (mkCoercionTy co') }--    -------------------    go_var env v = do { k' <- go env (varType v)-                      ; return (setVarType v k') }-           -- Works for TyVar and CoVar-           -- See Note [Occurrence checking: look inside kinds]--    -------------------    go_co env (Refl r ty)               = do { ty' <- go env ty-                                             ; return (mkReflCo r ty') }-      -- Note: Coercions do not contain type synonyms-    go_co env (TyConAppCo r tc args)    = do { args' <- mapM (go_co env) args-                                             ; return (mkTyConAppCo r tc args') }-    go_co env (AppCo co arg)            = do { co' <- go_co env co-                                             ; arg' <- go_co env arg-                                             ; return (mkAppCo co' arg') }-    go_co env co@(ForAllCo tv' kind_co body_co)-      | tv == tv'         = return co-      | otherwise         = do { kind_co' <- go_co env kind_co-                               ; let tv'' = setTyVarKind tv' $-                                            pFst (coercionKind kind_co')-                                     env' = extendVarEnv env tv' tv''-                               ; body' <- go_co env' body_co-                               ; return (ForAllCo tv'' kind_co' body') }-    go_co env (FunCo r co1 co2)         = do { co1' <- go_co env co1-                                             ; co2' <- go_co env co2-                                             ; return (mkFunCo r co1' co2') }-    go_co env (CoVarCo c)               = do { c' <- go_var env c-                                             ; return (mkCoVarCo c') }-    go_co env (HoleCo h)                = do { c' <- go_var env (ch_co_var h)-                                             ; return (HoleCo (h { ch_co_var = c' })) }-    go_co env (AxiomInstCo ax ind args) = do { args' <- mapM (go_co env) args-                                             ; return (mkAxiomInstCo ax ind args') }-    go_co env (UnivCo p r ty1 ty2)      = do { p' <- go_prov env p-                                             ; ty1' <- go env ty1-                                             ; ty2' <- go env ty2-                                             ; return (mkUnivCo p' r ty1' ty2') }-    go_co env (SymCo co)                = do { co' <- go_co env co-                                             ; return (mkSymCo co') }-    go_co env (TransCo co1 co2)         = do { co1' <- go_co env co1-                                             ; co2' <- go_co env co2-                                             ; return (mkTransCo co1' co2') }-    go_co env (NthCo n co)              = do { co' <- go_co env co-                                             ; return (mkNthCo n co') }-    go_co env (LRCo lr co)              = do { co' <- go_co env co-                                             ; return (mkLRCo lr co') }-    go_co env (InstCo co arg)           = do { co' <- go_co env co-                                             ; arg' <- go_co env arg-                                             ; return (mkInstCo co' arg') }-    go_co env (CoherenceCo co1 co2)     = do { co1' <- go_co env co1-                                             ; co2' <- go_co env co2-                                             ; return (mkCoherenceCo co1' co2') }-    go_co env (KindCo co)               = do { co' <- go_co env co-                                             ; return (mkKindCo co') }-    go_co env (SubCo co)                = do { co' <- go_co env co-                                             ; return (mkSubCo co') }-    go_co env (AxiomRuleCo ax cs)       = do { cs' <- mapM (go_co env) cs-                                             ; return (mkAxiomRuleCo ax cs') }--    -------------------    go_prov _   UnsafeCoerceProv    = return UnsafeCoerceProv-    go_prov env (PhantomProv co)    = PhantomProv <$> go_co env co-    go_prov env (ProofIrrelProv co) = ProofIrrelProv <$> go_co env co-    go_prov _   p@(PluginProv _)    = return p  canUnifyWithPolyType :: DynFlags -> TcTyVarDetails -> Bool canUnifyWithPolyType dflags details
typecheck/TcValidity.hs view
@@ -10,11 +10,11 @@   ContextKind(..), expectedKindInCtxt,   checkValidTheta, checkValidFamPats,   checkValidInstance, checkValidInstHead, validDerivPred,-  checkInstTermination, checkTySynRhs,+  checkTySynRhs,   ClsInstInfo, checkValidCoAxiom, checkValidCoAxBranch,   checkValidTyFamEqn,   arityErr, badATErr,-  checkValidTelescope, checkZonkValidTelescope, checkValidInferredKinds,+  checkValidTelescope,   allDistinctTyVars   ) where @@ -29,11 +29,9 @@ import TcSimplify ( simplifyAmbiguityCheck ) import TyCoRep import TcType hiding ( sizeType, sizeTypes )-import TcMType import PrelNames import Type import Coercion-import Kind import CoAxiom import Class import TyCon@@ -50,7 +48,6 @@ import Name import VarEnv import VarSet-import UniqSet import Var         ( TyVarBndr(..), mkTyVar ) import ErrUtils import DynFlags@@ -63,7 +60,7 @@ import qualified GHC.LanguageExtensions as LangExt  import Control.Monad-import Data.List        ( (\\) )+import Data.List        ( (\\), nub ) import qualified Data.List.NonEmpty as NE  {-@@ -338,6 +335,7 @@                  TySynCtxt _    -> rank0                   ExprSigCtxt    -> rank1+                 KindSigCtxt    -> rank1                  TypeAppCtxt | impred_flag -> ArbitraryRank                              | otherwise   -> tyConArgMonoType                     -- Normally, ImpredicativeTypes is handled in check_arg_type,@@ -354,6 +352,12 @@                  SpecInstCtxt   -> rank1                  ThBrackCtxt    -> rank1                  GhciCtxt       -> ArbitraryRank++                 TyVarBndrKindCtxt _ -> rank0+                 DataKindCtxt _      -> rank1+                 TySynKindCtxt _     -> rank1+                 TyFamResKindCtxt _  -> rank1+                  _              -> panic "checkValidType"                                           -- Can't happen; not used for *user* sigs @@ -379,10 +383,10 @@  checkTySynRhs :: UserTypeCtxt -> TcType -> TcM () checkTySynRhs ctxt ty-  | returnsConstraintKind actual_kind+  | tcReturnsConstraintKind actual_kind   = do { ck <- xoptM LangExt.ConstraintKinds        ; if ck-         then  when (isConstraintKind actual_kind)+         then  when (tcIsConstraintKind actual_kind)                     (do { dflags <- getDynFlags                         ; check_pred_ty emptyTidyEnv dflags ctxt ty })          else addErrTcM (constraintSynErr emptyTidyEnv actual_kind) }@@ -437,7 +441,8 @@ rankZeroMonoType   = MonoType (text "Perhaps you intended to use RankNTypes or Rank2Types") tyConArgMonoType   = MonoType (text "GHC doesn't yet support impredicative polymorphism") synArgMonoType     = MonoType (text "Perhaps you intended to use LiberalTypeSynonyms")-constraintMonoType = MonoType (text "A constraint must be a monotype")+constraintMonoType = MonoType (vcat [ text "A constraint must be a monotype"+                                    , text "Perhaps you intended to use QuantifiedConstraints" ])  funArgResRank :: Rank -> (Rank, Rank)             -- Function argument and result funArgResRank (LimitedRank _ arg_rank) = (arg_rank, LimitedRank (forAllAllowed arg_rank) arg_rank)@@ -457,7 +462,7 @@ -- Rank 0 means no for-alls anywhere  check_type env ctxt rank ty-  | not (null tvs && null theta)+  | not (null tvbs && null theta)   = do  { traceTc "check_type" (ppr ty $$ ppr (forAllAllowed rank))         ; checkTcM (forAllAllowed rank) (forAllTyErr env rank ty)                 -- Reject e.g. (Maybe (?x::Int => Int)),@@ -468,14 +473,18 @@                 -- but not   type T = ?x::Int          ; check_type env' ctxt rank tau      -- Allow foralls to right of arrow+         ; checkTcM (not (any (`elemVarSet` tyCoVarsOfType phi_kind) tvs))                    (forAllEscapeErr env' ty tau_kind)         }   where-    (tvs, theta, tau) = tcSplitSigmaTy ty-    tau_kind          = typeKind tau-    (env', _)         = tidyTyCoVarBndrs env tvs+    (tvbs, phi)  = tcSplitForAllTyVarBndrs ty+    (theta, tau) = tcSplitPhiTy phi +    tvs          = binderVars tvbs+    (env', _)    = tidyTyCoVarBndrs env tvs++    tau_kind              = typeKind tau     phi_kind | null theta = tau_kind              | otherwise  = liftedTypeKind         -- If there are any constraints, the kind is *. (#11405)@@ -489,7 +498,7 @@     (arg_rank, res_rank) = funArgResRank rank  check_type env ctxt rank (AppTy ty1 ty2)-  = do  { check_arg_type env ctxt rank ty1+  = do  { check_type env ctxt rank ty1         ; check_arg_type env ctxt rank ty2 }  check_type env ctxt rank ty@(TyConApp tc tys)@@ -613,7 +622,10 @@                  , text "of kind:" <+> ppr_tidy env tau_kind ]) )  ubxArgTyErr :: TidyEnv -> Type -> (TidyEnv, SDoc)-ubxArgTyErr env ty = (env, sep [text "Illegal unboxed tuple type as function argument:", ppr_tidy env ty])+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" ] )  {- Note [Liberal type synonyms]@@ -716,8 +728,13 @@ -- Check the validity of a predicate in a signature -- See Note [Validity checking for constraints] check_pred_ty env dflags ctxt pred-  = do { check_type env SigmaCtxt constraintMonoType pred+  = do { check_type env SigmaCtxt rank pred        ; check_pred_help False env dflags ctxt pred }+  where+    rank | xopt LangExt.QuantifiedConstraints dflags+         = ArbitraryRank+         | otherwise+         = constraintMonoType  check_pred_help :: Bool    -- True <=> under a type synonym                 -> TidyEnv@@ -727,19 +744,25 @@   | Just pred' <- tcView pred  -- Switch on under_syn when going under a                                  -- synonym (Trac #9838, yuk)   = check_pred_help True env dflags ctxt pred'-  | otherwise++  | otherwise  -- A bit like classifyPredType, but not the same+               -- E.g. we treat (~) like (~#); and we look inside tuples   = case splitTyConApp_maybe pred of       Just (tc, tys)         | isTupleTyCon tc         -> check_tuple_pred under_syn env dflags ctxt pred tys-           -- NB: this equality check must come first, because (~) is a class,-           -- too.+         | tc `hasKey` heqTyConKey ||           tc `hasKey` eqTyConKey ||           tc `hasKey` eqPrimTyConKey+          -- NB: this equality check must come first,+          --  because (~) is a class,too.         -> check_eq_pred env dflags pred tc tys+         | Just cls <- tyConClass_maybe tc-        -> check_class_pred env dflags ctxt pred cls tys  -- Includes Coercible+          -- Includes Coercible+        -> check_class_pred env dflags ctxt pred cls tys+       _ -> check_irred_pred under_syn env dflags ctxt pred  check_eq_pred :: TidyEnv -> DynFlags -> PredType -> TyCon -> [TcType] -> TcM ()@@ -910,12 +933,17 @@ okIPCtxt (TySynCtxt {})         = True   -- e.g.   type Blah = ?x::Int                                          -- Trac #11466 -okIPCtxt (ClassSCCtxt {})  = False-okIPCtxt (InstDeclCtxt {}) = False-okIPCtxt (SpecInstCtxt {}) = False-okIPCtxt (RuleSigCtxt {})  = False-okIPCtxt DefaultDeclCtxt   = False-okIPCtxt DerivClauseCtxt   = False+okIPCtxt (KindSigCtxt {})       = False+okIPCtxt (ClassSCCtxt {})       = False+okIPCtxt (InstDeclCtxt {})      = False+okIPCtxt (SpecInstCtxt {})      = False+okIPCtxt (RuleSigCtxt {})       = False+okIPCtxt DefaultDeclCtxt        = False+okIPCtxt DerivClauseCtxt        = False+okIPCtxt (TyVarBndrKindCtxt {}) = False+okIPCtxt (DataKindCtxt {})      = False+okIPCtxt (TySynKindCtxt {})     = False+okIPCtxt (TyFamResKindCtxt {})  = False  {- Note [Kind polymorphic type classes]@@ -1095,12 +1123,13 @@  tcInstHeadTyAppAllTyVars :: Type -> Bool -- Used in Haskell-98 mode, for the argument types of an instance head--- These must be a constructor applied to type variable arguments.+-- These must be a constructor applied to type variable arguments+-- or a type-level literal. -- But we allow kind instantiations. tcInstHeadTyAppAllTyVars ty   | Just (tc, tys) <- tcSplitTyConApp_maybe (dropCasts ty)   = ok (filterOutInvisibleTypes tc tys)  -- avoid kinds-+  | LitTy _ <- ty = True  -- accept type literals (Trac #13833)   | otherwise   = False   where@@ -1287,7 +1316,8 @@                    -> TcM ([TyVar], ThetaType, Class, [Type]) checkValidInstance ctxt hs_type ty   | not is_tc_app-  = failWithTc (text "Instance head is not headed by a class")+  = failWithTc (hang (text "Instance head is not headed by a class:")+                   2 ( ppr tau))    | isNothing mb_cls   = failWithTc (vcat [ text "Illegal instance for a" <+> ppr (tyConFlavour tc)@@ -1314,7 +1344,7 @@         ; undecidable_ok <- xoptM LangExt.UndecidableInstances         ; if undecidable_ok           then checkAmbiguity ctxt ty-          else checkInstTermination inst_tys theta+          else checkInstTermination theta tau          ; traceTc "cvi 2" (ppr ty) @@ -1356,63 +1386,87 @@     context has fewer type constructors than the head. -} -checkInstTermination :: [TcType] -> ThetaType -> TcM ()+checkInstTermination :: ThetaType -> TcPredType -> TcM () -- See Note [Paterson conditions]-checkInstTermination tys theta-  = check_preds theta+checkInstTermination theta head_pred+  = check_preds emptyVarSet theta   where-   head_fvs  = fvTypes tys-   head_size = sizeTypes tys+   head_fvs  = fvType head_pred+   head_size = sizeType head_pred -   check_preds :: [PredType] -> TcM ()-   check_preds preds = mapM_ check preds+   check_preds :: VarSet -> [PredType] -> TcM ()+   check_preds foralld_tvs preds = mapM_ (check foralld_tvs) preds -   check :: PredType -> TcM ()-   check pred+   check :: VarSet -> PredType -> TcM ()+   check foralld_tvs pred      = case classifyPredType pred of          EqPred {}    -> return ()  -- See Trac #4200.-         IrredPred {} -> check2 pred (sizeType pred)+         IrredPred {} -> check2 foralld_tvs pred (sizeType pred)          ClassPred cls tys            | isTerminatingClass cls            -> return ()             | isCTupleClass cls  -- Look inside tuple predicates; Trac #8359-           -> check_preds tys+           -> check_preds foralld_tvs tys -           | otherwise-           -> check2 pred (sizeTypes $ filterOutInvisibleTypes (classTyCon cls) tys)-                       -- Other ClassPreds+           | otherwise          -- Other ClassPreds+           -> check2 foralld_tvs pred bogus_size+           where+              bogus_size = 1 + sizeTypes (filterOutInvisibleTypes (classTyCon cls) tys)+                               -- See Note [Invisible arguments and termination] -   check2 pred pred_size-     | not (null bad_tvs)     = addErrTc (noMoreMsg bad_tvs what)-     | pred_size >= head_size = addErrTc (smallerMsg what)+         ForAllPred tvs theta' head_pred'+           -> do { check (foralld_tvs `extendVarSetList` binderVars tvs) head_pred'+                 ; addErrCtxt (text "In the quantified constraint"+                              <+> quotes (ppr pred)) $+                   checkInstTermination theta' head_pred' }++   check2 foralld_tvs pred pred_size+     | not (null bad_tvs)     = addErrTc (noMoreMsg bad_tvs what (ppr head_pred))+     | not (isTyFamFree pred) = addErrTc (nestedMsg what)+     | pred_size >= head_size = addErrTc (smallerMsg what (ppr head_pred))      | otherwise              = return ()+     -- isTyFamFree: see Note [Type families in instance contexts]      where         what    = text "constraint" <+> quotes (ppr pred)-        bad_tvs = fvType pred \\ head_fvs+        bad_tvs = filterOut (`elemVarSet` foralld_tvs) (fvType pred)+                  \\ head_fvs -smallerMsg :: SDoc -> SDoc-smallerMsg what+smallerMsg :: SDoc -> SDoc -> SDoc+smallerMsg what inst_head   = vcat [ hang (text "The" <+> what)-              2 (text "is no smaller than the instance head")+              2 (sep [ text "is no smaller than"+                     , text "the instance head" <+> quotes inst_head ])          , parens undecidableMsg ] -noMoreMsg :: [TcTyVar] -> SDoc -> SDoc-noMoreMsg tvs what-  = vcat [ hang (text "Variable" <> plural tvs <+> quotes (pprWithCommas ppr tvs)+noMoreMsg :: [TcTyVar] -> SDoc -> SDoc -> SDoc+noMoreMsg tvs what inst_head+  = vcat [ hang (text "Variable" <> plural tvs1 <+> quotes (pprWithCommas ppr tvs1)                 <+> occurs <+> text "more often")               2 (sep [ text "in the" <+> what-                     , text "than in the instance head" ])+                     , text "than in the instance head" <+> quotes inst_head ])          , parens undecidableMsg ]   where-   occurs = if isSingleton tvs then text "occurs"+   tvs1   = nub tvs+   occurs = if isSingleton tvs1 then text "occurs"                                else text "occur"  undecidableMsg, constraintKindsMsg :: SDoc undecidableMsg     = text "Use UndecidableInstances to permit this" constraintKindsMsg = text "Use ConstraintKinds to permit this" -{-+{- Note [Type families in instance contexts]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Are these OK?+  type family F a+  instance F a    => C (Maybe [a]) where ...+  intance C (F a) => C [[[a]]]     where ...++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.+ Note [Associated type instances] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We allow this:@@ -1524,6 +1578,20 @@       type F (k->k) (b::k->k) = Int But if the 'b' didn't scope, we would make F's instance too poly-kinded.++Note [Invisible arguments and termination]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When checking the ​Paterson conditions for termination an instance+declaration, we check for the number of "constructors and variables"+in the instance head and constraints. Question: Do we look at++ * All the arguments, visible or invisible?+ * Just the visible arguments?++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.+The suspicious bits are the calls to filterOutInvisibleTypes. -}  -- | Extra information about the parent instance declaration, needed@@ -1557,6 +1625,8 @@ checkConsistentFamInst Nothing _ _ _ = return () checkConsistentFamInst (Just (clas, inst_tvs, mini_env)) fam_tc at_tys pp_hs_pats   = do { -- Check that the associated type indeed comes from this class+         -- See [Mismatched class methods and associated type families]+         -- in TcInstDecls.          checkTc (Just clas == tyConAssoc_maybe fam_tc)                  (badATErr (className clas) (tyConName fam_tc)) @@ -1718,30 +1788,37 @@           -- We have a decidable instance unless otherwise permitted        ; undecidable_ok <- xoptM LangExt.UndecidableInstances+       ; traceTc "checkVTFE" (pp_lhs $$ ppr rhs $$ ppr (tcTyFamInsts rhs))        ; unless undecidable_ok $-           mapM_ addErrTc (checkFamInstRhs typats (tcTyFamInsts rhs)) }+           mapM_ addErrTc (checkFamInstRhs fam_tc typats (tcTyFamInsts rhs)) }  -- Make sure that each type family application is --   (1) strictly smaller than the lhs, --   (2) mentions no type variable more often than the lhs, and --   (3) does not contain any further type family instances. ---checkFamInstRhs :: [Type]                  -- lhs-                -> [(TyCon, [Type])]       -- type family instances+checkFamInstRhs :: TyCon -> [Type]         -- LHS+                -> [(TyCon, [Type])]       -- type family calls in RHS                 -> [MsgDoc]-checkFamInstRhs lhsTys famInsts+checkFamInstRhs lhs_tc lhs_tys famInsts   = mapMaybe check famInsts   where-   size = sizeTypes lhsTys-   fvs  = fvTypes lhsTys+   lhs_size  = sizeTyConAppArgs lhs_tc lhs_tys+   inst_head = pprType (TyConApp lhs_tc lhs_tys)+   lhs_fvs   = fvTypes lhs_tys    check (tc, tys)       | not (all isTyFamFree tys) = Just (nestedMsg what)-      | not (null bad_tvs)        = Just (noMoreMsg bad_tvs what)-      | size <= sizeTypes tys     = Just (smallerMsg what)+      | not (null bad_tvs)        = Just (noMoreMsg bad_tvs what inst_head)+      | lhs_size <= fam_app_size  = Just (smallerMsg what inst_head)       | otherwise                 = Nothing       where-        what    = text "type family application" <+> quotes (pprType (TyConApp tc tys))-        bad_tvs = fvTypes tys \\ fvs+        what = text "type family application"+               <+> quotes (pprType (TyConApp tc tys))+        fam_app_size = sizeTyConAppArgs tc tys+        bad_tvs      = fvTypes tys \\ lhs_fvs+                       -- The (\\) is list difference; e.g.+                       --   [a,b,a,a] \\ [a,a] = [b,a]+                       -- So we are counting repetitions  checkValidFamPats :: Maybe ClsInstInfo -> TyCon -> [TyVar] -> [CoVar]                   -> [Type]   -- ^ patterns the user wrote@@ -1834,23 +1911,16 @@ But I think this is doing users a disservice, in the long run.) (Testcase: dependent/should_fail/BadTelescope4) -3. t3 :: forall a. (forall k (b :: k). SameKind a b) -> ()--This is a straightforward skolem escape. Note that a and b need to have-the same kind.-(Testcase: polykinds/T11142)+To catch these errors, we call checkValidTelescope during kind-checking+datatype declarations. This must be done *before* kind-generalization,+because kind-generalization might observe, say, T1, see that k is free+in a's kind, and generalize over it, producing nonsense. It also must+be done *after* kind-generalization, in order to catch the T2 case, which+becomes apparent only after generalizing. -How do we deal with all of this? For TyCons, we have checkValidTyConTyVars.-That function looks to see if any of the tyConTyVars are repeated, but-it's really a telescope check. It works because all tycons are kind-generalized.-If there is a bad telescope, the kind-generalization will end up generalizing-over a variable bound later in the telescope.+Note [Keeping scoped variables in order: Explicit] discusses how this+check works for `forall x y z.` written in a type. -For non-tycons, we do scope checking when we bring tyvars into scope,-in tcImplicitTKBndrs and tcExplicitTKBndrs. Note that we also have to-sort implicit binders into a well-scoped order whenever we have implicit-binders to worry about. This is done in quantifyTyVars and in-tcImplicitTKBndrs. -}  -- | Check a list of binders to see if they make a valid telescope.@@ -1862,29 +1932,21 @@ -- 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 also Note [Bad telescopes].-checkValidTelescope :: SDoc        -- the original user-written telescope-                    -> [TyVar]     -- explicit vars (not necessarily zonked)-                    -> SDoc        -- note to put at bottom of message+checkValidTelescope :: [TyConBinder]   -- explicit vars (zonked)+                    -> SDoc            -- original, user-written telescope+                    -> SDoc            -- extra text to print                     -> TcM ()-checkValidTelescope hs_tvs orig_tvs extra-  = discardResult $ checkZonkValidTelescope hs_tvs orig_tvs extra+checkValidTelescope tvbs user_tyvars extra+  = do { let tvs      = binderVars tvbs --- | Like 'checkZonkValidTelescope', but returns the zonked tyvars-checkZonkValidTelescope :: SDoc-                        -> [TyVar]-                        -> SDoc-                        -> TcM [TyVar]-checkZonkValidTelescope hs_tvs orig_tvs extra-  = do { orig_tvs <- mapM zonkTyCoVarKind orig_tvs-       ; let (_, sorted_tidied_tvs) = tidyTyCoVarBndrs emptyTidyEnv $-                                      toposortTyVars orig_tvs-       ; unless (go [] emptyVarSet orig_tvs) $+             (_, sorted_tidied_tvs) = tidyTyCoVarBndrs emptyTidyEnv $+                                      toposortTyVars tvs+       ; unless (go [] emptyVarSet (binderVars tvbs)) $          addErr $-         vcat [ hang (text "These kind and type variables:" <+> hs_tvs $$+         vcat [ hang (text "These kind and type variables:" <+> user_tyvars $$                       text "are out of dependency order. Perhaps try this ordering:")-                   2 (sep (map pprTyVar sorted_tidied_tvs))-              , extra ]-       ; return orig_tvs }+                   2 (pprTyVars sorted_tidied_tvs)+              , extra ] }    where     go :: [TyVar]  -- misplaced variables@@ -1899,37 +1961,6 @@                       tyCoVarsOfTypeList (tyVarKind tv)         in go (bad_tvs ++ errs) (in_scope `extendVarSet` tv) tvs --- | After inferring kinds of type variables, check to make sure that the--- inferred kinds any of the type variables bound in a smaller scope.--- This is a skolem escape check. See also Note [Bad telescopes].-checkValidInferredKinds :: [TyVar]     -- ^ vars to check (zonked)-                        -> TyVarSet    -- ^ vars out of scope-                        -> SDoc        -- ^ suffix to error message-                        -> TcM ()-checkValidInferredKinds orig_kvs out_of_scope extra-  = do { let bad_pairs = [ (tv, kv)-                         | kv <- orig_kvs-                         , Just tv <- map (lookupVarSet out_of_scope)-                                          (tyCoVarsOfTypeList (tyVarKind kv)) ]-             report (tidyTyVarOcc env -> tv, tidyTyVarOcc env -> kv)-               = addErr $-                 text "The kind of variable" <+>-                 quotes (ppr kv) <> text ", namely" <+>-                 quotes (ppr (tyVarKind kv)) <> comma $$-                 text "depends on variable" <+>-                 quotes (ppr tv) <+> text "from an inner scope" $$-                 text "Perhaps bind" <+> quotes (ppr kv) <+>-                 text "sometime after binding" <+>-                 quotes (ppr tv) $$-                 extra-       ; mapM_ report bad_pairs }--  where-    (env1, _) = tidyTyCoVarBndrs emptyTidyEnv orig_kvs-    (env, _)  = tidyTyCoVarBndrs env1         (nonDetEltsUniqSet out_of_scope)-      -- It's OK to use nonDetEltsUniqSet here because it's only used for-      -- generating the error message- {- ************************************************************************ *                                                                      *@@ -1966,7 +1997,7 @@ fvCo (UnivCo p _ t1 t2)     = fvProv p ++ fvType t1 ++ fvType t2 fvCo (SymCo co)             = fvCo co fvCo (TransCo co1 co2)      = fvCo co1 ++ fvCo co2-fvCo (NthCo _ co)           = fvCo co+fvCo (NthCo _ _ co)         = fvCo co fvCo (LRCo _ co)            = fvCo co fvCo (InstCo co arg)        = fvCo co ++ fvCo arg fvCo (CoherenceCo co1 co2)  = fvCo co1 ++ fvCo co2@@ -1985,7 +2016,7 @@ -- Size of a type: the number of variables and constructors sizeType ty | Just exp_ty <- tcView ty = sizeType exp_ty sizeType (TyVarTy {})      = 1-sizeType (TyConApp _ tys)  = sizeTypes tys + 1+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@@ -1994,16 +2025,17 @@ sizeType (CoercionTy _)    = 1  sizeTypes :: [Type] -> Int-sizeTypes = sum . map sizeType+sizeTypes = foldr ((+) . sizeType) 0 +sizeTyConAppArgs :: TyCon -> [Type] -> Int+sizeTyConAppArgs _tc tys = sizeTypes tys -- (filterOutInvisibleTypes tc tys)+                           -- See Note [Invisible arguments and termination]+ -- Size of a predicate -- -- 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".--- (Implicit parameter constraints always terminate because--- there are no instances for them---they are only solved by--- "local instances" in expressions). -- See Trac #4200. sizePred :: PredType -> Int sizePred ty = goClass ty@@ -2013,14 +2045,19 @@     go (ClassPred cls tys')       | isTerminatingClass cls = 0       | otherwise = sizeTypes (filterOutInvisibleTypes (classTyCon cls) tys')-    go (EqPred {})        = 0-    go (IrredPred ty)     = sizeType ty+                    -- The filtering looks bogus+                    -- See Note [Invisible arguments and termination]+    go (EqPred {})           = 0+    go (IrredPred ty)        = sizeType ty+    go (ForAllPred _ _ pred) = goClass pred  -- | When this says "True", ignore this class constraint during -- a termination check isTerminatingClass :: Class -> Bool isTerminatingClass cls-  = isIPClass cls+  = isIPClass cls    -- Implicit parameter constraints always terminate because+                     -- there are no instances for them --- they are only solved+                     -- by "local instances" in expressions     || cls `hasKey` typeableClassKey     || cls `hasKey` coercibleTyConKey     || cls `hasKey` eqTyConKey
types/Class.hs view
@@ -17,7 +17,7 @@         mkClass, mkAbstractClass, classTyVars, classArity,         classKey, className, classATs, classATItems, classTyCon, classMethods,         classOpItems, classBigSig, classExtraBigSig, classTvsFds, classSCTheta,-        classAllSelIds, classSCSelId, classMinimalDef, classHasFds,+        classAllSelIds, classSCSelId, classSCSelIds, classMinimalDef, classHasFds,         isAbstractClass,     ) where @@ -107,23 +107,23 @@         -- Superclasses: eg: (F a ~ b, F b ~ G a, Eq a, Show b)         -- We need value-level selectors for both the dictionary         -- superclasses and the equality superclasses-        classSCThetaStuff :: [PredType],     -- Immediate superclasses,-        classSCSels  :: [Id],           -- Selector functions to extract the+        cls_sc_theta :: [PredType],     -- Immediate superclasses,+        cls_sc_sel_ids :: [Id],          -- Selector functions to extract the                                         --   superclasses from a                                         --   dictionary of this class         -- Associated types-        classATStuff :: [ClassATItem],  -- Associated type families+        cls_ats :: [ClassATItem],  -- Associated type families          -- Class operations (methods, not superclasses)-        classOpStuff :: [ClassOpItem],  -- Ordered by tag+        cls_ops :: [ClassOpItem],  -- Ordered by tag          -- Minimal complete definition-        classMinimalDefStuff :: ClassMinimalDef+        cls_min_def :: ClassMinimalDef     }     -- TODO: maybe super classes should be allowed in abstract class definitions  classMinimalDef :: Class -> ClassMinimalDef-classMinimalDef Class{ classBody = ConcreteClass{ classMinimalDefStuff = d } } = d+classMinimalDef Class{ classBody = ConcreteClass{ cls_min_def = d } } = d classMinimalDef _ = mkTrue -- TODO: make sure this is the right direction  {-@@ -181,11 +181,11 @@             classTyVars  = tyvars,             classFunDeps = fds,             classBody = ConcreteClass {-                    classSCThetaStuff = super_classes,-                    classSCSels  = superdict_sels,-                    classATStuff = at_stuff,-                    classOpStuff = op_stuff,-                    classMinimalDefStuff = mindef+                    cls_sc_theta = super_classes,+                    cls_sc_sel_ids = superdict_sels,+                    cls_ats  = at_stuff,+                    cls_ops  = op_stuff,+                    cls_min_def = mindef                 },             classTyCon   = tycon } @@ -239,41 +239,47 @@  classAllSelIds :: Class -> [Id] -- Both superclass-dictionary and method selectors-classAllSelIds c@(Class { classBody = ConcreteClass { classSCSels = sc_sels }})+classAllSelIds c@(Class { classBody = ConcreteClass { cls_sc_sel_ids = sc_sels }})   = sc_sels ++ classMethods c classAllSelIds c = ASSERT( null (classMethods c) ) [] +classSCSelIds :: Class -> [Id]+-- Both superclass-dictionary and method selectors+classSCSelIds (Class { classBody = ConcreteClass { cls_sc_sel_ids = sc_sels }})+  = sc_sels+classSCSelIds c = ASSERT( null (classMethods c) ) []+ classSCSelId :: Class -> Int -> Id -- Get the n'th superclass selector Id -- where n is 0-indexed, and counts --    *all* superclasses including equalities-classSCSelId (Class { classBody = ConcreteClass { classSCSels = sc_sels } }) n+classSCSelId (Class { classBody = ConcreteClass { cls_sc_sel_ids = sc_sels } }) n   = ASSERT( n >= 0 && lengthExceeds sc_sels n )     sc_sels !! n classSCSelId c n = pprPanic "classSCSelId" (ppr c <+> ppr n)  classMethods :: Class -> [Id]-classMethods (Class { classBody = ConcreteClass { classOpStuff = op_stuff } })+classMethods (Class { classBody = ConcreteClass { cls_ops = op_stuff } })   = [op_sel | (op_sel, _) <- op_stuff] classMethods _ = []  classOpItems :: Class -> [ClassOpItem]-classOpItems (Class { classBody = ConcreteClass { classOpStuff = op_stuff }})+classOpItems (Class { classBody = ConcreteClass { cls_ops = op_stuff }})   = op_stuff classOpItems _ = []  classATs :: Class -> [TyCon]-classATs (Class { classBody = ConcreteClass { classATStuff = at_stuff } })+classATs (Class { classBody = ConcreteClass { cls_ats = at_stuff } })   = [tc | ATI tc _ <- at_stuff] classATs _ = []  classATItems :: Class -> [ClassATItem]-classATItems (Class { classBody = ConcreteClass { classATStuff = at_stuff }})+classATItems (Class { classBody = ConcreteClass { cls_ats = at_stuff }})   = at_stuff classATItems _ = []  classSCTheta :: Class -> [PredType]-classSCTheta (Class { classBody = ConcreteClass { classSCThetaStuff = theta_stuff }})+classSCTheta (Class { classBody = ConcreteClass { cls_sc_theta = theta_stuff }})   = theta_stuff classSCTheta _ = [] @@ -289,9 +295,9 @@   = (tyvars, [], [], []) classBigSig (Class {classTyVars = tyvars,                     classBody = ConcreteClass {-                        classSCThetaStuff = sc_theta,-                        classSCSels = sc_sels,-                        classOpStuff = op_stuff+                        cls_sc_theta = sc_theta,+                        cls_sc_sel_ids = sc_sels,+                        cls_ops  = op_stuff                     }})   = (tyvars, sc_theta, sc_sels, op_stuff) @@ -301,8 +307,8 @@   = (tyvars, fundeps, [], [], [], []) classExtraBigSig (Class {classTyVars = tyvars, classFunDeps = fundeps,                          classBody = ConcreteClass {-                             classSCThetaStuff = sc_theta, classSCSels = sc_sels,-                             classATStuff = ats, classOpStuff = op_stuff+                             cls_sc_theta = sc_theta, cls_sc_sel_ids = sc_sels,+                             cls_ats = ats, cls_ops = op_stuff                          }})   = (tyvars, fundeps, sc_theta, sc_sels, ats, op_stuff) 
types/CoAxiom.hs view
@@ -7,7 +7,7 @@ -- and newtypes  module CoAxiom (-       BranchFlag, Branched, Unbranched, BranchIndex, Branches,+       BranchFlag, Branched, Unbranched, BranchIndex, Branches(..),        manyBranches, unbranched,        fromBranches, numBranches,        mapAccumBranches,
types/Coercion.hs view
@@ -10,8 +10,9 @@ -- module Coercion (         -- * Main data type-        Coercion, CoercionN, CoercionR, CoercionP,-        UnivCoProvenance, CoercionHole, LeftOrRight(..),+        Coercion, CoercionN, CoercionR, CoercionP, MCoercion(..), MCoercionR,+        UnivCoProvenance, CoercionHole(..), coHoleCoVar, setCoHoleCoVar,+        LeftOrRight(..),         Var, CoVar, TyCoVar,         Role(..), ltRole, @@ -29,10 +30,10 @@         mkAxInstLHS, mkUnbranchedAxInstLHS,         mkPiCo, mkPiCos, mkCoCast,         mkSymCo, mkTransCo, mkTransAppCo,-        mkNthCo, mkNthCoRole, mkLRCo,-        mkInstCo, mkAppCo, mkAppCos, mkTyConAppCo, mkFunCo, mkFunCos,+        mkNthCo, nthCoRole, mkLRCo,+        mkInstCo, mkAppCo, mkAppCos, mkTyConAppCo, mkFunCo,         mkForAllCo, mkForAllCos, mkHomoForAllCos, mkHomoForAllCos_NoRefl,-        mkPhantomCo, mkHomoPhantomCo, toPhantomCo,+        mkPhantomCo,         mkUnsafeCo, mkHoleCo, mkUnivCo, mkSubCo,         mkAxiomInstCo, mkProofIrrelCo,         downgradeRole, maybeSubCo, mkAxiomRuleCo,@@ -48,7 +49,7 @@         mapStepResult, unwrapNewTypeStepper,         topNormaliseNewType_maybe, topNormaliseTypeX, -        decomposeCo, decomposeFunCo, getCoVar_maybe,+        decomposeCo, decomposeFunCo, decomposePiCos, getCoVar_maybe,         splitTyConAppCo_maybe,         splitAppCo_maybe,         splitFunCo_maybe,@@ -79,11 +80,11 @@          -- ** Lifting         liftCoSubst, liftCoSubstTyVar, liftCoSubstWith, liftCoSubstWithEx,-        emptyLiftingContext, extendLiftingContext,-        liftCoSubstVarBndrCallback, isMappedByLC,+        emptyLiftingContext, extendLiftingContext, extendLiftingContextAndInScope,+        liftCoSubstVarBndrUsing, isMappedByLC,          mkSubstLiftingContext, zapLiftingContext,-        substForAllCoBndrCallbackLC, lcTCvSubst, lcInScopeSet,+        substForAllCoBndrUsingLC, lcTCvSubst, lcInScopeSet,          LiftCoEnv, LiftingContext(..), liftEnvSubstLeft, liftEnvSubstRight,         substRightCo, substLeftCo, swapLiftCoEnv, lcSubstLeft, lcSubstRight,@@ -102,7 +103,7 @@         tidyCo, tidyCos,          -- * Other-        promoteCoercion+        promoteCoercion, buildCoercion        ) where  #include "HsVersions.h"@@ -115,6 +116,7 @@ import CoAxiom import Var import VarEnv+import VarSet import Name hiding ( varName ) import Util import BasicTypes@@ -128,8 +130,7 @@ import Maybes import UniqFM -import Control.Monad (foldM)-import Control.Arrow ( first )+import Control.Monad (foldM, zipWithM) import Data.Function ( on )  {-@@ -168,18 +169,22 @@ pprCoAxiom :: CoAxiom br -> SDoc pprCoAxiom ax@(CoAxiom { co_ax_branches = branches })   = hang (text "axiom" <+> ppr ax <+> dcolon)-       2 (vcat (map (ppr_co_ax_branch (const pprType) ax) $ fromBranches branches))+       2 (vcat (map (ppr_co_ax_branch (\_ ty -> equals <+> pprType ty) ax) $+                    fromBranches branches))  pprCoAxBranch :: CoAxiom br -> CoAxBranch -> SDoc pprCoAxBranch = ppr_co_ax_branch pprRhs   where     pprRhs fam_tc rhs-      | Just (tycon, _) <- splitTyConApp_maybe rhs-      , isDataFamilyTyCon fam_tc-      = pprDataCons tycon+      | isDataFamilyTyCon fam_tc+      = empty -- Don't bother printing anything for the RHS of a data family+              -- instance...        | otherwise-      = ppr rhs+      = equals <+> ppr rhs+              -- ...but for a type family instance, do print out the RHS, since+              -- it might be needed to disambiguate between duplicate instances+              -- (#14179)  pprCoAxBranchHdr :: CoAxiom br -> BranchIndex -> SDoc pprCoAxBranchHdr ax index = pprCoAxBranch ax (coAxiomNthBranch ax index)@@ -193,8 +198,8 @@                           , cab_rhs = rhs                           , cab_loc = loc })   = foldr1 (flip hangNotEmpty 2)-        [ pprUserForAll (mkTyVarBinders Inferred (tvs ++ cvs))-        , pprTypeApp fam_tc lhs <+> equals <+> ppr_rhs fam_tc rhs+        [ pprUserForAll (mkTyVarBinders Inferred (ee_tvs ++ cvs))+        , pprTypeApp fam_tc ee_lhs <+> ppr_rhs fam_tc rhs         , text "-- Defined" <+> pprLoc loc ]   where         pprLoc loc@@ -205,6 +210,21 @@           = text "in" <+>               quotes (ppr (nameModule name)) +        (ee_tvs, ee_lhs)+          | Just (tycon, tc_args) <- splitTyConApp_maybe rhs+          , isDataFamilyTyCon fam_tc+          = -- Eta-expand LHS types, because sometimes data family instances+            -- are eta-reduced.+            -- See Note [Eta reduction for data family axioms] in TcInstDecls.+            let tc_tvs           = tyConTyVars tycon+                etad_tvs         = dropList tc_args tc_tvs+                etad_tys         = mkTyVarTys etad_tvs+                eta_expanded_tvs = tvs `chkAppend` etad_tvs+                eta_expanded_lhs = lhs `chkAppend` etad_tys+            in (eta_expanded_tvs, eta_expanded_lhs)+          | otherwise+          = (tvs, lhs)+ {- %************************************************************************ %*                                                                      *@@ -228,22 +248,114 @@ -- | This breaks a 'Coercion' with type @T A B C ~ T D E F@ into -- a list of 'Coercion's of kinds @A ~ D@, @B ~ E@ and @E ~ F@. Hence: ----- > decomposeCo 3 c = [nth 0 c, nth 1 c, nth 2 c]-decomposeCo :: Arity -> Coercion -> [Coercion]-decomposeCo arity co-  = [mkNthCo n co | n <- [0..(arity-1)] ]+-- > decomposeCo 3 c [r1, r2, r3] = [nth r1 0 c, nth r2 1 c, nth r3 2 c]+decomposeCo :: Arity -> Coercion+            -> [Role]  -- the roles of the output coercions+                       -- this must have at least as many+                       -- entries as the Arity provided+            -> [Coercion]+decomposeCo arity co rs+  = [mkNthCo r n co | (n,r) <- [0..(arity-1)] `zip` rs ]            -- Remember, Nth is zero-indexed -decomposeFunCo :: Coercion -> (Coercion, Coercion)+decomposeFunCo :: HasDebugCallStack+               => Role      -- Role of the input coercion+               -> Coercion  -- Input coercion+               -> (Coercion, Coercion) -- Expects co :: (s1 -> t1) ~ (s2 -> t2) -- Returns (co1 :: s1~s2, co2 :: t1~t2) -- See Note [Function coercions] for the "2" and "3"-decomposeFunCo co = ASSERT2( all_ok, ppr co )-                    (mkNthCo 2 co, mkNthCo 3 co)+decomposeFunCo r co = ASSERT2( all_ok, ppr co )+                      (mkNthCo r 2 co, mkNthCo r 3 co)   where     Pair s1t1 s2t2 = coercionKind co     all_ok = isFunTy s1t1 && isFunTy s2t2 +{- Note [Pushing a coercion into a pi-type]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+Suppose we have this:+    (f |> co) t1 .. tn+Then we want to push the coercion into the arguments, so as to make+progress. For example of why you might want to do so, see Note+[Respecting definitional equality] in TyCoRep.++This is done by decomposePiCos.  Specifically, if+    decomposePiCos co [t1,..,tn] = ([co1,...,cok], cor)+then+    (f |> co) t1 .. tn   =   (f (t1 |> co1) ... (tk |> cok)) |> cor) t(k+1) ... tn++Notes:++* k can be smaller than n! That is decomposePiCos can return *fewer*+  coercions than there are arguments (ie k < n), if the kind provided+  doesn't have enough binders.++* If there is a type error, we might see+       (f |> co) t1+  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.+-}++decomposePiCos :: HasDebugCallStack+               => CoercionN -> Pair Type  -- Coercion and its kind+               -> [Type]+               -> ([CoercionN], CoercionN)+-- See Note [Pushing a coercion into a pi-type]+decomposePiCos orig_co (Pair orig_k1 orig_k2) orig_args+  = go [] (orig_subst,orig_k1) orig_co (orig_subst,orig_k2) orig_args+  where+    orig_subst = mkEmptyTCvSubst $ mkInScopeSet $+                 tyCoVarsOfTypes orig_args `unionVarSet` tyCoVarsOfCo orig_co++    go :: [CoercionN]      -- accumulator for argument coercions, reversed+       -> (TCvSubst,Kind)  -- Lhs kind of coercion+       -> CoercionN        -- coercion originally applied to the function+       -> (TCvSubst,Kind)  -- Rhs kind of coercion+       -> [Type]           -- Arguments to that function+       -> ([CoercionN], Coercion)+    -- Invariant:  co :: subst1(k2) ~ subst2(k2)++    go acc_arg_cos (subst1,k1) co (subst2,k2) (ty:tys)+      | Just (a, t1) <- splitForAllTy_maybe k1+      , Just (b, t2) <- splitForAllTy_maybe k2+        -- know     co :: (forall a:s1.t1) ~ (forall b:s2.t2)+        --    function :: forall a:s1.t1   (the function is not passed to decomposePiCos)+        --           a :: s1+        --           b :: s2+        --          ty :: s2+        -- need arg_co :: s2 ~ s1+        --      res_co :: t1[ty |> arg_co / a] ~ t2[ty / b]+      = let arg_co  = mkNthCo Nominal 0 (mkSymCo co)+            res_co  = mkInstCo co (mkNomReflCo ty `mkCoherenceLeftCo` arg_co)+            subst1' = extendTCvSubst subst1 a (ty `CastTy` arg_co)+            subst2' = extendTCvSubst subst2 b ty+        in+        go (arg_co : acc_arg_cos) (subst1', t1) res_co (subst2', t2) tys++      | Just (_s1, t1) <- splitFunTy_maybe k1+      , Just (_s2, t2) <- splitFunTy_maybe k2+        -- know     co :: (s1 -> t1) ~ (s2 -> t2)+        --    function :: s1 -> t1+        --          ty :: s2+        -- need arg_co :: s2 ~ s1+        --      res_co :: t1 ~ t2+      = let (sym_arg_co, res_co) = decomposeFunCo Nominal co+            arg_co               = mkSymCo sym_arg_co+        in+        go (arg_co : acc_arg_cos) (subst1,t1) res_co (subst2,t2) tys++      | not (isEmptyTCvSubst subst1) || not (isEmptyTCvSubst subst2)+      = go acc_arg_cos (zapTCvSubst subst1, substTy subst1 k1)+                       co+                       (zapTCvSubst subst2, substTy subst1 k2)+                       (ty:tys)++      -- tys might not be empty, if the left-hand type of the original coercion+      -- didn't have enough binders+    go acc_arg_cos _ki1 co _ki2 _tys = (reverse acc_arg_cos, co)+ -- | Attempts to obtain the type variable underlying a 'Coercion' getCoVar_maybe :: Coercion -> Maybe CoVar getCoVar_maybe (CoVarCo cv) = Just cv@@ -266,10 +378,14 @@ -- ^ Attempt to take a coercion application apart. splitAppCo_maybe (AppCo co arg) = Just (co, arg) splitAppCo_maybe (TyConAppCo r tc args)-  | mightBeUnsaturatedTyCon tc || args `lengthExceeds` tyConArity tc+  | args `lengthExceeds` tyConArity tc+  , Just (args', arg') <- snocView args+  = Just ( mkTyConAppCo r tc args', arg' )++  | mightBeUnsaturatedTyCon tc     -- Never create unsaturated type family apps!   , Just (args', arg') <- snocView args-  , Just arg'' <- setNominalRole_maybe arg'+  , Just arg'' <- setNominalRole_maybe (nthRole r tc (length args')) arg'   = Just ( mkTyConAppCo r tc args', arg'' )        -- Use mkTyConAppCo to preserve the invariant        --  that identity coercions are always represented by Refl@@ -290,12 +406,12 @@ ------------------------------------------------------- -- and some coercion kind stuff -coVarTypes :: CoVar -> Pair Type+coVarTypes :: HasDebugCallStack => CoVar -> Pair Type coVarTypes cv   | (_, _, ty1, ty2, _) <- coVarKindsTypesRole cv   = Pair ty1 ty2 -coVarKindsTypesRole :: CoVar -> (Kind,Kind,Type,Type,Role)+coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind,Kind,Type,Type,Role) coVarKindsTypesRole cv  | Just (tc, [k1,k2,ty1,ty2]) <- splitTyConApp_maybe (varType cv)  = let role@@ -345,15 +461,17 @@ -- produce a coercion @rep_co :: r1 ~ r2@. mkRuntimeRepCo :: HasDebugCallStack => Coercion -> Coercion mkRuntimeRepCo co-  = mkNthCo 0 kind_co+  = mkNthCo Nominal 0 kind_co   where     kind_co = mkKindCo co  -- kind_co :: TYPE r1 ~ TYPE r2                            -- (up to silliness with Constraint) -isReflCoVar_maybe :: CoVar -> Maybe Coercion+isReflCoVar_maybe :: Var -> Maybe Coercion -- If cv :: t~t then isReflCoVar_maybe cv = Just (Refl t)+-- Works on all kinds of Vars, not just CoVars isReflCoVar_maybe cv-  | Pair ty1 ty2 <- coVarTypes cv+  | isCoVar cv+  , Pair ty1 ty2 <- coVarTypes cv   , ty1 `eqType` ty2   = Just (Refl (coVarRole cv) ty1)   | otherwise@@ -449,41 +567,6 @@ appropriate? I (Richard E.) have decided not to do this, because upgrading a role is bizarre and a caller should have to ask for this behavior explicitly. -Note [mkTransAppCo]-~~~~~~~~~~~~~~~~~~~-Suppose we have--  co1 :: a ~R Maybe-  co2 :: b ~R Int--and we want--  co3 :: a b ~R Maybe Int--This seems sensible enough. But, we can't let (co3 = co1 co2), because-that's ill-roled! Note that mkAppCo requires a *nominal* second coercion.--The way around this is to use transitivity:--  co3 = (co1 <b>_N) ; (Maybe co2) :: a b ~R Maybe Int--Or, it's possible everything is the other way around:--  co1' :: Maybe ~R a-  co2' :: Int   ~R b--and we want--  co3' :: Maybe Int ~R a b--then--  co3' = (Maybe co2') ; (co1' <b>_N)--This is exactly what `mkTransAppCo` builds for us. Information for all-the arguments tends to be to hand at call sites, so it's quicker than-using, say, coercionKind.- -}  mkReflCo :: Role -> Type -> Coercion@@ -528,10 +611,6 @@   = Refl r (mkFunTy ty1 ty2)   | otherwise = FunCo r co1 co2 --- | Make nested function 'Coercion's-mkFunCos :: Role -> [Coercion] -> Coercion -> Coercion-mkFunCos r cos res_co = foldr (mkFunCo r) res_co cos- -- | Apply a 'Coercion' to another 'Coercion'. -- The second coercion must be Nominal, unless the first is Phantom. -- If the first is Phantom, then the second can be either Phantom or Nominal.@@ -569,7 +648,7 @@          -> Coercion mkAppCos co1 cos = foldl mkAppCo co1 cos --- | Like `mkAppCo`, but allows the second coercion to be other than+-- | Like 'mkAppCo', but allows the second coercion to be other than -- nominal. See Note [mkTransAppCo]. Role r3 cannot be more stringent -- than either r1 or r2. mkTransAppCo :: Role         -- ^ r1@@ -594,7 +673,7 @@               -- ty1a ty2a :: k2a               -- ty1b ty2b :: k2b               kind_co1 = mkKindCo co1        -- :: k1a -> k2a ~N k1b -> k2b-              kind_co  = mkNthCo 1 kind_co1  -- :: k2a ~N k2b+              kind_co  = mkNthCo Nominal 1 kind_co1  -- :: k2a ~N k2b        (_,                _,                Nominal)         -> ASSERT( r1 == Nominal && r2 == Nominal )@@ -804,59 +883,127 @@ mkTransCo (Refl {}) co2 = co2 mkTransCo co1 co2       = TransCo co1 co2 --- the Role is the desired one. It is the caller's responsibility to make--- sure this request is reasonable-mkNthCoRole :: Role -> Int -> Coercion -> Coercion-mkNthCoRole role n co-  = downgradeRole role nth_role $ nth_co+mkNthCo :: HasDebugCallStack+        => Role  -- the role of the coercion you're creating+        -> Int+        -> Coercion+        -> Coercion+mkNthCo r n co+  = ASSERT2( good_call, bad_call_msg )+    go r n co   where-    nth_co = mkNthCo n co-    nth_role = coercionRole nth_co+    Pair ty1 ty2 = coercionKind co -mkNthCo :: Int -> Coercion -> Coercion-mkNthCo 0 (Refl _ ty)-  | Just (tv, _) <- splitForAllTy_maybe ty-  = Refl Nominal (tyVarKind tv)-mkNthCo n (Refl r ty)-  = ASSERT2( ok_tc_app ty n, ppr n $$ ppr ty )-    mkReflCo r' (tyConAppArgN n ty)-  where tc = tyConAppTyCon ty-        r' = nthRole r tc n+    go r 0 (Refl _ ty)+      | Just (tv, _) <- splitForAllTy_maybe ty+      = ASSERT( r == Nominal )+        Refl r (tyVarKind tv)+    go r n (Refl r0 ty)+      = ASSERT2( ok_tc_app ty n, ppr n $$ ppr ty )+        ASSERT( nthRole r0 tc n == r )+        mkReflCo r (tyConAppArgN n ty)+      where tc = tyConAppTyCon ty -        ok_tc_app :: Type -> Int -> Bool-        ok_tc_app ty n-          | Just (_, tys) <- splitTyConApp_maybe ty-          = tys `lengthExceeds` n-          | isForAllTy ty  -- nth:0 pulls out a kind coercion from a hetero forall-          = n == 0-          | otherwise-          = False+            ok_tc_app :: Type -> Int -> Bool+            ok_tc_app ty n+              | Just (_, tys) <- splitTyConApp_maybe ty+              = tys `lengthExceeds` n+              | isForAllTy ty  -- nth:0 pulls out a kind coercion from a hetero forall+              = n == 0+              | otherwise+              = False -mkNthCo 0 (ForAllCo _ kind_co _) = kind_co-  -- If co :: (forall a1:k1. t1) ~ (forall a2:k2. t2)-  -- then (nth 0 co :: k1 ~ k2)+    go r 0 (ForAllCo _ kind_co _)+      = ASSERT( r == Nominal )+        kind_co+      -- If co :: (forall a1:k1. t1) ~ (forall a2:k2. t2)+      -- then (nth 0 co :: k1 ~N k2) -mkNthCo n co@(FunCo _ arg res)-  -- See Note [Function coercions]-  -- If FunCo _ arg_co res_co ::   (s1:TYPE sk1 -> s2:TYPE sk2)-  --                             ~ (t1:TYPE tk1 -> t2:TYPE tk2)-  -- Then we want to behave as if co was-  --    TyConAppCo argk_co resk_co arg_co res_co-  -- where-  --    argk_co :: sk1 ~ tk1  =  mkNthCo 0 (mkKindCo arg_co)-  --    resk_co :: sk2 ~ tk2  =  mkNthCo 0 (mkKindCo res_co)-  --                             i.e. mkRuntimeRepCo-  = case n of-      0 -> mkRuntimeRepCo arg-      1 -> mkRuntimeRepCo res-      2 -> arg-      3 -> res-      _ -> pprPanic "mkNthCo(FunCo)" (ppr n $$ ppr co)+    go r n co@(FunCo r0 arg res)+      -- See Note [Function coercions]+      -- If FunCo _ arg_co res_co ::   (s1:TYPE sk1 -> s2:TYPE sk2)+      --                             ~ (t1:TYPE tk1 -> t2:TYPE tk2)+      -- Then we want to behave as if co was+      --    TyConAppCo argk_co resk_co arg_co res_co+      -- where+      --    argk_co :: sk1 ~ tk1  =  mkNthCo 0 (mkKindCo arg_co)+      --    resk_co :: sk2 ~ tk2  =  mkNthCo 0 (mkKindCo res_co)+      --                             i.e. mkRuntimeRepCo+      = case n of+          0 -> ASSERT( r == Nominal ) mkRuntimeRepCo arg+          1 -> ASSERT( r == Nominal ) mkRuntimeRepCo res+          2 -> ASSERT( r == r0 )      arg+          3 -> ASSERT( r == r0 )      res+          _ -> pprPanic "mkNthCo(FunCo)" (ppr n $$ ppr co) -mkNthCo n (TyConAppCo _ _ arg_cos) = arg_cos `getNth` n+    go r n (TyConAppCo r0 tc arg_cos) = ASSERT2( r == nthRole r0 tc n+                                                    , (vcat [ ppr tc+                                                            , ppr arg_cos+                                                            , ppr r0+                                                            , ppr n+                                                            , ppr r ]) )+                                             arg_cos `getNth` n -mkNthCo n co = NthCo n co+    go r n co =+      NthCo r n co +    -- Assertion checking+    bad_call_msg = vcat [ text "Coercion =" <+> ppr co+                        , text "LHS ty =" <+> ppr ty1+                        , text "RHS ty =" <+> ppr ty2+                        , text "n =" <+> ppr n, text "r =" <+> ppr r+                        , text "coercion role =" <+> ppr (coercionRole co) ]+    good_call+      -- If the Coercion passed in is between forall-types, then the Int must+      -- be 0 and the role must be Nominal.+      | Just (_tv1, _) <- splitForAllTy_maybe ty1+      , Just (_tv2, _) <- splitForAllTy_maybe ty2+      = n == 0 && r == Nominal++      -- If the Coercion passed in is between T tys and T tys', then the Int+      -- must be less than the length of tys/tys' (which must be the same+      -- lengths).+      --+      -- If the role of the Coercion is nominal, then the role passed in must+      -- be nominal. If the role of the Coercion is representational, then the+      -- role passed in must be tyConRolesRepresentational T !! n. If the role+      -- of the Coercion is Phantom, then the role passed in must be Phantom.+      --+      -- See also Note [NthCo Cached Roles] if you're wondering why it's+      -- blaringly obvious that we should be *computing* this role instead of+      -- passing it in.+      | Just (tc1, tys1) <- splitTyConApp_maybe ty1+      , Just (tc2, tys2) <- splitTyConApp_maybe ty2+      , tc1 == tc2+      = let len1 = length tys1+            len2 = length tys2+            good_role = case coercionRole co of+                          Nominal -> r == Nominal+                          Representational -> r == (tyConRolesRepresentational tc1 !! n)+                          Phantom -> r == Phantom+        in len1 == len2 && n < len1 && good_role++      | otherwise+      = True++++-- | If you're about to call @mkNthCo r n co@, then @r@ should be+-- whatever @nthCoRole n co@ returns.+nthCoRole :: Int -> Coercion -> Role+nthCoRole n co+  | Just (tc, _) <- splitTyConApp_maybe lty+  = nthRole r tc n++  | Just _ <- splitForAllTy_maybe lty+  = Nominal++  | otherwise+  = pprPanic "nthCoRole" (ppr co)++  where+    (Pair lty _, r) = coercionKindRole co+ mkLRCo :: LeftOrRight -> Coercion -> Coercion mkLRCo lr (Refl eq ty) = Refl eq (pickLR lr (splitAppTy ty)) mkLRCo lr co           = LRCo lr co@@ -909,8 +1056,9 @@   | otherwise   = KindCo co --- input coercion is Nominal; see also Note [Role twiddling functions] mkSubCo :: Coercion -> Coercion+-- Input coercion is Nominal, result is Representational+-- see also Note [Role twiddling functions] mkSubCo (Refl Nominal ty) = Refl Representational ty mkSubCo (TyConAppCo Nominal tc cos)   = TyConAppCo Representational tc (applyRoles tc cos)@@ -927,13 +1075,17 @@                     -> Coercion -> Maybe Coercion -- In (downgradeRole_maybe dr cr co) it's a precondition that --                                   cr = coercionRole co-downgradeRole_maybe Representational Nominal co = Just (mkSubCo co)-downgradeRole_maybe Nominal Representational _  = Nothing-downgradeRole_maybe Phantom Phantom          co = Just co-downgradeRole_maybe Phantom _                co = Just (toPhantomCo co)-downgradeRole_maybe _ Phantom                _  = Nothing-downgradeRole_maybe _ _                      co = Just co +downgradeRole_maybe Nominal          Nominal          co = Just co+downgradeRole_maybe Nominal          _                _  = Nothing++downgradeRole_maybe Representational Nominal          co = Just (mkSubCo co)+downgradeRole_maybe Representational Representational co = Just co+downgradeRole_maybe Representational Phantom          _  = Nothing++downgradeRole_maybe Phantom          Phantom          co = Just co+downgradeRole_maybe Phantom          _                co = Just (toPhantomCo co)+ -- | Like 'downgradeRole_maybe', but panics if the change isn't a downgrade. -- See Note [Role twiddling functions] downgradeRole :: Role  -- desired role@@ -977,40 +1129,45 @@  -- | Converts a coercion to be nominal, if possible. -- See Note [Role twiddling functions]-setNominalRole_maybe :: Coercion -> Maybe Coercion-setNominalRole_maybe co-  | Nominal <- coercionRole co = Just co-setNominalRole_maybe (SubCo co)  = Just co-setNominalRole_maybe (Refl _ ty) = Just $ Refl Nominal ty-setNominalRole_maybe (TyConAppCo Representational tc cos)-  = do { cos' <- mapM setNominalRole_maybe cos-       ; return $ TyConAppCo Nominal tc cos' }-setNominalRole_maybe (FunCo Representational co1 co2)-  = do { co1' <- setNominalRole_maybe co1-       ; co2' <- setNominalRole_maybe co2-       ; return $ FunCo Nominal co1' co2'-       }-setNominalRole_maybe (SymCo co)-  = SymCo <$> setNominalRole_maybe co-setNominalRole_maybe (TransCo co1 co2)-  = TransCo <$> setNominalRole_maybe co1 <*> setNominalRole_maybe co2-setNominalRole_maybe (AppCo co1 co2)-  = AppCo <$> setNominalRole_maybe co1 <*> pure co2-setNominalRole_maybe (ForAllCo tv kind_co co)-  = ForAllCo tv kind_co <$> setNominalRole_maybe co-setNominalRole_maybe (NthCo n co)-  = NthCo n <$> setNominalRole_maybe co-setNominalRole_maybe (InstCo co arg)-  = InstCo <$> setNominalRole_maybe co <*> pure arg-setNominalRole_maybe (CoherenceCo co1 co2)-  = CoherenceCo <$> setNominalRole_maybe co1 <*> pure co2-setNominalRole_maybe (UnivCo prov _ co1 co2)-  | case prov of UnsafeCoerceProv -> True   -- it's always unsafe-                 PhantomProv _    -> False  -- should always be phantom-                 ProofIrrelProv _ -> True   -- it's always safe-                 PluginProv _     -> False  -- who knows? This choice is conservative.-  = Just $ UnivCo prov Nominal co1 co2-setNominalRole_maybe _ = Nothing+setNominalRole_maybe :: Role -- of input coercion+                     -> Coercion -> Maybe Coercion+setNominalRole_maybe r co+  | r == Nominal = Just co+  | otherwise = setNominalRole_maybe_helper co+  where+    setNominalRole_maybe_helper (SubCo co)  = Just co+    setNominalRole_maybe_helper (Refl _ ty) = Just $ Refl Nominal ty+    setNominalRole_maybe_helper (TyConAppCo Representational tc cos)+      = do { cos' <- zipWithM setNominalRole_maybe (tyConRolesX Representational tc) cos+           ; return $ TyConAppCo Nominal tc cos' }+    setNominalRole_maybe_helper (FunCo Representational co1 co2)+      = do { co1' <- setNominalRole_maybe Representational co1+           ; co2' <- setNominalRole_maybe Representational co2+           ; return $ FunCo Nominal co1' co2'+           }+    setNominalRole_maybe_helper (SymCo co)+      = SymCo <$> setNominalRole_maybe_helper co+    setNominalRole_maybe_helper (TransCo co1 co2)+      = TransCo <$> setNominalRole_maybe_helper co1 <*> setNominalRole_maybe_helper co2+    setNominalRole_maybe_helper (AppCo co1 co2)+      = AppCo <$> setNominalRole_maybe_helper co1 <*> pure co2+    setNominalRole_maybe_helper (ForAllCo tv kind_co co)+      = ForAllCo tv kind_co <$> setNominalRole_maybe_helper co+    setNominalRole_maybe_helper (NthCo _r n co)+      -- NB, this case recurses via setNominalRole_maybe, not+      -- setNominalRole_maybe_helper!+      = NthCo Nominal n <$> setNominalRole_maybe (coercionRole co) co+    setNominalRole_maybe_helper (InstCo co arg)+      = InstCo <$> setNominalRole_maybe_helper co <*> pure arg+    setNominalRole_maybe_helper (CoherenceCo co1 co2)+      = CoherenceCo <$> setNominalRole_maybe_helper co1 <*> pure co2+    setNominalRole_maybe_helper (UnivCo prov _ co1 co2)+      | case prov of UnsafeCoerceProv -> True   -- it's always unsafe+                     PhantomProv _    -> False  -- should always be phantom+                     ProofIrrelProv _ -> True   -- it's always safe+                     PluginProv _     -> False  -- who knows? This choice is conservative.+      = Just $ UnivCo prov Nominal co1 co2+    setNominalRole_maybe_helper _ = Nothing  -- | Make a phantom coercion between two types. The coercion passed -- in must be a nominal coercion between the kinds of the@@ -1019,14 +1176,6 @@ mkPhantomCo h t1 t2   = mkUnivCo (PhantomProv h) Phantom t1 t2 --- | Make a phantom coercion between two types of the same kind.-mkHomoPhantomCo :: Type -> Type -> Coercion-mkHomoPhantomCo t1 t2-  = ASSERT( k1 `eqType` typeKind t2 )-    mkPhantomCo (mkNomReflCo k1) t1 t2-  where-    k1 = typeKind t1- -- takes any coercion and turns it into a Phantom coercion toPhantomCo :: Coercion -> Coercion toPhantomCo co@@ -1067,7 +1216,7 @@  -- | like mkKindCo, but aggressively & recursively optimizes to avoid using -- a KindCo constructor. The output role is nominal.-promoteCoercion :: Coercion -> Coercion+promoteCoercion :: Coercion -> CoercionN  -- First cases handles anything that should yield refl. promoteCoercion co = case co of@@ -1116,7 +1265,7 @@     TransCo co1 co2       -> mkTransCo (promoteCoercion co1) (promoteCoercion co2) -    NthCo n co1+    NthCo _ n co1       | Just (_, args) <- splitTyConAppCo_maybe co1       , args `lengthExceeds` n       -> promoteCoercion (args !! n)@@ -1159,22 +1308,22 @@ -- where @g' = promoteCoercion (h w)@. -- fails if this is not possible, if @g@ coerces between a forall and an -> -- or if second parameter has a representational role and can't be used--- with an InstCo. The result role matches is representational.+-- with an InstCo. instCoercion :: Pair Type -- type of the first coercion-             -> Coercion  -- ^ must be nominal+             -> CoercionN  -- ^ must be nominal              -> Coercion-             -> Maybe Coercion+             -> Maybe CoercionN instCoercion (Pair lty rty) g w   | isForAllTy lty && isForAllTy rty-  , Just w' <- setNominalRole_maybe w+  , Just w' <- setNominalRole_maybe (coercionRole w) w   = Just $ mkInstCo g w'   | isFunTy lty && isFunTy rty-  = Just $ mkNthCo 3 g -- extract result type, which is the 4th argument to (->)+  = Just $ mkNthCo Nominal 3 g -- extract result type, which is the 4th argument to (->)   | otherwise -- one forall, one funty...   = Nothing-  where -instCoercions :: Coercion -> [Coercion] -> Maybe Coercion+-- | Repeated use of 'instCoercion'+instCoercions :: CoercionN -> [Coercion] -> Maybe CoercionN instCoercions g ws   = let arg_ty_pairs = map coercionKind ws in     snd <$> foldM go (coercionKind g, g) (zip arg_ty_pairs ws)@@ -1203,22 +1352,26 @@ mkPiCo r v co | isTyVar v = mkHomoForAllCos [v] co               | otherwise = mkFunCo r (mkReflCo r (varType v)) co --- The second coercion is sometimes lifted (~) and sometimes unlifted (~#).--- So, we have to make sure to supply the right parameter to decomposeCo.--- mkCoCast (c :: s1 ~# t1) (g :: (s1 ~# s2) ~# (t1 ~# t2)) :: s2 ~# t2--- Both coercions *must* have the same role.-mkCoCast :: Coercion -> Coercion -> Coercion+-- mkCoCast (c :: s1 ~?r t1) (g :: (s1 ~?r t1) ~#R (s2 ~?r t2)) :: s2 ~?r t2+-- The first coercion might be lifted or unlifted; thus the ~? above+-- Lifted and unlifted equalities take different numbers of arguments,+-- so we have to make sure to supply the right parameter to decomposeCo.+-- Also, note that the role of the first coercion is the same as the role of+-- the equalities related by the second coercion. The second coercion is+-- itself always representational.+mkCoCast :: Coercion -> CoercionR -> Coercion mkCoCast c g+  | (g2:g1:_) <- reverse co_list   = mkSymCo g1 `mkTransCo` c `mkTransCo` g2++  | otherwise+  = pprPanic "mkCoCast" (ppr g $$ ppr (coercionKind g))   where-       -- g  :: (s1 ~# s2) ~# (t1 ~#  t2)-       -- g1 :: s1 ~# t1-       -- g2 :: s2 ~# t2-    (_, args) = splitTyConApp (pFst $ coercionKind g)-    n_args = length args-    co_list = decomposeCo n_args g-    g1 = co_list `getNth` (n_args - 2)-    g2 = co_list `getNth` (n_args - 1)+    -- g  :: (s1 ~# t1) ~# (s2 ~# t2)+    -- g1 :: s1 ~# s2+    -- g2 :: t1 ~# t2+    (tc, _) = splitTyConApp (pFst $ coercionKind g)+    co_list = decomposeCo (tyConArity tc) g (tyConRolesRepresentational tc)  {- %************************************************************************@@ -1456,10 +1609,20 @@                      -> TyVar           -- ^ new variable to map...                      -> Coercion        -- ^ ...to this lifted version                      -> LiftingContext+    -- mappings to reflexive coercions are just substitutions+extendLiftingContext (LC subst env) tv (Refl _ ty) = LC (extendTvSubst subst tv ty) env extendLiftingContext (LC subst env) tv arg   = ASSERT( isTyVar tv )     LC subst (extendVarEnv env tv arg) +-- | Extend a lifting context with a new mapping, and extend the in-scope set+extendLiftingContextAndInScope :: LiftingContext  -- ^ Original LC+                               -> TyVar           -- ^ new variable to map...+                               -> Coercion        -- ^ to this coercion+                               -> LiftingContext+extendLiftingContextAndInScope (LC subst env) tv co+  = extendLiftingContext (LC (extendTCvInScopeSet subst (tyCoVarsOfCo co)) env) tv co+ -- | Extend a lifting context with existential-variable bindings. -- This follows the lifting context extension definition in the -- "FC with Explicit Kind Equality" paper.@@ -1485,14 +1648,14 @@ zapLiftingContext (LC subst _) = LC (zapTCvSubst subst) emptyVarEnv  -- | Like 'substForAllCoBndr', but works on a lifting context-substForAllCoBndrCallbackLC :: Bool+substForAllCoBndrUsingLC :: Bool                             -> (Coercion -> Coercion)                             -> LiftingContext -> TyVar -> Coercion                             -> (LiftingContext, TyVar, Coercion)-substForAllCoBndrCallbackLC sym sco (LC subst lc_env) tv co+substForAllCoBndrUsingLC sym sco (LC subst lc_env) tv co   = (LC subst' lc_env, tv', co')   where-    (subst', tv', co') = substForAllCoBndrCallback sym sco subst tv co+    (subst', tv', co') = substForAllCoBndrUsing sym sco subst tv co  -- | The \"lifting\" operation which substitutes coercions for type --   variables in a type to produce a coercion.@@ -1551,16 +1714,16 @@ liftCoSubstVarBndr :: LiftingContext -> TyVar                    -> (LiftingContext, TyVar, Coercion) liftCoSubstVarBndr lc tv-  = let (lc', tv', h, _) = liftCoSubstVarBndrCallback callback lc tv in+  = let (lc', tv', h, _) = liftCoSubstVarBndrUsing callback lc tv in     (lc', tv', h)   where     callback lc' ty' = (ty_co_subst lc' Nominal ty', ())  -- the callback must produce a nominal coercion-liftCoSubstVarBndrCallback :: (LiftingContext -> Type -> (Coercion, a))+liftCoSubstVarBndrUsing :: (LiftingContext -> Type -> (Coercion, a))                            -> LiftingContext -> TyVar                            -> (LiftingContext, TyVar, Coercion, a)-liftCoSubstVarBndrCallback fun lc@(LC subst cenv) old_var+liftCoSubstVarBndrUsing fun lc@(LC subst cenv) old_var   = ( LC (subst `extendTCvInScope` new_var) new_cenv     , new_var, eta, stuff )   where@@ -1569,7 +1732,7 @@     Pair k1 _    = coercionKind eta     new_var      = uniqAway (getTCvInScope subst) (setVarType old_var k1) -    lifted   = Refl Nominal (TyVarTy new_var)+    lifted   = mkNomReflCo (TyVarTy new_var) `mkCoherenceRightCo` eta     new_cenv = extendVarEnv cenv old_var lifted  -- | Is a var in the domain of a lifting context?@@ -1654,7 +1817,7 @@   = seqProv p `seq` r `seq` seqType t1 `seq` seqType t2 seqCo (SymCo co)                = seqCo co seqCo (TransCo co1 co2)         = seqCo co1 `seq` seqCo co2-seqCo (NthCo n co)              = n `seq` seqCo co+seqCo (NthCo r n co)            = r `seq` n `seq` seqCo co seqCo (LRCo lr co)              = lr `seq` seqCo co seqCo (InstCo co arg)           = seqCo co `seq` seqCo arg seqCo (CoherenceCo co1 co2)     = seqCo co1 `seq` seqCo co2@@ -1705,22 +1868,17 @@ -- i.e. the kind of @c@ relates @t1@ and @t2@, then @coercionKind c = Pair t1 t2@.  coercionKind :: Coercion -> Pair Type-coercionKind co = go co+coercionKind co =+  go co   where     go (Refl _ ty)          = Pair ty ty     go (TyConAppCo _ tc cos)= mkTyConApp tc <$> (sequenceA $ map go cos)     go (AppCo co1 co2)      = mkAppTy <$> go co1 <*> go co2-    go (ForAllCo tv1 k_co co)-      = let Pair _ k2          = go k_co-            tv2                = setTyVarKind tv1 k2-            Pair ty1 ty2       = go co-            subst = zipTvSubst [tv1] [TyVarTy tv2 `mk_cast_ty` mkSymCo k_co]-            ty2' = substTyAddInScope subst ty2 in-            -- We need free vars of ty2 in scope to satisfy the invariant-            -- from Note [The substitution invariant]-            -- This is doing repeated substitutions and probably doesn't-            -- need to, see #11735-        mkInvForAllTy <$> Pair tv1 tv2 <*> Pair ty1 ty2'+    go co@(ForAllCo tv1 k_co co1)+       | isReflCo k_co            = mkInvForAllTy tv1 <$> go co1+       | otherwise                = go_forall empty_subst co+       where+         empty_subst = mkEmptyTCvSubst (mkInScopeSet $ tyCoVarsOfCo co)     go (FunCo _ co1 co2)    = mkFunTy <$> go co1 <*> go co2     go (CoVarCo cv)         = coVarTypes cv     go (HoleCo h)           = coVarTypes (coHoleCoVar h)@@ -1743,7 +1901,7 @@     go (UnivCo _ _ ty1 ty2)   = Pair ty1 ty2     go (SymCo co)             = swap $ go co     go (TransCo co1 co2)      = Pair (pFst $ go co1) (pSnd $ go co2)-    go g@(NthCo d co)+    go g@(NthCo _ d co)       | Just argss <- traverse tyConAppArgs_maybe tys       = ASSERT( and $ (`lengthExceeds` d) <$> argss )         (`getNth` d) <$> argss@@ -1772,11 +1930,35 @@     go_app (InstCo co arg) args = go_app co (arg:args)     go_app co              args = piResultTys <$> go co <*> (sequenceA $ map go args) -    -- The real mkCastTy is too slow, and we can easily have nested ForAllCos.-    mk_cast_ty :: Type -> Coercion -> Type-    mk_cast_ty ty (Refl {}) = ty-    mk_cast_ty ty co        = CastTy ty co+    go_forall subst (ForAllCo tv1 k_co co)+      -- See Note [Nested ForAllCos]+      = mkInvForAllTy <$> Pair tv1 tv2 <*> go_forall subst' co+      where+        Pair _ k2 = go k_co+        tv2       = setTyVarKind tv1 (substTy subst k2)+        subst' | isReflCo k_co = extendTCvInScope subst tv1+               | otherwise     = extendTvSubst (extendTCvInScope subst tv2) tv1 $+                                 TyVarTy tv2 `mkCastTy` mkSymCo k_co+    go_forall subst other_co+      = substTy subst `pLiftSnd` go other_co +{-++Note [Nested ForAllCos]+~~~~~~~~~~~~~~~~~~~~~~~++Suppose we need `coercionKind (ForAllCo a1 (ForAllCo a2 ... (ForAllCo an+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.++Solution: gather up the type variables for nested `ForAllCos`, and+substitute for them all at once.  Remarkably, for Trac #11735 this single+change reduces /total/ compile time by a factor of more than ten.++-}+ -- | Apply 'coercionKind' to multiple 'Coercion's coercionKinds :: [Coercion] -> Pair [Type] coercionKinds tys = sequenceA $ map coercionKind tys@@ -1784,77 +1966,30 @@ -- | Get a coercion's kind and role. -- Why both at once?  See Note [Computing a coercion kind and role] coercionKindRole :: Coercion -> (Pair Type, Role)-coercionKindRole = go-  where-    go (Refl r ty) = (Pair ty ty, r)-    go (TyConAppCo r tc cos)-      = (mkTyConApp tc <$> (sequenceA $ map coercionKind cos), r)-    go (AppCo co1 co2)-      = let (tys1, r1) = go co1 in-        (mkAppTy <$> tys1 <*> coercionKind co2, r1)-    go (ForAllCo tv1 k_co co)-      = let Pair _ k2          = coercionKind k_co-            tv2                = setTyVarKind tv1 k2-            (Pair ty1 ty2, r)  = go co-            subst = zipTvSubst [tv1] [TyVarTy tv2 `mkCastTy` mkSymCo k_co]-            ty2' = substTyAddInScope subst ty2 in-            -- We need free vars of ty2 in scope to satisfy the invariant-            -- from Note [The substitution invariant]-            -- This is doing repeated substitutions and probably doesn't-            -- need to, see #11735-        (mkInvForAllTy <$> Pair tv1 tv2 <*> Pair ty1 ty2', r)-    go (FunCo r co1 co2)-      = (mkFunTy <$> coercionKind co1 <*> coercionKind co2, r)-    go (CoVarCo cv) = go_var cv-    go (HoleCo h)   = go_var (coHoleCoVar h)-    go co@(AxiomInstCo ax _ _) = (coercionKind co, coAxiomRole ax)-    go (UnivCo _ r ty1 ty2)  = (Pair ty1 ty2, r)-    go (SymCo co) = first swap $ go co-    go (TransCo co1 co2)-      = let (tys1, r) = go co1 in-        (Pair (pFst tys1) (pSnd $ coercionKind co2), r)-    go (NthCo d co)-      | Just (tv1, _) <- splitForAllTy_maybe ty1-      = ASSERT( d == 0 )-        let (tv2, _) = splitForAllTy ty2 in-        (tyVarKind <$> Pair tv1 tv2, Nominal)--      | otherwise-      = let (tc1,  args1) = splitTyConApp ty1-            (_tc2, args2) = splitTyConApp ty2-        in-        ASSERT2( tc1 == _tc2, ppr d $$ ppr tc1 $$ ppr _tc2 )-        ((`getNth` d) <$> Pair args1 args2, nthRole r tc1 d)--      where-        (Pair ty1 ty2, r) = go co-    go co@(LRCo {}) = (coercionKind co, Nominal)-    go (InstCo co arg) = go_app co [arg]-    go (CoherenceCo co1 co2)-      = let (Pair t1 t2, r) = go co1 in-        (Pair (t1 `mkCastTy` co2) t2, r)-    go co@(KindCo {}) = (coercionKind co, Nominal)-    go (SubCo co) = (coercionKind co, Representational)-    go co@(AxiomRuleCo ax _) = (coercionKind co, coaxrRole ax)--    --------------    go_var cv = (coVarTypes cv, coVarRole cv)--    --------------    go_app :: Coercion -> [Coercion] -> (Pair Type, Role)-    -- Collect up all the arguments and apply all at once-    -- See Note [Nested InstCos]-    go_app (InstCo co arg) args = go_app co (arg:args)-    go_app co              args-      = let (pair, r) = go co in-        (piResultTys <$> pair <*> (sequenceA $ map coercionKind args), r)+coercionKindRole co = (coercionKind co, coercionRole co)  -- | Retrieve the role from a coercion. coercionRole :: Coercion -> Role-coercionRole = snd . coercionKindRole-  -- There's not a better way to do this, because NthCo needs the *kind*-  -- and role of its argument. Luckily, laziness should generally avoid-  -- the need for computing kinds in other cases.+coercionRole = go+  where+    go (Refl r _) = r+    go (TyConAppCo r _ _) = r+    go (AppCo co1 _) = go co1+    go (ForAllCo _ _ co) = go co+    go (FunCo r _ _) = r+    go (CoVarCo cv) = coVarRole cv+    go (HoleCo h)   = coVarRole (coHoleCoVar h)+    go (AxiomInstCo ax _ _) = coAxiomRole ax+    go (UnivCo _ r _ _)  = r+    go (SymCo co) = go co+    go (TransCo co1 _co2) = go co1+    go (NthCo r _d _co) = r+    go (LRCo {}) = Nominal+    go (InstCo co _) = go co+    go (CoherenceCo co1 _) = go co1+    go (KindCo {}) = Nominal+    go (SubCo _) = Representational+    go (AxiomRuleCo ax _) = coaxrRole ax  {- Note [Nested InstCos]@@ -1872,3 +2007,64 @@ cf Type.piResultTys (which in fact we call here).  -}++-- | 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+-- AppCos might yield different kinds. See Note [EtaAppCo] in OptCoercion.+buildCoercion :: Type -> Type -> CoercionN+buildCoercion orig_ty1 orig_ty2 = go orig_ty1 orig_ty2+  where+    go ty1 ty2 | Just ty1' <- coreView ty1 = go ty1' ty2+               | Just ty2' <- coreView ty2 = go ty1 ty2'++    go (CastTy ty1 co) ty2+      = go ty1 ty2 `mkCoherenceLeftCo` co++    go ty1 (CastTy ty2 co)+      = go ty1 ty2 `mkCoherenceRightCo` co++    go ty1@(TyVarTy tv1) _tyvarty+      = ASSERT( case _tyvarty of+                  { TyVarTy tv2 -> tv1 == tv2+                  ; _           -> False      } )+        mkNomReflCo ty1++    go (FunTy arg1 res1) (FunTy arg2 res2)+      = mkFunCo Nominal (go arg1 arg2) (go res1 res2)++    go (TyConApp tc1 args1) (TyConApp tc2 args2)+      = ASSERT( tc1 == tc2 )+        mkTyConAppCo Nominal tc1 (zipWith go args1 args2)++    go (AppTy ty1a ty1b) ty2+      | Just (ty2a, ty2b) <- repSplitAppTy_maybe ty2+      = mkAppCo (go ty1a ty2a) (go ty1b ty2b)++    go ty1 (AppTy ty2a ty2b)+      | Just (ty1a, ty1b) <- repSplitAppTy_maybe ty1+      = mkAppCo (go ty1a ty2a) (go ty1b ty2b)++    go (ForAllTy (TvBndr tv1 _flag1) ty1) (ForAllTy (TvBndr tv2 _flag2) ty2)+      = let kind_co  = go (tyVarKind tv1) (tyVarKind tv2)+            in_scope = mkInScopeSet $ tyCoVarsOfType ty2 `unionVarSet` tyCoVarsOfCo kind_co+            ty2'     = substTyWithInScope in_scope [tv2]+                                                   [mkTyVarTy tv1 `mkCastTy` kind_co]+                                                   ty2+        in+        mkForAllCo tv1 kind_co (go ty1 ty2')++    go ty1@(LitTy lit1) _lit2+      = ASSERT( case _lit2 of+                  { LitTy lit2 -> lit1 == lit2+                  ; _          -> False        } )+        mkNomReflCo ty1++    go (CoercionTy co1) (CoercionTy co2)+      = mkProofIrrelCo Nominal kind_co co1 co2+      where+        kind_co = go (coercionType co1) (coercionType co2)++    go ty1 ty2+      = pprPanic "buildKindCoercion" (vcat [ ppr orig_ty1, ppr orig_ty2+                                           , ppr ty1, ppr ty2 ])
types/Coercion.hs-boot view
@@ -25,19 +25,19 @@ mkUnivCo :: UnivCoProvenance -> Role -> Type -> Type -> Coercion mkSymCo :: Coercion -> Coercion mkTransCo :: Coercion -> Coercion -> Coercion-mkNthCo :: Int -> Coercion -> Coercion+mkNthCo :: HasDebugCallStack => Role -> Int -> Coercion -> Coercion mkLRCo :: LeftOrRight -> Coercion -> Coercion mkInstCo :: Coercion -> Coercion -> Coercion mkCoherenceCo :: Coercion -> Coercion -> Coercion mkKindCo :: Coercion -> Coercion mkSubCo :: Coercion -> Coercion mkProofIrrelCo :: Role -> Coercion -> Coercion -> Coercion -> Coercion--mkFunCos :: Role -> [Coercion] -> Coercion -> Coercion+mkAxiomRuleCo :: CoAxiomRule -> [Coercion] -> Coercion  isReflCo :: Coercion -> Bool isReflexiveCo :: Coercion -> Bool-coVarKindsTypesRole :: CoVar -> (Kind, Kind, Type, Type, Role)+decomposePiCos :: HasDebugCallStack => Coercion -> Pair Type -> [Type] -> ([Coercion], Coercion)+coVarKindsTypesRole :: HasDebugCallStack => CoVar -> (Kind, Kind, Type, Type, Role) coVarRole :: CoVar -> Role  mkCoercionType :: Role -> Type -> Type -> Type
types/FamInstEnv.hs view
@@ -2,7 +2,7 @@ -- -- FamInstEnv: Type checked family instance declarations -{-# LANGUAGE CPP, GADTs, ScopedTypeVariables #-}+{-# LANGUAGE CPP, GADTs, ScopedTypeVariables, BangPatterns #-}  module FamInstEnv (         FamInst(..), FamFlavor(..), famInstAxiom, famInstTyCon, famInstRHS,@@ -53,7 +53,7 @@ import UniqDFM import Outputable import Maybes-import TrieMap+import CoreMap import Unique import Util import Var@@ -63,6 +63,7 @@ import MonadUtils import Control.Monad import Data.List( mapAccumL )+import Data.Array( Array, assocs )  {- ************************************************************************@@ -511,7 +512,7 @@ substitution induced by the match, other branches are surely apart. (See Note [Apartness].) This is similar to what happens with class instance selection, when we need to guarantee that there is only a match and-no unifiers. The exact algorithm is different here because the the+no unifiers. The exact algorithm is different here because the potentially-overlapping group is closed.  As another example, consider this:@@ -974,7 +975,6 @@         -- No match => try next       | otherwise       = find rest-       where         (rough_tcs, match_tys1, match_tys2) = split_tys tpl_tys @@ -1121,21 +1121,25 @@              (target_tys, extra_tys) = splitAt num_pats tys              branches = coAxiomBranches axiom        ; (ind, inst_tys, inst_cos)-           <- findBranch (fromBranches branches) target_tys+           <- findBranch (unMkBranches branches) target_tys        ; return ( ind, inst_tys `chkAppend` extra_tys, inst_cos ) }  -- The axiom must *not* be oversaturated-findBranch :: [CoAxBranch]             -- branches to check-           -> [Type]                   -- target types+findBranch :: Array BranchIndex CoAxBranch+           -> [Type]            -> Maybe (BranchIndex, [Type], [Coercion])     -- coercions relate requested types to returned axiom LHS at role N findBranch branches target_tys-  = go 0 branches+  = foldr go Nothing (assocs branches)   where-    go ind (branch@(CoAxBranch { cab_tvs = tpl_tvs, cab_cvs = tpl_cvs-                               , cab_lhs = tpl_lhs-                               , cab_incomps = incomps }) : rest)-      = let in_scope = mkInScopeSet (unionVarSets $+    go :: (BranchIndex, CoAxBranch)+       -> Maybe (BranchIndex, [Type], [Coercion])+       -> Maybe (BranchIndex, [Type], [Coercion])+    go (index, branch) other+      = let (CoAxBranch { cab_tvs = tpl_tvs, cab_cvs = tpl_cvs+                        , cab_lhs = tpl_lhs+                        , cab_incomps = incomps }) = branch+            in_scope = mkInScopeSet (unionVarSets $                             map (tyCoVarsOfTypes . coAxBranchLHS) incomps)             -- See Note [Flattening] below             flattened_target = flattenTys in_scope target_tys@@ -1145,13 +1149,10 @@           -> -- matching worked & we're apart from all incompatible branches.              -- success              ASSERT( all (isJust . lookupCoVar subst) tpl_cvs )-             Just (ind, substTyVars subst tpl_tvs, substCoVars subst tpl_cvs)+             Just (index, substTyVars subst tpl_tvs, substCoVars subst tpl_cvs)          -- failure. keep looking-        _ -> go (ind+1) rest--    -- fail if no branches left-    go _ [] = Nothing+        _ -> other  -- | Do an apartness check, as described in the "Closed Type Families" paper -- (POPL '14). This should be used when determining if an equation@@ -1204,7 +1205,7 @@  We also benefit because we can piggyback on the liftCoSubstVarBndr function to deal with binders. However, I had to modify that function to work with this-application. Thus, we now have liftCoSubstVarBndrCallback, which takes+application. Thus, we now have liftCoSubstVarBndrUsing, which takes a function used to process the kind of the binder. We don't wish to lift the kind, but instead normalise it. So, we pass in a callback function that processes the kind of the binder.@@ -1400,7 +1401,7 @@   = do { lc1 <- getLC        ; env <- getEnv        ; let callback lc ki = runNormM (normalise_type ki) env lc Nominal-       ; return $ liftCoSubstVarBndrCallback callback lc1 tv }+       ; return $ liftCoSubstVarBndrUsing callback lc1 tv }  -- | a monad for the normalisation functions, reading 'FamInstEnvs', -- a 'LiftingContext', and a 'Role'.@@ -1634,7 +1635,7 @@     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 (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 (CoherenceCo c1 c2)   = go_co c1 `unionVarSet` go_co c2
types/InstEnv.hs view
@@ -18,9 +18,12 @@         fuzzyClsInstCmp, orphNamesOfClsInst,          InstEnvs(..), VisibleOrphanModules, InstEnv,-        emptyInstEnv, extendInstEnv, deleteFromInstEnv, identicalClsInstHead,+        emptyInstEnv, extendInstEnv,+        deleteFromInstEnv, deleteDFunFromInstEnv,+        identicalClsInstHead,         extendInstEnvList, lookupUniqueInstEnv, lookupInstEnv, instEnvElts,-        memberInstEnv, instIsVisible,+        memberInstEnv,+        instIsVisible,         classInstances, instanceBindFun,         instanceCantMatch, roughMatchTcs,         isOverlappable, isOverlapping, isIncoherent@@ -432,11 +435,11 @@   -- NB: Instances from the interactive package always are visible. We can't   -- add interactive modules to the set since we keep creating new ones   -- as a GHCi session progresses.-  | isInteractiveModule mod     = True-  | IsOrphan <- is_orphan ispec = mod `elemModuleSet` vis_mods-  | otherwise                   = True-  where-    mod = nameModule $ is_dfun_name ispec+  = case nameModule_maybe (is_dfun_name ispec) of+      Nothing -> True+      Just mod | isInteractiveModule mod     -> True+               | IsOrphan <- is_orphan ispec -> mod `elemModuleSet` vis_mods+               | otherwise                   -> True  classInstances :: InstEnvs -> Class -> [ClsInst] classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls@@ -471,6 +474,15 @@   where     adjust (ClsIE items) = ClsIE (filterOut (identicalClsInstHead ins_item) items) +deleteDFunFromInstEnv :: InstEnv -> DFunId -> InstEnv+-- Delete a specific instance fron an InstEnv+deleteDFunFromInstEnv inst_env dfun+  = adjustUDFM adjust inst_env cls+  where+    (_, _, cls, _) = tcSplitDFunTy (idType dfun)+    adjust (ClsIE items) = ClsIE (filterOut same_dfun items)+    same_dfun (ClsInst { is_dfun = dfun' }) = dfun == dfun'+ identicalClsInstHead :: ClsInst -> ClsInst -> Bool -- ^ True when when the instance heads are the same -- e.g.  both are   Eq [(a,b)]@@ -549,24 +561,39 @@ Now suppose that, in some client module, we are searching for an instance of the target constraint (C ty1 .. tyn). The search works like this. - * Find all instances I that match the target constraint; that is, the-   target constraint is a substitution instance of I. These instance-   declarations are the candidates.+*  Find all instances `I` that *match* the target constraint; that is, the+   target constraint is a substitution instance of `I`. These instance+   declarations are the *candidates*. - * Find all non-candidate instances that unify with the target-   constraint. Such non-candidates instances might match when the-   target constraint is further instantiated. If all of them are-   incoherent, proceed; if not, the search fails.+*  Eliminate any candidate `IX` for which both of the following hold: - * Eliminate any candidate IX for which both of the following hold:-   * There is another candidate IY that is strictly more specific;-     that is, IY is a substitution instance of IX but not vice versa.+   -  There is another candidate `IY` that is strictly more specific; that+      is, `IY` is a substitution instance of `IX` but not vice versa. -   * Either IX is overlappable or IY is overlapping.+   -  Either `IX` is *overlappable*, or `IY` is *overlapping*. (This+      "either/or" design, rather than a "both/and" design, allow a+      client to deliberately override an instance from a library,+      without requiring a change to the library.) - * If only one candidate remains, pick it. Otherwise if all remaining-   candidates are incoherent, pick an arbitrary candidate. Otherwise fail.+-  If exactly one non-incoherent candidate remains, select it. If all+   remaining candidates are incoherent, select an arbitrary one.+   Otherwise the search fails (i.e. when more than one surviving+   candidate is not incoherent). +-  If the selected candidate (from the previous step) is incoherent, the+   search succeeds, returning that candidate.++-  If not, find all instances that *unify* with the target constraint,+   but do not *match* it. Such non-candidate instances might match when+   the target constraint is further instantiated. If all of them are+   incoherent, the search succeeds, returning the selected candidate; if+   not, the search fails.++Notice that these rules are not influenced by flag settings in the+client module, where the instances are *used*. These rules make it+possible for a library author to design a library that relies on+overlapping instances without the client having to know.+ Note [Overlapping instances]   (NB: these notes are quite old) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Overlap is permitted, but only in such a way that one can make@@ -676,7 +703,7 @@ exists.  --Jeff-v+ BUT NOTE [Nov 2001]: we must actually *unify* not reverse-match in this test.  Suppose the instance envt had     ..., forall a b. C a a b, ..., forall a b c. C a b c, ...@@ -741,7 +768,8 @@                -> VisibleOrphanModules   -- But filter against this                -> Class -> [Type]  -- What we are looking for                -> ([InstMatch],    -- Successful matches-                   [ClsInst])     -- These don't match but do unify+                   [ClsInst])      -- These don't match but do unify+                                   -- (no incoherent ones in here) -- The second component of the result pair happens when we look up --      Foo [a] -- in an InstEnv that has entries for@@ -778,7 +806,8 @@       = find ((item, map (lookupTyVar subst) tpl_tvs) : ms) us rest          -- Does not match, so next check whether the things unify-        -- See Note [Overlapping instances] and Note [Incoherent instances]+        -- See Note [Overlapping instances]+        -- Ignore ones that are incoherent: Note [Incoherent instances]       | isIncoherent item       = find ms us rest 
types/Kind.hs view
@@ -7,14 +7,10 @@          -- ** Predicates on Kinds         isLiftedTypeKind, isUnliftedTypeKind,-        isConstraintKind,         isTYPEApp,-        returnsTyCon, returnsConstraintKind,         isConstraintKindCon,          classifiesTypeWithValues,-        isStarKind, isStarKindSynonymTyCon,-        tcIsStarKind,         isKindLevPoly        ) where @@ -22,7 +18,7 @@  import GhcPrelude -import {-# SOURCE #-} Type    ( coreView, tcView+import {-# SOURCE #-} Type    ( coreView                               , splitTyConApp_maybe ) import {-# SOURCE #-} DataCon ( DataCon ) @@ -40,7 +36,7 @@ *                                                                      * ************************************************************************ -Note [Kind Constraint and kind *]+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@@ -51,27 +47,22 @@    to f.  However, once type inference is over, there is *no* distinction between-Constraint and *.  Indeed we can have coercions between the two. Consider+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 *.+so on the left we have Constraint, and on the right we have Type. See Trac #7451. -Bottom line: although '*' and 'Constraint' are distinct TyCons, with+Bottom line: although 'Type' and 'Constraint' are distinct TyCons, with distinct uniques, they are treated as equal at all times except during type inference. -} -isConstraintKind :: Kind -> Bool isConstraintKindCon :: TyCon -> Bool--isConstraintKindCon   tc = tyConUnique tc == constraintKindTyConKey--isConstraintKind (TyConApp tc _) = isConstraintKindCon tc-isConstraintKind _               = False+isConstraintKindCon tc = tyConUnique tc == constraintKindTyConKey  isTYPEApp :: Kind -> Maybe DataCon isTYPEApp (TyConApp tc args)@@ -82,22 +73,13 @@   = Just dc isTYPEApp _ = Nothing --- | Does the given type "end" in the given tycon? For example @k -> [a] -> *@--- ends in @*@ and @Maybe a -> [a]@ ends in @[]@.-returnsTyCon :: Unique -> Type -> Bool-returnsTyCon tc_u (ForAllTy _ ty)  = returnsTyCon tc_u ty-returnsTyCon tc_u (FunTy    _ ty)  = returnsTyCon tc_u ty-returnsTyCon tc_u (TyConApp tc' _) = tc' `hasKey` tc_u-returnsTyCon _  _                  = False--returnsConstraintKind :: Kind -> Bool-returnsConstraintKind = returnsTyCon 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( isStarKind k || _is_type, ppr k )-                      -- the isStarKind check is necessary b/c of Constraint+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'@@ -128,27 +110,4 @@ -- like *, #, TYPE Lifted, TYPE v, Constraint. classifiesTypeWithValues :: Kind -> Bool -- ^ True of any sub-kind of OpenTypeKind-classifiesTypeWithValues t | Just t' <- coreView t = classifiesTypeWithValues t'-classifiesTypeWithValues (TyConApp tc [_]) = tc `hasKey` tYPETyConKey-classifiesTypeWithValues _ = False---- | Is this kind equivalent to *?-tcIsStarKind :: Kind -> Bool-tcIsStarKind k | Just k' <- tcView k = isStarKind k'-tcIsStarKind (TyConApp tc [TyConApp ptr_rep []])-  =  tc      `hasKey` tYPETyConKey-  && ptr_rep `hasKey` liftedRepDataConKey-tcIsStarKind _ = False---- | Is this kind equivalent to *?-isStarKind :: Kind -> Bool-isStarKind k | Just k' <- coreView k = isStarKind k'-isStarKind (TyConApp tc [TyConApp ptr_rep []])-  =  tc      `hasKey` tYPETyConKey-  && ptr_rep `hasKey` liftedRepDataConKey-isStarKind _ = False-                              -- See Note [Kind Constraint and kind *]---- | Is the tycon @Constraint@?-isStarKindSynonymTyCon :: TyCon -> Bool-isStarKindSynonymTyCon tc = tc `hasKey` constraintKindTyConKey+classifiesTypeWithValues = isTYPE (const True)
types/OptCoercion.hs view
@@ -83,18 +83,22 @@  -} -optCoercion :: TCvSubst -> Coercion -> NormalCo+optCoercion :: DynFlags -> TCvSubst -> Coercion -> NormalCo -- ^ optCoercion applies a substitution to a coercion, --   *and* optimises it to reduce its size-optCoercion env co-  | hasNoOptCoercion unsafeGlobalDynFlags = substCo env co+optCoercion dflags env co+  | hasNoOptCoercion dflags = substCo env co+  | otherwise               = optCoercion' env co++optCoercion' :: TCvSubst -> Coercion -> NormalCo+optCoercion' env co   | debugIsOn   = let out_co = opt_co1 lc False co         (Pair in_ty1  in_ty2,  in_role)  = coercionKindRole co         (Pair out_ty1 out_ty2, out_role) = coercionKindRole out_co     in-    ASSERT2( substTyUnchecked env in_ty1 `eqType` out_ty1 &&-             substTyUnchecked env in_ty2 `eqType` out_ty2 &&+    ASSERT2( substTy env in_ty1 `eqType` out_ty1 &&+             substTy env in_ty2 `eqType` out_ty2 &&              in_role == out_role            , text "optCoercion changed types!"              $$ hang (text "in_co:") 2 (ppr co)@@ -269,10 +273,41 @@     co2' = opt_co4_wrap env sym rep r co2     in_scope = lcInScopeSet env +opt_co4 env _sym rep r (NthCo _r n (Refl _r2 ty))+  | Just (_tc, args) <- ASSERT( r == _r )+                        splitTyConApp_maybe ty+  = liftCoSubst (chooseRole rep r) env (args `getNth` n)+  | n == 0+  , Just (tv, _) <- splitForAllTy_maybe ty+  = liftCoSubst (chooseRole rep r) env (tyVarKind tv) -opt_co4 env sym rep r co@(NthCo {})-  = opt_nth_co env sym rep r co+opt_co4 env sym rep r (NthCo r1 n (TyConAppCo _ _ cos))+  = ASSERT( r == r1 )+    opt_co4_wrap env sym rep r (cos `getNth` n) +opt_co4 env sym rep r (NthCo _r n (ForAllCo _ eta _))+  = ASSERT( r == _r )+    ASSERT( n == 0 )+    opt_co4_wrap env sym rep Nominal eta++opt_co4 env sym rep r (NthCo _r n co)+  | TyConAppCo _ _ cos <- co'+  , let nth_co = cos `getNth` n+  = if rep && (r == Nominal)+      -- keep propagating the SubCo+    then opt_co4_wrap (zapLiftingContext env) False True Nominal nth_co+    else nth_co++  | ForAllCo _ eta _ <- co'+  = if rep+    then opt_co4_wrap (zapLiftingContext env) False True Nominal eta+    else eta++  | otherwise+  = wrapRole rep r $ NthCo r n co'+  where+    co' = opt_co1 env sym co+ opt_co4 env sym rep r (LRCo lr co)   | Just pr_co <- splitAppCo_maybe co   = ASSERT( r == Nominal )@@ -319,7 +354,7 @@    | TransCo col1' cor1' <- co1'   = if sym then opt_trans in_scope col1'-                  (optCoercion (zapTCvSubst (lcTCvSubst env))+                  (optCoercion' (zapTCvSubst (lcTCvSubst env))                                (mkCoherenceRightCo cor1' co2'))            else opt_trans in_scope (mkCoherenceCo col1' co2') cor1' @@ -399,7 +434,7 @@       -- NB: prov must not be the two interesting ones (ProofIrrel & Phantom);       -- Phantom is already taken care of, and ProofIrrel doesn't relate tyconapps   = let roles    = tyConRolesX role tc1-        arg_cos  = zipWith3 (mkUnivCo prov) roles tys1 tys2+        arg_cos  = zipWith3 (mkUnivCo prov') roles tys1 tys2         arg_cos' = zipWith (opt_co4 env sym False) roles arg_cos     in     mkTyConAppCo role tc1 arg_cos'@@ -411,13 +446,13 @@       -- NB: prov isn't interesting here either   = let k1   = tyVarKind tv1         k2   = tyVarKind tv2-        eta  = mkUnivCo prov Nominal k1 k2+        eta  = mkUnivCo prov' Nominal k1 k2           -- eta gets opt'ed soon, but not yet.         ty2' = substTyWith [tv2] [TyVarTy tv1 `mkCastTy` eta] ty2          (env', tv1', eta') = optForAllCoBndr env sym tv1 eta     in-    mkForAllCo tv1' eta' (opt_univ env' sym prov role ty1 ty2')+    mkForAllCo tv1' eta' (opt_univ env' sym prov' role ty1 ty2')    | otherwise   = let ty1 = substTyUnchecked (lcSubstLeft  env) oty1@@ -435,62 +470,6 @@       PluginProv _       -> prov  ---------------- NthCo must be handled separately, because it's the one case where we can't--- tell quickly what the component coercion's role is from the containing--- coercion. To avoid repeated coercionRole calls as opt_co1 calls opt_co2,--- we just look for nested NthCo's, which can happen in practice.-opt_nth_co :: LiftingContext -> SymFlag -> ReprFlag -> Role -> Coercion -> NormalCo-opt_nth_co env sym rep r = go []-  where-    go ns (NthCo n co) = go (n:ns) co-      -- previous versions checked if the tycon is decomposable. This-      -- is redundant, because a non-decomposable tycon under an NthCo-      -- is entirely bogus. See docs/core-spec/core-spec.pdf.-    go ns co-      = opt_nths ns co--      -- try to resolve 1 Nth-    push_nth n (Refl r1 ty)-      | Just (tc, args) <- splitTyConApp_maybe ty-      = Just (Refl (nthRole r1 tc n) (args `getNth` n))-      | n == 0-      , Just (tv, _) <- splitForAllTy_maybe ty-      = Just (Refl Nominal (tyVarKind tv))-    push_nth n (TyConAppCo _ _ cos)-      = Just (cos `getNth` n)-    push_nth 0 (ForAllCo _ eta _)-      = Just eta-    push_nth _ _ = Nothing--      -- input coercion is *not* yet sym'd or opt'd-    opt_nths [] co = opt_co4_wrap env sym rep r co-    opt_nths (n:ns) co-      | Just co' <- push_nth n co-      = opt_nths ns co'--      -- here, the co isn't a TyConAppCo, so we opt it, hoping to get-      -- a TyConAppCo as output. We don't know the role, so we use-      -- opt_co1. This is slightly annoying, because opt_co1 will call-      -- coercionRole, but as long as we don't have a long chain of-      -- NthCo's interspersed with some other coercion former, we should-      -- be OK.-    opt_nths ns co = opt_nths' ns (opt_co1 env sym co)--      -- input coercion *is* sym'd and opt'd-    opt_nths' [] co-      = if rep && (r == Nominal)-            -- propagate the SubCo:-        then opt_co4_wrap (zapLiftingContext env) False True r co-        else co-    opt_nths' (n:ns) co-      | Just co' <- push_nth n co-      = opt_nths' ns co'-    opt_nths' ns co = wrapRole rep r (mk_nths ns co)--    mk_nths [] co = co-    mk_nths (n:ns) co = mk_nths ns (mkNthCo n co)--------------- opt_transList :: InScopeSet -> [NormalCo] -> [NormalCo] -> [NormalCo] opt_transList is = zipWith (opt_trans is) @@ -529,11 +508,13 @@ opt_trans_rule :: InScopeSet -> NormalNonIdCo -> NormalNonIdCo -> Maybe NormalCo  -- Push transitivity through matching destructors-opt_trans_rule is in_co1@(NthCo d1 co1) in_co2@(NthCo d2 co2)+opt_trans_rule is in_co1@(NthCo r1 d1 co1) in_co2@(NthCo r2 d2 co2)   | d1 == d2+  , coercionRole co1 == coercionRole co2   , co1 `compatible_co` co2-  = fireTransRule "PushNth" in_co1 in_co2 $-    mkNthCo d1 (opt_trans is co1 co2)+  = ASSERT( r1 == r2 )+    fireTransRule "PushNth" in_co1 in_co2 $+    mkNthCo r1 d1 (opt_trans is co1 co2)  opt_trans_rule is in_co1@(LRCo d1 co1) in_co2@(LRCo d2 co2)   | d1 == d2@@ -577,9 +558,8 @@     mkFunCo r1 (opt_trans is co1a co2a) (opt_trans is co1b co2b)  opt_trans_rule is in_co1@(AppCo co1a co1b) in_co2@(AppCo co2a co2b)-  = fireTransRule "TrPushApp" in_co1 in_co2 $-    mkAppCo (opt_trans is co1a co2a)-            (opt_trans is co1b co2b)+  -- Must call opt_trans_rule_app; see Note [EtaAppCo]+  = opt_trans_rule_app is in_co1 in_co2 co1a [co1b] co2a [co2b]  -- Eta rules opt_trans_rule is co1@(TyConAppCo r tc cos1) co2@@ -596,15 +576,11 @@  opt_trans_rule is co1@(AppCo co1a co1b) co2   | Just (co2a,co2b) <- etaAppCo_maybe co2-  = fireTransRule "EtaAppL" co1 co2 $-    mkAppCo (opt_trans is co1a co2a)-            (opt_trans is co1b co2b)+  = opt_trans_rule_app is co1 co2 co1a [co1b] co2a [co2b]  opt_trans_rule is co1 co2@(AppCo co2a co2b)   | Just (co1a,co1b) <- etaAppCo_maybe co1-  = fireTransRule "EtaAppR" co1 co2 $-    mkAppCo (opt_trans is co1a co2a)-            (opt_trans is co1b co2b)+  = opt_trans_rule_app is co1 co2 co1a [co1b] co2a [co2b]  -- Push transitivity inside forall opt_trans_rule is co1 co2@@ -618,11 +594,16 @@    where   push_trans tv1 eta1 r1 tv2 eta2 r2+    -- Given:+    --   co1 = \/ tv1 : eta1. r1+    --   co2 = \/ tv2 : eta2. r2+    -- Wanted:+    --   \/tv1 : (eta1;eta2).  (r1; r2[tv2 |-> tv1 |> eta1])     = fireTransRule "EtaAllTy" co1 co2 $       mkForAllCo tv1 (opt_trans is eta1 eta2) (opt_trans is' r1 r2')     where       is' = is `extendInScopeSet` tv1-      r2' = substCoWithUnchecked [tv2] [TyVarTy tv1] r2+      r2' = substCoWithUnchecked [tv2] [mkCastTy (TyVarTy tv1) eta1] r2  -- Push transitivity inside axioms opt_trans_rule is co1 co2@@ -698,10 +679,45 @@  opt_trans_rule _ _ _ = Nothing +-- See Note [EtaAppCo]+opt_trans_rule_app :: InScopeSet+                   -> Coercion   -- original left-hand coercion (printing only)+                   -> Coercion   -- original right-hand coercion (printing only)+                   -> Coercion   -- left-hand coercion "function"+                   -> [Coercion] -- left-hand coercion "args"+                   -> Coercion   -- right-hand coercion "function"+                   -> [Coercion] -- right-hand coercion "args"+                   -> Maybe Coercion+opt_trans_rule_app is orig_co1 orig_co2 co1a co1bs co2a co2bs+  | AppCo co1aa co1ab <- co1a+  , Just (co2aa, co2ab) <- etaAppCo_maybe co2a+  = opt_trans_rule_app is orig_co1 orig_co2 co1aa (co1ab:co1bs) co2aa (co2ab:co2bs)++  | AppCo co2aa co2ab <- co2a+  , Just (co1aa, co1ab) <- etaAppCo_maybe co1a+  = opt_trans_rule_app is orig_co1 orig_co2 co1aa (co1ab:co1bs) co2aa (co2ab:co2bs)++  | otherwise+  = ASSERT( co1bs `equalLength` co2bs )+    fireTransRule ("EtaApps:" ++ show (length co1bs)) orig_co1 orig_co2 $+    let Pair _ rt1a = coercionKind co1a+        Pair lt2a _ = coercionKind co2a++        Pair _ rt1bs = traverse coercionKind co1bs+        Pair lt2bs _ = traverse coercionKind co2bs++        kcoa = mkKindCo $ buildCoercion lt2a rt1a+        kcobs = map mkKindCo $ zipWith buildCoercion lt2bs rt1bs++        co2a' = mkCoherenceLeftCo co2a kcoa+        co2bs' = zipWith mkCoherenceLeftCo co2bs kcobs+    in+    mkAppCos (opt_trans is co1a co2a')+             (zipWith (opt_trans is) co1bs co2bs')+ fireTransRule :: String -> Coercion -> Coercion -> Coercion -> Maybe Coercion fireTransRule _rule _co1 _co2 res-  = -- pprTrace ("Trans rule fired: " ++ _rule) (vcat [ppr _co1, ppr _co2, ppr res]) $-    Just res+  = Just res  {- Note [Conflict checking with AxiomInstCo]@@ -758,6 +774,65 @@ families. At the time of writing, I (Richard Eisenberg) couldn't think of a way of detecting this any more efficient than just building the optimised coercion and checking.++Note [EtaAppCo]+~~~~~~~~~~~~~~~+Suppose we're trying to optimize (co1a co1b ; co2a co2b). Ideally, we'd+like to rewrite this to (co1a ; co2a) (co1b ; co2b). The problem is that+the resultant coercions might not be well kinded. Here is an example (things+labeled with x don't matter in this example):++  k1 :: Type+  k2 :: Type++  a :: k1 -> Type+  b :: k1++  h :: k1 ~ k2++  co1a :: x1 ~ (a |> (h -> <Type>)+  co1b :: x2 ~ (b |> h)++  co2a :: a ~ x3+  co2b :: b ~ x4++First, convince yourself of the following:++  co1a co1b :: x1 x2 ~ (a |> (h -> <Type>)) (b |> h)+  co2a co2b :: a b   ~ x3 x4++  (a |> (h -> <Type>)) (b |> h) `eqType` a b++That last fact is due to Note [Non-trivial definitional equality] in TyCoRep,+where we ignore coercions in types as long as two types' kinds are the same.+In our case, we meet this last condition, because++  (a |> (h -> <Type>)) (b |> h) :: Type+    and+  a b :: Type++So the input coercion (co1a co1b ; co2a co2b) is well-formed. But the+suggested output coercions (co1a ; co2a) and (co1b ; co2b) are not -- the+kinds don't match up.++The solution here is to twiddle the kinds in the output coercions. First, we+need to find coercions++  ak :: kind(a |> (h -> <Type>)) ~ kind(a)+  bk :: kind(b |> h)             ~ kind(b)++This can be done with mkKindCo and buildCoercion. The latter assumes two+types are identical modulo casts and builds a coercion between them.++Then, we build (co1a ; co2a |> sym ak) and (co1b ; co2b |> sym bk) as the+output coercions. These are well-kinded. (We cast the right-hand coercion+because mkCoherenceLeftCo is smaller than mkCoherenceRightCo.)++Also, note that all of this is done after accumulated any nested AppCo+parameters. This step is to avoid quadratic behavior in calling coercionKind.++The problem described here was first found in dependent/should_compile/dynamic-paper.+ -}  -- | Check to make sure that an AxInstCo is internally consistent.@@ -895,7 +970,7 @@   | Pair ty1 ty2  <- coercionKind co   , Just (tv1, _) <- splitForAllTy_maybe ty1   , isForAllTy ty2-  , let kind_co = mkNthCo 0 co+  , let kind_co = mkNthCo Nominal 0 co   = Just ( tv1, kind_co          , mkInstCo co (mkNomReflCo (TyVarTy tv1) `mkCoherenceRightCo` kind_co) ) @@ -934,9 +1009,11 @@   , tc1 == tc2   , isInjectiveTyCon tc r  -- See Note [NthCo and newtypes] in TyCoRep   , let n = length tys1+  , tys2 `lengthIs` n      -- This can fail in an erroneous progam+                           -- E.g. T a ~# T a b+                           -- Trac #14607   = ASSERT( tc == tc1 )-    ASSERT( tys2 `lengthIs` n )-    Just (decomposeCo n co)+    Just (decomposeCo n co (tyConRolesX r tc1))     -- NB: n might be <> tyConArity tc     -- e.g.   data family T a :: * -> *     --        g :: T a b ~ T c d@@ -971,4 +1048,4 @@ optForAllCoBndr :: LiftingContext -> Bool                 -> TyVar -> Coercion -> (LiftingContext, TyVar, Coercion) optForAllCoBndr env sym-  = substForAllCoBndrCallbackLC sym (opt_co4_wrap env sym False Nominal) env+  = substForAllCoBndrUsingLC sym (opt_co4_wrap env sym False Nominal) env
types/TyCoRep.hs view
@@ -26,19 +26,22 @@         Type(..),         TyLit(..),         KindOrType, Kind,+        KnotTied,         PredType, ThetaType,      -- Synonyms         ArgFlag(..),          -- * Coercions         Coercion(..),         UnivCoProvenance(..),-        CoercionHole(..), coHoleCoVar,+        CoercionHole(..), coHoleCoVar, setCoHoleCoVar,         CoercionN, CoercionR, CoercionP, KindCoercion,+        MCoercion(..), MCoercionR,          -- * Functions over types         mkTyConTy, mkTyVarTy, mkTyVarTys,         mkFunTy, mkFunTys, mkForAllTy, mkForAllTys,         mkPiTy, mkPiTys,+        isTYPE,         isLiftedTypeKind, isUnliftedTypeKind,         isCoercionType, isRuntimeRepTy, isRuntimeRepVar,         sameVis,@@ -61,7 +64,7 @@         pprTyVar, pprTyVars,         pprThetaArrowTy, pprClassPred,         pprKind, pprParendKind, pprTyLit,-        TyPrec(..), maybeParen,+        PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,         pprDataCons, ppSuggestExplicitKinds,          pprCo, pprParendCo,@@ -110,12 +113,12 @@         substCoUnchecked, substCoWithUnchecked,         substTyWithInScope,         substTys, substTheta,-        lookupTyVar, substTyVarBndr,+        lookupTyVar, substTyVarBndr, substTyVarBndrs,         substCo, substCos, substCoVar, substCoVars, lookupCoVar,         substCoVarBndr, cloneTyVarBndr, cloneTyVarBndrs,         substTyVar, substTyVars,         substForAllCoBndr,-        substTyVarBndrCallback, substForAllCoBndrCallback,+        substTyVarBndrUsing, substForAllCoBndrUsing,         checkValidSubst, isValidTCvSubst,          -- * Tidying type related things up for printing@@ -165,7 +168,8 @@ import FV  -- others-import BasicTypes ( LeftOrRight(..), TyPrec(..), maybeParen, pickLR )+import BasicTypes ( LeftOrRight(..), PprPrec(..), topPrec, sigPrec, opPrec+                  , funPrec, appPrec, maybeParen, pickLR ) import PrelNames import Outputable import DynFlags@@ -264,8 +268,10 @@         Type         Type            -- ^ Type application to something other than a 'TyCon'. Parameters:                         ---                        --  1) Function: must /not/ be a 'TyConApp',+                        --  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 @@ -298,8 +304,8 @@         Type         KindCoercion  -- ^ A kind cast. The coercion is always nominal.                       -- INVARIANT: The cast is never refl.-                      -- INVARIANT: The cast is "pushed down" as far as it-                      -- can go. See Note [Pushing down casts]+                      -- 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@@ -339,19 +345,12 @@  This kind instantiation only happens in TyConApp currently. -Note [Pushing down casts]-~~~~~~~~~~~~~~~~~~~~~~~~~-Suppose we have (a :: k1 -> *), (b :: k1), and (co :: * ~ q).-The type (a b |> co) is `eqType` to ((a |> co') b), where-co' = (->) <k1> co. Thus, to make this visible to functions-that inspect types, we always push down coercions, preferring-the second form. Note that this also applies to TyConApps!- 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. More-generally, the `eqType` function, which defines Core's type equality+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@@ -384,6 +383,9 @@ 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@@ -404,12 +406,74 @@  Another helpful principle with eqType is this: - ** If (t1 eqType t2) then I can replace t1 by t2 anywhere. **+ (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.++These invariants are all documented above, in the declaration for Type.+ -} +-- | 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+ {- ********************************************************************** *                                                                       *                   TyBinder and ArgFlag@@ -486,7 +550,8 @@ |  tvis :: ArgFlag |  tvis = Inferred:            f :: forall {a}. type    Arg not allowed:  f |  tvis = Specified:           f :: forall a. type      Arg optional:     f  or  f @Int-|  tvis = Required:   Illegal: See Note [No Required TyBinder in terms]+|  tvis = Required:            T :: forall k -> type    Arg required:     T *+|    This last form is illegal in terms: See Note [No Required TyBinder in terms] | | TvBndr k cvis :: TyConBinder, in the TyConBinders of a TyCon |  cvis :: TyConBndrVis@@ -500,9 +565,7 @@     optional kind applications, thus (T @*), but we have not     yet implemented that ----- Examples of where the different visibilities come from -------In term declarations:+---- In term declarations ----  * Inferred.  Function defn, with no signature:  f1 x = x   We infer f1 :: forall {a}. a -> a, with 'a' Inferred@@ -533,7 +596,7 @@   Inferred - from inferred types (e.g. no pattern type signature)            - or from inferred kind polymorphism -In type declarations:+---- In type declarations ----  * Inferred (k)      data T1 a b = MkT1 (a b)@@ -562,6 +625,19 @@   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+ ---- Printing -----   We print forall types with enough syntax to tell you their visibility@@ -705,22 +781,28 @@ Some basic functions, put here to break loops eg with the pretty printer -} -is_TYPE :: (   Type    -- the single argument to TYPE; not a synonym-            -> Bool )  -- what to return-        -> Kind -> Bool-is_TYPE f ki | Just ki' <- coreView ki = is_TYPE f ki'-is_TYPE f (TyConApp tc [arg])+-- | If a type is @'TYPE' r@ for some @r@, run the predicate argument on @r@.+-- Otherwise, return 'False'.+--+-- This function does not distinguish between 'Constraint' and 'Type'. For a+-- version which does distinguish between the two, see 'tcIsTYPE'.+isTYPE :: (   Type    -- the single argument to TYPE; not a synonym+           -> Bool )  -- what to return+       -> Kind -> Bool+isTYPE f ki | Just ki' <- coreView ki = isTYPE f ki'+isTYPE f (TyConApp tc [arg])   | tc `hasKey` tYPETyConKey   = go arg     where       go ty | Just ty' <- coreView ty = go ty'       go ty = f ty-is_TYPE _ _ = False+isTYPE _ _ = False --- | This version considers Constraint to be distinct from *. Returns True--- if the argument is equivalent to Type and False otherwise.+-- | 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 = is_TYPE is_lifted+isLiftedTypeKind = isTYPE is_lifted   where     is_lifted (TyConApp lifted_rep []) = lifted_rep `hasKey` liftedRepDataConKey     is_lifted _                        = False@@ -729,9 +811,9 @@ -- Note that this returns False for levity-polymorphic kinds, which may -- be specialized to a kind that classifies unlifted types. isUnliftedTypeKind :: Kind -> Bool-isUnliftedTypeKind = is_TYPE is_unlifted+isUnliftedTypeKind = isTYPE is_unlifted   where-    is_unlifted (TyConApp rr _args) = not (rr `hasKey` liftedRepDataConKey)+    is_unlifted (TyConApp rr _args) = elem (getUnique rr) unliftedRepDataConKeys     is_unlifted _                   = False  -- | Is this the type 'RuntimeRep'?@@ -813,20 +895,25 @@      -- 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 -    -- The number coercions should match exactly the expectations-    -- of the CoAxiomRule (i.e., the rule is fully saturated).-  | AxiomRuleCo CoAxiomRule [Coercion]--  | NthCo  Int         Coercion     -- Zero-indexed; decomposes (T t0 ... tn)-    -- :: _ -> e -> ?? (inverse of TyConAppCo, see Note [TyConAppCo roles])+  | 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@@ -856,6 +943,15 @@ 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+type MCoercionR = MCoercion+ {- Note [Refl invariant] ~~~~~~~~~~~~~~~~~~~~~@@ -1136,7 +1232,7 @@ 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 0 co :: forall a b. a ~R b+  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.@@ -1145,6 +1241,23 @@ 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:@@ -1213,12 +1326,17 @@ -- | 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"@@ -1253,7 +1371,7 @@  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+  - 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@@ -1269,16 +1387,25 @@  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. +  - 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.+    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,@@ -1288,15 +1415,27 @@    type-checking vs forms that can appear in core proper, holes in Core will    be ruled out. - * The Unique carried with a coercion hole is used solely for debugging.+ * See Note [CoercionHoles and coercion free variables] - * Coercion holes can be compared for equality only like other coercions:-   only by looking at the types coerced.+ * Coercion holes can be compared for equality like other coercions:+   by looking at the types coerced. - * We don't use holes for other evidence because other evidence wants to-   be /shared/. But coercions are entirely erased, so there's little-   benefit to sharing. +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:@@ -1460,13 +1599,14 @@   = 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+                     `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 (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 (CoherenceCo c1 c2) fv_cand in_scope acc = (tyCoFVsOfCo c1 `unionFV` tyCoFVsOfCo c2) fv_cand in_scope acc@@ -1524,11 +1664,12 @@ coVarsOfCo (FunCo _ co1 co2)    = coVarsOfCo co1 `unionVarSet` coVarsOfCo co2 coVarsOfCo (CoVarCo v)          = coVarsOfCoVar v coVarsOfCo (HoleCo h)           = coVarsOfCoVar (coHoleCoVar h)+                                  -- See Note [CoercionHoles and coercion free variables] coVarsOfCo (AxiomInstCo _ _ as) = coVarsOfCos as coVarsOfCo (UnivCo p _ t1 t2)   = coVarsOfProv p `unionVarSet` coVarsOfTypes [t1, t2] coVarsOfCo (SymCo co)           = coVarsOfCo co coVarsOfCo (TransCo co1 co2)    = coVarsOfCo co1 `unionVarSet` coVarsOfCo co2-coVarsOfCo (NthCo _ co)         = coVarsOfCo co+coVarsOfCo (NthCo _ _ co)       = coVarsOfCo co coVarsOfCo (LRCo _ co)          = coVarsOfCo co coVarsOfCo (InstCo co arg)      = coVarsOfCo co `unionVarSet` coVarsOfCo arg coVarsOfCo (CoherenceCo c1 c2)  = coVarsOfCos [c1, c2]@@ -1635,7 +1776,7 @@                                         noFreeVarsOfType t2 noFreeVarsOfCo (SymCo co)             = noFreeVarsOfCo co noFreeVarsOfCo (TransCo co1 co2)      = noFreeVarsOfCo co1 && noFreeVarsOfCo co2-noFreeVarsOfCo (NthCo _ co)           = noFreeVarsOfCo co+noFreeVarsOfCo (NthCo _ _ co)         = noFreeVarsOfCo co noFreeVarsOfCo (LRCo _ co)            = noFreeVarsOfCo co noFreeVarsOfCo (InstCo co1 co2)       = noFreeVarsOfCo co1 && noFreeVarsOfCo co2 noFreeVarsOfCo (CoherenceCo co1 co2)  = noFreeVarsOfCo co1 && noFreeVarsOfCo co2@@ -1677,7 +1818,7 @@   = TCvSubst InScopeSet -- The in-scope type and kind variables              TvSubstEnv -- Substitutes both type and kind variables              CvSubstEnv -- Substitutes coercion variables-        -- See Note [Apply Once]+        -- See Note [Substitutions apply only once]         -- and Note [Extending the TvSubstEnv]         -- and Note [Substituting types and coercions]         -- and Note [The substitution invariant]@@ -1685,21 +1826,51 @@ -- | A substitution of 'Type's for 'TyVar's --                 and 'Kind's for 'KindVar's type TvSubstEnv = TyVarEnv Type-        -- A TvSubstEnv is used both inside a TCvSubst (with the apply-once-        -- invariant discussed in Note [Apply 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+  -- 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 [Apply Once]-~~~~~~~~~~~~~~~~~+{- 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. (List 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+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@@ -1707,9 +1878,9 @@ Then we also end up with a substitution that permutes type variables. Other variations happen to; for example [a -> (a, b)]. -        ****************************************************-        *** So a TCvSubst must be applied precisely once ***-        ****************************************************+        ********************************************************+        *** 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.@@ -1752,25 +1923,6 @@ constructor) and the CvSubstEnv should *never* map a TyVar. Furthermore, the range of the TvSubstEnv should *never* include a type headed with CoercionTy.--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:--  * The free vars of the range of the substitution-  * The free vars of ty minus the domain of the substitution--If we want to substitute [a -> ty1, b -> ty2] I used to-think it was enough to generate an in-scope set that includes-fv(ty1,ty2).  But that's not enough; we really should also take the-free vars of the type we are substituting into!  Example:-     (forall b. (a,b,x)) [a -> List b]-Then if we use the in-scope set {b}, there is a danger we will rename-the forall'd variable to 'x' by mistake, getting this:-     (forall x. (List b, x, x))--Breaking this invariant caused the bug from #11371. -}  emptyTvSubstEnv :: TvSubstEnv@@ -2057,7 +2209,8 @@ 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 = ASSERT( tvs `equalLength` tys )+substTyWith tvs tys = {-#SCC "substTyWith" #-}+                      ASSERT( tvs `equalLength` tys )                       substTy (zipTvSubst tvs tys)  -- | Type substitution, see 'zipTvSubst'. Disables sanity checks.@@ -2135,14 +2288,13 @@ -- 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 "tenvFVs" <+> ppr (tyCoVarsOfTypesSet tenv) $$              text "cenv" <+> ppr cenv $$-             text "cenvFVs"-               <+> ppr (tyCoVarsOfCosSet cenv) $$+             text "cenvFVs" <+> ppr (tyCoVarsOfCosSet cenv) $$              text "tys" <+> ppr tys $$              text "cos" <+> ppr cos )     WARN( not tysCosFVsInScope,@@ -2303,7 +2455,7 @@                                 (go_ty t1)) $! (go_ty t2)     go (SymCo co)            = mkSymCo $! (go co)     go (TransCo co1 co2)     = (mkTransCo $! (go co1)) $! (go co2)-    go (NthCo d co)          = mkNthCo d $! (go co)+    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 (CoherenceCo co1 co2) = (mkCoherenceCo $! (go co1)) $! (go co2)@@ -2326,7 +2478,7 @@  substForAllCoBndr :: TCvSubst -> TyVar -> Coercion -> (TCvSubst, TyVar, Coercion) substForAllCoBndr subst-  = substForAllCoBndrCallback False (substCo subst) subst+  = substForAllCoBndrUsing False (substCo subst) subst  -- | Like 'substForAllCoBndr', but disables sanity checks. -- The problems that the sanity checks in substCo catch are described in@@ -2335,14 +2487,14 @@ -- substCo and remove this function. Please don't use in new code. substForAllCoBndrUnchecked :: TCvSubst -> TyVar -> Coercion -> (TCvSubst, TyVar, Coercion) substForAllCoBndrUnchecked subst-  = substForAllCoBndrCallback False (substCoUnchecked subst) subst+  = substForAllCoBndrUsing False (substCoUnchecked subst) subst  -- See Note [Sym and ForAllCo]-substForAllCoBndrCallback :: Bool  -- apply sym to binder?+substForAllCoBndrUsing :: Bool  -- apply sym to binder?                           -> (Coercion -> Coercion)  -- transformation to kind co                           -> TCvSubst -> TyVar -> Coercion                           -> (TCvSubst, TyVar, Coercion)-substForAllCoBndrCallback sym sco (TCvSubst in_scope tenv cenv)+substForAllCoBndrUsing sym sco (TCvSubst in_scope tenv cenv)                           old_var old_kind_co   = ( TCvSubst (in_scope `extendInScopeSet` new_var) new_env cenv     , new_var, new_kind_co )@@ -2375,21 +2527,26 @@ lookupCoVar (TCvSubst _ _ cenv) v = lookupVarEnv cenv v  substTyVarBndr :: HasCallStack => TCvSubst -> TyVar -> (TCvSubst, TyVar)-substTyVarBndr = substTyVarBndrCallback substTy+substTyVarBndr = substTyVarBndrUsing substTy +substTyVarBndrs :: HasCallStack => TCvSubst -> [TyVar] -> (TCvSubst, [TyVar])+substTyVarBndrs = mapAccumL substTyVarBndr+ -- | Like 'substTyVarBndr' 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. substTyVarBndrUnchecked :: TCvSubst -> TyVar -> (TCvSubst, TyVar)-substTyVarBndrUnchecked = substTyVarBndrCallback substTyUnchecked+substTyVarBndrUnchecked = substTyVarBndrUsing substTyUnchecked  -- | Substitute a tyvar in a binding position, returning an -- extended subst and a new tyvar.-substTyVarBndrCallback :: (TCvSubst -> Type -> Type)  -- ^ the subst function-                       -> TCvSubst -> TyVar -> (TCvSubst, TyVar)-substTyVarBndrCallback subst_fn subst@(TCvSubst in_scope tenv cenv) old_var+-- 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)@@ -2482,10 +2639,10 @@ ------------------  pprType, pprParendType :: Type -> SDoc-pprType       = pprPrecType TopPrec-pprParendType = pprPrecType TyConPrec+pprType       = pprPrecType topPrec+pprParendType = pprPrecType appPrec -pprPrecType :: TyPrec -> Type -> SDoc+pprPrecType :: PprPrec -> Type -> SDoc pprPrecType prec ty   = getPprStyle $ \sty ->     if debugStyle sty           -- Use pprDebugType when in@@ -2546,10 +2703,10 @@  ------------ pprTheta :: ThetaType -> SDoc-pprTheta = pprIfaceContext TopPrec . map tidyToIfaceType+pprTheta = pprIfaceContext topPrec . map tidyToIfaceType  pprParendTheta :: ThetaType -> SDoc-pprParendTheta = pprIfaceContext TyConPrec . map tidyToIfaceType+pprParendTheta = pprIfaceContext appPrec . map tidyToIfaceType  pprThetaArrowTy :: ThetaType -> SDoc pprThetaArrowTy = pprIfaceContextArr . map tidyToIfaceType@@ -2609,9 +2766,9 @@ -- 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+debugPprType ty = debug_ppr_ty topPrec ty -debug_ppr_ty :: TyPrec -> Type -> SDoc+debug_ppr_ty :: PprPrec -> Type -> SDoc debug_ppr_ty _ (LitTy l)   = ppr l @@ -2619,21 +2776,21 @@   = 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]+  = 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 TyConPrec $-                hang (ppr tc) 2 (sep (map (debug_ppr_ty TyConPrec) tys))+  | otherwise = maybeParen prec appPrec $+                hang (ppr tc) 2 (sep (map (debug_ppr_ty appPrec) tys))  debug_ppr_ty prec (AppTy t1 t2)   = hang (debug_ppr_ty prec t1)-       2 (debug_ppr_ty TyConPrec t2)+       2 (debug_ppr_ty appPrec t2)  debug_ppr_ty prec (CastTy ty co)-  = maybeParen prec TopPrec $-    hang (debug_ppr_ty TopPrec ty)+  = maybeParen prec topPrec $+    hang (debug_ppr_ty topPrec ty)        2 (text "|>" <+> ppr co)  debug_ppr_ty _ (CoercionTy co)@@ -2641,7 +2798,7 @@  debug_ppr_ty prec ty@(ForAllTy {})   | (tvs, body) <- split ty-  = maybeParen prec FunPrec $+  = 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@@ -2709,7 +2866,7 @@  pprTypeApp :: TyCon -> [Type] -> SDoc pprTypeApp tc tys-  = pprIfaceTypeApp TopPrec (toIfaceTyCon tc)+  = pprIfaceTypeApp topPrec (toIfaceTyCon tc)                             (toIfaceTcArgs tc tys)     -- TODO: toIfaceTcArgs seems rather wasteful here @@ -2903,7 +3060,7 @@                                 tidyType env t1) $! tidyType env t2     go (SymCo co)            = SymCo $! go co     go (TransCo co1 co2)     = (TransCo $! go co1) $! go co2-    go (NthCo d co)          = NthCo d $! go co+    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 (CoherenceCo co1 co2) = (CoherenceCo $! go co1) $! go co2@@ -2962,7 +3119,7 @@ coercionSize (UnivCo p _ t1 t2)  = 1 + provSize p + typeSize t1 + typeSize t2 coercionSize (SymCo co)          = 1 + coercionSize co coercionSize (TransCo co1 co2)   = 1 + coercionSize co1 + coercionSize co2-coercionSize (NthCo _ co)        = 1 + coercionSize co+coercionSize (NthCo _ _ co)      = 1 + coercionSize co coercionSize (LRCo  _ co)        = 1 + coercionSize co coercionSize (InstCo co arg)     = 1 + coercionSize co + coercionSize arg coercionSize (CoherenceCo c1 c2) = 1 + coercionSize c1 + coercionSize c2
types/TyCoRep.hs-boot view
@@ -1,5 +1,7 @@ module TyCoRep where +import GhcPrelude+ import Outputable ( SDoc ) import Data.Data  ( Data ) @@ -18,6 +20,7 @@ pprKind :: Kind -> SDoc pprType :: Type -> SDoc +isRuntimeRepTy :: Type -> Bool+ instance Data Type   -- To support Data instances in CoAxiom-
types/TyCon.hs view
@@ -10,7 +10,8 @@  module TyCon(         -- * Main TyCon data types-        TyCon, AlgTyConRhs(..), visibleDataCons,+        TyCon,+        AlgTyConRhs(..), visibleDataCons,         AlgTyConFlav(..), isNoParent,         FamTyConFlav(..), Role(..), Injectivity(..),         RuntimeRepInfo(..), TyConFlavour(..),@@ -19,7 +20,7 @@         TyConBinder, TyConBndrVis(..),         mkNamedTyConBinder, mkNamedTyConBinders,         mkAnonTyConBinder, mkAnonTyConBinders,-        tyConBinderArgFlag, isNamedTyConBinder,+        tyConBinderArgFlag, tyConBndrVisArgFlag, isNamedTyConBinder,         isVisibleTyConBinder, isInvisibleTyConBinder,          -- ** Field labels@@ -34,6 +35,7 @@         mkLiftedPrimTyCon,         mkTupleTyCon,         mkSumTyCon,+        mkDataTyConRhs,         mkSynonymTyCon,         mkFamilyTyCon,         mkPromotedDataCon,@@ -78,7 +80,7 @@         tyConDataCons, tyConDataCons_maybe,         tyConSingleDataCon_maybe, tyConSingleDataCon,         tyConSingleAlgDataCon_maybe,-        tyConFamilySize, tyConFamilySizeAtMost,+        tyConFamilySize,         tyConStupidTheta,         tyConArity,         tyConRoles,@@ -95,7 +97,8 @@         algTcFields,         tyConRuntimeRepInfo,         tyConBinders, tyConResKind, tyConTyVarBinders,-        tcTyConScopedTyVars,+        tcTyConScopedTyVars, tcTyConUserTyVars,+        mkTyConTagMap,          -- ** Manipulating TyCons         expandSynTyCon_maybe,@@ -132,7 +135,7 @@                                  , vecCountTyCon, vecElemTyCon, liftedTypeKind                                  , mkFunKind, mkForAllKind ) import {-# SOURCE #-} DataCon    ( DataCon, dataConExTyVars, dataConFieldLabels-                                 , dataConTyCon )+                                 , dataConTyCon, dataConFullSig )  import Binary import Var@@ -150,9 +153,10 @@ import FieldLabel import Constants import Util-import Unique( tyConRepNameUnique, dataConRepNameUnique )+import Unique( tyConRepNameUnique, dataConTyRepNameUnique ) import UniqSet import Module+import {-# SOURCE #-} DataCon  import qualified Data.Data as Data @@ -394,6 +398,10 @@   = NamedTCB ArgFlag   | AnonTCB +instance Outputable TyConBndrVis where+  ppr (NamedTCB flag) = text "NamedTCB" <+> ppr flag+  ppr AnonTCB         = text "AnonTCB"+ mkAnonTyConBinder :: TyVar -> TyConBinder mkAnonTyConBinder tv = TvBndr tv AnonTCB @@ -409,9 +417,12 @@ mkNamedTyConBinders vis tvs = map (mkNamedTyConBinder vis) tvs  tyConBinderArgFlag :: TyConBinder -> ArgFlag-tyConBinderArgFlag (TvBndr _ (NamedTCB vis)) = vis-tyConBinderArgFlag (TvBndr _ AnonTCB)        = Required+tyConBinderArgFlag (TvBndr _ vis) = tyConBndrVisArgFlag vis +tyConBndrVisArgFlag :: TyConBndrVis -> ArgFlag+tyConBndrVisArgFlag (NamedTCB vis) = vis+tyConBndrVisArgFlag AnonTCB        = Required+ isNamedTyConBinder :: TyConBinder -> Bool -- Identifies kind variables -- E.g. data T k (a:k) = blah@@ -802,7 +813,8 @@         promDcRepInfo :: RuntimeRepInfo  -- ^ See comments with 'RuntimeRepInfo'     } -  -- | These exist only during a recursive type/class type-checking knot.+  -- | These exist only during type-checking. See Note [How TcTyCons work]+  -- in TcTyClsDecls   | TcTyCon {         tyConUnique :: Unique,         tyConName   :: Name,@@ -817,6 +829,8 @@         tcTyConScopedTyVars :: [(Name,TyVar)],                            -- ^ Scoped tyvars over the tycon's body                            -- See Note [How TcTyCons work] in TcTyClsDecls+                           -- Order does *not* matter.+        tcTyConUserTyVars :: SDoc, -- ^ Original, user-written tycon tyvars          tcTyConFlavour :: TyConFlavour                            -- ^ What sort of 'TyCon' this represents.@@ -839,8 +853,9 @@                           --   user declares the type to have no constructors                           --                           -- INVARIANT: Kept in order of increasing 'DataCon'-                          -- tag (see the tag assignment in DataCon.mkDataCon)-+                          -- tag (see the tag assignment in mkTyConTagMap)+        data_cons_size :: Int,+                          -- ^ Cached value: length data_cons         is_enum :: Bool   -- ^ Cached value: is this an enumeration type?                           --   See Note [Enumeration types]     }@@ -851,8 +866,10 @@                                    -- tuple?     } +  -- | An unboxed sum type.   | SumTyCon {-        data_cons :: [DataCon]+        data_cons :: [DataCon],+        data_cons_size :: Int  -- ^ Cached value: length data_cons     }    -- | Information about those 'TyCon's derived from a @newtype@ declaration@@ -886,6 +903,23 @@                              -- again check Trac #1072.     } +mkSumTyConRhs :: [DataCon] -> AlgTyConRhs+mkSumTyConRhs data_cons = SumTyCon data_cons (length data_cons)++mkDataTyConRhs :: [DataCon] -> AlgTyConRhs+mkDataTyConRhs cons+  = DataTyCon {+        data_cons = cons,+        data_cons_size = length cons,+        is_enum = not (null cons) && all is_enum_con cons+                  -- See Note [Enumeration types] in TyCon+    }+  where+    is_enum_con con+       | (_univ_tvs, ex_tvs, eq_spec, theta, arg_tys, _res)+           <- dataConFullSig con+       = null ex_tvs && null eq_spec && null theta && null arg_tys+ -- | Some promoted datacons signify extra info relevant to GHC. For example, -- the @IntRep@ constructor of @RuntimeRep@ corresponds to the 'IntRep' -- constructor of 'PrimRep'. This data structure allows us to store this@@ -1138,7 +1172,6 @@         kind:    T ~ []  and    arity:   0 - ************************************************************************ *                                                                      *                  TyConRepName@@ -1160,7 +1193,10 @@   | UnboxedAlgTyCon rep_nm <- parent = rep_nm tyConRepName_maybe (FamilyTyCon { famTcFlav = DataFamilyTyCon rep_nm })   = Just rep_nm-tyConRepName_maybe (PromotedDataCon { tcRepName = rep_nm })+tyConRepName_maybe (PromotedDataCon { dataCon = dc, tcRepName = rep_nm })+  | isUnboxedSumCon dc   -- see #13276+  = Nothing+  | otherwise   = Just rep_nm tyConRepName_maybe _ = Nothing @@ -1175,7 +1211,7 @@     name_mod  = nameModule  tc_name     name_uniq = nameUnique  tc_name     rep_uniq | isTcOcc name_occ = tyConRepNameUnique   name_uniq-             | otherwise        = dataConRepNameUnique name_uniq+             | otherwise        = dataConTyRepNameUnique name_uniq     (rep_mod, rep_occ) = tyConRepModOcc name_mod name_occ  -- | The name (and defining module) for the Typeable representation (TyCon) of a@@ -1491,25 +1527,27 @@         tyConCType       = Nothing,         algTcGadtSyntax  = False,         algTcStupidTheta = [],-        algTcRhs         = SumTyCon { data_cons = cons },+        algTcRhs         = mkSumTyConRhs cons,         algTcFields      = emptyDFsEnv,         algTcParent      = parent     } --- | Makes a tycon suitable for use during type-checking.--- The only real need for this is for printing error messages during--- a recursive type/class type-checking knot. It has a kind because--- TcErrors sometimes calls typeKind.+-- | Makes a tycon suitable for use during type-checking. It stores+-- a variety of details about the definition of the TyCon, but no+-- right-hand side. It lives only during the type-checking of a+-- mutually-recursive group of tycons; it is then zonked to a proper+-- TyCon in zonkTcTyCon. -- 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,TyVar)]      -- ^ Scoped type variables;+          -> [(Name,TcTyVar)]    -- ^ Scoped type variables;                                  -- see Note [How TcTyCons work] in TcTyClsDecls           -> TyConFlavour        -- ^ What sort of 'TyCon' this represents           -> TyCon-mkTcTyCon name binders res_kind scoped_tvs flav+mkTcTyCon name tyvars binders res_kind scoped_tvs flav   = TcTyCon { tyConUnique  = getUnique name             , tyConName    = name             , tyConTyVars  = binderVars binders@@ -1518,7 +1556,8 @@             , tyConKind    = mkTyConKind binders res_kind             , tyConArity   = length binders             , tcTyConScopedTyVars = scoped_tvs-            , tcTyConFlavour      = flav }+            , tcTyConFlavour      = flav+            , tcTyConUserTyVars   = tyvars }  -- | Create an unlifted primitive 'TyCon', such as @Int#@. mkPrimTyCon :: Name -> [TyConBinder]@@ -1635,7 +1674,7 @@ -- Used when recovering from errors makeRecoveryTyCon :: TyCon -> TyCon makeRecoveryTyCon tc-  = mkTcTyCon (tyConName tc)+  = mkTcTyCon (tyConName tc) empty               (tyConBinders tc) (tyConResKind tc)               [{- no scoped vars -}]               (tyConFlavour tc)@@ -1996,18 +2035,14 @@ -- -XDataKinds. kindTyConKeys :: UniqSet Unique kindTyConKeys = unionManyUniqSets-  ( mkUniqSet [ liftedTypeKindTyConKey, starKindTyConKey, unicodeStarKindTyConKey-              , constraintKindTyConKey, tYPETyConKey ]+  ( mkUniqSet [ liftedTypeKindTyConKey, constraintKindTyConKey, tYPETyConKey ]   : map (mkUniqSet . tycon_with_datacons) [ runtimeRepTyCon                                           , vecCountTyCon, vecElemTyCon ] )   where     tycon_with_datacons tc = getUnique tc : map getUnique (tyConDataCons tc)  isLiftedTypeKindTyConName :: Name -> Bool-isLiftedTypeKindTyConName-  = (`hasKey` liftedTypeKindTyConKey) <||>-    (`hasKey` starKindTyConKey) <||>-    (`hasKey` unicodeStarKindTyConKey)+isLiftedTypeKindTyConName = (`hasKey` liftedTypeKindTyConKey)  -- | Identifies implicit tycons that, in particular, do not go into interface -- files (because they are implicitly reconstructed when the interface is@@ -2163,27 +2198,13 @@ tyConFamilySize  :: TyCon -> Int tyConFamilySize tc@(AlgTyCon { algTcRhs = rhs })   = case rhs of-      DataTyCon { data_cons = cons } -> length cons+      DataTyCon { data_cons_size = size } -> size       NewTyCon {}                    -> 1       TupleTyCon {}                  -> 1-      SumTyCon { data_cons = cons }  -> length cons+      SumTyCon { data_cons_size = size }  -> size       _                              -> pprPanic "tyConFamilySize 1" (ppr tc) tyConFamilySize tc = pprPanic "tyConFamilySize 2" (ppr tc) --- | Determine if number of value constructors a 'TyCon' has is smaller--- than n. Faster than tyConFamilySize tc <= n.--- Panics if the 'TyCon' is not algebraic or a tuple-tyConFamilySizeAtMost  :: TyCon -> Int -> Bool-tyConFamilySizeAtMost tc@(AlgTyCon { algTcRhs = rhs }) n-  = case rhs of-      DataTyCon { data_cons = cons } -> lengthAtMost cons n-      NewTyCon {}                    -> 1 <= n-      TupleTyCon {}                  -> 1 <= n-      SumTyCon { data_cons = cons }  -> lengthAtMost cons n-      _                              -> pprPanic "tyConFamilySizeAtMost 1"-                                          (ppr tc)-tyConFamilySizeAtMost tc _ = pprPanic "tyConFamilySizeAtMost 2" (ppr tc)- -- | Extract an 'AlgTyConRhs' with information about data constructors from an -- algebraic or tuple 'TyCon'. Panics for any other sort of 'TyCon' algTyConRhs :: TyCon -> AlgTyConRhs@@ -2324,6 +2345,28 @@   -- could panic in that second case. But Douglas Adams told me not to.  {-+Note [Constructor tag allocation]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+When typechecking we need to allocate constructor tags to constructors.+They are allocated based on the position in the data_cons field of TyCon,+with the first constructor getting fIRST_TAG.++We used to pay linear cost per constructor, with each constructor looking up+its relative index in the constructor list. That was quadratic and prohibitive+for large data types with more than 10k constructors.++The current strategy is to build a NameEnv with a mapping from costructor's+Name to ConTag and pass it down to buildDataCon for efficient lookup.++Relevant ticket: #14657+-}++mkTyConTagMap :: TyCon -> NameEnv ConTag+mkTyConTagMap tycon =+  mkNameEnv $ map getName (tyConDataCons tycon) `zip` [fIRST_TAG..]+  -- See Note [Constructor tag allocation]++{- ************************************************************************ *                                                                      * \subsection[TyCon-instances]{Instance declarations for @TyCon@}@@ -2343,7 +2386,11 @@ instance Outputable TyCon where   -- At the moment a promoted TyCon has the same Name as its   -- corresponding TyCon, so we add the quote to distinguish it here-  ppr tc = pprPromotionQuote tc <> ppr (tyConName tc)+  ppr tc = pprPromotionQuote tc <> ppr (tyConName tc) <> pp_tc+    where+      pp_tc = getPprStyle $ \sty -> if ((debugStyle sty || dumpStyle sty) && isTcTyCon tc)+                                    then text "[tc]"+                                    else empty  -- | Paints a picture of what a 'TyCon' represents, in broad strokes. -- This is used towards more informative error messages.@@ -2354,8 +2401,8 @@   | DataTypeFlavour   | NewtypeFlavour   | AbstractTypeFlavour-  | DataFamilyFlavour-  | OpenTypeFamilyFlavour+  | DataFamilyFlavour Bool     -- True <=> associated+  | OpenTypeFamilyFlavour Bool -- True <=> associated   | ClosedTypeFamilyFlavour   | TypeSynonymFlavour   | BuiltInTypeFlavour -- ^ e.g., the @(->)@ 'TyCon'.@@ -2372,8 +2419,10 @@       go DataTypeFlavour         = "data type"       go NewtypeFlavour          = "newtype"       go AbstractTypeFlavour     = "abstract type"-      go DataFamilyFlavour       = "data family"-      go OpenTypeFamilyFlavour   = "type family"+      go (DataFamilyFlavour True)      = "associated data family"+      go (DataFamilyFlavour False)     = "data family"+      go (OpenTypeFamilyFlavour True)  = "associated type family"+      go (OpenTypeFamilyFlavour False) = "type family"       go ClosedTypeFamilyFlavour = "type family"       go TypeSynonymFlavour      = "type synonym"       go BuiltInTypeFlavour      = "built-in type"@@ -2389,10 +2438,10 @@                   DataTyCon {}       -> DataTypeFlavour                   NewTyCon {}        -> NewtypeFlavour                   AbstractTyCon {}   -> AbstractTypeFlavour-tyConFlavour (FamilyTyCon { famTcFlav = flav })+tyConFlavour (FamilyTyCon { famTcFlav = flav, famTcParent = parent })   = case flav of-      DataFamilyTyCon{}            -> DataFamilyFlavour-      OpenSynFamilyTyCon           -> OpenTypeFamilyFlavour+      DataFamilyTyCon{}            -> DataFamilyFlavour (isJust parent)+      OpenSynFamilyTyCon           -> OpenTypeFamilyFlavour (isJust parent)       ClosedSynFamilyTyCon{}       -> ClosedTypeFamilyFlavour       AbstractClosedSynFamilyTyCon -> ClosedTypeFamilyFlavour       BuiltInSynFamTyCon{}         -> ClosedTypeFamilyFlavour@@ -2407,20 +2456,20 @@ tcFlavourCanBeUnsaturated ClassFlavour            = True tcFlavourCanBeUnsaturated DataTypeFlavour         = True tcFlavourCanBeUnsaturated NewtypeFlavour          = True-tcFlavourCanBeUnsaturated DataFamilyFlavour       = 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 OpenTypeFamilyFlavour{} = False tcFlavourCanBeUnsaturated ClosedTypeFamilyFlavour = False  -- | Is this flavour of 'TyCon' an open type family or a data family? tcFlavourIsOpen :: TyConFlavour -> Bool-tcFlavourIsOpen DataFamilyFlavour       = True-tcFlavourIsOpen OpenTypeFamilyFlavour   = True+tcFlavourIsOpen DataFamilyFlavour{}     = True+tcFlavourIsOpen OpenTypeFamilyFlavour{} = True tcFlavourIsOpen ClosedTypeFamilyFlavour = False tcFlavourIsOpen ClassFlavour            = False tcFlavourIsOpen DataTypeFlavour         = False@@ -2510,7 +2559,7 @@   -- we have encountered each TyCon  initRecTc :: RecTcChecker--- Intialise with a fixed max bound of 100+-- Initialise with a fixed max bound of 100 -- We should probably have a flag for this initRecTc = RC 100 emptyNameEnv 
types/Type.hs view
@@ -16,6 +16,7 @@         -- $representation_types         TyThing(..), Type, ArgFlag(..), KindOrType, PredType, ThetaType,         Var, TyVar, isTyVar, TyCoVar, TyBinder, TyVarBinder,+        KnotTied,          -- ** Constructing and deconstructing types         mkTyVarTy, mkTyVarTys, getTyVar, getTyVar_maybe, repGetTyVar_maybe,@@ -92,7 +93,7 @@         mkAnonBinder,         isAnonTyBinder, isNamedTyBinder,         binderVar, binderVars, binderKind, binderArgFlag,-        tyBinderType,+        tyBinderType, tyBinderVar_maybe,         binderRelevantType_maybe, caseBinder,         isVisibleArgFlag, isInvisibleArgFlag, isVisibleBinder, isInvisibleBinder,         tyConBindersTyBinders,@@ -120,6 +121,7 @@          -- ** Finding the kind of a type         typeKind, isTypeLevPoly, resultIsLevPoly,+        tcIsLiftedTypeKind, tcIsConstraintKind, tcReturnsConstraintKind,          -- ** Common Kind         liftedTypeKind,@@ -133,7 +135,7 @@         noFreeVarsOfType,         splitVisVarsOfType, splitVisVarsOfTypes,         expandTypeSynonyms,-        typeSize,+        typeSize, occCheckExpand,          -- * Well-scoped lists of variables         dVarSetElemsWellScoped, toposortTyVars, tyCoVarsOfTypeWellScoped,@@ -177,7 +179,7 @@         substTyUnchecked, substTysUnchecked, substThetaUnchecked,         substTyWithUnchecked,         substCoUnchecked, substCoWithUnchecked,-        substTyVarBndr, substTyVar, substTyVars,+        substTyVarBndr, substTyVarBndrs, substTyVar, substTyVars,         cloneTyVarBndr, cloneTyVarBndrs, lookupTyVar,          -- * Pretty-printing@@ -187,8 +189,9 @@         pprSigmaType, ppSuggestExplicitKinds,         pprTheta, pprThetaArrowTy, pprClassPred,         pprKind, pprParendKind, pprSourceTyCon,-        TyPrec(..), maybeParen,+        PprPrec(..), topPrec, sigPrec, opPrec, funPrec, appPrec, maybeParen,         pprTyVar, pprTyVars,+        pprWithTYPE,          -- * Tidying type related things up for printing         tidyType,      tidyTypes,@@ -227,13 +230,20 @@                                  , typeSymbolKind, liftedTypeKind ) import PrelNames import CoAxiom-import {-# SOURCE #-} Coercion+import {-# SOURCE #-} Coercion( mkCoherenceCo, 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 Outputable import FastString import Pair+import DynFlags  ( gopt_set, GeneralFlag(Opt_PrintExplicitRuntimeReps) ) import ListSetOps import Digraph import Unique ( nonDetCmpUnique )@@ -319,34 +329,10 @@  -} -{-# 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 (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!--coreView (TyConApp tc [])       -- At the Core level, Constraint = Type-  | isStarKindSynonymTyCon tc-  = Just liftedTypeKind--coreView _ = Nothing- -- | 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] in Type.+-- See also Note [coreView vs tcView] {-# INLINE tcView #-} tcView :: Type -> Maybe Type tcView (TyConApp tc tys) | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys@@ -359,6 +345,28 @@                -- 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@@ -396,7 +404,7 @@     go subst (FunTy arg res)       = mkFunTy (go subst arg) (go subst res)     go subst (ForAllTy (TvBndr tv vis) t)-      = let (subst', tv') = substTyVarBndrCallback go subst tv in+      = let (subst', tv') = substTyVarBndrUsing go subst tv in         ForAllTy (TvBndr 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)@@ -423,8 +431,8 @@       = mkSymCo (go_co subst co)     go_co subst (TransCo co1 co2)       = mkTransCo (go_co subst co1) (go_co subst co2)-    go_co subst (NthCo n co)-      = mkNthCo n (go_co subst co)+    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)@@ -446,10 +454,10 @@     go_prov _     p@(PluginProv _)    = p        -- the "False" and "const" are to accommodate the type of-      -- substForAllCoBndrCallback, which is general enough to+      -- substForAllCoBndrUsing, which is general enough to       -- handle coercion optimization (which sometimes swaps the       -- order of a coercion)-    go_cobndr subst = substForAllCoBndrCallback False (go_co subst) subst+    go_cobndr subst = substForAllCoBndrUsing False (go_co subst) subst  {- ************************************************************************@@ -495,7 +503,7 @@ data TyCoMapper env m   = TyCoMapper       { tcm_smart :: Bool -- ^ Should the new type be created with smart-                         -- constructors?+                          -- constructors?       , tcm_tyvar :: env -> TyVar -> m Type       , tcm_covar :: env -> CoVar -> m Coercion       , tcm_hole  :: env -> CoercionHole -> m Coercion@@ -504,20 +512,28 @@        , tcm_tybinder :: env -> TyVar -> ArgFlag -> m (env, TyVar)           -- ^ 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_tybinder = tybinder })+                           , tcm_tybinder = tybinder, 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 _ []) = return t  -- avoid allocation in this exceedingly-                                     -- common case (mostly, for *)-    go (TyConApp tc tys) = mktyconapp tc <$> mapM go tys+    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 (TvBndr tv vis) inner)       = do { (env', tv') <- tybinder env tv vis@@ -535,13 +551,15 @@ mapCoercion :: Monad m             => TyCoMapper env m -> env -> Coercion -> m Coercion mapCoercion mapper@(TyCoMapper { tcm_smart = smart, tcm_covar = covar-                               , tcm_hole = cohole, tcm_tybinder = tybinder })+                               , tcm_hole = cohole, tcm_tybinder = tybinder+                               , tcm_tycon = tycon })             env co   = go co   where     go (Refl r ty) = Refl r <$> mapType mapper env ty     go (TyConAppCo r tc args)-      = mktyconappco r tc <$> mapM go 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@@ -560,7 +578,7 @@     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 i co)        = mknthco i <$> go co+    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 (CoherenceCo c1 c2) = mkcoherenceco <$> go c1 <*> go c2@@ -659,6 +677,11 @@  -- | 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@@ -672,6 +695,15 @@  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 @@ -704,14 +736,14 @@  repSplitAppTy_maybe _other = Nothing --- this one doesn't braek apart (c => t).+-- 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)-  | isConstraintKind (typeKind ty1)+  | isPredTy ty1   = Nothing  -- See Note [Decomposing fat arrow c=>t]    | otherwise@@ -727,18 +759,6 @@   = Just (TyConApp tc tys', ty')    -- Never create unsaturated type family apps! tcRepSplitAppTy_maybe _other = Nothing --- | 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- -- | 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.@@ -1016,13 +1036,18 @@       | ForAllTy (TvBndr tv _) res <- ty       = go (extendVarEnv tv_env tv arg) res args -      | TyVarTy tv <- ty-      , Just ty' <- lookupVarEnv tv_env tv-        -- Deals with piResultTys (forall a. a) [forall b.b, Int]-      = piResultTys ty' all_args+      | not (isEmptyVarEnv tv_env)  -- See Note [Care with kind instantiation]+      = go emptyTvSubstEnv+          (substTy (mkTvSubst in_scope tv_env) ty)+          all_args        | otherwise-      = pprPanic "piResultTys2" (ppr ty $$ ppr orig_args $$ ppr all_args)+      = -- We have not run out of arguments, but the function doesn't+        -- have the right kind to apply to them; so panic.+        -- Without hte 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@@ -1036,7 +1061,35 @@     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 wwe must intantiate the forall!++Similarly (Trac #154218)+   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                                 ~~~~~~~~@@ -1126,10 +1179,6 @@   Just (tc,[e]) | tc == listTyCon -> Just e   _other                          -> Nothing --- | What is the role assigned to the next parameter of this type? Usually,--- this will be 'Nominal', but if the type is a 'TyConApp', we may be able to--- do better. The type does *not* have to be well-kinded when applied for this--- to work! nextRole :: Type -> Role nextRole ty   | Just (tc, tys) <- splitTyConApp_maybe ty@@ -1156,47 +1205,6 @@                            ~~~~~~ A casted type has its *kind* casted into something new. -Note [No reflexive casts in types]-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-As far as possible, we would like to maintain the following property:--  (*) If (t1 `eqType` t2), then t1 and t2 are treated identically within GHC.--The (*) property is very useful, because we have a tendency to compare two-types to see if they're equal, and then arbitrarily choose one. We don't-want this arbitrary choice to then matter later on. Maintaining (*) means-that every function that looks at a structure of a type must think about-casts. In places where we directly pattern-match, this consideration is-forced by consideration of the CastTy constructor.--But, when we call a splitXXX function, it's easy to ignore the possibility-of casts. In particular, splitTyConApp is used extensively, and 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 (*).--Unfortunately, that's not the end of the story. Consider comparing-  (T a b c)      =?       (T a b |> (co -> <Type>)) (c |> sym 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 will have to implement-some variant of the dreaded KPush algorithm (c.f. CoreOpt.pushCoDataCon).-This stone is left unturned for now, meaning that we don't yet uphold (*).--The other place where (*) will be hard to guarantee is in splitAppTy, because-I (Richard E) can't think of a way to push coercions into AppTys. The good-news here is that splitAppTy is not used all that much, and so all clients of-that function can simply be told to use splitCastTy as well, in order to-uphold (*). This, too, is left undone, for now.- -}  splitCastTy_maybe :: Type -> Maybe (Type, Coercion)@@ -1206,16 +1214,17 @@  -- | Make a 'CastTy'. The Coercion must be nominal. Checks the -- Coercion for reflexivity, dropping it if it's reflexive.--- See Note [No reflexive casts in types]+-- See Note [Respecting definitional equality] in TyCoRep mkCastTy :: Type -> Coercion -> Type-mkCastTy ty co | isReflexiveCo co = ty+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 = mkCastTy ty (co1 `mkTransCo` co2)+mkCastTy (CastTy ty co1) co2 = mkCastTy ty (co1 `mkTransCo` co2) -- (EQ3) from the Note+                          -- call mkCastTy again for the reflexivity check mkCastTy ty co = CastTy ty co  tyConBindersTyBinders :: [TyConBinder] -> [TyBinder]@@ -1347,8 +1356,9 @@ splitForAllTyVarBndrs 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)+    split _       (ForAllTy b res) bs = split res res (b:bs)+    split orig_ty _                bs = (reverse bs, orig_ty)+{-# INLINE splitForAllTyVarBndrs #-}  -- | Checks whether this is a proper forall (with a named binder) isForAllTy :: Type -> Bool@@ -1405,12 +1415,14 @@ -- | Split off all TyBinders to a type, splitting both proper foralls -- and functions splitPiTys :: Type -> ([TyBinder], Type)-splitPiTys ty = split ty ty []+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)+    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)+    split _       (FunTy arg res)  = let (bs, ty) = split res res+                                     in  (Anon arg : bs, ty)+    split orig_ty _                = ([], orig_ty)  -- Like splitPiTys, but returns only *invisible* binders, including constraints -- Stops at the first visible binder@@ -1495,6 +1507,10 @@ isNamedTyBinder (Named {}) = True isNamedTyBinder (Anon {})  = False +tyBinderVar_maybe :: TyBinder -> Maybe TyVar+tyBinderVar_maybe (Named tv) = Just $ binderVar tv+tyBinderVar_maybe _          = Nothing+ tyBinderType :: TyBinder -> Type -- Barely used tyBinderType (Named tvb) = binderKind tvb@@ -1545,6 +1561,56 @@   want to print it nicely in error messages. -} +-- | 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 (type_tc, [arg]) <- tcSplitTyConApp_maybe ty+  , type_tc `hasKey` tYPETyConKey+  , Just (lifted_rep_tc, args) <- tcSplitTyConApp_maybe arg+  , lifted_rep_tc `hasKey` liftedRepDataConKey+  = ASSERT2( null args, ppr ty ) 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    _ ty) = tcReturnsConstraintKind ty+tcReturnsConstraintKind (TyConApp tc _) = isConstraintKindCon tc+tcReturnsConstraintKind _               = False+ -- | Is the type suitable to classify a given/wanted in the typechecker? isPredTy :: Type -> Bool -- See Note [isPredTy complications]@@ -1572,7 +1638,7 @@      go_k :: Kind -> [KindOrType] -> Bool     -- True <=> ('k' applied to 'kts') = Constraint-    go_k k [] = isConstraintKind k+    go_k k [] = tcIsConstraintKind k     go_k k (arg:args) = case piResultTy_maybe k arg of                           Just k' -> go_k k' args                           Nothing -> WARN( True, text "isPredTy" <+> ppr ty )@@ -1747,20 +1813,36 @@ eqRelRole NomEq  = Nominal eqRelRole ReprEq = Representational -data PredTree = ClassPred Class [Type]-              | EqPred EqRel Type Type-              | IrredPred PredType+data PredTree+  = ClassPred Class [Type]+  | EqPred EqRel Type Type+  | IrredPred PredType+  | ForAllPred [TyVarBinder] [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+      | 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-    _                                     -> IrredPred ev_ty+      | Just clas <- tyConClass_maybe tc+      -> ClassPred clas tys -getClassPredTys :: PredType -> (Class, [Type])+    _ | (tvs, rho) <- splitForAllTyVarBndrs 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)@@ -2067,7 +2149,39 @@       | 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}@@ -2271,13 +2385,14 @@ nonDetCmpTypesX _   _         []        = GT  ---------------- | Compare two 'TyCon's. NB: This should /never/ see the "star synonyms",--- as recognized by Kind.isStarKindSynonymTyCon. See Note--- [Kind Constraint and kind *] in Kind.+-- | 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 (isStarKindSynonymTyCon tc1) && not (isStarKindSynonymTyCon tc2) )+  = ASSERT( not (isConstraintKindCon tc1) && not (isConstraintKindCon tc2) )     u1 `nonDetCmpUnique` u2   where     u1  = tyConUnique tc1@@ -2292,15 +2407,30 @@ -}  typeKind :: HasDebugCallStack => Type -> Kind-typeKind (TyConApp tc tys)     = piResultTys (tyConKind tc) tys-typeKind (AppTy fun arg)       = piResultTy (typeKind fun) arg-typeKind (LitTy l)             = typeLiteralKind l-typeKind (FunTy {})            = liftedTypeKind-typeKind (ForAllTy _ ty)       = typeKind ty-typeKind (TyVarTy tyvar)       = tyVarKind tyvar-typeKind (CastTy _ty co)       = pSnd $ coercionKind co-typeKind (CoercionTy co)       = coercionType co+typeKind (TyConApp tc tys) = piResultTys (tyConKind tc) tys+typeKind (AppTy fun arg)   = typeKind_apps fun [arg]+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 ty@(ForAllTy {})  = case occCheckExpand tvs k of+                               Just k' -> k'+                               Nothing -> pprPanic "typeKind"+                                            (ppr ty $$ ppr k $$ ppr tvs $$ ppr body)+                           where+                             (tvs, body) = splitForAllTys ty+                             k           = typeKind body +typeKind_apps :: HasDebugCallStack => Type -> [Type] -> Kind+-- The sole purpose of the function is to accumulate+-- the type arugments, so we can call piResultTys, rather than+-- a succession of calls to piResultTy (which is asymptotically+-- less efficient as the number of arguments increases)+typeKind_apps (AppTy fun arg) args = typeKind_apps fun (arg:args)+typeKind_apps fun             args = piResultTys (typeKind fun) args++-------------------------- typeLiteralKind :: TyLit -> Kind typeLiteralKind l =   case l of@@ -2331,6 +2461,153 @@ 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 TyVar) -> 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 (TvBndr tv vis) body_ty)+       = do { ki' <- go cxt (tyVarKind tv)+            ; let tv' = setTyVarKind tv ki'+                  env' = extendVarEnv env tv tv'+                  as'  = as `delVarSet` tv+            ; body' <- go (as', env') body_ty+            ; return (ForAllTy (TvBndr 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_co cxt (Refl r ty)               = do { ty' <- go cxt ty+                                             ; return (mkReflCo r ty') }+      -- 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' = setTyVarKind 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 (CoVarCo c)               = 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 (CoherenceCo co1 co2)     = do { co1' <- go_co cxt co1+                                             ; co2' <- go_co cxt co2+                                             ; return (mkCoherenceCo co1' co2') }+    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++ {- %************************************************************************ %*                                                                      *@@ -2368,7 +2645,7 @@      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 (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 (CoherenceCo co1 co2)   = go_co co1 `unionUniqSets` go_co co2@@ -2446,3 +2723,20 @@ -- 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
types/Unify.hs view
@@ -31,12 +31,12 @@ import Var import VarEnv import VarSet-import Kind import Name( Name ) import Type hiding ( getTvSubstEnv ) import Coercion hiding ( getCvSubstEnv ) import TyCon import TyCoRep hiding ( getTvSubstEnv, getCvSubstEnv )+import FV( FV, fvVarSet, fvVarList ) import Util import Pair import Outputable@@ -70,6 +70,34 @@    where x is the template type variable.  Then we do not want to    bind x to a/b!  This is a kind of occurs check.    The necessary locals accumulate in the RnEnv2.++Note [tcMatchTy vs tcMatchTyKi]+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+This module offers two variants of matching: with kinds and without.+The TyKi variant takes two types, of potentially different kinds,+and matches them. Along the way, it necessarily also matches their+kinds. The Ty variant instead assumes that the kinds are already+eqType and so skips matching up the kinds.++How do you choose between them?++1. If you know that the kinds of the two types are eqType, use+   the Ty variant. It is more efficient, as it does less work.++2. If the kinds of variables in the  template type might mention type families,+   use the Ty variant (and do other work to make sure the kinds+   work out). These pure unification functions do a straightforward+   syntactic unification and do no complex reasoning about type+   families. Note that the types of the variables in instances can indeed+   mention type families, so instance lookup must use the Ty variant.++   (Nothing goes terribly wrong -- no panics -- if there might be type+   families in kinds in the TyKi variant. You just might get match+   failure even though a reducing a type family would lead to success.)++3. Otherwise, if you're sure that the variable kinds to not mention+   type families and you're not already sure that the kind of the template+   equals the kind of the target, then use the TyKi versio.n -}  -- | @tcMatchTy t1 t2@ produces a substitution (over fvs(t1))@@ -83,15 +111,18 @@ -- by the match, because tcMatchTy (and similar functions) are -- always used on top-level types, so we can bind any of the -- free variables of the LHS.+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTy :: Type -> Type -> Maybe TCvSubst tcMatchTy ty1 ty2 = tcMatchTys [ty1] [ty2]  -- | Like 'tcMatchTy', but allows the kinds of the types to differ, -- and thus matches them as well.+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTyKi :: Type -> Type -> Maybe TCvSubst tcMatchTyKi ty1 ty2 = tcMatchTyKis [ty1] [ty2]  -- | This is similar to 'tcMatchTy', but extends a substitution+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTyX :: TCvSubst            -- ^ Substitution to extend            -> Type                -- ^ Template            -> Type                -- ^ Target@@ -99,6 +130,7 @@ tcMatchTyX subst ty1 ty2 = tcMatchTysX subst [ty1] [ty2]  -- | Like 'tcMatchTy' but over a list of types.+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTys :: [Type]         -- ^ Template            -> [Type]         -- ^ Target            -> Maybe TCvSubst -- ^ One-shot; in principle the template@@ -109,6 +141,7 @@     in_scope = mkInScopeSet (tyCoVarsOfTypes tys1 `unionVarSet` tyCoVarsOfTypes tys2)  -- | Like 'tcMatchTyKi' but over a list of types.+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTyKis :: [Type]         -- ^ Template              -> [Type]         -- ^ Target              -> Maybe TCvSubst -- ^ One-shot substitution@@ -118,6 +151,7 @@     in_scope = mkInScopeSet (tyCoVarsOfTypes tys1 `unionVarSet` tyCoVarsOfTypes tys2)  -- | Like 'tcMatchTys', but extending a substitution+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTysX :: TCvSubst       -- ^ Substitution to extend             -> [Type]         -- ^ Template             -> [Type]         -- ^ Target@@ -126,6 +160,7 @@   = tc_match_tys_x False subst tys1 tys2  -- | Like 'tcMatchTyKis', but extending a substitution+-- See also Note [tcMatchTy vs tcMatchTyKi] tcMatchTyKisX :: TCvSubst        -- ^ Substitution to extend               -> [Type]          -- ^ Template               -> [Type]          -- ^ Target@@ -463,6 +498,17 @@              -> CvSubstEnv              -> [Type] -> [Type]              -> UnifyResultM (TvSubstEnv, CvSubstEnv)+-- NB: It's tempting to ASSERT here that, if we're not matching kinds, then+-- the kinds of the types should be the same. However, this doesn't work,+-- as the types may be a dependent telescope, where later types have kinds+-- that mention variables occuring earlier in the list of types. Here's an+-- example (from typecheck/should_fail/T12709):+--   template: [rep :: RuntimeRep,       a :: TYPE rep]+--   target:   [LiftedRep :: RuntimeRep, Int :: TYPE LiftedRep]+-- We can see that matching the first pair will make the kinds of the second+-- pair equal. Yet, we still don't need a separate pass to unify the kinds+-- of these types, so it's appropriate to use the Ty variant of unification.+-- See also Note [tcMatchTy vs tcMatchTyKi]. tc_unify_tys bind_fn unif inj_check match_kis rn_env tv_env cv_env tys1 tys2   = initUM tv_env cv_env $     do { when match_kis $@@ -471,6 +517,7 @@        ; (,) <$> getTvSubstEnv <*> getCvSubstEnv }   where     env = UMEnv { um_bind_fun = bind_fn+                , um_skols    = emptyVarSet                 , um_unif     = unif                 , um_inj_tf   = inj_check                 , um_rn_env   = rn_env }@@ -499,7 +546,7 @@ Note [Finding the substitution fixpoint] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Finding the fixpoint of a non-idempotent substitution arising from a-unification is harder than it looks, because of kinds.  Consider+unification is much trickier than it looks, because of kinds.  Consider    T k (H k (f:k)) ~ T * (g:*) If we unify, we get the substitution    [ k -> *@@ -514,42 +561,97 @@ and get an ill-formed type, i.e. one where typeKind will fail. This happened, for example, in Trac #9106. -This is the reason for extending env with [f:k -> f:*], in the-definition of env' in niFixTvSubst+It gets worse.  In Trac #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))+   , a_aY6  :-> a_aXQ ]++We have to apply the substitution for a_aY6 two levels deep inside+the invocation of F!  We don't have a function that recursively+applies substitutions inside the kinds of variable occurrences (and+probably rightly so).++So, we work as follows:++ 1. Start with the current substitution (which we are+    trying to fixpoint+       [ xs :-> F a (z :: a) (rest :: G a (z :: a))+       , a  :-> b ]++ 2. Take all the free vars of the range of the substitution:+       {a, z, rest, b}+    NB: the free variable finder closes over+    the kinds of variable occurrences++ 3. If none are in the domain of the substitution, stop.+    We have found a fixpoint.++ 4. Remove the variables that are bound by the substitution, leaving+       {z, rest, b}++ 5. Do a topo-sort to put them in dependency order:+       [ b :: *, z :: a, rest :: G a z ]++ 6. Apply the substitution left-to-right to the kinds of these+    tyvars, extending it each time with a new binding, so we+    finish up with+       [ xs   :-> ..as before..+       , a    :-> b+       , b    :-> b    :: *+       , z    :-> z    :: b+       , rest :-> rest :: G b (z :: b) ]+    Note that rest now has the right kind++ 7. Apply this extended substitution (once) to the range of+    the /original/ substitution.  (Note that we do the+    extended substitution would go on forever if you tried+    to find its fixpoint, because it maps z to z.)++ 8. And go back to step 1++In Step 6 we use the free vars from Step 2 as the initial+in-scope set, because all of those variables appear in the+range of the substitution, so they must all be in the in-scope+set.  But NB that the type substitution engine does not look up+variables in the in-scope set; it is used only to ensure no+shadowing. -}  niFixTCvSubst :: TvSubstEnv -> TCvSubst -- Find the idempotent fixed point of the non-idempotent substitution--- See Note [Finding the substitution fixpoint]+-- This is surprisingly tricky:+--   see Note [Finding the substitution fixpoint] -- ToDo: use laziness instead of iteration?-niFixTCvSubst tenv = f tenv+niFixTCvSubst tenv+  | not_fixpoint = niFixTCvSubst (mapVarEnv (substTy subst) tenv)+  | otherwise    = subst   where-    f tenv-        | not_fixpoint = f (mapVarEnv (substTy subst') tenv)-        | otherwise    = subst-        where-          not_fixpoint  = anyVarSet in_domain range_tvs-          in_domain tv  = tv `elemVarEnv` tenv+    range_fvs :: FV+    range_fvs = tyCoFVsOfTypes (nonDetEltsUFM tenv)+          -- It's OK to use nonDetEltsUFM here because the+          -- order of range_fvs, range_tvs is immaterial -          range_tvs     = nonDetFoldUFM (unionVarSet . tyCoVarsOfType) emptyVarSet tenv-                          -- It's OK to use nonDetFoldUFM here because we-                          -- forget the order immediately by creating a set-          subst         = mkTvSubst (mkInScopeSet range_tvs) tenv+    range_tvs :: [TyVar]+    range_tvs = fvVarList range_fvs -             -- env' extends env by replacing any free type with-             -- that same tyvar with a substituted kind-             -- See note [Finding the substitution fixpoint]-          tenv'  = extendVarEnvList tenv [ (rtv, mkTyVarTy $-                                                 setTyVarKind rtv $-                                                 substTy subst $-                                                 tyVarKind rtv)-                                         | rtv <- nonDetEltsUniqSet range_tvs-                                         -- It's OK to use nonDetEltsUniqSet here-                                         -- because we forget the order-                                         -- immediatedly by putting it in VarEnv-                                         , not (in_domain rtv) ]-          subst' = mkTvSubst (mkInScopeSet range_tvs) tenv'+    not_fixpoint  = any in_domain range_tvs+    in_domain tv  = tv `elemVarEnv` tenv +    free_tvs = toposortTyVars (filterOut in_domain range_tvs)++    -- See Note [Finding the substitution fixpoint], Step 6+    init_in_scope = mkInScopeSet (fvVarSet range_fvs)+    subst = foldl add_free_tv+                  (mkTvSubst init_in_scope tenv)+                  free_tvs++    add_free_tv :: TCvSubst -> TyVar -> TCvSubst+    add_free_tv subst tv+      = extendTvSubst subst tv (mkTyVarTy tv')+     where+        tv' = updateTyVarKind (substTy subst) tv+ niSubstTvSet :: TvSubstEnv -> TyCoVarSet -> TyCoVarSet -- Apply the non-idempotent substitution to a set of type variables, -- remembering that the substitution isn't necessarily idempotent@@ -815,7 +917,7 @@  unify_ty :: UMEnv          -> Type -> Type  -- Types to be unified and a co-         -> Coercion      -- A coercion between their kinds+         -> CoercionN     -- A coercion between their kinds                           -- See Note [Kind coercions in Unify]          -> UM () -- See Note [Specification of unification]@@ -842,7 +944,7 @@ unify_ty env ty1 ty2 _kco   | Just (tc1, tys1) <- mb_tc_app1   , Just (tc2, tys2) <- mb_tc_app2-  , tc1 == tc2 || (tcIsStarKind ty1 && tcIsStarKind ty2)+  , tc1 == tc2 || (tcIsLiftedTypeKind ty1 && tcIsLiftedTypeKind ty2)   = if isInjectiveTyCon tc1 Nominal     then unify_tys env tys1 tys2     else do { let inj | isTypeFamilyTyCon tc1@@ -905,9 +1007,9 @@            CoVarCo cv              | not (um_unif env)              , not (cv `elemVarEnv` c_subst)-             , BindMe <- tvBindFlagL env cv-             -> do { checkRnEnvRCo env co2-                   ; let (co_l, co_r) = decomposeFunCo kco+             , BindMe <- tvBindFlag env cv+             -> do { checkRnEnv env (tyCoVarsOfCo co2)+                   ; let (co_l, co_r) = decomposeFunCo Nominal kco                       -- cv :: t1 ~ t2                       -- co2 :: s1 ~ s2                       -- co_l :: t1 ~ s1@@ -946,15 +1048,18 @@  --------------------------------- uVar :: UMEnv-     -> TyVar           -- Variable to be unified+     -> InTyVar         -- Variable to be unified      -> Type            -- with this Type      -> Coercion        -- :: kind tv ~N kind ty      -> UM ()  uVar env tv1 ty kco- = do { -- Check to see whether tv1 is refined by the substitution-        subst <- getTvSubstEnv-      ; case (lookupVarEnv subst tv1) of+ = do { -- Apply the ambient renaming+        let tv1' = umRnOccL env tv1++        -- Check to see whether tv1 is refined by the substitution+      ; subst <- getTvSubstEnv+      ; case (lookupVarEnv subst tv1') of           Just ty' | um_unif env                -- Unifying, so call                    -> unify_ty env ty' ty kco   -- back into unify                    | otherwise@@ -963,10 +1068,10 @@                       -- type, not the template type. So, just check for                       -- normal type equality.                       guard ((ty' `mkCastTy` kco) `eqType` ty)-          Nothing  -> uUnrefined env tv1 ty ty kco } -- No, continue+          Nothing  -> uUnrefined env tv1' ty ty kco } -- No, continue  uUnrefined :: UMEnv-           -> TyVar             -- variable to be unified+           -> OutTyVar          -- variable to be unified            -> Type              -- with this Type            -> Type              -- (version w/ expanded synonyms)            -> Coercion          -- :: kind tv ~N kind ty@@ -974,16 +1079,15 @@  -- We know that tv1 isn't refined -uUnrefined env tv1 ty2 ty2' kco+uUnrefined env tv1' ty2 ty2' kco   | Just ty2'' <- coreView ty2'-  = uUnrefined env tv1 ty2 ty2'' kco    -- Unwrap synonyms+  = uUnrefined env tv1' ty2 ty2'' kco    -- Unwrap synonyms                 -- This is essential, in case we have                 --      type Foo a = a                 -- and then unify a ~ Foo a    | TyVarTy tv2 <- ty2'-  = do { let tv1' = umRnOccL env tv1-             tv2' = umRnOccR env tv2+  = do { let tv2' = umRnOccR env tv2        ; unless (tv1' == tv2' && um_unif env) $ do            -- If we are unifying a ~ a, just return immediately            -- Do not extend the substitution@@ -992,16 +1096,16 @@           -- Check to see whether tv2 is refined        { subst <- getTvSubstEnv        ; case lookupVarEnv subst tv2 of-         {  Just ty' | um_unif env -> uUnrefined env tv1 ty' ty' kco+         {  Just ty' | um_unif env -> uUnrefined env tv1' ty' ty' kco          ;  _ ->      do {   -- So both are unrefined            -- Bind one or the other, depending on which is bindable-       ; let b1  = tvBindFlagL env tv1-             b2  = tvBindFlagR env tv2-             ty1 = mkTyVarTy tv1+       ; let b1  = tvBindFlag env tv1'+             b2  = tvBindFlag env tv2'+             ty1 = mkTyVarTy tv1'        ; case (b1, b2) of-           (BindMe, _) -> bindTv env tv1 (ty2 `mkCastTy` mkSymCo kco)+           (BindMe, _) -> bindTv env tv1' (ty2 `mkCastTy` mkSymCo kco)            (_, BindMe) | um_unif env                        -> bindTv (umSwapRn env) tv2 (ty1 `mkCastTy` kco) @@ -1012,12 +1116,12 @@            _ -> maybeApart -- See Note [Unification with skolems]   }}}} -uUnrefined env tv1 ty2 _ kco -- ty2 is not a type variable-  = case tvBindFlagL env tv1 of+uUnrefined env tv1' ty2 _ kco -- ty2 is not a type variable+  = case tvBindFlag env tv1' of       Skolem -> maybeApart  -- See Note [Unification with skolems]-      BindMe -> bindTv env tv1 (ty2 `mkCastTy` mkSymCo kco)+      BindMe -> bindTv env tv1' (ty2 `mkCastTy` mkSymCo kco) -bindTv :: UMEnv -> TyVar -> Type -> UM ()+bindTv :: UMEnv -> OutTyVar -> Type -> UM () -- OK, so we want to extend the substitution with tv := ty -- But first, we must do a couple of checks bindTv env tv1 ty2@@ -1026,9 +1130,10 @@         -- Make sure tys mentions no local variables         -- E.g.  (forall a. b) ~ (forall a. [a])         -- We should not unify b := [a]!-        ; checkRnEnvR env free_tvs2+        ; checkRnEnv env free_tvs2          -- Occurs check, see Note [Fine-grained unification]+        -- Make sure you include 'kco' (which ty2 does) Trac #14846         ; occurs <- occursCheck env tv1 free_tvs2          ; if occurs then maybeApart@@ -1066,13 +1171,28 @@ ************************************************************************ -} -data UMEnv = UMEnv { um_bind_fun :: TyVar -> BindFlag-                                       -- User-supplied BindFlag function-                   , um_unif     :: AmIUnifying-                   , um_inj_tf   :: Bool         -- Checking for injectivity?-                          -- See (end of) Note [Specification of unification]-                   , um_rn_env   :: RnEnv2 }+data UMEnv+  = UMEnv { um_unif :: AmIUnifying +          , um_inj_tf :: Bool+            -- Checking for injectivity?+            -- See (end of) Note [Specification of unification]++          , um_rn_env :: RnEnv2+            -- Renaming InTyVars to OutTyVars; this eliminates+            -- shadowing, and lines up matching foralls on the left+            -- and right++          , um_skols :: TyVarSet+            -- OutTyVars bound by a forall in this unification;+            -- Do not bind these in the substitution!+            -- See the function tvBindFlag++          , um_bind_fun :: TyVar -> BindFlag+            -- User-supplied BindFlag function,+            -- for variables not in um_skols+          }+ data UMState = UMState                    { um_tv_env   :: TvSubstEnv                    , um_cv_env   :: CvSubstEnv }@@ -1116,15 +1236,10 @@     state = UMState { um_tv_env = subst_env                     , um_cv_env = cv_subst_env } -tvBindFlagL :: UMEnv -> TyVar -> BindFlag-tvBindFlagL env tv-  | inRnEnvL (um_rn_env env) tv = Skolem-  | otherwise                   = um_bind_fun env tv--tvBindFlagR :: UMEnv -> TyVar -> BindFlag-tvBindFlagR env tv-  | inRnEnvR (um_rn_env env) tv = Skolem-  | otherwise                   = um_bind_fun env tv+tvBindFlag :: UMEnv -> OutTyVar -> BindFlag+tvBindFlag env tv+  | tv `elemVarSet` um_skols env = Skolem+  | otherwise                    = um_bind_fun env tv  getTvSubstEnv :: UM TvSubstEnv getTvSubstEnv = UM $ \state -> Unifiable (state, um_tv_env state)@@ -1148,18 +1263,22 @@  umRnBndr2 :: UMEnv -> TyCoVar -> TyCoVar -> UMEnv umRnBndr2 env v1 v2-  = env { um_rn_env = rnBndr2 (um_rn_env env) v1 v2 }+  = env { um_rn_env = rn_env', um_skols = um_skols env `extendVarSet` v' }+  where+    (rn_env', v') = rnBndr2_var (um_rn_env env) v1 v2 -checkRnEnv :: (RnEnv2 -> VarEnv Var) -> UMEnv -> VarSet -> UM ()-checkRnEnv get_set env varset = UM $ \ state ->-  let env_vars = get_set (um_rn_env env) in-  if isEmptyVarEnv env_vars || (getUniqSet varset `disjointVarEnv` env_vars)-     -- NB: That isEmptyVarSet is a critical optimization; it-     -- means we don't have to calculate the free vars of-     -- the type, often saving quite a bit of allocation.-  then Unifiable  (state, ())-  else MaybeApart (state, ())   -- ToDo: why MaybeApart-                                -- I think SurelyApart would be right+checkRnEnv :: UMEnv -> VarSet -> UM ()+checkRnEnv env varset+  | isEmptyVarSet skol_vars           = return ()+  | varset `disjointVarSet` skol_vars = return ()+  | otherwise                         = maybeApart+               -- ToDo: why MaybeApart?+               -- I think SurelyApart would be right+  where+    skol_vars = um_skols env+    -- NB: That isEmptyVarSet guard is a critical optimization;+    -- it means we don't have to calculate the free vars of+    -- the type, often saving quite a bit of allocation.  -- | Converts any SurelyApart to a MaybeApart don'tBeSoSure :: UM () -> UM ()@@ -1168,12 +1287,6 @@     SurelyApart -> MaybeApart (state, ())     other       -> other -checkRnEnvR :: UMEnv -> VarSet -> UM ()-checkRnEnvR env fvs = checkRnEnv rnEnvR env fvs--checkRnEnvRCo :: UMEnv -> Coercion -> UM ()-checkRnEnvRCo env co = checkRnEnv rnEnvR env (tyCoVarsOfCo co)- umRnOccL :: UMEnv -> TyVar -> TyVar umRnOccL env v = rnOccL (um_rn_env env) v @@ -1270,7 +1383,13 @@  ty_co_match menv subst ty co lkco rkco   | CastTy ty' co' <- ty-  = ty_co_match menv subst ty' co (co' `mkTransCo` lkco) (co' `mkTransCo` rkco)+     -- See Note [Matching in the presence of casts]+  = 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'+    in+    ty_co_match menv subst ty' co (substed_co_l `mkTransCo` lkco)+                                  (substed_co_r `mkTransCo` rkco)    | CoherenceCo co1 co2 <- co   = ty_co_match menv subst ty co1 (lkco `mkTransCo` mkSymCo co2) rkco
utils/Bag.hs view
@@ -18,7 +18,7 @@         concatBag, catBagMaybes, foldBag, foldrBag, foldlBag,         isEmptyBag, isSingletonBag, consBag, snocBag, anyBag, allBag,         listToBag, bagToList, mapAccumBagL,-        concatMapBag, mapMaybeBag,+        concatMapBag, concatMapBagPair, mapMaybeBag,         foldrBagM, foldlBagM, mapBagM, mapBagM_,         flatMapBagM, flatMapBagPairM,         mapAndUnzipBagM, mapAccumBagLM,@@ -232,6 +232,19 @@ concatMapBag f (TwoBags b1 b2) = unionBags (concatMapBag f b1) (concatMapBag f b2) concatMapBag f (ListBag xs)    = foldr (unionBags . f) emptyBag xs +concatMapBagPair :: (a -> (Bag b, Bag c)) -> Bag a -> (Bag b, Bag c)+concatMapBagPair _ EmptyBag        = (EmptyBag, EmptyBag)+concatMapBagPair f (UnitBag x)     = f x+concatMapBagPair f (TwoBags b1 b2) = (unionBags r1 r2, unionBags s1 s2)+  where+    (r1, s1) = concatMapBagPair f b1+    (r2, s2) = concatMapBagPair f b2+concatMapBagPair f (ListBag xs)    = foldr go (emptyBag, emptyBag) xs+  where+    go a (s1, s2) = (unionBags r1 s1, unionBags r2 s2)+      where+        (r1, r2) = f a+ mapMaybeBag :: (a -> Maybe b) -> Bag a -> Bag b mapMaybeBag _ EmptyBag        = EmptyBag mapMaybeBag f (UnitBag x)     = case f x of@@ -315,6 +328,7 @@  listToBag :: [a] -> Bag a listToBag [] = EmptyBag+listToBag [x] = UnitBag x listToBag vs = ListBag vs  bagToList :: Bag a -> [a]
utils/Binary.hs view
@@ -79,14 +79,10 @@ import Data.IORef import Data.Char                ( ord, chr ) import Data.Time-#if MIN_VERSION_base(4,10,0) import Type.Reflection import Type.Reflection.Unsafe import Data.Kind (Type) import GHC.Exts (TYPE, RuntimeRep(..), VecCount(..), VecElem(..))-#else-import Data.Typeable-#endif import Control.Monad            ( when ) import System.IO as IO import System.IO.Unsafe         ( unsafeInterleaveIO )@@ -610,7 +606,6 @@ -- ----------------------------------------------------------------------------- -- Instances for Data.Typeable stuff -#if MIN_VERSION_base(4,10,0) instance Binary TyCon where     put_ bh tc = do         put_ bh (tyConPackage tc)@@ -620,17 +615,7 @@         put_ bh (tyConKindRep tc)     get bh =         mkTyCon <$> get bh <*> get bh <*> get bh <*> get bh <*> get bh-#else-instance Binary TyCon where-    put_ bh tc = do-        put_ bh (tyConPackage tc)-        put_ bh (tyConModule tc)-        put_ bh (tyConName tc)-    get bh =-        mkTyCon3 <$> get bh <*> get bh <*> get bh-#endif -#if MIN_VERSION_base(4,10,0) instance Binary VecCount where     put_ bh = putByte bh . fromIntegral . fromEnum     get bh = toEnum . fromIntegral <$> getByte bh@@ -781,17 +766,6 @@ instance Binary SomeTypeRep where     put_ bh (SomeTypeRep rep) = putTypeRep bh rep     get = getSomeTypeRep-#else-instance Binary TypeRep where-    put_ bh type_rep = do-        let (ty_con, child_type_reps) = splitTyConApp type_rep-        put_ bh ty_con-        put_ bh child_type_reps-    get bh = do-        ty_con <- get bh-        child_type_reps <- get bh-        return (mkTyConApp ty_con child_type_reps)-#endif  -- ----------------------------------------------------------------------------- -- Lazy reading/writing
utils/BufWrite.hs view
@@ -20,6 +20,7 @@         bPutFS,         bPutFZS,         bPutLitString,+        bPutReplicate,         bFlush,   ) where @@ -97,18 +98,44 @@                 copyBytes (buf `plusPtr` i) ptr len                 writeFastMutInt r (i + len) -bPutLitString :: BufHandle -> LitString -> Int -> IO ()-bPutLitString b@(BufHandle buf r hdl) a len = a `seq` do+bPutLitString :: BufHandle -> LitString -> IO ()+bPutLitString b@(BufHandle buf r hdl) l@(LitString a len) = l `seq` do   i <- readFastMutInt r   if (i+len) >= buf_size         then do hPutBuf hdl buf i                 writeFastMutInt r 0                 if (len >= buf_size)                     then hPutBuf hdl a len-                    else bPutLitString b a len+                    else bPutLitString b l         else do                 copyBytes (buf `plusPtr` i) a len                 writeFastMutInt r (i+len)++-- | Replicate an 8-bit character+bPutReplicate :: BufHandle -> Int -> Char -> IO ()+bPutReplicate (BufHandle buf r hdl) len c = do+  i <- readFastMutInt r+  let oc = fromIntegral (ord c)+  if (i+len) < buf_size+    then do+      fillBytes (buf `plusPtr` i) oc len+      writeFastMutInt r (i+len)+    else do+      -- flush the current buffer+      when (i /= 0) $ hPutBuf hdl buf i+      if (len < buf_size)+        then do+          fillBytes buf oc len+          writeFastMutInt r len+        else do+          -- fill a full buffer+          fillBytes buf oc buf_size+          -- flush it as many times as necessary+          let go n | n >= buf_size = do+                                       hPutBuf hdl buf buf_size+                                       go (n-buf_size)+                   | otherwise     = writeFastMutInt r n+          go len  bFlush :: BufHandle -> IO () bFlush (BufHandle buf r hdl) = do
utils/Digraph.hs view
@@ -7,12 +7,10 @@          SCC(..), Node(..), flattenSCC, flattenSCCs,         stronglyConnCompG,-        topologicalSortG, dfsTopSortG,+        topologicalSortG,         verticesG, edgesG, hasVertexG,         reachableG, reachablesG, transposeG,-        outdegreeG, indegreeG,-        vertexGroupsG, emptyG,-        componentsG,+        emptyG,          findCycle, @@ -45,17 +43,11 @@ import Util        ( minWith, count ) import Outputable import Maybes      ( expectJust )-import MonadUtils  ( allM ) --- Extensions-import Control.Monad    ( filterM, liftM, liftM2 )-import Control.Monad.ST- -- std interfaces import Data.Maybe import Data.Array import Data.List hiding (transpose)-import Data.Array.ST import qualified Data.Map as Map import qualified Data.Set as Set @@ -349,12 +341,6 @@ topologicalSortG graph = map (gr_vertex_to_node graph) result   where result = {-# SCC "Digraph.topSort" #-} topSort (gr_int_graph graph) -dfsTopSortG :: Graph node -> [[node]]-dfsTopSortG graph =-  map (map (gr_vertex_to_node graph) . flatten) $ dfs g (topSort g)-  where-    g = gr_int_graph graph- reachableG :: Graph node -> node -> [node] reachableG graph from = map (gr_vertex_to_node graph) result   where from_vertex = expectJust "reachableG" (gr_node_to_vertex graph from)@@ -381,27 +367,9 @@                          (gr_vertex_to_node graph)                          (gr_node_to_vertex graph) -outdegreeG :: Graph node -> node -> Maybe Int-outdegreeG = degreeG outdegree--indegreeG :: Graph node -> node -> Maybe Int-indegreeG = degreeG indegree--degreeG :: (G.Graph -> Table Int) -> Graph node -> node -> Maybe Int-degreeG degree graph node = let table = degree (gr_int_graph graph)-                            in fmap ((!) table) $ gr_node_to_vertex graph node--vertexGroupsG :: Graph node -> [[node]]-vertexGroupsG graph = map (map (gr_vertex_to_node graph)) result-  where result = vertexGroups (gr_int_graph graph)- emptyG :: Graph node -> Bool emptyG g = graphEmpty (gr_int_graph g) -componentsG :: Graph node -> [[node]]-componentsG graph = map (map (gr_vertex_to_node graph) . flatten)-                  $ components (gr_int_graph graph)- {- ************************************************************************ *                                                                      *@@ -452,58 +420,3 @@ -- This generalizes reachable which was found in Data.Graph reachable    :: IntGraph -> [Vertex] -> [Vertex] reachable g vs = preorderF (dfs g vs)--{----------------------------------------------------------------- Total ordering on groups of vertices---------------------------------------------------------------The plan here is to extract a list of groups of elements of the graph-such that each group has no dependence except on nodes in previous-groups (i.e. in particular they may not depend on nodes in their own-group) and is maximal such group.--Clearly we cannot provide a solution for cyclic graphs.--We proceed by iteratively removing elements with no outgoing edges-and their associated edges from the graph.--This probably isn't very efficient and certainly isn't very clever.--}--type Set s    = STArray s Vertex Bool--mkEmpty      :: Bounds -> ST s (Set s)-mkEmpty bnds  = newArray bnds False--contains     :: Set s -> Vertex -> ST s Bool-contains m v  = readArray m v--include      :: Set s -> Vertex -> ST s ()-include m v   = writeArray m v True--vertexGroups :: IntGraph -> [[Vertex]]-vertexGroups g = runST (mkEmpty (bounds g) >>= \provided -> vertexGroupsS provided g next_vertices)-  where next_vertices = noOutEdges g--noOutEdges :: IntGraph -> [Vertex]-noOutEdges g = [ v | v <- vertices g, null (g!v)]--vertexGroupsS :: Set s -> IntGraph -> [Vertex] -> ST s [[Vertex]]-vertexGroupsS provided g to_provide-  = if null to_provide-    then do {-          all_provided <- allM (provided `contains`) (vertices g)-        ; if all_provided-          then return []-          else error "vertexGroup: cyclic graph"-        }-    else do {-          mapM_ (include provided) to_provide-        ; to_provide' <- filterM (vertexReady provided g) (vertices g)-        ; rest <- vertexGroupsS provided g to_provide'-        ; return $ to_provide : rest-        }--vertexReady :: Set s -> IntGraph -> Vertex -> ST s Bool-vertexReady provided g v = liftM2 (&&) (liftM not $ provided `contains` v) (allM (provided `contains`) (g!v))
utils/FastString.hs view
@@ -18,7 +18,7 @@ -- -- ['LitString'] -----   * Just a wrapper for the @Addr#@ of a C string (@Ptr CChar@).+--   * Pointer and size of a Latin-1 encoded string. --   * Practically no operations. --   * Outputing them is fast. --   * Generated by 'sLit'.@@ -81,7 +81,7 @@         hasZEncoding,          -- * LitStrings-        LitString,+        LitString (..),          -- ** Construction         sLit,@@ -130,7 +130,7 @@ import GHC.Conc.Sync    (sharedCAF) #endif -import GHC.Base         ( unpackCString# )+import GHC.Base         ( unpackCString#, unpackNBytes# )  #define hASH_TBL_SIZE          4091 #define hASH_TBL_SIZE_UNBOXED  4091#@@ -227,7 +227,7 @@   if u1 == u2 then EQ else   compare (fastStringToByteString f1) (fastStringToByteString f2) -foreign import ccall unsafe "ghc_memcmp"+foreign import ccall unsafe "memcmp"   memcmp :: Ptr a -> Ptr b -> Int -> IO Int  -- -----------------------------------------------------------------------------@@ -568,15 +568,12 @@ -- ----------------------------------------------------------------------------- -- LitStrings, here for convenience only. --- | A 'LitString' is a pointer to some null-terminated array of bytes.-type LitString = Ptr Word8---Why do we recalculate length every time it's requested?---If it's commonly needed, we should perhaps have---data LitString = LitString {-#UNPACK#-}!Addr# {-#UNPACK#-}!Int#+-- | A 'LitString' is a pointer to some array of Latin-1 encoded chars.+data LitString = LitString !(Ptr Word8) !Int  -- | Wrap an unboxed address into a 'LitString'. mkLitString# :: Addr# -> LitString-mkLitString# a# = Ptr a#+mkLitString# a# = LitString (Ptr a#) (ptrStrLength (Ptr a#))  -- | Encode a 'String' into a newly allocated 'LitString' using Latin-1 -- encoding.  The original string must not contain non-Latin-1 characters@@ -584,32 +581,34 @@ {-# INLINE mkLitString #-} mkLitString :: String -> LitString mkLitString s =+ -- we don't use `unsafeDupablePerformIO` here to avoid potential memory leaks+ -- and because someone might be using `eqAddr#` to check for string equality.  unsafePerformIO (do-   p <- mallocBytes (length s + 1)+   let len = length s+   p <- mallocBytes len    let      loop :: Int -> String -> IO ()-     loop !n [] = pokeByteOff p n (0 :: Word8)+     loop !_ []    = return ()      loop n (c:cs) = do         pokeByteOff p n (fromIntegral (ord c) :: Word8)         loop (1+n) cs    loop 0 s-   return p+   return (LitString p len)  )  -- | Decode a 'LitString' back into a 'String' using Latin-1 encoding. -- This does not free the memory associated with 'LitString'. unpackLitString :: LitString -> String-unpackLitString (Ptr p) = unpackCString# p+unpackLitString (LitString (Ptr p#) (I# n#)) = unpackNBytes# p# n# --- | Compute the length of a 'LitString', which must necessarily be--- null-terminated.+-- | Return the length of a 'LitString' lengthLS :: LitString -> Int-lengthLS = ptrStrLength+lengthLS (LitString _ n) = n  -- ----------------------------------------------------------------------------- -- under the carpet -foreign import ccall unsafe "ghc_strlen"+foreign import ccall unsafe "strlen"   ptrStrLength :: Ptr Word8 -> Int  {-# NOINLINE sLit #-}
utils/Fingerprint.hsc view
@@ -42,7 +42,6 @@        [(w1,"")] = readHex s1        [(w2,"")] = readHex (take 16 s2) --- this can move to GHC.Fingerprint in GHC 8.6 fingerprintByteString :: BS.ByteString -> Fingerprint fingerprintByteString bs = unsafeDupablePerformIO $   BS.unsafeUseAsCStringLen bs $ \(ptr, len) -> fingerprintData (castPtr ptr) len
utils/ListSetOps.hs view
@@ -8,7 +8,7 @@ {-# LANGUAGE CPP #-}  module ListSetOps (-        unionLists, minusList,+        unionLists, minusList, deleteBys,          -- Association lists         Assoc, assoc, assocMaybe, assocUsing, assocDefault, assocDefaultUsing,@@ -36,6 +36,11 @@ getNth :: Outputable a => [a] -> Int -> a getNth xs n = ASSERT2( xs `lengthExceeds` n, ppr n $$ ppr xs )              xs !! n++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  {- ************************************************************************
utils/OrdList.hs view
@@ -122,4 +122,5 @@  toOL :: [a] -> OrdList a toOL [] = None+toOL [x] = One x toOL xs = Many xs
utils/Outputable.hs view
@@ -22,13 +22,13 @@         empty, isEmpty, nest,         char,         text, ftext, ptext, ztext,-        int, intWithCommas, integer, float, double, rational, doublePrec,+        int, intWithCommas, integer, word, float, double, rational, doublePrec,         parens, cparen, brackets, braces, quotes, quote,-        doubleQuotes, angleBrackets, paBrackets,+        doubleQuotes, angleBrackets,         semi, comma, colon, dcolon, space, equals, dot, vbar,         arrow, larrow, darrow, arrowt, larrowt, arrowtt, larrowtt,         lparen, rparen, lbrack, rbrack, lbrace, rbrace, underscore,-        blankLine, forAllLit, kindStar, bullet,+        blankLine, forAllLit, kindType, bullet,         (<>), (<+>), hcat, hsep,         ($$), ($+$), vcat,         sep, cat,@@ -69,6 +69,7 @@         alwaysQualifyPackages, neverQualifyPackages,         QualifyName(..), queryQual,         sdocWithDynFlags, sdocWithPlatform,+        updSDocDynFlags,         getPprStyle, withPprStyle, withPprStyleDoc, setStyleColoured,         pprDeeper, pprDeeperList, pprSetDepth,         codeStyle, userStyle, debugStyle, dumpStyle, asmStyle,@@ -81,7 +82,7 @@         -- * Error handling and debugging utilities         pprPanic, pprSorry, assertPprPanic, pprPgmError,         pprTrace, pprTraceDebug, pprTraceIt, warnPprTrace, pprSTrace,-        pprTraceException,+        pprTraceException, pprTraceM,         trace, pgmError, panic, sorry, assertPanic,         pprDebugAndThen, callStackDoc,     ) where@@ -90,8 +91,9 @@  import {-# SOURCE #-}   DynFlags( DynFlags, hasPprDebug, hasNoDebugOutput,                                   targetPlatform, pprUserLength, pprCols,-                                  useUnicode, useUnicodeSyntax,-                                  shouldUseColor, unsafeGlobalDynFlags )+                                  useUnicode, useUnicodeSyntax, useStarIsType,+                                  shouldUseColor, unsafeGlobalDynFlags,+                                  shouldUseHexWordLiterals ) import {-# SOURCE #-}   Module( UnitId, Module, ModuleName, moduleName ) import {-# SOURCE #-}   OccName( OccName ) @@ -179,12 +181,8 @@     queryQualifyPackage :: QueryQualifyPackage } --- | given an /original/ name, this function tells you which module--- name it should be qualified with when printing for the user, if--- any.  For example, given @Control.Exception.catch@, which is in scope--- as @Exception.catch@, this function will return @Just "Exception"@.--- Note that the return value is a ModuleName, not a Module, because--- in source code, names are qualified by ModuleNames.+-- | Given a `Name`'s `Module` and `OccName`, decide whether and how to qualify+-- it. type QueryQualifyName = Module -> OccName -> QualifyName  -- | For a given module, we need to know whether to print it with@@ -386,6 +384,10 @@ sdocWithPlatform :: (Platform -> SDoc) -> SDoc sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) +updSDocDynFlags :: (DynFlags -> DynFlags) -> SDoc -> SDoc+updSDocDynFlags upd doc+  = SDoc $ \ctx -> runSDoc doc (ctx { sdocDynFlags = upd (sdocDynFlags ctx) })+ qualName :: PprStyle -> QueryQualifyName qualName (PprUser q _ _) mod occ = queryQualifyName q mod occ qualName (PprDump q)     mod occ = queryQualifyName q mod occ@@ -555,6 +557,7 @@ ztext    :: FastZString -> SDoc int      :: Int        -> SDoc integer  :: Integer    -> SDoc+word     :: Integer    -> SDoc float    :: Float      -> SDoc double   :: Double     -> SDoc rational :: Rational   -> SDoc@@ -573,6 +576,11 @@ float n     = docToSDoc $ Pretty.float n double n    = docToSDoc $ Pretty.double n rational n  = docToSDoc $ Pretty.rational n+word n      = sdocWithDynFlags $ \dflags ->+    -- See Note [Print Hexadecimal Literals] in Pretty.hs+    if shouldUseHexWordLiterals dflags+        then docToSDoc $ Pretty.hex n+        else docToSDoc $ Pretty.integer n  -- | @doublePrec p n@ shows a floating point number @n@ with @p@ -- digits of precision after the decimal point.@@ -580,7 +588,7 @@ doublePrec p n = text (showFFloat (Just p) n "")  parens, braces, brackets, quotes, quote,-        paBrackets, doubleQuotes, angleBrackets :: SDoc -> SDoc+        doubleQuotes, angleBrackets :: SDoc -> SDoc  parens d        = SDoc $ Pretty.parens . runSDoc d braces d        = SDoc $ Pretty.braces . runSDoc d@@ -588,7 +596,6 @@ quote d         = SDoc $ Pretty.quote . runSDoc d doubleQuotes d  = SDoc $ Pretty.doubleQuotes . runSDoc d angleBrackets d = char '<' <> d <> char '>'-paBrackets d    = text "[:" <> d <> text ":]"  cparen :: Bool -> SDoc -> SDoc cparen b d = SDoc $ Pretty.maybeParens b . runSDoc d@@ -639,8 +646,11 @@ forAllLit :: SDoc forAllLit = unicodeSyntax (char '∀') (text "forall") -kindStar :: SDoc-kindStar = unicodeSyntax (char '★') (char '*')+kindType :: SDoc+kindType = sdocWithDynFlags $ \dflags ->+    if useStarIsType dflags+    then unicodeSyntax (char '★') (char '*')+    else text "Type"  bullet :: SDoc bullet = unicode (char '•') (char '*')@@ -969,9 +979,9 @@ pprPrimInt, pprPrimWord, pprPrimInt64, pprPrimWord64 :: Integer -> SDoc pprPrimChar c   = pprHsChar c <> primCharSuffix pprPrimInt i    = integer i   <> primIntSuffix-pprPrimWord w   = integer w   <> primWordSuffix+pprPrimWord w   = word    w   <> primWordSuffix pprPrimInt64 i  = integer i   <> primInt64Suffix-pprPrimWord64 w = integer w   <> primWord64Suffix+pprPrimWord64 w = word    w   <> primWord64Suffix  --------------------- -- Put a name in parens if it's an operator@@ -1170,6 +1180,9 @@    | otherwise                             =       pprDebugAndThen unsafeGlobalDynFlags trace (text str) doc x +pprTraceM :: Applicative f => String -> SDoc -> f ()+pprTraceM str doc = pprTrace str doc (pure ())+ -- | @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@@ -1203,9 +1216,7 @@ -- line number. Should typically be accessed with the ASSERT family of macros assertPprPanic :: HasCallStack => String -> Int -> SDoc -> a assertPprPanic _file _line msg-  = pprPanic "ASSERT failed!" doc-  where-    doc = sep [ msg, callStackDoc ]+  = pprPanic "ASSERT failed!" msg  pprDebugAndThen :: DynFlags -> (String -> a) -> SDoc -> SDoc -> a pprDebugAndThen dflags cont heading pretty_msg
utils/Pair.hs view
@@ -18,7 +18,7 @@ -- Note that Pair is a *unary* type constructor -- whereas (,) is binary --- The important thing about Pair is that it has a *homogenous*+-- 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
utils/Platform.hs view
@@ -87,6 +87,7 @@         | OSHaiku         | OSQNXNTO         | OSAIX+        | OSHurd         deriving (Read, Show, Eq)  -- | ARM Instruction Set Architecture, Extensions and ABI@@ -136,6 +137,7 @@ 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
utils/Pretty.hs view
@@ -72,7 +72,7 @@          -- ** Converting values into documents         char, text, ftext, ptext, ztext, sizedText, zeroWidthText,-        int, integer, float, double, rational,+        int, integer, float, double, rational, hex,          -- ** Simple derived documents         semi, comma, colon, space, equals,@@ -103,7 +103,7 @@         Mode(..),          -- ** General rendering-        fullRender,+        fullRender, txtPrinter,          -- ** GHC-specific rendering         printDoc, printDoc_,@@ -117,9 +117,10 @@ import FastString import Panic import System.IO+import Numeric (showHex)  --for a RULES-import GHC.Base ( unpackCString# )+import GHC.Base ( unpackCString#, unpackNBytes#, Int(..) ) import GHC.Ptr  ( Ptr(..) )  -- Don't import Util( assertPanic ) because it makes a loop in the module structure@@ -269,8 +270,10 @@                  | Str  String -- ^ A whole String fragment                  | PStr FastString                      -- a hashed string                  | ZStr FastZString                     -- a z-encoded string-                 | LStr {-# UNPACK #-} !LitString {-#UNPACK #-} !Int+                 | LStr {-# UNPACK #-} !LitString                    -- a '\0'-terminated array of bytes+                 | RStr {-# UNPACK #-} !Int {-# UNPACK #-} !Char+                   -- a repeated character (e.g., ' ')  instance Show Doc where   showsPrec _ doc cont = fullRender (mode style) (lineLength style)@@ -295,25 +298,28 @@ -- The side condition on the last law is necessary because @'text' \"\"@ -- has height 1, while 'empty' has no height. text :: String -> Doc-text s = case length s of {sl -> textBeside_ (Str s)  sl Empty}+text s = textBeside_ (Str s) (length s) Empty {-# NOINLINE [0] text #-}   -- Give the RULE a chance to fire                             -- It must wait till after phase 1 when                             -- the unpackCString first is manifested  -- RULE that turns (text "abc") into (ptext (A# "abc"#)) to avoid the -- intermediate packing/unpacking of the string.-{-# RULES-  "text/str" forall a. text (unpackCString# a) = ptext (Ptr a)- #-}+{-# RULES "text/str"+    forall a. text (unpackCString# a)  = ptext (mkLitString# a)+  #-}+{-# RULES "text/unpackNBytes#"+    forall p n. text (unpackNBytes# p n) = ptext (LitString (Ptr p) (I# n))+  #-}  ftext :: FastString -> Doc-ftext s = case lengthFS s of {sl -> textBeside_ (PStr s) sl Empty}+ftext s = textBeside_ (PStr s) (lengthFS s) Empty  ptext :: LitString -> Doc-ptext s = case lengthLS s of {sl -> textBeside_ (LStr s sl) sl Empty}+ptext s = textBeside_ (LStr s) (lengthLS s) Empty  ztext :: FastZString -> Doc-ztext s = case lengthFZS s of {sl -> textBeside_ (ZStr s) sl Empty}+ztext s = textBeside_ (ZStr s) (lengthFZS s) Empty  -- | Some text with any width. (@text s = sizedText (length s) s@) sizedText :: Int -> String -> Doc@@ -335,12 +341,6 @@ isEmpty Empty = True isEmpty _     = False --- | Produce spacing for indenting the amount specified.------ an old version inserted tabs being 8 columns apart in the output.-spaces :: Int -> String-spaces !n = replicate n ' '- {- Q: What is the reason for negative indentation (i.e. argument to indent    is < 0) ?@@ -404,11 +404,18 @@ float    :: Float    -> Doc -- ^ @float n = text (show n)@ double   :: Double   -> Doc -- ^ @double n = text (show n)@ rational :: Rational -> Doc -- ^ @rational n = text (show n)@+hex      :: Integer  -> Doc -- ^ See Note [Print Hexadecimal Literals] int      n = text (show n) integer  n = text (show n) float    n = text (show n) double   n = text (show n) rational n = text (show n)+hex      n = text ('0' : 'x' : padded)+    where+    str = showHex n ""+    strLen = max 1 (length str)+    len = 2 ^ (ceiling (logBase 2 (fromIntegral strLen :: Double)) :: Int)+    padded = replicate (len - strLen) '0' ++ str  parens       :: Doc -> Doc -- ^ Wrap document in @(...)@ brackets     :: Doc -> Doc -- ^ Wrap document in @[...]@@@ -423,6 +430,57 @@ brackets p     = char '[' <> p <> char ']' braces p       = char '{' <> p <> char '}' +{-+Note [Print Hexadecimal Literals]++Relevant discussions:+ * Phabricator: https://phabricator.haskell.org/D4465+ * GHC Trac: https://ghc.haskell.org/trac/ghc/ticket/14872++There is a flag `-dword-hex-literals` that causes literals of+type `Word#` or `Word64#` to be displayed in hexadecimal instead+of decimal when dumping GHC core. It also affects the presentation+of these in GHC's error messages. Additionally, the hexadecimal+encoding of these numbers is zero-padded so that its length is+a power of two. As an example of what this does,+consider the following haskell file `Literals.hs`:++    module Literals where++    alpha :: Int+    alpha = 100 + 200++    beta :: Word -> Word+    beta x = x + div maxBound 255 + div 0xFFFFFFFF 255 + 0x0202++We get the following dumped core when we compile on a 64-bit+machine with ghc -O2 -fforce-recomp -ddump-simpl -dsuppress-all+-dhex-word-literals literals.hs:++    ==================== Tidy Core ====================++    ... omitted for brevity ...++    -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}+    alpha+    alpha = I# 300#++    -- RHS size: {terms: 12, types: 3, coercions: 0, joins: 0/0}+    beta+    beta+      = \ x_aYE ->+          case x_aYE of { W# x#_a1v0 ->+          W#+            (plusWord#+               (plusWord# (plusWord# x#_a1v0 0x0101010101010101##) 0x01010101##)+               0x0202##)+          }++Notice that the word literals are in hexadecimals and that they have+been padded with zeroes so that their lengths are 16, 8, and 4, respectively.++-}+ -- | Apply 'parens' to 'Doc' if boolean is true. maybeParens :: Bool -> Doc -> Doc maybeParens False = id@@ -596,7 +654,7 @@                                -- Here's why the "text s <>" is in the spec! nilAboveNest g k (Nest k1 q) = nilAboveNest g (k + k1) q nilAboveNest g k q           | not g && k > 0      -- No newline if no overlap-                             = textBeside_ (Str (spaces k)) k q+                             = textBeside_ (RStr k ' ') k q                              | otherwise           -- Put them really above                              = nilAbove_ (mkNest k q) @@ -879,11 +937,12 @@  -- | Default TextDetails printer txtPrinter :: TextDetails -> String -> String-txtPrinter (Chr c)   s  = c:s-txtPrinter (Str s1)  s2 = s1 ++ s2-txtPrinter (PStr s1) s2 = unpackFS s1 ++ s2-txtPrinter (ZStr s1) s2 = zString s1 ++ s2-txtPrinter (LStr s1 _) s2 = unpackLitString s1 ++ s2+txtPrinter (Chr c)    s  = c:s+txtPrinter (Str s1)   s2 = s1 ++ s2+txtPrinter (PStr s1)  s2 = unpackFS s1 ++ s2+txtPrinter (ZStr s1)  s2 = zString s1 ++ s2+txtPrinter (LStr s1)  s2 = unpackLitString s1 ++ s2+txtPrinter (RStr n c) s2 = replicate n c ++ s2  -- | The general rendering interface. fullRender :: Mode                     -- ^ Rendering mode@@ -969,10 +1028,7 @@         lay2 _ NoDoc               = error "display lay2 NoDoc"         lay2 _ (Union {})          = error "display lay2 Union" -        -- optimise long indentations using LitString chunks of 8 spaces-        indent !n r | n >= 8    = LStr (sLit "        ") 8 `txt`-                                  indent (n - 8) r-                    | otherwise = Str (spaces n) `txt` r+        indent !n r                = RStr n ' ' `txt` r     in     lay 0 doc     }}@@ -991,21 +1047,21 @@   = do { fullRender mode pprCols 1.5 put done doc ;          hFlush hdl }   where-    put (Chr c)  next = hPutChar hdl c >> next-    put (Str s)  next = hPutStr  hdl s >> next-    put (PStr s) next = hPutStr  hdl (unpackFS s) >> next-                        -- NB. not hPutFS, we want this to go through-                        -- the I/O library's encoding layer. (#3398)-    put (ZStr s) next = hPutFZS  hdl s >> next-    put (LStr s l) next = hPutLitString hdl s l >> next+    put (Chr c)    next = hPutChar hdl c >> next+    put (Str s)    next = hPutStr  hdl s >> next+    put (PStr s)   next = hPutStr  hdl (unpackFS s) >> next+                          -- NB. not hPutFS, we want this to go through+                          -- the I/O library's encoding layer. (#3398)+    put (ZStr s)   next = hPutFZS  hdl s >> next+    put (LStr s)   next = hPutLitString hdl s >> next+    put (RStr n c) next = hPutStr hdl (replicate n c) >> next      done = return () -- hPutChar hdl '\n'    -- some versions of hPutBuf will barf if the length is zero-hPutLitString :: Handle -> Ptr a -> Int -> IO ()-hPutLitString handle a l = if l == 0-                            then return ()-                            else hPutBuf handle a l+hPutLitString :: Handle -> LitString -> IO ()+hPutLitString _handle (LitString _ 0) = return ()+hPutLitString handle  (LitString a l) = hPutBuf handle a l  -- Printing output in LeftMode is performance critical: it's used when -- dumping C and assembly output, so we allow ourselves a few dirty@@ -1043,7 +1099,8 @@     put b (Str s)    = bPutStr  b s     put b (PStr s)   = bPutFS   b s     put b (ZStr s)   = bPutFZS  b s-    put b (LStr s l) = bPutLitString b s l+    put b (LStr s)   = bPutLitString b s+    put b (RStr n c) = bPutReplicate b n c layLeft _ _                  = panic "layLeft: Unhandled case"  -- Define error=panic, for easier comparison with libraries/pretty.
utils/StringBuffer.hs view
@@ -323,5 +323,6 @@   = inlinePerformIO $ withForeignPtr buf $ \ptr -> return $! let     go i x | i == len  = x            | otherwise = case fst (utf8DecodeChar (ptr `plusPtr` (cur + i))) of+               '_'  -> go (i + 1) x    -- skip "_" (#14473)                char -> go (i + 1) (x * radix + toInteger (char_to_int char))   in go 0 0
+ utils/TrieMap.hs view
@@ -0,0 +1,405 @@+{-+(c) The University of Glasgow 2006+(c) The GRASP/AQUA Project, Glasgow University, 1992-1998+-}++{-# LANGUAGE RankNTypes #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE TypeSynonymInstances #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE UndecidableInstances #-}+module TrieMap(+   -- * Maps over 'Maybe' values+   MaybeMap,+   -- * Maps over 'List' values+   ListMap,+   -- * Maps over 'Literal's+   LiteralMap,+   -- * 'TrieMap' class+   TrieMap(..), insertTM, deleteTM,++   -- * Things helpful for adding additional Instances.+   (>.>), (|>), (|>>), XT,+   foldMaybe,+   -- * Map for leaf compression+   GenMap,+   lkG, xtG, mapG, fdG,+   xtList, lkList++ ) where++import GhcPrelude++import Literal+import UniqDFM+import Unique( Unique )++import qualified Data.Map    as Map+import qualified Data.IntMap as IntMap+import Outputable+import Control.Monad( (>=>) )++{-+This module implements TrieMaps, which are finite mappings+whose key is a structured value like a CoreExpr or Type.++This file implements tries over general data structures.+Implementation for tries over Core Expressions/Types are+available in coreSyn/TrieMap.++The regular pattern for handling TrieMaps on data structures was first+described (to my knowledge) in Connelly and Morris's 1995 paper "A+generalization of the Trie Data Structure"; there is also an accessible+description of the idea in Okasaki's book "Purely Functional Data+Structures", Section 10.3.2++************************************************************************+*                                                                      *+                   The TrieMap class+*                                                                      *+************************************************************************+-}++type XT a = Maybe a -> Maybe a  -- How to alter a non-existent elt (Nothing)+                                --               or an existing elt (Just)++class TrieMap m where+   type Key m :: *+   emptyTM  :: m a+   lookupTM :: forall b. Key m -> m b -> Maybe b+   alterTM  :: forall b. Key m -> XT b -> m b -> m b+   mapTM    :: (a->b) -> m a -> m b++   foldTM   :: (a -> b -> b) -> m a -> b -> b+      -- The unusual argument order here makes+      -- it easy to compose calls to foldTM;+      -- see for example fdE below++insertTM :: TrieMap m => Key m -> a -> m a -> m a+insertTM k v m = alterTM k (\_ -> Just v) m++deleteTM :: TrieMap m => Key m -> m a -> m a+deleteTM k m = alterTM k (\_ -> Nothing) m++----------------------+-- Recall that+--   Control.Monad.(>=>) :: (a -> Maybe b) -> (b -> Maybe c) -> a -> Maybe c++(>.>) :: (a -> b) -> (b -> c) -> a -> c+-- Reverse function composition (do f first, then g)+infixr 1 >.>+(f >.> g) x = g (f x)+infixr 1 |>, |>>++(|>) :: a -> (a->b) -> b     -- Reverse application+x |> f = f x++----------------------+(|>>) :: TrieMap m2+      => (XT (m2 a) -> m1 (m2 a) -> m1 (m2 a))+      -> (m2 a -> m2 a)+      -> m1 (m2 a) -> m1 (m2 a)+(|>>) f g = f (Just . g . deMaybe)++deMaybe :: TrieMap m => Maybe (m a) -> m a+deMaybe Nothing  = emptyTM+deMaybe (Just m) = m++{-+************************************************************************+*                                                                      *+                   IntMaps+*                                                                      *+************************************************************************+-}++instance TrieMap IntMap.IntMap where+  type Key IntMap.IntMap = Int+  emptyTM = IntMap.empty+  lookupTM k m = IntMap.lookup k m+  alterTM = xtInt+  foldTM k m z = IntMap.foldr k z m+  mapTM f m = IntMap.map f m++xtInt :: Int -> XT a -> IntMap.IntMap a -> IntMap.IntMap a+xtInt k f m = IntMap.alter f k m++instance Ord k => TrieMap (Map.Map k) where+  type Key (Map.Map k) = k+  emptyTM = Map.empty+  lookupTM = Map.lookup+  alterTM k f m = Map.alter f k m+  foldTM k m z = Map.foldr k z m+  mapTM f m = Map.map f m+++{-+Note [foldTM determinism]+~~~~~~~~~~~~~~~~~~~~~~~~~+We want foldTM to be deterministic, which is why we have an instance of+TrieMap for UniqDFM, but not for UniqFM. Here's an example of some things that+go wrong if foldTM is nondeterministic. Consider:++  f a b = return (a <> b)++Depending on the order that the typechecker generates constraints you+get either:++  f :: (Monad m, Monoid a) => a -> a -> m a++or:++  f :: (Monoid a, Monad m) => a -> a -> m a++The generated code will be different after desugaring as the dictionaries+will be bound in different orders, leading to potential ABI incompatibility.++One way to solve this would be to notice that the typeclasses could be+sorted alphabetically.++Unfortunately that doesn't quite work with this example:++  f a b = let x = a <> a; y = b <> b in x++where you infer:++  f :: (Monoid m, Monoid m1) => m1 -> m -> m1++or:++  f :: (Monoid m1, Monoid m) => m1 -> m -> m1++Here you could decide to take the order of the type variables in the type+according to depth first traversal and use it to order the constraints.++The real trouble starts when the user enables incoherent instances and+the compiler has to make an arbitrary choice. Consider:++  class T a b where+    go :: a -> b -> String++  instance (Show b) => T Int b where+    go a b = show a ++ show b++  instance (Show a) => T a Bool where+    go a b = show a ++ show b++  f = go 10 True++GHC is free to choose either dictionary to implement f, but for the sake of+determinism we'd like it to be consistent when compiling the same sources+with the same flags.++inert_dicts :: DictMap is implemented with a TrieMap. In getUnsolvedInerts it+gets converted to a bag of (Wanted) Cts using a fold. Then in+solve_simple_wanteds it's merged with other WantedConstraints. We want the+conversion to a bag to be deterministic. For that purpose we use UniqDFM+instead of UniqFM to implement the TrieMap.++See Note [Deterministic UniqFM] in UniqDFM for more details on how it's made+deterministic.+-}++instance TrieMap UniqDFM where+  type Key UniqDFM = Unique+  emptyTM = emptyUDFM+  lookupTM k m = lookupUDFM m k+  alterTM k f m = alterUDFM f m k+  foldTM k m z = foldUDFM k z m+  mapTM f m = mapUDFM f m++{-+************************************************************************+*                                                                      *+                   Maybes+*                                                                      *+************************************************************************++If              m is a map from k -> val+then (MaybeMap m) is a map from (Maybe k) -> val+-}++data MaybeMap m a = MM { mm_nothing  :: Maybe a, mm_just :: m a }++instance TrieMap m => TrieMap (MaybeMap m) where+   type Key (MaybeMap m) = Maybe (Key m)+   emptyTM  = MM { mm_nothing = Nothing, mm_just = emptyTM }+   lookupTM = lkMaybe lookupTM+   alterTM  = xtMaybe alterTM+   foldTM   = fdMaybe+   mapTM    = mapMb++mapMb :: TrieMap m => (a->b) -> MaybeMap m a -> MaybeMap m b+mapMb f (MM { mm_nothing = mn, mm_just = mj })+  = MM { mm_nothing = fmap f mn, mm_just = mapTM f mj }++lkMaybe :: (forall b. k -> m b -> Maybe b)+        -> Maybe k -> MaybeMap m a -> Maybe a+lkMaybe _  Nothing  = mm_nothing+lkMaybe lk (Just x) = mm_just >.> lk x++xtMaybe :: (forall b. k -> XT b -> m b -> m b)+        -> Maybe k -> XT a -> MaybeMap m a -> MaybeMap m a+xtMaybe _  Nothing  f m = m { mm_nothing  = f (mm_nothing m) }+xtMaybe tr (Just x) f m = m { mm_just = mm_just m |> tr x f }++fdMaybe :: TrieMap m => (a -> b -> b) -> MaybeMap m a -> b -> b+fdMaybe k m = foldMaybe k (mm_nothing m)+            . foldTM k (mm_just m)++{-+************************************************************************+*                                                                      *+                   Lists+*                                                                      *+************************************************************************+-}++data ListMap m a+  = LM { lm_nil  :: Maybe a+       , lm_cons :: m (ListMap m a) }++instance TrieMap m => TrieMap (ListMap m) where+   type Key (ListMap m) = [Key m]+   emptyTM  = LM { lm_nil = Nothing, lm_cons = emptyTM }+   lookupTM = lkList lookupTM+   alterTM  = xtList alterTM+   foldTM   = fdList+   mapTM    = mapList++instance (TrieMap m, Outputable a) => Outputable (ListMap m a) where+  ppr m = text "List elts" <+> ppr (foldTM (:) m [])++mapList :: TrieMap m => (a->b) -> ListMap m a -> ListMap m b+mapList f (LM { lm_nil = mnil, lm_cons = mcons })+  = LM { lm_nil = fmap f mnil, lm_cons = mapTM (mapTM f) mcons }++lkList :: TrieMap m => (forall b. k -> m b -> Maybe b)+        -> [k] -> ListMap m a -> Maybe a+lkList _  []     = lm_nil+lkList lk (x:xs) = lm_cons >.> lk x >=> lkList lk xs++xtList :: TrieMap m => (forall b. k -> XT b -> m b -> m b)+        -> [k] -> XT a -> ListMap m a -> ListMap m a+xtList _  []     f m = m { lm_nil  = f (lm_nil m) }+xtList tr (x:xs) f m = m { lm_cons = lm_cons m |> tr x |>> xtList tr xs f }++fdList :: forall m a b. TrieMap m+       => (a -> b -> b) -> ListMap m a -> b -> b+fdList k m = foldMaybe k          (lm_nil m)+           . foldTM    (fdList k) (lm_cons m)++foldMaybe :: (a -> b -> b) -> Maybe a -> b -> b+foldMaybe _ Nothing  b = b+foldMaybe k (Just a) b = k a b++{-+************************************************************************+*                                                                      *+                   Basic maps+*                                                                      *+************************************************************************+-}++type LiteralMap  a = Map.Map Literal a++{-+************************************************************************+*                                                                      *+                   GenMap+*                                                                      *+************************************************************************++Note [Compressed TrieMap]+~~~~~~~~~~~~~~~~~~~~~~~~~++The GenMap constructor augments TrieMaps with leaf compression.  This helps+solve the performance problem detailed in #9960: suppose we have a handful+H of entries in a TrieMap, each with a very large key, size K. If you fold over+such a TrieMap you'd expect time O(H). That would certainly be true of an+association list! But with TrieMap we actually have to navigate down a long+singleton structure to get to the elements, so it takes time O(K*H).  This+can really hurt on many type-level computation benchmarks:+see for example T9872d.++The point of a TrieMap is that you need to navigate to the point where only one+key remains, and then things should be fast.  So the point of a SingletonMap+is that, once we are down to a single (key,value) pair, we stop and+just use SingletonMap.++'EmptyMap' provides an even more basic (but essential) optimization: if there is+nothing in the map, don't bother building out the (possibly infinite) recursive+TrieMap structure!++Compressed triemaps are heavily used by CoreMap. So we have to mark some things+as INLINEABLE to permit specialization.+-}++data GenMap m a+   = EmptyMap+   | SingletonMap (Key m) a+   | MultiMap (m a)++instance (Outputable a, Outputable (m a)) => Outputable (GenMap m a) where+  ppr EmptyMap = text "Empty map"+  ppr (SingletonMap _ v) = text "Singleton map" <+> ppr v+  ppr (MultiMap m) = ppr m++-- TODO undecidable instance+instance (Eq (Key m), TrieMap m) => TrieMap (GenMap m) where+   type Key (GenMap m) = Key m+   emptyTM  = EmptyMap+   lookupTM = lkG+   alterTM  = xtG+   foldTM   = fdG+   mapTM    = mapG++--We want to be able to specialize these functions when defining eg+--tries over (GenMap CoreExpr) which requires INLINEABLE++{-# INLINEABLE lkG #-}+lkG :: (Eq (Key m), TrieMap m) => Key m -> GenMap m a -> Maybe a+lkG _ EmptyMap                         = Nothing+lkG k (SingletonMap k' v') | k == k'   = Just v'+                           | otherwise = Nothing+lkG k (MultiMap m)                     = lookupTM k m++{-# INLINEABLE xtG #-}+xtG :: (Eq (Key m), TrieMap m) => Key m -> XT a -> GenMap m a -> GenMap m a+xtG k f EmptyMap+    = case f Nothing of+        Just v  -> SingletonMap k v+        Nothing -> EmptyMap+xtG k f m@(SingletonMap k' v')+    | k' == k+    -- The new key matches the (single) key already in the tree.  Hence,+    -- apply @f@ to @Just v'@ and build a singleton or empty map depending+    -- on the 'Just'/'Nothing' response respectively.+    = case f (Just v') of+        Just v'' -> SingletonMap k' v''+        Nothing  -> EmptyMap+    | otherwise+    -- We've hit a singleton tree for a different key than the one we are+    -- searching for. Hence apply @f@ to @Nothing@. If result is @Nothing@ then+    -- we can just return the old map. If not, we need a map with *two*+    -- entries. The easiest way to do that is to insert two items into an empty+    -- map of type @m a@.+    = case f Nothing of+        Nothing  -> m+        Just v   -> emptyTM |> alterTM k' (const (Just v'))+                           >.> alterTM k  (const (Just v))+                           >.> MultiMap+xtG k f (MultiMap m) = MultiMap (alterTM k f m)++{-# INLINEABLE mapG #-}+mapG :: TrieMap m => (a -> b) -> GenMap m a -> GenMap m b+mapG _ EmptyMap = EmptyMap+mapG f (SingletonMap k v) = SingletonMap k (f v)+mapG f (MultiMap m) = MultiMap (mapTM f m)++{-# INLINEABLE fdG #-}+fdG :: TrieMap m => (a -> b -> b) -> GenMap m a -> b -> b+fdG _ EmptyMap = \z -> z+fdG k (SingletonMap _ v) = \z -> k v z+fdG k (MultiMap m) = foldTM k m
utils/UnVarGraph.hs view
@@ -24,6 +24,7 @@     , unionUnVarGraph, unionUnVarGraphs     , completeGraph, completeBipartiteGraph     , neighbors+    , hasLoopAt     , delNode     ) where @@ -120,6 +121,13 @@   where go (CG s)       = (if v `elemUnVarSet` s then [s] else [])         go (CBPG s1 s2) = (if v `elemUnVarSet` s1 then [s2] else []) ++                           (if v `elemUnVarSet` s2 then [s1] else [])++-- hasLoopAt G v <=> v--v ∈ G+hasLoopAt :: UnVarGraph -> Var -> Bool+hasLoopAt (UnVarGraph g) v = any go $ bagToList g+  where go (CG s)       = v `elemUnVarSet` s+        go (CBPG s1 s2) = v `elemUnVarSet` s1 && v `elemUnVarSet` s2+  delNode :: UnVarGraph -> Var -> UnVarGraph delNode (UnVarGraph g) v = prune $ UnVarGraph $ mapBag go g
utils/UniqFM.hs view
@@ -20,7 +20,6 @@ of arguments of combining function. -} -{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# OPTIONS_GHC -Wall #-}@@ -79,19 +78,14 @@ import Data.List (foldl')  import qualified Data.IntMap as M-#if MIN_VERSION_containers(0,5,9)-import qualified Data.IntMap.Merge.Lazy as M-import Control.Applicative (Const (..))-import qualified Data.Monoid as Mon-#endif import qualified Data.IntSet as S-import Data.Typeable import Data.Data import qualified Data.Semigroup as Semi+import Data.Functor.Classes (Eq1 (..))   newtype UniqFM ele = UFM (M.IntMap ele)-  deriving (Data, Eq, Functor, Typeable)+  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.@@ -346,14 +340,7 @@  -- Determines whether two 'UniqFm's contain the same keys. equalKeysUFM :: UniqFM a -> UniqFM b -> Bool-#if MIN_VERSION_containers(0,5,9)-equalKeysUFM (UFM m1) (UFM m2) = Mon.getAll $ getConst $-      M.mergeA (M.traverseMissing (\_ _ -> Const (Mon.All False)))-               (M.traverseMissing (\_ _ -> Const (Mon.All False)))-               (M.zipWithAMatched (\_ _ _ -> Const (Mon.All True))) m1 m2-#else-equalKeysUFM (UFM m1) (UFM m2) = M.keys m1 == M.keys m2-#endif+equalKeysUFM (UFM m1) (UFM m2) = liftEq (\_ _ -> True) m1 m2  -- Instances 
utils/UniqMap.hs view
@@ -54,12 +54,11 @@ import Data.Semigroup as Semi ( Semigroup(..) ) import Data.Coerce import Data.Maybe-import Data.Typeable import Data.Data  -- | Maps indexed by 'Uniquable' keys newtype UniqMap k a = UniqMap (UniqFM (k, a))-    deriving (Data, Eq, Functor, Typeable)+    deriving (Data, Eq, Functor) type role UniqMap nominal representational  instance Semigroup (UniqMap k a) where
utils/Util.hs view
@@ -25,7 +25,7 @@          mapFst, mapSnd, chkAppend,         mapAndUnzip, mapAndUnzip3, mapAccumL2,-        nOfThem, filterOut, partitionWith, splitEithers,+        nOfThem, filterOut, partitionWith,          dropWhileEndLE, spanEnd, @@ -98,7 +98,6 @@         doesDirNameExist,         getModificationUTCTime,         modificationTimeIfExists,-        hSetTranslit,          global, consIORef, globalM,         sharedGlobal, sharedGlobalM,@@ -145,9 +144,7 @@  import Control.Applicative ( liftA2 ) import Control.Monad    ( liftM, guard )-import GHC.IO.Encoding (mkTextEncoding, textEncodingName) import GHC.Conc.Sync ( sharedCAF )-import System.IO (Handle, hGetEncoding, hSetEncoding) import System.IO.Error as IO ( isDoesNotExistError ) import System.Directory ( doesDirectoryExist, getModificationTime ) import System.FilePath@@ -296,14 +293,6 @@                          Right c -> (bs, c:cs)     where (bs,cs) = partitionWith f xs -splitEithers :: [Either a b] -> ([a], [b])--- ^ Teases a list of 'Either's apart into two lists-splitEithers [] = ([],[])-splitEithers (e : es) = case e of-                        Left x -> (x:xs, ys)-                        Right y -> (xs, y:ys)-    where (xs,ys) = splitEithers es- chkAppend :: [a] -> [a] -> [a] -- Checks for the second argument being empty -- Used in situations where that situation is common@@ -1142,12 +1131,18 @@       lexDecDigits = nonnull isDigit -     lexDotDigits ('.':s) = return (span isDigit s)+     lexDotDigits ('.':s) = return (span' isDigit s)      lexDotDigits s       = return ("",s) -     nonnull p s = do (cs@(_:_),t) <- return (span p s)+     nonnull p s = do (cs@(_:_),t) <- return (span' p s)                       return (cs,t) +     span' _ xs@[]         =  (xs, xs)+     span' p xs@(x:xs')+               | x == '_'  = span' p xs'   -- skip "_" (#14473)+               | p x       =  let (ys,zs) = span' p xs' in (x:ys,zs)+               | otherwise =  ([],xs)+ readRational :: String -> Rational -- NB: *does* handle a leading "-" readRational top_s   = case top_s of@@ -1176,12 +1171,12 @@ readHexRational__ :: String -> Maybe Rational readHexRational__ ('0' : x : rest)   | x == 'X' || x == 'x' =-  do let (front,rest2) = span isHexDigit rest+  do let (front,rest2) = span' isHexDigit rest      guard (not (null front))      let frontNum = steps 16 0 front      case rest2 of        '.' : rest3 ->-          do let (back,rest4) = span isHexDigit rest3+          do let (back,rest4) = span' isHexDigit rest3              guard (not (null back))              let backNum = steps 16 frontNum back                  exp1    = -4 * length back@@ -1201,13 +1196,18 @@   mk :: Integer -> Int -> Rational   mk n e = fromInteger n * 2^^e -  dec cs = case span isDigit cs of+  dec cs = case span' isDigit cs of              (ds,"") | not (null ds) -> Just (steps 10 0 ds)              _ -> Nothing    steps base n ds = foldl' (step base) n ds   step  base n d  = base * n + fromIntegral (digitToInt d) +  span' _ xs@[]         =  (xs, xs)+  span' p xs@(x:xs')+            | x == '_'  = span' p xs'   -- skip "_"  (#14473)+            | p x       =  let (ys,zs) = span' p xs' in (x:ys,zs)+            | otherwise =  ([],xs)  readHexRational__ _ = Nothing @@ -1253,18 +1253,6 @@                         else ioError e  -- ----------------------------------------------------------------- Change the character encoding of the given Handle to transliterate--- on unsupported characters instead of throwing an exception--hSetTranslit :: Handle -> IO ()-hSetTranslit h = do-    menc <- hGetEncoding h-    case fmap textEncodingName menc of-        Just name | '/' `notElem` name -> do-            enc' <- mkTextEncoding $ name ++ "//TRANSLIT"-            hSetEncoding h enc'-        _ -> return ()- -- split a string at the last character where 'pred' is True, -- returning a pair of strings. The first component holds the string -- up (but not including) the last character for which 'pred' returned
− vectorise/Vectorise.hs
@@ -1,358 +0,0 @@--- Main entry point to the vectoriser.  It is invoked iff the option '-fvectorise' is passed.------ This module provides the function 'vectorise', which vectorises an entire (desugared) module.--- It vectorises all type declarations and value bindings.  It also processes all VECTORISE pragmas--- (aka vectorisation declarations), which can lead to the vectorisation of imported data types--- and the enrichment of imported functions with vectorised versions.--module Vectorise ( vectorise )-where--import GhcPrelude--import Vectorise.Type.Env-import Vectorise.Type.Type-import Vectorise.Convert-import Vectorise.Utils.Hoisting-import Vectorise.Exp-import Vectorise.Env-import Vectorise.Monad--import HscTypes hiding      ( MonadThings(..) )-import CoreUnfold           ( mkInlineUnfoldingWithArity )-import PprCore-import CoreSyn-import CoreMonad            ( CoreM, getHscEnv )-import Type-import Id-import DynFlags-import Outputable-import Util                 ( zipLazy )-import MonadUtils--import Control.Monad----- |Vectorise a single module.----vectorise :: ModGuts -> CoreM ModGuts-vectorise guts- = do { hsc_env <- getHscEnv-      ; liftIO $ vectoriseIO hsc_env guts-      }---- Vectorise a single monad, given the dynamic compiler flags and HscEnv.----vectoriseIO :: HscEnv -> ModGuts -> IO ModGuts-vectoriseIO hsc_env guts- = do {   -- Get information about currently loaded external packages.-      ; eps <- hscEPS hsc_env--          -- Combine vectorisation info from the current module, and external ones.-      ; let info = hptVectInfo hsc_env `plusVectInfo` eps_vect_info eps--          -- Run the main VM computation.-      ; Just (info', guts') <- initV hsc_env guts info (vectModule guts)-      ; return (guts' { mg_vect_info = info' })-      }---- Vectorise a single module, in the VM monad.----vectModule :: ModGuts -> VM ModGuts-vectModule guts@(ModGuts { mg_tcs        = tycons-                         , mg_binds      = binds-                         , mg_fam_insts  = fam_insts-                         , mg_vect_decls = vect_decls-                         })- = do { dumpOptVt Opt_D_dump_vt_trace "Before vectorisation" $-          pprCoreBindings binds--          -- Pick out all 'VECTORISE [SCALAR] type' and 'VECTORISE class' pragmas-      ; let ty_vect_decls  = [vd | vd@(VectType _ _ _) <- vect_decls]-            cls_vect_decls = [vd | vd@(VectClass _)    <- vect_decls]--          -- Vectorise the type environment.  This will add vectorised-          -- type constructors, their representations, and the-          -- corresponding data constructors.  Moreover, we produce-          -- bindings for dfuns and family instances of the classes-          -- and type families used in the DPH library to represent-          -- array types.-      ; (new_tycons, new_fam_insts, tc_binds) <- vectTypeEnv tycons ty_vect_decls cls_vect_decls--          -- Family instance environment for /all/ home-package modules including those instances-          -- generated by 'vectTypeEnv'.-      ; (_, fam_inst_env) <- readGEnv global_fam_inst_env--          -- Vectorise all the top level bindings and VECTORISE declarations on imported identifiers-          -- NB: Need to vectorise the imported bindings first (local bindings may depend on them).-      ; let impBinds = [(imp_id, expr) | Vect imp_id expr <- vect_decls, isGlobalId imp_id]-      ; binds_imp <- mapM vectImpBind impBinds-      ; binds_top <- mapM vectTopBind binds--      ; return $ guts { mg_tcs          = tycons ++ new_tycons-                        -- we produce no new classes or instances, only new class type constructors-                        -- and dfuns-                      , mg_binds        = Rec tc_binds : (binds_top ++ binds_imp)-                      , mg_fam_inst_env = fam_inst_env-                      , mg_fam_insts    = fam_insts ++ new_fam_insts-                      }-      }---- Try to vectorise a top-level binding.  If it doesn't vectorise, or if it is entirely scalar, then--- omit vectorisation of that binding.------ For example, for the binding------ @---    foo :: Int -> Int---    foo = \x -> x + x--- @------ we get--- @---    foo  :: Int -> Int---    foo  = \x -> vfoo $: x------    v_foo :: Closure void vfoo lfoo---    v_foo = closure vfoo lfoo void------    vfoo :: Void -> Int -> Int---    vfoo = ...------    lfoo :: PData Void -> PData Int -> PData Int---    lfoo = ...--- @------ @vfoo@ is the "vectorised", or scalar, version that does the same as the original function foo,--- but takes an explicit environment.------ @lfoo@ is the "lifted" version that works on arrays.------ @v_foo@ combines both of these into a `Closure` that also contains the environment.------ The original binding @foo@ is rewritten to call the vectorised version present in the closure.------ Vectorisation may be suppressed by annotating a binding with a 'NOVECTORISE' pragma.  If this--- pragma is used in a group of mutually recursive bindings, either all or no binding must have--- the pragma.  If only some bindings are annotated, a fatal error is being raised. (In the case of--- scalar bindings, we only omit vectorisation if all bindings in a group are scalar.)------ FIXME: Once we support partial vectorisation, we may be able to vectorise parts of a group, or---   we may emit a warning and refrain from vectorising the entire group.----vectTopBind :: CoreBind -> VM CoreBind-vectTopBind b@(NonRec var expr)-  = do-    { traceVt "= Vectorise non-recursive top-level variable" (ppr var)--    ; (hasNoVect, vectDecl) <- lookupVectDecl var-    ; if hasNoVect-      then do-      {   -- 'NOVECTORISE' pragma => leave this binding as it is-      ; traceVt "NOVECTORISE" $ ppr var-      ; return b-      }-      else do-    { vectRhs <- case vectDecl of-        Just (_, expr') ->-            -- 'VECTORISE' pragma => just use the provided vectorised rhs-          do-          { traceVt "VECTORISE" $ ppr var-          ; addGlobalParallelVar var-          ; return $ Just (False, inlineMe, expr')-          }-        Nothing         ->-            -- no pragma => standard vectorisation of rhs-          do-          { traceVt "[Vanilla]" $ ppr var <+> char '=' <+> ppr expr-          ; vectTopExpr var expr-          }-    ; hs <- takeHoisted -- make sure we clean those out (even if we skip)-    ; case vectRhs of-      { Nothing ->-          -- scalar binding => leave this binding as it is-          do-          { traceVt "scalar binding [skip]" $ ppr var-          ; return b-          }-      ; Just (parBind, inline, expr') -> do-    {-       -- vanilla case => create an appropriate top-level binding & add it to the vectorisation map-    ; when parBind $-        addGlobalParallelVar var-    ; var' <- vectTopBinder var inline expr'--        -- We replace the original top-level binding by a value projected from the vectorised-        -- closure and add any newly created hoisted top-level bindings.-    ; cexpr <- tryConvert var var' expr-    ; return . Rec $ (var, cexpr) : (var', expr') : hs-    } } } }-    `orElseErrV`-    do-    { emitVt "  Could NOT vectorise top-level binding" $ ppr var-    ; return b-    }-vectTopBind b@(Rec binds)-  = do-    { traceVt "= Vectorise recursive top-level variables" $ ppr vars--    ; vectDecls <- mapM lookupVectDecl vars-    ; let hasNoVects = map fst vectDecls-    ; if and hasNoVects-      then do-      {   -- 'NOVECTORISE' pragmas => leave this entire binding group as it is-      ; traceVt "NOVECTORISE" $ ppr vars-      ; return b-      }-      else do-    { if or hasNoVects-      then do-        {   -- Inconsistent 'NOVECTORISE' pragmas => bail out-        ; dflags <- getDynFlags-        ; cantVectorise dflags noVectoriseErr (ppr b)-        }-      else do-    { traceVt "[Vanilla]" $ vcat [ppr var <+> char '=' <+> ppr expr | (var, expr) <- binds]--       -- For all bindings *with* a pragma, just use the pragma-supplied vectorised expression-    ; newBindsWPragma  <- concat <$>-                          sequence [ vectTopBindAndConvert bind inlineMe expr'-                                   | (bind, (_, Just (_, expr'))) <- zip binds vectDecls]--        -- Standard vectorisation of all rhses that are *without* a pragma.-        -- NB: The reason for 'fixV' is rather subtle: 'vectTopBindAndConvert' adds entries for-        --     the bound variables in the recursive group to the vectorisation map, which in turn-        --     are needed by 'vectPolyExprs' (unless it returns 'Nothing').-    ; let bindsWOPragma = [bind | (bind, (_, Nothing)) <- zip binds vectDecls]-    ; (newBinds, _) <- fixV $-        \ ~(_, exprs') ->-          do-          {   -- Create appropriate top-level bindings, enter them into the vectorisation map, and-              -- vectorise the right-hand sides-          ; newBindsWOPragma <- concat <$>-                                sequence [vectTopBindAndConvert bind inline expr-                                         | (bind, ~(inline, expr)) <- zipLazy bindsWOPragma exprs']-                                         -- irrefutable pattern and 'zipLazy' to tie the knot;-                                         -- hence, can't use 'zipWithM'-          ; vectRhses <- vectTopExprs bindsWOPragma-          ; hs <- takeHoisted -- make sure we clean those out (even if we skip)--          ; case vectRhses of-              Nothing ->-                -- scalar bindings => skip all bindings except those with pragmas and retract the-                --   entries into the vectorisation map for the scalar bindings-                do-                { traceVt "scalar bindings [skip]" $ ppr vars-                ; mapM_ (undefGlobalVar . fst) bindsWOPragma-                ; return (bindsWOPragma ++ newBindsWPragma, exprs')-                }-              Just (parBind, exprs') ->-                -- vanilla case => record parallel variables and return the final bindings-                do-                { when parBind $-                    mapM_ addGlobalParallelVar vars-                ; return (newBindsWOPragma ++ newBindsWPragma ++ hs, exprs')-                }-          }-    ; return $ Rec newBinds-    } } }-    `orElseErrV`-    do-    { emitVt "  Could NOT vectorise top-level bindings" $ ppr vars-    ; return b-    }-  where-    vars = map fst binds-    noVectoriseErr = "NOVECTORISE must be used on all or no bindings of a recursive group"--    -- Replace the original top-level bindings by a values projected from the vectorised-    -- closures and add any newly created hoisted top-level bindings to the group.-    vectTopBindAndConvert (var, expr) inline expr'-      = do-        { var'  <- vectTopBinder var inline expr'-        ; cexpr <- tryConvert var var' expr-        ; return [(var, cexpr), (var', expr')]-        }---- Add a vectorised binding to an imported top-level variable that has a VECTORISE pragma--- in this module.------ RESTRICTION: Currently, we cannot use the pragma for mutually recursive definitions.----vectImpBind :: (Id, CoreExpr) -> VM CoreBind-vectImpBind (var, expr)-  = do-    { traceVt "= Add vectorised binding to imported variable" (ppr var)--    ; var' <- vectTopBinder var inlineMe expr-    ; return $ NonRec var' expr-    }---- |Make the vectorised version of this top level binder, and add the mapping between it and the--- original to the state. For some binder @foo@ the vectorised version is @$v_foo@------ NOTE: 'vectTopBinder' *MUST* be lazy in inline and expr because of how it is used inside of---       'fixV' in 'vectTopBind'.----vectTopBinder :: Var      -- ^ Name of the binding.-              -> Inline   -- ^ Whether it should be inlined, used to annotate it.-              -> CoreExpr -- ^ RHS of binding, used to set the 'Unfolding' of the returned 'Var'.-              -> VM Var   -- ^ Name of the vectorised binding.-vectTopBinder var inline expr- = do {   -- Vectorise the type attached to the var.-      ; vty  <- vectType (idType var)--          -- If there is a vectorisation declaration for this binding, make sure its type matches-      ; (_, vectDecl) <- lookupVectDecl var-      ; case vectDecl of-          Nothing             -> return ()-          Just (vdty, _)-            | eqType vty vdty -> return ()-            | otherwise       ->-              do-              { dflags <- getDynFlags-              ; cantVectorise dflags ("Type mismatch in vectorisation pragma for " ++ showPpr dflags var) $-                  (text "Expected type" <+> ppr vty)-                  $$-                  (text "Inferred type" <+> ppr vdty)-              }-          -- Make the vectorised version of binding's name, and set the unfolding used for inlining-      ; var' <- liftM (`setIdUnfolding` unfolding)-                $  mkVectId var vty--          -- Add the mapping between the plain and vectorised name to the state.-      ; defGlobalVar var var'--      ; return var'-    }-  where-    unfolding = case inline of-                  Inline arity -> mkInlineUnfoldingWithArity arity expr-                  DontInline   -> noUnfolding-{--!!!TODO: dfuns and unfoldings:-           -- Do not inline the dfun; instead give it a magic DFunFunfolding-           -- See Note [ClassOp/DFun selection]-           -- See also note [Single-method classes]-        dfun_id_w_fun-           | isNewTyCon class_tc-           = dfun_id `setInlinePragma` alwaysInlinePragma { inl_sat = Just 0 }-           | otherwise-           = dfun_id `setIdUnfolding`  mkDFunUnfolding dfun_ty dfun_args-                     `setInlinePragma` dfunInlinePragma- -}---- |Project out the vectorised version of a binding from some closure, or return the original body--- if that doesn't work.----tryConvert :: Var       -- ^Name of the original binding (eg @foo@)-           -> Var       -- ^Name of vectorised version of binding (eg @$vfoo@)-           -> CoreExpr  -- ^The original body of the binding.-           -> VM CoreExpr-tryConvert var vect_var rhs-  = fromVect (idType var) (Var vect_var)-    `orElseErrV`-    do-    { emitVt "  Could NOT call vectorised from original version" $ ppr var <+> dcolon <+> ppr (idType var)-    ; return rhs-    }
− vectorise/Vectorise/Builtins.hs
@@ -1,35 +0,0 @@--- Types and functions declared in 'Data.Array.Parallel.Prim' and used by the vectoriser.------ The @Builtins@ structure holds the name of all the things in 'Data.Array.Parallel.Prim' that--- appear in code generated by the vectoriser.--module Vectorise.Builtins (-  -- * Restrictions-  mAX_DPH_SCALAR_ARGS,--  -- * Builtins-  Builtins(..),--  -- * Wrapped selectors-  selTy, selsTy,-  selReplicate,-  selTags,-  selElements,-  selsLength,-  sumTyCon,-  prodTyCon,-  prodDataCon,-  replicatePD_PrimVar,-  emptyPD_PrimVar,-  packByTagPD_PrimVar,-  combinePDVar,-  combinePD_PrimVar,-  scalarZip,-  closureCtrFun,--  -- * Initialisation-  initBuiltins, initBuiltinVars,-) where--import Vectorise.Builtins.Base-import Vectorise.Builtins.Initialise
− vectorise/Vectorise/Builtins/Base.hs
@@ -1,219 +0,0 @@--- |Builtin types and functions used by the vectoriser. These are all defined in--- 'Data.Array.Parallel.Prim'.--module Vectorise.Builtins.Base (-  -- * Hard config-  mAX_DPH_PROD,-  mAX_DPH_SUM,-  mAX_DPH_COMBINE,-  mAX_DPH_SCALAR_ARGS,-  aLL_DPH_PRIM_TYCONS,--  -- * Builtins-  Builtins(..),--  -- * Projections-  selTy, selsTy,-  selReplicate,-  selTags,-  selElements,-  selsLength,-  sumTyCon,-  prodTyCon,-  prodDataCon,-  replicatePD_PrimVar,-  emptyPD_PrimVar,-  packByTagPD_PrimVar,-  combinePDVar,-  combinePD_PrimVar,-  scalarZip,-  closureCtrFun-) where--import GhcPrelude--import TysPrim-import BasicTypes-import Class-import CoreSyn-import TysWiredIn hiding (sumTyCon)-import Type-import TyCon-import DataCon-import NameEnv-import Name-import Outputable--import Data.Array----- Cardinality of the various families of types and functions exported by the DPH library.--mAX_DPH_PROD :: Int-mAX_DPH_PROD = 5--mAX_DPH_SUM :: Int-mAX_DPH_SUM = 2--mAX_DPH_COMBINE :: Int-mAX_DPH_COMBINE = 2--mAX_DPH_SCALAR_ARGS :: Int-mAX_DPH_SCALAR_ARGS = 8---- Types from 'GHC.Prim' supported by DPH----aLL_DPH_PRIM_TYCONS :: [Name]-aLL_DPH_PRIM_TYCONS = map tyConName [intPrimTyCon, {- floatPrimTyCon, -} doublePrimTyCon]----- |Holds the names of the types and functions from 'Data.Array.Parallel.Prim' that are used by the--- vectoriser.----data Builtins-        = Builtins-        { parrayTyCon          :: TyCon                     -- ^ PArray-        , pdataTyCon           :: TyCon                     -- ^ PData-        , pdatasTyCon          :: TyCon                     -- ^ PDatas-        , prClass              :: Class                     -- ^ PR-        , prTyCon              :: TyCon                     -- ^ PR-        , preprTyCon           :: TyCon                     -- ^ PRepr-        , paClass              :: Class                     -- ^ PA-        , paTyCon              :: TyCon                     -- ^ PA-        , paDataCon            :: DataCon                   -- ^ PA-        , paPRSel              :: Var                       -- ^ PA-        , replicatePDVar       :: Var                       -- ^ replicatePD-        , replicatePD_PrimVars :: NameEnv Var               -- ^ replicatePD_Int# etc.-        , emptyPDVar           :: Var                       -- ^ emptyPD-        , emptyPD_PrimVars     :: NameEnv Var               -- ^ emptyPD_Int# etc.-        , packByTagPDVar       :: Var                       -- ^ packByTagPD-        , packByTagPD_PrimVars :: NameEnv Var               -- ^ packByTagPD_Int# etc.-        , combinePDVars        :: Array Int Var             -- ^ combinePD-        , combinePD_PrimVarss  :: Array Int (NameEnv Var)   -- ^ combine2PD_Int# etc.-        , scalarClass          :: Class                     -- ^ Scalar-        , scalarZips           :: Array Int Var             -- ^ map, zipWith, zipWith3-        , voidTyCon            :: TyCon                     -- ^ Void-        , voidVar              :: Var                       -- ^ void-        , fromVoidVar          :: Var                       -- ^ fromVoid-        , sumTyCons            :: Array Int TyCon           -- ^ Sum2 .. Sum3-        , wrapTyCon            :: TyCon                     -- ^ Wrap-        , pvoidVar             :: Var                       -- ^ pvoid-        , pvoidsVar            :: Var                       -- ^ pvoids-        , closureTyCon         :: TyCon                     -- ^ :->-        , closureVar           :: Var                       -- ^ closure-        , liftedClosureVar     :: Var                       -- ^ liftedClosure-        , applyVar             :: Var                       -- ^ $:-        , liftedApplyVar       :: Var                       -- ^ liftedApply-        , closureCtrFuns       :: Array Int Var             -- ^ closure1 .. closure3-        , selTys               :: Array Int Type            -- ^ Sel2-        , selsTys              :: Array Int Type            -- ^ Sels2-        , selsLengths          :: Array Int CoreExpr        -- ^ lengthSels2-        , selReplicates        :: Array Int CoreExpr        -- ^ replicate2-        , selTagss             :: Array Int CoreExpr        -- ^ tagsSel2-        , selElementss         :: Array (Int, Int) CoreExpr -- ^ elementsSel2_0 .. elementsSel_2_1-        , liftingContext       :: Var                       -- ^ lc-        }----- Projections ------------------------------------------------------------------- We use these wrappers instead of indexing the `Builtin` structure directly--- because they give nicer panic messages if the indexed thing cannot be found.--selTy :: Int -> Builtins -> Type-selTy           = indexBuiltin "selTy" selTys--selsTy :: Int -> Builtins -> Type-selsTy          = indexBuiltin "selsTy" selsTys--selsLength :: Int -> Builtins -> CoreExpr-selsLength      = indexBuiltin "selLength" selsLengths--selReplicate :: Int -> Builtins -> CoreExpr-selReplicate    = indexBuiltin "selReplicate" selReplicates--selTags :: Int -> Builtins -> CoreExpr-selTags         = indexBuiltin "selTags" selTagss--selElements :: Int -> Int -> Builtins -> CoreExpr-selElements i j = indexBuiltin "selElements" selElementss (i, j)--sumTyCon :: Int -> Builtins -> TyCon-sumTyCon        = indexBuiltin "sumTyCon" sumTyCons--prodTyCon :: Int -> Builtins -> TyCon-prodTyCon n _-  | n >= 2 && n <= mAX_DPH_PROD-  = tupleTyCon Boxed n-  | otherwise-  = pprPanic "prodTyCon" (ppr n)--prodDataCon :: Int -> Builtins -> DataCon-prodDataCon n bi- = case tyConDataCons (prodTyCon n bi) of-    [con] -> con-    _ -> pprPanic "prodDataCon" (ppr n)--replicatePD_PrimVar :: TyCon -> Builtins -> Var-replicatePD_PrimVar tc bi-  = lookupEnvBuiltin "replicatePD_PrimVar" (replicatePD_PrimVars bi) (tyConName tc)--emptyPD_PrimVar :: TyCon -> Builtins -> Var-emptyPD_PrimVar tc bi-  = lookupEnvBuiltin "emptyPD_PrimVar" (emptyPD_PrimVars bi) (tyConName tc)--packByTagPD_PrimVar :: TyCon -> Builtins -> Var-packByTagPD_PrimVar tc bi-  = lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc)--combinePDVar :: Int -> Builtins -> Var-combinePDVar = indexBuiltin "combinePDVar" combinePDVars--combinePD_PrimVar :: Int -> TyCon -> Builtins -> Var-combinePD_PrimVar i tc bi-  = lookupEnvBuiltin "combinePD_PrimVar"-      (indexBuiltin "combinePD_PrimVar" combinePD_PrimVarss i bi) (tyConName tc)--scalarZip :: Int -> Builtins -> Var-scalarZip = indexBuiltin "scalarZip" scalarZips--closureCtrFun :: Int -> Builtins -> Var-closureCtrFun = indexBuiltin "closureCtrFun" closureCtrFuns---- | Get an element from one of the arrays of `Builtins`.---   Panic if the indexed thing is not in the array.-indexBuiltin :: (Ix i, Outputable i)-             => String                   -- ^ Name of the selector we've used, for panic messages.-             -> (Builtins -> Array i a)  -- ^ Field selector for the `Builtins`.-             -> i                        -- ^ Index into the array.-             -> Builtins-             -> a-indexBuiltin fn f i bi-  | inRange (bounds xs) i = xs ! i-  | otherwise-  = pprSorry "Vectorise.Builtins.indexBuiltin"-    (vcat [ text ""-    , text "DPH builtin function '" <> text fn <> text "' of size '" <> ppr i <>-      text "' is not yet implemented."-    , text "This function does not appear in your source program, but it is needed"-    , text "to compile your code in the backend. This is a known, current limitation"-    , text "of DPH. If you want it to work, you should send mail to ghc-commits@haskell.org"-    , text "and ask what you can do to help (it might involve some GHC hacking)."])-  where xs = f bi----- | Get an entry from one of a 'NameEnv' of `Builtins`. Panic if the named item is not in the array.-lookupEnvBuiltin :: String                    -- Function name for error messages-                 -> NameEnv a                 -- Name environment-                 -> Name                      -- Index into the name environment-                 -> a-lookupEnvBuiltin fn env n-  | Just r <- lookupNameEnv env n = r-  | otherwise-  = pprSorry "Vectorise.Builtins.lookupEnvBuiltin"-    (vcat [ text ""-    , text "DPH builtin function '" <> text fn <> text "_" <> ppr n <>-      text "' is not yet implemented."-    , text "This function does not appear in your source program, but it is needed"-    , text "to compile your code in the backend. This is a known, current limitation"-    , text "of DPH. If you want it to work, you should send mail to ghc-commits@haskell.org"-    , text "and ask what you can do to help (it might involve some GHC hacking)."])
− vectorise/Vectorise/Builtins/Initialise.hs
@@ -1,234 +0,0 @@--- Set up the data structures provided by 'Vectorise.Builtins'.--module Vectorise.Builtins.Initialise (-  -- * Initialisation-  initBuiltins, initBuiltinVars-) where--import GhcPrelude--import Vectorise.Builtins.Base--import BasicTypes-import TysPrim-import DsMonad-import TysWiredIn-import DataCon-import TyCon-import Class-import CoreSyn-import Type-import NameEnv-import Name-import Id-import FastString-import Outputable--import Control.Monad-import Data.Array----- |Create the initial map of builtin types and functions.----initBuiltins :: DsM Builtins-initBuiltins- = do {   -- 'PArray: representation type for parallel arrays-      ; parrayTyCon <- externalTyCon (fsLit "PArray")--          -- 'PData': type family mapping array element types to array representation types-          -- Not all backends use `PDatas`.-      ; pdataTyCon  <- externalTyCon (fsLit "PData")-      ; pdatasTyCon <- externalTyCon (fsLit "PDatas")--          -- 'PR': class of basic array operators operating on 'PData' types-      ; prClass     <- externalClass (fsLit "PR")-      ; let prTyCon     = classTyCon prClass--          -- 'PRepr': type family mapping element types to representation types-      ; preprTyCon  <- externalTyCon (fsLit "PRepr")--          -- 'PA': class of basic operations on arrays (parametrised by the element type)-      ; paClass     <- externalClass (fsLit "PA")-      ; let paTyCon     = classTyCon paClass-            [paDataCon] = tyConDataCons paTyCon-            paPRSel     = classSCSelId paClass 0--          -- Functions on array representations-      ; replicatePDVar <- externalVar (fsLit "replicatePD")-      ; replicate_vars <- mapM externalVar (suffixed "replicatePA" aLL_DPH_PRIM_TYCONS)-      ; emptyPDVar     <- externalVar (fsLit "emptyPD")-      ; empty_vars     <- mapM externalVar (suffixed "emptyPA" aLL_DPH_PRIM_TYCONS)-      ; packByTagPDVar <- externalVar (fsLit "packByTagPD")-      ; packByTag_vars <- mapM externalVar (suffixed "packByTagPA" aLL_DPH_PRIM_TYCONS)-      ; let combineNamesD = [("combine" ++ show i ++ "PD") | i <- [2..mAX_DPH_COMBINE]]-      ; let combineNamesA = [("combine" ++ show i ++ "PA") | i <- [2..mAX_DPH_COMBINE]]-      ; combines       <- mapM externalVar (map mkFastString combineNamesD)-      ; combines_vars  <- mapM (mapM externalVar) $-                            map (\name -> suffixed name aLL_DPH_PRIM_TYCONS) combineNamesA-      ; let replicatePD_PrimVars = mkNameEnv (zip aLL_DPH_PRIM_TYCONS replicate_vars)-            emptyPD_PrimVars     = mkNameEnv (zip aLL_DPH_PRIM_TYCONS empty_vars)-            packByTagPD_PrimVars = mkNameEnv (zip aLL_DPH_PRIM_TYCONS packByTag_vars)-            combinePDVars        = listArray (2, mAX_DPH_COMBINE) combines-            combinePD_PrimVarss  = listArray (2, mAX_DPH_COMBINE)-                                     [ mkNameEnv (zip aLL_DPH_PRIM_TYCONS vars)-                                     | vars <- combines_vars]--          -- 'Scalar': class moving between plain unboxed arrays and 'PData' representations-      ; scalarClass <- externalClass (fsLit "Scalar")--          -- N-ary maps ('zipWith' family)-      ; scalar_map       <- externalVar (fsLit "scalar_map")-      ; scalar_zip2      <- externalVar (fsLit "scalar_zipWith")-      ; scalar_zips      <- mapM externalVar (numbered "scalar_zipWith" 3 mAX_DPH_SCALAR_ARGS)-      ; let scalarZips   = listArray (1, mAX_DPH_SCALAR_ARGS)-                                     (scalar_map : scalar_zip2 : scalar_zips)--          -- Types and functions for generic type representations-      ; voidTyCon        <- externalTyCon (fsLit "Void")-      ; voidVar          <- externalVar   (fsLit "void")-      ; fromVoidVar      <- externalVar   (fsLit "fromVoid")-      ; sum_tcs          <- mapM externalTyCon (numbered "Sum" 2 mAX_DPH_SUM)-      ; let sumTyCons    = listArray (2, mAX_DPH_SUM) sum_tcs-      ; wrapTyCon        <- externalTyCon (fsLit "Wrap")-      ; pvoidVar         <- externalVar   (fsLit "pvoid")-      ; pvoidsVar        <- externalVar   (fsLit "pvoids#")--          -- Types and functions for closure conversion-      ; closureTyCon     <- externalTyCon (fsLit ":->")-      ; closureVar       <- externalVar   (fsLit "closure")-      ; liftedClosureVar <- externalVar   (fsLit "liftedClosure")-      ; applyVar         <- externalVar   (fsLit "$:")-      ; liftedApplyVar   <- externalVar   (fsLit "liftedApply")-      ; closures         <- mapM externalVar (numbered "closure" 1 mAX_DPH_SCALAR_ARGS)-      ; let closureCtrFuns = listArray (1, mAX_DPH_SCALAR_ARGS) closures--          -- Types and functions for selectors-      ; sel_tys          <- mapM externalType (numbered "Sel"  2 mAX_DPH_SUM)-      ; sels_tys         <- mapM externalType (numbered "Sels" 2 mAX_DPH_SUM)-      ; sels_length      <- mapM externalFun  (numbered_hash "lengthSels"   2 mAX_DPH_SUM)-      ; sel_replicates   <- mapM externalFun  (numbered_hash "replicateSel" 2 mAX_DPH_SUM)-      ; sel_tags         <- mapM externalFun  (numbered "tagsSel" 2 mAX_DPH_SUM)-      ; sel_elements     <- mapM mk_elements [(i,j) | i <- [2..mAX_DPH_SUM], j <- [0..i-1]]-      ; let selTys        = listArray (2, mAX_DPH_SUM) sel_tys-            selsTys       = listArray (2, mAX_DPH_SUM) sels_tys-            selsLengths   = listArray (2, mAX_DPH_SUM) sels_length-            selReplicates = listArray (2, mAX_DPH_SUM) sel_replicates-            selTagss      = listArray (2, mAX_DPH_SUM) sel_tags-            selElementss  = array     ((2, 0), (mAX_DPH_SUM, mAX_DPH_SUM)) sel_elements--          -- Distinct local variable-      ; liftingContext  <- liftM (\u -> mkSysLocalOrCoVar (fsLit "lc") u intPrimTy) newUnique--      ; return $ Builtins-               { parrayTyCon          = parrayTyCon-               , pdataTyCon           = pdataTyCon-               , pdatasTyCon          = pdatasTyCon-               , preprTyCon           = preprTyCon-               , prClass              = prClass-               , prTyCon              = prTyCon-               , paClass              = paClass-               , paTyCon              = paTyCon-               , paDataCon            = paDataCon-               , paPRSel              = paPRSel-               , replicatePDVar       = replicatePDVar-               , replicatePD_PrimVars = replicatePD_PrimVars-               , emptyPDVar           = emptyPDVar-               , emptyPD_PrimVars     = emptyPD_PrimVars-               , packByTagPDVar       = packByTagPDVar-               , packByTagPD_PrimVars = packByTagPD_PrimVars-               , combinePDVars        = combinePDVars-               , combinePD_PrimVarss  = combinePD_PrimVarss-               , scalarClass          = scalarClass-               , scalarZips           = scalarZips-               , voidTyCon            = voidTyCon-               , voidVar              = voidVar-               , fromVoidVar          = fromVoidVar-               , sumTyCons            = sumTyCons-               , wrapTyCon            = wrapTyCon-               , pvoidVar             = pvoidVar-               , pvoidsVar            = pvoidsVar-               , closureTyCon         = closureTyCon-               , closureVar           = closureVar-               , liftedClosureVar     = liftedClosureVar-               , applyVar             = applyVar-               , liftedApplyVar       = liftedApplyVar-               , closureCtrFuns       = closureCtrFuns-               , selTys               = selTys-               , selsTys              = selsTys-               , selsLengths          = selsLengths-               , selReplicates        = selReplicates-               , selTagss             = selTagss-               , selElementss         = selElementss-               , liftingContext       = liftingContext-               }-      }-  where-    suffixed :: String -> [Name] -> [FastString]-    suffixed pfx ns = [mkFastString (pfx ++ "_" ++ (occNameString . nameOccName) n) | n <- ns]--    -- Make a list of numbered strings in some range, eg foo3, foo4, foo5-    numbered :: String -> Int -> Int -> [FastString]-    numbered pfx m n = [mkFastString (pfx ++ show i) | i <- [m..n]]--    numbered_hash :: String -> Int -> Int -> [FastString]-    numbered_hash pfx m n = [mkFastString (pfx ++ show i ++ "#") | i <- [m..n]]--    mk_elements :: (Int, Int) -> DsM ((Int, Int), CoreExpr)-    mk_elements (i,j)-      = do { v <- externalVar $ mkFastString ("elementsSel" ++ show i ++ "_" ++ show j ++ "#")-           ; return ((i, j), Var v)-           }---- |Get the mapping of names in the Prelude to names in the DPH library.----initBuiltinVars :: Builtins -> DsM [(Var, Var)]--- FIXME: must be replaced by VECTORISE pragmas!!!-initBuiltinVars (Builtins { })-  = do-      cvars <- mapM externalVar cfs-      return $ zip (map dataConWorkId cons) cvars-  where-    (cons, cfs) = unzip preludeDataCons--    preludeDataCons :: [(DataCon, FastString)]-    preludeDataCons-      = [mk_tup n (mkFastString $ "tup" ++ show n) | n <- [2..5]]-      where-        mk_tup n name = (tupleDataCon Boxed n, name)----- Auxiliary look up functions --------------------------------------------------- |Lookup a variable given its name and the module that contains it.-externalVar :: FastString -> DsM Var-externalVar fs = dsLookupDPHRdrEnv (mkVarOccFS fs) >>= dsLookupGlobalId----- |Like `externalVar` but wrap the `Var` in a `CoreExpr`.-externalFun :: FastString -> DsM CoreExpr-externalFun fs = Var <$> externalVar fs----- |Lookup a 'TyCon' in 'Data.Array.Parallel.Prim', given its name.---  Panic if there isn't one.-externalTyCon :: FastString -> DsM TyCon-externalTyCon fs = dsLookupDPHRdrEnv (mkTcOccFS fs) >>= dsLookupTyCon----- |Lookup some `Type` in 'Data.Array.Parallel.Prim', given its name.-externalType :: FastString -> DsM Type-externalType fs- = do  tycon <- externalTyCon fs-       return $ mkTyConApp tycon []----- |Lookup a 'Class' in 'Data.Array.Parallel.Prim', given its name.-externalClass :: FastString -> DsM Class-externalClass fs-  = do { tycon <- dsLookupDPHRdrEnv (mkClsOccFS fs) >>= dsLookupTyCon-       ; case tyConClass_maybe tycon of-           Nothing  -> pprPanic "Vectorise.Builtins.Initialise" $-                         text "Data.Array.Parallel.Prim." <>-                         ftext fs <+> text "is not a type class"-           Just cls -> return cls-       }
− vectorise/Vectorise/Convert.hs
@@ -1,104 +0,0 @@-module Vectorise.Convert-  ( fromVect-  )-where--import GhcPrelude--import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Type.Type--import CoreSyn-import TyCon-import Type-import TyCoRep-import NameSet-import FastString-import Outputable---- |Convert a vectorised expression such that it computes the non-vectorised equivalent of its--- value.------ For functions, we eta expand the function and convert the arguments and result:---- For example--- @---    \(x :: Double) ->---    \(y :: Double) ->---    ($v_foo $: x) $: y--- @------ We use the type of the original binding to work out how many outer lambdas to add.----fromVect :: Type        -- ^ The type of the original binding.-         -> CoreExpr    -- ^ Expression giving the closure to use, eg @$v_foo@.-         -> VM CoreExpr---- Convert the type to the core view if it isn't already.----fromVect ty expr-  | Just ty' <- coreView ty-  = fromVect ty' expr---- For each function constructor in the original type we add an outer--- lambda to bind the parameter variable, and an inner application of it.-fromVect (FunTy arg_ty res_ty) expr-  = do-      arg     <- newLocalVar (fsLit "x") arg_ty-      varg    <- toVect arg_ty (Var arg)-      varg_ty <- vectType arg_ty-      vres_ty <- vectType res_ty-      apply   <- builtin applyVar-      body    <- fromVect res_ty-               $ Var apply `mkTyApps` [varg_ty, vres_ty] `mkApps` [expr, varg]-      return $ Lam arg body---- If the type isn't a function, then we can't current convert it unless the type is scalar (i.e.,--- is identical to the non-vectorised version).----fromVect ty expr-  = identityConv ty >> return expr---- Convert an expression such that it evaluates to the vectorised equivalent of the value of the--- original expression.------ WARNING: Currently only works for the scalar types, where the vectorised value coincides with the---          original one.----toVect :: Type -> CoreExpr -> VM CoreExpr-toVect ty expr = identityConv ty >> return expr---- |Check that the type is neutral under type vectorisation — i.e., all involved type constructor--- are not altered by vectorisation as they contain no parallel arrays.----identityConv :: Type -> VM ()-identityConv ty-  | Just ty' <- coreView ty-  = identityConv ty'-identityConv (TyConApp tycon tys)-  = do { mapM_ identityConv tys-       ; identityConvTyCon tycon-       }-identityConv (LitTy {})      = noV $ text "identityConv: not sure about literal types under vectorisation"-identityConv (TyVarTy {})    = noV $ text "identityConv: type variable changes under vectorisation"-identityConv (AppTy {})      = noV $ text "identityConv: type appl. changes under vectorisation"-identityConv (FunTy {})      = noV $ text "identityConv: function type changes under vectorisation"-identityConv (ForAllTy {})   = noV $ text "identityConv: quantified type changes under vectorisation"-identityConv (CastTy {})     = noV $ text "identityConv: not sure about casted types under vectorisation"-identityConv (CoercionTy {}) = noV $ text "identityConv: not sure about coercions under vectorisation"---- |Check that this type constructor is not changed by vectorisation — i.e., it does not embed any--- parallel arrays.----identityConvTyCon :: TyCon -> VM ()-identityConvTyCon tc-  = do-    { isParallel <- (tyConName tc `elemNameSet`) <$> globalParallelTyCons-    ; parray     <- builtin parrayTyCon-    ; if isParallel && not (tc == parray)-      then noV idErr-      else return ()-    }-  where-    idErr = text "identityConvTyCon: type constructor contains parallel arrays" <+> ppr tc
− vectorise/Vectorise/Env.hs
@@ -1,240 +0,0 @@-module Vectorise.Env (-  Scope(..),--  -- * Local Environments-  LocalEnv(..),-  emptyLocalEnv,--  -- * Global Environments-  GlobalEnv(..),-  initGlobalEnv,-  extendImportedVarsEnv,-  extendFamEnv,-  setPAFunsEnv,-  setPRFunsEnv,-  modVectInfo-) where--import GhcPrelude--import HscTypes-import InstEnv-import FamInstEnv-import CoreSyn-import Type-import Class-import TyCon-import DataCon-import VarEnv-import VarSet-import Var-import NameSet-import Name-import NameEnv-import FastString-import UniqDFM-import UniqSet---import Data.Maybe----- |Indicates what scope something (a variable) is in.----data Scope a b-        = Global a-        | Local  b----- LocalEnv ----------------------------------------------------------------------- |The local environment.----data LocalEnv-        = LocalEnv-        { local_vars      :: VarEnv (Var, Var)-          -- ^Mapping from local variables to their vectorised and lifted versions.--        , local_tyvars     :: [TyVar]-          -- ^In-scope type variables.--        , local_tyvar_pa   :: VarEnv CoreExpr-          -- ^Mapping from tyvars to their PA dictionaries.--        , local_bind_name  :: FastString-          -- ^Local binding name. This is only used to generate better names for hoisted-          -- expressions.-        }---- |Create an empty local environment.----emptyLocalEnv :: LocalEnv-emptyLocalEnv = LocalEnv-                { local_vars      = emptyVarEnv-                , local_tyvars    = []-                , local_tyvar_pa  = emptyVarEnv-                , local_bind_name = fsLit "fn"-                }----- GlobalEnv ---------------------------------------------------------------------- |The global environment: entities that exist at top-level.----data GlobalEnv-        = GlobalEnv-        { global_vect_avoid           :: Bool-          -- ^'True' implies to avoid vectorisation as far as possible.--        , global_vars                 :: VarEnv Var-          -- ^Mapping from global variables to their vectorised versions — aka the /vectorisation-          -- map/.--        , global_parallel_vars        :: DVarSet-          -- ^The domain of 'global_vars'.-          ---          -- This information is not redundant as it is impossible to extract the domain from a-          -- 'VarEnv' (which is keyed on uniques alone). Moreover, we have mapped variables that-          -- do not involve parallelism — e.g., the workers of vectorised, but scalar data types.-          -- In addition, workers of parallel data types that we could not vectorise also need to-          -- be tracked.--        , global_vect_decls           :: VarEnv (Maybe (Type, CoreExpr))-          -- ^Mapping from global variables that have a vectorisation declaration to the right-hand-          -- side of that declaration and its type and mapping variables that have NOVECTORISE-          -- declarations to 'Nothing'.--        , global_tycons               :: NameEnv TyCon-          -- ^Mapping from TyCons to their vectorised versions. The vectorised version will be-          -- identical to the original version if it is not changed by vectorisation. In any case,-          -- if a tycon appears in the domain of this mapping, it was successfully vectorised.--        , global_parallel_tycons      :: NameSet-          -- ^Type constructors whose definition directly or indirectly includes a parallel type,-          -- such as '[::]'.-          ---          -- NB: This information is not redundant as some types have got a mapping in-          --     'global_tycons' (to a type other than themselves) and are still not parallel. An-          --     example is '(->)'. Moreover, some types have *not* got a mapping in 'global_tycons'-          --     (because they couldn't be vectorised), but still contain parallel types.--        , global_datacons             :: NameEnv DataCon-          -- ^Mapping from DataCons to their vectorised versions.--        , global_pa_funs              :: NameEnv Var-          -- ^Mapping from TyCons to their PA dfuns.--        , global_pr_funs              :: NameEnv Var-          -- ^Mapping from TyCons to their PR dfuns.--        , global_inst_env             :: InstEnvs-          -- ^External package inst-env & home-package inst-env for class instances.--        , global_fam_inst_env         :: FamInstEnvs-          -- ^External package inst-env & home-package inst-env for family instances.--        , global_bindings             :: [(Var, CoreExpr)]-          -- ^Hoisted bindings — temporary storage for toplevel bindings during code gen.-        }---- |Create an initial global environment.------ We add scalar variables and type constructors identified by vectorisation pragmas already here--- to the global table, so that we can query scalarness during vectorisation, and especially, when--- vectorising the scalar entities' definitions themselves.----initGlobalEnv :: Bool-              -> VectInfo-              -> [CoreVect]-              -> InstEnvs-              -> FamInstEnvs-              -> GlobalEnv-initGlobalEnv vectAvoid info vectDecls instEnvs famInstEnvs-  = GlobalEnv-  { global_vect_avoid           = vectAvoid-  , global_vars                 = mapVarEnv snd $ udfmToUfm $ vectInfoVar info-  , global_vect_decls           = mkVarEnv vects-  , global_parallel_vars        = vectInfoParallelVars info-  , global_parallel_tycons      = vectInfoParallelTyCons info-  , global_tycons               = mapNameEnv snd $ vectInfoTyCon info-  , global_datacons             = mapNameEnv snd $ vectInfoDataCon info-  , global_pa_funs              = emptyNameEnv-  , global_pr_funs              = emptyNameEnv-  , global_inst_env             = instEnvs-  , global_fam_inst_env         = famInstEnvs-  , global_bindings             = []-  }-  where-    vects         = [(var, Just (ty, exp)) | Vect   var   exp@(Var rhs_var) <- vectDecls-                                           , let ty = varType rhs_var] ++-                                        -- FIXME: we currently only allow RHSes consisting of a-                                        --   single variable to be able to obtain the type without-                                        --   inference — see also 'TcBinds.tcVect'-                    [(var, Nothing)        | NoVect var                     <- vectDecls]----- Operators on Global Environments ----------------------------------------------- |Extend the list of global variables in an environment.----extendImportedVarsEnv :: [(Var, Var)] -> GlobalEnv -> GlobalEnv-extendImportedVarsEnv ps genv-  = genv { global_vars = extendVarEnvList (global_vars genv) ps }---- |Extend the list of type family instances.----extendFamEnv :: [FamInst] -> GlobalEnv -> GlobalEnv-extendFamEnv new genv-  = genv { global_fam_inst_env = (g_fam_inst, extendFamInstEnvList l_fam_inst new) }-  where (g_fam_inst, l_fam_inst) = global_fam_inst_env genv---- |Set the list of PA functions in an environment.----setPAFunsEnv :: [(Name, Var)] -> GlobalEnv -> GlobalEnv-setPAFunsEnv ps genv = genv { global_pa_funs = mkNameEnv ps }---- |Set the list of PR functions in an environment.----setPRFunsEnv :: [(Name, Var)] -> GlobalEnv -> GlobalEnv-setPRFunsEnv ps genv = genv { global_pr_funs = mkNameEnv ps }---- |Compute vectorisation information that goes into 'ModGuts' (and is stored in interface files).--- The incoming 'vectInfo' is that from the 'HscEnv' and 'EPS'.  The outgoing one contains only the--- declarations for the currently compiled module; this includes variables, type constructors, and--- data constructors referenced in VECTORISE pragmas, even if they are defined in an imported--- module.------ The variables explicitly include class selectors and dfuns.----modVectInfo :: GlobalEnv -> [Id] -> [TyCon] -> [CoreVect]-> VectInfo -> VectInfo-modVectInfo env mg_ids mg_tyCons vectDecls info-  = info-    { vectInfoVar            = mk_denv ids     (global_vars     env)-    , vectInfoTyCon          = mk_env tyCons   (global_tycons   env)-    , vectInfoDataCon        = mk_env dataCons (global_datacons env)-    , vectInfoParallelVars   = (global_parallel_vars   env `minusDVarSet`  vectInfoParallelVars   info)-                               `udfmIntersectUFM` (getUniqSet $ mkVarSet ids)-    , vectInfoParallelTyCons =  global_parallel_tycons env `minusNameSet` vectInfoParallelTyCons info-    }-  where-    vectIds         = [id    | Vect     id    _   <- vectDecls] ++-                      [id    | VectInst id        <- vectDecls]-    vectTypeTyCons  = [tycon | VectType _ tycon _ <- vectDecls] ++-                      [tycon | VectClass tycon    <- vectDecls]-    vectDataCons    = concatMap tyConDataCons vectTypeTyCons-    ids             = mg_ids ++ vectIds ++ dataConIds ++ selIds-    tyCons          = mg_tyCons ++ vectTypeTyCons-    dataCons        = concatMap tyConDataCons mg_tyCons ++ vectDataCons-    dataConIds      = map dataConWorkId dataCons-    selIds          = concat [ classAllSelIds cls-                             | tycon <- tyCons-                             , cls <- maybeToList . tyConClass_maybe $ tycon]--    -- Produce an entry for every declaration that is mentioned in the domain of the 'inspectedEnv'-    mk_env decls inspectedEnv = mkNameEnv $ mk_assoc_env decls inspectedEnv-    mk_denv decls inspectedEnv = listToUDFM $ mk_assoc_env decls inspectedEnv-    mk_assoc_env decls inspectedEnv-      = [(name, (decl, to))-        | decl     <- decls-        , let name = getName decl-        , Just to  <- [lookupNameEnv inspectedEnv name]]
− vectorise/Vectorise/Exp.hs
@@ -1,1260 +0,0 @@-{-# LANGUAGE CPP, TupleSections #-}---- |Vectorisation of expressions.--module Vectorise.Exp-  (   -- * Vectorise right-hand sides of toplevel bindings-    vectTopExpr-  , vectTopExprs-  , vectScalarFun-  , vectScalarDFun-  )-where--#include "HsVersions.h"--import GhcPrelude--import Vectorise.Type.Type-import Vectorise.Var-import Vectorise.Convert-import Vectorise.Vect-import Vectorise.Env-import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Utils--import CoreUtils-import MkCore-import CoreSyn-import CoreFVs-import Class-import DataCon-import TyCon-import TcType-import Type-import TyCoRep-import Var-import VarEnv-import VarSet-import NameSet-import Id-import BasicTypes( isStrongLoopBreaker )-import Literal-import TysPrim-import Outputable-import FastString-import DynFlags-import Util--import Control.Monad-import Data.Maybe-import Data.List----- Main entry point to vectorise expressions --------------------------------------- |Vectorise a polymorphic expression that forms a *non-recursive* binding.------ Return 'Nothing' if the expression is scalar; otherwise, the first component of the result--- (which is of type 'Bool') indicates whether the expression is parallel (i.e., whether it is--- tagged as 'VIParr').------ We have got the non-recursive case as a special case as it doesn't require to compute--- vectorisation information twice.----vectTopExpr :: Var -> CoreExpr -> VM (Maybe (Bool, Inline, CoreExpr))-vectTopExpr var expr-  = do-    { exprVI <- encapsulateScalars <=< vectAvoidInfo emptyVarSet . freeVars $ expr-    ; if isVIEncaps exprVI-      then-        return Nothing-      else do-      { vExpr <- closedV $-                   inBind var $-                     vectAnnPolyExpr False exprVI-      ; inline <- computeInline exprVI-      ; return $ Just (isVIParr exprVI, inline, vectorised vExpr)-      }-    }---- Compute the inlining hint for the right-hand side of a top-level binding.----computeInline :: CoreExprWithVectInfo -> VM Inline-computeInline ((_, VIDict), _)     = return $ DontInline-computeInline (_, AnnTick _ expr)  = computeInline expr-computeInline expr@(_, AnnLam _ _) = Inline <$> polyArity tvs-  where-    (tvs, _) = collectAnnTypeBinders expr-computeInline _expr                = return $ DontInline---- |Vectorise a recursive group of top-level polymorphic expressions.------ Return 'Nothing' if the expression group is scalar; otherwise, the first component of the result--- (which is of type 'Bool') indicates whether the expressions are parallel (i.e., whether they are--- tagged as 'VIParr').----vectTopExprs :: [(Var, CoreExpr)] -> VM (Maybe (Bool, [(Inline, CoreExpr)]))-vectTopExprs binds-  = do-    { exprVIs <- mapM (vectAvoidAndEncapsulate emptyVarSet) exprs-    ; if all isVIEncaps exprVIs-        -- if all bindings are scalar => don't vectorise this group of bindings-      then return Nothing-      else do-      {   -- non-scalar bindings need to be vectorised-      ; let areVIParr = any isVIParr exprVIs-      ; revised_exprVIs <- if not areVIParr-                             -- if no binding is parallel => 'exprVIs' is ready for vectorisation-                           then return exprVIs-                             -- if any binding is parallel => recompute the vectorisation info-                           else mapM (vectAvoidAndEncapsulate (mkVarSet vars)) exprs--      ; vExprs <- zipWithM vect vars revised_exprVIs-      ; return $ Just (areVIParr, vExprs)-      }-    }-  where-    (vars, exprs) = unzip binds--    vectAvoidAndEncapsulate pvs = encapsulateScalars <=< vectAvoidInfo pvs . freeVars--    vect var exprVI-      = do-        { vExpr  <- closedV $-                      inBind var $-                        vectAnnPolyExpr (isStrongLoopBreaker $ idOccInfo var) exprVI-        ; inline <- computeInline exprVI-        ; return (inline, vectorised vExpr)-        }---- |Vectorise a polymorphic expression annotated with vectorisation information.------ The special case of dictionary functions is currently handled separately. (Would be neater to--- integrate them, though!)----vectAnnPolyExpr :: Bool -> CoreExprWithVectInfo -> VM VExpr-vectAnnPolyExpr loop_breaker (_, AnnTick tickish expr)-    -- traverse through ticks-  = vTick tickish <$> vectAnnPolyExpr loop_breaker expr-vectAnnPolyExpr loop_breaker expr-  | isVIDict expr-    -- special case the right-hand side of dictionary functions-  = (, undefined) <$> vectDictExpr (deAnnotate expr)-  | otherwise-    -- collect and vectorise type abstractions; then, descent into the body-  = polyAbstract tvs $ \args ->-      mapVect (mkLams $ tvs ++ args) <$> vectFnExpr False loop_breaker mono-  where-    (tvs, mono) = collectAnnTypeBinders expr---- Encapsulate every purely sequential subexpression of a (potentially) parallel expression into a--- lambda abstraction over all its free variables followed by the corresponding application to those--- variables.  We can, then, avoid the vectorisation of the ensapsulated subexpressions.------ Preconditions:------ * All free variables and the result type must be /simple/ types.--- * The expression is sufficiently complex (to warrant special treatment).  For now, that is---   every expression that is not constant and contains at least one operation.--------- The user has an option to choose between aggressive and minimal vectorisation avoidance. With--- minimal vectorisation avoidance, we only encapsulate individual scalar operations. With--- aggressive vectorisation avoidance, we encapsulate subexpression that are as big as possible.----encapsulateScalars :: CoreExprWithVectInfo -> VM CoreExprWithVectInfo-encapsulateScalars ce@(_, AnnType _ty)-  = return ce-encapsulateScalars ce@((_, VISimple), AnnVar _v)-      -- NB: diverts from the paper: encapsulate scalar variables (including functions)-  = liftSimpleAndCase ce-encapsulateScalars ce@(_, AnnVar _v)-  = return ce-encapsulateScalars ce@(_, AnnLit _)-  = return ce-encapsulateScalars ((fvs, vi), AnnTick tck expr)-  = do-    { encExpr <- encapsulateScalars expr-    ; return ((fvs, vi), AnnTick tck encExpr)-    }-encapsulateScalars ce@((fvs, vi), AnnLam bndr expr)-  = do-    { vectAvoid <- isVectAvoidanceAggressive-    ; varsS     <- allScalarVarTypeSet fvs-        -- NB: diverts from the paper: we need to check the scalarness of bound variables as well,-        --     as 'vectScalarFun' will handle them just the same as those introduced for the 'fvs'-        --     by encapsulation.-    ; bndrsS    <- allScalarVarType bndrs-    ; case (vi, vectAvoid && varsS && bndrsS) of-        (VISimple, True) -> liftSimpleAndCase ce-        _                -> do-                            { encExpr <- encapsulateScalars expr-                            ; return ((fvs, vi), AnnLam bndr encExpr)-                            }-    }-  where-    (bndrs, _) = collectAnnBndrs ce-encapsulateScalars ce@((fvs, vi), AnnApp ce1 ce2)-  = do-    { vectAvoid <- isVectAvoidanceAggressive-    ; varsS     <- allScalarVarTypeSet fvs-    ; case (vi, (vectAvoid || isSimpleApplication ce) && varsS) of-        (VISimple, True) -> liftSimpleAndCase ce-        _                -> do-                            { encCe1 <- encapsulateScalars ce1-                            ; encCe2 <- encapsulateScalars ce2-                            ; return ((fvs, vi), AnnApp encCe1 encCe2)-                            }-    }-  where-    isSimpleApplication :: CoreExprWithVectInfo -> Bool-    isSimpleApplication (_, AnnTick _ ce)                 = isSimpleApplication ce-    isSimpleApplication (_, AnnCast ce _)                 = isSimpleApplication ce-    isSimpleApplication ce                  | isSimple ce = True-    isSimpleApplication (_, AnnApp ce1 ce2)               = isSimple ce1 && isSimpleApplication ce2-    isSimpleApplication _                                 = False-    ---    isSimple :: CoreExprWithVectInfo -> Bool-    isSimple (_, AnnType {})   = True-    isSimple (_, AnnVar  {})   = True-    isSimple (_, AnnLit  {})   = True-    isSimple (_, AnnTick _ ce) = isSimple ce-    isSimple (_, AnnCast ce _) = isSimple ce-    isSimple _                 = False-encapsulateScalars ce@((fvs, vi), AnnCase scrut bndr ty alts)-  = do-    { vectAvoid <- isVectAvoidanceAggressive-    ; varsS     <- allScalarVarTypeSet fvs-    ; case (vi, vectAvoid && varsS) of-        (VISimple, True) -> liftSimpleAndCase ce-        _                -> do-                            { encScrut <- encapsulateScalars scrut-                            ; encAlts  <- mapM encAlt alts-                            ; return ((fvs, vi), AnnCase encScrut bndr ty encAlts)-                            }-    }-  where-    encAlt (con, bndrs, expr) = (con, bndrs,) <$> encapsulateScalars expr-encapsulateScalars ce@((fvs, vi), AnnLet (AnnNonRec bndr expr1) expr2)-  = do-    { vectAvoid <- isVectAvoidanceAggressive-    ; varsS     <- allScalarVarTypeSet fvs-    ; case (vi, vectAvoid && varsS) of-        (VISimple, True) -> liftSimpleAndCase ce-        _                -> do-                            { encExpr1 <- encapsulateScalars expr1-                            ; encExpr2 <- encapsulateScalars expr2-                            ; return ((fvs, vi), AnnLet (AnnNonRec bndr encExpr1) encExpr2)-                            }-    }-encapsulateScalars ce@((fvs, vi), AnnLet (AnnRec binds) expr)-  = do-    { vectAvoid <- isVectAvoidanceAggressive-    ; varsS     <- allScalarVarTypeSet fvs-    ; case (vi, vectAvoid && varsS) of-        (VISimple, True) -> liftSimpleAndCase ce-        _                -> do-                            { encBinds <- mapM encBind binds-                            ; encExpr  <- encapsulateScalars expr-                            ; return ((fvs, vi), AnnLet (AnnRec encBinds) encExpr)-                            }-    }- where-   encBind (bndr, expr) = (bndr,) <$> encapsulateScalars expr-encapsulateScalars ((fvs, vi), AnnCast expr coercion)-  = do-    { encExpr <- encapsulateScalars expr-    ; return ((fvs, vi), AnnCast encExpr coercion)-    }-encapsulateScalars _-  = panic "Vectorise.Exp.encapsulateScalars: unknown constructor"---- Lambda-lift the given simple expression and apply it to the abstracted free variables.------ If the expression is a case expression scrutinising anything, but a scalar type, then lift--- each alternative individually.----liftSimpleAndCase :: CoreExprWithVectInfo -> VM CoreExprWithVectInfo-liftSimpleAndCase aexpr@((fvs, _vi), AnnCase expr bndr t alts)-  = do-    { vi <- vectAvoidInfoTypeOf expr-    ; if (vi == VISimple)-      then-        liftSimple aexpr  -- if the scrutinee is scalar, we need no special treatment-      else do-      { alts' <- mapM (\(ac, bndrs, aexpr) -> (ac, bndrs,) <$> liftSimpleAndCase aexpr) alts-      ; return ((fvs, vi), AnnCase expr bndr t alts')-      }-    }-liftSimpleAndCase aexpr = liftSimple aexpr--liftSimple :: CoreExprWithVectInfo -> VM CoreExprWithVectInfo-liftSimple ((fvs, vi), AnnVar v)-  | v `elemDVarSet` fvs               -- special case to avoid producing: (\v -> v) v-  && not (isToplevel v)               --   NB: if 'v' not free or is toplevel, we must get the 'VIEncaps'-  = return $ ((fvs, vi), AnnVar v)-liftSimple aexpr@((fvs_orig, VISimple), expr)-  = do-    { let liftedExpr = mkAnnApps (mkAnnLams (reverse vars) fvs expr) vars--    ; traceVt "encapsulate:" $ ppr (deAnnotate aexpr) $$ text "==>" $$ ppr (deAnnotate liftedExpr)--    ; return $ liftedExpr-    }-  where-    vars = dVarSetElems fvs-    fvs  = filterDVarSet (not . isToplevel) fvs_orig -- only include 'Id's that are not toplevel--    mkAnnLams :: [Var] -> DVarSet -> AnnExpr' Var (DVarSet, VectAvoidInfo) -> CoreExprWithVectInfo-    mkAnnLams []     fvs expr = ASSERT(isEmptyDVarSet fvs)-                                ((emptyDVarSet, VIEncaps), expr)-    mkAnnLams (v:vs) fvs expr = mkAnnLams vs (fvs `delDVarSet` v) (AnnLam v ((fvs, VIEncaps), expr))--    mkAnnApps :: CoreExprWithVectInfo -> [Var] -> CoreExprWithVectInfo-    mkAnnApps aexpr []     = aexpr-    mkAnnApps aexpr (v:vs) = mkAnnApps (mkAnnApp aexpr v) vs--    mkAnnApp :: CoreExprWithVectInfo -> Var -> CoreExprWithVectInfo-    mkAnnApp aexpr@((fvs, _vi), _expr) v-      = ((fvs `extendDVarSet` v, VISimple), AnnApp aexpr ((unitDVarSet v, VISimple), AnnVar v))-liftSimple aexpr-  = pprPanic "Vectorise.Exp.liftSimple: not simple" $ ppr (deAnnotate aexpr)--isToplevel :: Var -> Bool-isToplevel v | isId v    = case realIdUnfolding v of-                             NoUnfolding                     -> False-                             BootUnfolding                   -> False-                             OtherCon      {}                -> True-                             DFunUnfolding {}                -> True-                             CoreUnfolding {uf_is_top = top} -> top-             | otherwise = False---- |Vectorise an expression.----vectExpr :: CoreExprWithVectInfo -> VM VExpr--vectExpr aexpr-    -- encapsulated expression of functional type => try to vectorise as a scalar subcomputation-  | (isFunTy . annExprType $ aexpr) && isVIEncaps aexpr-  = vectFnExpr True False aexpr-    -- encapsulated constant => vectorise as a scalar constant-  | isVIEncaps aexpr-  = traceVt "vectExpr (encapsulated constant):" (ppr . deAnnotate $ aexpr) >>-    vectConst (deAnnotate aexpr)--vectExpr (_, AnnVar v)-  = vectVar v--vectExpr (_, AnnLit lit)-  = vectConst $ Lit lit--vectExpr aexpr@(_, AnnLam _ _)-  = traceVt "vectExpr [AnnLam]:" (ppr . deAnnotate $ aexpr) >>-    vectFnExpr True False aexpr--  -- SPECIAL CASE: Vectorise/lift 'patError @ ty err' by only vectorising/lifting the type 'ty';-  --   its only purpose is to abort the program, but we need to adjust the type to keep CoreLint-  --   happy.--- FIXME: can't be do this with a VECTORISE pragma on 'pAT_ERROR_ID' now?-vectExpr (_, AnnApp (_, AnnApp (_, AnnVar v) (_, AnnType ty)) err)-  | v == pAT_ERROR_ID-  = do-    { (vty, lty) <- vectAndLiftType ty-    ; return (mkCoreApps (Var v) [Type (getRuntimeRep vty), Type vty, err'],-              mkCoreApps (Var v) [Type lty, err'])-    }-  where-    err' = deAnnotate err--  -- type application (handle multiple consecutive type applications simultaneously to ensure the-  -- PA dictionaries are put at the right places)-vectExpr e@(_, AnnApp _ arg)-  | isAnnTypeArg arg-  = vectPolyApp e--  -- Lifted literal-vectExpr (_, AnnApp (_, AnnVar v) (_, AnnLit lit))-  | Just _con <- isDataConId_maybe v-  = do-    { let vexpr = App (Var v) (Lit lit)-    ; lexpr <- liftPD vexpr-    ; return (vexpr, lexpr)-    }--  -- value application (dictionary or user value)-vectExpr e@(_, AnnApp fn arg)-  | isPredTy arg_ty   -- dictionary application (whose result is not a dictionary)-  = vectPolyApp e-  | otherwise         -- user value-  = do-    {   -- vectorise the types-    ; varg_ty <- vectType arg_ty-    ; vres_ty <- vectType res_ty--        -- vectorise the function and argument expression-    ; vfn  <- vectExpr fn-    ; varg <- vectExpr arg--        -- the vectorised function is a closure; apply it to the vectorised argument-    ; mkClosureApp varg_ty vres_ty vfn varg-    }-  where-    (arg_ty, res_ty) = splitFunTy . exprType $ deAnnotate fn--vectExpr (_, AnnCase scrut bndr ty alts)-  | Just (tycon, ty_args) <- splitTyConApp_maybe scrut_ty-  , isAlgTyCon tycon-  = vectAlgCase tycon ty_args scrut bndr ty alts-  | otherwise-  = do-    { dflags <- getDynFlags-    ; cantVectorise dflags "Can't vectorise expression (no algebraic type constructor)" $-        ppr scrut_ty-    }-  where-    scrut_ty = exprType (deAnnotate scrut)--vectExpr (_, AnnLet (AnnNonRec bndr rhs) body)-  = do-    { traceVt "let binding (non-recursive)" Outputable.empty-    ; vrhs <- localV $-                inBind bndr $-                  vectAnnPolyExpr False rhs-    ; traceVt "let body (non-recursive)" Outputable.empty-    ; (vbndr, vbody) <- vectBndrIn bndr (vectExpr body)-    ; return $ vLet (vNonRec vbndr vrhs) vbody-    }--vectExpr (_, AnnLet (AnnRec bs) body)-  = do-    { (vbndrs, (vrhss, vbody)) <- vectBndrsIn bndrs $ do-                                  { traceVt "let bindings (recursive)" Outputable.empty-                                  ; vrhss <- zipWithM vect_rhs bndrs rhss-                                  ; traceVt "let body (recursive)" Outputable.empty-                                  ; vbody <- vectExpr body-                                  ; return (vrhss, vbody)-                                  }-    ; return $ vLet (vRec vbndrs vrhss) vbody-    }-  where-    (bndrs, rhss) = unzip bs--    vect_rhs bndr rhs = localV $-                          inBind bndr $-                            vectAnnPolyExpr (isStrongLoopBreaker $ idOccInfo bndr) rhs--vectExpr (_, AnnTick tickish expr)-  = vTick tickish <$> vectExpr expr--vectExpr (_, AnnType ty)-  = vType <$> vectType ty--vectExpr e-  = do-    { dflags <- getDynFlags-    ; cantVectorise dflags "Can't vectorise expression (vectExpr)" $ ppr (deAnnotate e)-    }---- |Vectorise an expression that *may* have an outer lambda abstraction. If the expression is marked--- as encapsulated ('VIEncaps'), vectorise it as a scalar computation (using a generalised scalar--- zip).------ We do not handle type variables at this point, as they will already have been stripped off by--- 'vectPolyExpr'. We also only have to worry about one set of dictionary arguments as we (1) only--- deal with Haskell 2011 and (2) class selectors are vectorised elsewhere.----vectFnExpr :: Bool                  -- ^If we process the RHS of a binding, whether that binding-                                    --  should be inlined-           -> Bool                  -- ^Whether the binding is a loop breaker-           -> CoreExprWithVectInfo  -- ^Expression to vectorise; must have an outer `AnnLam`-           -> VM VExpr-vectFnExpr inline loop_breaker aexpr@(_ann, AnnLam bndr body)-    -- predicate abstraction: leave as a normal abstraction, but vectorise the predicate type-  | isId bndr-    && isPredTy (idType bndr)-  = do-    { vBndr <- vectBndr bndr-    ; vbody <- vectFnExpr inline loop_breaker body-    ; return $ mapVect (mkLams [vectorised vBndr]) vbody-    }-    -- encapsulated non-predicate abstraction: vectorise as a scalar computation-  | isId bndr && isVIEncaps aexpr-  = vectScalarFun . deAnnotate $ aexpr-    -- non-predicate abstraction: vectorise as a non-scalar computation-  | isId bndr-  = vectLam inline loop_breaker aexpr-  | otherwise-  = do-    { dflags <- getDynFlags-    ; cantVectorise dflags "Vectorise.Exp.vectFnExpr: Unexpected type lambda" $-        ppr (deAnnotate aexpr)-    }-vectFnExpr _ _ aexpr-    -- encapsulated function: vectorise as a scalar computation-  | (isFunTy . annExprType $ aexpr) && isVIEncaps aexpr-  = vectScalarFun . deAnnotate $ aexpr-  | otherwise-    -- not an abstraction: vectorise as a non-scalar vanilla expression-    -- NB: we can get here due to the recursion in the first case above and from 'vectAnnPolyExpr'-  = vectExpr aexpr---- |Vectorise type and dictionary applications.------ These are always headed by a variable (as we don't support higher-rank polymorphism), but may--- involve two sets of type variables and dictionaries. Consider,------ > class C a where--- >   m :: D b => b -> a------ The type of 'm' is 'm :: forall a. C a => forall b. D b => b -> a'.----vectPolyApp :: CoreExprWithVectInfo -> VM VExpr-vectPolyApp e0-  = case e4 of-      (_, AnnVar var)-        -> do {   -- get the vectorised form of the variable-              ; vVar <- lookupVar var-              ; traceVt "vectPolyApp of" (ppr var)--                  -- vectorise type and dictionary arguments-              ; vDictsOuter <- mapM vectDictExpr (map deAnnotate dictsOuter)-              ; vDictsInner <- mapM vectDictExpr (map deAnnotate dictsInner)-              ; vTysOuter   <- mapM vectType     tysOuter-              ; vTysInner   <- mapM vectType     tysInner--              ; let reconstructOuter v = (`mkApps` vDictsOuter) <$> polyApply v vTysOuter--              ; case vVar of-                  Local (vv, lv)-                    -> do { MASSERT( null dictsInner )    -- local vars cannot be class selectors-                          ; traceVt "  LOCAL" (text "")-                          ; (,) <$> reconstructOuter (Var vv) <*> reconstructOuter (Var lv)-                          }-                  Global vv-                    | isDictComp var                      -- dictionary computation-                    -> do {   -- in a dictionary computation, the innermost, non-empty set of-                              -- arguments are non-vectorised arguments, where no 'PA'dictionaries-                              -- are needed for the type variables-                          ; ve <- if null dictsInner-                                  then-                                    return $ Var vv `mkTyApps` vTysOuter `mkApps` vDictsOuter-                                  else-                                    reconstructOuter-                                      (Var vv `mkTyApps` vTysInner `mkApps` vDictsInner)-                          ; traceVt "  GLOBAL (dict):" (ppr ve)-                          ; vectConst ve-                          }-                    | otherwise                           -- non-dictionary computation-                    -> do { MASSERT( null dictsInner )-                          ; ve <- reconstructOuter (Var vv)-                          ; traceVt "  GLOBAL (non-dict):" (ppr ve)-                          ; vectConst ve-                          }-              }-      _ -> pprSorry "Cannot vectorise programs with higher-rank types:" (ppr . deAnnotate $ e0)-  where-    -- if there is only one set of variables or dictionaries, it will be the outer set-    (e1, dictsOuter) = collectAnnDictArgs e0-    (e2, tysOuter)   = collectAnnTypeArgs e1-    (e3, dictsInner) = collectAnnDictArgs e2-    (e4, tysInner)   = collectAnnTypeArgs e3-    ---    isDictComp var = (isJust . isClassOpId_maybe $ var) || isDFunId var---- |Vectorise the body of a dfun.------ Dictionary computations are special for the following reasons.  The application of dictionary--- functions are always saturated, so there is no need to create closures.  Dictionary computations--- don't depend on array values, so they are always scalar computations whose result we can--- replicate (instead of executing them in parallel).------ NB: To keep things simple, we are not rewriting any of the bindings introduced in a dictionary---     computation.  Consequently, the variable case needs to deal with cases where binders are---     in the vectoriser environments and where that is not the case.----vectDictExpr :: CoreExpr -> VM CoreExpr-vectDictExpr (Var var)-  = do { mb_scope <- lookupVar_maybe var-       ; case mb_scope of-           Nothing                -> return $ Var var   -- binder from within the dict. computation-           Just (Local (vVar, _)) -> return $ Var vVar  -- local vectorised variable-           Just (Global vVar)     -> return $ Var vVar  -- global vectorised variable-       }-vectDictExpr (Lit lit)-  = pprPanic "Vectorise.Exp.vectDictExpr: literal in dictionary computation" (ppr lit)-vectDictExpr (Lam bndr e)-  = Lam bndr <$> vectDictExpr e-vectDictExpr (App fn arg)-  = App <$> vectDictExpr fn <*> vectDictExpr arg-vectDictExpr (Case e bndr ty alts)-  = Case <$> vectDictExpr e <*> pure bndr <*> vectType ty <*> mapM vectDictAlt alts-  where-    vectDictAlt (con, bs, e) = (,,) <$> vectDictAltCon con <*> pure bs <*> vectDictExpr e-    ---    vectDictAltCon (DataAlt datacon) = DataAlt <$> maybeV dataConErr (lookupDataCon datacon)-      where-        dataConErr = text "Cannot vectorise data constructor:" <+> ppr datacon-    vectDictAltCon (LitAlt lit)      = return $ LitAlt lit-    vectDictAltCon DEFAULT           = return DEFAULT-vectDictExpr (Let bnd body)-  = Let <$> vectDictBind bnd <*> vectDictExpr body-  where-    vectDictBind (NonRec bndr e) = NonRec bndr <$> vectDictExpr e-    vectDictBind (Rec bnds)      = Rec <$> mapM (\(bndr, e) -> (bndr,) <$> vectDictExpr e) bnds-vectDictExpr e@(Cast _e _coe)-  = pprSorry "Vectorise.Exp.vectDictExpr: cast" (ppr e)-vectDictExpr (Tick tickish e)-  = Tick tickish <$> vectDictExpr e-vectDictExpr (Type ty)-  = Type <$> vectType ty-vectDictExpr (Coercion coe)-  = pprSorry "Vectorise.Exp.vectDictExpr: coercion" (ppr coe)---- |Vectorise an expression of functional type, where all arguments and the result are of primitive--- types (i.e., 'Int', 'Float', 'Double' etc., which have instances of the 'Scalar' type class) and--- which does not contain any subcomputations that involve parallel arrays.  Such functionals do not--- require the full blown vectorisation transformation; instead, they can be lifted by application--- of a member of the zipWith family (i.e., 'map', 'zipWith', zipWith3', etc.)------ Dictionary functions are also scalar functions (as dictionaries themselves are not vectorised,--- instead they become dictionaries of vectorised methods).  We treat them differently, though see--- "Note [Scalar dfuns]" in 'Vectorise'.----vectScalarFun :: CoreExpr -> VM VExpr-vectScalarFun expr-  = do-    { traceVt "vectScalarFun:" (ppr expr)-    ; let (arg_tys, res_ty) = splitFunTys (exprType expr)-    ; mkScalarFun arg_tys res_ty expr-    }---- Generate code for a scalar function by generating a scalar closure.  If the function is a--- dictionary function, vectorise it as dictionary code.----mkScalarFun :: [Type] -> Type -> CoreExpr -> VM VExpr-mkScalarFun arg_tys res_ty expr-  | isPredTy res_ty-  = do { vExpr <- vectDictExpr expr-       ; return (vExpr, unused)-       }-  | otherwise-  = do { traceVt "mkScalarFun: " $ ppr expr $$ text "  ::" <+>-                                   ppr (mkFunTys arg_tys res_ty)--       ; fn_var  <- hoistExpr (fsLit "fn") expr DontInline-       ; zipf    <- zipScalars arg_tys res_ty-       ; clo     <- scalarClosure arg_tys res_ty (Var fn_var) (zipf `App` Var fn_var)-       ; clo_var <- hoistExpr (fsLit "clo") clo DontInline-       ; lclo    <- liftPD (Var clo_var)-       ; return (Var clo_var, lclo)-       }-  where-    unused = error "Vectorise.Exp.mkScalarFun: we don't lift dictionary expressions"---- |Vectorise a dictionary function that has a 'VECTORISE SCALAR instance' pragma.------ In other words, all methods in that dictionary are scalar functions — to be vectorised with--- 'vectScalarFun'.  The dictionary "function" itself may be a constant, though.------ NB: You may think that we could implement this function guided by the structure of the Core---     expression of the right-hand side of the dictionary function.  We cannot proceed like this as---     'vectScalarDFun' must also work for *imported* dfuns, where we don't necessarily have access---     to the Core code of the unvectorised dfun.------ Here an example — assume,------ > class Eq a where { (==) :: a -> a -> Bool }--- > instance (Eq a, Eq b) => Eq (a, b) where { (==) = ... }--- > {-# VECTORISE SCALAR instance Eq (a, b) }------ The unvectorised dfun for the above instance has the following signature:------ > $dEqPair :: forall a b. Eq a -> Eq b -> Eq (a, b)------ We generate the following (scalar) vectorised dfun (liberally using TH notation):------ > $v$dEqPair :: forall a b. V:Eq a -> V:Eq b -> V:Eq (a, b)--- > $v$dEqPair = /\a b -> \dEqa :: V:Eq a -> \dEqb :: V:Eq b ->--- >                D:V:Eq $(vectScalarFun True recFns--- >                         [| (==) @(a, b) ($dEqPair @a @b $(unVect dEqa) $(unVect dEqb)) |])------ NB:--- * '(,)' vectorises to '(,)' — hence, the type constructor in the result type remains the same.--- * We share the '$(unVect di)' sub-expressions between the different selectors, but duplicate---   the application of the unvectorised dfun, to enable the dictionary selection rules to fire.----vectScalarDFun :: Var        -- ^ Original dfun-               -> VM CoreExpr-vectScalarDFun var-  = do {   -- bring the type variables into scope-       ; mapM_ defLocalTyVar tvs--           -- vectorise dictionary argument types and generate variables for them-       ; vTheta     <- mapM vectType theta-       ; vThetaBndr <- mapM (newLocalVar (fsLit "vd")) vTheta-       ; let vThetaVars = varsToCoreExprs vThetaBndr--           -- vectorise superclass dictionaries and methods as scalar expressions-       ; thetaVars  <- mapM (newLocalVar (fsLit "d")) theta-       ; thetaExprs <- zipWithM unVectDict theta vThetaVars-       ; let thetaDictBinds = zipWith NonRec thetaVars thetaExprs-             dict           = Var var `mkTyApps` (mkTyVarTys tvs) `mkVarApps` thetaVars-             scsOps         = map (\selId -> varToCoreExpr selId `mkTyApps` tys `mkApps` [dict])-                                  selIds-       ; vScsOps <- mapM (\e -> vectorised <$> vectScalarFun e) scsOps--           -- vectorised applications of the class-dictionary data constructor-       ; Just vDataCon <- lookupDataCon dataCon-       ; vTys          <- mapM vectType tys-       ; let vBody = thetaDictBinds `mkLets` mkCoreConApps vDataCon (map Type vTys ++ vScsOps)--       ; return $ mkLams (tvs ++ vThetaBndr) vBody-       }-  where-    ty                   = varType var-    (tvs, theta, pty)    = tcSplitSigmaTy  ty        -- 'theta' is the instance context-    (cls, tys)           = tcSplitDFunHead pty       -- 'pty' is the instance head-    selIds               = classAllSelIds cls-    dataCon              = classDataCon cls---- Build a value of the dictionary before vectorisation from original, unvectorised type and an--- expression computing the vectorised dictionary.------ Given the vectorised version of a dictionary 'vd :: V:C vt1..vtn', generate code that computes--- the unvectorised version, thus:------ > D:C op1 .. opm--- > where--- >   opi = $(fromVect opTyi [| vSeli @vt1..vtk vd |])------ where 'opTyi' is the type of the i-th superclass or op of the unvectorised dictionary.----unVectDict :: Type -> CoreExpr -> VM CoreExpr-unVectDict ty e-  = do { vTys <- mapM vectType tys-       ; let meths = map (\sel -> Var sel `mkTyApps` vTys `mkApps` [e]) selIds-       ; scOps <- zipWithM fromVect methTys meths-       ; return $ mkCoreConApps dataCon (map Type tys ++ scOps)-       }-  where-    (tycon, tys) = splitTyConApp ty-    Just dataCon = isDataProductTyCon_maybe tycon-    Just cls     = tyConClass_maybe tycon-    methTys      = dataConInstArgTys dataCon tys-    selIds       = classAllSelIds cls---- Vectorise an 'n'-ary lambda abstraction by building a set of 'n' explicit closures.------ All non-dictionary free variables go into the closure's environment, whereas the dictionary--- variables are passed explicit (as conventional arguments) into the body during closure--- construction.----vectLam :: Bool                 -- ^ Should the RHS of a binding be inlined?-        -> Bool                 -- ^ Whether the binding is a loop breaker.-        -> CoreExprWithVectInfo -- ^ Body of abstraction.-        -> VM VExpr-vectLam inline loop_breaker expr@((fvs, _vi), AnnLam _ _)- = do { traceVt "fully vectorise a lambda expression" (ppr . deAnnotate $ expr)--      ; let (bndrs, body) = collectAnnValBinders expr--          -- grab the in-scope type variables-      ; tyvars <- localTyVars--          -- collect and vectorise all /local/ free variables-      ; vfvs <- readLEnv $ \env ->-                  [ (var, fromJust mb_vv)-                  | var <- dVarSetElems fvs-                  , let mb_vv = lookupVarEnv (local_vars env) var-                  , isJust mb_vv         -- its local == is in local var env-                  ]-          -- separate dictionary from non-dictionary variables in the free variable set-      ; let (vvs_dict, vvs_nondict)     = partition (isPredTy . varType . fst) vfvs-            (_fvs_dict, vfvs_dict)      = unzip vvs_dict-            (fvs_nondict, vfvs_nondict) = unzip vvs_nondict--          -- compute the type of the vectorised closure-      ; arg_tys <- mapM (vectType . idType) bndrs-      ; res_ty  <- vectType (exprType $ deAnnotate body)--      ; let arity      = length fvs_nondict + length bndrs-            vfvs_dict' = map vectorised vfvs_dict-      ; buildClosures tyvars vfvs_dict' vfvs_nondict arg_tys res_ty-        . hoistPolyVExpr tyvars vfvs_dict' (maybe_inline arity)-        $ do {   -- generate the vectorised body of the lambda abstraction-             ; lc              <- builtin liftingContext-             ; (vbndrs, vbody) <- vectBndrsIn (fvs_nondict ++ bndrs) $ vectExpr body--             ; vbody' <- break_loop lc res_ty vbody-             ; return $ vLams lc vbndrs vbody'-             }-      }-  where-    maybe_inline n | inline    = Inline n-                   | otherwise = DontInline--    -- If this is the body of a binding marked as a loop breaker, add a recursion termination test-    -- to the /lifted/ version of the function body.  The termination tests checks if the lifting-    -- context is empty.  If so, it returns an empty array of the (lifted) result type instead of-    -- executing the function body.  This is the test from the last line (defining \mathcal{L}')-    -- in Figure 6 of HtM.-    break_loop lc ty (ve, le)-      | loop_breaker-      = do { dflags <- getDynFlags-           ; empty <- emptyPD ty-           ; lty   <- mkPDataType ty-           ; return (ve, mkWildCase (Var lc) intPrimTy lty-                           [(DEFAULT, [], le),-                            (LitAlt (mkMachInt dflags 0), [], empty)])-           }-      | otherwise = return (ve, le)-vectLam _ _ _ = panic "Vectorise.Exp.vectLam: not a lambda"---- Vectorise an algebraic case expression.------ We convert------   case e :: t of v { ... }------ to------   V:    let v' = e in case v' of _ { ... }---   L:    let v' = e in case v' `cast` ... of _ { ... }------   When lifting, we have to do it this way because v must have the type---   [:V(T):] but the scrutinee must be cast to the representation type. We also---   have to handle the case where v is a wild var correctly.------- FIXME: this is too lazy...is it?-vectAlgCase :: TyCon -> [Type] -> CoreExprWithVectInfo -> Var -> Type-            -> [(AltCon, [Var], CoreExprWithVectInfo)]-            -> VM VExpr-vectAlgCase _tycon _ty_args scrut bndr ty [(DEFAULT, [], body)]-  = do-    { traceVt "scrutinee (DEFAULT only)" Outputable.empty-    ; vscrut         <- vectExpr scrut-    ; (vty, lty)     <- vectAndLiftType ty-    ; traceVt "alternative body (DEFAULT only)" Outputable.empty-    ; (vbndr, vbody) <- vectBndrIn bndr (vectExpr body)-    ; return $ vCaseDEFAULT vscrut vbndr vty lty vbody-    }-vectAlgCase _tycon _ty_args scrut bndr ty [(DataAlt _, [], body)]-  = do-    { traceVt "scrutinee (one shot w/o binders)" Outputable.empty-    ; vscrut         <- vectExpr scrut-    ; (vty, lty)     <- vectAndLiftType ty-    ; traceVt "alternative body (one shot w/o binders)" Outputable.empty-    ; (vbndr, vbody) <- vectBndrIn bndr (vectExpr body)-    ; return $ vCaseDEFAULT vscrut vbndr vty lty vbody-    }-vectAlgCase _tycon _ty_args scrut bndr ty [(DataAlt dc, bndrs, body)]-  = do-    { traceVt "scrutinee (one shot w/ binders)" Outputable.empty-    ; vexpr      <- vectExpr scrut-    ; (vty, lty) <- vectAndLiftType ty-    ; traceVt "alternative body (one shot w/ binders)" Outputable.empty-    ; (vbndr, (vbndrs, (vect_body, lift_body)))-        <- vect_scrut_bndr-         . vectBndrsIn bndrs-         $ vectExpr body-    ; let (vect_bndrs, lift_bndrs) = unzip vbndrs-    ; (vscrut, lscrut, pdata_dc) <- pdataUnwrapScrut (vVar vbndr)-    ; vect_dc <- maybeV dataConErr (lookupDataCon dc)--    ; let vcase = mk_wild_case vscrut vty vect_dc  vect_bndrs vect_body-          lcase = mk_wild_case lscrut lty pdata_dc lift_bndrs lift_body--    ; return $ vLet (vNonRec vbndr vexpr) (vcase, lcase)-    }-  where-    vect_scrut_bndr | isDeadBinder bndr = vectBndrNewIn bndr (fsLit "scrut")-                    | otherwise         = vectBndrIn bndr--    mk_wild_case expr ty dc bndrs body-      = mkWildCase expr (exprType expr) ty [(DataAlt dc, bndrs, body)]--    dataConErr = (text "vectAlgCase: data constructor not vectorised" <+> ppr dc)--vectAlgCase tycon _ty_args scrut bndr ty alts-  = do-    { traceVt "scrutinee (general case)" Outputable.empty-    ; vexpr <- vectExpr scrut--    ; vect_tc     <- vectTyCon tycon-    ; (vty, lty)  <- vectAndLiftType ty--    ; let arity = length (tyConDataCons vect_tc)-    ; sel_ty <- builtin (selTy arity)-    ; sel_bndr <- newLocalVar (fsLit "sel") sel_ty-    ; let sel = Var sel_bndr--    ; traceVt "alternatives' body (general case)" Outputable.empty-    ; (vbndr, valts) <- vect_scrut_bndr-                      $ mapM (proc_alt arity sel vty lty) alts'-    ; let (vect_dcs, vect_bndrss, lift_bndrss, vbodies) = unzip4 valts--    ; (vect_scrut, lift_scrut, pdata_dc) <- pdataUnwrapScrut (vVar vbndr)--    ; let (vect_bodies, lift_bodies) = unzip vbodies--    ; vdummy <- newDummyVar (exprType vect_scrut)-    ; ldummy <- newDummyVar (exprType lift_scrut)-    ; let vect_case = Case vect_scrut vdummy vty-                           (zipWith3 mk_vect_alt vect_dcs vect_bndrss vect_bodies)--    ; lc <- builtin liftingContext-    ; lbody <- combinePD vty (Var lc) sel lift_bodies-    ; let lift_case = Case lift_scrut ldummy lty-                           [(DataAlt pdata_dc, sel_bndr : concat lift_bndrss,-                             lbody)]--    ; return . vLet (vNonRec vbndr vexpr)-             $ (vect_case, lift_case)-    }-  where-    vect_scrut_bndr | isDeadBinder bndr = vectBndrNewIn bndr (fsLit "scrut")-                    | otherwise         = vectBndrIn bndr--    alts' = sortBy (\(alt1, _, _) (alt2, _, _) -> cmp alt1 alt2) alts--    cmp (DataAlt dc1) (DataAlt dc2) = dataConTag dc1 `compare` dataConTag dc2-    cmp DEFAULT       DEFAULT       = EQ-    cmp DEFAULT       _             = LT-    cmp _             DEFAULT       = GT-    cmp _             _             = panic "vectAlgCase/cmp"--    proc_alt arity sel _ lty (DataAlt dc, bndrs, body@((fvs_body, _), _))-      = do-          dflags <- getDynFlags-          vect_dc <- maybeV dataConErr (lookupDataCon dc)-          let ntag = dataConTagZ vect_dc-              tag  = mkDataConTag dflags vect_dc-              fvs  = fvs_body `delDVarSetList` bndrs--          sel_tags  <- liftM (`App` sel) (builtin (selTags arity))-          lc        <- builtin liftingContext-          elems     <- builtin (selElements arity ntag)--          (vbndrs, vbody)-            <- vectBndrsIn bndrs-             . localV-             $ do-               { binds    <- mapM (pack_var (Var lc) sel_tags tag)-                           . filter isLocalId-                           $ dVarSetElems fvs-               ; traceVt "case alternative:" (ppr . deAnnotate $ body)-               ; (ve, le) <- vectExpr body-               ; return (ve, Case (elems `App` sel) lc lty-                             [(DEFAULT, [], (mkLets (concat binds) le))])-               }-                 -- empty    <- emptyPD vty-                 -- return (ve, Case (elems `App` sel) lc lty-                 --             [(DEFAULT, [], Let (NonRec flags_var flags_expr)-                 --                             $ mkLets (concat binds) le),-                 --               (LitAlt (mkMachInt 0), [], empty)])-          let (vect_bndrs, lift_bndrs) = unzip vbndrs-          return (vect_dc, vect_bndrs, lift_bndrs, vbody)-      where-        dataConErr = (text "vectAlgCase: data constructor not vectorised" <+> ppr dc)--    proc_alt _ _ _ _ _ = panic "vectAlgCase/proc_alt"--    mk_vect_alt vect_dc bndrs body = (DataAlt vect_dc, bndrs, body)--      -- Pack a variable for a case alternative context *if* the variable is vectorised. If it-      -- isn't, ignore it as scalar variables don't need to be packed.-    pack_var len tags t v-      = do-        { r <- lookupVar_maybe v-        ; case r of-            Just (Local (vv, lv)) ->-              do-              { lv'  <- cloneVar lv-              ; expr <- packByTagPD (idType vv) (Var lv) len tags t-              ; updLEnv (\env -> env { local_vars = extendVarEnv (local_vars env) v (vv, lv') })-              ; return [(NonRec lv' expr)]-              }-            _ -> return []-        }----- Support to compute information for vectorisation avoidance ---------------------- Annotation for Core AST nodes that describes how they should be handled during vectorisation--- and especially if vectorisation of the corresponding computation can be avoided.----data VectAvoidInfo = VIParr       -- tree contains parallel computations-                   | VISimple     -- result type is scalar & no parallel subcomputation-                   | VIComplex    -- any result type, no parallel subcomputation-                   | VIEncaps     -- tree encapsulated by 'liftSimple'-                   | VIDict       -- dictionary computation (never parallel)-                   deriving (Eq, Show)---- Core expression annotated with free variables and vectorisation-specific information.----type CoreExprWithVectInfo = AnnExpr Id (DVarSet, VectAvoidInfo)---- Yield the type of an annotated core expression.----annExprType :: AnnExpr Var ann -> Type-annExprType = exprType . deAnnotate---- Project the vectorisation information from an annotated Core expression.----vectAvoidInfoOf :: CoreExprWithVectInfo -> VectAvoidInfo-vectAvoidInfoOf ((_, vi), _) = vi---- Is this a 'VIParr' node?----isVIParr :: CoreExprWithVectInfo -> Bool-isVIParr = (== VIParr) . vectAvoidInfoOf---- Is this a 'VIEncaps' node?----isVIEncaps :: CoreExprWithVectInfo -> Bool-isVIEncaps = (== VIEncaps) . vectAvoidInfoOf---- Is this a 'VIDict' node?----isVIDict :: CoreExprWithVectInfo -> Bool-isVIDict = (== VIDict) . vectAvoidInfoOf---- 'VIParr' if either argument is 'VIParr'; otherwise, the first argument.----unlessVIParr :: VectAvoidInfo -> VectAvoidInfo -> VectAvoidInfo-unlessVIParr _  VIParr = VIParr-unlessVIParr vi _      = vi---- 'VIParr' if either arguments vectorisation information is 'VIParr'; otherwise, the vectorisation--- information of the first argument is produced.----unlessVIParrExpr :: VectAvoidInfo -> CoreExprWithVectInfo -> VectAvoidInfo-infixl `unlessVIParrExpr`-unlessVIParrExpr e1 e2 = e1 `unlessVIParr` vectAvoidInfoOf e2---- Compute Core annotations to determine for which subexpressions we can avoid vectorisation.------ * The first argument is the set of free, local variables whose evaluation may entail parallelism.----vectAvoidInfo :: VarSet -> CoreExprWithFVs -> VM CoreExprWithVectInfo-vectAvoidInfo pvs ce@(_, AnnVar v)-  = do-    { gpvs <- globalParallelVars-    ; vi <- if v `elemVarSet` pvs || v `elemDVarSet` gpvs-            then return VIParr-            else vectAvoidInfoTypeOf ce-    ; viTrace ce vi []-    ; when (vi == VIParr) $-        traceVt "  reason:" $ if v `elemVarSet` pvs  then text "local"  else-                              if v `elemDVarSet` gpvs then text "global" else text "parallel type"--    ; return ((fvs, vi), AnnVar v)-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo _pvs ce@(_, AnnLit lit)-  = do-    { vi <- vectAvoidInfoTypeOf ce-    ; viTrace ce vi []-    ; return ((fvs, vi), AnnLit lit)-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo pvs ce@(_, AnnApp e1 e2)-  = do-    { ceVI <- vectAvoidInfoTypeOf ce-    ; eVI1 <- vectAvoidInfo pvs e1-    ; eVI2 <- vectAvoidInfo pvs e2-    ; let vi = ceVI `unlessVIParrExpr` eVI1 `unlessVIParrExpr` eVI2-    -- ; viTrace ce vi [eVI1, eVI2]-    ; return ((fvs, vi), AnnApp eVI1 eVI2)-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo pvs ce@(_, AnnLam var body)-  = do-    { bodyVI <- vectAvoidInfo pvs body-    ; varVI  <- vectAvoidInfoType $ varType var-    ; let vi = vectAvoidInfoOf bodyVI `unlessVIParr` varVI-    -- ; viTrace ce vi [bodyVI]-    ; return ((fvs, vi), AnnLam var bodyVI)-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo pvs ce@(_, AnnLet (AnnNonRec var e) body)-  = do-    { ceVI       <- vectAvoidInfoTypeOf ce-    ; eVI        <- vectAvoidInfo pvs e-    ; isScalarTy <- isScalar $ varType var-    ; (bodyVI, vi) <- if isVIParr eVI && not isScalarTy-        then do -- binding is parallel-        { bodyVI <- vectAvoidInfo (pvs `extendVarSet` var) body-        ; return (bodyVI, VIParr)-        }-        else do -- binding doesn't affect parallelism-        { bodyVI <- vectAvoidInfo pvs body-        ; return (bodyVI, ceVI `unlessVIParrExpr` bodyVI)-        }-    -- ; viTrace ce vi [eVI, bodyVI]-    ; return ((fvs, vi), AnnLet (AnnNonRec var eVI) bodyVI)-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo pvs ce@(_, AnnLet (AnnRec bnds) body)-  = do-    { ceVI         <- vectAvoidInfoTypeOf ce-    ; bndsVI       <- mapM (vectAvoidInfoBnd pvs) bnds-    ; parrBndrs    <- map fst <$> filterM isVIParrBnd bndsVI-    ; if not . null $ parrBndrs-      then do         -- body may trigger parallelism via at least one binding-        { new_pvs <- filterM ((not <$>) . isScalar . varType) parrBndrs-        ; let extendedPvs = pvs `extendVarSetList` new_pvs-        ; bndsVI <- mapM (vectAvoidInfoBnd extendedPvs) bnds-        ; bodyVI <- vectAvoidInfo extendedPvs body-        -- ; viTrace ce VIParr (map snd bndsVI ++ [bodyVI])-        ; return ((fvs, VIParr), AnnLet (AnnRec bndsVI) bodyVI)-        }-      else do         -- demanded bindings cannot trigger parallelism-        { bodyVI <- vectAvoidInfo pvs body-        ; let vi = ceVI `unlessVIParrExpr` bodyVI-        -- ; viTrace ce vi (map snd bndsVI ++ [bodyVI])-        ; return ((fvs, vi), AnnLet (AnnRec bndsVI) bodyVI)-        }-    }-  where-    fvs = freeVarsOf ce-    vectAvoidInfoBnd pvs (var, e) = (var,) <$> vectAvoidInfo pvs e--    isVIParrBnd (var, eVI)-      = do-        { isScalarTy <- isScalar (varType var)-        ; return $ isVIParr eVI && not isScalarTy-        }--vectAvoidInfo pvs ce@(_, AnnCase e var ty alts)-  = do-    { ceVI           <- vectAvoidInfoTypeOf ce-    ; eVI            <- vectAvoidInfo pvs e-    ; altsVI         <- mapM (vectAvoidInfoAlt (isVIParr eVI)) alts-    ; let alteVIs = [eVI | (_, _, eVI) <- altsVI]-          vi      =  foldl unlessVIParrExpr ceVI (eVI:alteVIs)  -- NB: same effect as in the paper-    -- ; viTrace ce vi (eVI : alteVIs)-    ; return ((fvs, vi), AnnCase eVI var ty altsVI)-    }-  where-    fvs = freeVarsOf ce-    vectAvoidInfoAlt scrutIsPar (con, bndrs, e)-      = do-        { allScalar <- allScalarVarType bndrs-        ; let altPvs | scrutIsPar && not allScalar = pvs `extendVarSetList` bndrs-                     | otherwise                   = pvs-        ; (con, bndrs,) <$> vectAvoidInfo altPvs e-        }--vectAvoidInfo pvs ce@(_, AnnCast e (fvs_ann, ann))-  = do-    { eVI <- vectAvoidInfo pvs e-    ; return ((fvs, vectAvoidInfoOf eVI), AnnCast eVI ((freeVarsOfAnn fvs_ann, VISimple), ann))-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo pvs ce@(_, AnnTick tick e)-  = do-    { eVI <- vectAvoidInfo pvs e-    ; return ((fvs, vectAvoidInfoOf eVI), AnnTick tick eVI)-    }-  where-    fvs = freeVarsOf ce--vectAvoidInfo _pvs ce@(_, AnnType ty)-  = return ((fvs, VISimple), AnnType ty)-  where-    fvs = freeVarsOf ce--vectAvoidInfo _pvs ce@(_, AnnCoercion coe)-  = return ((fvs, VISimple), AnnCoercion coe)-  where-    fvs = freeVarsOf ce---- Compute vectorisation avoidance information for a type.----vectAvoidInfoType :: Type -> VM VectAvoidInfo-vectAvoidInfoType ty-  | isPredTy ty-  = return VIDict-  | Just (arg, res) <- splitFunTy_maybe ty-  = do-    { argVI <- vectAvoidInfoType arg-    ; resVI <- vectAvoidInfoType res-    ; case (argVI, resVI) of-        (VISimple, VISimple) -> return VISimple   -- NB: diverts from the paper: scalar functions-        (_       , VIDict)   -> return VIDict-        _                    -> return $ VIComplex `unlessVIParr` argVI `unlessVIParr` resVI-    }-  | otherwise-  = do-    { parr <- maybeParrTy ty-    ; if parr-      then return VIParr-      else do-    { scalar <- isScalar ty-    ; if scalar-      then return VISimple-      else return VIComplex-    } }---- Compute vectorisation avoidance information for the type of a Core expression (with FVs).----vectAvoidInfoTypeOf :: AnnExpr Var ann -> VM VectAvoidInfo-vectAvoidInfoTypeOf = vectAvoidInfoType . annExprType---- Checks whether the type might be a parallel array type.----maybeParrTy :: Type -> VM Bool-maybeParrTy ty-    -- looking through newtypes-  | Just ty'      <- coreView ty-  = (== VIParr) <$> vectAvoidInfoType ty'-    -- decompose constructor applications-  | Just (tc, ts) <- splitTyConApp_maybe ty-  = do-    { isParallel <- (tyConName tc `elemNameSet`) <$> globalParallelTyCons-    ; if isParallel-      then return True-      else or <$> mapM maybeParrTy ts-    }-  -- must be a Named ForAllTy because anon ones respond to splitTyConApp_maybe-maybeParrTy (ForAllTy _ ty) = maybeParrTy ty-maybeParrTy _               = return False---- Are the types of all variables in the 'Scalar' class or toplevel variables?------ NB: 'liftSimple' does not abstract over toplevel variables.----allScalarVarType :: [Var] -> VM Bool-allScalarVarType vs = and <$> mapM isScalarOrToplevel vs-  where-    isScalarOrToplevel v | isToplevel v = return True-                         | otherwise    = isScalar (varType v)---- Are the types of all variables in the set in the 'Scalar' class or toplevel variables?----allScalarVarTypeSet :: DVarSet -> VM Bool-allScalarVarTypeSet = allScalarVarType . dVarSetElems---- Debugging support----viTrace :: CoreExprWithFVs -> VectAvoidInfo -> [CoreExprWithVectInfo] -> VM ()-viTrace ce vi vTs-  = traceVt ("vect info: " ++ show vi ++ "[" ++-             (concat $ map ((++ " ") . show . vectAvoidInfoOf) vTs) ++ "]")-            (ppr $ deAnnotate ce)
− vectorise/Vectorise/Generic/Description.hs
@@ -1,294 +0,0 @@--- |Compute a description of the generic representation that we use for a user defined data type.------ During vectorisation, we generate a PRepr and PA instance for each user defined--- data type. The PA dictionary contains methods to convert the user type to and--- from our generic representation. This module computes a description of what--- that generic representation is.----module Vectorise.Generic.Description-  ( CompRepr(..)-  , ProdRepr(..)-  , ConRepr(..)-  , SumRepr(..)-  , tyConRepr-  , sumReprType-  , compOrigType-  )-where--import GhcPrelude--import Vectorise.Utils-import Vectorise.Monad-import Vectorise.Builtins--import CoreSyn-import DataCon-import TyCon-import Type-import Control.Monad-import Outputable----- | Describes the generic representation of a data type.---   If the data type has multiple constructors then we bundle them---   together into a generic sum type.-data SumRepr-        =  -- | Data type has no data constructors.-           EmptySum--        -- | Data type has a single constructor.-        | UnarySum ConRepr--        -- | Data type has multiple constructors.-        | Sum  { -- | Representation tycon for the sum (eg Sum2)-                 repr_sum_tc    :: TyCon--               -- | PData version of the sum tycon     (eg PDataSum2)-               --   This TyCon doesn't appear explicitly in the source program.-               --   See Note [PData TyCons].-               , repr_psum_tc   :: TyCon--               -- | PDatas version of the sum tycon    (eg PDatasSum2)-               , repr_psums_tc  :: TyCon--               -- | Type of the selector               (eg Sel2)-               , repr_sel_ty    :: Type--               -- | Type of multi-selector             (eg Sel2s)-               , repr_sels_ty   :: Type--               -- | Function to get the length of a Sels of this type.-               , repr_selsLength_v :: CoreExpr--               -- | Type of each data constructor.-               , repr_con_tys   :: [Type]--               -- | Generic representation types of each data constructor.-               , repr_cons      :: [ConRepr]-               }----- | Describes the representation type of a data constructor.-data ConRepr-        = ConRepr-                { repr_dc       :: DataCon-                , repr_prod     :: ProdRepr-                }---- | Describes the representation type of the fields \/ components of a constructor.---   If the data constructor has multiple fields then we bundle them---   together into a generic product type.-data ProdRepr-        = -- | Data constructor has no fields.-          EmptyProd--        -- | Data constructor has a single field.-        | UnaryProd CompRepr--        -- | Data constructor has several fields.-        | Prod { -- | Representation tycon for the product (eg Tuple2)-                 repr_tup_tc   :: TyCon--                 -- | PData  version of the product tycon  (eg PDataTuple2)-               , repr_ptup_tc  :: TyCon--                 -- | PDatas version of the product tycon  (eg PDatasTuple2s)-                 --   Not all lifted backends use `PDatas`.-               , repr_ptups_tc :: TyCon--                 -- | Types of each field.-               , repr_comp_tys :: [Type]--                 -- | Generic representation types for each field.-               , repr_comps    :: [CompRepr]-               }----- | Describes the representation type of a data constructor field.-data CompRepr-        = Keep Type-               CoreExpr     -- PR dictionary for the type-        | Wrap Type-------------------------------------------------------------------------------------- |Determine the generic representation of a data type, given its tycon.----tyConRepr :: TyCon -> VM SumRepr-tyConRepr tc-  = sum_repr (tyConDataCons tc)-  where-    -- Build the representation type for a data type with the given constructors.-    -- The representation types for each individual constructor are bundled-    -- together into a generic sum type.-    sum_repr :: [DataCon] -> VM SumRepr-    sum_repr []    = return EmptySum-    sum_repr [con] = liftM UnarySum (con_repr con)-    sum_repr cons-     = do  let arity    = length cons-           rs           <- mapM con_repr cons-           tys          <- mapM conReprType rs--           -- Get the 'Sum' tycon of this arity (eg Sum2).-           sum_tc       <- builtin (sumTyCon arity)--           -- Get the 'PData' and 'PDatas' tycons for the sum.-           psum_tc      <- pdataReprTyConExact  sum_tc-           psums_tc     <- pdatasReprTyConExact sum_tc--           sel_ty       <- builtin (selTy      arity)-           sels_ty      <- builtin (selsTy     arity)-           selsLength_v <- builtin (selsLength arity)-           return $ Sum-                  { repr_sum_tc         = sum_tc-                  , repr_psum_tc        = psum_tc-                  , repr_psums_tc       = psums_tc-                  , repr_sel_ty         = sel_ty-                  , repr_sels_ty        = sels_ty-                  , repr_selsLength_v   = selsLength_v-                  , repr_con_tys        = tys-                  , repr_cons           = rs-                  }--    -- Build the representation type for a single data constructor.-    con_repr con   = liftM (ConRepr con) (prod_repr (dataConRepArgTys con))--    -- Build the representation type for the fields of a data constructor.-    -- The representation types for each individual field are bundled-    -- together into a generic product type.-    prod_repr :: [Type] -> VM ProdRepr-    prod_repr []   = return EmptyProd-    prod_repr [ty] = liftM UnaryProd (comp_repr ty)-    prod_repr tys-     = do  let arity    = length tys-           rs           <- mapM comp_repr tys-           tys'         <- mapM compReprType rs--           -- Get the Prod \/ Tuple tycon of this arity (eg Tuple2)-           tup_tc       <- builtin (prodTyCon arity)--           -- Get the 'PData' and 'PDatas' tycons for the product.-           ptup_tc      <- pdataReprTyConExact  tup_tc-           ptups_tc     <- pdatasReprTyConExact tup_tc--           return $ Prod-                  { repr_tup_tc   = tup_tc-                  , repr_ptup_tc  = ptup_tc-                  , repr_ptups_tc = ptups_tc-                  , repr_comp_tys = tys'-                  , repr_comps    = rs-                  }--    -- Build the representation type for a single data constructor field.-    comp_repr ty = liftM (Keep ty) (prDictOfReprType ty)-                   `orElseV` return (Wrap ty)---- |Yield the type of this sum representation.----sumReprType :: SumRepr -> VM Type-sumReprType EmptySum     = voidType-sumReprType (UnarySum r) = conReprType r-sumReprType (Sum { repr_sum_tc  = sum_tc, repr_con_tys = tys })-  = return $ mkTyConApp sum_tc tys---- Yield the type of this constructor representation.----conReprType :: ConRepr -> VM Type-conReprType (ConRepr _ r) = prodReprType r---- Yield the type of of this product representation.----prodReprType :: ProdRepr -> VM Type-prodReprType EmptyProd     = voidType-prodReprType (UnaryProd r) = compReprType r-prodReprType (Prod { repr_tup_tc = tup_tc, repr_comp_tys = tys })-  = return $ mkTyConApp tup_tc tys---- Yield the type of this data constructor field \/ component representation.----compReprType :: CompRepr -> VM Type-compReprType (Keep ty _) = return ty-compReprType (Wrap ty)   = mkWrapType ty---- |Yield the original component type of a data constructor component representation.----compOrigType :: CompRepr -> Type-compOrigType (Keep ty _) = ty-compOrigType (Wrap ty)   = ty----- Outputable instances --------------------------------------------------------instance Outputable SumRepr where- ppr ss-  = case ss of-        EmptySum-         -> text "EmptySum"--        UnarySum con-         -> sep [text "UnarySum", ppr con]--        Sum sumtc psumtc psumstc selty selsty selsLength contys cons-         -> text "Sum" $+$ braces (nest 4-                $ sep   [ text "repr_sum_tc       = " <> ppr sumtc-                        , text "repr_psum_tc      = " <> ppr psumtc-                        , text "repr_psums_tc     = " <> ppr psumstc-                        , text "repr_sel_ty       = " <> ppr selty-                        , text "repr_sels_ty      = " <> ppr selsty-                        , text "repr_selsLength_v = " <> ppr selsLength-                        , text "repr_con_tys      = " <> ppr contys-                        , text "repr_cons         = " <> ppr cons])---instance Outputable ConRepr where- ppr (ConRepr dc pr)-        = text "ConRepr" $+$ braces (nest 4-                $ sep   [ text "repr_dc      = " <> ppr dc-                        , text "repr_prod    = " <> ppr pr])---instance Outputable ProdRepr where- ppr ss-  = case ss of-        EmptyProd-         -> text "EmptyProd"--        UnaryProd cr-         -> sep [text "UnaryProd", ppr cr]--        Prod tuptcs ptuptcs ptupstcs comptys comps-         -> sep [text "Prod", ppr tuptcs, ppr ptuptcs, ppr ptupstcs, ppr comptys, ppr comps]---instance Outputable CompRepr where- ppr ss-  = case ss of-        Keep t ce-         -> text "Keep" $+$ sep [ppr t, ppr ce]--        Wrap t-         -> sep [text "Wrap", ppr t]----- Notes -----------------------------------------------------------------------{--Note [PData TyCons]-~~~~~~~~~~~~~~~~~~~-When PData is a type family, the compiler generates a type constructor for each-instance, which is named after the family and instance type. This type-constructor does not appear in the source program. Rather, it is implicitly-defined by the data instance. For example with:--  data family PData a--  data instance PData (Sum2 a b)-        = PSum2  U.Sel2-                 (PData a)-                 (PData b)--The type constructor corresponding to the instance will be named 'PDataSum2',-and this is what we will get in the repr_psum_tc field of SumRepr.Sum.---}-
− vectorise/Vectorise/Generic/PADict.hs
@@ -1,128 +0,0 @@--module Vectorise.Generic.PADict-  ( buildPADict-  ) where--import GhcPrelude--import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Generic.Description-import Vectorise.Generic.PAMethods ( buildPAScAndMethods )-import Vectorise.Utils--import BasicTypes-import CoreSyn-import CoreUtils-import CoreUnfold-import Module-import TyCon-import CoAxiom-import Type-import Id-import Var-import Name-import FastString----- |Build the PA dictionary function for some type and hoist it to top level.------ The PA dictionary holds fns that convert values to and from their vectorised representations.------ @Recall the definition:---    class PR (PRepr a) => PA a where---      toPRepr      :: a -> PRepr a---      fromPRepr    :: PRepr a -> a---      toArrPRepr   :: PData a -> PData (PRepr a)---      fromArrPRepr :: PData (PRepr a) -> PData a---      toArrPReprs   :: PDatas a         -> PDatas (PRepr a)---      fromArrPReprs :: PDatas (PRepr a) -> PDatas a------ Example:---    df :: forall a. PR (PRepr a) -> PA a -> PA (T a)---    df = /\a. \(c:PR (PRepr a)) (d:PA a). MkPA c ($PR_df a d) ($toPRepr a d) ...---    $dPR_df :: forall a. PA a -> PR (PRepr (T a))---    $dPR_df = ....---    $toRepr :: forall a. PA a -> T a -> PRepr (T a)---    $toPRepr = ...--- The "..." stuff is filled in by buildPAScAndMethods--- @----buildPADict-        :: TyCon        -- ^ tycon of the type being vectorised.-        -> CoAxiom Unbranched-                        -- ^ Coercion between the type and-                        --     its vectorised representation.-        -> TyCon        -- ^ PData  instance tycon-        -> TyCon        -- ^ PDatas instance tycon-        -> SumRepr      -- ^ representation used for the type being vectorised.-        -> VM Var       -- ^ name of the top-level dictionary function.--buildPADict vect_tc prepr_ax pdata_tc pdatas_tc repr- = polyAbstract tvs $ \args ->    -- The args are the dictionaries we lambda abstract over; and they-                                  -- are put in the envt, so when we need a (PA a) we can find it in-                                  -- the envt; they don't include the silent superclass args yet-   do { mod <- liftDs getModule-      ; let dfun_name = mkLocalisedOccName mod mkPADFunOcc vect_tc_name--          -- The superclass dictionary is a (silent) argument if the tycon is polymorphic...-      ; let mk_super_ty = do { r <- mkPReprType inst_ty-                             ; pr_cls <- builtin prClass-                             ; return $ mkClassPred pr_cls [r]-                             }-      ; super_tys  <- sequence [mk_super_ty | not (null tvs)]-      ; super_args <- mapM (newLocalVar (fsLit "pr")) super_tys-      ; let val_args = super_args ++ args-            all_args = tvs ++ val_args--          -- ...it is constant otherwise-      ; super_consts <- sequence [prDictOfPReprInstTyCon inst_ty prepr_ax [] | null tvs]--          -- Get ids for each of the methods in the dictionary, including superclass-      ; paMethodBuilders <- buildPAScAndMethods-      ; method_ids       <- mapM (method val_args dfun_name) paMethodBuilders--          -- Expression to build the dictionary.-      ; pa_dc  <- builtin paDataCon-      ; let dict = mkLams all_args (mkConApp pa_dc con_args)-            con_args = Type inst_ty-                     : map Var super_args  -- the superclass dictionary is either-                    ++ super_consts        -- lambda-bound or constant-                    ++ map (method_call val_args) method_ids--          -- Build the type of the dictionary function.-      ; pa_cls <- builtin paClass-      ; let dfun_ty = mkInvForAllTys tvs-                    $ mkFunTys (map varType val_args)-                               (mkClassPred pa_cls [inst_ty])--          -- Set the unfolding for the inliner.-      ; raw_dfun <- newExportedVar dfun_name dfun_ty-      ; let dfun_unf = mkDFunUnfolding all_args pa_dc con_args-            dfun = raw_dfun `setIdUnfolding`  dfun_unf-                            `setInlinePragma` dfunInlinePragma--          -- Add the new binding to the top-level environment.-      ; hoistBinding dfun dict-      ; return dfun-      }-  where-    tvs          = tyConTyVars vect_tc-    arg_tys      = mkTyVarTys tvs-    inst_ty      = mkTyConApp vect_tc arg_tys-    vect_tc_name = getName vect_tc--    method args dfun_name (name, build)-     = localV-     $ do  expr     <- build vect_tc prepr_ax pdata_tc pdatas_tc repr-           let body = mkLams (tvs ++ args) expr-           raw_var  <- newExportedVar (method_name dfun_name name) (exprType body)-           let var  = raw_var-                      `setIdUnfolding` mkInlineUnfoldingWithArity-                                         (length args) body-                      `setInlinePragma` alwaysInlinePragma-           hoistBinding var body-           return var--    method_call args id        = mkApps (Var id) (map Type arg_tys ++ map Var args)-    method_name dfun_name name = mkVarOcc $ occNameString dfun_name ++ ('$' : name)
− vectorise/Vectorise/Generic/PAMethods.hs
@@ -1,586 +0,0 @@---- | Generate methods for the PA class.------   TODO: there is a large amount of redundancy here between the---   a, PData a, and PDatas a forms. See if we can factor some of this out.----module Vectorise.Generic.PAMethods-  ( buildPReprTyCon-  , buildPAScAndMethods-  ) where--import GhcPrelude--import Vectorise.Utils-import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Generic.Description-import CoreSyn-import CoreUtils-import FamInstEnv-import MkCore            ( mkWildCase, mkCoreLet )-import TyCon-import CoAxiom-import Type-import OccName-import Coercion-import MkId-import FamInst-import TysPrim( intPrimTy )--import DynFlags-import FastString-import MonadUtils-import Control.Monad-import Outputable---buildPReprTyCon :: TyCon -> TyCon -> SumRepr -> VM FamInst-buildPReprTyCon orig_tc vect_tc repr- = do name      <- mkLocalisedName mkPReprTyConOcc (tyConName orig_tc)-      rhs_ty    <- sumReprType repr-      prepr_tc  <- builtin preprTyCon-      let axiom = mkSingleCoAxiom Nominal name tyvars [] prepr_tc instTys rhs_ty-      liftDs $ newFamInst SynFamilyInst axiom-  where-    tyvars = tyConTyVars vect_tc-    instTys = [mkTyConApp vect_tc . mkTyVarTys $ tyConTyVars vect_tc]---- buildPAScAndMethods ------------------------------------------------------------ | This says how to build the PR superclass and methods of PA---   Recall the definition of the PA class:------   @---    class class PR (PRepr a) => PA a where---      toPRepr       :: a                -> PRepr a---      fromPRepr     :: PRepr a          -> a------      toArrPRepr    :: PData a          -> PData (PRepr a)---      fromArrPRepr  :: PData (PRepr a)  -> PData a------      toArrPReprs   :: PDatas a         -> PDatas (PRepr a)---      fromArrPReprs :: PDatas (PRepr a) -> PDatas a---   @----type PAInstanceBuilder-        =  TyCon        -- ^ Vectorised TyCon-        -> CoAxiom Unbranched-                        -- ^ Coercion to the representation TyCon-        -> TyCon        -- ^ 'PData'  TyCon-        -> TyCon        -- ^ 'PDatas' TyCon-        -> SumRepr      -- ^ Description of generic representation.-        -> VM CoreExpr  -- ^ Instance function.---buildPAScAndMethods :: VM [(String, PAInstanceBuilder)]-buildPAScAndMethods- = return [ ("toPRepr",       buildToPRepr)-          , ("fromPRepr",     buildFromPRepr)-          , ("toArrPRepr",    buildToArrPRepr)-          , ("fromArrPRepr",  buildFromArrPRepr)-          , ("toArrPReprs",   buildToArrPReprs)-          , ("fromArrPReprs", buildFromArrPReprs)]----- buildToPRepr ------------------------------------------------------------------ | Build the 'toRepr' method of the PA class.-buildToPRepr :: PAInstanceBuilder-buildToPRepr vect_tc repr_ax _ _ repr- = do let arg_ty = mkTyConApp vect_tc ty_args--      -- Get the representation type of the argument.-      res_ty <- mkPReprType arg_ty--      -- Var to bind the argument-      arg    <- newLocalVar (fsLit "x") arg_ty--      -- Build the expression to convert the argument to the generic representation.-      result <- to_sum (Var arg) arg_ty res_ty repr--      return $ Lam arg result-  where-    ty_args        = mkTyVarTys (tyConTyVars vect_tc)--    wrap_repr_inst = wrapTypeUnbranchedFamInstBody repr_ax ty_args []--    -- CoreExp to convert the given argument to the generic representation.-    -- We start by doing a case branch on the possible data constructors.-    to_sum :: CoreExpr -> Type -> Type -> SumRepr -> VM CoreExpr-    to_sum _ _ _ EmptySum-     = do void <- builtin voidVar-          return $ wrap_repr_inst $ Var void--    to_sum arg arg_ty res_ty (UnarySum r)-     = do (pat, vars, body) <- con_alt r-          return $ mkWildCase arg arg_ty res_ty-                   [(pat, vars, wrap_repr_inst body)]--    to_sum arg arg_ty res_ty (Sum { repr_sum_tc  = sum_tc-                                  , repr_con_tys = tys-                                  , repr_cons    =  cons })-     = do alts <- mapM con_alt cons-          let alts' = [(pat, vars, wrap_repr_inst-                                   $ mkConApp sum_con (map Type tys ++ [body]))-                        | ((pat, vars, body), sum_con)-                            <- zip alts (tyConDataCons sum_tc)]-          return $ mkWildCase arg arg_ty res_ty alts'--    con_alt (ConRepr con r)-     = do (vars, body) <- to_prod r-          return (DataAlt con, vars, body)--    -- CoreExp to convert data constructor fields to the generic representation.-    to_prod :: ProdRepr -> VM ([Var], CoreExpr)-    to_prod EmptyProd-     = do void <- builtin voidVar-          return ([], Var void)--    to_prod (UnaryProd comp)-     = do var  <- newLocalVar (fsLit "x") (compOrigType comp)-          body <- to_comp (Var var) comp-          return ([var], body)--    to_prod (Prod { repr_tup_tc   = tup_tc-                  , repr_comp_tys = tys-                  , repr_comps    = comps })-     = do vars  <- newLocalVars (fsLit "x") (map compOrigType comps)-          exprs <- zipWithM to_comp (map Var vars) comps-          let [tup_con] = tyConDataCons tup_tc-          return (vars, mkConApp tup_con (map Type tys ++ exprs))--    -- CoreExp to convert a data constructor component to the generic representation.-    to_comp :: CoreExpr -> CompRepr -> VM CoreExpr-    to_comp expr (Keep _ _) = return expr-    to_comp expr (Wrap ty)  = wrapNewTypeBodyOfWrap expr ty----- buildFromPRepr ----------------------------------------------------------------- |Build the 'fromPRepr' method of the PA class.----buildFromPRepr :: PAInstanceBuilder-buildFromPRepr vect_tc repr_ax _ _ repr-  = do-      arg_ty <- mkPReprType res_ty-      arg <- newLocalVar (fsLit "x") arg_ty--      result <- from_sum (unwrapTypeUnbranchedFamInstScrut repr_ax ty_args [] (Var arg))-                         repr-      return $ Lam arg result-  where-    ty_args = mkTyVarTys (tyConTyVars vect_tc)-    res_ty  = mkTyConApp vect_tc ty_args--    from_sum _ EmptySum-     = do dummy <- builtin fromVoidVar-          return $ Var dummy `App` Type res_ty--    from_sum expr (UnarySum r) = from_con expr r-    from_sum expr (Sum { repr_sum_tc  = sum_tc-                       , repr_con_tys = tys-                       , repr_cons    = cons })-     = do vars  <- newLocalVars (fsLit "x") tys-          es    <- zipWithM from_con (map Var vars) cons-          return $ mkWildCase expr (exprType expr) res_ty-                   [(DataAlt con, [var], e)-                      | (con, var, e) <- zip3 (tyConDataCons sum_tc) vars es]--    from_con expr (ConRepr con r)-      = from_prod expr (mkConApp con $ map Type ty_args) r--    from_prod _ con EmptyProd = return con-    from_prod expr con (UnaryProd r)-     = do e <- from_comp expr r-          return $ con `App` e--    from_prod expr con (Prod { repr_tup_tc   = tup_tc-                             , repr_comp_tys = tys-                             , repr_comps    = comps-                             })-     = do vars <- newLocalVars (fsLit "y") tys-          es   <- zipWithM from_comp (map Var vars) comps-          let [tup_con] = tyConDataCons tup_tc-          return $ mkWildCase expr (exprType expr) res_ty-                   [(DataAlt tup_con, vars, con `mkApps` es)]--    from_comp expr (Keep _ _) = return expr-    from_comp expr (Wrap ty)  = unwrapNewTypeBodyOfWrap expr ty----- buildToArrRepr ----------------------------------------------------------------- |Build the 'toArrRepr' method of the PA class.----buildToArrPRepr :: PAInstanceBuilder-buildToArrPRepr vect_tc repr_co pdata_tc _ r- = do arg_ty <- mkPDataType el_ty-      res_ty <- mkPDataType =<< mkPReprType el_ty-      arg    <- newLocalVar (fsLit "xs") arg_ty--      pdata_co <- mkBuiltinCo pdataTyCon-      let co           = mkAppCo pdata_co-                       $ mkSymCo-                       $ mkUnbranchedAxInstCo Nominal repr_co ty_args []--          scrut   = unwrapFamInstScrut pdata_tc ty_args (Var arg)--      (vars, result) <- to_sum r--      return . Lam arg-             $ mkWildCase scrut (mkTyConApp pdata_tc ty_args) res_ty-               [(DataAlt pdata_dc, vars, mkCast result co)]-  where-    ty_args    = mkTyVarTys $ tyConTyVars vect_tc-    el_ty      = mkTyConApp vect_tc ty_args-    [pdata_dc] = tyConDataCons pdata_tc--    to_sum ss-     = case ss of-        EmptySum    -> builtin pvoidVar >>= \pvoid -> return ([], Var pvoid)-        UnarySum r  -> to_con r-        Sum{}-         -> do  let psum_tc     =  repr_psum_tc ss-                let [psum_con]  =  tyConDataCons psum_tc-                (vars, exprs)   <- mapAndUnzipM to_con (repr_cons ss)-                sel             <- newLocalVar (fsLit "sel") (repr_sel_ty ss)-                return ( sel : concat vars-                       , wrapFamInstBody psum_tc (repr_con_tys ss)-                         $ mkConApp psum_con-                         $ map Type (repr_con_tys ss) ++ (Var sel : exprs))--    to_prod ss-     = case ss of-        EmptyProd    -> builtin pvoidVar >>= \pvoid -> return ([], Var pvoid)-        UnaryProd r-         -> do  pty  <- mkPDataType (compOrigType r)-                var  <- newLocalVar (fsLit "x") pty-                expr <- to_comp (Var var) r-                return ([var], expr)-        Prod{}-         -> do  let [ptup_con]  = tyConDataCons (repr_ptup_tc ss)-                ptys   <- mapM (mkPDataType . compOrigType) (repr_comps ss)-                vars   <- newLocalVars (fsLit "x") ptys-                exprs  <- zipWithM to_comp (map Var vars) (repr_comps ss)-                return ( vars-                       , wrapFamInstBody (repr_ptup_tc ss) (repr_comp_tys ss)-                         $ mkConApp ptup_con-                         $ map Type (repr_comp_tys ss) ++ exprs)--    to_con (ConRepr _ r)    = to_prod r--    to_comp expr (Keep _ _) = return expr-    to_comp expr (Wrap ty)  = wrapNewTypeBodyOfPDataWrap expr ty----- buildFromArrPRepr -------------------------------------------------------------- |Build the 'fromArrPRepr' method for the PA class.----buildFromArrPRepr :: PAInstanceBuilder-buildFromArrPRepr vect_tc repr_co pdata_tc _ r- = do arg_ty <- mkPDataType =<< mkPReprType el_ty-      res_ty <- mkPDataType el_ty-      arg    <- newLocalVar (fsLit "xs") arg_ty--      pdata_co <- mkBuiltinCo pdataTyCon-      let co           = mkAppCo pdata_co-                       $ mkUnbranchedAxInstCo Nominal repr_co var_tys []--      let scrut        = mkCast (Var arg) co--      let mk_result args-            = wrapFamInstBody pdata_tc var_tys-            $ mkConApp pdata_con-            $ map Type var_tys ++ args--      (expr, _) <- fixV $ \ ~(_, args) ->-                     from_sum res_ty (mk_result args) scrut r--      return $ Lam arg expr- where-    var_tys     = mkTyVarTys $ tyConTyVars vect_tc-    el_ty       = mkTyConApp vect_tc var_tys-    [pdata_con] = tyConDataCons pdata_tc--    from_sum res_ty res expr ss-     = case ss of-        EmptySum    -> return (res, [])-        UnarySum r  -> from_con res_ty res expr r-        Sum {}-         -> do  let psum_tc    =  repr_psum_tc ss-                let [psum_con] =  tyConDataCons psum_tc-                sel            <- newLocalVar (fsLit "sel") (repr_sel_ty ss)-                ptys           <- mapM mkPDataType (repr_con_tys ss)-                vars           <- newLocalVars (fsLit "xs") ptys-                (res', args)   <- fold from_con res_ty res (map Var vars) (repr_cons ss)-                let scrut      =  unwrapFamInstScrut psum_tc (repr_con_tys ss) expr-                let body       =  mkWildCase scrut (exprType scrut) res_ty-                                    [(DataAlt psum_con, sel : vars, res')]-                return (body, Var sel : args)--    from_prod res_ty res expr ss-     = case ss of-        EmptyProd   -> return (res, [])-        UnaryProd r -> from_comp res_ty res expr r-        Prod {}-         -> do  let ptup_tc    =  repr_ptup_tc ss-                let [ptup_con] =  tyConDataCons ptup_tc-                ptys           <- mapM mkPDataType (repr_comp_tys ss)-                vars           <- newLocalVars (fsLit "ys") ptys-                (res', args)   <- fold from_comp res_ty res (map Var vars) (repr_comps ss)-                let scrut      =  unwrapFamInstScrut ptup_tc (repr_comp_tys ss) expr-                let body       =  mkWildCase scrut (exprType scrut) res_ty-                                    [(DataAlt ptup_con, vars, res')]-                return (body, args)--    from_con res_ty res expr (ConRepr _ r) = from_prod res_ty res expr r--    from_comp _ res expr (Keep _ _) = return (res, [expr])-    from_comp _ res expr (Wrap ty)  = do { expr' <- unwrapNewTypeBodyOfPDataWrap expr ty-                                         ; return (res, [expr'])-                                         }--    fold f res_ty res exprs rs-      = foldrM f' (res, []) (zip exprs rs)-      where-        f' (expr, r) (res, args)-         = do (res', args') <- f res_ty res expr r-              return (res', args' ++ args)----- buildToArrPReprs -------------------------------------------------------------- | Build the 'toArrPReprs' instance for the PA class.---   This converts a PData of elements into the generic representation.-buildToArrPReprs :: PAInstanceBuilder-buildToArrPReprs vect_tc repr_co _ pdatas_tc r- = do-    -- The argument type of the instance.-    --  eg: 'PDatas (Tree a b)'-    arg_ty    <- mkPDatasType el_ty--    -- The result type.-    --  eg: 'PDatas (PRepr (Tree a b))'-    res_ty    <- mkPDatasType =<< mkPReprType el_ty--    -- Variable to bind the argument to the instance-    -- eg: (xss :: PDatas (Tree a b))-    varg      <- newLocalVar (fsLit "xss") arg_ty--    -- Coercion to case between the (PRepr a) type and its instance.-    pdatas_co <- mkBuiltinCo pdatasTyCon-    let co           = mkAppCo pdatas_co-                     $ mkSymCo-                     $ mkUnbranchedAxInstCo Nominal repr_co ty_args []--    let scrut        = unwrapFamInstScrut pdatas_tc ty_args (Var varg)-    (vars, result)  <- to_sum r--    return  $ Lam varg-            $ mkWildCase scrut (mkTyConApp pdatas_tc ty_args) res_ty-                    [(DataAlt pdatas_dc, vars, mkCast result co)]-- where-    -- The element type of the argument.-    --  eg: 'Tree a b'.-    ty_args = mkTyVarTys $ tyConTyVars vect_tc-    el_ty   = mkTyConApp vect_tc ty_args--    -- PDatas data constructor-    [pdatas_dc] = tyConDataCons pdatas_tc--    to_sum ss-     = case ss of-        -- We can't convert data types with no data.-        -- See Note: [Empty PDatas].-        EmptySum        -> do dflags <- getDynFlags-                              return ([], errorEmptyPDatas dflags el_ty)-        UnarySum r      -> do dflags <- getDynFlags-                              to_con (errorEmptyPDatas dflags el_ty) r--        Sum{}-         -> do  let psums_tc     = repr_psums_tc ss-                let [psums_con]  = tyConDataCons psums_tc-                sels             <- newLocalVar (fsLit "sels") (repr_sels_ty ss)--                -- Take the number of selectors to serve as the length of-                -- and PDatas Void arrays in the product. See Note [Empty PDatas].-                let xSums        =  App (repr_selsLength_v ss) (Var sels)--                xSums_var <- newLocalVar (fsLit "xsum") intPrimTy--                (vars, exprs)    <- mapAndUnzipM (to_con xSums_var) (repr_cons ss)-                return ( sels : concat vars-                       , wrapFamInstBody psums_tc (repr_con_tys ss)-                         $ mkCoreLet (NonRec xSums_var xSums)-                                 -- mkCoreLet ensures that the let/app invariant holds-                         $ mkConApp psums_con-                         $ map Type (repr_con_tys ss) ++ (Var sels : exprs))--    to_prod xSums ss-     = case ss of-        EmptyProd-         -> do  pvoids  <- builtin pvoidsVar-                return ([], App (Var pvoids) (Var xSums) )--        UnaryProd r-         -> do  pty  <- mkPDatasType (compOrigType r)-                var  <- newLocalVar (fsLit "x") pty-                expr <- to_comp (Var var) r-                return ([var], expr)--        Prod{}-         -> do  let [ptups_con]  = tyConDataCons (repr_ptups_tc ss)-                ptys   <- mapM (mkPDatasType . compOrigType) (repr_comps ss)-                vars   <- newLocalVars (fsLit "x") ptys-                exprs  <- zipWithM to_comp (map Var vars) (repr_comps ss)-                return ( vars-                       , wrapFamInstBody (repr_ptups_tc ss) (repr_comp_tys ss)-                         $ mkConApp ptups_con-                         $ map Type (repr_comp_tys ss) ++ exprs)--    to_con xSums (ConRepr _ r)-        = to_prod xSums r--    to_comp expr (Keep _ _) = return expr-    to_comp expr (Wrap ty)  = wrapNewTypeBodyOfPDatasWrap expr ty----- buildFromArrPReprs ----------------------------------------------------------buildFromArrPReprs :: PAInstanceBuilder-buildFromArrPReprs vect_tc repr_co _ pdatas_tc r- = do-    -- The argument type of the instance.-    --  eg: 'PDatas (PRepr (Tree a b))'-    arg_ty      <- mkPDatasType =<< mkPReprType el_ty--    -- The result type.-    --  eg: 'PDatas (Tree a b)'-    res_ty      <- mkPDatasType el_ty--    -- Variable to bind the argument to the instance-    -- eg: (xss :: PDatas (PRepr (Tree a b)))-    varg        <- newLocalVar (fsLit "xss") arg_ty--    -- Build the coercion between PRepr and the instance type-    pdatas_co <- mkBuiltinCo pdatasTyCon-    let co           = mkAppCo pdatas_co-                     $ mkUnbranchedAxInstCo Nominal repr_co var_tys []--    let scrut        = mkCast (Var varg) co--    let mk_result args-            = wrapFamInstBody pdatas_tc var_tys-            $ mkConApp pdatas_con-            $ map Type var_tys ++ args--    (expr, _) <- fixV $ \ ~(_, args) ->-                     from_sum res_ty (mk_result args) scrut r--    return $ Lam varg expr- where-    -- The element type of the argument.-    --  eg: 'Tree a b'.-    ty_args      = mkTyVarTys $ tyConTyVars vect_tc-    el_ty        = mkTyConApp vect_tc ty_args--    var_tys      = mkTyVarTys $ tyConTyVars vect_tc-    [pdatas_con] = tyConDataCons pdatas_tc--    from_sum res_ty res expr ss-     = case ss of-        -- We can't convert data types with no data.-        -- See Note: [Empty PDatas].-        EmptySum        -> do dflags <- getDynFlags-                              return (res, errorEmptyPDatas dflags el_ty)-        UnarySum r      -> from_con res_ty res expr r--        Sum {}-         -> do  let psums_tc    =  repr_psums_tc ss-                let [psums_con] =  tyConDataCons psums_tc-                sel             <- newLocalVar (fsLit "sels") (repr_sels_ty ss)-                ptys            <- mapM mkPDatasType (repr_con_tys ss)-                vars            <- newLocalVars (fsLit "xs") ptys-                (res', args)    <- fold from_con res_ty res (map Var vars) (repr_cons ss)-                let scrut       =  unwrapFamInstScrut psums_tc (repr_con_tys ss) expr-                let body        =  mkWildCase scrut (exprType scrut) res_ty-                                    [(DataAlt psums_con, sel : vars, res')]-                return (body, Var sel : args)--    from_prod res_ty res expr ss-     = case ss of-        EmptyProd   -> return (res, [])-        UnaryProd r -> from_comp res_ty res expr r-        Prod {}-         -> do  let ptups_tc    =  repr_ptups_tc ss-                let [ptups_con] =  tyConDataCons ptups_tc-                ptys            <- mapM mkPDatasType (repr_comp_tys ss)-                vars            <- newLocalVars (fsLit "ys") ptys-                (res', args)    <- fold from_comp res_ty res (map Var vars) (repr_comps ss)-                let scrut       =  unwrapFamInstScrut ptups_tc (repr_comp_tys ss) expr-                let body        =  mkWildCase scrut (exprType scrut) res_ty-                                    [(DataAlt ptups_con, vars, res')]-                return (body, args)--    from_con res_ty res expr (ConRepr _ r)-        = from_prod res_ty res expr r--    from_comp _ res expr (Keep _ _) = return (res, [expr])-    from_comp _ res expr (Wrap ty)  = do { expr' <- unwrapNewTypeBodyOfPDatasWrap expr ty-                                         ; return (res, [expr'])-                                         }--    fold f res_ty res exprs rs-      = foldrM f' (res, []) (zip exprs rs)-      where-        f' (expr, r) (res, args)-         = do (res', args') <- f res_ty res expr r-              return (res', args' ++ args)----- Notes -----------------------------------------------------------------------{--Note [Empty PDatas]-~~~~~~~~~~~~~~~~~~~-We don't support "empty" data types like the following:--  data Empty0-  data Empty1 = MkEmpty1-  data Empty2 = MkEmpty2 Empty0-  ...--There is no parallel data associcated with these types, so there is no where-to store the length of the PDatas array with our standard representation.--Enumerations like the following are ok:-  data Bool = True | False--The native and generic representations are:-  type instance (PDatas Bool)        = VPDs:Bool Sels2-  type instance (PDatas (Repr Bool)) = PSum2s Sels2 (PDatas Void) (PDatas Void)--To take the length of a (PDatas Bool) we take the length of the contained Sels2.-When converting a (PDatas Bool) to a (PDatas (Repr Bool)) we use this length to-initialise the two (PDatas Void) arrays.--However, with this:-  data Empty1 = MkEmpty1--The native and generic representations would be:-  type instance (PDatas Empty1)        = VPDs:Empty1-  type instance (PDatas (Repr Empty1)) = PVoids Int--The 'Int' argument of PVoids is supposed to store the length of the PDatas-array. When converting the (PDatas Empty1) to a (PDatas (Repr Empty1)) we-need to come up with a value for it, but there isn't one.--To fix this we'd need to add an Int field to VPDs:Empty1 as well, but that's-too much hassle and there's no point running a parallel computation on no-data anyway.--}-errorEmptyPDatas :: DynFlags -> Type -> a-errorEmptyPDatas dflags tc-    = cantVectorise dflags "Vectorise.PAMethods"-    $ vcat  [ text "Cannot vectorise data type with no parallel data " <> quotes (ppr tc)-            , text "Data types to be vectorised must contain at least one constructor"-            , text "with at least one field." ]
− vectorise/Vectorise/Generic/PData.hs
@@ -1,174 +0,0 @@---- | Build instance tycons for the PData and PDatas type families.------   TODO: the PData and PDatas cases are very similar.---   We should be able to factor out the common parts.-module Vectorise.Generic.PData-  ( buildPDataTyCon-  , buildPDatasTyCon )-where--import GhcPrelude--import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Generic.Description-import Vectorise.Utils-import Vectorise.Env( GlobalEnv( global_fam_inst_env ) )--import BasicTypes ( SourceText(..) )-import BuildTyCl-import DataCon-import TyCon-import Type-import FamInst-import FamInstEnv-import TcMType-import Name-import Util-import MonadUtils-import Control.Monad----- buildPDataTyCon --------------------------------------------------------------- | Build the PData instance tycon for a given type constructor.-buildPDataTyCon :: TyCon -> TyCon -> SumRepr -> VM FamInst-buildPDataTyCon orig_tc vect_tc repr- = fixV $ \fam_inst ->-   do let repr_tc = dataFamInstRepTyCon fam_inst-      name' <- mkLocalisedName mkPDataTyConOcc orig_name-      rhs   <- buildPDataTyConRhs orig_name vect_tc repr_tc repr-      pdata <- builtin pdataTyCon-      buildDataFamInst name' pdata vect_tc rhs- where-    orig_name = tyConName orig_tc--buildDataFamInst :: Name -> TyCon -> TyCon -> AlgTyConRhs -> VM FamInst-buildDataFamInst name' fam_tc vect_tc rhs- = do { axiom_name <- mkDerivedName mkInstTyCoOcc name'--      ; (_, tyvars') <- liftDs $ freshenTyVarBndrs tyvars-      ; let ax       = mkSingleCoAxiom Representational axiom_name tyvars' [] fam_tc pat_tys rep_ty-            tys'     = mkTyVarTys tyvars'-            rep_ty   = mkTyConApp rep_tc tys'-            pat_tys  = [mkTyConApp vect_tc tys']-            rep_tc   = mkAlgTyCon name'-                           (mkTyConBindersPreferAnon tyvars' liftedTypeKind)-                           liftedTypeKind-                           (map (const Nominal) tyvars')-                           Nothing-                           []          -- no stupid theta-                           rhs-                           (DataFamInstTyCon ax fam_tc pat_tys)-                           False       -- not GADT syntax-      ; liftDs $ newFamInst (DataFamilyInst rep_tc) ax }- where-    tyvars    = tyConTyVars vect_tc--buildPDataTyConRhs :: Name -> TyCon -> TyCon -> SumRepr -> VM AlgTyConRhs-buildPDataTyConRhs orig_name vect_tc repr_tc repr- = do data_con <- buildPDataDataCon orig_name vect_tc repr_tc repr-      return $ DataTyCon { data_cons = [data_con], is_enum = False }---buildPDataDataCon :: Name -> TyCon -> TyCon -> SumRepr -> VM DataCon-buildPDataDataCon orig_name vect_tc repr_tc repr- = do let tvs   = tyConTyVars vect_tc-      dc_name   <- mkLocalisedName mkPDataDataConOcc orig_name-      comp_tys  <- mkSumTys repr_sel_ty mkPDataType repr-      fam_envs  <- readGEnv global_fam_inst_env-      rep_nm    <- liftDs $ newTyConRepName dc_name-      let univ_tvbs = mkTyVarBinders Specified tvs-      liftDs $ buildDataCon fam_envs dc_name-                            False                  -- not infix-                            rep_nm-                            (map (const no_bang) comp_tys)-                            (Just $ map (const HsLazy) comp_tys)-                            []                     -- no field labels-                            tvs-                            []                     -- no existentials-                            univ_tvbs-                            []                     -- no eq spec-                            []                     -- no context-                            comp_tys-                            (mkFamilyTyConApp repr_tc (mkTyVarTys tvs))-                            repr_tc-  where-    no_bang = HsSrcBang NoSourceText NoSrcUnpack NoSrcStrict----- buildPDatasTyCon -------------------------------------------------------------- | Build the PDatas instance tycon for a given type constructor.-buildPDatasTyCon :: TyCon -> TyCon -> SumRepr -> VM FamInst-buildPDatasTyCon orig_tc vect_tc repr- = fixV $ \fam_inst ->-   do let repr_tc = dataFamInstRepTyCon fam_inst-      name'       <- mkLocalisedName mkPDatasTyConOcc orig_name-      rhs         <- buildPDatasTyConRhs orig_name vect_tc repr_tc repr-      pdatas     <- builtin pdatasTyCon-      buildDataFamInst name' pdatas vect_tc rhs- where-    orig_name = tyConName orig_tc--buildPDatasTyConRhs :: Name -> TyCon -> TyCon -> SumRepr -> VM AlgTyConRhs-buildPDatasTyConRhs orig_name vect_tc repr_tc repr- = do data_con <- buildPDatasDataCon orig_name vect_tc repr_tc repr-      return $ DataTyCon { data_cons = [data_con], is_enum = False }---buildPDatasDataCon :: Name -> TyCon -> TyCon -> SumRepr -> VM DataCon-buildPDatasDataCon orig_name vect_tc repr_tc repr- = do let tvs   = tyConTyVars vect_tc-      dc_name        <- mkLocalisedName mkPDatasDataConOcc orig_name--      comp_tys  <- mkSumTys repr_sels_ty mkPDatasType repr-      fam_envs <- readGEnv global_fam_inst_env-      rep_nm   <- liftDs $ newTyConRepName dc_name-      let univ_tvbs = mkTyVarBinders Specified tvs-      liftDs $ buildDataCon fam_envs dc_name-                            False                  -- not infix-                            rep_nm-                            (map (const no_bang) comp_tys)-                            (Just $ map (const HsLazy) comp_tys)-                            []                     -- no field labels-                            tvs-                            []                     -- no existentials-                            univ_tvbs-                            []                     -- no eq spec-                            []                     -- no context-                            comp_tys-                            (mkFamilyTyConApp repr_tc (mkTyVarTys tvs))-                            repr_tc-  where-     no_bang = HsSrcBang NoSourceText NoSrcUnpack NoSrcStrict----- Utils ------------------------------------------------------------------------- | Flatten a SumRepr into a list of data constructor types.-mkSumTys-        :: (SumRepr -> Type)-        -> (Type -> VM Type)-        -> SumRepr-        -> VM [Type]--mkSumTys repr_selX_ty mkTc repr- = sum_tys repr- where-    sum_tys EmptySum      = return []-    sum_tys (UnarySum r)  = con_tys r-    sum_tys d@(Sum { repr_cons   = cons })-      = liftM (repr_selX_ty d :) (concatMapM con_tys cons)--    con_tys (ConRepr _ r)  = prod_tys r--    prod_tys EmptyProd     = return []-    prod_tys (UnaryProd r) = liftM singleton (comp_ty r)-    prod_tys (Prod { repr_comps = comps }) = mapM comp_ty comps--    comp_ty r = mkTc (compOrigType r)--{--mk_fam_inst :: TyCon -> TyCon -> (TyCon, [Type])-mk_fam_inst fam_tc arg_tc-  = (fam_tc, [mkTyConApp arg_tc . mkTyVarTys $ tyConTyVars arg_tc])--}
− vectorise/Vectorise/Monad.hs
@@ -1,196 +0,0 @@-module Vectorise.Monad (-  module Vectorise.Monad.Base,-  module Vectorise.Monad.Naming,-  module Vectorise.Monad.Local,-  module Vectorise.Monad.Global,-  module Vectorise.Monad.InstEnv,-  initV,--  -- * Builtins-  liftBuiltinDs,-  builtin,-  builtins,--  -- * Variables-  lookupVar,-  lookupVar_maybe,-  addGlobalParallelVar,-  addGlobalParallelTyCon,-) where--import GhcPrelude--import Vectorise.Monad.Base-import Vectorise.Monad.Naming-import Vectorise.Monad.Local-import Vectorise.Monad.Global-import Vectorise.Monad.InstEnv-import Vectorise.Builtins-import Vectorise.Env--import CoreSyn-import TcRnMonad-import DsMonad-import HscTypes hiding ( MonadThings(..) )-import DynFlags-import InstEnv-import Class-import TyCon-import NameSet-import VarSet-import VarEnv-import Var-import Id-import Name-import ErrUtils-import Outputable-import Module--import Control.Monad (join)---- |Run a vectorisation computation.----initV :: HscEnv-      -> ModGuts-      -> VectInfo-      -> VM a-      -> IO (Maybe (VectInfo, a))-initV hsc_env guts info thing_inside-  = do { dumpIfVtTrace "Incoming VectInfo" (ppr info)--       ; (_, res) <- initDsWithModGuts hsc_env guts go-       ; case join res of-           Nothing-             -> dumpIfVtTrace "Vectorisation FAILED!" empty-           Just (info', _)-             -> dumpIfVtTrace "Outgoing VectInfo" (ppr info')--       ; return $ join res-       }-  where-    dflags = hsc_dflags hsc_env--    dumpIfVtTrace = dumpIfSet_dyn dflags Opt_D_dump_vt_trace--    bindsToIds (NonRec v _)   = [v]-    bindsToIds (Rec    binds) = map fst binds--    ids = concatMap bindsToIds (mg_binds guts)--    go-      = do {   -- set up tables of builtin entities-           ; builtins        <- initBuiltins-           ; builtin_vars    <- initBuiltinVars builtins--               -- set up class and type family envrionments-           ; eps <- liftIO $ hscEPS hsc_env-           ; let famInstEnvs = (eps_fam_inst_env eps, mg_fam_inst_env guts)-                 instEnvs    = InstEnvs (eps_inst_env     eps)-                                        (mg_inst_env     guts)-                                        (mkModuleSet (dep_orphs (mg_deps guts)))-                 builtin_pas = initClassDicts instEnvs (paClass builtins)  -- grab all 'PA' and..-                 builtin_prs = initClassDicts instEnvs (prClass builtins)  -- ..'PR' class instances--               -- construct the initial global environment-           ; let genv = extendImportedVarsEnv builtin_vars-                        . setPAFunsEnv        builtin_pas-                        . setPRFunsEnv        builtin_prs-                        $ initGlobalEnv (gopt Opt_VectorisationAvoidance dflags)-                                        info (mg_vect_decls guts) instEnvs famInstEnvs--               -- perform vectorisation-           ; r <- runVM thing_inside builtins genv emptyLocalEnv-           ; case r of-               Yes genv _ x -> return $ Just (new_info genv, x)-               No reason    -> do { unqual <- mkPrintUnqualifiedDs-                                  ; liftIO $-                                      printOutputForUser dflags unqual $-                                        mkDumpDoc "Warning: vectorisation failure:" reason-                                  ; return Nothing-                                  }-           }--    new_info genv = modVectInfo genv ids (mg_tcs guts) (mg_vect_decls guts) info--    -- For a given DPH class, produce a mapping from type constructor (in head position) to the-    -- instance dfun for that type constructor and class.  (DPH class instances cannot overlap in-    -- head constructors.)-    ---    initClassDicts :: InstEnvs -> Class -> [(Name, Var)]-    initClassDicts insts cls = map find $ classInstances insts cls-      where-        find i | [Just tc] <- instanceRoughTcs i = (tc, instanceDFunId i)-               | otherwise                       = pprPanic invalidInstance (ppr i)--    invalidInstance = "Invalid DPH instance (overlapping in head constructor)"---- Builtins ----------------------------------------------------------------------- |Lift a desugaring computation using the `Builtins` into the vectorisation monad.----liftBuiltinDs :: (Builtins -> DsM a) -> VM a-liftBuiltinDs p = VM $ \bi genv lenv -> do { x <- p bi; return (Yes genv lenv x)}---- |Project something from the set of builtins.----builtin :: (Builtins -> a) -> VM a-builtin f = VM $ \bi genv lenv -> return (Yes genv lenv (f bi))---- |Lift a function using the `Builtins` into the vectorisation monad.----builtins :: (a -> Builtins -> b) -> VM (a -> b)-builtins f = VM $ \bi genv lenv -> return (Yes genv lenv (`f` bi))----- Var ---------------------------------------------------------------------------- |Lookup the vectorised, and if local, also the lifted version of a variable.------ * If it's in the global environment we get the vectorised version.--- * If it's in the local environment we get both the vectorised and lifted version.----lookupVar :: Var -> VM (Scope Var (Var, Var))-lookupVar v-  = do { mb_res <- lookupVar_maybe v-       ; case mb_res of-           Just x  -> return x-           Nothing ->-               do dflags <- getDynFlags-                  dumpVar dflags v-       }--lookupVar_maybe :: Var -> VM (Maybe (Scope Var (Var, Var)))-lookupVar_maybe v- = do { r <- readLEnv $ \env -> lookupVarEnv (local_vars env) v-      ; case r of-          Just e  -> return $ Just (Local e)-          Nothing -> fmap Global <$> (readGEnv $ \env -> lookupVarEnv (global_vars env) v)-      }--dumpVar :: DynFlags -> Var -> a-dumpVar dflags var-  | Just _    <- isClassOpId_maybe var-  = cantVectorise dflags "ClassOpId not vectorised:" (ppr var)-  | otherwise-  = cantVectorise dflags "Variable not vectorised:" (ppr var)----- Global parallel entities -------------------------------------------------------- |Mark the given variable as parallel — i.e., executing the associated code might involve--- parallel array computations.----addGlobalParallelVar :: Var -> VM ()-addGlobalParallelVar var-  = do { traceVt "addGlobalParallelVar" (ppr var)-       ; updGEnv $ \env -> env{global_parallel_vars = extendDVarSet (global_parallel_vars env) var}-       }---- |Mark the given type constructor as parallel — i.e., its values might embed parallel arrays.----addGlobalParallelTyCon :: TyCon -> VM ()-addGlobalParallelTyCon tycon-  = do { traceVt "addGlobalParallelTyCon" (ppr tycon)-       ; updGEnv $ \env ->-           env{global_parallel_tycons = extendNameSet (global_parallel_tycons env) (tyConName tycon)}-       }
− vectorise/Vectorise/Monad/Base.hs
@@ -1,245 +0,0 @@--- |The Vectorisation monad.--module Vectorise.Monad.Base (-  -- * The Vectorisation Monad-  VResult(..),-  VM(..),--  -- * Lifting-  liftDs,--  -- * Error Handling-  cantVectorise,-  maybeCantVectorise,-  maybeCantVectoriseM,--  -- * Debugging-  emitVt, traceVt, dumpOptVt, dumpVt,--  -- * Control-  noV, traceNoV,-  ensureV, traceEnsureV,-  onlyIfV,-  tryV, tryErrV,-  maybeV,  traceMaybeV,-  orElseV, orElseErrV,-  fixV,-) where--import GhcPrelude--import Vectorise.Builtins-import Vectorise.Env--import DsMonad-import TcRnMonad-import ErrUtils-import Outputable-import DynFlags--import Control.Monad----- The Vectorisation Monad -------------------------------------------------------- |Vectorisation can either succeed with new envionment and a value, or return with failure--- (including a description of the reason for failure).----data VResult a-  = Yes GlobalEnv LocalEnv a-  | No  SDoc--newtype VM a-  = VM { runVM :: Builtins -> GlobalEnv -> LocalEnv -> DsM (VResult a) }--instance Monad VM where-  VM p >>= f = VM $ \bi genv lenv -> do-                                       r <- p bi genv lenv-                                       case r of-                                         Yes genv' lenv' x -> runVM (f x) bi genv' lenv'-                                         No reason         -> return $ No reason--instance Applicative VM where-  pure x = VM $ \_ genv lenv -> return (Yes genv lenv x)-  (<*>) = ap--instance Functor VM where-  fmap = liftM--instance MonadIO VM where-  liftIO = liftDs . liftIO--instance HasDynFlags VM where-    getDynFlags = liftDs getDynFlags---- Lifting ------------------------------------------------------------------------ |Lift a desugaring computation into the vectorisation monad.----liftDs :: DsM a -> VM a-liftDs p = VM $ \_ genv lenv -> do { x <- p; return (Yes genv lenv x) }----- Error Handling ----------------------------------------------------------------- |Throw a `pgmError` saying we can't vectorise something.----cantVectorise :: DynFlags -> String -> SDoc -> a-cantVectorise dflags s d = pgmError-                  . showSDoc dflags-                  $ vcat [text "*** Vectorisation error ***",-                          nest 4 $ sep [text s, nest 4 d]]---- |Like `fromJust`, but `pgmError` on Nothing.----maybeCantVectorise :: DynFlags -> String -> SDoc -> Maybe a -> a-maybeCantVectorise dflags s d Nothing  = cantVectorise dflags s d-maybeCantVectorise _ _ _ (Just x) = x---- |Like `maybeCantVectorise` but in a `Monad`.----maybeCantVectoriseM :: (Monad m, HasDynFlags m)-                    => String -> SDoc -> m (Maybe a) -> m a-maybeCantVectoriseM s d p-  = do-      r <- p-      case r of-        Just x  -> return x-        Nothing ->-            do dflags <- getDynFlags-               cantVectorise dflags s d----- Debugging ---------------------------------------------------------------------- |Output a trace message if -ddump-vt-trace is active.----emitVt :: String -> SDoc -> VM ()-emitVt herald doc-  = liftDs $ do-      dflags <- getDynFlags-      liftIO . printOutputForUser dflags alwaysQualify $-        hang (text herald) 2 doc---- |Output a trace message if -ddump-vt-trace is active.----traceVt :: String -> SDoc -> VM ()-traceVt herald doc-  = liftDs $ traceOptIf Opt_D_dump_vt_trace $ hang (text herald) 2 doc---- |Dump the given program conditionally.----dumpOptVt :: DumpFlag -> String -> SDoc -> VM ()-dumpOptVt flag header doc-  = do { b <- liftDs $ doptM flag-       ; if b-         then dumpVt header doc-         else return ()-       }---- |Dump the given program unconditionally.----dumpVt :: String -> SDoc -> VM ()-dumpVt header doc-  = do { unqual <- liftDs mkPrintUnqualifiedDs-       ; dflags <- liftDs getDynFlags-       ; liftIO $ printOutputForUser dflags unqual (mkDumpDoc header doc)-       }----- Control ------------------------------------------------------------------------ |Return some result saying we've failed.----noV :: SDoc -> VM a-noV reason = VM $ \_ _ _ -> return $ No reason---- |Like `traceNoV` but also emit some trace message to stderr.----traceNoV :: String -> SDoc -> VM a-traceNoV s d = pprTrace s d $ noV d---- |If `True` then carry on, otherwise fail.----ensureV :: SDoc -> Bool -> VM ()-ensureV reason  False = noV reason-ensureV _reason True  = return ()---- |Like `ensureV` but if we fail then emit some trace message to stderr.----traceEnsureV :: String -> SDoc -> Bool -> VM ()-traceEnsureV s d False = traceNoV s d-traceEnsureV _ _ True  = return ()---- |If `True` then return the first argument, otherwise fail.----onlyIfV :: SDoc -> Bool -> VM a -> VM a-onlyIfV reason b p = ensureV reason b >> p---- |Try some vectorisation computaton.------ If it succeeds then return `Just` the result; otherwise, return `Nothing` after emitting a--- failure message.----tryErrV :: VM a -> VM (Maybe a)-tryErrV (VM p) = VM $ \bi genv lenv ->-  do-    r <- p bi genv lenv-    case r of-      Yes genv' lenv' x -> return (Yes genv' lenv' (Just x))-      No reason         -> do { unqual <- mkPrintUnqualifiedDs-                              ; dflags <- getDynFlags-                              ; liftIO $-                                  printInfoForUser dflags unqual $-                                    text "Warning: vectorisation failure:" <+> reason-                              ; return (Yes genv  lenv  Nothing)-                              }---- |Try some vectorisation computaton.------ If it succeeds then return `Just` the result; otherwise, return `Nothing` without emitting a--- failure message.----tryV :: VM a -> VM (Maybe a)-tryV (VM p) = VM $ \bi genv lenv ->-  do-    r <- p bi genv lenv-    case r of-      Yes genv' lenv' x -> return (Yes genv' lenv' (Just x))-      No _reason        -> return (Yes genv  lenv  Nothing)---- |If `Just` then return the value, otherwise fail.----maybeV :: SDoc -> VM (Maybe a) -> VM a-maybeV reason p = maybe (noV reason) return =<< p---- |Like `maybeV` but emit a message to stderr if we fail.----traceMaybeV :: String -> SDoc -> VM (Maybe a) -> VM a-traceMaybeV s d p = maybe (traceNoV s d) return =<< p---- |Try the first computation,------   * if it succeeds then take the returned value,---   * if it fails then run the second computation instead while emitting a failure message.----orElseErrV :: VM a -> VM a -> VM a-orElseErrV p q = maybe q return =<< tryErrV p---- |Try the first computation,------   * if it succeeds then take the returned value,---   * if it fails then run the second computation instead without emitting a failure message.----orElseV :: VM a -> VM a -> VM a-orElseV p q = maybe q return =<< tryV p---- |Fixpoint in the vectorisation monad.----fixV :: (a -> VM a) -> VM a-fixV f = VM (\bi genv lenv -> fixDs $ \r -> runVM (f (unYes r)) bi genv lenv )-  where-    -- NOTE: It is essential that we are lazy in r above so do not replace-    --       calls to this function by an explicit case.-    unYes (Yes _ _ x) = x-    unYes (No reason) = pprPanic "Vectorise.Monad.Base.fixV: no result" reason
− vectorise/Vectorise/Monad/Global.hs
@@ -1,239 +0,0 @@--- Operations on the global state of the vectorisation monad.--module Vectorise.Monad.Global (-  readGEnv,-  setGEnv,-  updGEnv,--  -- * Configuration-  isVectAvoidanceAggressive,--  -- * Vars-  defGlobalVar, undefGlobalVar,--  -- * Vectorisation declarations-  lookupVectDecl,--  -- * Scalars-  globalParallelVars, globalParallelTyCons,--  -- * TyCons-  lookupTyCon,-  defTyConName, defTyCon, globalVectTyCons,--  -- * Datacons-  lookupDataCon,-  defDataCon,--  -- * PA Dictionaries-  lookupTyConPA,-  defTyConPAs,--  -- * PR Dictionaries-  lookupTyConPR-) where--import GhcPrelude--import Vectorise.Monad.Base-import Vectorise.Env--import CoreSyn-import Type-import TyCon-import DataCon-import DynFlags-import NameEnv-import NameSet-import Name-import VarEnv-import VarSet-import Var as Var-import Outputable----- Global Environment ------------------------------------------------------------- |Project something from the global environment.----readGEnv :: (GlobalEnv -> a) -> VM a-readGEnv f  = VM $ \_ genv lenv -> return (Yes genv lenv (f genv))---- |Set the value of the global environment.----setGEnv :: GlobalEnv -> VM ()-setGEnv genv  = VM $ \_ _ lenv -> return (Yes genv lenv ())---- |Update the global environment using the provided function.----updGEnv :: (GlobalEnv -> GlobalEnv) -> VM ()-updGEnv f = VM $ \_ genv lenv -> return (Yes (f genv) lenv ())----- Configuration ------------------------------------------------------------------ |Should we avoid as much vectorisation as possible?------ Set by '-f[no]-vectorisation-avoidance'----isVectAvoidanceAggressive :: VM Bool-isVectAvoidanceAggressive = readGEnv global_vect_avoid----- Vars --------------------------------------------------------------------------- |Add a mapping between a global var and its vectorised version to the state.----defGlobalVar :: Var -> Var -> VM ()-defGlobalVar v v'-  = do { traceVt "add global var mapping:" (ppr v <+> text "-->" <+> ppr v')--           -- check for duplicate vectorisation-       ; currentDef <- readGEnv $ \env -> lookupVarEnv (global_vars env) v-       ; case currentDef of-           Just old_v' ->-               do dflags <- getDynFlags-                  cantVectorise dflags "Variable is already vectorised:" $-                            ppr v <+> moduleOf v old_v'-           Nothing     -> return ()--       ; updGEnv  $ \env -> env { global_vars = extendVarEnv (global_vars env) v v' }-       }-  where-    moduleOf var var' | var == var'-                      = text "vectorises to itself"-                      | Just mod <- nameModule_maybe (Var.varName var')-                      = text "in module" <+> ppr mod-                      | otherwise-                      = text "in the current module"---- |Remove the mapping of a variable in the vectorisation map.----undefGlobalVar :: Var -> VM ()-undefGlobalVar v-  = do-    { traceVt "REMOVING global var mapping:" (ppr v)-    ; updGEnv  $ \env -> env { global_vars = delVarEnv (global_vars env) v }-    }----- Vectorisation declarations ----------------------------------------------------- |Check whether a variable has a vectorisation declaration.------ The first component of the result indicates whether the variable has a 'NOVECTORISE' declaration.--- The second component contains the given type and expression in case of a 'VECTORISE' declaration.----lookupVectDecl :: Var -> VM (Bool, Maybe (Type, CoreExpr))-lookupVectDecl var-  = readGEnv $ \env ->-      case lookupVarEnv (global_vect_decls env) var of-        Nothing -> (False, Nothing)-        Just Nothing  -> (True, Nothing)-        Just vectDecl -> (False, vectDecl)----- Parallel entities --------------------------------------------------------------- |Get the set of global parallel variables.----globalParallelVars :: VM DVarSet-globalParallelVars = readGEnv global_parallel_vars---- |Get the set of all parallel type constructors (those that may embed parallelism) including both--- both those parallel type constructors declared in an imported module and those declared in the--- current module.----globalParallelTyCons :: VM NameSet-globalParallelTyCons = readGEnv global_parallel_tycons----- TyCons ------------------------------------------------------------------------- |Determine the vectorised version of a `TyCon`. The vectorisation map in the global environment--- contains a vectorised version if the original `TyCon` embeds any parallel arrays.----lookupTyCon :: TyCon -> VM (Maybe TyCon)-lookupTyCon tc-  = readGEnv $ \env -> lookupNameEnv (global_tycons env) (tyConName tc)---- |Add a mapping between plain and vectorised `TyCon`s to the global environment.------ The second argument is only to enable tracing for (mutually) recursively defined type--- constructors, where we /must not/ pull at the vectorised type constructors (because that would--- pull too early at the recursive knot).----defTyConName :: TyCon -> Name -> TyCon -> VM ()-defTyConName tc nameOfTc' tc'-  = do { traceVt "add global tycon mapping:" (ppr tc <+> text "-->" <+> ppr nameOfTc')--           -- check for duplicate vectorisation-       ; currentDef <- readGEnv $ \env -> lookupNameEnv (global_tycons env) (tyConName tc)-       ; case currentDef of-           Just old_tc' ->-               do dflags <- getDynFlags-                  cantVectorise dflags "Type constructor or class is already vectorised:" $-                            ppr tc <+> moduleOf tc old_tc'-           Nothing     -> return ()--       ; updGEnv $ \env ->-           env { global_tycons = extendNameEnv (global_tycons env) (tyConName tc) tc' }-       }-  where-    moduleOf tc tc' | tc == tc'-                    = text "vectorises to itself"-                    | Just mod <- nameModule_maybe (tyConName tc')-                    = text "in module" <+> ppr mod-                    | otherwise-                    = text "in the current module"---- |Add a mapping between plain and vectorised `TyCon`s to the global environment.----defTyCon :: TyCon -> TyCon -> VM ()-defTyCon tc tc' = defTyConName tc (tyConName tc') tc'---- |Get the set of all vectorised type constructors.----globalVectTyCons :: VM (NameEnv TyCon)-globalVectTyCons = readGEnv global_tycons----- DataCons ----------------------------------------------------------------------- |Lookup the vectorised version of a `DataCon` from the global environment.----lookupDataCon :: DataCon -> VM (Maybe DataCon)-lookupDataCon dc-  | isTupleTyCon (dataConTyCon dc)-  = return (Just dc)-  | otherwise-  = readGEnv $ \env -> lookupNameEnv (global_datacons env) (dataConName dc)---- |Add the mapping between plain and vectorised `DataCon`s to the global environment.----defDataCon :: DataCon -> DataCon -> VM ()-defDataCon dc dc' = updGEnv $ \env ->-  env { global_datacons = extendNameEnv (global_datacons env) (dataConName dc) dc' }----- 'PA' dictionaries ---------------------------------------------------------------- |Lookup the 'PA' dfun of a vectorised type constructor in the global environment.----lookupTyConPA :: TyCon -> VM (Maybe Var)-lookupTyConPA tc-  = readGEnv $ \env -> lookupNameEnv (global_pa_funs env) (tyConName tc)---- |Associate vectorised type constructors with the dfun of their 'PA' instances in the global--- environment.----defTyConPAs :: [(TyCon, Var)] -> VM ()-defTyConPAs ps = updGEnv $ \env ->-  env { global_pa_funs = extendNameEnvList (global_pa_funs env)-                                           [(tyConName tc, pa) | (tc, pa) <- ps] }----- PR Dictionaries --------------------------------------------------------------lookupTyConPR :: TyCon -> VM (Maybe Var)-lookupTyConPR tc = readGEnv $ \env -> lookupNameEnv (global_pr_funs env) (tyConName tc)
− vectorise/Vectorise/Monad/InstEnv.hs
@@ -1,82 +0,0 @@-{-# LANGUAGE CPP #-}--module Vectorise.Monad.InstEnv-  ( existsInst-  , lookupInst-  , lookupFamInst-  )-where--import GhcPrelude--import Vectorise.Monad.Global-import Vectorise.Monad.Base-import Vectorise.Env--import DynFlags-import FamInstEnv-import InstEnv-import Class-import Type-import TyCon-import Outputable-import Util---#include "HsVersions.h"----- Check whether a unique class instance for a given class and type arguments exists.----existsInst :: Class -> [Type] -> VM Bool-existsInst cls tys-  = do { instEnv <- readGEnv global_inst_env-       ; return $ either (const False) (const True) (lookupUniqueInstEnv instEnv cls tys)-       }---- Look up the dfun of a class instance.------ The match must be unique —i.e., match exactly one instance— but the--- type arguments used for matching may be more specific than those of--- the class instance declaration.  The found class instances must not have--- any type variables in the instance context that do not appear in the--- instances head (i.e., no flexi vars); for details for what this means,--- see the docs at InstEnv.lookupInstEnv.----lookupInst :: Class -> [Type] -> VM (DFunId, [Type])-lookupInst cls tys-  = do { instEnv <- readGEnv global_inst_env-       ; case lookupUniqueInstEnv instEnv cls tys of-           Right (inst, inst_tys) -> return (instanceDFunId inst, inst_tys)-           Left  err              ->-               do dflags <- getDynFlags-                  cantVectorise dflags "Vectorise.Monad.InstEnv.lookupInst:" err-       }---- Look up a family instance.------ The match must be unique - ie, match exactly one instance - but the--- type arguments used for matching may be more specific than those of--- the family instance declaration.------ Return the family instance and its type instance.  For example, if we have------  lookupFamInst 'T' '[Int]' yields (':R42T', 'Int')------ then we have a coercion (ie, type instance of family instance coercion)------  :Co:R42T Int :: T [Int] ~ :R42T Int------ which implies that :R42T was declared as 'data instance T [a]'.----lookupFamInst :: TyCon -> [Type] -> VM FamInstMatch-lookupFamInst tycon tys-  = ASSERT( isOpenFamilyTyCon tycon )-    do { instEnv <- readGEnv global_fam_inst_env-       ; case lookupFamInstEnv instEnv tycon tys of-           [match] -> return match-           _other                ->-             do dflags <- getDynFlags-                cantVectorise dflags "Vectorise.Monad.InstEnv.lookupFamInst: not found: "-                           (ppr $ mkTyConApp tycon tys)-       }
− vectorise/Vectorise/Monad/Local.hs
@@ -1,102 +0,0 @@-module Vectorise.Monad.Local-  ( readLEnv-  , setLEnv-  , updLEnv-  , localV-  , closedV-  , getBindName-  , inBind-  , lookupTyVarPA-  , defLocalTyVar-  , defLocalTyVarWithPA-  , localTyVars-  )-where--import GhcPrelude--import Vectorise.Monad.Base-import Vectorise.Env--import CoreSyn-import Name-import VarEnv-import Var-import FastString---- Local Environment -------------------------------------------------------------- |Project something from the local environment.----readLEnv :: (LocalEnv -> a) -> VM a-readLEnv f  = VM $ \_ genv lenv -> return (Yes genv lenv (f lenv))---- |Set the local environment.----setLEnv :: LocalEnv -> VM ()-setLEnv lenv  = VM $ \_ genv _ -> return (Yes genv lenv ())---- |Update the environment using the provided function.----updLEnv :: (LocalEnv -> LocalEnv) -> VM ()-updLEnv f  = VM $ \_ genv lenv -> return (Yes genv (f lenv) ())---- |Perform a computation in its own local environment.--- This does not alter the environment of the current state.----localV :: VM a -> VM a-localV p-  = do-    { env <- readLEnv id-    ; x   <- p-    ; setLEnv env-    ; return x-    }---- |Perform a computation in an empty local environment.----closedV :: VM a -> VM a-closedV p-  = do-    { env <- readLEnv id-    ; setLEnv (emptyLocalEnv { local_bind_name = local_bind_name env })-    ; x   <- p-    ; setLEnv env-    ; return x-    }---- |Get the name of the local binding currently being vectorised.----getBindName :: VM FastString-getBindName = readLEnv local_bind_name---- |Run a vectorisation computation in a local environment,--- with this id set as the current binding.----inBind :: Id -> VM a -> VM a-inBind id p-  = do updLEnv $ \env -> env { local_bind_name = occNameFS (getOccName id) }-       p---- |Lookup a PA tyvars from the local environment.-lookupTyVarPA :: Var -> VM (Maybe CoreExpr)-lookupTyVarPA tv-   = readLEnv $ \env -> lookupVarEnv (local_tyvar_pa env) tv---- |Add a tyvar to the local environment.-defLocalTyVar :: TyVar -> VM ()-defLocalTyVar tv = updLEnv $ \env ->-  env { local_tyvars   = tv : local_tyvars env-      , local_tyvar_pa = local_tyvar_pa env `delVarEnv` tv-      }---- |Add mapping between a tyvar and pa dictionary to the local environment.-defLocalTyVarWithPA :: TyVar -> CoreExpr -> VM ()-defLocalTyVarWithPA tv pa = updLEnv $ \env ->-  env { local_tyvars   = tv : local_tyvars env-      , local_tyvar_pa = extendVarEnv (local_tyvar_pa env) tv pa-      }---- |Get the set of tyvars from the local environment.-localTyVars :: VM [TyVar]-localTyVars = readLEnv (reverse . local_tyvars)
− vectorise/Vectorise/Monad/Naming.hs
@@ -1,132 +0,0 @@--- |Computations in the vectorisation monad concerned with naming and fresh variable generation.--module Vectorise.Monad.Naming-  ( mkLocalisedName-  , mkDerivedName-  , mkVectId-  , cloneVar-  , newExportedVar-  , newLocalVar-  , newLocalVars-  , newDummyVar-  , newTyVar-  , newCoVar-  )-where--import GhcPrelude--import Vectorise.Monad.Base--import DsMonad-import TcType-import Type-import Var-import Module-import Name-import SrcLoc-import MkId-import Id-import IdInfo( IdDetails(VanillaId) )-import FastString--import Control.Monad----- Naming ------------------------------------------------------------------------- |Create a localised variant of a name, using the provided function to transform its `OccName`.------ If the name external, encode the original name's module into the new 'OccName'.  The result is--- always an internal system name.----mkLocalisedName :: (Maybe String -> OccName -> OccName) -> Name -> VM Name-mkLocalisedName mk_occ name-  = do { mod <- liftDs getModule-       ; u   <- liftDs newUnique-       ; let occ_name = mkLocalisedOccName mod mk_occ name--             new_name | isExternalName name = mkExternalName u mod occ_name (nameSrcSpan name)-                      | otherwise           = mkSystemName   u     occ_name--       ; return new_name }--mkDerivedName :: (OccName -> OccName) -> Name -> VM Name--- Similar to mkLocalisedName, but assumes the--- incoming name is from this module.--- Works on External names only-mkDerivedName mk_occ name-  = do { u   <- liftDs newUnique-       ; return (mkExternalName u (nameModule name)-                                  (mk_occ (nameOccName name))-                                  (nameSrcSpan name)) }---- |Produce the vectorised variant of an `Id` with the given vectorised type, while taking care that--- vectorised dfun ids must be dfuns again.------ Force the new name to be a system name and, if the original was an external name, disambiguate--- the new name with the module name of the original.----mkVectId :: Id -> Type -> VM Id-mkVectId id ty-  = do { name <- mkLocalisedName mkVectOcc (getName id)-       ; let id' | isDFunId id     = MkId.mkDictFunId name tvs theta cls tys-                 | isExportedId id = Id.mkExportedLocalId VanillaId name ty-                 | otherwise       = Id.mkLocalIdOrCoVar name ty-       ; return id'-       }-  where-    -- Decompose a dictionary function signature: \forall tvs. theta -> cls tys-    -- NB: We do *not* use closures '(:->)' for vectorised predicate abstraction as dictionary-    --     functions are always fully applied.-    (tvs, theta, pty) = tcSplitSigmaTy  ty-    (cls, tys)        = tcSplitDFunHead pty---- |Make a fresh instance of this var, with a new unique.----cloneVar :: Var -> VM Var-cloneVar var = liftM (setIdUnique var) (liftDs newUnique)---- |Make a fresh exported variable with the given type.----newExportedVar :: OccName -> Type -> VM Var-newExportedVar occ_name ty- = do mod <- liftDs getModule-      u   <- liftDs newUnique--      let name = mkExternalName u mod occ_name noSrcSpan--      return $ Id.mkExportedLocalId VanillaId name ty---- |Make a fresh local variable with the given type.--- The variable's name is formed using the given string as the prefix.----newLocalVar :: FastString -> Type -> VM Var-newLocalVar fs ty- = do u <- liftDs newUnique-      return $ mkSysLocalOrCoVar fs u ty---- |Make several fresh local variables with the given types.--- The variable's names are formed using the given string as the prefix.----newLocalVars :: FastString -> [Type] -> VM [Var]-newLocalVars fs = mapM (newLocalVar fs)---- |Make a new local dummy variable.----newDummyVar :: Type -> VM Var-newDummyVar = newLocalVar (fsLit "vv")---- |Make a fresh type variable with the given kind.--- The variable's name is formed using the given string as the prefix.----newTyVar :: FastString -> Kind -> VM Var-newTyVar fs k- = do u <- liftDs newUnique-      return $ mkTyVar (mkSysTvName u fs) k---- |Make a fresh coercion variable with the given kind.-newCoVar :: FastString -> Kind -> VM Var-newCoVar fs k-  = do u <- liftDs newUnique-       return $ mkCoVar (mkSystemVarName u fs) k
− vectorise/Vectorise/Type/Classify.hs
@@ -1,131 +0,0 @@--- Extract from a list of type constructors those (1) which need to be vectorised and (2) those--- that could be, but need not be vectorised (as a scalar representation is sufficient and more--- efficient).  The type constructors that cannot be vectorised will be dropped.------ A type constructor will only be vectorised if it is------ (1) a data type constructor, with vanilla data constructors (i.e., data constructors admitted by---     Haskell 98) and--- (2) at least one of the type constructors that appears in its definition is also vectorised.------ If (1) is met, but not (2), the type constructor may appear in vectorised code, but there is no--- need to vectorise that type constructor itself.  This holds, for example, for all enumeration--- types.  As '([::])' is being vectorised, any type constructor whose definition involves--- '([::])', either directly or indirectly, will be vectorised.--module Vectorise.Type.Classify-  ( classifyTyCons-  )-where--import GhcPrelude--import NameSet-import UniqSet-import UniqFM-import DataCon-import TyCon-import TyCoRep-import qualified Type-import PrelNames-import Digraph---- |From a list of type constructors, extract those that can be vectorised, returning them in two--- sets, where the first result list /must be/ vectorised and the second result list /need not be/--- vectorised. The third result list are those type constructors that we cannot convert (either--- because they use language extensions or because they dependent on type constructors for which--- no vectorised version is available).------ NB: In order to be able to vectorise a type constructor, we require members of the depending set---     (i.e., those type constructors that the current one depends on) to be vectorised only if they---     are also parallel (i.e., appear in the second argument to the function).------ The first argument determines the /conversion status/ of external type constructors as follows:------ * tycons which have converted versions are mapped to 'True'--- * tycons which are not changed by vectorisation are mapped to 'False'--- * tycons which haven't been converted (because they can't or weren't vectorised) are not---   elements of the map----classifyTyCons :: UniqFM Bool                  -- ^type constructor vectorisation status-               -> NameSet                      -- ^tycons involving parallel arrays-               -> [TyCon]                      -- ^type constructors that need to be classified-               -> ( [TyCon]                    -- to be converted-                  , [TyCon]                    -- need not be converted (but could be)-                  , [TyCon]                    -- involve parallel arrays (whether converted or not)-                  , [TyCon]                    -- can't be converted-                  )-classifyTyCons convStatus parTyCons tcs = classify [] [] [] [] convStatus parTyCons (tyConGroups tcs)-  where-    classify conv keep par novect _  _   []               = (conv, keep, par, novect)-    classify conv keep par novect cs pts ((tcs, ds) : rs)-      | can_convert && must_convert-      = classify (tcs ++ conv) keep (par ++ tcs_par) novect (cs `addListToUFM` [(tc, True)  | tc <- tcs]) pts' rs-      | can_convert-      = classify conv (tcs ++ keep) (par ++ tcs_par) novect (cs `addListToUFM` [(tc, False) | tc <- tcs]) pts' rs-      | otherwise-      = classify conv keep (par ++ tcs_par) (tcs ++ novect) cs pts' rs-      where-        refs = ds `delListFromUniqSet` tcs--          -- the tycons that directly or indirectly depend on parallel arrays-        tcs_par | uniqSetAny ((`elemNameSet` parTyCons) . tyConName) refs = tcs-                | otherwise = []--        pts' = pts `extendNameSetList` map tyConName tcs_par--        can_convert  = (isEmptyUniqSet (filterUniqSet ((`elemNameSet` pts) . tyConName) (refs `uniqSetMinusUFM` cs))-                        && all convertable tcs)-                       || isShowClass tcs-        must_convert = anyUFM id (intersectUFM_C const cs (getUniqSet refs))-                       && (not . isShowClass $ tcs)--        -- We currently admit Haskell 2011-style data and newtype declarations as well as type-        -- constructors representing classes.-        convertable tc-          = (isDataTyCon tc || isNewTyCon tc) && all isVanillaDataCon (tyConDataCons tc)-            || isClassTyCon tc--        -- !!!FIXME: currently we allow 'Show' in vectorised code without actually providing a-        --   vectorised definition (to be able to vectorise 'Num')-        isShowClass [tc] = tyConName tc == showClassName-        isShowClass _    = False---- Used to group type constructors into mutually dependent groups.----type TyConGroup = ([TyCon], UniqSet TyCon)---- Compute mutually recursive groups of tycons in topological order.----tyConGroups :: [TyCon] -> [TyConGroup]-tyConGroups tcs = map mk_grp (stronglyConnCompFromEdgedVerticesUniq edges)-  where-    edges :: [ Node TyCon (TyCon, UniqSet TyCon) ]-    edges = [DigraphNode (tc, ds) tc (nonDetEltsUniqSet ds) | tc <- tcs-                                , let ds = tyConsOfTyCon tc]-            -- It's OK to use nonDetEltsUniqSet here as-            -- stronglyConnCompFromEdgedVertices is still deterministic even-            -- if the edges are in nondeterministic order as explained in-            -- Note [Deterministic SCC] in Digraph.--    mk_grp (AcyclicSCC (tc, ds)) = ([tc], ds)-    mk_grp (CyclicSCC els)       = (tcs, unionManyUniqSets dss)-      where-        (tcs, dss) = unzip els---- |Collect the set of TyCons used by the representation of some data type.----tyConsOfTyCon :: TyCon -> UniqSet TyCon-tyConsOfTyCon = tyConsOfTypes . concatMap dataConRepArgTys . tyConDataCons---- |Collect the set of TyCons that occur in these types.----tyConsOfTypes :: [Type] -> UniqSet TyCon-tyConsOfTypes = unionManyUniqSets . map tyConsOfType---- |Collect the set of TyCons that occur in this type.----tyConsOfType :: Type -> UniqSet TyCon-tyConsOfType ty = filterUniqSet not_tuple_or_unlifted $ Type.tyConsOfType ty-  where not_tuple_or_unlifted tc = not (isUnliftedTyCon tc || isTupleTyCon tc)-
− vectorise/Vectorise/Type/Env.hs
@@ -1,457 +0,0 @@-{-# LANGUAGE CPP #-}---- Vectorise a modules type and class declarations.------ This produces new type constructors and family instances top be included in the module toplevel--- as well as bindings for worker functions, dfuns, and the like.--module Vectorise.Type.Env (-  vectTypeEnv,-) where--#include "HsVersions.h"--import GhcPrelude--import Vectorise.Env-import Vectorise.Vect-import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Type.TyConDecl-import Vectorise.Type.Classify-import Vectorise.Generic.PADict-import Vectorise.Generic.PAMethods-import Vectorise.Generic.PData-import Vectorise.Generic.Description-import Vectorise.Utils--import CoreSyn-import CoreUtils-import CoreUnfold-import DataCon-import TyCon-import CoAxiom-import Type-import FamInstEnv-import Id-import MkId-import NameEnv-import NameSet-import UniqFM-import OccName-import Unique--import Util-import Outputable-import DynFlags-import FastString-import MonadUtils--import Control.Monad-import Data.Maybe-import Data.List----- Note [Pragmas to vectorise tycons]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~------ All imported type constructors that are not mapped to a vectorised type in the vectorisation map--- (possibly because the defining module was not compiled with vectorisation) may be used in scalar--- code encapsulated in vectorised code. If a such a type constructor 'T' is a member of the--- 'Scalar' class (and hence also of 'PData' and 'PRepr'), it may also be used in vectorised code,--- where 'T' represents itself, but the representation of 'T' still remains opaque in vectorised--- code (i.e., it can only be used in scalar code).------ An example is the treatment of 'Int'. 'Int's can be used in vectorised code and remain unchanged--- by vectorisation.  However, the representation of 'Int' by the 'I#' data constructor wrapping an--- 'Int#' is not exposed in vectorised code. Instead, computations involving the representation need--- to be confined to scalar code.------ VECTORISE pragmas for type constructors cover four different flavours of vectorising data type--- constructors:------ (1) Data type constructor 'T' that together with its constructors 'Cn' may be used in vectorised---     code, where 'T' and the 'Cn' are automatically vectorised in the same manner as data types---     declared in a vectorised module.  This includes the case where the vectoriser determines that---     the original representation of 'T' may be used in vectorised code (as it does not embed any---     parallel arrays.)  This case is for type constructors that are *imported* from a non----     vectorised module, but that we want to use with full vectorisation support.------     An example is the treatment of 'Ordering' and '[]'.  The former remains unchanged by---     vectorisation, whereas the latter is fully vectorised.------     'PData' and 'PRepr' instances are automatically generated by the vectoriser.------     Type constructors declared with {-# VECTORISE type T #-} are treated in this manner.------ (2) Data type constructor 'T' that may be used in vectorised code, where 'T' is represented by an---     explicitly given 'Tv', but the representation of 'T' is opaque in vectorised code (i.e., the---     constructors of 'T' may not occur in vectorised code).------     An example is the treatment of '[::]'. The type '[::]' can be used in vectorised code and is---     vectorised to 'PArray'. However, the representation of '[::]' is not exposed in vectorised---     code. Instead, computations involving the representation need to be confined to scalar code.------     'PData' and 'PRepr' instances need to be explicitly supplied for 'T' (they are not generated---     by the vectoriser).------     Type constructors declared with {-# VECTORISE type T = Tv #-} are treated in this manner---     manner. (The vectoriser never treats a type constructor automatically in this manner.)------ (3) Data type constructor 'T' that does not contain any parallel arrays and has explicitly---     provided 'PData' and 'PRepr' instances (and maybe also a 'Scalar' instance), which together---     with the type's constructors 'Cn' may be used in vectorised code. The type 'T' and its---     constructors 'Cn' are represented by themselves in vectorised code.------     An example is 'Bool', which is represented by itself in vectorised code (as it cannot embed---     any parallel arrays).  However, we do not want any automatic generation of class and family---     instances, which is why Case (1) does not apply.------     'PData' and 'PRepr' instances need to be explicitly supplied for 'T' (they are not generated---     by the vectoriser).------     Type constructors declared with {-# VECTORISE SCALAR type T #-} are treated in this manner.------ (4) Data type constructor 'T' that does not contain any parallel arrays and that, in vectorised---     code, is represented by an explicitly given 'Tv', but the representation of 'T' is opaque in---     vectorised code and 'T' is regarded to be scalar — i.e., it may be used in encapsulated---     scalar subcomputations.------     An example is the treatment of '(->)'. Types '(->)' can be used in vectorised code and are---     vectorised to '(:->)'.  However, the representation of '(->)' is not exposed in vectorised---     code. Instead, computations involving the representation need to be confined to scalar code---     and may be part of encapsulated scalar computations.------     'PData' and 'PRepr' instances need to be explicitly supplied for 'T' (they are not generated---     by the vectoriser).------     Type constructors declared with {-# VECTORISE SCALAR type T = Tv #-} are treated in this---     manner. (The vectoriser never treats a type constructor automatically in this manner.)------ In addition, we have also got a single pragma form for type classes: {-# VECTORISE class C #-}.--- It implies that the class type constructor may be used in vectorised code together with its data--- constructor.  We generally produce a vectorised version of the data type and data constructor.--- We do not generate 'PData' and 'PRepr' instances for class type constructors.  This pragma is the--- default for all type classes declared in a vectorised module, but the pragma can also be used--- explitly on imported classes.---- Note [Vectorising classes]--- ~~~~~~~~~~~~~~~~~~~~~~~~~~------ We vectorise classes essentially by just vectorising their desugared Core representation, but we--- do generate a 'Class' structure along the way (see 'Vectorise.Type.TyConDecl.vectTyConDecl').------ Here is an example illustrating the mapping — assume------   class Num a where---     (+) :: a -> a -> a------ It desugars to------   data Num a = D:Num { (+) :: a -> a -> a }------ which we vectorise to------  data V:Num a = D:V:Num { ($v+) :: PArray a :-> PArray a :-> PArray a }------ while adding the following entries to the vectorisation map:------   tycon  : Num   --> V:Num---   datacon: D:Num --> D:V:Num---   var    : (+) --> ($v+)---- |Vectorise type constructor including class type constructors.----vectTypeEnv :: [TyCon]                   -- Type constructors defined in this module-            -> [CoreVect]                -- All 'VECTORISE [SCALAR] type' declarations in this module-            -> [CoreVect]                -- All 'VECTORISE class' declarations in this module-            -> VM ( [TyCon]              -- old TyCons ++ new TyCons-                  , [FamInst]            -- New type family instances.-                  , [(Var, CoreExpr)])   -- New top level bindings.-vectTypeEnv tycons vectTypeDecls vectClassDecls-  = do { traceVt "** vectTypeEnv" $ ppr tycons--       ; let   -- {-# VECTORISE type T -#} (ONLY the imported tycons)-             impVectTyCons          = (   [tycon | VectType False tycon Nothing <- vectTypeDecls]-                                       ++ [tycon | VectClass tycon              <- vectClassDecls])-                                      \\ tycons--               -- {-# VECTORISE type T = Tv -#} (imported & local tycons with an /RHS/)-             vectTyConsWithRHS      = [ (tycon, rhs)-                                      | VectType False tycon (Just rhs) <- vectTypeDecls]--               -- {-# VECTORISE SCALAR type T = Tv -#} (imported & local tycons with an /RHS/)-             scalarTyConsWithRHS    = [ (tycon, rhs)-                                      | VectType True  tycon (Just rhs) <- vectTypeDecls]--               -- {-# VECTORISE SCALAR type T -#} (imported & local /scalar/ tycons without an RHS)-             scalarTyConsNoRHS      = [tycon | VectType True tycon Nothing <- vectTypeDecls]--               -- Check that is not a VECTORISE SCALAR tycon nor VECTORISE tycons with explicit rhs?-             vectSpecialTyConNames  = mkNameSet . map tyConName $-                                        scalarTyConsNoRHS ++-                                        map fst (vectTyConsWithRHS ++ scalarTyConsWithRHS)-             notVectSpecialTyCon tc = not $ (tyConName tc) `elemNameSet` vectSpecialTyConNames--         -- Build a map containing all vectorised type constructor. If the vectorised type-         -- constructor differs from the original one, then it is mapped to 'True'; if they are-         -- both the same, then it maps to 'False'.-       ; vectTyCons          <- globalVectTyCons-       ; let vectTyConBase    = mapUFM_Directly isDistinct vectTyCons    -- 'True' iff tc /= V[[tc]]-             isDistinct u tc  = u /= getUnique tc-             vectTyConFlavour = vectTyConBase-                                `plusNameEnv`-                                mkNameEnv [ (tyConName tycon, True)-                                          | (tycon, _) <- vectTyConsWithRHS ++ scalarTyConsWithRHS]-                                `plusNameEnv`-                                mkNameEnv [ (tyConName tycon, False)  -- original representation-                                          | tycon <- scalarTyConsNoRHS]---           -- Split the list of 'TyCons' into the ones (1) that we must vectorise and those (2)-           -- that we could, but don't need to vectorise.  Type constructors that are not data-           -- type constructors or use non-Haskell98 features are being dropped.  They may not-           -- appear in vectorised code.  (We also drop the local type constructors appearing in a-           -- VECTORISE SCALAR pragma or a VECTORISE pragma with an explicit right-hand side, as-           -- these are being handled separately.  NB: Some type constructors may be marked SCALAR-           -- /and/ have an explicit right-hand side.)-           ---           -- Furthermore, 'par_tcs' are those type constructors (converted or not) whose-           -- definition, directly or indirectly, depends on parallel arrays. Finally, 'drop_tcs'-           -- are all type constructors that cannot be vectorised.-       ; parallelTyCons <- (`extendNameSetList` map (tyConName . fst) vectTyConsWithRHS) <$>-                             globalParallelTyCons-       ; let maybeVectoriseTyCons = filter notVectSpecialTyCon tycons ++ impVectTyCons-             (conv_tcs, keep_tcs, par_tcs, drop_tcs)-               = classifyTyCons vectTyConFlavour parallelTyCons maybeVectoriseTyCons--       ; traceVt " known parallel : " $ ppr parallelTyCons-       ; traceVt " VECT SCALAR    : " $ ppr (scalarTyConsNoRHS ++ map fst scalarTyConsWithRHS)-       ; traceVt " VECT [class]   : " $ ppr impVectTyCons-       ; traceVt " VECT with rhs  : " $ ppr (map fst (vectTyConsWithRHS ++ scalarTyConsWithRHS))-       ; traceVt " -- after classification (local and VECT [class] tycons) --" Outputable.empty-       ; traceVt " reuse          : " $ ppr keep_tcs-       ; traceVt " convert        : " $ ppr conv_tcs--           -- warn the user about unvectorised type constructors-       ; let explanation    = text "(They use unsupported language extensions"-                          $$  text "or depend on type constructors that are" <+>-                              text "not vectorised)"-             drop_tcs_nosyn = filter (not . isTypeFamilyTyCon) .-                              filter (not . isTypeSynonymTyCon) $ drop_tcs-       ; unless (null drop_tcs_nosyn) $-           emitVt "Warning: cannot vectorise these type constructors:" $-             pprQuotedList drop_tcs_nosyn $$ explanation--       ; mapM_ addParallelTyConAndCons $ par_tcs ++ map fst vectTyConsWithRHS--       ; let mapping =-                    -- Type constructors that we found we don't need to vectorise and those-                    -- declared VECTORISE SCALAR /without/ an explicit right-hand side, use the same-                    -- representation in both unvectorised and vectorised code; they are not-                    -- abstract.-                  [(tycon, tycon, False) | tycon <- keep_tcs ++ scalarTyConsNoRHS]-                    -- We do the same for type constructors declared VECTORISE SCALAR /without/-                    -- an explicit right-hand side-               ++ [(tycon, vTycon, True) | (tycon, vTycon) <- vectTyConsWithRHS ++ scalarTyConsWithRHS]-       ; syn_tcs <- catMaybes <$> mapM defTyConDataCons mapping--           -- Vectorise all the data type declarations that we can and must vectorise (enter the-           -- type and data constructors into the vectorisation map on-the-fly.)-       ; new_tcs <- vectTyConDecls conv_tcs--       ; let dumpTc tc vTc = traceVt "---" (ppr tc <+> text "::" <+> ppr (dataConSig tc) $$-                                            ppr vTc <+> text "::" <+> ppr (dataConSig vTc))-             dataConSig tc | Just dc <- tyConSingleDataCon_maybe tc = dataConRepType dc-                           | otherwise                              = panic "dataConSig"-       ; zipWithM_ dumpTc (filter isClassTyCon conv_tcs) (filter isClassTyCon new_tcs)--           -- We don't need new representation types for dictionary constructors. The constructors-           -- are always fully applied, and we don't need to lift them to arrays as a dictionary-           -- of a particular type always has the same value.-       ; let orig_tcs = filter (not . isClassTyCon) $ keep_tcs ++ conv_tcs-             vect_tcs = filter (not . isClassTyCon) $ keep_tcs ++ new_tcs--           -- Build 'PRepr' and 'PData' instance type constructors and family instances for all-           -- type constructors with vectorised representations.-       ; reprs      <- mapM tyConRepr vect_tcs-       ; repr_fis   <- zipWith3M buildPReprTyCon  orig_tcs vect_tcs reprs-       ; pdata_fis  <- zipWith3M buildPDataTyCon  orig_tcs vect_tcs reprs-       ; pdatas_fis <- zipWith3M buildPDatasTyCon orig_tcs vect_tcs reprs--       ; let fam_insts  = repr_fis ++ pdata_fis ++ pdatas_fis-             repr_axs   = map famInstAxiom repr_fis-             pdata_tcs  = famInstsRepTyCons pdata_fis-             pdatas_tcs = famInstsRepTyCons pdatas_fis--       ; updGEnv $ extendFamEnv fam_insts--           -- Generate workers for the vectorised data constructors, dfuns for the 'PA' instances of-           -- the vectorised type constructors, and associate the type constructors with their dfuns-           -- in the global environment.  We get back the dfun bindings (which we will subsequently-           -- inject into the modules toplevel).-       ; (_, binds) <- fixV $ \ ~(dfuns, _) ->-           do { defTyConPAs (zipLazy vect_tcs dfuns)--                  -- Query the 'PData' instance type constructors for type constructors that have a-                  -- VECTORISE SCALAR type pragma without an explicit right-hand side (this is Item-                  --  (3) of "Note [Pragmas to vectorise tycons]" above).-              ; pdata_scalar_tcs <- mapM pdataReprTyConExact scalarTyConsNoRHS--                  -- Build workers for all vectorised data constructors (except abstract ones)-              ; sequence_ $-                  zipWith3 vectDataConWorkers (orig_tcs  ++ scalarTyConsNoRHS)-                                              (vect_tcs  ++ scalarTyConsNoRHS)-                                              (pdata_tcs ++ pdata_scalar_tcs)--                  -- Build a 'PA' dictionary for all type constructors (except abstract ones & those-                  -- defined with an explicit right-hand side where the dictionary is user-supplied)-              ; dfuns <- sequence $-                           zipWith4 buildTyConPADict-                                    vect_tcs-                                    repr_axs-                                    pdata_tcs-                                    pdatas_tcs--              ; binds <- takeHoisted-              ; return (dfuns, binds)-              }--           -- Return the vectorised variants of type constructors as well as the generated instance-           -- type constructors, family instances, and dfun bindings.-       ; return ( new_tcs ++ pdata_tcs ++ pdatas_tcs ++ syn_tcs-                , fam_insts, binds)-       }-  where-    addParallelTyConAndCons tycon-      = do-        { addGlobalParallelTyCon tycon-        ; mapM_ addGlobalParallelVar [ id | dc <- tyConDataCons tycon-                                          , AnId id <- dataConImplicitTyThings dc ]-                                          -- Ignoring the promoted tycon; hope that's ok-        }--    -- Add a mapping from the original to vectorised type constructor to the vectorisation map.-    -- Unless the type constructor is abstract, also mappings from the original's data constructors-    -- to the vectorised type's data constructors.-    ---    -- We have three cases: (1) original and vectorised type constructor are the same, (2) the-    -- name of the vectorised type constructor is canonical (as prescribed by 'mkVectTyConOcc'), or-    -- (3) the name is not canonical.  In the third case, we additionally introduce a type synonym-    -- with the canonical name that is set equal to the non-canonical name (so that we find the-    -- right type constructor when reading vectorisation information from interface files).-    ---    defTyConDataCons (origTyCon, vectTyCon, isAbstract)-      = do-        { canonName <- mkLocalisedName mkVectTyConOcc origName-        ; if    origName == vectName                             -- Case (1)-             || vectName == canonName                            -- Case (2)-          then do-          { defTyCon origTyCon vectTyCon                         -- T  --> vT-          ; defDataCons                                          -- Ci --> vCi-          ; return Nothing-          }-          else do                                                 -- Case (3)-          { let synTyCon = mkSyn canonName (mkTyConTy vectTyCon)  -- type S = vT-          ; defTyCon origTyCon synTyCon                           -- T  --> S-          ; defDataCons                                           -- Ci --> vCi-          ; return $ Just synTyCon-          }-        }-      where-        origName  = tyConName origTyCon-        vectName  = tyConName vectTyCon--        mkSyn canonName ty = buildSynTyCon canonName [] (typeKind ty) [] ty--        defDataCons-          | isAbstract = return ()-          | otherwise-          = do { MASSERT(tyConDataCons origTyCon `equalLength` tyConDataCons vectTyCon)-               ; zipWithM_ defDataCon (tyConDataCons origTyCon) (tyConDataCons vectTyCon)-               }----- Helpers ----------------------------------------------------------------------buildTyConPADict :: TyCon -> CoAxiom Unbranched -> TyCon -> TyCon -> VM Var-buildTyConPADict vect_tc prepr_ax pdata_tc pdatas_tc- = tyConRepr vect_tc >>= buildPADict vect_tc prepr_ax pdata_tc pdatas_tc---- Produce a custom-made worker for the data constructors of a vectorised data type.  This includes--- all data constructors that may be used in vectorised code — i.e., all data constructors of data--- types with 'VECTORISE [SCALAR] type' pragmas with an explicit right-hand side.  Also adds a mapping--- from the original to vectorised worker into the vectorisation map.------ FIXME: It's not nice that we need create a special worker after the data constructors has---   already been constructed.  Also, I don't think the worker is properly added to the data---   constructor.  Seems messy.-vectDataConWorkers :: TyCon -> TyCon -> TyCon -> VM ()-vectDataConWorkers orig_tc vect_tc arr_tc-  = do { traceVt "Building vectorised worker for datatype" (ppr orig_tc)--       ; bs <- sequence-             . zipWith3 def_worker  (tyConDataCons orig_tc) rep_tys-             $ zipWith4 mk_data_con (tyConDataCons vect_tc)-                                    rep_tys-                                    (inits rep_tys)-                                    (tail $ tails rep_tys)-        ; mapM_ (uncurry hoistBinding) bs-        }-  where-    tyvars   = tyConTyVars vect_tc-    var_tys  = mkTyVarTys tyvars-    ty_args  = map Type var_tys-    res_ty   = mkTyConApp vect_tc var_tys--    cons     = tyConDataCons vect_tc-    arity    = length cons-    [arr_dc] = tyConDataCons arr_tc--    rep_tys  = map dataConRepArgTys $ tyConDataCons vect_tc--    mk_data_con con tys pre post-      = do dflags <- getDynFlags-           liftM2 (,) (vect_data_con con)-                      (lift_data_con tys pre post (mkDataConTag dflags con))--    sel_replicate len tag-      | arity > 1 = do-                      rep <- builtin (selReplicate arity)-                      return [rep `mkApps` [len, tag]]--      | otherwise = return []--    vect_data_con con = return $ mkConApp con ty_args-    lift_data_con tys pre_tys post_tys tag-      = do-          len  <- builtin liftingContext-          args <- mapM (newLocalVar (fsLit "xs"))-                  =<< mapM mkPDataType tys--          sel  <- sel_replicate (Var len) tag--          pre   <- mapM emptyPD (concat pre_tys)-          post  <- mapM emptyPD (concat post_tys)--          return . mkLams (len : args)-                 . wrapFamInstBody arr_tc var_tys-                 . mkConApp arr_dc-                 $ ty_args ++ sel ++ pre ++ map Var args ++ post--    def_worker data_con arg_tys mk_body-      = do-          arity <- polyArity tyvars-          body <- closedV-                . inBind orig_worker-                . polyAbstract tyvars $ \args ->-                  liftM (mkLams (tyvars ++ args) . vectorised)-                $ buildClosures tyvars [] [] arg_tys res_ty mk_body--          raw_worker <- mkVectId orig_worker (exprType body)-          let vect_worker = raw_worker `setIdUnfolding`-                              mkInlineUnfoldingWithArity arity body-          defGlobalVar orig_worker vect_worker-          return (vect_worker, body)-      where-        orig_worker = dataConWorkId data_con
− vectorise/Vectorise/Type/TyConDecl.hs
@@ -1,217 +0,0 @@--module Vectorise.Type.TyConDecl (-  vectTyConDecls-) where--import GhcPrelude--import Vectorise.Type.Type-import Vectorise.Monad-import Vectorise.Env( GlobalEnv( global_fam_inst_env ) )-import BuildTyCl( TcMethInfo, buildClass, buildDataCon, newTyConRepName )-import OccName-import Class-import Type-import TyCon-import DataCon-import DynFlags-import BasicTypes( DefMethSpec(..) )-import SrcLoc( SrcSpan, noSrcSpan )-import Var-import Name-import Outputable-import Util-import Control.Monad----- |Vectorise some (possibly recursively defined) type constructors.----vectTyConDecls :: [TyCon] -> VM [TyCon]-vectTyConDecls tcs = fixV $ \tcs' ->-  do { names' <- mapM (mkLocalisedName mkVectTyConOcc . tyConName) tcs-     ; mapM_ (uncurry (uncurry defTyConName)) (tcs `zip` names' `zipLazy` tcs')-     ; zipWithM vectTyConDecl tcs names'-     }---- |Vectorise a single type constructor.----vectTyConDecl :: TyCon -> Name -> VM TyCon-vectTyConDecl tycon name'--      -- Type constructor representing a type class-  | Just cls <- tyConClass_maybe tycon-  = do { unless (null $ classATs cls) $-           do dflags <- getDynFlags-              cantVectorise dflags "Associated types are not yet supported" (ppr cls)--           -- vectorise superclass constraint (types)-       ; theta' <- mapM vectType (classSCTheta cls)--           -- vectorise method selectors-       ; let opItems      = classOpItems cls-             Just datacon = tyConSingleDataCon_maybe tycon-             argTys       = dataConRepArgTys datacon                      -- all selector types-             opTys        = drop (length argTys - length opItems) argTys  -- only method types-       ; methods' <- sequence [ vectMethod id meth ty | ((id, meth), ty) <- zip opItems opTys]--           -- construct the vectorised class (this also creates the class type constructors and its-           -- data constructor)-           ---           -- NB: 'buildClass' attaches new quantifiers and dictionaries to the method types-       ; cls' <- liftDs $-                   buildClass-                     name'                      -- new name: "V:Class"-                     (tyConBinders tycon)       -- keep original kind-                     (map (const Nominal) (tyConRoles tycon)) -- all role are N for safety-                     (snd . classTvsFds $ cls)  -- keep the original functional dependencies-                     (Just (-                         theta',                 -- superclasses-                         [],                     -- no associated types (for the moment)-                         methods',               -- method info-                         (classMinimalDef cls))) -- Inherit minimal complete definition from cls--           -- the original dictionary constructor must map to the vectorised one-       ; let tycon'        = classTyCon cls'-             Just datacon  = tyConSingleDataCon_maybe tycon-             Just datacon' = tyConSingleDataCon_maybe tycon'-       ; defDataCon datacon datacon'--           -- the original superclass and methods selectors must map to the vectorised ones-       ; let selIds  = classAllSelIds cls-             selIds' = classAllSelIds cls'-       ; zipWithM_ defGlobalVar selIds selIds'--           -- return the type constructor of the vectorised class-       ; return tycon'-       }--       -- Regular algebraic type constructor — for now, Haskell 2011-style only-  | isAlgTyCon tycon-  = do { unless (all isVanillaDataCon (tyConDataCons tycon)) $-           do dflags <- getDynFlags-              cantVectorise dflags "Currently only Haskell 2011 datatypes are supported" (ppr tycon)--           -- vectorise the data constructor of the class tycon-       ; rhs' <- vectAlgTyConRhs tycon (algTyConRhs tycon)--           -- keep the original GADT flags-       ; let gadt_flag = isGadtSyntaxTyCon tycon--           -- build the vectorised type constructor-       ; tc_rep_name <- mkDerivedName mkTyConRepOcc name'-       ; return $ mkAlgTyCon-                    name'                   -- new name-                    (tyConBinders tycon)-                    (tyConResKind tycon)    -- keep original kind-                    (map (const Nominal) (tyConRoles tycon)) -- all roles are N for safety-                    Nothing-                    []                      -- no stupid theta-                    rhs'                    -- new constructor defs-                    (VanillaAlgTyCon tc_rep_name)-                    gadt_flag               -- whether in GADT syntax-       }--  -- some other crazy thing that we don't handle-  | otherwise-  = do dflags <- getDynFlags-       cantVectorise dflags "Can't vectorise exotic type constructor" (ppr tycon)---- |Vectorise a class method.  (Don't enter it into the vectorisation map yet.)----vectMethod :: Id -> DefMethInfo -> Type -> VM TcMethInfo-vectMethod id defMeth ty- = do {   -- Vectorise the method type.-      ; ty' <- vectType ty--          -- Create a name for the vectorised method.-      ; id' <- mkVectId id ty'--      ; return  (Var.varName id', ty', defMethSpecOfDefMeth defMeth)-      }---- | Convert a `DefMethInfo` to a `DefMethSpec`, which discards the name field in---   the `DefMeth` constructor of the `DefMeth`.-defMethSpecOfDefMeth :: DefMethInfo -> Maybe (DefMethSpec (SrcSpan, Type))-defMethSpecOfDefMeth Nothing = Nothing-defMethSpecOfDefMeth (Just (_, VanillaDM))    = Just VanillaDM-defMethSpecOfDefMeth (Just (_, GenericDM ty)) = Just (GenericDM (noSrcSpan, ty))---- |Vectorise the RHS of an algebraic type.----vectAlgTyConRhs :: TyCon -> AlgTyConRhs -> VM AlgTyConRhs-vectAlgTyConRhs tc (AbstractTyCon {})-  = do dflags <- getDynFlags-       cantVectorise dflags "Can't vectorise imported abstract type" (ppr tc)-vectAlgTyConRhs _tc (DataTyCon { data_cons = data_cons-                               , is_enum   = is_enum-                               })-  = do { data_cons' <- mapM vectDataCon data_cons-       ; zipWithM_ defDataCon data_cons data_cons'-       ; return $ DataTyCon { data_cons = data_cons'-                            , is_enum   = is_enum-                            }-       }--vectAlgTyConRhs tc (TupleTyCon { data_con = con })-  = vectAlgTyConRhs tc (DataTyCon { data_cons = [con], is_enum = False })-    -- I'm not certain this is what you want to do for tuples,-    -- but it's the behaviour we had before I refactored the-    -- representation of AlgTyConRhs to add tuples--vectAlgTyConRhs tc (SumTyCon { data_cons = cons })-  = -- FIXME (osa): I'm pretty sure this is broken.. TupleTyCon case is probably-    -- also broken when the tuple is unboxed.-    vectAlgTyConRhs tc (DataTyCon { data_cons = cons-                                  , is_enum = all (((==) 0) . dataConRepArity) cons })--vectAlgTyConRhs tc (NewTyCon {})-  = do dflags <- getDynFlags-       cantVectorise dflags noNewtypeErr (ppr tc)-  where-    noNewtypeErr = "Vectorisation of newtypes not supported yet; please use a 'data' declaration"---- |Vectorise a data constructor by vectorising its argument and return types..----vectDataCon :: DataCon -> VM DataCon-vectDataCon dc-  | not . null $ ex_tvs-  = do dflags <- getDynFlags-       cantVectorise dflags "Can't vectorise constructor with existential type variables yet" (ppr dc)-  | not . null $ eq_spec-  = do dflags <- getDynFlags-       cantVectorise dflags "Can't vectorise constructor with equality context yet" (ppr dc)-  | not . null $ dataConFieldLabels dc-  = do dflags <- getDynFlags-       cantVectorise dflags "Can't vectorise constructor with labelled fields yet" (ppr dc)-  | not . null $ theta-  = do dflags <- getDynFlags-       cantVectorise dflags "Can't vectorise constructor with constraint context yet" (ppr dc)-  | otherwise-  = do { name'   <- mkLocalisedName mkVectDataConOcc name-       ; tycon'  <- vectTyCon tycon-       ; arg_tys <- mapM vectType rep_arg_tys-       ; let ret_ty = mkFamilyTyConApp tycon' (mkTyVarTys univ_tvs)-       ; fam_envs  <- readGEnv global_fam_inst_env-       ; rep_nm    <- liftDs $ newTyConRepName name'-       ; liftDs $ buildDataCon fam_envs-                    name'-                    (dataConIsInfix dc)            -- infix if the original is-                    rep_nm-                    (dataConSrcBangs dc)           -- strictness as original constructor-                    (Just $ dataConImplBangs dc)-                    []                             -- no labelled fields for now-                    univ_tvs                       -- universally quantified vars-                    []                             -- no existential tvs for now-                    user_bndrs-                    []                             -- no equalities for now-                    []                             -- no context for now-                    arg_tys                        -- argument types-                    ret_ty                         -- return type-                    tycon'                         -- representation tycon-       }-  where-    name        = dataConName dc-    rep_arg_tys = dataConRepArgTys dc-    tycon       = dataConTyCon dc-    (univ_tvs, ex_tvs, eq_spec, theta, _arg_tys, _res_ty) = dataConFullSig dc-    user_bndrs  = dataConUserTyVarBinders dc
− vectorise/Vectorise/Type/Type.hs
@@ -1,87 +0,0 @@--- Apply the vectorisation transformation to types. This is the \mathcal{L}_t scheme in HtM.--module Vectorise.Type.Type-  ( vectTyCon-  , vectAndLiftType-  , vectType-  )-where--import GhcPrelude--import Vectorise.Utils-import Vectorise.Monad-import Vectorise.Builtins-import TcType-import Type-import TyCoRep-import TyCon-import Control.Monad-import Data.Maybe-import Outputable---- |Vectorise a type constructor. Unless there is a vectorised version (stripped of embedded--- parallel arrays), the vectorised version is the same as the original.----vectTyCon :: TyCon -> VM TyCon-vectTyCon tc = maybe tc id <$> lookupTyCon tc---- |Produce the vectorised and lifted versions of a type.------ NB: Here we are limited to properly handle predicates at the toplevel only.  Anything embedded---     in what is called the 'body_ty' below will end up as an argument to the type family 'PData'.----vectAndLiftType :: Type -> VM (Type, Type)-vectAndLiftType ty | Just ty' <- coreView ty = vectAndLiftType ty'-vectAndLiftType ty-  = do { padicts  <- liftM catMaybes $ mapM paDictArgType tyvars-       ; vmono_ty <- vectType mono_ty-       ; lmono_ty <- mkPDataType vmono_ty-       ; return (abstractType tyvars (padicts ++ theta) vmono_ty,-                 abstractType tyvars (padicts ++ theta) lmono_ty)-       }-  where-    (tyvars, phiTy)  = splitForAllTys ty-    (theta, mono_ty) = tcSplitPhiTy phiTy---- |Vectorise a type.------ For each quantified var we need to add a PA dictionary out the front of the type.--- So          forall a.         C  a => a -> a--- turns into  forall a. PA a => Cv a => a :-> a----vectType :: Type -> VM Type-vectType ty-  | Just ty'  <- coreView ty-  = vectType ty'-vectType (TyVarTy tv)      = return $ TyVarTy tv-vectType (LitTy l)         = return $ LitTy l-vectType (AppTy ty1 ty2)   = AppTy <$> vectType ty1 <*> vectType ty2-vectType (TyConApp tc tys) = TyConApp <$> vectTyCon tc <*> mapM vectType tys-vectType (FunTy ty1 ty2)-  | isPredTy ty1-  = mkFunTy <$> vectType ty1 <*> vectType ty2   -- don't build a closure for dictionary abstraction-  | otherwise-  = TyConApp <$> builtin closureTyCon <*> mapM vectType [ty1, ty2]-vectType ty@(ForAllTy {})- = do {   -- strip off consecutive foralls-      ; let (tyvars, tyBody) = splitForAllTys ty--          -- vectorise the body-      ; vtyBody <- vectType tyBody--          -- make a PA dictionary for each of the type variables-      ; dictsPA <- liftM catMaybes $ mapM paDictArgType tyvars--          -- add the PA dictionaries after the foralls-      ; return $ abstractType tyvars dictsPA vtyBody-      }-vectType ty@(CastTy {})-  = pprSorry "Vectorise.Type.Type.vectType: CastTy" (ppr ty)-vectType ty@(CoercionTy {})-  = pprSorry "Vectorise.Type.Type.vectType: CoercionTy" (ppr ty)---- |Add quantified vars and dictionary parameters to the front of a type.----abstractType :: [TyVar] -> [Type] -> Type -> Type-abstractType tyvars dicts = mkInvForAllTys tyvars . mkFunTys dicts
− vectorise/Vectorise/Utils.hs
@@ -1,167 +0,0 @@-module Vectorise.Utils (-  module Vectorise.Utils.Base,-  module Vectorise.Utils.Closure,-  module Vectorise.Utils.Hoisting,-  module Vectorise.Utils.PADict,-  module Vectorise.Utils.Poly,--  -- * Annotated Exprs-  collectAnnTypeArgs,-  collectAnnDictArgs,-  collectAnnTypeBinders,-  collectAnnValBinders,-  isAnnTypeArg,--  -- * PD Functions-  replicatePD, emptyPD, packByTagPD,-  combinePD, liftPD,--  -- * Scalars-  isScalar, zipScalars, scalarClosure,--  -- * Naming-  newLocalVar-) where--import GhcPrelude--import Vectorise.Utils.Base-import Vectorise.Utils.Closure-import Vectorise.Utils.Hoisting-import Vectorise.Utils.PADict-import Vectorise.Utils.Poly-import Vectorise.Monad-import Vectorise.Builtins-import CoreSyn-import CoreUtils-import Id-import Type-import Control.Monad----- Annotated Exprs --------------------------------------------------------------collectAnnTypeArgs :: AnnExpr b ann -> (AnnExpr b ann, [Type])-collectAnnTypeArgs expr = go expr []-  where-    go (_, AnnApp f (_, AnnType ty)) tys = go f (ty : tys)-    go e                             tys = (e, tys)--collectAnnDictArgs :: AnnExpr Var ann -> (AnnExpr Var ann, [AnnExpr Var ann])-collectAnnDictArgs expr = go expr []-  where-    go e@(_, AnnApp f arg) dicts-      | isPredTy . exprType . deAnnotate $ arg = go f (arg : dicts)-      | otherwise                              = (e, dicts)-    go e                        dicts          = (e, dicts)--collectAnnTypeBinders :: AnnExpr Var ann -> ([Var], AnnExpr Var ann)-collectAnnTypeBinders expr = go [] expr-  where-    go bs (_, AnnLam b e) | isTyVar b = go (b : bs) e-    go bs e                           = (reverse bs, e)---- |Collect all consecutive value binders that are not dictionaries.----collectAnnValBinders :: AnnExpr Var ann -> ([Var], AnnExpr Var ann)-collectAnnValBinders expr = go [] expr-  where-    go bs (_, AnnLam b e) | isId b-                          && (not . isPredTy . idType $ b) = go (b : bs) e-    go bs e                                                = (reverse bs, e)--isAnnTypeArg :: AnnExpr b ann -> Bool-isAnnTypeArg (_, AnnType _) = True-isAnnTypeArg _              = False----- PD "Parallel Data" Functions -----------------------------------------------------   Given some data that has a PA dictionary, we can convert it to its---   representation type, perform some operation on the data, then convert it back.------   In the DPH backend, the types of these functions are defined---   in dph-common/D.A.P.Lifted/PArray.hs------- |An empty array of the given type.----emptyPD :: Type -> VM CoreExpr-emptyPD = paMethod emptyPDVar emptyPD_PrimVar---- |Produce an array containing copies of a given element.----replicatePD :: CoreExpr     -- ^ Number of copies in the resulting array.-            -> CoreExpr     -- ^ Value to replicate.-            -> VM CoreExpr-replicatePD len x-  = liftM (`mkApps` [len,x])-        $ paMethod replicatePDVar replicatePD_PrimVar (exprType x)---- |Select some elements from an array that correspond to a particular tag value and pack them into a new--- array.------ > packByTagPD Int# [:23, 42, 95, 50, 27, 49:]  3 [:1, 2, 1, 2, 3, 2:] 2--- >   ==> [:42, 50, 49:]----packByTagPD :: Type       -- ^ Element type.-            -> CoreExpr   -- ^ Source array.-            -> CoreExpr   -- ^ Length of resulting array.-            -> CoreExpr   -- ^ Tag values of elements in source array.-            -> CoreExpr   -- ^ The tag value for the elements to select.-            -> VM CoreExpr-packByTagPD ty xs len tags t-  = liftM (`mkApps` [xs, len, tags, t])-          (paMethod packByTagPDVar packByTagPD_PrimVar ty)---- |Combine some arrays based on a selector.  The selector says which source array to choose for each--- element of the resulting array.----combinePD :: Type         -- ^ Element type-          -> CoreExpr     -- ^ Length of resulting array-          -> CoreExpr     -- ^ Selector.-          -> [CoreExpr]   -- ^ Arrays to combine.-          -> VM CoreExpr-combinePD ty len sel xs-  = liftM (`mkApps` (len : sel : xs))-          (paMethod (combinePDVar n) (combinePD_PrimVar n) ty)-  where-    n = length xs---- |Like `replicatePD` but use the lifting context in the vectoriser state.----liftPD :: CoreExpr -> VM CoreExpr-liftPD x-  = do-      lc <- builtin liftingContext-      replicatePD (Var lc) x----- Scalars ----------------------------------------------------------------------isScalar :: Type -> VM Bool-isScalar ty-  = do-    { scalar <- builtin scalarClass-    ; existsInst scalar [ty]-    }--zipScalars :: [Type] -> Type -> VM CoreExpr-zipScalars arg_tys res_ty-  = do-    { scalar <- builtin scalarClass-    ; (dfuns, _) <- mapAndUnzipM (\ty -> lookupInst scalar [ty]) ty_args-    ; zipf <- builtin (scalarZip $ length arg_tys)-    ; return $ Var zipf `mkTyApps` ty_args `mkApps` map Var dfuns-    }-    where-      ty_args = arg_tys ++ [res_ty]--scalarClosure :: [Type] -> Type -> CoreExpr -> CoreExpr -> VM CoreExpr-scalarClosure arg_tys res_ty scalar_fun array_fun-  = do-    { ctr <- builtin (closureCtrFun $ length arg_tys)-    ; pas <- mapM paDictOfType (init arg_tys)-    ; return $ Var ctr `mkTyApps` (arg_tys ++ [res_ty])-                       `mkApps`   (pas ++ [scalar_fun, array_fun])-    }
− vectorise/Vectorise/Utils/Base.hs
@@ -1,261 +0,0 @@-{-# LANGUAGE CPP #-}--module Vectorise.Utils.Base-  ( voidType-  , newLocalVVar--  , mkDataConTag-  , mkWrapType-  , mkClosureTypes-  , mkPReprType-  , mkPDataType, mkPDatasType-  , splitPrimTyCon-  , mkBuiltinCo--  , wrapNewTypeBodyOfWrap-  , unwrapNewTypeBodyOfWrap-  , wrapNewTypeBodyOfPDataWrap-  , unwrapNewTypeBodyOfPDataWrap-  , wrapNewTypeBodyOfPDatasWrap-  , unwrapNewTypeBodyOfPDatasWrap--  , pdataReprTyCon-  , pdataReprTyConExact-  , pdatasReprTyConExact-  , pdataUnwrapScrut--  , preprFamInst-) where--import GhcPrelude--import Vectorise.Monad-import Vectorise.Vect-import Vectorise.Builtins--import CoreSyn-import CoreUtils-import FamInstEnv-import Coercion-import Type-import TyCon-import DataCon-import MkId-import DynFlags-import FastString--#include "HsVersions.h"---- Simple Types -----------------------------------------------------------------voidType :: VM Type-voidType = mkBuiltinTyConApp voidTyCon []----- Name Generation --------------------------------------------------------------newLocalVVar :: FastString -> Type -> VM VVar-newLocalVVar fs vty-  = do-      lty <- mkPDataType vty-      vv  <- newLocalVar fs vty-      lv  <- newLocalVar fs lty-      return (vv,lv)----- Constructors -----------------------------------------------------------------mkDataConTag :: DynFlags -> DataCon -> CoreExpr-mkDataConTag dflags = mkIntLitInt dflags . dataConTagZ----- Type Construction -------------------------------------------------------------- |Make an application of the 'Wrap' type constructor.----mkWrapType :: Type -> VM Type-mkWrapType ty = mkBuiltinTyConApp wrapTyCon [ty]---- |Make an application of the closure type constructor.----mkClosureTypes :: [Type] -> Type -> VM Type-mkClosureTypes = mkBuiltinTyConApps closureTyCon---- |Make an application of the 'PRepr' type constructor.----mkPReprType :: Type -> VM Type-mkPReprType ty = mkBuiltinTyConApp preprTyCon [ty]---- | Make an application of the 'PData' tycon to some argument.----mkPDataType :: Type -> VM Type-mkPDataType ty = mkBuiltinTyConApp pdataTyCon [ty]---- | Make an application of the 'PDatas' tycon to some argument.----mkPDatasType :: Type -> VM Type-mkPDatasType ty = mkBuiltinTyConApp pdatasTyCon [ty]---- Make an application of a builtin type constructor to some arguments.----mkBuiltinTyConApp :: (Builtins -> TyCon) -> [Type] -> VM Type-mkBuiltinTyConApp get_tc tys-  = do { tc <- builtin get_tc-       ; return $ mkTyConApp tc tys-       }---- Make a cascading application of a builtin type constructor.----mkBuiltinTyConApps :: (Builtins -> TyCon) -> [Type] -> Type -> VM Type-mkBuiltinTyConApps get_tc tys ty- = do { tc <- builtin get_tc-      ; return $ foldr (mk tc) ty tys-      }-  where-    mk tc ty1 ty2 = mkTyConApp tc [ty1,ty2]----- Type decomposition ------------------------------------------------------------- |Checks if a type constructor is defined in 'GHC.Prim' (e.g., 'Int#'); if so, returns it.----splitPrimTyCon :: Type -> Maybe TyCon-splitPrimTyCon ty-  | Just (tycon, []) <- splitTyConApp_maybe ty-  , isPrimTyCon tycon-  = Just tycon-  | otherwise = Nothing----- Coercion Construction --------------------------------------------------------- |Make a representational coercion to some builtin type.----mkBuiltinCo :: (Builtins -> TyCon) -> VM Coercion-mkBuiltinCo get_tc-  = do { tc <- builtin get_tc-       ; return $ mkTyConAppCo Representational tc []-       }----- Wrapping and unwrapping the 'Wrap' newtype ------------------------------------- |Apply the constructor wrapper of the 'Wrap' /newtype/.----wrapNewTypeBodyOfWrap :: CoreExpr -> Type -> VM CoreExpr-wrapNewTypeBodyOfWrap e ty-  = do { wrap_tc <- builtin wrapTyCon-       ; return $ wrapNewTypeBody wrap_tc [ty] e-       }---- |Strip the constructor wrapper of the 'Wrap' /newtype/.----unwrapNewTypeBodyOfWrap :: CoreExpr -> Type -> VM CoreExpr-unwrapNewTypeBodyOfWrap e ty-  = do { wrap_tc <- builtin wrapTyCon-       ; return $ unwrapNewTypeBody wrap_tc [ty] e-       }---- |Apply the constructor wrapper of the 'PData' /newtype/ instance of 'Wrap'.----wrapNewTypeBodyOfPDataWrap :: CoreExpr -> Type -> VM CoreExpr-wrapNewTypeBodyOfPDataWrap e ty-  = do { wrap_tc  <- builtin wrapTyCon-       ; pwrap_tc <- pdataReprTyConExact wrap_tc-       ; return $ wrapNewTypeBody pwrap_tc [ty] e-       }---- |Strip the constructor wrapper of the 'PData' /newtype/ instance of 'Wrap'.----unwrapNewTypeBodyOfPDataWrap :: CoreExpr -> Type -> VM CoreExpr-unwrapNewTypeBodyOfPDataWrap e ty-  = do { wrap_tc  <- builtin wrapTyCon-       ; pwrap_tc <- pdataReprTyConExact wrap_tc-       ; return $ unwrapNewTypeBody pwrap_tc [ty] (unwrapFamInstScrut pwrap_tc [ty] e)-       }---- |Apply the constructor wrapper of the 'PDatas' /newtype/ instance of 'Wrap'.----wrapNewTypeBodyOfPDatasWrap :: CoreExpr -> Type -> VM CoreExpr-wrapNewTypeBodyOfPDatasWrap e ty-  = do { wrap_tc  <- builtin wrapTyCon-       ; pwrap_tc <- pdatasReprTyConExact wrap_tc-       ; return $ wrapNewTypeBody pwrap_tc [ty] e-       }---- |Strip the constructor wrapper of the 'PDatas' /newtype/ instance of 'Wrap'.----unwrapNewTypeBodyOfPDatasWrap :: CoreExpr -> Type -> VM CoreExpr-unwrapNewTypeBodyOfPDatasWrap e ty-  = do { wrap_tc  <- builtin wrapTyCon-       ; pwrap_tc <- pdatasReprTyConExact wrap_tc-       ; return $ unwrapNewTypeBody pwrap_tc [ty] (unwrapFamInstScrut pwrap_tc [ty] e)-       }----- 'PData' representation types -------------------------------------------------- |Get the representation tycon of the 'PData' data family for a given type.------ This tycon does not appear explicitly in the source program — see Note [PData TyCons] in--- 'Vectorise.Generic.Description':------   @pdataReprTyCon {Sum2} = {PDataSum2}@------ The type for which we look up a 'PData' instance may be more specific than the type in the--- instance declaration.  In that case the second component of the result will be more specific than--- a set of distinct type variables.----pdataReprTyCon :: Type -> VM (TyCon, [Type])-pdataReprTyCon ty-  = do-    { FamInstMatch { fim_instance = famInst-                   , fim_tys      = tys } <- builtin pdataTyCon >>= (`lookupFamInst` [ty])-    ; return (dataFamInstRepTyCon famInst, tys)-    }---- |Get the representation tycon of the 'PData' data family for a given type constructor.------ For example, for a binary type constructor 'T', we determine the representation type constructor--- for 'PData (T a b)'.----pdataReprTyConExact :: TyCon -> VM TyCon-pdataReprTyConExact tycon-  = do {   -- look up the representation tycon; if there is a match at all, it will be exact-       ;   -- (i.e.,' _tys' will be distinct type variables)-       ; (ptycon, _tys) <- pdataReprTyCon (tycon `mkTyConApp` mkTyVarTys (tyConTyVars tycon))-       ; return ptycon-       }---- |Get the representation tycon of the 'PDatas' data family for a given type constructor.------ For example, for a binary type constructor 'T', we determine the representation type constructor--- for 'PDatas (T a b)'.----pdatasReprTyConExact :: TyCon -> VM TyCon-pdatasReprTyConExact tycon-  = do {   -- look up the representation tycon; if there is a match at all, it will be exact-       ; (FamInstMatch { fim_instance = ptycon }) <- pdatasReprTyCon (tycon `mkTyConApp` mkTyVarTys (tyConTyVars tycon))-       ; return $ dataFamInstRepTyCon ptycon-       }-  where-    pdatasReprTyCon ty = builtin pdatasTyCon >>= (`lookupFamInst` [ty])---- |Unwrap a 'PData' representation scrutinee.----pdataUnwrapScrut :: VExpr -> VM (CoreExpr, CoreExpr, DataCon)-pdataUnwrapScrut (ve, le)-  = do { (tc, arg_tys) <- pdataReprTyCon ty-       ; let [dc] = tyConDataCons tc-       ; return (ve, unwrapFamInstScrut tc arg_tys le, dc)-       }-  where-    ty = exprType ve----- 'PRepr' representation types -------------------------------------------------- |Get the representation tycon of the 'PRepr' type family for a given type.----preprFamInst :: Type -> VM FamInstMatch-preprFamInst ty = builtin preprTyCon >>= (`lookupFamInst` [ty])
− vectorise/Vectorise/Utils/Closure.hs
@@ -1,163 +0,0 @@--- |Utils concerning closure construction and application.--module Vectorise.Utils.Closure-  ( mkClosure-  , mkClosureApp-  , buildClosures-  )-where--import GhcPrelude--import Vectorise.Builtins-import Vectorise.Vect-import Vectorise.Monad-import Vectorise.Utils.Base-import Vectorise.Utils.PADict-import Vectorise.Utils.Hoisting--import CoreSyn-import Type-import MkCore-import CoreUtils-import TyCon-import DataCon-import MkId-import TysWiredIn-import BasicTypes( Boxity(..) )-import FastString----- |Make a closure.----mkClosure :: Type       -- ^ Type of the argument.-          -> Type       -- ^ Type of the result.-          -> Type       -- ^ Type of the environment.-          -> VExpr      -- ^ The function to apply.-          -> VExpr      -- ^ The environment to use.-          -> VM VExpr-mkClosure arg_ty res_ty env_ty (vfn,lfn) (venv,lenv)- = do dict <- paDictOfType env_ty-      mkv  <- builtin closureVar-      mkl  <- builtin liftedClosureVar-      return (Var mkv `mkTyApps` [arg_ty, res_ty, env_ty] `mkApps` [dict, vfn, lfn, venv],-              Var mkl `mkTyApps` [arg_ty, res_ty, env_ty] `mkApps` [dict, vfn, lfn, lenv])---- |Make a closure application.----mkClosureApp :: Type      -- ^ Type of the argument.-             -> Type      -- ^ Type of the result.-             -> VExpr     -- ^ Closure to apply.-             -> VExpr     -- ^ Argument to use.-             -> VM VExpr-mkClosureApp arg_ty res_ty (vclo, lclo) (varg, larg)- = do vapply <- builtin applyVar-      lapply <- builtin liftedApplyVar-      lc     <- builtin liftingContext-      return (Var vapply `mkTyApps` [arg_ty, res_ty] `mkApps` [vclo, varg],-              Var lapply `mkTyApps` [arg_ty, res_ty] `mkApps` [Var lc, lclo, larg])---- |Build a set of 'n' closures corresponding to an 'n'-ary vectorised function.  The length of--- the list of types of arguments determines the arity.------ In addition to a set of type variables, a set of value variables is passed during closure--- /construction/.  In contrast, the closure environment and the arguments are passed during closure--- application.----buildClosures :: [TyVar]    -- ^ Type variables passed during closure construction.-              -> [Var]      -- ^ Variables passed during closure construction.-              -> [VVar]     -- ^ Variables in the environment.-              -> [Type]     -- ^ Type of the arguments.-              -> Type       -- ^ Type of result.-              -> VM VExpr-              -> VM VExpr-buildClosures _tvs _vars _env [] _res_ty mk_body- = mk_body-buildClosures tvs vars env [arg_ty] res_ty mk_body- =  buildClosure tvs vars env arg_ty res_ty mk_body-buildClosures tvs vars env (arg_ty : arg_tys) res_ty mk_body- = do { res_ty' <- mkClosureTypes arg_tys res_ty-      ; arg     <- newLocalVVar (fsLit "x") arg_ty-      ; buildClosure tvs vars env arg_ty res_ty'-          . hoistPolyVExpr tvs vars (Inline (length env + 1))-          $ do { lc     <- builtin liftingContext-               ; clo    <- buildClosures tvs vars (env ++ [arg]) arg_tys res_ty mk_body-               ; return $ vLams lc (env ++ [arg]) clo-               }-      }---- Build a closure taking one extra argument during closure application.------ (clo <x1,...,xn> <f,f^>, aclo (Arr lc xs1 ... xsn) <f,f^>)---   where---     f  = \env v -> case env of <x1,...,xn> -> e x1 ... xn v---     f^ = \env v -> case env of Arr l xs1 ... xsn -> e^ l x1 ... xn v------ In addition to a set of type variables, a set of value variables is passed during closure--- /construction/.  In contrast, the closure environment and the closure argument are passed during--- closure application.----buildClosure :: [TyVar]         -- ^Type variables passed during closure construction.-             -> [Var]           -- ^Variables passed during closure construction.-             -> [VVar]          -- ^Variables in the environment.-             -> Type            -- ^Type of the closure argument.-             -> Type            -- ^Type of the result.-             -> VM VExpr-             -> VM VExpr-buildClosure tvs vars vvars arg_ty res_ty mk_body-  = do { (env_ty, env, bind) <- buildEnv vvars-       ; env_bndr <- newLocalVVar (fsLit "env") env_ty-       ; arg_bndr <- newLocalVVar (fsLit "arg") arg_ty--           -- generate the closure function as a hoisted binding-       ; fn <- hoistPolyVExpr tvs vars (Inline 2) $-                 do { lc     <- builtin liftingContext-                    ; body   <- mk_body-                    ; return . vLams lc [env_bndr, arg_bndr]-                             $ bind (vVar env_bndr)-                                    (vVarApps lc body (vvars ++ [arg_bndr]))-                    }--       ; mkClosure arg_ty res_ty env_ty fn env-       }---- Build the environment for a single closure.----buildEnv :: [VVar] -> VM (Type, VExpr, VExpr -> VExpr -> VExpr)-buildEnv []- = do-      ty    <- voidType-      void  <- builtin voidVar-      pvoid <- builtin pvoidVar-      return (ty, vVar (void, pvoid), \_ body -> body)-buildEnv [v]- = return (vVarType v, vVar v,-           \env body -> vLet (vNonRec v env) body)-buildEnv vs- = do (lenv_tc, lenv_tyargs) <- pdataReprTyCon ty--      let venv_con   = tupleDataCon Boxed (length vs)-          [lenv_con] = tyConDataCons lenv_tc--          venv       = mkCoreTup (map Var vvs)-          lenv       = Var (dataConWrapId lenv_con)-                       `mkTyApps` lenv_tyargs-                       `mkApps`   map Var lvs--          vbind env body = mkWildCase env ty (exprType body)-                           [(DataAlt venv_con, vvs, body)]--          lbind env body =-            let scrut = unwrapFamInstScrut lenv_tc lenv_tyargs env-            in-            mkWildCase scrut (exprType scrut) (exprType body)-              [(DataAlt lenv_con, lvs, body)]--          bind (venv, lenv) (vbody, lbody) = (vbind venv vbody,-                                              lbind lenv lbody)--      return (ty, (venv, lenv), bind)-  where-    (vvs, lvs) = unzip vs-    tys        = map vVarType vs-    ty         = mkBoxedTupleTy tys
− vectorise/Vectorise/Utils/Hoisting.hs
@@ -1,98 +0,0 @@-module Vectorise.Utils.Hoisting-  ( Inline(..)-  , addInlineArity-  , inlineMe--  , hoistBinding-  , hoistExpr-  , hoistVExpr-  , hoistPolyVExpr-  , takeHoisted-  )-where--import GhcPrelude--import Vectorise.Monad-import Vectorise.Env-import Vectorise.Vect-import Vectorise.Utils.Poly--import CoreSyn-import CoreUtils-import CoreUnfold-import Type-import Id-import BasicTypes  (Arity)-import FastString-import Control.Monad---- Inline ------------------------------------------------------------------------- |Records whether we should inline a particular binding.----data Inline-        = Inline Arity-        | DontInline---- |Add to the arity contained within an `Inline`, if any.----addInlineArity :: Inline -> Int -> Inline-addInlineArity (Inline m) n = Inline (m+n)-addInlineArity DontInline _ = DontInline---- |Says to always inline a binding.----inlineMe :: Inline-inlineMe = Inline 0----- Hoisting ----------------------------------------------------------------------hoistBinding :: Var -> CoreExpr -> VM ()-hoistBinding v e = updGEnv $ \env ->-  env { global_bindings = (v,e) : global_bindings env }--hoistExpr :: FastString -> CoreExpr -> Inline -> VM Var-hoistExpr fs expr inl-  = do-      var <- mk_inline `liftM` newLocalVar fs (exprType expr)-      hoistBinding var expr-      return var-  where-    mk_inline var = case inl of-                      Inline arity -> var `setIdUnfolding`-                                      mkInlineUnfoldingWithArity arity expr-                      DontInline   -> var--hoistVExpr :: VExpr -> Inline -> VM VVar-hoistVExpr (ve, le) inl-  = do-      fs <- getBindName-      vv <- hoistExpr ('v' `consFS` fs) ve inl-      lv <- hoistExpr ('l' `consFS` fs) le (addInlineArity inl 1)-      return (vv, lv)---- |Hoist a polymorphic vectorised expression into a new top-level binding (representing a closure--- function).------ The hoisted expression is parameterised by (1) a set of type variables and (2) a set of value--- variables that are passed as conventional type and value arguments.  The latter is implicitly--- extended by the set of 'PA' dictionaries required for the type variables.----hoistPolyVExpr :: [TyVar] -> [Var] -> Inline -> VM VExpr -> VM VExpr-hoistPolyVExpr tvs vars inline p-  = do { inline' <- addInlineArity inline . (+ length vars) <$> polyArity tvs-       ; expr <- closedV . polyAbstract tvs $ \args ->-                   mapVect (mkLams $ tvs ++ args ++ vars) <$> p-       ; fn   <- hoistVExpr expr inline'-       ; let varArgs = varsToCoreExprs vars-       ; mapVect (\e -> e `mkApps` varArgs) <$> polyVApply (vVar fn) (mkTyVarTys tvs)-       }--takeHoisted :: VM [(Var, CoreExpr)]-takeHoisted-  = do-      env <- readGEnv id-      setGEnv $ env { global_bindings = [] }-      return $ global_bindings env
− vectorise/Vectorise/Utils/PADict.hs
@@ -1,232 +0,0 @@-module Vectorise.Utils.PADict (-  paDictArgType,-  paDictOfType,-  paMethod,-  prDictOfReprType,-  prDictOfPReprInstTyCon-) where--import GhcPrelude--import Vectorise.Monad-import Vectorise.Builtins-import Vectorise.Utils.Base--import CoreSyn-import CoreUtils-import FamInstEnv-import Coercion-import Type-import TyCoRep-import TyCon-import CoAxiom-import Var-import Outputable-import DynFlags-import FastString-import Util-import Control.Monad----- |Construct the PA argument type for the tyvar. For the tyvar (v :: *) it's--- just PA v. For (v :: (* -> *) -> *) it's------ > forall (a :: * -> *). (forall (b :: *). PA b -> PA (a b)) -> PA (v a)----paDictArgType :: TyVar -> VM (Maybe Type)-paDictArgType tv = go (mkTyVarTy tv) (tyVarKind tv)-  where-    go ty (FunTy k1 k2)-      = do-          tv   <- if isCoercionType k1-                  then newCoVar (fsLit "c") k1-                  else newTyVar (fsLit "a") k1-          mty1 <- go (mkTyVarTy tv) k1-          case mty1 of-            Just ty1 -> do-                          mty2 <- go (mkAppTy ty (mkTyVarTy tv)) k2-                          return $ fmap (mkInvForAllTy tv . mkFunTy ty1) mty2-            Nothing  -> go ty k2--    go ty k-      | isLiftedTypeKind k-      = do-          pa_cls <- builtin paClass-          return $ Just $ mkClassPred pa_cls [ty]--    go _ _ = return Nothing----- |Get the PA dictionary for some type----paDictOfType :: Type -> VM CoreExpr-paDictOfType ty-  = paDictOfTyApp ty_fn ty_args-  where-    (ty_fn, ty_args) = splitAppTys ty--    paDictOfTyApp :: Type -> [Type] -> VM CoreExpr-    paDictOfTyApp ty_fn ty_args-        | Just ty_fn' <- coreView ty_fn-        = paDictOfTyApp ty_fn' ty_args--    -- for type variables, look up the dfun and apply to the PA dictionaries-    -- of the type arguments-    paDictOfTyApp (TyVarTy tv) ty_args-      = do-        { dfun <- maybeCantVectoriseM "No PA dictionary for type variable"-                                      (ppr tv <+> text "in" <+> ppr ty)-                $ lookupTyVarPA tv-        ; dicts <- mapM paDictOfType ty_args-        ; return $ dfun `mkTyApps` ty_args `mkApps` dicts-        }--    -- for tycons, we also need to apply the dfun to the PR dictionary of-    -- the representation type if the tycon is polymorphic-    paDictOfTyApp (TyConApp tc []) ty_args-      = do-        { dfun <- maybeCantVectoriseM noPADictErr (ppr tc <+> text "in" <+> ppr ty)-                $ lookupTyConPA tc-        ; super <- super_dict tc ty_args-        ; dicts <- mapM paDictOfType ty_args-        ; return $ Var dfun `mkTyApps` ty_args `mkApps` super `mkApps` dicts-        }-      where-        noPADictErr = "No PA dictionary for type constructor (did you import 'Data.Array.Parallel'?)"--        super_dict _     []      = return []-        super_dict tycon ty_args-          = do-            { pr <- prDictOfPReprInst (TyConApp tycon ty_args)-            ; return [pr]-            }--    paDictOfTyApp _ _ = getDynFlags >>= failure--    failure dflags = cantVectorise dflags "Can't construct PA dictionary for type" (ppr ty)---- |Produce code that refers to a method of the 'PA' class.----paMethod :: (Builtins -> Var) -> (TyCon -> Builtins -> Var) -> Type -> VM CoreExpr-paMethod _ query ty-  | Just tycon <- splitPrimTyCon ty             -- Is 'ty' from 'GHC.Prim' (e.g., 'Int#')?-  = liftM Var $ builtin (query tycon)-paMethod method _ ty-  = do-    { fn   <- builtin method-    ; dict <- paDictOfType ty-    ; return $ mkApps (Var fn) [Type ty, dict]-    }---- |Given a type @ty@, return the PR dictionary for @PRepr ty@.----prDictOfPReprInst :: Type -> VM CoreExpr-prDictOfPReprInst ty-  = do-    { (FamInstMatch { fim_instance = prepr_fam, fim_tys = prepr_args })-          <- preprFamInst ty-    ; prDictOfPReprInstTyCon ty (famInstAxiom prepr_fam) prepr_args-    }---- |Given a type @ty@, its PRepr synonym tycon and its type arguments,--- return the PR @PRepr ty@. Suppose we have:------ > type instance PRepr (T a1 ... an) = t------ which is internally translated into------ > type :R:PRepr a1 ... an = t------ and the corresponding coercion. Then,------ > prDictOfPReprInstTyCon (T a1 ... an) :R:PRepr u1 ... un = PR (T u1 ... un)------ Note that @ty@ is only used for error messages----prDictOfPReprInstTyCon :: Type -> CoAxiom Unbranched -> [Type] -> VM CoreExpr-prDictOfPReprInstTyCon _ty prepr_ax prepr_args-  = do-      let rhs = mkUnbranchedAxInstRHS prepr_ax prepr_args []-      dict <- prDictOfReprType' rhs-      pr_co <- mkBuiltinCo prTyCon-      let co = mkAppCo pr_co-             $ mkSymCo-             $ mkUnbranchedAxInstCo Nominal prepr_ax prepr_args []-      return $ mkCast dict co---- |Get the PR dictionary for a type. The argument must be a representation--- type.----prDictOfReprType :: Type -> VM CoreExpr-prDictOfReprType ty-  | Just (tycon, tyargs) <- splitTyConApp_maybe ty-    = do-        prepr <- builtin preprTyCon-        if tycon == prepr-          then do-                 let [ty'] = tyargs-                 pa <- paDictOfType ty'-                 sel <- builtin paPRSel-                 return $ Var sel `App` Type ty' `App` pa-          else do-                 -- a representation tycon must have a PR instance-                 dfun <- maybeV (text "look up PR dictionary for" <+> ppr tycon) $-                           lookupTyConPR tycon-                 prDFunApply dfun tyargs--  | otherwise-    = do-        -- it is a tyvar or an application of a tyvar-        -- determine the PR dictionary from its PA dictionary-        ---        -- NOTE: This assumes that PRepr t ~ t is for all representation types-        -- t-        ---        -- FIXME: This doesn't work for kinds other than * at the moment. We'd-        -- have to simply abstract the term over the missing type arguments.-        pa    <- paDictOfType ty-        prsel <- builtin paPRSel-        return $ Var prsel `mkApps` [Type ty, pa]--prDictOfReprType' :: Type -> VM CoreExpr-prDictOfReprType' ty = prDictOfReprType ty `orElseV`-                       do dflags <- getDynFlags-                          cantVectorise dflags "No PR dictionary for representation type"-                                        (ppr ty)---- | Apply a tycon's PR dfun to dictionary arguments (PR or PA) corresponding--- to the argument types.-prDFunApply :: Var -> [Type] -> VM CoreExpr-prDFunApply dfun tys-  | Just [] <- ctxs    -- PR (a :-> b) doesn't have a context-  = return $ Var dfun `mkTyApps` tys--  | Just tycons <- ctxs-  , tycons `equalLength` tys-  = do-      pa <- builtin paTyCon-      pr <- builtin prTyCon-      dflags <- getDynFlags-      args <- zipWithM (dictionary dflags pa pr) tys tycons-      return $ Var dfun `mkTyApps` tys `mkApps` args--  | otherwise = do dflags <- getDynFlags-                   invalid dflags-  where-    -- the dfun's contexts - if its type is (PA a, PR b) => PR (C a b) then-    -- ctxs is Just [PA, PR]-    ctxs = fmap (map fst)-         $ sequence-         $ map splitTyConApp_maybe-         $ fst-         $ splitFunTys-         $ snd-         $ splitForAllTys-         $ varType dfun--    dictionary dflags pa pr ty tycon-      | tycon == pa = paDictOfType ty-      | tycon == pr = prDictOfReprType ty-      | otherwise   = invalid dflags--    invalid dflags = cantVectorise dflags "Invalid PR dfun type" (ppr (varType dfun) <+> ppr tys)
− vectorise/Vectorise/Utils/Poly.hs
@@ -1,74 +0,0 @@--- |Auxiliary functions to vectorise type abstractions.--module Vectorise.Utils.Poly-  ( polyAbstract-  , polyApply-  , polyVApply-  , polyArity-  )-where--import GhcPrelude--import Vectorise.Vect-import Vectorise.Monad-import Vectorise.Utils.PADict-import CoreSyn-import Type-import FastString-import Control.Monad----- Vectorisation of type arguments ----------------------------------------------------------------- |Vectorise under the 'PA' dictionary variables corresponding to a set of type arguments.------ The dictionary variables are new local variables that are entered into the local vectorisation--- map.------ The purpose of this function is to introduce the additional 'PA' dictionary arguments that are--- needed when vectorising type abstractions.----polyAbstract :: [TyVar] -> ([Var] -> VM a) -> VM a-polyAbstract tvs p-  = localV-  $ do { mdicts <- mapM mk_dict_var tvs-       ; zipWithM_ (\tv -> maybe (defLocalTyVar tv)-                                 (defLocalTyVarWithPA tv . Var)) tvs mdicts-       ; p (mk_args mdicts)-       }-  where-    mk_dict_var tv-      = do { r <- paDictArgType tv-           ; case r of-               Just ty -> liftM Just (newLocalVar (fsLit "dPA") ty)-               Nothing -> return Nothing-           }--    mk_args mdicts = [dict | Just dict <- mdicts]---- |Determine the number of 'PA' dictionary arguments required for a set of type variables (depends--- on their kinds).----polyArity :: [TyVar] -> VM Int-polyArity tvs-  = do { tys <- mapM paDictArgType tvs-       ; return $ length [() | Just _ <- tys]-       }---- |Apply a expression to its type arguments as well as 'PA' dictionaries for these type arguments.----polyApply :: CoreExpr -> [Type] -> VM CoreExpr-polyApply expr tys- = do { dicts <- mapM paDictOfType tys-      ; return $ expr `mkTyApps` tys `mkApps` dicts-      }---- |Apply a vectorised expression to a set of type arguments together with 'PA' dictionaries for--- these type arguments.----polyVApply :: VExpr -> [Type] -> VM VExpr-polyVApply expr tys- = do { dicts <- mapM paDictOfType tys-      ; return $ mapVect (\e -> e `mkTyApps` tys `mkApps` dicts) expr-      }
− vectorise/Vectorise/Var.hs
@@ -1,103 +0,0 @@-{-# LANGUAGE TupleSections #-}---- |Vectorise variables and literals.--module Vectorise.Var-  ( vectBndr-  , vectBndrNew-  , vectBndrIn-  , vectBndrNewIn-  , vectBndrsIn-  , vectVar-  , vectConst-  )-where--import GhcPrelude--import Vectorise.Utils-import Vectorise.Monad-import Vectorise.Env-import Vectorise.Vect-import Vectorise.Type.Type-import CoreSyn-import Type-import VarEnv-import Id-import FastString---- Binders -------------------------------------------------------------------------------------------- |Vectorise a binder variable, along with its attached type.----vectBndr :: Var -> VM VVar-vectBndr v- = do (vty, lty) <- vectAndLiftType (idType v)-      let vv = v `Id.setIdType` vty-          lv = v `Id.setIdType` lty--      updLEnv (mapTo vv lv)--      return  (vv, lv)-  where-    mapTo vv lv env = env { local_vars = extendVarEnv (local_vars env) v (vv, lv) }---- |Vectorise a binder variable, along with its attached type, but give the result a new name.----vectBndrNew :: Var -> FastString -> VM VVar-vectBndrNew v fs- = do vty <- vectType (idType v)-      vv  <- newLocalVVar fs vty-      updLEnv (upd vv)-      return vv-  where-    upd vv env = env { local_vars = extendVarEnv (local_vars env) v vv }---- |Vectorise a binder then run a computation with that binder in scope.----vectBndrIn :: Var -> VM a -> VM (VVar, a)-vectBndrIn v p- = localV- $ do vv <- vectBndr v-      x <- p-      return (vv, x)---- |Vectorise a binder, give it a new name, then run a computation with that binder in scope.----vectBndrNewIn :: Var -> FastString -> VM a -> VM (VVar, a)-vectBndrNewIn v fs p- = localV- $ do vv <- vectBndrNew v fs-      x  <- p-      return (vv, x)---- |Vectorise some binders, then run a computation with them in scope.----vectBndrsIn :: [Var] -> VM a -> VM ([VVar], a)-vectBndrsIn vs p- = localV- $ do vvs <- mapM vectBndr vs-      x   <- p-      return (vvs, x)----- Variables ------------------------------------------------------------------------------------------ |Vectorise a variable, producing the vectorised and lifted versions.----vectVar :: Var -> VM VExpr-vectVar var-  = do { vVar <- lookupVar var-       ; case vVar of-           Local (vv, lv) -> return (Var vv, Var lv) -- local variables have a vect & lifted version-           Global vv      -> vectConst (Var vv)      -- global variables get replicated-       }----- Constants ------------------------------------------------------------------------------------------ |Constants are lifted by replication along the integer context in the `VM` state for the number--- of elements in the result array.----vectConst :: CoreExpr -> VM VExpr-vectConst c = (c,) <$> liftPD c
− vectorise/Vectorise/Vect.hs
@@ -1,128 +0,0 @@--- |Simple vectorised constructors and projections.----module Vectorise.Vect-  ( Vect, VVar, VExpr, VBind--  , vectorised-  , lifted-  , mapVect--  , vVarType-  , vNonRec-  , vRec-  , vVar-  , vType-  , vTick-  , vLet-  , vLams-  , vVarApps-  , vCaseDEFAULT-  )-where--import GhcPrelude--import CoreSyn-import Type           ( Type )-import Var---- |Contains the vectorised and lifted versions of some thing.----type Vect a = (a,a)-type VVar   = Vect Var-type VExpr  = Vect CoreExpr-type VBind  = Vect CoreBind---- |Get the vectorised version of a thing.----vectorised :: Vect a -> a-vectorised = fst---- |Get the lifted version of a thing.----lifted :: Vect a -> a-lifted = snd---- |Apply some function to both the vectorised and lifted versions of a thing.----mapVect :: (a -> b) -> Vect a -> Vect b-mapVect f (x, y) = (f x, f y)---- |Combine vectorised and lifted versions of two things componentwise.----zipWithVect :: (a -> b -> c) -> Vect a -> Vect b -> Vect c-zipWithVect f (x1, y1) (x2, y2) = (f x1 x2, f y1 y2)---- |Get the type of a vectorised variable.----vVarType :: VVar -> Type-vVarType = varType . vectorised---- |Wrap a vectorised variable as a vectorised expression.----vVar :: VVar -> VExpr-vVar = mapVect Var---- |Wrap a vectorised type as a vectorised expression.----vType :: Type -> VExpr-vType ty = (Type ty, Type ty)---- |Make a vectorised note.----vTick :: Tickish Id -> VExpr -> VExpr-vTick = mapVect . Tick---- |Make a vectorised non-recursive binding.----vNonRec :: VVar -> VExpr -> VBind-vNonRec = zipWithVect NonRec---- |Make a vectorised recursive binding.----vRec :: [VVar] -> [VExpr] -> VBind-vRec vs es = (Rec (zip vvs ves), Rec (zip lvs les))-  where-    (vvs, lvs) = unzip vs-    (ves, les) = unzip es---- |Make a vectorised let expression.----vLet :: VBind -> VExpr -> VExpr-vLet = zipWithVect Let---- |Make a vectorised lambda abstraction.------ The lifted version also binds the lifting context 'lc'.----vLams :: Var      -- ^ Var bound to the lifting context.-      -> [VVar]   -- ^ Parameter vars for the abstraction.-      -> VExpr    -- ^ Body of the abstraction.-      -> VExpr-vLams lc vs (ve, le)-  = (mkLams vvs ve, mkLams (lc:lvs) le)-  where-    (vvs, lvs) = unzip vs---- |Apply an expression to a set of argument variables.------ The lifted version is also applied to the variable of the lifting context.----vVarApps :: Var -> VExpr -> [VVar] -> VExpr-vVarApps lc (ve, le) vvs-  = (ve `mkVarApps` vs, le `mkVarApps` (lc : ls))-  where-    (vs, ls) = unzip vvs---vCaseDEFAULT :: VExpr  -- scrutinee-             -> VVar   -- bnder-             -> Type   -- type of vectorised version-             -> Type   -- type of lifted version-             -> VExpr  -- body of alternative.-             -> VExpr-vCaseDEFAULT (vscrut, lscrut) (vbndr, lbndr) vty lty (vbody, lbody)-  = (Case vscrut vbndr vty (mkDEFAULT vbody),-     Case lscrut lbndr lty (mkDEFAULT lbody))-  where-    mkDEFAULT e = [(DEFAULT, [], e)]